This commit is contained in:
shijingjing
2022-08-22 16:34:58 +08:00
parent 120877de5c
commit 0894a93782
2 changed files with 21 additions and 18 deletions

View File

@@ -550,23 +550,26 @@ export default {
.then((res) => {
if (res.code ===0) {
if(res.data && res.data.length) {
this.colData = res.data
let items = [], xData = [], yData = []
res.data.forEach((item) => {
const i = {type: 'departmentName', id: item.deptId, corpid: this.user.corpId}
items.push(i)
yData.push(item.taskCount)
})
let xData = res.data.map(e=> e.deptName)
let yData = res.data.map(e=> e.taskCount)
this.getColumnarEcharts(xData, yData)
// this.colData = res.data
// let items = [], xData = [], yData = []
// res.data.forEach((item) => {
// const i = {type: 'departmentName', id: item.deptId, corpid: this.user.corpId}
// items.push(i)
// yData.push(item.taskCount)
// })
this.initOpenData({canvas:true})
setTimeout(() => {
this.transCanvas(items).then((data) => {
data.items.map((a) => {
xData.push(a.data)
})
this.getColumnarEcharts(xData, yData)
})
}, 2000)
// this.initOpenData({canvas:true})
// setTimeout(() => {
// this.transCanvas(items).then((data) => {
// data.items.map((a) => {
// xData.push(a.data)
// })
// this.getColumnarEcharts(xData, yData)
// })
// }, 2000)
}
}
});

View File

@@ -5,7 +5,7 @@
</div>
<div class="dailyMatters">
<div v-if="list && list.length">
<div v-if="list.length">
<div>
<div v-for="(item, index) in list.slice(0,3)" :key="index" :class="{'color1':index%4==0,'color2':index%4==1,'color3':index%4==2,'color4':index%4==3}" class="daily_item">
<div>{{ item.createTime.substring(10, 16) }}</div>
@@ -21,7 +21,7 @@
</div>
<div class="readMore" v-show="!show && list.length > 3" @click="show = true">查看更多</div>
</div>
<AiEmpty description="暂无宣发" v-else></AiEmpty>
<AiEmpty description="暂无宣发" v-if="!list.length" />
</div>
</div>
</template>