| | |
| | | <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.examPaperId" filterable placeholder="试卷"> |
| | | <el-select v-model="queryParam.examPaperId" filterable placeholder="试卷" @change="getType"> |
| | | <el-option v-for="item in examPaperList" :key="item.id" :value="item.id" :label="item.name" /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | chartLoading2: false, |
| | | queryParam: { |
| | | examPaperId: '', |
| | | departmentId: [] |
| | | departmentId: [], |
| | | examPaperType: 1 |
| | | }, |
| | | admin: true |
| | | }; |
| | |
| | | dashboardApi.examPaperList().then(res => { |
| | | this.examPaperList = res.response; |
| | | this.queryParam.examPaperId = this.examPaperList[0].id |
| | | this.queryParam.examPaperType = this.examPaperList[0].paperType |
| | | this.getChartData(); |
| | | this.observe(); |
| | | }); |
| | | }, |
| | | methods: { |
| | | getType(val) { |
| | | const selectedItem = this.examPaperList.find(item => item.id === val); |
| | | this.queryParam.examPaperType = selectedItem.paperType; |
| | | this.getChartData(); |
| | | }, |
| | | getChartData() { |
| | | this.chartLoading1 = true; |
| | | this.chartLoading2 = true; |