|
|
@ -9,12 +9,12 @@ |
|
|
|
<el-input v-model="form.cnName" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="门类类型" prop="isType"> |
|
|
|
<el-select v-model="form.isType" style="width: 370px;" @change="changeType"> |
|
|
|
<el-select v-model="form.isType" style="width: 370px;" :disabled="crud.status.edit === 1" @change="changeType"> |
|
|
|
<el-option v-for="item in selectOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="选择模板" prop="dicExplain"> |
|
|
|
<treeselect v-model="form.dicExplain" :options="templateTree" placeholder="" style="width: 370px;" :disabled="form.isType !== '6'" :normalizer="normalizer" /> |
|
|
|
<el-form-item v-if="crud.status.add === 1" label="选择模板" prop="dicExplain"> |
|
|
|
<treeselect v-model="form.dicExplain" :options="templateTree" placeholder="" style="width: 370px;" :disabled="form.isType !== 6" :normalizer="normalizer" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="内容说明"> |
|
|
|
<el-input v-model="form.remark" style="width: 370px;" type="textarea" :rows="4" /> |
|
|
@ -34,7 +34,7 @@ import { form } from '@crud/crud' |
|
|
|
import Treeselect from '@riophae/vue-treeselect' |
|
|
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
|
|
|
|
|
|
|
const defaultForm = { id: null, cnName: null, isType: '1', remark: null } |
|
|
|
const defaultForm = { id: null, cnName: null, isType: 1, remark: null } |
|
|
|
export default { |
|
|
|
components: { Treeselect }, |
|
|
|
mixins: [ |
|
|
@ -59,7 +59,7 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
changeType() { |
|
|
|
if (this.form.isType === '6') { |
|
|
|
if (this.form.isType === 6) { |
|
|
|
// this.crudDict.getDicts() |
|
|
|
this.getTemplateTree() |
|
|
|
} |
|
|
@ -73,7 +73,7 @@ export default { |
|
|
|
getCategoryType().then(res => { |
|
|
|
for (const key in res) { |
|
|
|
this.selectOptions.push({ |
|
|
|
value: key, |
|
|
|
value: Number(key), |
|
|
|
label: res[key] |
|
|
|
}) |
|
|
|
} |
|
|
@ -91,5 +91,4 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
</style> |