|
@ -10,7 +10,7 @@ |
|
|
<template slot="title" width="100%"> |
|
|
<template slot="title" width="100%"> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
编辑模板 |
|
|
编辑模板 |
|
|
<el-tag> |
|
|
<el-tag v-if="index"> |
|
|
{{ formTemplate.tempName }} |
|
|
{{ formTemplate.tempName }} |
|
|
</el-tag> |
|
|
</el-tag> |
|
|
</el-col> |
|
|
</el-col> |
|
@ -649,13 +649,31 @@ export default { |
|
|
parentList: { |
|
|
parentList: { |
|
|
type: Array, |
|
|
type: Array, |
|
|
default: () => [] |
|
|
default: () => [] |
|
|
|
|
|
}, |
|
|
|
|
|
type: { |
|
|
|
|
|
type: Number, |
|
|
|
|
|
default: 0 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
activeName: 0, |
|
|
activeName: 0, |
|
|
settingList: [], |
|
|
settingList: [], |
|
|
formTemplate: {}, |
|
|
formTemplate: { |
|
|
|
|
|
tempName: '', |
|
|
|
|
|
tempCategory: '', |
|
|
|
|
|
bglx: '', |
|
|
|
|
|
jianyanleibie: '', |
|
|
|
|
|
shebeizhongleidaima: '', |
|
|
|
|
|
shebeileibiedaima: '', |
|
|
|
|
|
tempPath: '', |
|
|
|
|
|
jianyanyiju: '', |
|
|
|
|
|
withDicCode: '', |
|
|
|
|
|
parentId: '', |
|
|
|
|
|
version: '', |
|
|
|
|
|
sort: '', |
|
|
|
|
|
cleanState: '' |
|
|
|
|
|
}, |
|
|
templateSettingId: '', |
|
|
templateSettingId: '', |
|
|
dialogVisible1: false, |
|
|
dialogVisible1: false, |
|
|
formLabelAlign: { |
|
|
formLabelAlign: { |
|
@ -771,7 +789,9 @@ export default { |
|
|
this.form.templateId = this.id |
|
|
this.form.templateId = this.id |
|
|
this.formLabelAlign.templateId = this.id |
|
|
this.formLabelAlign.templateId = this.id |
|
|
this.getList() |
|
|
this.getList() |
|
|
|
|
|
if (this.id) { |
|
|
this.loadFormData(this.index) |
|
|
this.loadFormData(this.index) |
|
|
|
|
|
} |
|
|
this.getSbList(undefined, undefined, 1) |
|
|
this.getSbList(undefined, undefined, 1) |
|
|
this.getBglxList() |
|
|
this.getBglxList() |
|
|
this.getJylbList() |
|
|
this.getJylbList() |
|
@ -1018,7 +1038,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getCategoryList(type, parentCode, species) { |
|
|
getCategoryList(type, parentCode, species) { |
|
|
this.api({ |
|
|
this.api({ |
|
|
url: '/category/getCategoryList', |
|
|
url: '/category/all', |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
params: { |
|
|
params: { |
|
|
parentCode: parentCode, |
|
|
parentCode: parentCode, |
|
@ -1056,9 +1076,20 @@ export default { |
|
|
) |
|
|
) |
|
|
}, |
|
|
}, |
|
|
update() { |
|
|
update() { |
|
|
|
|
|
let methods = '' |
|
|
|
|
|
if (this.id) { |
|
|
|
|
|
if (this.type === 1) { |
|
|
|
|
|
delete this.formTemplate.id |
|
|
|
|
|
methods = 'post' |
|
|
|
|
|
} else { |
|
|
|
|
|
methods = 'put' |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
methods = 'post' |
|
|
|
|
|
} |
|
|
this.api({ |
|
|
this.api({ |
|
|
url: '/template', |
|
|
url: '/template', |
|
|
method: 'put', |
|
|
method: methods, |
|
|
data: this.formTemplate |
|
|
data: this.formTemplate |
|
|
}).then(_ => { |
|
|
}).then(_ => { |
|
|
this.$emit('closeTemplateDrawer') |
|
|
this.$emit('closeTemplateDrawer') |
|
|