From a39097f01f0307a911180a43faa4569b38ea1edd Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期二, 10 九月 2024 11:37:21 +0800
Subject: [PATCH] 单选框 和字典

---
 pages/modal/5601.vue |   34 ++++++++++------------------------
 1 files changed, 10 insertions(+), 24 deletions(-)

diff --git a/pages/modal/5601.vue b/pages/modal/5601.vue
index 2d6273b..326a540 100644
--- a/pages/modal/5601.vue
+++ b/pages/modal/5601.vue
@@ -65,9 +65,10 @@
 									src="../../images/mobox_log_200x40.png">
 								</image>
 								<checkbox-group @change="checkboxChange">
-									<div class="dv-panel" v-for="(style,ii) in pageData.DefList" @tap="onPanelClick(ii)"
+									<div class="dv-panel" v-for="(style,ii) in pageData.DefList"
+										@tap="onPanelClick(ii,style.form.htmlobjId)"
 										:id="'dvpanel'+style.form.htmlobjId"
-										:class="style.form.htmlobjId==active_id?'bk-active':activelist[ii].active==true?'bk-active':''">
+										:class="style.form.htmlobjId==active_id?'bk-active':''">
 										<div class="dv-panel-input">
 											<div class="dv-input" v-for="(item,index) in style.form.items">
 												<!-- 鏅�甯冨眬 -->
@@ -174,7 +175,6 @@
 				After_Del_Event: {},
 
 				active_id: '',
-				activelist: [],
 				selectAttrObj: {},
 			};
 		},
@@ -458,8 +458,8 @@
 						if (item.is_default == '1')
 							itemName = item.name;
 						list.push({
-							text: item.value,
-							value: item.name,
+							text: item.name,
+							value: item.id,
 						});
 					});
 					//鏈夐粯璁ゅ�锛屾樉绀洪粯璁ゅ�
@@ -863,12 +863,7 @@
 											if (pageData?.DefList) {
 												pageData.DefList
 													.forEach(ele => {
-														$this
-															.activelist[
-																index
-															]
-															.active =
-															false;
+
 														if (ele
 															.form
 															.objId ==
@@ -1204,9 +1199,7 @@
 
 						pageData.DefList.push(detailStyle);
 						this.$set(this.pageDetail, pageIndex, pageData)
-						this.activelist.push({
-							active: false
-						});
+
 					});
 				}
 			},
@@ -1309,9 +1302,7 @@
 						}
 						// $this.setData({pageDetail:pageD})
 						$this.$set(this.pageDetail, pageIndex, pageData)
-						$this.activelist.push({
-							active: false
-						});
+
 					});
 				}
 
@@ -1530,14 +1521,9 @@
 				$this.runCustomEvent(pageData, event, input_param, list);
 			},
 
-			onPanelClick(value) {
+			onPanelClick(value, id) {
 				// console.log(value);
-				this.active_id = '';
-				this.activelist.forEach(ele => {
-					ele.active = false;
-				});
-				this.activelist[value].active = true;
-				// console.log(this.$data.activelist);
+				this.active_id = id;
 			},
 			//纭畾
 			ok(pageData) {

--
Gitblit v1.9.1