From 8fb7cc0325027caa4ed7574443e24f5bd7a8efb7 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期一, 02 九月 2024 23:09:45 +0800 Subject: [PATCH] 考核结果图表bug,登录路由权限控制 --- src/views/system/check/result/index.vue | 27 +++++++++++++-------------- 1 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/views/system/check/result/index.vue b/src/views/system/check/result/index.vue index 451a168..e261e84 100644 --- a/src/views/system/check/result/index.vue +++ b/src/views/system/check/result/index.vue @@ -78,12 +78,6 @@ activeIndex: '0', date: '', company: '', - dataList: { - name: ['瀵岄『鍘�', '鑽e幙', '楂樻柊鍖�', '鑷祦浜曞尯', '璐′簳鍖�', '澶у畨鍖�', '娌挎哗鍖�'], - 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, @@ -92,13 +86,13 @@ } }, 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) { @@ -238,17 +232,22 @@ } 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; @@ -314,8 +313,8 @@ 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) { -- Gitblit v1.8.0