From 6584848d00acd83de64f813fb5b03e8fb4b42773 Mon Sep 17 00:00:00 2001
From: jt <jt@activesoft.com.cn>
Date: 星期四, 21 三月 2024 16:12:46 +0800
Subject: [PATCH] 1.Mobox2的3018新增元数据方法迁移到PDAController里,并支持登录sessionid时间过期后自动登录 2.3200功能点增加set_panel_html action处理 3.调整3018功能点Set_dlg_attr action处理

---
 pages/modal/3018_2.vue |   96 ++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 80 insertions(+), 16 deletions(-)

diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue
index cffd284..4f52f89 100644
--- a/pages/modal/3018_2.vue
+++ b/pages/modal/3018_2.vue
@@ -722,6 +722,7 @@
 		console.log(item);
 		if(item.oldvalue != item.value){
 		    item.oldvalue = item.value;
+			item.value = item.value;
 			var attr = item.fieldId;
 			$this.head_styledef.form.model[attr] = item.value;
 			//瀛愭暟鎹被鎵爜鍖轰簨浠惰剼鏈�@@ -916,7 +917,7 @@
 		if(!info.eventid.includes('{')) info.eventid = '{'+info.eventid+'}';
 		var dataInfo={
 		  ed_type: info.edtype,
-		  start_transaction: '',
+		  start_transaction: true,
 		  class_id: info.clsid,
 		  class_name: '',
 		  event_id: info.eventid,
@@ -959,24 +960,61 @@
 									if (result[i].choice_list) {
 										for (var c = 0; c < $this.head_styledef.form.items.length; c++) {
 											var attr = $this.head_styledef.form.items[c];
-											if(attr.fieldId==result[i].attr){
-												var dictItemList=[];
-												for(var d in result[i].choice_list){
-													var val =result[i].choice_list[d];
-													dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"text":val,"value":val});
-												}
-												attr.dict = dictItemList;
+											if(attr.name!='Layout'){
+											  if(attr.fieldId==result[i].attr){
+											  	var dictItemList=[];
+											  	for(var d in result[i].choice_list){
+											  		var val =result[i].choice_list[d];
+											  		dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"text":val,"value":val});
+											  	}
+											  	attr.dict = dictItemList;
+											  }
+											} else if(attr.name=='Layout'){
+											  attr.setting.colList.forEach(col=>{
+											    if(col){
+											      if(col.fieldId==result[i].attr){
+											      	var dictItemList=[];
+											      	for(var d in result[i].choice_list){
+											      		var val =result[i].choice_list[d];
+											      		dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"text":val,"value":val});
+											      	}
+											      	col.dict = dictItemList;
+											      }
+											    }
+											  });
 											}
+											
 										}
 									}
 									for (var c = 0; c < $this.$data.head_styledef.form.items.length; c++) {
 										var attr = $this.$data.head_styledef.form.items[c];
 										// console.log(attr[j].Name+'=='+result[i].attr);
-										if(attr.fieldId==result[i].attr){
-											attr.value = result[i].value;
-											$this.head_styledef.form.model[attr.fieldId] =result[i].value;
+										//鍒ゆ柇琛ㄥ崟閲屾槸鍚︽湁杩斿洖瀛楁锛屾病鏈夊氨瑁呰浇鍒癿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) {
@@ -998,15 +1036,41 @@
 							}
 						}
 					}
+					// var head_styledef = JSON.parse(JSON.stringify($this.head_styledef));
+					// $this.head_styledef=[];
+					// $this.head_styledef = head_styledef;
+					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];
-								if(attr.fieldId==result[i].attr){
-									attr.value = result[i].value;
-									$this.head_styledef.form.model[attr.fieldId] =result[i].value;
+								//鍒ゆ柇琛ㄥ崟閲屾槸鍚︽湁杩斿洖瀛楁锛屾病鏈夊氨瑁呰浇鍒癿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;
+								      }
+								    }
+								  });
 								}
 							}
 							
@@ -1081,7 +1145,7 @@
 		if(!eventid.includes('{')) eventid= '{'+ eventid +'}';
 		var dataInfo={
 		  ed_type: "0",
-		  start_transaction: '',
+		  start_transaction: true,
 		  class_id: this.$data.param.DataCls.id,
 		  class_name: '',
 		  event_id: eventid,

--
Gitblit v1.9.1