From f1336af7af2225820ac9a8dc6dfcf501e4d4cd7b Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期三, 06 十二月 2023 09:05:16 +0800 Subject: [PATCH] 系统左侧菜单,hover背景色bug处理 --- Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue | 41 +++++++++++++++++++++++++++++++---------- 1 files changed, 31 insertions(+), 10 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue index 5849e98..d583d02 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue @@ -103,9 +103,14 @@ type: String, default: "", }, + selectRow:{ + type:Array, + default:[] + } }, data() { return { + selectValue:"", //骞翠唬鍙� dataYearCode: { type: "", @@ -206,6 +211,15 @@ handler(newV) { this.$emit("dataYearCode", newV) } + }, + selectRow:{ + handler(newval){ + console.log(newval); + let ids = newval.map(item => item.id); + this.selectValue= ids.join(","); + }, + deep:true, + immediate:true } }, methods: { @@ -278,7 +292,6 @@ let columnItem = { change: (val) => { - console.log(val) if (val.column.field === "drawingno") { this.codeattrsecValue = val.value; return; @@ -318,9 +331,12 @@ valueFormat: formItem.dateFormate || "yyyy-MM-dd HH:mm:ss", format: formItem.dateFormate, keyAttr: formItem.keyAttr, - value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || + value:formItem.defaultValue || (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || (formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null) || - (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null), + (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) || + (this.status === "amend" && formItem.field === "codeStandardEditType" ? "2" : null) || + //鐖剁粍浠跺鏋滄槸鍙傜収鏁版嵁浼氬皢selectRow缃┖,selectRow涓嶄负绌哄氨璇存槑涓嶆槸鍙傜収瑕佸洖濉簮鏍囧噯鍙锋暟鎹� + (this.status === "amend" ? (this.selectRow && (formItem.field === "oldcode" ? this.selectValue : null)) : null), placeholder: formItem.inputTip, comboxKey: formItem.comboxKey, tip: formItem.tooltips, @@ -428,7 +444,8 @@ keyAttr: formItem.keyAttr, value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || (formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null) || - (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null), + (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) || + (this.status === "amend" && formItem.field === "codeStandardEditType" ? "2" : null), placeholder: formItem.inputTip, comboxKey: formItem.comboxKey, tip: formItem.tooltips, @@ -600,12 +617,16 @@ // 鑾峰彇琛ㄥ崟璇︽儏鏁版嵁 getFormDetail() { if (this.type === "add") return; - getFormDetail({templateOid: this.templateOid, oid: this.rowOid}).then( - (res) => { - this.form = Object.assign(this.form, res.data.data[0]); - this.loading = false; - } - ); + if(this.templateOid){ + getFormDetail({templateOid: this.templateOid, oid: this.rowOid}).then( + (res) => { + this.form = Object.assign(this.form, res.data.data[0]); + this.loading = false; + } + ); + return; + } + }, setReferValue(data) { if (data.field) { -- Gitblit v1.9.3