From 21254005d3a95ae6bf45e9936316aa32b4c505da Mon Sep 17 00:00:00 2001 From: BoBoooooo <17746714@qq.com> Date: Tue, 12 Jan 2021 17:10:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=BF=9D=E5=AD=98bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/devTools/Dict.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/devTools/Dict.vue b/src/views/devTools/Dict.vue index 3ec7385..c4cbf05 100644 --- a/src/views/devTools/Dict.vue +++ b/src/views/devTools/Dict.vue @@ -64,7 +64,7 @@ - + @@ -183,14 +183,15 @@ export default class Dict extends Vue { } save() { - this.entity.codeValue = this.entity.codeName; + const opt = JSON.parse(JSON.stringify(this.entity)); + delete opt.children; if (this.dialogStatus === STATUS.CREATE) { - crud(DML.INSERT, 'ad_codelist_type', this.entity).then(() => { + crud(DML.INSERT, 'ad_codelist_type', opt).then(() => { this.fetchDictType(); this.dialogFormVisible = false; }); } else { - crud(DML.UPDATE, 'ad_codelist_type', this.entity).then(() => { + crud(DML.UPDATE, 'ad_codelist_type', opt).then(() => { this.fetchDictType(); this.dialogFormVisible = false; });