| | |
| | | <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="2">省厅季度</el-menu-item> |
| | | <el-menu-item index="1">区县月度</el-menu-item> |
| | | <el-menu-item index="1">省厅季度</el-menu-item> |
| | | <el-menu-item index="2">区县月度</el-menu-item> |
| | | <el-menu-item index="3">区县季度</el-menu-item> |
| | | <el-menu-item index="4">公安部月度</el-menu-item> |
| | | <el-menu-item index="5">公安部季度</el-menu-item> |
| | | </el-menu> |
| | | </div> |
| | | <!-- 导出按钮 --> |
| | |
| | | <el-button slot="reference" type="primary" size="mini" plain>导出</el-button> |
| | | </el-popover> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="data-chart-container"> |
| | | <el-card class="data-card" :body-style="{ height: '100%' }"> |
| | | <div class="card-content"> |
| | |
| | | |
| | | <script> |
| | | import {areaSelect} from '@/api/system/dept'; |
| | | import {listScore, getScore, delScore, addScore, updateScore, publishScore} from "@/api/platform/check-score"; |
| | | import {listScore, publishScore} from "@/api/platform/check-score"; |
| | | import * as echarts from 'echarts'; |
| | | |
| | | let observer = null; |
| | |
| | | return { |
| | | tagOptions: [ |
| | | {value: 0, label: '省厅'}, |
| | | {value: 1, label: '区县'} |
| | | {value: 1, label: '区县'}, |
| | | {value: 2, label: '公安部'} |
| | | ], |
| | | pickerOptions: { |
| | | shortcuts: [{ |
| | |
| | | }, |
| | | mounted() { |
| | | this.queryParams.examineTag = this.activeIndex |
| | | this.getList(); |
| | | this.areaSelect(); |
| | | chart = echarts.init(this.$refs.barChart); |
| | | this.setChartOption(this.checkScoreList); |
| | | this.areaSelect() |
| | | // this.setChartOption(this.checkScoreList); |
| | | }, |
| | | methods: { |
| | | jumpDetail(index) { |
| | |
| | | areaSelect() { |
| | | areaSelect().then(res => { |
| | | this.areaList = res.data; |
| | | this.getList(); |
| | | }) |
| | | }, |
| | | translateDeptId(deptId) { |
| | | const department = this.areaList.find(dept => dept.id === deptId); |
| | | console.log(deptId,this.areaList) |
| | | return department ? department.value : '未知'; |
| | | }, |
| | | |
| | |
| | | // 获取当前日期 |
| | | const today = new Date(); |
| | | |
| | | // 计算昨天的日期 |
| | | const yesterday = new Date(today); |
| | | yesterday.setDate(today.getDate() - 1); |
| | | // 将日期减去一天 |
| | | const yesterday = new Date(today.getTime() - 24 * 60 * 60 * 1000); |
| | | |
| | | // 将昨天的日期格式化为字符串,这里假设后端期望的是ISO 8601格式 |
| | | this.queryParams.createTime = yesterday.toISOString().split('T')[0]; |
| | | // 获取年、月、日 |
| | | const year = yesterday.getFullYear(); |
| | | let month = (yesterday.getMonth() + 1).toString().padStart(2, '0'); // 月份是从0开始的,所以加1 |
| | | let day = yesterday.getDate().toString().padStart(2, '0'); |
| | | |
| | | // 拼接成 yyyy-MM-dd 格式 |
| | | this.queryParams.createTime = `${year}-${month}-${day}` |
| | | |
| | | console.log(this.queryParams); |
| | | listScore(this.queryParams).then(response => { |
| | | this.checkScoreList = response.data; |
| | | console.log(this.checkScoreList); |
| | | |
| | | this.setChartOption(this.checkScoreList); |
| | | this.loading = false; |
| | | }); |