Browse Source

清除添加时出现的回显数据

master
xiaobai 3 years ago
parent
commit
eeaed801ba
  1. 41
      src/components/drawerDialog/index.vue

41
src/components/drawerDialog/index.vue

@ -832,27 +832,14 @@ export default {
this.listQuery.templateId = this.id this.listQuery.templateId = this.id
this.form.templateId = this.id this.form.templateId = this.id
this.formLabelAlign.templateId = this.id this.formLabelAlign.templateId = this.id
this.getList()
if (this.id) { if (this.id) {
this.loadFormData(this.index) this.loadFormData(this.index)
this.getList()
} else { } else {
console.log(this.formTemplate, 5454242)
this.$refs['formTemplate'].resetFields() this.$refs['formTemplate'].resetFields()
this.formTemplate = { this.clearForm()
tempName: '',
tempCategory: '',
bglx: null,
jianyanleibie: '',
shebeizhongleidaima: '',
shebeileibiedaima: '',
tempPath: '',
jianyanyiju: '',
withDicCode: '',
parentId: '',
version: '',
sort: null,
cleanState: false,
showPageStatus: true
}
} }
this.getSbList(undefined, undefined, 1) this.getSbList(undefined, undefined, 1)
this.getBglxList() this.getBglxList()
@ -1165,13 +1152,11 @@ export default {
this.$refs.settingList.toggleRowSelection(row) this.$refs.settingList.toggleRowSelection(row)
this.getDemoList(row.id) this.getDemoList(row.id)
}, },
beforeClose(done) { clearForm() {
this.list.length = 0 this.formTemplate = {
this.gridData.length = 0
this.formTemplate = Object.assign({
tempName: '', tempName: '',
tempCategory: '', tempCategory: '',
bglx: 1, bglx: null,
jianyanleibie: '', jianyanleibie: '',
shebeizhongleidaima: '', shebeizhongleidaima: '',
shebeileibiedaima: '', shebeileibiedaima: '',
@ -1180,11 +1165,17 @@ export default {
withDicCode: '', withDicCode: '',
parentId: '', parentId: '',
version: '', version: '',
sort: 0, sort: null,
cleanState: false, cleanState: false,
showPageStatus: true showPageStatus: true
}, this.formTemplate) }
this.$refs['formTemplate'].resetFields() this.neibuleibie = []
this.shebeipinzhongdaima = []
},
beforeClose(done) {
this.list.length = 0
this.gridData.length = 0
this.clearForm()
this.$emit('closeTemplateDrawer') this.$emit('closeTemplateDrawer')
} }
} }

Loading…
Cancel
Save