From 715fbe2b202d8aba399823ec3aa54ae9a01f6e51 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期四, 31 十月 2024 15:04:17 +0800
Subject: [PATCH] 3018

---
 pages/modal/3018_2.vue |   52 ++++++++++++++++++++++++++++++----------------------
 1 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue
index a941a38..487f7c5 100644
--- a/pages/modal/3018_2.vue
+++ b/pages/modal/3018_2.vue
@@ -8,16 +8,14 @@
 					<uni-forms-item v-if="item.name != 'Layout'&& item.show==true" :label="item.label +'锛� "
 						:label-width="item.labelWidth+'px'">
 						<!-- <text class="txt_title" :style="{'width':item.labelWidth+'px'}">{{item.label}}锛�/text> -->
-						<span class="form-item-span" v-if="item.disabled"
-							:style="'width: calc(100% - '+item.labelWidth+'px);'">{{item.value}}</span>
 						<!-- 涓嬫媺妗�鍗曢� item.useDict?item.dict:item.selections-->
-						<uni-data-select id="dv_select" v-if="item.name=='Select' && !item.disabled"
+						<uni-data-select id="dv_select" v-if="item.name=='Select'"
 							:style="'width: calc(100% - '+item.labelWidth-10+'px);'"
 							:class="item.disabled?'input-disabled':''" v-model="item.value" :localdata="item.dict"
 							@change="onchange(item)" :disabled="item.disabled" :clear="false"></uni-data-select>
 						<!-- 鏂囨湰妗�鏁板瓧妗�-->
 						<view class="input-wrapper"
-							v-if="(item.name=='Input' || item.name=='InputNumber') && !item.disabled">
+							v-if="(item.name=='Input' || item.name=='InputNumber')">
 							<text v-if="item.setting.prefix" class="uni-icon" :class="[item.setting.prefix]"
 								@change="classAttr_extButton(item)">&#xe568;</text>
 							<input class="uni-input" :class="item.disabled?'input-disabled':''"
@@ -25,12 +23,12 @@
 								v-model="item.value" :disabled="item.disabled" :placeholder="item.placeholder"
 								:style="{'width':item.setting.prefix && item.setting.suffix?'78%':item.setting.prefix || item.setting.suffix?'87%':'96%'}"
 								:focus="focusFieldId == item.fieldId" @focus="ontap(item)" @click="onClick(item)"
-								@blur="onevent(item)" />
+								@blur="onevent(item)"  :maxlength="-1"/>
 							<text v-if="item.setting.suffix" class="uni-icon" :class="[item.setting.suffix]"
 								@click="classAttr_extButton(item)">&#xe568;</text>
 						</view>
 						<!-- 澶氳鏂囨湰 -->
-						<view class="input-wrapper" v-if="item.name=='Textarea' && !item.disabled">
+						<view class="input-wrapper" v-if="item.name=='Textarea' ">
 							<textarea class="uni-input" :class="item.disabled?'input-disabled':''" :value="item.value"
 								:focus="focusFieldId == item.fieldId" :placeholder="item.placeholder"
 								@blur="onModelValue(item)" @click="onClick(item)" :data-index="index"
@@ -61,7 +59,7 @@
 							@change="onModelValue(item)" />
 						<!-- 鏃ユ湡鏃堕棿 -->
 						<view class="input-wrapper"
-							v-if="(item.name=='TimePicker' || item.name=='DatePicker') && !item.disabled">
+							v-if="(item.name=='TimePicker' || item.name=='DatePicker')">
 							<picker mode="date" class="date_iput" :class="item.disabled?'input-disabled':''"
 								:disabled="item.disabled" :value="item.value" @change="onModelValue(item)">
 								<view class="picker">{{item.value}}</view>
@@ -74,10 +72,8 @@
 							:span="item.setting.spanList?item.setting.spanList[key]:24 / item.setting.col">
 							<uni-forms-item v-if="cols!=null  && cols.show==true" :label="cols.label +'锛�"
 								:label-width="cols.labelWidth+'px'">
-								<!-- <text class="txt_title" :style="{'width':cols.labelWidth+'px'}">{{cols.label}}锛�/text> -->
-								<span class="form-item-span" v-if="cols.disabled">{{cols.value}}</span>
 								<view class="input-wrapper"
-									v-if="(cols.name=='Input' || cols.name=='InputNumber') && !cols.disabled">
+									v-if="(cols.name=='Input' || cols.name=='InputNumber') ">
 									<text v-if="cols.setting.prefix" class="uni-icon" :class="[cols.setting.prefix]"
 										@change="onchange(cols)">&#xe568;</text>
 									<input class="uni-input" :class="cols.disabled?'input-disabled':''"
@@ -85,17 +81,17 @@
 										v-model="cols.value" :disabled="cols.disabled" :placeholder="cols.placeholder"
 										:style="{'width':cols.setting.prefix && cols.setting.suffix?'78%':cols.setting.prefix || cols.setting.suffix?'87%':'96%'}"
 										:focus="focusFieldId == cols.fieldId" @focus="ontap(cols)"
-										@click="onClick(cols)" @blur="onevent(cols)" />
+										@click="onClick(cols)" @blur="onevent(cols)"  :maxlength="-1"/>
 									<text v-if="cols.setting.suffix" class="uni-icon" :class="[cols.setting.suffix]"
 										@click="onchange(cols)">&#xe568;</text>
 								</view>
 								<!-- 涓嬫媺妗�鍗曢� cols.useDict?cols.dict:cols.selections-->
-								<uni-data-select id="dv_select" v-if="cols.name=='Select' && !cols.disabled"
+								<uni-data-select id="dv_select" v-if="cols.name=='Select' "
 									:class="cols.disabled?'input-disabled':''" v-model="cols.value"
 									:localdata="cols.dict" @change="onchange(cols)" :disabled="cols.disabled"
 									:clear="false"></uni-data-select>
 								<!-- 澶氳鏂囨湰 -->
-								<view class="input-wrapper" v-if="cols.name=='Textarea' && !cols.disabled">
+								<view class="input-wrapper" v-if="cols.name=='Textarea' ">
 									<textarea class="uni-input" :value="cols.value"
 										:class="cols.disabled?'input-disabled':''" :placeholder="cols.placeholder"
 										:focus="focusFieldId == cols.fieldId" @blur="onModelValue(cols)"
@@ -148,9 +144,9 @@
 					</a>
 				</view>
 			</view>
-			<button type="default" @tap="sava" class="btn_add" v-if="dropdownBtns.length==0"
-				:class="saving?'btn_disabled':''" :disabled="saving">{{title}}</button>
-			<button type="default" @tap="cancel" class="btn_cancel">{{translateSys('cancel')}}</button>
+			<button type="default" @tap="sava" class="btn_add" v-if="dropdownBtns.length==0 && btnName != ''"
+				:class="saving?'btn_disabled':''" :disabled="saving">{{btnName}}</button>
+			<button type="default" @tap="cancel" :class="(dropdownBtns.length> 0 || btnName != '')?'btn_cancel':'btn_cancel2'">{{translateSys('cancel')}}</button>
 
 		</view>
 		<!-- 鏅�寮圭獥 top bottom center left right -->
@@ -201,6 +197,7 @@
 		data() {
 			return {
 				title: this.translateSys('add2'),
+				btnName: "",
 				param: {},
 				edit_inital_event: "", //寮圭獥鍒濆鍖栦簨浠禝D
 				edit_ok_event: "", //寮圭獥鐐瑰嚮OK 瑙﹀彂浜嬩欢ID
@@ -303,6 +300,7 @@
 			this.$data.param = JSON.parse(options.param);
 			this.$data.title = this.$data.param.Add_BtnName ? this.$data.param.Add_BtnName : options
 				.titlename; //璁剧疆鎸夐挳鏂囧瓧
+			this.$data.btnName = this.$data.param.Add_BtnName || ""
 			this.loadData(options.paramValue)
 		},
 		computed: {
@@ -472,12 +470,12 @@
 					var itemName = '';
 					(res.dict_item_list || []).forEach((item) => {
 						if (item.is_default == '1')
-							itemName = item.name;
+							itemName = item.name
 						list.push({
-							text: item.name,
-							value: item.id,
+							text: item.value ? item.value : item.name,
+							value: item.name,
 						});
-					});
+					});						
 					//鏈夐粯璁ゅ�锛屾樉绀洪粯璁ゅ�
 					if (itemName) {
 						formItem.value = itemName;
@@ -1049,7 +1047,7 @@
 					info.dataJson = Base64.encode(JSON.stringify(info.dataJson)); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
 				var obj_attr = {};
 				info.attr.forEach(item => {
-					obj_attr[item.attr] = item.val;
+					obj_attr[item.attr] = item.value;
 				});
 				if (!info.eventid.includes('{')) info.eventid = '{' + info.eventid + '}';
 				var dataInfo = {
@@ -1832,7 +1830,7 @@
 					user_login: '',
 					data_json: '',
 					compose_info: '',
-					input_param: '',
+					input_param: Base64.encode(JSON.stringify(input_param)),
 				};
 				console.log(dataInfo);
 				// return;
@@ -2203,6 +2201,16 @@
 				float: right;
 				display: inline-block;
 			}
+			.btn_cancel2 {
+				width: 90%;
+				margin: 0 10rpx;
+				background: #fff;
+				border: none;
+				color: #000;
+				font-size: 38rpx;
+				float: right;
+				display: inline-block;
+			}
 
 			.uni-padding-wrap {
 				margin: 2rpx 0 0 10rpx;

--
Gitblit v1.9.1