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/3018.vue |  222 +++++++++++++++++++++++++++----------------------------
 1 files changed, 108 insertions(+), 114 deletions(-)

diff --git a/pages/modal/3018.vue b/pages/modal/3018.vue
index e11dc14..7b0755e 100644
--- a/pages/modal/3018.vue
+++ b/pages/modal/3018.vue
@@ -24,16 +24,18 @@
 							</div>
 							<input
 								:type="attr.Type=='鏁存暟' || attr.Type=='娴偣鏁� || attr.Type=='int' || attr.Type=='float'?'number':'text'"
-								:value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'"
-								:data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"
-								:disabled="attr.edit?false:true">
+								:class="attr.edit?'':'input-disabled'" :value="attr.Value" @focus="ontap"
+								@blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex"
+								:style="{'width':attr.Width}" :disabled="attr.edit?false:true">
 							<!-- =='flase'?true:false -->
 							<textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'"
-								:data-index="index" :data-iindex="iindex" style="height:60px;"
-								:style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea>
+								:class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex"
+								style="height:60px;" :style="{'width':attr.Width}"
+								:disabled="attr.edit?false:true"></textarea>
 							<textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'"
-								:data-index="index" :data-iindex="iindex" style="height:90px;"
-								:style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea>
+								:class="attr.edit?'':'input-disabled'" :data-index="index" :data-iindex="iindex"
+								style="height:90px;" :style="{'width':attr.Width}"
+								:disabled="attr.edit?false:true"></textarea>
 							<!-- 鎵爜鍚庝簨浠惰繑鍥�-->
 							<div class="input_vallist">
 								<ul v-for="(inputval,vindex) in inputValList">
@@ -47,18 +49,19 @@
 							<p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
 							<input
 								:type="attr.Type=='鏁存暟' || attr.Type=='娴偣鏁� || attr.Type=='int' || attr.Type=='float' ?'number':'text'"
-								class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent"
-								v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex"
+								class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value"
+								@focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index"
+								:data-iindex="iindex"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}"
 								:disabled="attr.edit?false:true">
-							<textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent"
-								v-else-if="attr.Height=='2'" :data-index="index" :data-iindex="iindex"
-								style="height:60px;"
+							<textarea class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value"
+								@focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" :data-index="index"
+								:data-iindex="iindex" style="height:60px;"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}"
 								:disabled="attr.edit?false:true"></textarea>
-							<textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent"
-								v-else-if="attr.Height=='3'" :data-index="index" :data-iindex="iindex"
-								style="height:90px;"
+							<textarea class="attr_field" :class="attr.edit?'':'input-disabled'" :value="attr.Value"
+								@focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" :data-index="index"
+								:data-iindex="iindex" style="height:90px;"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}"
 								:disabled="attr.edit?false:true"></textarea>
 							<div class="text-right2" v-if="attr.ext_button==true">
@@ -153,7 +156,8 @@
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
-							<input type="text" class="attr_field" :data-index="index" :data-iindex="iindex"
+							<input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'"
+								:data-index="index" :data-iindex="iindex"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}"
 								disabled="true" :maxlength="-1">
 							<div class="text-right2" v-if="attr.Type=='寮曠敤瀵硅薄(鍗曚釜)'|| attr.Type=='obj-ref'">
@@ -179,12 +183,13 @@
 								<a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i
 										class="ace-icon fa fa-plus-circle"></i></a>
 							</div>
-							<input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true"
-								:maxlength="-1">
+							<input type="text" :class="attr.edit?'':'input-disabled'" :value="attr.Value"
+								:style="{'width':attr.Width}" disabled="true" :maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
-							<input type="text" class="attr_field" :value="attr.Value"
+							<input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'"
+								:value="attr.Value"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}"
 								disabled="true" :maxlength="-1">
 							<div class="text-right2">
@@ -203,12 +208,13 @@
 								<a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i
 										class="ace-icon fa fa-plus-circle"></i></a>
 							</div>
-							<input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true"
-								:maxlength="-1">
+							<input type="text" :class="attr.edit?'':'input-disabled'" :value="attr.Value"
+								:style="{'width':attr.Width}" disabled="true" :maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
-							<input type="text" class="attr_field" :value="attr.Value"
+							<input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'"
+								:value="attr.Value"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}"
 								disabled="true" :maxlength="-1">
 							<div class="text-right2">
@@ -223,12 +229,14 @@
 						<view v-if="classattr.control_style=='涓婁笅甯冨眬'">
 							<text class="tx_title">{{attr.DispName}}:<i class="i_tishi"
 									v-if="attr.notempty==true">*</i></text>
-							<input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"
-								:disabled="attr.edit?false:true" :maxlength="-1">
+							<input type="text" :class="attr.edit?'':'input-disabled'" :data-index="index"
+								:data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"
+								:maxlength="-1">
 						</view>
 						<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
 							<p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
-							<input type="text" class="attr_field" :data-index="index" :data-iindex="iindex"
+							<input type="text" class="attr_field" :class="attr.edit?'':'input-disabled'"
+								:data-index="index" :data-iindex="iindex"
 								:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"
 								:disabled="attr.edit?false:true" :maxlength="-1">
 							<i class="i_tishi" v-if="attr.notempty==true">*</i>
@@ -257,7 +265,7 @@
 
 		</view>
 
-		<view class="v-bottom"><button type="primary" @tap="ok" class="btn_add">{{title}}</button>
+		<view class="v-bottom"><button type="default" @tap="ok" class="btn_add">{{title}}</button>
 			<button type="default" @tap="cancel" class="btn_cancel">{{translateSys('cancel')}}</button>
 
 		</view>
@@ -266,8 +274,9 @@
 			<uni-popup class="view-popup" ref="popup" background-color="#fff" @change="popupChange">
 				<view class="popup-header">{{check_list.title}}</view>
 				<view class="popup-content" :class="{ 'popup-height': popupType === 'left' || popupType === 'right' }"
-					:style="{'width':check_list.width?check_list.width+'px':'200px','height':check_list.height?check_list.height+'px':'88%'}">
-					<view class="popup-cont" :style="{'height':check_list.height?check_list.height-45+'px':'415px'}">
+					:style="{'width':check_list.width?check_list.width+'px':'375rpx','height':check_list.height?check_list.height+'px':popupType =='center'?'60vh':'88vh'}">
+					<view class="popup-cont"
+						:style="{'height':check_list.height?check_list.height-45+'px':popupType =='center'?'50vh':'80vh'}">
 						<view class="view_popup_CheckList" v-for="(item,index) in check_list.items">
 							<checkbox-group class="check_list" @change="checkChange" :data-ischeck="item.check"
 								:data-index="index" :style="{'margin-left': '10rpx'}">
@@ -327,7 +336,7 @@
 		},
 		data() {
 			return {
-				title: this.translateSys('add2'),
+				title: this.translateSys('ok'),
 				editMode: false,
 				objAttr: {},
 				param: {},
@@ -382,7 +391,7 @@
 					title: this.translateSys('tip'),
 					content: this.translate('function_not_edit_dlg'),
 					showCancel: false,
-					confirmText: this.translateSys('cancel')
+					confirmText: this.translateSys('close')
 				});
 				uni.navigateBack({
 					delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
@@ -394,7 +403,7 @@
 					title: this.translateSys('tip'),
 					content: this.translate('function_not_edit_dlg'),
 					showCancel: false,
-					confirmText: this.translateSys('cancel')
+					confirmText: this.translateSys('close')
 				});
 				uni.navigateBack({
 					delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
@@ -463,7 +472,7 @@
 						title: this.translateSys('error') + " 1",
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys("cancel")
+						confirmText: this.translateSys('close')
 					});
 				}
 			},
@@ -487,7 +496,7 @@
 						title: this.translateSys('error') + " 1.3",
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys('cancel')
+						confirmText: this.translateSys('close')
 					});
 					return []
 				}
@@ -518,45 +527,45 @@
 						title: this.translateSys('error') + " 1.4",
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys('cancel')
+						confirmText: this.translateSys('close')
 					});
 				}
 			},
 			async loadFormData(objAttr) {
-				let formData
+				let attrs = []
 				if (this.param.objid) {
 					let info = await dataObjInfo({
 						class_id: this.param.clsid,
 						obj_id: this.param.objid,
 					});
-					formData = {};
-					formData["id"] = info.id;
-					formData["state"] = info.state;
+					attrs = [{
+						attr: "id",
+						value: info.id
+					}, {
+						attr: "state",
+						value: info.state
+					}]
 					info.attr_list.forEach(({
 						name,
 						value
 					}) => {
-						formData[name] = value;
+						attrs.push({
+							attr: name,
+							value: value
+						})
 					});
+					this.setFormValues(attrs)
 				} else if (objAttr) {
-					formData = {};
 					Object.keys(objAttr).forEach((attr) => {
-						let value = objAttr[attr];
-						formData[attr] = value;
+						attrs.push({
+							attr: attr,
+							value: objAttr[attr]
+						})
 					});
+					this.setFormValues(attrs)
 				}
-				//浼犲叆鍙傛暟鍊�-				if (formData) {
-					var attrlist = this.$data.classAttrList;
-					for (var i = 0; i < attrlist.length; i++) {
-						var attr = attrlist[i].Attr;
-						for (var j = 0; j < attr.length; j++) {
-							var ar = attr[j];
-							ar.Value = formData[ar.Name] || ""
-						}
-					}
-					this.$data.classAttrList = attrlist;
-				}
+
+
 			},
 			async viewParam() { //灏唌obox3灏忓啓鍙傛暟杞崲涓簃obox2澶у啓鍙傛暟
 				try {
@@ -664,7 +673,7 @@
 						title: this.translateSys("error"),
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys("cancel")
+						confirmText: this.translateSys('close')
 					});
 				}
 			},
@@ -814,7 +823,7 @@
 							title: this.translateSys('tip'),
 							content: this.translate('no_find_attr_diaplay'),
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 					}
 				} catch (ex) {
@@ -826,7 +835,7 @@
 						title: this.translateSys("error"),
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys("cancel")
+						confirmText: this.translateSys('close')
 					});
 				}
 			},
@@ -862,7 +871,7 @@
 						title: this.translateSys('tip'),
 						content: this.translate("icon_click_event_empty"),
 						showCancel: false,
-						confirmText: this.translateSys('cancel')
+						confirmText: this.translateSys('close')
 					});
 					return;
 				}
@@ -871,7 +880,7 @@
 						title: this.translateSys('tip'),
 						content: this.translate("icon_click_event_empty"),
 						showCancel: false,
-						confirmText: this.translateSys('cancel')
+						confirmText: this.translateSys('close')
 					});
 					return;
 				}
@@ -924,29 +933,6 @@
 					}
 				}
 
-				for (var i = 0; i < value.length; i++) {
-
-					var length = 0;
-					if (!this.$data.refdatastore.filter(function(
-							s) {
-							return data[i].attr == s.attr
-						}).length) {
-						length = 1;
-						this.$data.refdatastore.push(data[i]);
-					}
-					if (length == 0) {
-						for (var j = 0; j < this.$data.refdatastore
-							.length; j++) {
-							if (this.$data.refdatastore[j].attr ==
-								data[i]
-								.attr) {
-								this.$data.refdatastore[j].value =
-									data[i]
-									.value;
-							}
-						}
-					}
-				}
 			},
 			popupChange(e) {
 				console.log('褰撳墠妯″紡锛� + e.type + ',鐘舵�锛� + e.show);
@@ -990,7 +976,7 @@
 						title: this.translateSys('tip'),
 						content: "popupParam涓虹┖锛�,
 						showCancel: false,
-						confirmText: this.translateSys('cancel')
+						confirmText: this.translateSys('close')
 					});
 					return;
 				}
@@ -1312,7 +1298,7 @@
 					title: this.translateSys('tip'),
 					content: this.translateSys('unrealized'),
 					showCancel: false,
-					confirmText: this.translateSys('cancel')
+					confirmText: this.translateSys('close')
 				});
 				// var value=this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].RelCls[e.target.value];
 				// this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value;
@@ -1514,7 +1500,7 @@
 										.translateSys('quotation_mark_right') + this.translate(
 											"cannot_empty"),
 									showCancel: false,
-									confirmText: this.translateSys('cancel')
+									confirmText: this.translateSys('close')
 								});
 								return;
 							}
@@ -1563,14 +1549,14 @@
 								title: this.translateSys('tip'),
 								content: tip,
 								showCancel: false,
-								confirmText: this.translateSys('cancel')
+								confirmText: this.translateSys('close')
 							});
 							else uni.showModal({
 								title: this.translateSys('tip'),
 								content: tip + ',' + this.translateSys('tip') + ':' + data
 									.ret,
 								showCancel: false,
-								confirmText: this.translateSys('cancel')
+								confirmText: this.translateSys('close')
 							});
 							return false
 						} else {
@@ -1582,7 +1568,7 @@
 								title: this.translateSys('tip'),
 								content: tip,
 								showCancel: false,
-								confirmText: this.translateSys('cancel')
+								confirmText: this.translateSys('close')
 							});
 							uni.showToast({
 								title: this.translate('create_success'),
@@ -1613,7 +1599,7 @@
 							title: this.translateSys('tip'),
 							content: tip,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 					});
 				} catch (ex) {
@@ -1625,7 +1611,7 @@
 						title: this.translateSys('error') + " 4.1",
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys('cancel')
+						confirmText: this.translateSys('close')
 					});
 				}
 			},
@@ -1691,14 +1677,14 @@
 							title: this.translateSys('tip'),
 							content: tip,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						else uni.showModal({
 							title: this.translateSys('tip'),
 							content: tip + ',' + this.translateSys('tip') + ':' + data
 								.ret,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return false
 					} else {
@@ -1710,7 +1696,7 @@
 							title: this.translateSys('tip'),
 							content: tip,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 
 						if (data.action) {
@@ -1735,7 +1721,7 @@
 												.translate(
 													"tip_action_unprocessed"),
 											showCancel: false,
-											confirmText: this.translateSys('cancel')
+											confirmText: this.translateSys('close')
 										});
 									}
 									// else if (action_type == 'tip_dlg') {
@@ -1756,7 +1742,7 @@
 						title: this.translateSys('error') + " 2.1",
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys('cancel')
+						confirmText: this.translateSys('close')
 					});
 				});
 			},
@@ -1837,14 +1823,14 @@
 							title: this.translateSys('tip'),
 							content: tip,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						else uni.showModal({
 							title: this.translateSys('tip'),
 							content: tip + ',' + this.translateSys('tip') + ':' + data
 								.ret,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return false
 					} else {
@@ -1856,7 +1842,7 @@
 							title: this.translateSys('tip'),
 							content: tip,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 
 						var actionlist = data.action;
@@ -1914,7 +1900,7 @@
 						title: this.translateSys('error') + " 3.1",
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys('cancel')
+						confirmText: this.translateSys('close')
 					});
 				});
 			},
@@ -2006,14 +1992,14 @@
 								title: this.translateSys('tip'),
 								content: tip,
 								showCancel: false,
-								confirmText: this.translateSys('cancel')
+								confirmText: this.translateSys('close')
 							});
 							else uni.showModal({
 								title: this.translateSys('tip'),
 								content: tip + ',' + this.translateSys('tip') + ':' + data
 									.ret,
 								showCancel: false,
-								confirmText: this.translateSys('cancel')
+								confirmText: this.translateSys('close')
 							});
 							return false
 						} else {
@@ -2025,7 +2011,7 @@
 								title: this.translateSys('tip'),
 								content: tip,
 								showCancel: false,
-								confirmText: this.translateSys('cancel')
+								confirmText: this.translateSys('close')
 							});
 
 							var result = data.result;
@@ -2059,7 +2045,7 @@
 							title: this.translateSys('error') + " 4.1",
 							content: tip,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 					});
 				} catch (ex) {
@@ -2071,7 +2057,7 @@
 						title: this.translateSys('error') + " 4.1",
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys('cancel')
+						confirmText: this.translateSys('close')
 					});
 				}
 			},
@@ -2168,14 +2154,14 @@
 							title: this.translateSys('tip'),
 							content: tip,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						else uni.showModal({
 							title: this.translateSys('tip'),
 							content: tip + ',' + this.translateSys('tip') + ':' + data
 								.ret,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 						return false
 					} else {
@@ -2187,7 +2173,7 @@
 							title: this.translateSys('tip'),
 							content: tip,
 							showCancel: false,
-							confirmText: this.translateSys('cancel')
+							confirmText: this.translateSys('close')
 						});
 
 						if (data != "") {
@@ -2378,7 +2364,7 @@
 								title: this.translateSys('tip') + "5.2",
 								content: this.translate("execute_script_return_empty"),
 								showCancel: false,
-								confirmText: this.translateSys('cancel')
+								confirmText: this.translateSys('close')
 							});
 						}
 					}
@@ -2392,7 +2378,7 @@
 						title: this.translateSys('tip') + "5.1",
 						content: tip,
 						showCancel: false,
-						confirmText: this.translateSys('cancel')
+						confirmText: this.translateSys('close')
 					});
 				});
 			},
@@ -2511,6 +2497,10 @@
 			top: 6rpx;
 			right: 30rpx;
 			font-size: 60rpx;
+		}
+
+		.input-disabled {
+			background-color: #f3f3f3 !important;
 		}
 
 		input::-webkit-input-placeholder {
@@ -2656,8 +2646,10 @@
 			margin-top: 50rpx;
 			padding: 20rpx;
 			line-height: 1.5;
+			// background: #fff;
+			//	border: 1px solid #dcdee2;
+			// color: #000;
 			background: #fff;
-			border: none;
 			color: #000;
 			font-size: 38rpx;
 			font-weight: bold;
@@ -2730,7 +2722,7 @@
 		.popup-footer {
 			float: right;
 			position: absolute;
-			bottom: 0;
+			bottom: 10rpx;
 			right: 20rpx;
 		}
 
@@ -2754,9 +2746,11 @@
 			margin-top: 50rpx;
 			padding: 15rpx;
 			line-height: 1.5;
-			background: #27A6E1;
-			border: none;
-			color: #fff;
+			// background: #27A6E1;
+			// border: none;
+			// color: #fff;
+			background: #fff;
+			color: #000;
 			font-size: 38rpx;
 			font-weight: bold;
 			/* float: right; */

--
Gitblit v1.9.1