From c094d4a32180130de0c26c75a5abc414128a5ec1 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期四, 20 三月 2025 18:31:33 +0800
Subject: [PATCH] test

---
 pages/modal/form/index.vue |   76 +------------------------------------
 1 files changed, 3 insertions(+), 73 deletions(-)

diff --git a/pages/modal/form/index.vue b/pages/modal/form/index.vue
index 55c95e5..139c784 100644
--- a/pages/modal/form/index.vue
+++ b/pages/modal/form/index.vue
@@ -83,7 +83,6 @@
 				global_attr: [],
 				ext_info: {},
 				data_json: [],
-				refdatastore: [], //寮曠敤鏁版嵁瀛樺偍鍖�/ {attr:'G_PRJ_' + bindattr + '_ID', value:info.id}
 				popupType: "center",
 				check_list: {},
 				popupParam: {},
@@ -535,9 +534,7 @@
 					item.value = result.decodedata;
 					var $this = this;
 					let newVal = item.value.trim()
-					if (!newVal)
-						return
-					if (item.oldvalue != newVal) {
+					if (newVal) {
 						item.oldvalue = newVal;
 						var attr = item.fieldId;
 						this.head_styledef.form.model[attr] = newVal;
@@ -1144,63 +1141,7 @@
 						}
 						console.log($this.head_styledef);
 						if (data.result) {
-							var result = data.result;
-							for (var i = 0; i < result.length; i++) {
-								for (var c = 0; c < $this.$data.head_styledef.form.items
-									.length; c++) {
-									var attr = $this.$data.head_styledef.form.items[c];
-									//鍒ゆ柇琛ㄥ崟閲屾槸鍚︽湁杩斿洖瀛楁锛屾病鏈夊氨瑁呰浇鍒癿odel閲岋紝鐐瑰嚮纭畾鎻愪氦鐨勬椂鍊欏甫涓婅繖浜涙暟鎹�-									if ($this.head_styledef.form.model[result[i].attr] ==
-										undefined) {
-										$this.head_styledef.form.model[result[i].attr] =
-											result[i]
-											.value;
-									}
-									//鍒ゆ柇鏄惁鏄爡鏍艰〃鍗�-									if (attr.name != 'Layout') {
-										if (attr.fieldId == result[i].attr) {
-											attr.value = '';
-											attr.oldvalue = '';
-											attr.value = result[i].value;
-											attr.oldvalue = result[i].value;
-											$this.head_styledef.form.model[attr.fieldId] =
-												result[i]
-												.value;
-										}
-									} else if (attr.name == 'Layout') {
-										attr.setting.colList.forEach(col => {
-											if (col) {
-												if (col.fieldId == result[i].attr) {
-													col.value = '';
-													col.oldvalue = '';
-													col.value = result[i].value;
-													col.oldvalue = result[i].value;
-													$this.head_styledef.form.model[col
-															.fieldId] =
-														result[i].value;
-												}
-											}
-										});
-									}
-								}
-
-								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;
-										}
-									}
-								}
-							}
+							$this.setFormValues(data.result)
 						}
 					}
 
@@ -1237,18 +1178,7 @@
 					attr: a,
 					value: obj_attr[a] || "",
 				}));
-				if ($this.refdatastore.length > 0) {
-					for (var i = 0; i < $this.refdatastore.length; i++) {
-						if (!req.filter(function(s) {
-								return $this.refdatastore[i].attr == s.name
-							}).length) {
-							req.push({
-								'attr': $this.refdatastore[i].attr,
-								'value': $this.refdatastore[i].value
-							});
-						}
-					}
-				}
+			
 				let global_attr = Base64.encode(JSON.stringify(this.global_attr))
 				let data_json = Base64.encode(JSON.stringify(this.data_json))
 				let ext_info = Base64.encode(JSON.stringify(this.ext_info))

--
Gitblit v1.9.1