|
@@ -7,7 +7,8 @@ const canvasRef = ref()
|
|
|
const canvasRef2 = ref()
|
|
|
const queryForm_Data = ref({
|
|
|
team_id: "",
|
|
|
- student_no: ""
|
|
|
+ student_no: "",
|
|
|
+ xxk_id: ""
|
|
|
})
|
|
|
|
|
|
const data = ref({});
|
|
@@ -147,7 +148,8 @@ function initData() {
|
|
|
url: '/xdjx/xypjgl_xsxypjcx/content_json',
|
|
|
data: {
|
|
|
team_id: queryForm_Data.value.team_id ? queryForm_Data.value.team_id.split(",") : [],
|
|
|
- student_no: queryForm_Data.value.student_no
|
|
|
+ student_no: queryForm_Data.value.student_no,
|
|
|
+ xxk_id: queryForm_Data.value.xxk_id
|
|
|
}
|
|
|
}).then(res => {
|
|
|
const data1 = res.data.content_json;
|
|
@@ -190,34 +192,7 @@ function initChartData() {
|
|
|
myChart.setOption(option)
|
|
|
|
|
|
const _data = data.value.series[0].data[0]
|
|
|
- const option2 = {
|
|
|
- title: {
|
|
|
- text: _data.title
|
|
|
- },
|
|
|
- radar: {
|
|
|
- indicator: _data.indicator.map(name => ({ name }))
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- type: 'radar',
|
|
|
- data: [
|
|
|
- {
|
|
|
- value: _data.data,
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- formatter: function (params) {
|
|
|
- return params.value;
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
- myChart2.setOption(option2)
|
|
|
- myChart.on('click', { seriesIndex: 0 }, function (args) {
|
|
|
- const { dataIndex } = args
|
|
|
- const _data = data.value.series[0].data[dataIndex]
|
|
|
+ if(_data.indicator.length != 0) {
|
|
|
const option2 = {
|
|
|
title: {
|
|
|
text: _data.title
|
|
@@ -243,7 +218,40 @@ function initChartData() {
|
|
|
]
|
|
|
};
|
|
|
myChart2.setOption(option2)
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
+ myChart.on('click', { seriesIndex: 0 }, function (args) {
|
|
|
+ const { dataIndex } = args
|
|
|
+ const _data = data.value.series[0].data[dataIndex]
|
|
|
+ if(_data.indicator.length != 0) {
|
|
|
+ const option2 = {
|
|
|
+ title: {
|
|
|
+ text: _data.title
|
|
|
+ },
|
|
|
+ radar: {
|
|
|
+ indicator: _data.indicator.map(name => ({ name }))
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ type: 'radar',
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ value: _data.data,
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ formatter: function (params) {
|
|
|
+ return params.value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ myChart2.setOption(option2)
|
|
|
+ } else {
|
|
|
+ myChart2.clear();
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -312,6 +320,9 @@ const handleQueryFormBtn_search = () => {
|
|
|
<remote-select url="/xddy/dygl_xsxjk/index" :fields="['xdx_xsxh', 'xdx_xsxm']" v-model="queryForm_Data.student_no"></remote-select>
|
|
|
<!-- <el-input v-model="queryForm_Data.student_no" clearable /> -->
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="考试名称">
|
|
|
+ <remote-select url="/xdjx/xypjgl_kssz/index" :fields="['xxk_id', 'xxk_mc']" v-model="queryForm_Data.xxk_id"></remote-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button @click="initData" type="primary">搜索</el-button>
|
|
|
</el-form-item>
|