湖里大屏(安全管理):整改动态联调

This commit is contained in:
Jack 2022-08-13 18:26:50 +08:00
parent 4c88cc065f
commit 008f92cd0a
4 changed files with 42 additions and 34 deletions

View File

@ -141,35 +141,14 @@
<vue-scroll>
<ul class="greenTable dynamicList">
<li v-for="(item, index) in activityList" :key="index">
{{ item.rectifyPeopleAme
}}<!-- 有一条 -->{{ $t('message.dataBoard.hasOne') }}{{ statusArr[item.state - 1] }}{{ $t('message.dataBoard.problen')
}}<!-- 的问题 -->
{{ item.rectifyPeopleAme }}
<!-- 有一条 -->
{{ $t('message.dataBoard.hasOne') }}
{{ statusArr[item.state - 1] }}
{{ $t('message.dataBoard.problen') }}
<!-- 的问题 -->
</li>
</ul>
<!-- <table class="greenTable">
<thead>
<tr>
<th>
{{ $t("message.environmentalOverview.table2.th1") }}
</th>
<th>
{{ $t("message.environmentalOverview.table2.th2") }}
</th>
<th>
{{ $t("message.environmentalOverview.table2.th3") }}
</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in alarmList" :key="index">
<td>
{{ item.deviceName }}
</td>
<td>{{ item.alarmTime }}</td>
<td>{{ item.alarmTypeName }}</td>
</tr>
</tbody>
</table> -->
<div class="placeholderBox placeholderBox2" v-if="activityList.length == 0">
<img src="@/assets/images/noData3.png" alt="" srcset="" />
<p>

View File

@ -9,7 +9,7 @@
<leftCenter title="安全预警" />
</div>
<div class="leftBottom">
<leftBottom title="隐患排查" />
<leftBottom title="整改动态" />
</div>
</div>
<div class="centerBox">

View File

@ -1,6 +1,6 @@
<template>
<Card :title="title">
<div class="rates">
<!-- <div class="rates">
<div class="rate">
<div class="chart">
<JRingChart :title="{ text: '89%', y: '40%' }" :data="[{ value: 89 }, { value: 11 }]" :color="['#557DEE', '#182B53']" />
@ -19,6 +19,14 @@
</div>
<div class="label">项目及时复查率</div>
</div>
</div> -->
<div class="info">
<vue-scroll>
<div class="info-item" v-for="(item, index) in activityList" :key="index">
{{ `${item.rectifyPeopleAme} 有一条 ${status[item.state]} 的问题` }}
</div>
</vue-scroll>
<div v-if="!activityList.length">无数据</div>
</div>
</Card>
</template>
@ -26,6 +34,7 @@
<script>
import Card from '../components/Card.vue'
import JRingChart from '../jChart/pie/JRingChart.vue'
import { selectRectifiedSecurityManageList2Api } from '@/assets/js/api/dataBoard'
export default {
components: { Card, JRingChart },
props: {
@ -34,8 +43,21 @@ export default {
default: ''
}
},
mounted() {
selectRectifiedSecurityManageList2Api({ projectSn: this.$store.state.projectSn }).then(res => {
this.activityList = res.result || []
})
},
data() {
return {}
return {
activityList: [],
status: {
1: '待整改',
2: '待审核',
3: '闭合',
4: '无需整改'
}
}
}
}
</script>
@ -55,4 +77,11 @@ export default {
}
}
}
.info {
height: 100%;
.info-item {
padding-left: 20px;
}
}
</style>

View File

@ -16,8 +16,8 @@
:title="{ text: totals.ratioNum + '%', subTitle: '及时整改率' }"
:color="['#44d7b640', '#44D7B6']"
:data="[
{ value: 2314, name: '' },
{ value: 987, name: '' }
{ value: totals.totalNum - totals.closeNum, name: '' },
{ value: totals.closeNum, name: '' }
]"
/>
</div>
@ -59,9 +59,9 @@ export default {
getCounts() {
selectSecurityManageStatisticsApi({ projectSn: this.projectSn }).then(res => {
const totals = res.result.total
const { totalNum, reviewedNum, rectificationNum } = totals
const { totalNum, reviewedNum, rectificationNum, closeNum } = totals
const ratioNum = totals.totalNum ? ((totals.closeNum / totals.totalNum) * 100).toFixed(2) : 0
this.totals = { totalNum, reviewedNum, rectificationNum, ratioNum }
this.totals = { totalNum, reviewedNum, rectificationNum, closeNum, ratioNum }
})
}
}