From 0fa59e97c2e87bd7391be3089e46bd80a943e48d Mon Sep 17 00:00:00 2001 From: weidy <lastanimals@163.com> Date: 星期四, 06 七月 2023 20:04:09 +0800 Subject: [PATCH] 生命周期的换字段 --- Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue index dd31f9a..2c7f374 100644 --- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue @@ -199,7 +199,9 @@ code: "", type: "PUBLIC", template: "", - codeClassifyOid:"" + vars:{ + codeClassifyOid:"" + } }, visibleFlow: false, transferData: [], @@ -259,7 +261,7 @@ codeClassifyOid: { handler(newval, oldval) { this.codeClassifyOid = newval; - this.parameter.codeClassifyOid=newval + this.parameter.vars.codeClassifyOid=newval }, deep: true, }, @@ -277,7 +279,9 @@ }else { if (record.templet && typeof (record.templet) == 'string' && !validatenull(record.templet) && record.templet.indexOf("function(row,column)")>-1) { record.formatter = eval("(" + record.templet + ")"); - //function(row,column){return row[column.property]=='true'?'鏄�':'鍚�'} + //function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'鏄�':'鍚�'} + }else if(record.fieldType=="truefalse"){ + record.formatter = function(row,column){return row[column.property]=='true' || row[column.property]=='1'?'鏄�':'鍚�'} } } }) @@ -297,13 +301,6 @@ }, }, methods: { - // 杞崲鏁版嵁true鍜宖alse - formatBoolean(row, column) { - if (column.fieldType === "truefalse") { - return row[column.property] =='true'? "鏄�" : "鍚�"; - } - return row[column.property]; - }, // 鍙戝竷 setHandler() { if (this.selectRow.length <= 0) { @@ -461,6 +458,7 @@ this.$message.warning("缂栫爜鐘舵�佷笉鏄�滅紪杈戜腑鈥�,涓嶅彲缂栬緫"); } else { this.editvisible = true; + this.rowOid = this.selectRow[0]['oid'] } }, //楂樼骇鏌ヨ鎸夐挳 -- Gitblit v1.9.3