湖里大屏(安全管理):问题占比联调
This commit is contained in:
parent
799264f561
commit
f05125cb34
@ -85,6 +85,11 @@ export default {
|
||||
}
|
||||
this.jNestedRingChart.setOption(option)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
series() {
|
||||
this.createChart()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -17,13 +17,13 @@
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<JNestedRingChart :title="{ text: 654, subTitle: '问题总数', y: '35%' }" :series="series" />
|
||||
<JNestedRingChart :title="{ text: totalNum, subTitle: '问题总数', y: '35%' }" :series="series" />
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Card from '../components/Card.vue'
|
||||
import { getNewestSecurityManageDataList2Api } from '@/assets/js/api/dataBoard'
|
||||
import { selectSecurityManageStatisticsApi } from '@/assets/js/api/dataBoard'
|
||||
import JNestedRingChart from '../jChart/pie/JNestedRingChart.vue'
|
||||
export default {
|
||||
components: { Card, JNestedRingChart },
|
||||
@ -34,23 +34,26 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getNewestSecurityManageDataList2Api({ projectSn: this.projectSn }).then(res => {
|
||||
this.alarmList = res.result || []
|
||||
selectSecurityManageStatisticsApi({ projectSn: this.projectSn }).then(res => {
|
||||
const totals = res.result.total
|
||||
this.series = [
|
||||
{
|
||||
color: ['#FE6C7F', '#786FF0', '#5CE2F6'],
|
||||
data: [
|
||||
{ value: totals.weekInspectNum, name: '周检' },
|
||||
{ value: totals.monthInspectNum, name: '月检' },
|
||||
{ value: totals.otherInspectNum, name: '其他' }
|
||||
]
|
||||
}
|
||||
]
|
||||
this.totalNum = totals.totalNum
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
projectSn: this.$store.state.projectSn,
|
||||
series: [
|
||||
{
|
||||
color: ['#FE6C7F', '#786FF0', '#5CE2F6'],
|
||||
data: [
|
||||
{ value: 45, name: '周检' },
|
||||
{ value: 5, name: '月检' },
|
||||
{ value: 15, name: '其他' }
|
||||
]
|
||||
}
|
||||
]
|
||||
series: [],
|
||||
total: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user