|
|
@@ -2,17 +2,16 @@
|
|
|
<div class="dashboard-editor-container">
|
|
|
<!-- <github-corner class="github-corner" /> -->
|
|
|
<el-row class="system-carousel">
|
|
|
- <el-carousel indicator-position="none" :height="bannerHeight+'px'">
|
|
|
+ <el-carousel indicator-position="none" :height="bannerHeight+'px'" style="max-height:350px;">
|
|
|
<el-carousel-item v-for="(item,key) in slides" :key="key">
|
|
|
<template v-if="item.TYPE==='1'">
|
|
|
<router-link :to="`/shop/index`" target="_self">
|
|
|
- <img ref="bannerHeight" @load="imgLoad" style="width:100%" src="http://ndsupload.ekhkad.com/files/2022/0526/573c9560dca111eca0a40ae051ba5350.jpg" alt="" >
|
|
|
+ <img ref="bannerHeight" @load="imgLoad" :src="imageArticle(item.IMAGE)" alt="" >
|
|
|
</router-link>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<router-link :to="`/article/detail/${item.CONTENT}`" target="_blank">
|
|
|
- <!-- http://ndsupload.ekhkad.com/files/2022/0526/573c9560dca111eca0a40ae051ba5350.jpg -->
|
|
|
- <img ref="bannerHeight" @load="imgLoad" style="width:100%" src="http://ndsupload.ekhkad.com/files/2022/0526/573c9560dca111eca0a40ae051ba5350.jpg" alt="" >
|
|
|
+ <img ref="bannerHeight" @load="imgLoad" :src="imageArticle(item.IMAGE)" alt="" >
|
|
|
</router-link>
|
|
|
</template>
|
|
|
</el-carousel-item>
|
|
|
@@ -31,7 +30,7 @@
|
|
|
<template v-if="item.LISTS.length>0">
|
|
|
<div v-for="(o,k) in item.LISTS" :key="k" class="text item" >
|
|
|
<router-link :to="`/article/detail/${o.ID}`" :title="o.TITLE">{{o.TITLE}}</router-link>
|
|
|
- <span>{{o.CREATED_AT}}</span>
|
|
|
+ <span>{{ formatDate(o.CREATED_AT) }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
<div v-if="item.LISTS.length==0">No content</div><!--暂无内容-->
|
|
|
@@ -62,6 +61,7 @@ import BarChart from './components/BarChart'
|
|
|
import TransactionTable from './components/TransactionTable'
|
|
|
import TodoList from './components/TodoList'
|
|
|
import BoxCard from './components/BoxCard'
|
|
|
+import tool from '@/utils/tool'
|
|
|
|
|
|
const lineChartData = {
|
|
|
newVisitis: {
|
|
|
@@ -114,9 +114,6 @@ export default {
|
|
|
endTime: '',
|
|
|
num: 0
|
|
|
}
|
|
|
- },
|
|
|
- created(){
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
handleSetLineChartData(type) {
|
|
|
@@ -126,9 +123,17 @@ export default {
|
|
|
let _this = this
|
|
|
if (_this.$refs.bannerHeight) {
|
|
|
_this.$nextTick(function () {
|
|
|
- _this.bannerHeight = _this.$refs.bannerHeight[0] && _this.$refs.bannerHeight[0].height ? _this.$refs.bannerHeight[0].height : _this.bannerHeight
|
|
|
+ _this.bannerHeight = _this.$refs.bannerHeight[0] && _this.$refs.bannerHeight[0].height ?
|
|
|
+ _this.$refs.bannerHeight[0].height
|
|
|
+ : _this.bannerHeight
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ imageArticle (imageUrl) {
|
|
|
+ return tool.getArImage(imageUrl, '/files/')
|
|
|
+ },
|
|
|
+ formatDate(data) {
|
|
|
+ return tool.formatDate(data,false)
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -160,6 +165,14 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+img {
|
|
|
+ max-height:350px;
|
|
|
+ max-width:400px;
|
|
|
+ margin: 0 auto;
|
|
|
+}
|
|
|
+::v-deep .el-carousel__container {
|
|
|
+ text-align: center !important;
|
|
|
+}
|
|
|
.dashboard-editor-container {
|
|
|
padding: 32px;
|
|
|
background-color: rgb(240, 242, 245);
|