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 | 34 +++++++++++++++++++++++----------- 1 files changed, 23 insertions(+), 11 deletions(-) diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue index 2423495..487f7c5 100644 --- a/pages/modal/3018_2.vue +++ b/pages/modal/3018_2.vue @@ -23,7 +23,7 @@ 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)"></text> </view> @@ -81,7 +81,7 @@ 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)"></text> </view> @@ -144,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 --> @@ -197,6 +197,7 @@ data() { return { title: this.translateSys('add2'), + btnName: "", param: {}, edit_inital_event: "", //寮圭獥鍒濆鍖栦簨浠禝D edit_ok_event: "", //寮圭獥鐐瑰嚮OK 瑙﹀彂浜嬩欢ID @@ -299,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: { @@ -468,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; @@ -1045,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 = { @@ -1828,7 +1830,7 @@ user_login: '', data_json: '', compose_info: '', - input_param: '', + input_param: Base64.encode(JSON.stringify(input_param)), }; console.log(dataInfo); // return; @@ -2199,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