| | |
| | | /* line-height: 30rpx; */ |
| | | padding: 5rpx 0; |
| | | } |
| | | |
| | | .v-headStyle:first-child{ |
| | | margin-top: 15rpx; |
| | | } |
| | | |
| | | .v-headStyle .txt_title{ |
| | | font-size: 34rpx; |
| | | text-align: right; |
| | |
| | | |
| | | /* border: 0.1rpx solid red; */ |
| | | } |
| | | |
| | | .v-headStyle input{ |
| | | vertical-align: middle; |
| | | display: inline-block; |
| | |
| | | transition-duration: 0.1s; |
| | | margin-top: 4rpx; |
| | | } |
| | | |
| | | .v-headStyle input::-webkit-input-placeholder { |
| | | font-size: 12rpx; |
| | | } |
| | | |
| | | .v-headStyle .form-item-span{ |
| | | /* vertical-align:top; */ |
| | | color: #2d8cf0; |
| | |
| | | |
| | | /* border: 0.1rpx solid red; */ |
| | | } |
| | | |
| | | .input-wrapper{ |
| | | border: 1px solid #d5d5d5; |
| | | display: inline-block; |
| | |
| | | line-height: 22rpx; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .check_rememberPwd, |
| | | .input-switch{ |
| | | vertical-align: middle; |
| | | margin-left:10rpx |
| | | } |
| | | |
| | | [nvue] uni-view { |
| | | position: relative; |
| | | border: 0 solid #000; |
| | |
| | | .uni-input { |
| | | /* border: none; */ |
| | | } |
| | | |
| | | .uni-icon{ |
| | | /* border: 1px solid red; */ |
| | | width: 8%; |
| | |
| | | .input-disabled{ |
| | | background-color: #f3f3f3 !important; |
| | | } |
| | | |
| | | button.btn_add { |
| | | width:49.5%; |
| | | margin-top: 50rpx; |
| | |
| | | float: right; |
| | | display: inline-block; |
| | | } |
| | | |
| | | button.btn_cancel { |
| | | width:49.5%; |
| | | margin-top: 50rpx; |
| | |
| | | float: left; |
| | | display: inline-block; |
| | | } |
| | | |
| | | .view-popup{ |
| | | position:relative; |
| | | } |
| | | |
| | | .popup-content { |
| | | @include flex; |
| | | align-items: center; |
| | |
| | | /* height: 150px; */ |
| | | /* border: 1px solid red; */ |
| | | } |
| | | |
| | | .popup-cont { |
| | | overflow-y: auto; |
| | | /* border: 1px solid red; */ |
| | | } |
| | | |
| | | .popup-height { |
| | | @include height; |
| | | /* width: 200px; */ |
| | | } |
| | | |
| | | .popup-header{ |
| | | font-size: 42rpx; |
| | | font-weight: bold; |
| | | margin:20rpx 20rpx 0px 20rpx; |
| | | } |
| | | |
| | | .view_popup_CheckList{ |
| | | margin-bottom: 20rpx; |
| | | } |
| | | |
| | | .popup-footer{ |
| | | float: right; |
| | | position:absolute; |
| | | bottom:0; |
| | | right:20rpx; |
| | | } |
| | | |
| | | button.btn_popup_add { |
| | | width:180rpx; |
| | | margin-top: 50rpx; |
| | |
| | | /* float: left; */ |
| | | display: inline-block; |
| | | } |
| | | |
| | | button.btn_popup_cancel { |
| | | width:180rpx; |
| | | margin-top: 50rpx; |
| | |
| | | /* float: right; */ |
| | | display: inline-block; |
| | | } |
| | | |
| | | #dv_select{ |
| | | display: inline-block; |
| | | width: 66%; |
| | |
| | | /* vertical-align: 10px; */ |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | #dv_select .uni-select{ |
| | | border: 1px solid #ccc; |
| | | border-radius: 0 !important; |
| | | color: #2d8cf0; |
| | | } |
| | | |
| | | #dv_select .uni-select__input-text{ |
| | | color: #2d8cf0; |
| | | } |
| | |
| | | text-align: center; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .v-panel{ |
| | | min-height:788rpx; |
| | | } |
| | | |
| | | .v-panellist{ |
| | | border:4rpx solid #aaa; |
| | | border-radius: 10rpx; |
| | | margin: 10rpx 20rpx 0rpx 20rpx; |
| | | } |
| | | |
| | | .v-paneldel{ |
| | | text-align: right; |
| | | } |
| | | |
| | | .panel_del{ |
| | | font-size: 44rpx; |
| | | text-decoration: initial; |
| | | margin-top: 10rpx; |
| | | margin-right: 20rpx; |
| | | } |
| | | |
| | | .class_attr_body .form-group { |
| | | margin: 20rpx 30rpx; |
| | | /* margin-left: -12px; |
| | | margin-right: -12px; */ |
| | | } |
| | | |
| | | .subclass_attr_body .form-group { |
| | | margin: 20rpx 10rpx; |
| | | /* margin-left: -12px; |
| | | margin-right: -12px; */ |
| | | } |
| | | |
| | | .form-group > label[class*="col-"] { |
| | | margin-bottom: 8rpx; |
| | | font-size: 32rpx; |
| | | } |
| | | |
| | | .form-group label { |
| | | vertical-align: middle; |
| | | line-height: 60rpx; |
| | | } |
| | | |
| | | .tx_title2{ |
| | | font-size: 32rpx; |
| | | text-align: right; |
| | | display: inline-block; |
| | | vertical-align: -2px; |
| | | } |
| | | |
| | | .attr_field{ |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | margin-left: 8px; |
| | | /* width: 71%; */ |
| | | } |
| | | |
| | | .text-right2 { |
| | | margin: 0; |
| | | vertical-align: -4px; |
| | |
| | | font-size: 44rpx; |
| | | display: inline-block; |
| | | } |
| | | |
| | | input::-webkit-input-placeholder { |
| | | font-size: 12rpx; |
| | | } |
| | | |
| | | .v-panel input{ |
| | | border: 1px solid #d5d5d5; |
| | | width: 98%; |
| | |
| | | transition-duration: 0.1s; |
| | | margin-top: 4rpx; |
| | | } |
| | | |
| | | .date_iput{ |
| | | /* border: 1px solid #d5d5d5; */ |
| | | /* width: 98%; */ |
| | |
| | | box-shadow: none !important; |
| | | transition-duration: 0.1s; |
| | | } |
| | | |
| | | .dv_input{ |
| | | display: inline-block; |
| | | width: 65%; |
| | | /* line-height: 22rpx; */ |
| | | } |
| | | |
| | | .view-floor{ |
| | | padding: 0 20rpx; |
| | | } |
| | |
| | | margin-bottom: 0px; |
| | | display: block; |
| | | } |
| | | |
| | | ::v-deep .uni-row { |
| | | margin-bottom: 0px; |
| | | } |
| | | |
| | | .view-tabpage ::v-deep .uni-row { |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | | .demo-uni-col { |
| | | height: 36px; |
| | | border-radius: 5px; |
| | | } |
| | | |
| | | .demo-uni-row .uni-input{ |
| | | width: calc(100% - 120px); |
| | | } |
| | | |
| | | .text { |
| | | font-size: 12px; |
| | | color: #666; |
| | | margin-top: 5px; |
| | | } |
| | | |
| | | // .uni-px-5 { |
| | | // margin: 0; |
| | | // display: inline-block; |
| | |
| | | :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> |
| | | :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> |
| | | <!-- 下拉框-多选 --> |
| | | <!-- <select-cy v-else-if="attr.select==true" :value="item.value" |
| | | :name="item.fieldId" |
| | |
| | | ></select-cy> --> |
| | | <!-- 文本框/数字框 --> |
| | | <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]" |
| | | <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" |
| | | :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="focusMateria" |
| | | @focus="ontap(item)" |
| | | @blur="onevent(item)" |
| | | /> |
| | | <text v-if="item.setting.suffix" |
| | | class="uni-icon" |
| | | :class="[item.setting.suffix]" |
| | | :focus="focusMateria" @focus="ontap(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" |
| | | :placeholder="item.placeholder" |
| | | @blur="onModelValue(item)" |
| | | :data-index="index" |
| | | style="height:60px;" |
| | | :style="{'width':'96%'}" |
| | | :disabled="item.disabled" |
| | | ></textarea> |
| | | :placeholder="item.placeholder" @blur="onModelValue(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" |
| | | :class="item.disabled?'input-disabled':''" @change="onModelValue(item)" :disabled="item.disabled" |
| | | :data-ischeck="item.value"> |
| | | <label> |
| | | <checkbox :value="item.value" :checked="item.value"/> |
| | |
| | | </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)" /> |
| | | :disabled="item.disabled" v-model="item.value" @change="onModelValue(item)" /> |
| | | <!-- 日期时间 --> |
| | | <view class="input-wrapper" v-if="(item.name=='TimePicker' || item.name=='DatePicker') && !item.disabled"> |
| | | <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)" |
| | | > |
| | | :disabled="item.disabled" :value="item.value" @change="onModelValue(item)"> |
| | | <view class="picker">{{item.value}}</view> |
| | | </picker> |
| | | </view> |
| | |
| | | <view v-if="cols!=null" > |
| | | <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]" |
| | | <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" |
| | | 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="focusMateria" |
| | | @focus="ontap(cols)" |
| | | @blur="onevent(cols)" |
| | | /> |
| | | <text v-if="cols.setting.suffix" |
| | | class="uni-icon" |
| | | :class="[cols.setting.suffix]" |
| | | :focus="focusMateria" @focus="ontap(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> |
| | | :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" |
| | | @blur="onModelValue(cols)" |
| | | style="height:60px;" |
| | | :style="{'width':'96%'}" |
| | | :disabled="cols.disabled" |
| | | ></textarea> |
| | | <textarea class="uni-input" :value="cols.value" :class="cols.disabled?'input-disabled':''" |
| | | :placeholder="cols.placeholder" @blur="onModelValue(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'}"> |
| | | :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> |
| | |
| | | </checkbox-group> |
| | | <!-- Switch开关 --> |
| | | <switch v-if="cols.name=='Switch'" :class="cols.disabled?'input-disabled':''" |
| | | :disabled="item.disabled" |
| | | v-model="cols.value" |
| | | @change="onModelValue(cols)" |
| | | :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"> |
| | | <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)" |
| | | > |
| | | :disabled="item.disabled" :value="cols.value" @change="onModelValue(cols)"> |
| | | <view class="picker">{{cols.value}}</view> |
| | | </picker> |
| | | </view> |
| | |
| | | :style="{'width':check_list.width?check_list.width+'px':'200px','height':check_list.height?check_list.height+'px':'88%'}"> |
| | | <view class="popup-cont" :style="{'height':check_list.height?check_list.height-45+'px':'415px'}"> |
| | | <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'}"> |
| | | <checkbox-group class="check_list" @change="checkChange" :data-ischeck="item.check" |
| | | :data-index="index" :style="{'margin-left': '10rpx'}"> |
| | | <label> |
| | | <checkbox :value="item.check" :checked="item.check"/> |
| | | <text>{{item.name}}</text> |
| | |
| | | items:[] |
| | | } |
| | | }, |
| | | after_ok: {}, |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | | // console.log(options); |
| | | uni.setNavigationBarTitle({ title: options.titlename}); //设置顶部标题 |
| | | uni.setNavigationBarTitle({ |
| | | title: options.titlename |
| | | }); //设置顶部标题 |
| | | this.$data.param = JSON.parse(options.param); |
| | | this.$data.title = this.$data.param.Add_BtnName?this.$data.param.Add_BtnName:options.titlename; //设置按钮文字 |
| | | |
| | |
| | | //mobox2的style_def是json字符串 |
| | | styledef = ret.result.style_def.replace(/\\/g,""); |
| | | //mobox3的style_def是base64字符串 |
| | | if(!ret.result.style_def.includes('"')) styledef = Base64.decode(ret.result.style_def); |
| | | if (!ret.result.style_def.includes('"')) styledef = Base64.decode(ret.result |
| | | .style_def); |
| | | } |
| | | $this.$data.head_styledef = ret.result.style_def? JSON.parse(styledef): {}; |
| | | // console.log($this.$data.head_styledef); |
| | |
| | | if($this.head_styledef.event?.length>0){ |
| | | $this.head_styledef.event.forEach(async (a)=>{ //判断是否是初始化事件 |
| | | if(a.event_id == "initial"){ |
| | | await this.loadInitEvent(a.scrip_id); |
| | | await $this.loadInitEvent(a.scrip_id); |
| | | } else if (a.event_id == 'after_ok') { |
| | | $this.after_ok = { |
| | | id: a.scrip_id, |
| | | name: a.scrip_name |
| | | }; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }else{ |
| | | uni.showModal({title:"错误1",content:ret.err_msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误1", |
| | | content: ret.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex=>{ |
| | | // console.log(ex); |
| | | uni.showModal({title:"错误1.1",content:ex.errMsg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误1.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | |
| | | } |
| | | |
| | | }else{ |
| | | uni.showModal({title:"错误1.2",content:success.err_msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误1.2", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex=>{ |
| | | // console.log(ex); |
| | | uni.showModal({title:"错误1.3",content:ex.errMsg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误1.3", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | async loadInitEvent(eventid){ |
| | |
| | | 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) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data |
| | | .err_info.join('<br/>') : ''; |
| | | if (data.ret == 801) uni.showModal({ |
| | | title: '提示', |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | else uni.showModal({ |
| | | title: '提示', |
| | | content: tip + ',提示:' + data.ret, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return false |
| | | }else{ |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join( |
| | | '<br/>') : ''; |
| | | if (tip) uni.showModal({ |
| | | title: '提示', |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | |
| | | var actionlist = data.action; |
| | | if (actionlist) { |
| | |
| | | var result = action.value; |
| | | for (var i = 0; i < result.length; i++) { |
| | | if (result[i].choice_list) { |
| | | for (var c = 0; c < $this.head_styledef.form.items.length; c++) { |
| | | for (var c = 0; c < $this.head_styledef.form.items |
| | | .length; c++) { |
| | | var attr = $this.head_styledef.form.items[c]; |
| | | if(attr.name!='Layout'){ |
| | | if(attr.fieldId==result[i].attr){ |
| | | var dictItemList=[]; |
| | | for(var d in result[i].choice_list){ |
| | | var val =result[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"text":val,"value":val}); |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "CN_S_VALUE": val, |
| | | "text": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr.dict = dictItemList; |
| | | } |
| | |
| | | if(col){ |
| | | if(col.fieldId==result[i].attr){ |
| | | var dictItemList=[]; |
| | | for(var d in result[i].choice_list){ |
| | | var val =result[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"text":val,"value":val}); |
| | | for (var d in result[i] |
| | | .choice_list) { |
| | | var val = result[i] |
| | | .choice_list[d]; |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "CN_S_VALUE": val, |
| | | "text": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | col.dict = dictItemList; |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | for (var c = 0; c < $this.$data.head_styledef.form.items.length; c++) { |
| | | for (var c = 0; c < $this.$data.head_styledef.form.items |
| | | .length; c++) { |
| | | var attr = $this.$data.head_styledef.form.items[c]; |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 |
| | | if($this.head_styledef.form.model[result[i].attr]==undefined){ |
| | | $this.head_styledef.form.model[result[i].attr]=result[i].value; |
| | | if ($this.head_styledef.form.model[result[i].attr] == |
| | | undefined) { |
| | | $this.head_styledef.form.model[result[i].attr] = result[i] |
| | | .value; |
| | | } |
| | | //判断是否是栅格表单 |
| | | if(attr.name!='Layout'){ |
| | |
| | | attr.oldvalue = ''; |
| | | attr.value = result[i].value; |
| | | attr.oldvalue = result[i].value; |
| | | $this.head_styledef.form.model[attr.fieldId] =result[i].value; |
| | | $this.head_styledef.form.model[attr.fieldId] = result[ |
| | | i].value; |
| | | } |
| | | } else if(attr.name=='Layout'){ |
| | | attr.setting.colList.forEach(col=>{ |
| | |
| | | col.oldvalue = ''; |
| | | col.value = result[i].value; |
| | | col.oldvalue = result[i].value; |
| | | $this.head_styledef.form.model[col.fieldId] =result[i].value; |
| | | $this.head_styledef.form.model[col |
| | | .fieldId] = result[i].value; |
| | | } |
| | | } |
| | | }); |
| | |
| | | } else if (data.action[i].action_type == 'set_dlg_attr_show') { |
| | | var result = action.value; |
| | | result.forEach(async (attr,key) => { |
| | | $this.$data.head_styledef.form.items.forEach(async (ele,index) => { |
| | | $this.$data.head_styledef.form.items.forEach(async ( |
| | | ele, index) => { |
| | | //判断是否是栅格表单 |
| | | if(ele.name!='Layout'){ |
| | | if(ele.fieldId==attr.attr){ |
| | | ele.show=attr.show; |
| | | } |
| | | } else if(ele.name=='Layout'){ |
| | | ele.setting.colList.forEach(col=>{ |
| | | ele.setting.colList.forEach( |
| | | col => { |
| | | if(col){ |
| | | if(col.fieldId==attr.attr){ |
| | | col.show=attr.show; |
| | | if (col.fieldId == |
| | | attr.attr) { |
| | | col.show = attr |
| | | .show; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | var head_styledef = JSON.parse(JSON.stringify($this.$data.head_styledef)); |
| | | var head_styledef = JSON.parse(JSON.stringify($this.$data |
| | | .head_styledef)); |
| | | $this.$data.head_styledef =[]; |
| | | $this.$data.head_styledef = head_styledef; |
| | | // console.log($this.$data.head_styledef); |
| | | } else { |
| | | uni.showModal({title:"提示",content:"执行初始化事件失败:"+item.action_type + '此action尚未处理!',showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "执行初始化事件失败:" + item.action_type + '此action尚未处理!', |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showModal({title:"错误3",content:"执行初始化事件失败:"+success.err_msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误3", |
| | | content: "执行初始化事件失败:" + success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex=>{ |
| | | // console.log(ex); |
| | | uni.showModal({title:"错误3.1",content:"执行初始化事件失败:"+ex.errMsg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误3.1", |
| | | content: "执行初始化事件失败:" + ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | ontap(item){ //扫码功能 |
| | | // uni.scanCode({ |
| | | // //成功回调 |
| | | // success: function (res) { |
| | | // //条码类型 |
| | | // console.log(res.scanType); |
| | | // //条码的值 |
| | | // console.log(res.result); |
| | | // },//失败回调 |
| | | // fail: function (res) {}, |
| | | // //完成回调 |
| | | // complete: function (res) {}, |
| | | // 打开蓝牙适配器 |
| | | // uni.openBluetoothAdapter({ |
| | | // success: function() { |
| | | // // 开始搜索蓝牙设备 |
| | | // uni.startBluetoothDevicesDiscovery({ |
| | | // success: function() { |
| | | // // 监听找到新设备的事件 |
| | | // uni.onBluetoothDeviceFound(function(devices) { |
| | | // // 这里可以过滤出RFID芯片,连接并读取数据 |
| | | // console.log(devices[0].deviceId); |
| | | // }) |
| | | |
| | | // } |
| | | // }) |
| | | // } |
| | | // }); |
| | | // 监听NFC功能是否可用 |
| | | // uni.getNFCAdapterState({ |
| | | // success: function(res) { |
| | | // console.log(res); |
| | | // if (res.errCode === 0) { |
| | | // // NFC功能可用,开始监听 |
| | | // uni.onNFCStart((res) => { |
| | | // if (res.errCode === 0) { |
| | | // // 开始NFC标签检测 |
| | | // uni.makeNFCReaderStart({ |
| | | // success: function() { |
| | | // // 监听NFC标签 |
| | | // uni.onNFCTagDiscovered(function(res) { |
| | | // console.log(res); |
| | | // // 这里可以处理NFC标签数据 |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | // }) |
| | | getApp().onScan((result)=>{ |
| | | //console.log(result.decodedata); |
| | | uni.hideKeyboard(); |
| | |
| | | var onSuffixClickEvent = item.bind.onSuffixClickEvent; //后图标点击回调 |
| | | |
| | | if(!onSuffixClickCallbackEvent.id){ |
| | | uni.showModal({title:"提示",content:"后图标点击事件为空!",showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "后图标点击事件为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return; |
| | | } |
| | | if(!onSuffixClickEvent.id){ |
| | | uni.showModal({title:"提示",content:"后图标点击回调为空!",showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "后图标点击回调为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return; |
| | | } |
| | | this.$data.popupType = 'right' |
| | |
| | | if(name) |
| | | name+=';'; |
| | | name+=items[i].name; |
| | | data.push({id:items[i].id,name:items[i].name}); |
| | | data.push({ |
| | | id: items[i].id, |
| | | name: items[i].name |
| | | }); |
| | | } |
| | | } |
| | | if(!$this.$data.popupParam){ |
| | | uni.showModal({title:"提示",content:"popupParam为空!",showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "popupParam为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return; |
| | | } |
| | | |
| | |
| | | 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) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data |
| | | .err_info.join('<br/>') : ''; |
| | | if (data.ret == 801) uni.showModal({ |
| | | title: '提示', |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | else uni.showModal({ |
| | | title: '提示', |
| | | content: tip + ',提示:' + data.ret, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return false |
| | | }else{ |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join( |
| | | '<br/>') : ''; |
| | | if (tip) uni.showModal({ |
| | | title: '提示', |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | |
| | | var actionlist = data.action; |
| | | if (actionlist) { |
| | |
| | | var dictItemList=[]; |
| | | for(var d in result[i].choice_list){ |
| | | var val =result[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"text":val,"value":val}); |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "CN_S_VALUE": val, |
| | | "text": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr.dict = dictItemList; |
| | | } |
| | |
| | | var dictItemList=[]; |
| | | for(var d in result[i].choice_list){ |
| | | var val =result[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"text":val,"value":val}); |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "CN_S_VALUE": val, |
| | | "text": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | col.dict = dictItemList; |
| | | } |
| | |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 |
| | | if($this.head_styledef.form.model[result[i].attr]==undefined){ |
| | | $this.head_styledef.form.model[result[i].attr]=result[i].value; |
| | | $this.head_styledef.form.model[result[i].attr] = result[i] |
| | | .value; |
| | | } |
| | | //判断是否是栅格表单 |
| | | if(attr.name!='Layout'){ |
| | |
| | | attr.oldvalue = ''; |
| | | attr.value = result[i].value; |
| | | attr.oldvalue = result[i].value; |
| | | $this.head_styledef.form.model[attr.fieldId] =result[i].value; |
| | | $this.head_styledef.form.model[attr.fieldId] = result[i] |
| | | .value; |
| | | } |
| | | } else if(attr.name=='Layout'){ |
| | | attr.setting.colList.forEach(col=>{ |
| | |
| | | col.oldvalue = ''; |
| | | col.value = result[i].value; |
| | | col.oldvalue = result[i].value; |
| | | $this.head_styledef.form.model[col.fieldId] =result[i].value; |
| | | $this.head_styledef.form.model[col |
| | | .fieldId] = result[i].value; |
| | | } |
| | | } |
| | | }); |
| | |
| | | } else if (action.action_type == 'set_dlg_attr_show') { |
| | | var result = action.value; |
| | | result.forEach(async (attr,key) => { |
| | | $this.$data.head_styledef.form.items.forEach(async (ele,index) => { |
| | | $this.$data.head_styledef.form.items.forEach(async (ele, |
| | | index) => { |
| | | //判断是否是栅格表单 |
| | | if(ele.name!='Layout'){ |
| | | if(ele.fieldId==attr.attr){ |
| | |
| | | } else if(ele.name=='Layout'){ |
| | | ele.setting.colList.forEach(col=>{ |
| | | if(col){ |
| | | if(col.fieldId==attr.attr){ |
| | | col.show=attr.show; |
| | | if (col.fieldId == attr |
| | | .attr) { |
| | | col.show = attr |
| | | .show; |
| | | } |
| | | } |
| | | }); |
| | |
| | | } else if (action.action_type == 'set_global_attr') { |
| | | $this.$data.global_attr = action.value || []; |
| | | } else { |
| | | uni.showModal({title:"提示",content:action.action_type + '此action尚未处理!',showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: action.action_type + '此action尚未处理!', |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | col.oldvalue = ''; |
| | | col.value = result[i].value; |
| | | col.oldvalue = result[i].value; |
| | | $this.head_styledef.form.model[col.fieldId] =result[i].value; |
| | | $this.head_styledef.form.model[col.fieldId] = |
| | | result[i].value; |
| | | } |
| | | } |
| | | }); |
| | |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showModal({title:"错误3",content:success.err_msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误3", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex=>{ |
| | | // console.log(ex); |
| | | uni.showModal({title:"错误3.1",content:ex.errMsg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误3.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | DataObjRunCustomEvent_Return(eventid,data_attr,button_callback,item){ |
| | |
| | | return this.$data.refdatastore[i].attr == s.name |
| | | }).length) { |
| | | length = 1; |
| | | req.push({ 'attr': this.$data.refdatastore[i].attr, 'val': this.$data.refdatastore[i].value }); |
| | | req.push({ |
| | | 'attr': this.$data.refdatastore[i].attr, |
| | | 'val': this.$data.refdatastore[i].value |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data |
| | | .err_info.join('<br/>') : ''; |
| | | if (data.ret == 801) uni.showModal({ |
| | | title: '提示', |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | else uni.showModal({ |
| | | title: '提示', |
| | | content: tip + ',提示:' + data.ret, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return false |
| | | }else{ |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join( |
| | | '<br/>') : ''; |
| | | if (tip) uni.showModal({ |
| | | title: '提示', |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | |
| | | if (data != "") { |
| | | var actions = data.action; |
| | |
| | | |
| | | if (action.action_type == 'open_panel') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } |
| | | else if (action.action_type == 'open_select_userdlg') { |
| | | } else if (action.action_type == 'open_select_userdlg') { |
| | | var style = val.style; |
| | | // style == 'user' ? '选择人员' : style == 'department' ? '选择部门' : style == 'role' ? '选择角色' : '' |
| | | var $this = this; |
| | |
| | | data_attr:data_attr |
| | | } |
| | | uni.navigateTo({ |
| | | url:'../selpsn/index?mulit=false¶m='+JSON.stringify(param), |
| | | url: '../selpsn/index?mulit=false¶m=' + JSON.stringify( |
| | | param), |
| | | events:{ |
| | | AddPer(data,param){ |
| | | // console.log(param); |
| | | console.log(data); |
| | | var callback_eventid = param.button_callback.trim(); |
| | | var callback_eventid = param.button_callback |
| | | .trim(); |
| | | var info = { |
| | | eventid: callback_eventid, |
| | | edtype: "0", |
| | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | else if (action.action_type == 'open_data_query_dlg') { |
| | | } else if (action.action_type == 'open_data_query_dlg') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } |
| | | else if (action.action_type == 'open_common_dlg') { |
| | | } else if (action.action_type == 'open_common_dlg') { |
| | | var $this = this; |
| | | if(val.common_dlg_id == 'check_list'){ |
| | | $this.$data.check_list= val.config; |
| | |
| | | } |
| | | $this.$data.popupParam= popupParam; |
| | | } |
| | | } |
| | | else if (action.action_type == 'open_project_query_dlg') { |
| | | } else if (action.action_type == 'open_project_query_dlg') { |
| | | //console.log(action.value.select_range); |
| | | //console.log(action.value.mulit_select); |
| | | var priRel = '-1'; |
| | |
| | | priRel = '1'; |
| | | else if (action.value.select_range == '我创建的') |
| | | priRel = '2'; |
| | | else if (action.value.select_range == '我参与的' || action.value.select_range == '我参加的') |
| | | else if (action.value.select_range == '我参与的' || action.value |
| | | .select_range == '我参加的') |
| | | priRel = '3'; |
| | | else if (action.value.select_range == '我关注的') |
| | | priRel = '4'; |
| | |
| | | req:req |
| | | } |
| | | uni.navigateTo({ |
| | | url:'../selPrj/index?relation='+priRel+'¶m='+JSON.stringify(param_), |
| | | url: '../selPrj/index?relation=' + priRel + '¶m=' + |
| | | JSON.stringify(param_), |
| | | events:{ |
| | | AddPer(data,param){ |
| | | var attr = param.item.fieldId; |
| | | $this.head_styledef.form.model[attr] = data[0].ID+';'+data[0].Name; |
| | | $this.head_styledef.form.model[attr] = data[0].ID + |
| | | ';' + data[0].Name; |
| | | |
| | | // $this.$data.classAttrList[param.index].Attr[param.iindex].Value=data[0].Name; |
| | | // $this.$data.classAttrList[param.index].Attr[param.iindex].ValID=data[0].ID+';'+data[0].Name; |
| | | var callback_eventid = param.button_callback.trim(); |
| | | var callback_eventid = param.button_callback |
| | | .trim(); |
| | | if (callback_eventid) { |
| | | var info = { |
| | | eventid: callback_eventid, |
| | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | uni.showModal({title:"提示",content:action.action_type + '此action尚未处理!',showCancel:false,confirmText:"取消"}); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: action.action_type + '此action尚未处理!', |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showModal({title:"提示5.2",content: '调用 before_click_button 脚本返回空,event_id' + eventid,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示5.2", |
| | | content: '调用 before_click_button 脚本返回空,event_id' + eventid, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showModal({title:"错误5",content:success.err_msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误5", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex=>{ |
| | | // console.log(ex); |
| | | uni.showModal({title:"提示5.1",content:ex.errMsg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示5.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | //确定 |
| | | sava(){ |
| | | // if (this.$data.edit_ok_event) |
| | | // this.OKDataObjRunCustomEvent(); |
| | | // else |
| | | if (this.after_ok?.id) { // 点击确定按钮后 |
| | | this.afterOK(); |
| | | } else { |
| | | this.add(); |
| | | } |
| | | |
| | | }, |
| | | add(){ |
| | | uni.showLoading({ |
| | |
| | | console.log(action); |
| | | if(action.ret=='0'){ |
| | | if (action.ret != 0) { |
| | | uni.showModal({title:"提示",content:'执行脚本失败,' + action.result,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: '执行脚本失败,' + action.result, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return; |
| | | } |
| | | if (action.info) { |
| | | uni.showModal({title:"提示",content:'执行脚本失败,' + action.info,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: '执行脚本失败,' + action.info, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return; |
| | | } |
| | | if(action.result_type=='0'){ |
| | | uni.showToast({title:action.result,icon:"success",duration:3000}); |
| | | uni.showToast({ |
| | | title: action.result, |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | } |
| | | |
| | | // "{"ret":0, "result_type":0, "result":"创建成功123123123","info":""}" |
| | | } |
| | | } else |
| | | uni.showToast({title:"创建成功!",icon:"success",duration:3000}); |
| | | uni.showToast({ |
| | | title: "创建成功!", |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url:'../modal/3018_2?param='+JSON.stringify(this.$data.param)+"&titlename="+this.$data.title |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this.$data.param) + |
| | | "&titlename=" + this.$data.title |
| | | }); |
| | | // this.class_attr_init(); |
| | | }else{ |
| | | uni.showModal({title:"错误",content:success.err_msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex=>{ |
| | | console.log(ex); |
| | | uni.hideLoading(); |
| | | uni.showModal({title:"提示",content:ex.errMsg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | afterOK() { |
| | | 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], |
| | | })), |
| | | }; |
| | | if (!this.after_ok.id.includes('{')) this.after_ok.id = '{' + this.after_ok.id + '}'; |
| | | var dataInfo = { |
| | | ed_type: "0", |
| | | start_transaction: true, |
| | | class_id: this.$data.param.DataCls.id, |
| | | class_name: '', |
| | | event_id: this.after_ok.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) uni.showModal({ |
| | | title: '提示', |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | else uni.showModal({ |
| | | title: '提示', |
| | | content: tip + ',提示:' + data.ret, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join( |
| | | '<br/>') : ''; |
| | | if (tip) uni.showModal({ |
| | | title: '提示', |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | |
| | | var result = data.result; |
| | | |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误7", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "提示7.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | cancel(e){ //取消 |
| | | uni.navigateBack({ |
| | | delta:1 //返回层数,2则上上页 |