-
返回
+
@@ -133,7 +82,7 @@ export default {
name: "Questionslist",
components: {
ExamQuestions
- },
+ },
data() {
return {
// 遮罩层
@@ -168,10 +117,10 @@ export default {
questionsContentOptions: [],
// 试题类型字典
questionsTypeOptions: [
- {dictValue: 1, dictLabel: '判断题'},
- {dictValue: 2, dictLabel: '单选题'},
- {dictValue: 3, dictLabel: '多选题'}
- ],
+ { dictValue: 1, dictLabel: '判断题' },
+ { dictValue: 2, dictLabel: '单选题' },
+ { dictValue: 3, dictLabel: '多选题' }
+ ],
// 题目分数字典
questionsScoreOptions: [],
// 复杂度字典
@@ -213,11 +162,11 @@ export default {
},
methods: {
/** 查询考试题目列表 */
- init_data (row) {
+ init_data(row) {
this.bankData = row
this.queryParams.bankCode = this.bankData.bankCode
this.getList()
- },
+ },
getList() {
this.loading = true;
listQuestionsproperty(this.queryParams).then(response => {
@@ -225,7 +174,7 @@ export default {
// console.log('this.examquestionsList:' + JSON.stringify(this.examquestionsList))
this.total = response.total;
this.loading = false;
- });
+ });
},
// 试题id字典翻译
questionsIdFormat(row, column) {
@@ -316,10 +265,10 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.questionsCode)
- this.single = selection.length!==1
+ this.single = selection.length !== 1
this.multiple = !selection.length
},
- editDoneHandle () {
+ editDoneHandle() {
this.editVisible = true
this.getList();
},
@@ -327,15 +276,15 @@ export default {
handleAdd() {
this.editVisible = false
this.$nextTick(() => {
- this.$refs.editRef.init_data(this.bankData, null)
+ this.$refs.editRef.init_data(this.bankData, null)
})
},
/** 修改按钮操作 */
handleUpdate(row) {
this.editVisible = false
this.$nextTick(() => {
- this.$refs.editRef.init_data(this.bankData, row)
- })
+ this.$refs.editRef.init_data(this.bankData, row)
+ })
},
/** 提交按钮 */
submitForm() {
@@ -361,34 +310,34 @@ export default {
handleDelete(row) {
const questionsCodes = row.questionsCode || this.ids;
this.$confirm('是否确认删除考试题目编号为"' + questionsCodes + '"的数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- return delExamquestions(questionsCodes);
- }).then(() => {
- this.getList();
- this.msgSuccess("删除成功");
- }).catch(() => {});
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(function () {
+ return delExamquestions(questionsCodes);
+ }).then(() => {
+ this.getList();
+ this.msgSuccess("删除成功");
+ }).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有考试题目数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.exportLoading = true;
- return exportExamquestions(queryParams);
- }).then(response => {
- this.download(response.msg);
- this.exportLoading = false;
- }).catch(() => {});
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ this.exportLoading = true;
+ return exportExamquestions(queryParams);
+ }).then(response => {
+ this.download(response.msg);
+ this.exportLoading = false;
+ }).catch(() => { });
},
- onClose () {
- this.$emit('refreshDataList')
- }
+ onClose() {
+ this.$emit('refreshDataList')
+ }
}
};
@@ -396,7 +345,6 @@ export default {
-