From e8b665122cf256caae4993534c696d029883f0d5 Mon Sep 17 00:00:00 2001 From: cuiqian2004 <cuiqian2004@163.com> Date: 星期三, 05 三月 2025 10:52:03 +0800 Subject: [PATCH] showmodal cancal 改成 close --- pages/modal/5601.vue | 173 ++++++++++++++++++++++++++++++++------------------------- 1 files changed, 98 insertions(+), 75 deletions(-) diff --git a/pages/modal/5601.vue b/pages/modal/5601.vue index 9657433..a09008a 100644 --- a/pages/modal/5601.vue +++ b/pages/modal/5601.vue @@ -7,8 +7,9 @@ <uni-forms-item v-if="item.name != 'Layout'" :label="item.label ?item.label +'锛�:'' " :label-width="item.labelWidth+'px'"> <uni-data-picker v-if="item.name=='Select'" :class="item.disabled?'input-disabled':''" - v-model="item.value" :localdata="item.useDict ? item.dict : item.selections" @change="onEnterChange(item)" - :readonly="item.disabled" :clear-icon="false" :popup-title="item.label"></uni-data-picker> + v-model="item.value" :localdata="item.useDict ? item.dict : item.selections" + @change="onEnterChange(item)" :readonly="item.disabled" :clear-icon="false" + :popup-title="item.label"></uni-data-picker> <view class="input-wrapper" v-if="item.name=='Input' || item.name=='InputNumber'"> <text v-if="item.setting.prefix" class="uni-icon" :class="[item.setting.prefix]" @click="classAttr_extButton(item)"></text> @@ -48,10 +49,12 @@ <uni-col :span=" item.setting.spanList && item.setting.spanList[key]? item.setting.spanList[key] : 24 / item.setting.col" v-for="(col,key) in item.setting.colList"> - <uni-forms-item v-if="col!=null" :label="col.label ? col.label +'锛�:''" :label-width="col.labelWidth+'px'"> + <uni-forms-item v-if="col!=null" :label="col.label ? col.label +'锛�:''" + :label-width="col.labelWidth+'px'"> <uni-data-picker v-if="col.name=='Select'" :class="col.disabled?'input-disabled':''" - v-model="col.value" :localdata="col.useDict ? col.dict : col.selections" @change="onEnterChange(col)" - :readonly="col.disabled" :clear-icon="false" :popup-title="col.label"></uni-data-picker> + v-model="col.value" :localdata="col.useDict ? col.dict : col.selections" + @change="onEnterChange(col)" :readonly="col.disabled" :clear-icon="false" + :popup-title="col.label"></uni-data-picker> <view class="input-wrapper" v-if="col.name=='Input' || col.name=='InputNumber'"> <text v-if="col.setting.prefix" class="uni-icon" :class="[col.setting.prefix]" @click="classAttr_extButton(col)"></text> @@ -152,7 +155,8 @@ <!-- <text></text> --> <!-- <button type="primary" @click="savaItem(ii)" v-if="param.Sub_Page[0].OK_Button==true">淇濆瓨</Button> --> <button size="mini" v-for="(btn,btnIndex) in pageData.Row_Button" - :key="btnIndex" :type="btn.FunCode == 'Delete' ? 'warn' : 'primary'" + :key="btnIndex" type="default" + :class="btn.FunCode == 'Delete' ? 'btn-warn' : 'btn-primary'" @click="onRowBtnClick(btn, pageData,ii)"> <Icon v-if="btn.Style == 'img' || btn.Style == 'img_text'" class="Img" /> @@ -163,13 +167,14 @@ </checkbox-group> </view> <view class="view-bottom" v-if="pageData.Button.length >0 "> - <button v-for="(btn,btnIndex) in pageData.Button" :key="btnIndex" - :type="btn.FunCode == 'Cancel' ? 'default' : 'primary'" + <button v-for="(btn,btnIndex) in pageData.Button" :key="btnIndex" type="default" :class="{'btn-disabled':(btn.FunCode != 'Cancel' && pageData.okLoading), - 'btn-one':pageData.Button.length == 1, - 'btn-left':(btnIndex < pageData.Button.length - 1), - 'btn-right': btnIndex > 0 && btnIndex == pageData.Button.length - 1 , - 'width-50':(pageData.Button.length == 2),'width-32':(pageData.Button.length == 3),'width-30':(pageData.DropDownButton.length> 0)}" + 'btn-primary':(btn.FunCode != 'Cancel'), + 'btn-cancel':(btn.FunCode == 'Cancel'), + 'btn-one':pageData.Button.length == 1, + 'btn-left':(btnIndex < pageData.Button.length - 1), + 'btn-right': btnIndex > 0 && btnIndex == pageData.Button.length - 1 , + 'width-50':(pageData.Button.length == 2),'width-32':(pageData.Button.length == 3),'width-30':(pageData.DropDownButton.length> 0)}" :disabled="(btn.FunCode != 'Cancel' && pageData.okLoading)? true:false" @click="onBtnClick(btn, pageData)"> <Icon v-if="btn.Style == 'img' || btn.Style == 'img_text'" class="Img" /> @@ -201,7 +206,8 @@ <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':'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="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'}"> @@ -288,7 +294,7 @@ title: this.translateSys("error"), content: this.translate("tip_no_master_class"), showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); } }, @@ -536,7 +542,7 @@ styledefHead.form .model[ele.fieldId] = itemName; } - + ele.selections = selections.map((a) => { return { value: a.value, @@ -608,7 +614,7 @@ title: this.translateSys("error") + "1", content: ex.errMsg, showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); return {} } @@ -645,14 +651,12 @@ await this.DictGetInfo(ele.bind.dict, detailstyledef.form .model, ele); - } - else - { + } else { if (ele?.name === "Select") { - ele.selections =[] + ele.selections = [] } } - + } else { for (let j in ele.setting.colList) { const col = ele.setting.colList[j] @@ -661,11 +665,9 @@ .bind.dict, detailstyledef.form .model, col); - } - else - { + } else { if (col?.name === "Select") { - col.selections =[] + col.selections = [] } } } @@ -681,7 +683,7 @@ title: this.translateSys("error") + "2", content: ex.errMsg, showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); return {} } @@ -720,7 +722,7 @@ title: this.translateSys("error") + "3", content: ex.errMsg, showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); } @@ -902,7 +904,7 @@ title: this.translateSys("tip"), content: this.translate('icon_click_callback_empty'), showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); return; } @@ -911,7 +913,7 @@ title: this.translateSys("tip"), content: this.translate('icon_click_event_empty'), showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); return; } @@ -925,7 +927,7 @@ getDetailAttrList(pageData) { const detailAttrList = []; - console.log(pageData) + console.log(pageData) if (pageData.DefList) { pageData.DefList.forEach(style => { var detail_attr = {}; @@ -968,7 +970,7 @@ }); }); } - console.log(detailAttrList) + console.log(detailAttrList) const jsonlist = []; detailAttrList.forEach(attr => { jsonlist.push({ @@ -1000,7 +1002,7 @@ }); var obj_attr = this.head_styledef.form.model; // console.log(obj_attr); - + var input_param = Base64.encode( JSON.stringify( Object.keys(head_attr).map((a) => ({ @@ -1023,7 +1025,7 @@ const data_json = Base64.encode( JSON.stringify(jsonList) ); - console.log(jsonList) + console.log(jsonList) var dataInfo = { ed_type: 0, start_transaction: true, @@ -1062,7 +1064,7 @@ content: tip, showCancel: false, confirmText: this.translateSys( - "cancel") + 'close') }); } else uni.showModal({ title: this.translateSys('tip'), @@ -1072,7 +1074,7 @@ .ret, showCancel: false, confirmText: this.translateSys( - "cancel") + 'close') }); return false; } else { @@ -1084,7 +1086,7 @@ content: tip, showCancel: false, confirmText: this.translateSys( - "cancel") + 'close') }); if (result.result_type == 0 && result.action) { @@ -1359,7 +1361,7 @@ content: result.info, showCancel: false, confirmText: this - .translateSys("cancel") + .translateSys('close') }); } } @@ -1373,7 +1375,7 @@ title: this.translateSys("error") + "4.1", content: tip, showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); }); } @@ -1388,7 +1390,7 @@ this.translate('reason') + this.translateSys("colon") + tip, showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); } }, @@ -1748,7 +1750,7 @@ value: val }); }); - + head_styledef.form.items.forEach(async (attr_item, index) => { if (attr_item.name != "Layout") { if (attr_item.fieldId == attr.attr) { @@ -1883,7 +1885,7 @@ title: this.translateSys("tip"), content: this.translate("tip_no_select_data"), showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); return; } @@ -1939,7 +1941,7 @@ title: this.translateSys("tip"), content: "popupParam涓虹┖锛�, showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); return; } @@ -1948,7 +1950,7 @@ title: this.translateSys("tip"), content: this.translate("tip_no_select_data"), showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); return; } @@ -2044,14 +2046,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 { @@ -2063,7 +2065,7 @@ title: this.translateSys("tip"), content: tip, showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); var actionlist = data.action; @@ -2126,7 +2128,7 @@ .translate( "tip_action_unprocessed"), showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); } } @@ -2203,7 +2205,7 @@ title: this.translateSys("error") + "3.1", content: exStr, showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); }); }, @@ -2296,14 +2298,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 { @@ -2315,7 +2317,7 @@ title: $this.translateSys("tip"), content: tip, showCancel: false, - confirmText: $this.translateSys("cancel") + confirmText: $this.translateSys('close') }); if (data != "") { @@ -2494,7 +2496,7 @@ .translate( "tip_action_unprocessed"), showCancel: false, - confirmText: $this.translateSys("cancel") + confirmText: $this.translateSys('close') }); } } @@ -2507,7 +2509,7 @@ "quotation_mark_right") + $this.translateSys( "comma") + 'event_id' + eventid, showCancel: false, - confirmText: $this.translateSys("cancel") + confirmText: $this.translateSys('close') }); } } @@ -2522,7 +2524,7 @@ title: $this.translateSys('tip') + "5.1", content: exStr, showCancel: false, - confirmText: $this.translateSys("cancel") + confirmText: $this.translateSys('close') }); }); }, @@ -2627,7 +2629,7 @@ title: this.translateSys("tip"), content: this.translateSys("unrealized"), showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); } } @@ -2709,7 +2711,8 @@ objAttr[item.fieldId] = item.value; }); - const url = `../modal/form/index?param=${JSON.stringify(btn)}&titlename=${btn.ShowName}&editMode=1&objAttr=${JSON.stringify(objAttr)}&type=updateDataObj` + const url = + `../modal/form/index?param=${JSON.stringify(btn)}&titlename=${btn.ShowName}&editMode=1&objAttr=${JSON.stringify(objAttr)}&type=updateDataObj` var $this = this; uni.navigateTo({ url: url, @@ -2770,7 +2773,7 @@ this.translate( "tip_no_data_last"), showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); return false; } @@ -2861,7 +2864,7 @@ title: this.translateSys("tip"), content: this.translate("tip_no_select_data"), showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); return; } @@ -2922,7 +2925,7 @@ content: tip, showCancel: false, confirmText: this.translateSys( - "cancel") + 'close') }); } else uni.showModal({ title: this.translateSys('tip'), @@ -2931,7 +2934,7 @@ result.ret, showCancel: false, confirmText: this.translateSys( - "cancel") + 'close') }); return false; } else { @@ -2943,7 +2946,7 @@ content: tip, showCancel: false, confirmText: this.translateSys( - "cancel") + 'close') }); if (result.result_type == 0) { if (result.action) { @@ -2996,7 +2999,7 @@ showCancel: false, confirmText: this .translateSys( - "cancel" + 'close' ) }); } else if (item.action_type == @@ -3219,7 +3222,7 @@ content: result.info, showCancel: false, confirmText: this - .translateSys("cancel") + .translateSys('close') }); } } @@ -3237,7 +3240,7 @@ "comma") + tip, showCancel: false, - confirmText: this.translateSys("cancel") + confirmText: this.translateSys('close') }); }); }, @@ -3261,7 +3264,7 @@ <style> .popup-content { @include flex; - + } .popup-height { @@ -3352,6 +3355,7 @@ flex-direction: column !important; } + .view-bottom { display: flex; flex-direction: row; @@ -3359,24 +3363,25 @@ padding: 10rpx 15rpx 30rpx 15rpx; .btn-disabled { - background-color: #ddd; - color: #888; + background-color: #ddd !important; + color: #888 !important; } + + .btn-left { padding: 20rpx; line-height: 1.5; - border: none; font-size: 38rpx; font-weight: bold; float: left; display: inline-block; + } .btn-one { padding: 20rpx; line-height: 1.5; - border: none; font-size: 38rpx; font-weight: bold; float: left; @@ -3388,7 +3393,6 @@ .btn-right { padding: 20rpx; line-height: 1.5; - border: none; font-size: 38rpx; font-weight: bold; float: right; @@ -3408,6 +3412,23 @@ width: 30%; margin-left: 1%; } + } + + .btn-warn { + background: #ff2d1e; + border: none; + color: #fff; + } + + .btn-cancel { + background: #fff; + color: #000; + } + + .btn-primary { + background: #27A6E1; + border: none; + color: #fff; } [nvue] uni-view { @@ -3617,7 +3638,7 @@ border-radius: 5px; } - .view-popup { + .view-popup { position: relative; } @@ -3654,7 +3675,7 @@ .popup-footer { float: right; position: absolute; - bottom: 0; + bottom:10rpx; right: 20rpx; } @@ -3678,9 +3699,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