From 2dc51d684511e7dce1ebac0e98899782c56a6087 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 24 五月 2024 14:35:13 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/answer/dataStatistics.vue | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/answer/dataStatistics.vue b/src/views/answer/dataStatistics.vue index 5d334ba..45defa0 100644 --- a/src/views/answer/dataStatistics.vue +++ b/src/views/answer/dataStatistics.vue @@ -2,9 +2,8 @@ <div style="padding: 10px" ref="pageContent"> <el-form :model="queryParam" ref="queryForm" :inline="true" style="display: flex"> <el-form-item label="璇曞嵎锛�"> - <el-select v-model="queryParam.id" filterable placeholder="璇曞嵎"> - <el-option v-for="item in examPaperList" :key="item.id" :value="item.id" :label="item.name" - @change="getType(item.paperType)" /> + <el-select v-model="queryParam.id" filterable placeholder="璇曞嵎" @change="getType"> + <el-option v-for="item,index in examPaperList" :key="index" :value="item.id" :label="item.name" /> </el-select> </el-form-item> <el-form-item> @@ -154,8 +153,9 @@ }); }, methods: { - getType(type) { - this.queryParam.type = type; + getType(val) { + const selectedItem = this.examPaperList.find(item => item.id === val); + this.queryParam.type = selectedItem.paperType; this.getChartData(); }, getChartData() { -- Gitblit v1.8.0