From 9ae83a12c2b9c764e28760fb9c3c09fe697c8990 Mon Sep 17 00:00:00 2001 From: cuiqian2004 <cuiqian2004@163.com> Date: 星期一, 22 七月 2024 14:56:00 +0800 Subject: [PATCH] 3018 按钮修改 --- pages/modal/3018_2.vue | 558 +++++++++++++++++--------- pages/modal/3018.vue | 661 ++++++++++++++++--------------- pages.json | 16 pages/modal/3200.vue | 16 pages/index/index.vue | 4 manifest.json | 4 6 files changed, 725 insertions(+), 534 deletions(-) diff --git a/manifest.json b/manifest.json index 8112715..e68d0ec 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "MoboxPDA", "appid" : "__UNI__56D451E", "description" : "", - "versionName" : "1.1.06", - "versionCode" : 1106, + "versionName" : "1.1.07", + "versionCode" : 1107, "transformPx" : false, /* 5+App鐗规湁鐩稿叧 */ "app-plus" : { diff --git a/pages.json b/pages.json index b82d64c..d38795a 100644 --- a/pages.json +++ b/pages.json @@ -84,14 +84,14 @@ "enablePullDownRefresh": false } }, - // ,{ - // "path" : "pages/modal/3018", - // "style" : - // { - // "navigationBarTitleText": "鏂板", - // "enablePullDownRefresh": false - // } - // } + { + "path" : "pages/modal/3018", + "style" : + { + "navigationBarTitleText":"%sys.add2%", + "enablePullDownRefresh": false + } + }, // { // "path": "pages/modal/small-wnd/index", // "style": { diff --git a/pages/index/index.vue b/pages/index/index.vue index d9a6c2a..c25eee8 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -16,7 +16,7 @@ :style="{'background-color':app.bk_color,'color':app.bk_color}"> <i :class="app.img_font_style" :style="{'color':app.txt_color}"></i> </a> - <p :data-key="app.id">{{ app.name || app.list_name}}</p> + <p :data-key="app.id">{{ app.list_name|| app.name}}</p> </li> </ul> @@ -130,7 +130,7 @@ appCreate(app) { //鐐瑰嚮鍔熻兘鐐硅烦杞〉闈� console.log(app); var paramStr = this.$store.state.OIMoboxSAPI ? app.param : app.Param; - var appName = this.$store.state.OIMoboxSAPI ? (app.name || app.list_name) : app.Name; + var appName = this.$store.state.OIMoboxSAPI ? (app.list_name || app.name ) : app.Name; var defCode = this.$store.state.OIMoboxSAPI ? app.def_code : app.DefCode; var param = ""; if (paramStr) { diff --git a/pages/modal/3018.vue b/pages/modal/3018.vue index ef69bae..b925b29 100644 --- a/pages/modal/3018.vue +++ b/pages/modal/3018.vue @@ -1,5 +1,5 @@ <template> - <view class="content"> + <view class="uni-page-modal-3018"> <view class="v-area" v-for="(classattr,index) in classAttrList"> <div class="class_attr_title" style="display: none;"> <div class="title_line"></div> @@ -254,8 +254,11 @@ </div> </view> - <button type="default" @tap="cancel" class="btn_cancel">{{translateSys('cancel')}}</button> - <button type="default" @tap="sava" class="btn_add">{{title}}</button> + + <view class="v-bottom"><button type="default" @tap="cancel" + class="btn_cancel">{{translateSys('cancel')}}</button> + <button type="default" @tap="sava" class="btn_add">{{title}}</button> + </view> <!-- 鏅�寮圭獥 top bottom center left right --> <view> <uni-popup class="view-popup" ref="popup" background-color="#fff" @change="popupChange"> @@ -338,8 +341,11 @@ popupParam: {}, } }, + mounted() { + console.log("3018 mounted"); + }, onLoad(options) { - // console.log(options); + console.log("3018", options); uni.setNavigationBarTitle({ title: options.titlename }); //璁剧疆椤堕儴鏍囬 @@ -363,8 +369,7 @@ } if (!param.Edit_dlg.Name) { uni.showModal({ - title: this.translateSys('tip') - ", + title: this.translateSys('tip'), content: this.translate('function_not_edit_dlg'), showCancel: false, confirmText: this.translateSys('cancel') @@ -950,7 +955,6 @@ for (var j = 0; j < attr.length; j++) { var ar = attr[j]; req.push(this.formatAttr(ar)) - } } var info = { @@ -1246,7 +1250,7 @@ }, add() { uni.showLoading({ - title: this.translateSys("loading") + title: this.translateSys("loading"), mask: true }); var req = []; @@ -2347,360 +2351,379 @@ } } </script> -<style> - .class_attr_title { - font-size: 44rpx; - padding-bottom: 22rpx; - position: relative; - } +<style lang="less"> + .uni-page-modal-3018 { + display: flex; + height: calc(100vh - 30rpx); + width: 720rpx; + flex-direction: column !important; + padding: 15rpx; - .class_attr_title .title_line { - border-bottom: 2rpx solid #aaa; - position: relative; - bottom: -50rpx; - width: calc(100% - 290rpx); - margin-left: 100px; - } + .v-area { + width: 100%; + flex-direction: column !important; + } - .class_attr_title .title_icon { - border-radius: 50%; - width: 100rpx; - line-height: 64rpx; - display: inline-block; - vertical-align: middle; - padding-top: 10rpx; - padding-left: 20rpx; - text-align: center; - color: #fff; - } + .v-bottom { + display: block; + width: calc(100% - 30rpx); + padding: 10rpx 15rpx 20rpx 15rpx; + } - .class_attr_title i { - color: #2c6aa0 !important; - } + .class_attr_title { + font-size: 44rpx; + padding-bottom: 22rpx; + position: relative; + } - .class_attr_title .title_icon i { - font-size: 80rpx; - } + .class_attr_title .title_line { + border-bottom: 2rpx solid #aaa; + position: relative; + bottom: -50rpx; + width: calc(100% - 290rpx); + margin-left: 100px; + } - .class_attr_title .title { - padding-right: 22rpx; - display: inline-block; - background-color: #fff; - position: relative; - bottom: -8rpx; - } + .class_attr_title .title_icon { + border-radius: 50%; + width: 100rpx; + line-height: 64rpx; + display: inline-block; + vertical-align: middle; + padding-top: 10rpx; + padding-left: 20rpx; + text-align: center; + color: #fff; + } - .class_attr_title .arrow { - position: absolute; - top: 6rpx; - right: 30rpx; - font-size: 60rpx; - } + .class_attr_title i { + color: #2c6aa0 !important; + } - input::-webkit-input-placeholder { - font-size: 12rpx; - } + .class_attr_title .title_icon i { + font-size: 80rpx; + } - textarea { - width: 98%; - border: 1px solid #d5d5d5; - padding: 10rpx 8rpx 12rpx; - background: #FFF; - border-radius: 0 !important; - font-size: 34rpx; - font-family: inherit; - box-shadow: none !important; - transition-duration: 0.1s; - color: #046db3; - margin-top: 4px; - } + .class_attr_title .title { + padding-right: 22rpx; + display: inline-block; + background-color: #fff; + position: relative; + bottom: -8rpx; + } - input { - border: 1px solid #d5d5d5; - width: 98%; - height: 52rpx; - background: #FFF; - border-radius: 0 !important; - color: #046db3; - padding: 10rpx 8rpx 12rpx; - font-size: 34rpx; - font-family: inherit; - box-shadow: none !important; - transition-duration: 0.1s; - margin-top: 4rpx; - } + .class_attr_title .arrow { + position: absolute; + top: 6rpx; + right: 30rpx; + font-size: 60rpx; + } - .select { - width: 20px; - position: absolute; - opacity: 0; - } + input::-webkit-input-placeholder { + font-size: 12rpx; + } - .class_attr_body .form-group { - margin: 20rpx 30rpx; - /* margin-left: -12px; + textarea { + width: 98%; + border: 1px solid #d5d5d5; + padding: 10rpx 8rpx 12rpx; + background: #FFF; + border-radius: 0 !important; + font-size: 34rpx; + font-family: inherit; + box-shadow: none !important; + transition-duration: 0.1s; + color: #046db3; + margin-top: 4px; + } + + input { + border: 1px solid #d5d5d5; + width: 98%; + height: 52rpx; + background: #FFF; + border-radius: 0 !important; + color: #046db3; + padding: 10rpx 8rpx 12rpx; + font-size: 34rpx; + font-family: inherit; + box-shadow: none !important; + transition-duration: 0.1s; + margin-top: 4rpx; + } + + .select { + width: 20px; + position: absolute; + opacity: 0; + } + + .class_attr_body .form-group { + margin: 20rpx 30rpx; + /* margin-left: -12px; margin-right: -12px; */ - } + } - .form-group>label[class*="col-"] { - margin-bottom: 8rpx; - font-size: 32rpx; - } + .form-group>label[class*="col-"] { + margin-bottom: 8rpx; + font-size: 32rpx; + } - .form-group label { - vertical-align: middle; - line-height: 60rpx; - } + .form-group label { + vertical-align: middle; + line-height: 60rpx; + } - .no-padding-right { - padding-right: 0 !important; - } + .no-padding-right { + padding-right: 0 !important; + } - .col-xs-12 { - width: 100%; - } + .col-xs-12 { + width: 100%; + } - .tx_title { - font-size: 32rpx; - } + .tx_title { + font-size: 32rpx; + } - .tx_title2 { - font-size: 32rpx; - text-align: right; - display: inline-block; - vertical-align: -2px; - } + .tx_title2 { + font-size: 32rpx; + text-align: right; + display: inline-block; + vertical-align: -2px; + } - .text-right { - margin-right: 20rpx; - margin-top: -6rpx; - display: inline-block; - float: right; - font-size: 48rpx; - } + .text-right { + margin-right: 20rpx; + margin-top: -6rpx; + display: inline-block; + float: right; + font-size: 48rpx; + } - .text-right a, - .text-right2 a { - color: #337ab7; - } + .text-right a, + .text-right2 a { + color: #337ab7; + } - .text-right2 { - margin: 0; - vertical-align: -4px; - margin-left: 9px; - float: none; - font-size: 48rpx; - display: inline-block; - } + .text-right2 { + margin: 0; + vertical-align: -4px; + margin-left: 9px; + float: none; + font-size: 48rpx; + display: inline-block; + } - .section_iput { - border: 1px solid #d5d5d5; - width: 98%; - height: 62rpx; - background: #FFF; - border-radius: 0 !important; - color: #046db3; - padding: 10rpx 8rpx 10rpx; - font-size: 34rpx; - font-family: inherit; - box-shadow: none !important; - transition-duration: 0.1s; - } + .section_iput { + border: 1px solid #d5d5d5; + width: 98%; + height: 62rpx; + background: #FFF; + border-radius: 0 !important; + color: #046db3; + padding: 10rpx 8rpx 10rpx; + font-size: 34rpx; + font-family: inherit; + box-shadow: none !important; + transition-duration: 0.1s; + } - .date_iput { - border: 1px solid #d5d5d5; - /* width: 98%; */ - height: 62rpx; - background: #FFF; - border-radius: 0 !important; - color: #046db3; - padding: 10rpx 8rpx 4rpx; - font-size: 34rpx; - font-family: inherit; - box-shadow: none !important; - transition-duration: 0.1s; - } + .date_iput { + border: 1px solid #d5d5d5; + /* width: 98%; */ + height: 62rpx; + background: #FFF; + border-radius: 0 !important; + color: #046db3; + padding: 10rpx 8rpx 4rpx; + font-size: 34rpx; + font-family: inherit; + box-shadow: none !important; + transition-duration: 0.1s; + } - button.btn_add { - width: 49.5%; - margin-top: 50rpx; - padding: 20rpx; - line-height: 1.5; - background: #27A6E1; - border: none; - color: #fff; - font-size: 38rpx; - font-weight: bold; - float: right; - display: inline-block; - } + button.btn_add { + width: 49.5%; + margin-top: 50rpx; + padding: 20rpx; + line-height: 1.5; + background: #27A6E1; + border: none; + color: #fff; + font-size: 38rpx; + font-weight: bold; + float: right; + display: inline-block; + } - button.btn_cancel { - width: 49.5%; - margin-top: 50rpx; - padding: 20rpx; - line-height: 1.5; - background: #27A6E1; - border: none; - color: #fff; - font-size: 38rpx; - font-weight: bold; - float: left; - display: inline-block; - } + button.btn_cancel { + width: 49.5%; + margin-top: 50rpx; + padding: 20rpx; + line-height: 1.5; + background: #27A6E1; + border: none; + color: #fff; + font-size: 38rpx; + font-weight: bold; + float: left; + display: inline-block; + } - .i_tishi { - color: red; - vertical-align: sub; - font-style: initial; - margin-left: 20rpx; - font-size: 17px; - } + .i_tishi { + color: red; + vertical-align: sub; + font-style: initial; + margin-left: 20rpx; + font-size: 17px; + } - .attr_field { - display: inline-block; - vertical-align: middle; - margin-left: 8px; - /* width: 71%; */ - } + .attr_field { + display: inline-block; + vertical-align: middle; + margin-left: 8px; + /* width: 71%; */ + } - .input_vallist { - max-height: 350rpx; - overflow-y: auto; - display: none; - } + .input_vallist { + max-height: 350rpx; + overflow-y: auto; + display: none; + } - .input_vallist ul { - /* border: 1px solid red; */ - padding: 0 20rpx; - } + .input_vallist ul { + /* border: 1px solid red; */ + padding: 0 20rpx; + } - .input_vallist ul li { - list-style: none; - padding: 20rpx; - border-bottom: 1px solid #ccc; - } + .input_vallist ul li { + list-style: none; + padding: 20rpx; + border-bottom: 1px solid #ccc; + } - .input_vallist ul li a { - float: right; - } + .input_vallist ul li a { + float: right; + } - .input_vallist ul li a i { - font-size: 45rpx; - } + .input_vallist ul li a i { + font-size: 45rpx; + } - .view-popup { - position: relative; - } + .view-popup { + position: relative; + } - .popup-content { - @include flex; - align-items: center; - justify-content: center; - padding: 30rpx; - background-color: #fff; - /* height: 150px; */ - /* border: 1px solid red; */ - } + .popup-content { + @include flex; + align-items: center; + justify-content: center; + padding: 30rpx; + background-color: #fff; + /* height: 150px; */ + /* border: 1px solid red; */ + } - .popup-cont { - overflow-y: auto; - /* border: 1px solid red; */ - } + .popup-cont { + overflow-y: auto; + /* border: 1px solid red; */ + } - .popup-height { - @include height; - /* width: 200px; */ - } + .popup-height { + @include height; + /* width: 200px; */ + } - .popup-header { - font-size: 42rpx; - font-weight: bold; - margin: 20rpx 20rpx 0px 20rpx; - } + .popup-header { + font-size: 42rpx; + font-weight: bold; + margin: 20rpx 20rpx 0px 20rpx; + } - .view_popup_CheckList { - margin-bottom: 20rpx; - } + .view_popup_CheckList { + margin-bottom: 20rpx; + } - .popup-footer { - float: right; - position: absolute; - bottom: 0; - right: 20rpx; - } + .popup-footer { + float: right; + position: absolute; + bottom: 0; + right: 20rpx; + } - button.btn_popup_add { - width: 180rpx; - margin-top: 50rpx; - margin-right: 20rpx; - padding: 15rpx; - line-height: 1.5; - background: #27A6E1; - border: none; - color: #fff; - font-size: 38rpx; - font-weight: bold; - /* float: left; */ - display: inline-block; - } + button.btn_popup_add { + width: 180rpx; + margin-top: 50rpx; + margin-right: 20rpx; + padding: 15rpx; + line-height: 1.5; + background: #27A6E1; + border: none; + color: #fff; + font-size: 38rpx; + font-weight: bold; + /* float: left; */ + display: inline-block; + } - button.btn_popup_cancel { - width: 180rpx; - margin-top: 50rpx; - padding: 15rpx; - line-height: 1.5; - background: #27A6E1; - border: none; - color: #fff; - font-size: 38rpx; - font-weight: bold; - /* float: right; */ - display: inline-block; - } -</style> -<style> - .touch-item { - background-color: #F8F9FC; - display: flex; - justify-content: space-between; - width: 100%; - overflow: hidden - } + button.btn_popup_cancel { + width: 180rpx; + margin-top: 50rpx; + padding: 15rpx; + line-height: 1.5; + background: #27A6E1; + border: none; + color: #fff; + font-size: 38rpx; + font-weight: bold; + /* float: right; */ + display: inline-block; + } - .itemcontent { - display: flex; - flex-direction: column; - padding: 5px 10px; - border-bottom: 1px solid #eeeeee; - margin-right: 0; - margin-left: -100px; - width: 100%; - -webkit-transition: all 0.4s; - transition: all 0.4s; - -webkit-transform: translateX(100px); - transform: translateX(100px); - position: relative; - } - .itembtn { - width: 100px; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - background-color: #119bf8; - color: white; - position: relative; - -webkit-transform: translateX(100px); - transform: translateX(100px); - -webkit-transition: all 0.4s; - transition: all 0.4s; - } + .touch-item { + background-color: #F8F9FC; + display: flex; + justify-content: space-between; + width: 100%; + overflow: hidden + } - .touch-move-active .itemcontent, - .touch-move-active .itembtn { - -webkit-transform: translateX(0); - transform: translateX(0); + .itemcontent { + display: flex; + flex-direction: column; + padding: 5px 10px; + border-bottom: 1px solid #eeeeee; + margin-right: 0; + margin-left: -100px; + width: 100%; + -webkit-transition: all 0.4s; + transition: all 0.4s; + -webkit-transform: translateX(100px); + transform: translateX(100px); + position: relative; + } + + .itembtn { + width: 100px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background-color: #119bf8; + color: white; + position: relative; + -webkit-transform: translateX(100px); + transform: translateX(100px); + -webkit-transition: all 0.4s; + transition: all 0.4s; + } + + .touch-move-active .itemcontent, + .touch-move-active .itembtn { + -webkit-transform: translateX(0); + transform: translateX(0); + } } </style> \ No newline at end of file diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue index 6c5084d..2ddbb08 100644 --- a/pages/modal/3018_2.vue +++ b/pages/modal/3018_2.vue @@ -1,125 +1,138 @@ <template> <view class="uni-page-modal-3018-2"> - <!-- 琛ㄥご鏍峰紡 --> - <uni-forms ref="baseForm" label-align="right"> - <view class="v-headStyle" v-for="(item,index) in head_styledef.form.items"> - <!-- 鏅�甯冨眬 --> - <uni-forms-item class="head-form" 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" - :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"> - <text v-if="item.setting.prefix" class="uni-icon" :class="[item.setting.prefix]" - @change="classAttr_extButton(item)"></text> - <input class="uni-input" :class="item.disabled?'input-disabled':''" - :type="item.name=='Input'?'text':item.name=='InputNumber'?'number':'text'" - 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)" /> - <text v-if="item.setting.suffix" class="uni-icon" :class="[item.setting.suffix]" - @click="classAttr_extButton(item)"></text> - </view> - <!-- 澶氳鏂囨湰 --> - <view class="input-wrapper" v-if="item.name=='Textarea' && !item.disabled"> - <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" style="height:60px;" - :style="{'width':'96%'}" :disabled="item.disabled"></textarea> + <view class="view-content"> + <!-- 琛ㄥご鏍峰紡 --> + <uni-forms ref="baseForm" label-align="right"> + <view class="v-headStyle" v-for="(item,index) in head_styledef.form.items"> + <!-- 鏅�甯冨眬 --> + <uni-forms-item class="head-form" 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" + :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"> + <text v-if="item.setting.prefix" class="uni-icon" :class="[item.setting.prefix]" + @change="classAttr_extButton(item)"></text> + <input class="uni-input" :class="item.disabled?'input-disabled':''" + :type="item.name=='Input'?'text':item.name=='InputNumber'?'number':'text'" + 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)" /> + <text v-if="item.setting.suffix" class="uni-icon" :class="[item.setting.suffix]" + @click="classAttr_extButton(item)"></text> + </view> + <!-- 澶氳鏂囨湰 --> + <view class="input-wrapper" v-if="item.name=='Textarea' && !item.disabled"> + <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" + style="height:60px;" :style="{'width':'96%'}" :disabled="item.disabled"></textarea> - </view> - <!-- 澶嶉�妗�--> - <checkbox-group class="check_rememberPwd" v-if="item.name=='Checkbox'" - :class="item.disabled?'input-disabled':''" @change="onModelValue(item)" - :disabled="item.disabled" :data-ischeck="item.value"> - <label> - <checkbox :value="item.value" :checked="item.value" /> - <text>{{item.label}}</text> - </label> - </checkbox-group> - <!-- Switch寮�叧 --> - <switch class="input-switch" v-if="item.name=='Switch'" :class="item.disabled?'input-disabled':''" - :disabled="item.disabled" v-model="item.value" @change="onModelValue(item)" /> - <!-- 鏃ユ湡鏃堕棿 --> - <view class="input-wrapper" - v-if="(item.name=='TimePicker' || item.name=='DatePicker') && !item.disabled"> - <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> - </picker> - </view> - </uni-forms-item> - <!-- 鏍呮牸甯冨眬 --> - <uni-row class="demo-uni-row" v-if="item.name=='Layout' && item.show==true"> - <uni-col v-for="(cols,key) in item.setting.colList" - :span="item.setting.spanList?item.setting.spanList[key]:24 / item.setting.col"> - <uni-forms-item class="head-form" v-if="cols!=null" :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"> - <text v-if="cols.setting.prefix" class="uni-icon" :class="[cols.setting.prefix]" - @change="onchange(cols)"></text> - <input class="uni-input" :class="cols.disabled?'input-disabled':''" - :type="cols.name=='Input'?'text':cols.name=='InputNumber'?'number':'text'" - 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)" /> - <text v-if="cols.setting.suffix" class="uni-icon" :class="[cols.setting.suffix]" - @click="onchange(cols)"></text> - </view> - <!-- 涓嬫媺妗�鍗曢� cols.useDict?cols.dict:cols.selections--> - <uni-data-select id="dv_select" v-if="cols.name=='Select' && !cols.disabled" - :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"> - <textarea class="uni-input" :value="cols.value" - :class="cols.disabled?'input-disabled':''" :placeholder="cols.placeholder" - :focus="focusFieldId == cols.fieldId" @blur="onModelValue(cols)" - @click="onClick(cols)" style="height:60px;" :style="{'width':'96%'}" - :disabled="cols.disabled"></textarea> - </view> - <!-- 澶嶉�妗�--> - <checkbox-group class="check_rememberPwd" v-if="cols.name=='Checkbox'" - :class="cols.disabled?'input-disabled':''" :disabled="item.disabled" - @change="onModelValue(cols)" :data-ischeck="cols.value" - :style="{'margin-left':'10rpx'}"> - <label> - <checkbox :value="cols.value" :checked="cols.value" /> - <text>{{cols.label}}</text> - </label> - </checkbox-group> - <!-- Switch寮�叧 --> - <switch v-if="cols.name=='Switch'" :class="cols.disabled?'input-disabled':''" - :disabled="item.disabled" v-model="cols.value" @change="onModelValue(cols)" - :style="{'margin-left':'10rpx'}" /> - <!-- 鏃ユ湡鏃堕棿 --> - <view class="input-wrapper" - v-if="(cols.name=='TimePicker' || cols.name=='DatePicker') && !cols.disabled"> - <picker mode="date" class="date_iput" :class="cols.disabled?'input-disabled':''" - :disabled="item.disabled" :value="cols.value" @change="onModelValue(cols)"> - <view class="picker">{{cols.value}}</view> - </picker> - </view> + </view> + <!-- 澶嶉�妗�--> + <checkbox-group class="check_rememberPwd" v-if="item.name=='Checkbox'" + :class="item.disabled?'input-disabled':''" @change="onModelValue(item)" + :disabled="item.disabled" :data-ischeck="item.value"> + <label> + <checkbox :value="item.value" :checked="item.value" /> + <text>{{item.label}}</text> + </label> + </checkbox-group> + <!-- Switch寮�叧 --> + <switch class="input-switch" v-if="item.name=='Switch'" + :class="item.disabled?'input-disabled':''" :disabled="item.disabled" v-model="item.value" + @change="onModelValue(item)" /> + <!-- 鏃ユ湡鏃堕棿 --> + <view class="input-wrapper" + v-if="(item.name=='TimePicker' || item.name=='DatePicker') && !item.disabled"> + <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> + </picker> + </view> + </uni-forms-item> + <!-- 鏍呮牸甯冨眬 --> + <uni-row class="demo-uni-row" v-if="item.name=='Layout' && item.show==true"> + <uni-col v-for="(cols,key) in item.setting.colList" + :span="item.setting.spanList?item.setting.spanList[key]:24 / item.setting.col"> + <uni-forms-item class="head-form" v-if="cols!=null" :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"> + <text v-if="cols.setting.prefix" class="uni-icon" :class="[cols.setting.prefix]" + @change="onchange(cols)"></text> + <input class="uni-input" :class="cols.disabled?'input-disabled':''" + :type="cols.name=='Input'?'text':cols.name=='InputNumber'?'number':'text'" + 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)" /> + <text v-if="cols.setting.suffix" class="uni-icon" :class="[cols.setting.suffix]" + @click="onchange(cols)"></text> + </view> + <!-- 涓嬫媺妗�鍗曢� cols.useDict?cols.dict:cols.selections--> + <uni-data-select id="dv_select" v-if="cols.name=='Select' && !cols.disabled" + :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"> + <textarea class="uni-input" :value="cols.value" + :class="cols.disabled?'input-disabled':''" :placeholder="cols.placeholder" + :focus="focusFieldId == cols.fieldId" @blur="onModelValue(cols)" + @click="onClick(cols)" style="height:60px;" :style="{'width':'96%'}" + :disabled="cols.disabled"></textarea> + </view> + <!-- 澶嶉�妗�--> + <checkbox-group class="check_rememberPwd" v-if="cols.name=='Checkbox'" + :class="cols.disabled?'input-disabled':''" :disabled="item.disabled" + @change="onModelValue(cols)" :data-ischeck="cols.value" + :style="{'margin-left':'10rpx'}"> + <label> + <checkbox :value="cols.value" :checked="cols.value" /> + <text>{{cols.label}}</text> + </label> + </checkbox-group> + <!-- Switch寮�叧 --> + <switch v-if="cols.name=='Switch'" :class="cols.disabled?'input-disabled':''" + :disabled="item.disabled" v-model="cols.value" @change="onModelValue(cols)" + :style="{'margin-left':'10rpx'}" /> + <!-- 鏃ユ湡鏃堕棿 --> + <view class="input-wrapper" + v-if="(cols.name=='TimePicker' || cols.name=='DatePicker') && !cols.disabled"> + <picker mode="date" class="date_iput" :class="cols.disabled?'input-disabled':''" + :disabled="item.disabled" :value="cols.value" @change="onModelValue(cols)"> + <view class="picker">{{cols.value}}</view> + </picker> + </view> - </uni-forms-item> - </uni-col> - </uni-row> + </uni-forms-item> + </uni-col> + </uni-row> + </view> + </uni-forms> + </view> + <view class="view-bottom"> + <view class="uni-padding-wrap" v-if="dropdownBtns.length>0"> + <view class="uni-btn-v"> + <a @tap="clickDropdownBtns"> + <Icon class="mobox-normal-more" /> + </a> + </view> </view> - </uni-forms> - <view class="view-floor"> - <button type="default" @tap="sava" class="btn_add">{{title}}</button> + <button type="default" @tap="sava" class="btn_add" v-if="dropdownBtns.length==0">{{title}}</button> <button type="default" @tap="cancel" class="btn_cancel">{{translateSys('cancel')}}</button> + </view> <!-- 鏅�寮圭獥 top bottom center left right --> <view> @@ -239,6 +252,12 @@ this.$data.title = this.$data.param.Add_BtnName ? this.$data.param.Add_BtnName : options .titlename; //璁剧疆鎸夐挳鏂囧瓧 this.loadData(options.paramValue) + }, + computed: { + dropdownBtns() { + const btns = this.head_styledef.button || []; + return btns + }, }, methods: { @@ -1821,6 +1840,168 @@ }); }); }, + //鐐瑰嚮鎸夐挳鍒楄〃 + clickDropdownBtns() { + var that = this + var itemlist = []; + this.dropdownBtns.forEach((btn) => { + itemlist.push(btn.ShowName); + }); + uni.showActionSheet({ + // title: '鎸夐挳鍒楄〃', + itemList: itemlist, + success: (e) => { + console.log(e.tapIndex); + var btn = that.dropdownBtns[e.tapIndex]; + that.onButtonClicked(btn); + } + }) + }, + onButtonClicked(btn) { + let enviroment = { + button: "top", + button_name: btn.ShowName, + cls_id: btn.Cls_ID, + function: "3018", + master: {}, + }; + console.log("onBtnClick", btn); + if (btn.FunCode == "Add") { + if (btn.Edit_dlg.Model == "small") { + this.showAddSmallDialog(btn, enviroment); + } else { + uni.showModal({ + title: this.translateSys("tip"), + content: this.translateSys("unrealized"), + showCancel: false, + confirmText: this.translateSys("cancel") + }); + } + } else if (btn.FunCode == "TriggerEvent") { + this.onTriggerEvent(btn, enviroment); + } else { + this.$Message.warning(this.$t("sys.unrealized")); + } + }, + onTriggerEvent(btn, enviroment) { + var obj_attr = this.head_styledef.form.model; + // console.log(obj_attr); + var input_param = { + id: "", + attrs: Object.keys(obj_attr).map((a) => ({ + attr: a, + value: obj_attr[a], + })), + }; + + var dataInfo = { + ed_type: "0", + start_transaction: true, + class_id: btn.Cls_ID, + class_name: '', + event_id: btn.Event.ID, + event_name: '', + data_obj_id: '', + obj_attr: obj_attr, + prj_id: '', + ref_cls_id: '', + rel_obj_id: '', + user_login: '', + data_json: '', + compose_info: '', + input_param: '', + }; + console.log(dataInfo); + // return; + this.$store.dispatch('runCustomEvent', dataInfo).then(success => { + console.log(success); + if (success.err_code == 0) { + var data = success.result; + if (data.ret != 0) { + var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : + data + .err_info.join('<br/>') : ''; + if (data.ret == 801) { + if (this.param.Only_Script_Error) { + let pos = tip.indexOf("锛�); + if (pos > -1) tip = tip.substring(pos + 1); + } + uni.showModal({ + title: this.translateSys("tip"), + content: tip, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + } else uni.showModal({ + title: this.translateSys("tip"), + content: tip + ',' + this.translateSys('tip') + ':' + data.ret, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + return false + } else { + var tip = data.info ? typeof data.info == 'string' ? data.info : data.info + .join( + '<br/>') : ''; + if (tip) uni.showModal({ + title: this.translateSys("tip"), + content: tip, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + + var result = data.result; + + } + } else { + uni.showModal({ + title: this.translateSys("error") + "7", + content: success.err_msg, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + } + }).catch(ex => { + // console.log(ex); + uni.showModal({ + title: this.translateSys('tip') + "7.1", + content: ex.errMsg, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + }); + + }, + //鏂板淇敼灏忕獥鍙f暟鎹�+ showAddSmallDialog(btn, enviroment) { + var data = { + Add_BtnName: btn.ShowName, + EditDlgMode: btn.Edit_dlg.Model, + clsid: btn.Cls_ID, + cls_name: btn.Cls_Name, + Edit_dlg: btn.Edit_dlg + }; + const url = '../modal/3018?param=' + JSON.stringify(data) + "&titlename=" + btn.Edit_dlg.Name + + "&type=addDataObj" + console.log("showAddSmallDialog", url); + var $this = this; + uni.navigateTo({ + url: url, + events: { + // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�鍒板綋鍓嶉〉闈㈢殑鏁版嵁 + addDataObj: function(resData) { + console.log(resData); + //鍒锋柊 + if (!this.$data.param.After_Btn_Not_Refresh) { + uni.redirectTo({ + url: '../modal/3018_2?param=' + JSON.stringify(this.$data.param) + + "&titlename=" + this.$data.title + }); + } + }, + } + }); + }, cancel(e) { //鍙栨秷 uni.navigateBack({ @@ -1864,69 +2045,27 @@ width: 98%; } - // .v-headStyle:first-child { - // margin-top: 15rpx; - // } - - // .v-headStyle .txt_title { - // font-size: 34rpx; - // text-align: right; - // display: inline-block; - // /* vertical-align: 24rpx; */ - - // /* border: 0.1rpx solid red; */ - // } - - // .v-headStyle input { - // vertical-align: middle; - // display: inline-block; - // /* border: 1px solid #d5d5d5; */ - // /* width: 65%; */ - // width: 85%; - // height: 52rpx; - // line-height: 34rpx; - // background: #FFF; - // border-radius: 0 !important; - // color: #2d8cf0; - // padding: 10rpx 8rpx 12rpx; - // font-size: 34rpx; - // font-family: inherit; - // box-shadow: none !important; - // transition-duration: 0.1s; - // margin-top: 4rpx; - // } - - // .v-headStyle input::-webkit-input-placeholder { - // font-size: 12rpx; - // } - .v-headStyle .head-form { // border: 0.5px solid red; margin-bottom: 11rpx; } + .v-headStyle .form-item-span { // border: 0.5px solid red; - padding:7rpx 0; + padding: 7rpx 0; color: #2d8cf0; white-space: normal; word-break: break-all; display: inline-block; // width: calc(100% - 100px); } - - // .input-wrapper { - // border: 1px solid #d5d5d5; - // display: inline-block; - // width: 100%; - // line-height: 22rpx; - // vertical-align: middle; - // } + .input-wrapper { border: 1px solid #d5d5d5; width: 100%; display: flex; flex-direction: row; - + .uni-input { color: #2d8cf0; flex: 1; @@ -1934,7 +2073,7 @@ // height: 40rpx; // line-height: 40rpx; } - + .uni-icon { padding: 8rpx; font-size: 32rpx; @@ -1954,9 +2093,6 @@ box-sizing: border-box; } - .uni-input { - /* border: none; */ - } .uni-icon { /* border: 1px solid red; */ @@ -1974,43 +2110,68 @@ vertical-align: middle; } - - .view-content { - min-height: 700rpx; - /* border:1px solid red; */ - } - .input-disabled { background-color: #f3f3f3 !important; } - button.btn_add { - width: 49.5%; - margin-top: 50rpx; - padding: 20rpx; - line-height: 1.5; - background: #4D6AF4; - border: none; - color: #fff; - font-size: 38rpx; - font-weight: bold; - float: right; - display: inline-block; + .view-content { + display: flex; + flex: 1; + width: calc(100% - 30rpx); + padding: 10rpx 15rpx; + flex-direction: column; + overflow-y: auto; + } - button.btn_cancel { - width: 49.5%; - margin-top: 50rpx; - padding: 20rpx; - line-height: 1.5; - background: #fff; - border: none; - color: #000; - font-size: 38rpx; - font-weight: bold; - float: left; - display: inline-block; + .view-bottom { + // display: flex; + // flex-direction: row; + display: block; + width: calc(100% - 30rpx); + padding: 10rpx 15rpx 20rpx 15rpx; + + .btn_add { + width: 45%; + margin: 0 10rpx; + // padding: 5rpx 10rpx; + background: #4D6AF4; + border: none; + color: #fff; + float: left; + display: inline-block; + } + + .btn_cancel { + width: 45%; + 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; + background-color: #98DAEA; + width: 104rpx; + height: 80rpx; + text-align: center; + border-radius: 54rpx; + padding: 24rpx 0 0 0; + float: right; + display: inline-block; + } + + .uni-padding-wrap a { + font-size: 40rpx; + } } + + + .view-popup { position: relative; @@ -2222,9 +2383,8 @@ /* line-height: 22rpx; */ } - .view-floor { - padding: 0 20rpx; - } + + .demo-uni-row { margin-bottom: 0px; diff --git a/pages/modal/3200.vue b/pages/modal/3200.vue index e634791..1df943b 100644 --- a/pages/modal/3200.vue +++ b/pages/modal/3200.vue @@ -300,10 +300,11 @@ if (this.param.ListPage.ListItem_UIDef?.ui_type == "HTML椤甸潰") { // HTML椤甸潰 //鑾峰彇鏁版嵁绫荤殑HTML椤甸潰 - await this.Html_UIstyleGetInfo(this.param.DataCls.id, this.param.ListPage.ListItem_UIDef.id,options.paramValue); + await this.Html_UIstyleGetInfo(this.param.DataCls.id, this.param.ListPage.ListItem_UIDef.id, options + .paramValue); } else { await this.Detail1_UIstyleGetInfo(this.param.DataCls.id, this.param.ListPage.ListItem_UIDef.id); - + await this.initial(options.paramValue); } // this.isFilter=true; @@ -533,7 +534,7 @@ // console.log(styledef); $this.ListPageHtml_Show = ret.result.style_def ? JSON.parse(styledef) : {}; // console.log($this.ListPageHtml_Show); - + $this.initial(paramValue); } else { uni.showModal({ @@ -993,6 +994,13 @@ if (btn.FunCode == "Add" || btn.FunCode == "Modify") { if (btn.Edit_dlg.Model == "small") { this.showAddSmallDialog(btn, style, enviroment); + } else { + uni.showModal({ + title: this.translateSys("tip"), + content: this.translateSys("unrealized"), + showCancel: false, + confirmText: this.translateSys("cancel") + }); } } else if (btn.FunCode == "Delete") { this.DeleteObj(btn, style, enviroment); @@ -1242,7 +1250,7 @@ if ((success.result || []).length > 0) { const app = success.result[0] var param = ""; - var appName = app.name || app.list_name + var appName = app.list_name || app.name .Name; var paramStr = app.param if (paramStr) { -- Gitblit v1.9.1