| | |
| | | <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="2">省厅季度</el-menu-item> |
| | | <el-menu-item index="1">市局月度</el-menu-item> |
| | | <el-menu-item index="3">市局季度</el-menu-item> |
| | | </el-menu> |
| | | </div> |
| | |
| | | <div class="score-item"> |
| | | <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> |
| | |
| | | activeIndex: '0', |
| | | date: '', |
| | | company: '', |
| | | dataList: { |
| | | name: ['富顺县', '荣县', '高新区', '自流井区', '贡井区', '大安区', '沿滩区'], |
| | | data1: [95, 96, 97, 95, 94.5, 93.6, 94.5], |
| | | data2: [93.7, 93.5, 94.3, 96.5, 95.3, 94.2, 93.3], |
| | | data3: [98.3, 94.3, 93.3, 95.5, 96.8, 96.1, 95.8], |
| | | }, |
| | | // 查询参数 |
| | | queryParams: { |
| | | examineTag: null, |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | this.queryParams.examineTag = this.activeIndex |
| | | this.getList(); |
| | | this.areaSelect(); |
| | | }, |
| | | mounted() { |
| | | chart = echarts.init(this.$refs.barChart); |
| | | this.initEchart(); |
| | | this.setChartOption(this.checkScoreList); |
| | | }, |
| | | methods: { |
| | | jumpDetail(index) { |
| | |
| | | |
| | | }, |
| | | yAxis: { |
| | | min: 60 |
| | | min: 0 |
| | | }, |
| | | series: [ |
| | | { |
| | |
| | | } |
| | | chart.setOption(option, true); |
| | | }, |
| | | filterData(data, tag) { |
| | | if (!data) return; |
| | | if(!Array.isArray(data)) return; |
| | | filterData(mapData, tag) { |
| | | if (!mapData) return; |
| | | if(!Array.isArray(mapData)) return; |
| | | const tempArray = []; |
| | | data.forEach((item) => { |
| | | mapData.forEach((item) => { |
| | | if(item.data.length) { |
| | | let flag = false; |
| | | item.data.forEach((examine) => { |
| | | if(examine.examineCategory === tag) { |
| | | flag = true |
| | | tempArray.push(examine.score); |
| | | } |
| | | }) |
| | | if(!flag){ |
| | | tempArray.push(0); |
| | | } |
| | | } |
| | | }) |
| | | return tempArray; |
| | |
| | | return city.some(score => score.publish === 'UNPUBLISHED'); |
| | | }, |
| | | formatCreateDate(item) { |
| | | let date = new Date(item.startDate); |
| | | let year = date.getFullYear(); |
| | | let startMonth = date.getMonth() + 1; |
| | | date = new Date(item.endDate); |
| | | let endMonth = date.getMonth() + 1; |
| | | let str = `${year}年${startMonth}月`; |
| | | if (startMonth !== endMonth) str += `-${endMonth}月`; |
| | | return str; |
| | | const date = new Date(item.createTime); |
| | | const year = date.getFullYear(); |
| | | const month = date.getMonth() + 1; // getMonth() 返回的月份是从 0 开始的,所以要加 1 |
| | | const day = date.getDate(); |
| | | |
| | | // 使用 padStart 方法确保月份和日期始终是两位数 |
| | | const formattedMonth = month.toString().padStart(2, '0'); |
| | | const formattedDay = day.toString().padStart(2, '0'); |
| | | |
| | | 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) { |
| | |
| | | listScore(this.queryParams).then(response => { |
| | | this.checkScoreList = response.data; |
| | | console.log(this.checkScoreList); |
| | | this.loading = false; |
| | | this.setChartOption(this.checkScoreList); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | publish(city) { |