|
|
@@ -77,7 +77,7 @@
|
|
|
<el-table-column prop="attr_type" label="类别属性" width="120" v-if="showAttrTypeColumn">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-tag type="success" v-if="row.attr_type">{{ attrTypeOptions[row.attr_type] || '未知'
|
|
|
- }}</el-tag>
|
|
|
+ }}</el-tag>
|
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -124,6 +124,9 @@
|
|
|
:value="Number(key)" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="答题时长(分钟)" prop="answer_times">
|
|
|
+ <el-input-number v-model="formData.answer_times" :min="0" :max="12000" placeholder="请输入答题时长(分钟)" />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="排序" prop="sort">
|
|
|
<el-input-number v-model="formData.sort" :min="0" />
|
|
|
</el-form-item>
|
|
|
@@ -155,7 +158,7 @@ export default {
|
|
|
where: { keyword: "", type: null, attr_type: null, status: null }
|
|
|
},
|
|
|
choose: [],
|
|
|
- formData: { id: null, subject_name: "", type: 1, attr_type: 3, description: "", icon: "", sort: 0, status: 1 },
|
|
|
+ formData: { id: null, subject_name: "", type: 1, attr_type: 3, description: "", icon: "", answer_times: 45, sort: 0, status: 1 },
|
|
|
isEdit: false,
|
|
|
formVisible: false,
|
|
|
formRules: {
|
|
|
@@ -233,11 +236,12 @@ export default {
|
|
|
type: Number(row.type),
|
|
|
attr_type: row.attr_type ? Number(row.attr_type) : (Number(row.type) === 1 ? 3 : null),
|
|
|
description: row.description || "",
|
|
|
- icon: row.icon || ""
|
|
|
+ icon: row.icon || "",
|
|
|
+ answer_times: row.answer_times || 45
|
|
|
}; // 转成数字
|
|
|
} else {
|
|
|
this.isEdit = false;
|
|
|
- this.formData = { id: null, subject_name: "", type: 1, attr_type: 3, description: "", icon: "", sort: 0, status: 1 };
|
|
|
+ this.formData = { id: null, subject_name: "", type: 1, attr_type: 3, description: "", icon: "", answer_times: 45, sort: 0, status: 1 };
|
|
|
}
|
|
|
this.formVisible = true;
|
|
|
},
|