| | |
| | | <div> |
| | | <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" |
| | | style="margin-bottom: 10px"> |
| | | <el-menu-item index="0">省厅考核</el-menu-item> |
| | | <el-menu-item index="1">市局考核</el-menu-item> |
| | | <el-menu-item index="0">省厅月度</el-menu-item> |
| | | <el-menu-item index="2">省厅季度</el-menu-item> |
| | | <el-menu-item index="1">市局月度</el-menu-item> |
| | | <el-menu-item index="3">市局季度</el-menu-item> |
| | | </el-menu> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | <div class="score-warp"> |
| | | <div class="score-item"> |
| | | <div style="font-size: 15px; margin-bottom: 15px">{{ formatCreateDate(city[0].createTime) }}</div> |
| | | <div style="font-size: 15px; margin-bottom: 15px">{{ formatCreateDate(city[0]) }}</div> |
| | | </div> |
| | | <div v-for="(score, scoreIndex) in city" :key="scoreIndex"> |
| | | <div v-for="(score, scoreIndex) in filterRepeat(city)" :key="scoreIndex"> |
| | | <div class="score-item"> |
| | | <div v-if="score.examineCategory == 2">车辆:</div> |
| | | <div v-else-if="score.examineCategory == 3">人脸:</div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="bottom-publish"> |
| | | <el-button size="medium" :type="isAnyUnpublished(city) ? 'success' : 'danger'" @click="publish(city)"> |
| | | <el-button v-hasPermi="['check:score:publish']" size="medium" :type="isAnyUnpublished(city) ? 'success' : 'danger'" @click="publish(city)"> |
| | | {{ isAnyUnpublished(city) ? '发布' : '取消' }} |
| | | </el-button> |
| | | <el-button size="medium" @click="jumpDetail(index)" type="info">详情</el-button> |
| | | <el-button size="medium" @click="jumpDetail(index)" type="primary">详情</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | type: 'bar', |
| | | name: '视频考核', |
| | | data: this.dataList.data1, |
| | | barWidth: '40', |
| | | itemStyle: { |
| | | color: 'rgba(255, 165, 0, 1)' |
| | | } |
| | |
| | | type: 'bar', |
| | | name: '人脸考核', |
| | | data: this.dataList.data2, |
| | | barWidth: '40', |
| | | itemStyle: { |
| | | color: 'rgba(85, 192, 191, 1)' |
| | | } |
| | |
| | | type: 'bar', |
| | | name: '车辆考核', |
| | | data: this.dataList.data3, |
| | | barWidth: '40', |
| | | itemStyle: { |
| | | color: 'rgba(62, 144, 247, 1)' |
| | | } |
| | |
| | | axisLabel: { |
| | | }, |
| | | data: nameArray |
| | | |
| | | }, |
| | | yAxis: { |
| | | min: 90, |
| | | min: 60 |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'bar', |
| | | name: '视频考核', |
| | | data: data1, |
| | | barWidth: '40', |
| | | itemStyle: { |
| | | color: 'rgba(255, 165, 0, 1)' |
| | | color: 'rgba(255, 165, 0, 1)', |
| | | } |
| | | }, |
| | | { |
| | | type: 'bar', |
| | | name: '人脸考核', |
| | | data: data2, |
| | | barWidth: '40', |
| | | itemStyle: { |
| | | color: 'rgba(85, 192, 191, 1)' |
| | | color: 'rgba(85, 192, 191, 1)', |
| | | } |
| | | }, |
| | | { |
| | | type: 'bar', |
| | | name: '车辆考核', |
| | | data: data3, |
| | | barWidth: '40', |
| | | itemStyle: { |
| | | color: 'rgba(62, 144, 247, 1)' |
| | | color: 'rgba(62, 144, 247, 1)', |
| | | } |
| | | }, |
| | | ] |
| | |
| | | // 检查 city 的 score 数组中是否有任何一个的 publish 属性为 'UNPUBLISHED' |
| | | return city.some(score => score.publish === 'UNPUBLISHED'); |
| | | }, |
| | | formatCreateDate(dateString) { |
| | | const date = new Date(dateString); |
| | | formatCreateDate(item) { |
| | | const date = new Date(item.createTime); |
| | | const year = date.getFullYear(); |
| | | const month = date.getMonth() + 1; // getMonth() 返回的月份是从 0 开始的,所以要加 1 |
| | | const day = date.getDate(); |
| | |
| | | |
| | | return `${year}年${formattedMonth}月${formattedDay}号`; |
| | | }, |
| | | filterRepeat(city) { |
| | | let list = []; |
| | | let examineCategorys = []; |
| | | city.forEach(item => { |
| | | if (examineCategorys.indexOf(item.examineCategory) === -1) { |
| | | examineCategorys.push(item.examineCategory); |
| | | list.push(item); |
| | | } |
| | | }); |
| | | return list; |
| | | }, |
| | | /** 导航切换 */ |
| | | handleSelect(key) { |
| | | this.activeIndex = key; // 更新当前激活的菜单项 |