From b1233b1089142611698e913e565ec232334ba261 Mon Sep 17 00:00:00 2001 From: cuiqian2004 <cuiqian2004@163.com> Date: 星期三, 14 五月 2025 08:37:16 +0800 Subject: [PATCH] form selections --- pages/modal/3037_2.vue | 70 ++++------------------------------- 1 files changed, 8 insertions(+), 62 deletions(-) diff --git a/pages/modal/3037_2.vue b/pages/modal/3037_2.vue index 64bf0e8..9966a43 100644 --- a/pages/modal/3037_2.vue +++ b/pages/modal/3037_2.vue @@ -263,7 +263,7 @@ $this.head_styledef.form .model[ele.fieldId] = itemName; } - $this.head_styledef.form.items[index].dict = selections.map((a) => { + $this.head_styledef.form.items[index].selections = selections.map((a) => { return { value: a.value, text: a.label @@ -323,7 +323,7 @@ if (itemName) { $this.detail1_styledef.form.items[ele.fieldId] = itemName; } - $this.detail1_styledef.form.items[index].dict = selections.map((a) => { + $this.detail1_styledef.form.items[index].selections = selections.map((a) => { return { value: a.value, text: a.label @@ -531,20 +531,7 @@ }); } } - var length = 0; - if (!$this.$data.refdatastore.filter(function(s) { - return result[i].attr == s.attr - }).length) { - length = 1; - $this.$data.refdatastore.push(result[i]); - } - if (length == 0) { - for (var j = 0; j < $this.$data.refdatastore.length; j++) { - if ($this.$data.refdatastore[j].attr == result[i].attr) { - $this.$data.refdatastore[j].value = result[i].value; - } - } - } + } } else if (data.action[i].action_type == 'set_dlg_attr_show') { var result = action.value; @@ -999,8 +986,7 @@ rclsid: "", robjid: "", userlogin: "", - clsid: $this.$data - .param + clsid: $this.param .DataCls.id, objid: "", attr: param.req, @@ -1123,8 +1109,8 @@ //瀛愭暟鎹被鎵爜鏌ヨ鏁版嵁 if (isflag) { uni.hideKeyboard(); - this.$data.scanCodeVal =newVal; - var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; + this.scanCodeVal =newVal; + var eventid = this.param.Scan_Code.Input_Change_Event.ID; if (eventid) { //涓绘暟鎹被灞炴� var obj_attr = this.head_styledef.form.model; @@ -1601,20 +1587,7 @@ } } - var length = 0; - if (!$this.$data.refdatastore.filter(function(s) { - return result[i].attr == s.attr - }).length) { - length = 1; - $this.$data.refdatastore.push(result[i]); - } - if (length == 0) { - for (var j = 0; j < $this.$data.refdatastore.length; j++) { - if ($this.$data.refdatastore[j].attr == result[i].attr) { - $this.$data.refdatastore[j].value = result[i].value; - } - } - } + } } else if (action.action_type == 'set_dlg_attr_show') { var result = action.value; @@ -1859,19 +1832,7 @@ } } var length = 0; - if (!$this.$data.refdatastore.filter(function(s) { - return result[i].attr == s.attr - }).length) { - length = 1; - $this.$data.refdatastore.push(result[i]); - } - if (length == 0) { - for (var j = 0; j < $this.$data.refdatastore.length; j++) { - if ($this.$data.refdatastore[j].attr == result[i].attr) { - $this.$data.refdatastore[j].value = result[i].value; - } - } - } + } } else if (action.action_type == 'set_global_attr') { $this.$actiontr = action.value || []; @@ -2641,20 +2602,5 @@ margin-top: 5px; } - // .uni-px-5 { - // margin: 0; - // display: inline-block; - // margin: 0; - // font-size: 14px; - // } - // .uni-select{ - // border: 1px solid #ccc; - // border-radius: 0; - // } - // .uni-section-content{ - // display: inline-block; - // width: 100px; - // border: 1px solid red; - // } } </style> \ No newline at end of file -- Gitblit v1.9.1