diff --git a/src/views/competitionManage/bankList/index.vue b/src/views/competitionManage/bankList/index.vue index 4234e49c0..68f620b79 100644 --- a/src/views/competitionManage/bankList/index.vue +++ b/src/views/competitionManage/bankList/index.vue @@ -51,7 +51,7 @@ export default { type: 'select', label: '分 类', config: { - multiple: true, + // multiple: true, data: [] } } @@ -70,7 +70,8 @@ export default { { title: '分 类', prop: 'tags', - type: 'tagMore', + // type: 'tagMore', + type: 'tag', width: '200', columnValue: (row) => { return this.lableTags(row); }, tagType: (row) => { @@ -165,7 +166,7 @@ export default { }, methods: { beforeQuery(obj) { - obj.labels = obj.labels ? obj.labels.join(',') : ''; + // obj.labels = obj.labels ? obj.labels.join(',') : ''; return obj; }, doCreate() { @@ -204,7 +205,8 @@ export default { }, lableTags(row) { - return row.tags ? row.tags.split(',') : ''; + // return row.tags ? row.tags.split(',') : ''; + return row.tags || ''; }, answerTags(row) { @@ -310,7 +312,8 @@ export default { const param = { type: questionTypeMap[item], topic: dataList[topicIndex][index], - tags: dataList[tagsIndex][index] ? dataList[tagsIndex][index].replace(/\s+/g, ',') : '', + // tags: dataList[tagsIndex][index] ? dataList[tagsIndex][index].replace(/\s+/g, ',') : '', + tags: dataList[tagsIndex][index] || '', optionList: [] }; if (param.type === 'fill') { @@ -448,7 +451,7 @@ export default { exportTemplate() { const wb = XLSX.utils.book_new(); const data1 = [{A: '理论试题导入模板', B: '', C:'', D:'', E:'', F: '', G: '', H: '', I: '', J: '', K: ''}]; - const data2 = [{A: '说明:1、本表表头(第一行到第三行)内容不能修改删除;\n 2、支持批量导入的题型:单选题,多选题,判断题,题型不能自定义,只能按照表格提供的进行录入;\n 3、【判断题】在选项A中可填写√ 或正确,选项B中填写× 或错误,答案填写A或B\n 4、【分类】多个分类项使用空格隔开', B: '', C:'', D:'', E:'', F: '', G: '', H: '', I: '', J: '', K: ''}]; + const data2 = [{A: '说明:1、本表表头(第一行到第三行)内容不能修改删除;\n 2、支持批量导入的题型:单选题,多选题,判断题,题型不能自定义,只能按照表格提供的进行录入;\n 3、【判断题】在选项A中可填写√ 或正确,选项B中填写× 或错误,答案填写A或B', B: '', C:'', D:'', E:'', F: '', G: '', H: '', I: '', J: '', K: ''}]; const data3 = [{A: '序号', B: '题干(必填)', C:'题型(必填)', D:'选项A(必填)', E:'选项B(必填)', F: '选项C', G: '选项D', H: '选项E', I: '选项F', J: '正确答案(必填)', K: '分类'}]; const data = [...data1, ...data2, ...data3]; const mapType = { @@ -483,7 +486,8 @@ export default { H: item.optionList[4] ? item.optionList[4].content : '', I: item.optionList[5] ? item.optionList[5].content : '', J: as, - K: item.tags ? item.tags.replace(',', ' ') : '' + // K: item.tags ? item.tags.replace(',', ' ') : '' + K: item.tags || '' }; data.push(obj); }); diff --git a/src/views/competitionManage/bankList/preImport.vue b/src/views/competitionManage/bankList/preImport.vue index 1a1370b65..254c0e033 100644 --- a/src/views/competitionManage/bankList/preImport.vue +++ b/src/views/competitionManage/bankList/preImport.vue @@ -20,7 +20,8 @@ diff --git a/src/views/competitionManage/bankList/question-create-page.vue b/src/views/competitionManage/bankList/question-create-page.vue index 6a59b5cca..2f7408aa3 100644 --- a/src/views/competitionManage/bankList/question-create-page.vue +++ b/src/views/competitionManage/bankList/question-create-page.vue @@ -80,8 +80,7 @@ export default { this.$message.warning('选项不能为空!'); return; } - // this.formModel.companyId = parseInt(this.companyId); - this.formModel.tags = this.tagsArr.join(','); + // this.formModel.tags = this.tagsArr.join(','); createQuestion(this.formModel).then(resp => { authUtils.setSessionStorage(this.path, JSON.stringify({ type: this.formModel.type diff --git a/src/views/competitionManage/bankList/question-form.vue b/src/views/competitionManage/bankList/question-form.vue index 50097e4e3..8606ce897 100644 --- a/src/views/competitionManage/bankList/question-form.vue +++ b/src/views/competitionManage/bankList/question-form.vue @@ -12,7 +12,8 @@ - + + diff --git a/src/views/competitionManage/bankList/question-update-page.vue b/src/views/competitionManage/bankList/question-update-page.vue index a233ae54b..d5e8df242 100644 --- a/src/views/competitionManage/bankList/question-update-page.vue +++ b/src/views/competitionManage/bankList/question-update-page.vue @@ -99,11 +99,10 @@ export default { this.$store.state.race.preTheoryData[this.questionId] = this.formModel; this.doBack(); } else if (valid) { - // this.formModel.companyId = parseInt(this.companyId); - this.formModel.tags = this.tagsArr; - if (Array.isArray(this.tagsArr)) { - this.formModel.tags = this.tagsArr.join(','); - } + // this.formModel.tags = this.tagsArr; + // if (Array.isArray(this.tagsArr)) { + // this.formModel.tags = this.tagsArr.join(','); + // } updateOption(this.formModel).then(resp => { this.doBack(); }).catch(error => { diff --git a/static/theoryTemplate/理论试题导入模板.xlsx b/static/theoryTemplate/理论试题导入模板.xlsx index 0c7c4c827..e79d72545 100644 Binary files a/static/theoryTemplate/理论试题导入模板.xlsx and b/static/theoryTemplate/理论试题导入模板.xlsx differ