| | |
| | | <style> |
| | | .class_attr_title { |
| | | font-size: 44rpx; |
| | | padding-bottom: 22rpx; |
| | | position: relative; |
| | | } |
| | | .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_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 i { |
| | | color: #2c6aa0!important; |
| | | } |
| | | .class_attr_title .title_icon i { |
| | | font-size: 80rpx; |
| | | } |
| | | .class_attr_title .title { |
| | | padding-right: 22rpx; |
| | | display: inline-block; |
| | | background-color: #fff; |
| | | position: relative; |
| | | bottom: -8rpx; |
| | | } |
| | | .class_attr_title .arrow { |
| | | position: absolute; |
| | | top: 6rpx; |
| | | right: 30rpx; |
| | | font-size: 60rpx; |
| | | } |
| | | input::-webkit-input-placeholder { |
| | | font-size: 12rpx; |
| | | } |
| | | 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 { |
| | | vertical-align: middle; |
| | | line-height: 60rpx; |
| | | } |
| | | .no-padding-right { |
| | | padding-right: 0 !important; |
| | | } |
| | | .col-xs-12 { |
| | | width: 100%; |
| | | } |
| | | .tx_title{ |
| | | font-size: 32rpx; |
| | | } |
| | | .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 a,.text-right2 a{ |
| | | color: #337ab7; |
| | | } |
| | | .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; |
| | | } |
| | | .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_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; |
| | | } |
| | | .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 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 a{ |
| | | float: right; |
| | | } |
| | | .input_vallist ul li a i { |
| | | font-size: 45rpx; |
| | | } |
| | | .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-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; |
| | | 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 |
| | | } |
| | | |
| | | .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> |
| | | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="v-area" v-for="(classattr,index) in classAttrList"> |
| | |
| | | <i class="ace-icon fa" :class="classattr.ImgFontStyle"></i> |
| | | </div> |
| | | <span class="title">{{classattr.Name}}</span> |
| | | <a href="javascript:;" class="arrow" @tap="onarrow(index,classattr.Open)"><i class="ace-icon fa ":class="classattr.Open?'fa-angle-down':'fa-angle-up'"></i></a> |
| | | <a href="javascript:;" class="arrow" @tap="onarrow(index,classattr.Open)"><i class="ace-icon fa " |
| | | :class="classattr.Open?'fa-angle-down':'fa-angle-up'"></i></a> |
| | | </div> |
| | | <div class="class_attr_body" :style="{'display':classattr.Open?'block':'none'}"> |
| | | <div class="dv_field_div" v-for="(attr,iindex) in classattr.Attr"> |
| | | <view class="form-group" v-if="attr.Type=='字符串' || attr.Type=='可变长字符串' || attr.Type=='整数' || attr.Type=='浮点数'" :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view class="form-group" |
| | | v-if="attr.Type=='字符串' || attr.Type=='可变长字符串' || attr.Type=='整数' || attr.Type=='浮点数' ||attr.Type=='char' || attr.Type=='varchar' || attr.Type=='int' || attr.Type=='float'" |
| | | :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view v-if="classattr.control_style=='上下布局'"> |
| | | <text class="tx_title" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true">*</i></text> <!-- attr.NotEmpty=='1' --> |
| | | <text class="tx_title" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:<i |
| | | class="i_tishi" v-if="attr.notempty==true">*</i></text> <!-- attr.NotEmpty=='1' --> |
| | | <div class="text-right" v-if="attr.ext_button==true"> |
| | | <a @tap="classAttr_extButton(index,iindex)" ><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | <a @tap="classAttr_extButton(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input :type="attr.Type=='整数' || attr.Type=='浮点数'?'number':'text'" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true" > <!-- =='flase'?true:false --> |
| | | <textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" :data-index="index":data-iindex="iindex" style="height:60px;" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> |
| | | <textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" :data-index="index":data-iindex="iindex" style="height:90px;" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> |
| | | <input |
| | | :type="attr.Type=='整数' || attr.Type=='浮点数' || attr.Type=='int' || attr.Type=='float'?'number':'text'" |
| | | :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" |
| | | :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | :disabled="attr.edit?false:true"> |
| | | <!-- =='flase'?true:false --> |
| | | <textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" |
| | | :data-index="index" :data-iindex="iindex" style="height:60px;" |
| | | :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> |
| | | <textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" |
| | | :data-index="index" :data-iindex="iindex" style="height:90px;" |
| | | :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> |
| | | <!-- 扫码后事件返回 --> |
| | | <div class="input_vallist" > |
| | | <ul v-for="(inputval,vindex) in inputValList"> |
| | | <li><span>{{inputval.Name}}</span><a href="javascript:;" @tap="inputValListIsDel(vindex)"><i class="ace-icon fa fa-times"></i></a></li> |
| | | <li><span>{{inputval.Name}}</span><a href="javascript:;" |
| | | @tap="inputValListIsDel(vindex)"><i class="ace-icon fa fa-times"></i></a> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> |
| | | <input :type="attr.Type=='整数' || attr.Type=='浮点数'?'number':'text'" class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true" > |
| | | <textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" :data-index="index":data-iindex="iindex" style="height:60px;" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"></textarea> |
| | | <textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" :data-index="index":data-iindex="iindex" style="height:90px;" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"></textarea> |
| | | <input |
| | | :type="attr.Type=='整数' || attr.Type=='浮点数' || attr.Type=='int' || attr.Type=='float' ?'number':'text'" |
| | | class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" |
| | | v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" |
| | | :disabled="attr.edit?false:true"> |
| | | <textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" |
| | | v-else-if="attr.Height=='2'" :data-index="index" :data-iindex="iindex" |
| | | style="height:60px;" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" |
| | | :disabled="attr.edit?false:true"></textarea> |
| | | <textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" |
| | | v-else-if="attr.Height=='3'" :data-index="index" :data-iindex="iindex" |
| | | style="height:90px;" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" |
| | | :disabled="attr.edit?false:true"></textarea> |
| | | <div class="text-right2" v-if="attr.ext_button==true"> |
| | | <a @tap="classAttr_extButton(index,iindex)" ><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | <a @tap="classAttr_extButton(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <i class="i_tishi" v-if="attr.notempty==true">*</i> |
| | | </view> |
| | | </view> |
| | | <view class="form-group" v-if="attr.Type=='布尔值'" :style="{'display':attr.hidden == true?'none':''}"> |
| | | <checkbox-group class="check_rememberPwd" @change="oncheck" :data-ischeck="attr.Value" :data-index="index" :data-iindex="iindex" :style="{'margin-left': classattr.control_style=='左右布局'?classattr.title_p_wdith+2 +'%':'10rpx'}"> |
| | | <view class="form-group" v-if="attr.Type=='布尔值' || attr.Type=='bool'" |
| | | :style="{'display':attr.hidden == true?'none':''}"> |
| | | <checkbox-group class="check_rememberPwd" @change="oncheck" :data-ischeck="attr.Value" |
| | | :data-index="index" :data-iindex="iindex" |
| | | :style="{'margin-left': classattr.control_style=='左右布局'?classattr.title_p_wdith+2 +'%':'10rpx'}"> |
| | | <label> |
| | | <checkbox :value="attr.Value" :checked="attr.Value"/> |
| | | <text>{{attr.DispName}}<i class="i_tishi" v-if="attr.notempty==true">*</i></text> |
| | | </label> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="form-group" v-if="attr.Type=='日期' || attr.Type=='时间'" :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view class="form-group" |
| | | v-if="attr.Type=='日期' || attr.Type=='时间' || attr.Type=='date' || attr.Type=='datetime'" |
| | | :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view v-if="classattr.control_style=='上下布局'"> |
| | | <text class="tx_title" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true">*</i></text> |
| | | <picker mode="date" :value="attr.Value" @change="ondateTime" class="date_iput" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"> |
| | | <text class="tx_title" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:<i |
| | | class="i_tishi" v-if="attr.notempty==true">*</i></text> |
| | | <picker mode="date" :value="attr.Value" @change="ondateTime" class="date_iput" |
| | | :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"> |
| | | <view class="picker">{{attr.Value}}</view> |
| | | </picker> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> |
| | | <picker mode="date" :value="attr.Value" @change="ondateTime" class="date_iput attr_field" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"> |
| | | <picker mode="date" :value="attr.Value" @change="ondateTime" class="date_iput attr_field" |
| | | :data-index="index" :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"> |
| | | <view class="picker">{{attr.Value}}</view> |
| | | </picker> |
| | | <i class="i_tishi" v-if="attr.notempty==true">*</i> |
| | | </view> |
| | | </view> |
| | | <view class="form-group" v-if="attr.Type=='字典' || attr.Type=='字典-字符串' || attr.Type=='字典-整数'" :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view class="form-group" |
| | | v-if="attr.Type=='字典' || attr.Type=='字典-字符串' || attr.Type=='字典-整数' || attr.Type=='dict' || attr.Type=='dict-char' || attr.Type=='dict-int'" |
| | | :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view v-if="classattr.control_style=='上下布局'"> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true">*</i></text> |
| | | <picker class="section_iput" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" |
| | | v-if="attr.notempty==true">*</i></text> |
| | | <picker class="section_iput" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" |
| | | v-if="attr.select==false" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width':attr.Width}" :disabled="attr.edit?false:true"> |
| | | <label class="">{{ attr.Value }}</label> |
| | | </picker> |
| | | <select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem" showClearIcon="true" @change="onchange2" v-else-if="attr.select==true" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></select-cy> |
| | | <select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem" |
| | | showClearIcon="true" @change="onchange2" v-else-if="attr.select==true" |
| | | :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | :disabled="attr.edit?false:true"></select-cy> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> |
| | | <picker class="section_iput attr_field" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"> |
| | | <picker class="section_iput attr_field" @change="onchange" :range="attr.dictitem" |
| | | range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" |
| | | :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"> |
| | | <label class="">{{ attr.Value }}</label> |
| | | </picker> |
| | | <select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem" showClearIcon="true" @change="onchange2" v-else-if="attr.select==true" :data-index="index" :data-iindex="iindex" :style="{'display':'inline-block','margin-left':'8px','width':attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"></select-cy> |
| | | <select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem" |
| | | showClearIcon="true" @change="onchange2" v-else-if="attr.select==true" |
| | | :data-index="index" :data-iindex="iindex" |
| | | :style="{'display':'inline-block','margin-left':'8px','width':attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"></select-cy> |
| | | <i class="i_tishi" v-if="attr.notempty==true">*</i> |
| | | </view> |
| | | </view> |
| | | <view class="form-group" v-if="attr.Type=='引用对象(单个)' || attr.Type=='引用对象(多个)'" :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view class="form-group" |
| | | v-if="attr.Type=='引用对象(单个)' || attr.Type=='引用对象(多个)' ||attr.Type=='obj-ref' || attr.Type=='obj-ref-multi'" |
| | | :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view v-if="classattr.control_style=='上下布局'"> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true">*</i></text> |
| | | <div class="text-right" v-if="attr.Type=='引用对象(单个)'"> |
| | | <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]" :data-classname="attr.RelCls.split('|')[1]" ><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" |
| | | v-if="attr.notempty==true">*</i></text> |
| | | <div class="text-right" v-if="attr.Type=='引用对象(单个)'|| attr.Type=='obj-ref'"> |
| | | <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]" |
| | | :data-classname="attr.RelCls.split('|')[1]"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <div class="text-right" v-if="attr.Type=='引用对象(多个)'"> |
| | | <picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList" range-key="name" :data-index="index" :data-iindex="iindex"> |
| | | <div class="text-right" v-if="attr.Type=='引用对象(多个)'|| attr.Type=='obj-ref-multi'"> |
| | | <picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList" |
| | | range-key="name" :data-index="index" :data-iindex="iindex"> |
| | | <label class="">{{ attr.Value }}</label> |
| | | </picker> |
| | | <a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" disabled="true" > |
| | | <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | disabled="true"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> |
| | | <input type="text" class="attr_field" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" disabled="true" > |
| | | <div class="text-right2" v-if="attr.Type=='引用对象(单个)'"> |
| | | <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]" :data-classname="attr.RelCls.split('|')[1]" ><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | <input type="text" class="attr_field" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" |
| | | disabled="true"> |
| | | <div class="text-right2" v-if="attr.Type=='引用对象(单个)'|| attr.Type=='obj-ref'"> |
| | | <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]" |
| | | :data-classname="attr.RelCls.split('|')[1]"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <div class="text-right2" v-if="attr.Type=='引用对象(多个)'"> |
| | | <picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList" range-key="name" :data-index="index" :data-iindex="iindex"> |
| | | <div class="text-right2" v-if="attr.Type=='引用对象(多个)'|| attr.Type=='obj-ref-multi'"> |
| | | <picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList" |
| | | range-key="name" :data-index="index" :data-iindex="iindex"> |
| | | <label class="">{{ attr.Value }}</label> |
| | | </picker> |
| | | <a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | |
| | | <i class="i_tishi" v-if="attr.notempty==true">*</i> |
| | | </view> |
| | | </view> |
| | | <view class="form-group" v-if="attr.Type=='引用人员'" :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view class="form-group" v-if="attr.Type=='引用人员' ||attr.Type=='user' " |
| | | :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view v-if="classattr.control_style=='上下布局'"> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true">*</i></text> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" |
| | | v-if="attr.notempty==true">*</i></text> |
| | | <div class="text-right"> |
| | | <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" > |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> |
| | | <input type="text" class="attr_field" :value="attr.Value" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" disabled="true" > |
| | | <input type="text" class="attr_field" :value="attr.Value" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" |
| | | disabled="true"> |
| | | <div class="text-right2"> |
| | | <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <i class="i_tishi" v-if="attr.notempty==true">*</i> |
| | | </view> |
| | | </view> |
| | | <view class="form-group" v-if="attr.Type=='引用项目'" :style="{'display':attr.hidden == true ?'none':''}"> |
| | | <view class="form-group" v-if="attr.Type=='引用项目' ||attr.Type=='project'" |
| | | :style="{'display':attr.hidden == true ?'none':''}"> |
| | | <view v-if="classattr.control_style=='上下布局'"> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true">*</i></text> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" |
| | | v-if="attr.notempty==true">*</i></text> |
| | | <div class="text-right"> |
| | | <a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | <a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" > |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> |
| | | <input type="text" class="attr_field" :value="attr.Value" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" disabled="true" > |
| | | <input type="text" class="attr_field" :value="attr.Value" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" |
| | | disabled="true"> |
| | | <div class="text-right2"> |
| | | <a class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | <a class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <i class="i_tishi" v-if="attr.notempty==true">*</i> |
| | | </view> |
| | | </view> |
| | | <view class="form-group" v-if="attr.Type=='编码'" :style="{'display':attr.hidden == true ?'none':''}"> |
| | | <view class="form-group" v-if="attr.Type=='编码' || attr.Type=='code'" |
| | | :style="{'display':attr.hidden == true ?'none':''}"> |
| | | <view v-if="classattr.control_style=='上下布局'"> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true">*</i></text> |
| | | <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true" > |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" |
| | | v-if="attr.notempty==true">*</i></text> |
| | | <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | :disabled="attr.edit?false:true"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> |
| | | <input type="text" class="attr_field" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}" :disabled="attr.edit?false:true" > |
| | | <input type="text" class="attr_field" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}" |
| | | :disabled="attr.edit?false:true"> |
| | | <i class="i_tishi" v-if="attr.notempty==true">*</i> |
| | | </view> |
| | | </view> |
| | | <view class="form-group" v-if="attr.Type=='省市区'" :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view class="form-group" v-if="attr.Type=='省市区' ||attr.Type=='region'" |
| | | :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view v-if="classattr.control_style=='上下布局'"> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true">*</i></text> |
| | | <pickerAddress class="date_iput" @change="addresschange" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" >{{attr.Value}}</pickerAddress> |
| | | <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" |
| | | v-if="attr.notempty==true">*</i></text> |
| | | <pickerAddress class="date_iput" @change="addresschange" :data-index="index" |
| | | :data-iindex="iindex" :style="{'width':attr.Width}">{{attr.Value}}</pickerAddress> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p> |
| | | <pickerAddress class="date_iput attr_field" @change="addresschange" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}">{{attr.Value}}</pickerAddress> |
| | | <pickerAddress class="date_iput attr_field" @change="addresschange" :data-index="index" |
| | | :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"> |
| | | {{attr.Value}} |
| | | </pickerAddress> |
| | | <i class="i_tishi" v-if="attr.notempty==true">*</i> |
| | | </view> |
| | | </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> |
| | |
| | | |
| | | <script> |
| | | import pickerAddress from '../../js/pickerAddress/pickerAddress.vue' |
| | | import classUtils from "@/js/utils.js" |
| | | export default { |
| | | components: { |
| | | pickerAddress |
| | |
| | | edit_compose_cls_id:"", |
| | | global_attr:[], |
| | | refdatastore: [], //引用数据存储区// {attr:'G_PRJ_' + bindattr + '_ID', value:info.id} |
| | | inputValList:[{Name:"test"},{Name:"test2"},{Name:"test3"},{Name:"test4"},{Name:"test5"},{Name:"test6"},{Name:"test7"}], |
| | | inputValList: [{ |
| | | Name: "test" |
| | | }, { |
| | | Name: "test2" |
| | | }, { |
| | | Name: "test3" |
| | | }, { |
| | | Name: "test4" |
| | | }, { |
| | | Name: "test5" |
| | | }, { |
| | | Name: "test6" |
| | | }, { |
| | | Name: "test7" |
| | | }], |
| | | popupType:"center", |
| | | check_list:{}, |
| | | popupParam:{}, |
| | |
| | | }, |
| | | onLoad(options) { |
| | | // console.log(options); |
| | | uni.setNavigationBarTitle({ title: options.titlename}); //设置顶部标题 |
| | | uni.setNavigationBarTitle({ |
| | | title: options.titlename |
| | | }); //设置顶部标题 |
| | | var param = JSON.parse(options.param); |
| | | this.$data.title = param.Add_BtnName?param.Add_BtnName:options.titlename; //设置按钮文字 |
| | | // console.log(param); |
| | | if(!param.EditDlgMode){ |
| | | uni.showModal({title:"提示",content:"该功能点未配置编辑窗口,请重新配置!",showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "该功能点未配置编辑窗口,请重新配置!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return; |
| | | } |
| | | if(!param.Edit_dlg.Name){ |
| | | uni.showModal({title:"提示",content:"该功能点未配置窗口样式,请重新配置!",showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "该功能点未配置窗口样式,请重新配置!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return; |
| | | } |
| | | this.$data.param = param; |
| | |
| | | |
| | | $this.classGridStyleInfo(); |
| | | }else{ |
| | | uni.showModal({title:"错误1",content:success.msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误1", |
| | | content: success.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: "取消" |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | |
| | | var before_click_button = $this.$data.classAttrList[index].Attr[iindex].before_click_button; |
| | | var button_callback = $this.$data.classAttrList[index].Attr[iindex].button_callback; |
| | | if(!before_click_button){ |
| | | uni.showModal({title:"提示",content:"before_click_button-event_id为空!",showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "before_click_button-event_id为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return; |
| | | } |
| | | if(!button_callback){ |
| | | uni.showModal({title:"提示",content:"button_callback-event_id为空!",showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "button_callback-event_id为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return; |
| | | } |
| | | this.DataObjRunCustomEvent_Return(before_click_button, data_attr, button_callback, index,iindex); |
| | |
| | | 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; |
| | | } |
| | | $this.$data.classAttrList[$this.$data.popupParam.index].Attr[$this.$data.popupParam.iindex].Value=name; |
| | |
| | | |
| | | $this.class_attr_init(); |
| | | }else{ |
| | | uni.showModal({title:"错误1.2",content:success.msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误1.2", |
| | | content: success.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: "取消" |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | //console.log(e.target) |
| | | getApp().onScan((result)=>{ |
| | | //console.log(result.decodedata); |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata; |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | result.decodedata; |
| | | uni.hideKeyboard(); |
| | | this.onevent($ele,result.decodedata); |
| | | }) |
| | |
| | | }, |
| | | ondateTime(e) { |
| | | //console.log(e.target) |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=e.target.value; |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.target |
| | | .value; |
| | | }, |
| | | onchange(e) { |
| | | // console.log(e.target); |
| | | var value=this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].dictitem[e.target.value]; |
| | | var value = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].dictitem[e |
| | | .target.value]; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | console.log(data_attr); |
| | | if (value.Name != data_attr.Value) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value.Name; |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = value |
| | | .Name; |
| | | // console.log(this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value); |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action; |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | .action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | | var req=[]; |
| | |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | req.push({ attr: ar.Name, val: ar.Value?'1':'0'}); |
| | | else |
| | | req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''}); |
| | | req.push(this.formatAttr(ar)) |
| | | } |
| | | } |
| | | var info = { |
| | |
| | | for(var i in this.$data.classAttrList){ |
| | | for(var j in this.$data.classAttrList[i].Attr){ |
| | | if(item[v].attr == this.$data.classAttrList[i].Attr[j].Name){ |
| | | index=i;iindex=j; |
| | | index = i; |
| | | iindex = j; |
| | | } |
| | | } |
| | | } |
| | |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | req.push({ attr: ar.Name, val: ar.Value?'1':'0'}); |
| | | else if(ar.Type=='字典' || ar.Type=='字典-字符串' || ar.Type=='字典-整数') |
| | | req.push({ attr: ar.Name, val: itemvalue.Name}); |
| | | if (classUtils.attrTypeIsDict(ar.Type)) |
| | | req.push({ |
| | | attr: ar.Name, |
| | | value: itemvalue.Name |
| | | }); |
| | | else |
| | | req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''}); |
| | | req.push(this.formatAttr(ar)) |
| | | } |
| | | } |
| | | var info = { |
| | |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | // console.log(decodedata); |
| | | if (e.target.value != data_attr.Value) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=decodedata?decodedata:e.target.value; |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action; |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | decodedata ? decodedata : e.target.value; |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | .action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | | var req=[]; |
| | |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | req.push({ attr: ar.Name, val: ar.Value?'1':'0'}); |
| | | else |
| | | req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''}); |
| | | req.push(this.formatAttr(ar)) |
| | | } |
| | | } |
| | | var info = { |
| | |
| | | // console.log(data_attr); |
| | | if (ischecked != data_attr.Value) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=ischecked; |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action; |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | .action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | | var req=[]; |
| | |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | req.push({ attr: ar.Name, val: ar.Value?'1':'0'}); |
| | | else |
| | | req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''}); |
| | | req.push(this.formatAttr(ar)) |
| | | |
| | | } |
| | | } |
| | |
| | | addresschange(e) { |
| | | // console.log(e.target); |
| | | console.log(e.data.join(';')) |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=e.data.join(';'); |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.data.join( |
| | | ';'); |
| | | }, |
| | | classAttr_AddPer(index,iindex){ |
| | | var param={index:index,iindex:iindex}; |
| | | var param = { |
| | | index: index, |
| | | iindex: iindex |
| | | }; |
| | | var $this = this; |
| | | uni.navigateTo({ |
| | | url:'../selpsn/index?mulit=false¶m='+JSON.stringify(param), |
| | |
| | | // console.log(param); |
| | | console.log(data); |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].Value=data[0].Name; |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].ValID=data[0].Login+';'+data[0].Name; |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].Login + ';' + |
| | | data[0].Name; |
| | | |
| | | var eventid = $this.$data.classAttrList[param.index].Attr[param.iindex].action; |
| | | if (eventid) { |
| | |
| | | }, |
| | | classAttr_AddRef(e){ |
| | | console.log(e.target); |
| | | uni.showModal({title:"提示",content:"此功能还未实现!",showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "此功能还未实现!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | // var value=this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].RelCls[e.target.value]; |
| | | // this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value; |
| | | }, |
| | | classAttr_AddPrj(index,iindex){ |
| | | var param={index:index,iindex:iindex}; |
| | | var param = { |
| | | index: index, |
| | | iindex: iindex |
| | | }; |
| | | var $this = this; |
| | | uni.navigateTo({ |
| | | url:'../selPrj/index?relation=-1¶m='+JSON.stringify(param), |
| | |
| | | // console.log(param); |
| | | // console.log(data); |
| | | $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; |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].ID + ';' + |
| | | data[0].Name; |
| | | |
| | | var eventid = $this.$data.classAttrList[param.index].Attr[param.iindex].action; |
| | | if (eventid) { |
| | |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if(ar.Value=='请选择' || ar.Value=='——请选择——') ar.Value=''; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | req.push({ name: ar.Name, value: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | req.push({ name: ar.Name, value: ar.Value?'1':'0'}); |
| | | else if(ar.Type=='字典' || ar.Type=='字典-字符串' || ar.Type=='字典-整数'){ |
| | | if (classUtils.attrTypeIsDict(ar.Type)) { |
| | | if(ar.select==true){ //判断下拉是否多选 |
| | | var valStr =""; |
| | | for(var v in ar.Value){ |
| | |
| | | valStr+=";"; |
| | | valStr+=ar.Value[v]; |
| | | } |
| | | req.push({ name: ar.Name, value: valStr}); |
| | | req.push({ |
| | | name: ar.Name, |
| | | value: valStr |
| | | }); |
| | | }else |
| | | req.push({ name: ar.Name, value: ar.Value}); |
| | | req.push({ |
| | | name: ar.Name, |
| | | value: ar.Value |
| | | }); |
| | | } else |
| | | { |
| | | const node = this.formatAttr(ar) |
| | | req.push({ |
| | | name: node.attr, |
| | | value: node.value |
| | | }); |
| | | } |
| | | else |
| | | req.push({ name: ar.Name, value: ar.Value ?ar.Value :''}); |
| | | |
| | | if (ar.notempty == true && !ar.Value) { |
| | | // if(ar.NotEmpty=='1'){ |
| | | uni.hideLoading(); |
| | | // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000}); |
| | | uni.showModal({title:"提示",content:ar.DispName+'不能为空!',showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: ar.DispName + '不能为空!', |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | |
| | | }; |
| | | |
| | | var dataInfo={ |
| | | class_id: this.$data.param.clsid, data_obj_id: '', masterclsid: '', |
| | | req: JSON.stringify(req), upfile: JSON.stringify([]), post_data: JSON.stringify({}), |
| | | compose: JSON.stringify([]), refdatastore: JSON.stringify([]), extinfo: JSON.stringify(enviroment), |
| | | class_id: this.$data.param.clsid, |
| | | data_obj_id: '', |
| | | masterclsid: '', |
| | | req: JSON.stringify(req), |
| | | upfile: JSON.stringify([]), |
| | | post_data: JSON.stringify({}), |
| | | compose: JSON.stringify([]), |
| | | refdatastore: JSON.stringify([]), |
| | | extinfo: JSON.stringify(enviroment), |
| | | not_trigger_sys_event: '' |
| | | }; |
| | | |
| | |
| | | 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/classAttr?param='+JSON.stringify(this.$data.param)+"&titlename="+this.$data.title |
| | | url: '../modal/classAttr?param=' + JSON.stringify(this.$data.param) + |
| | | "&titlename=" + this.$data.title |
| | | }); |
| | | // this.class_attr_init(); |
| | | }else{ |
| | | uni.showModal({title:"错误",content:success.msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误", |
| | | content: success.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: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | class_attr_init(){ |
| | |
| | | ca.Value=ca.dictitem[d].CN_S_NAME; |
| | | } |
| | | } |
| | | if(ca.Type=='日期' || ca.Type=='时间'){ |
| | | if(classUtils.attrTypeIsDate(ca.Type)) { |
| | | var nowDate = new Date(); |
| | | var date = {year: nowDate.getFullYear(),month: nowDate.getMonth() + 1,day: nowDate.getDate()} |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day); |
| | | var date = { |
| | | year: nowDate.getFullYear(), |
| | | month: nowDate.getMonth() + 1, |
| | | day: nowDate.getDate() |
| | | } |
| | | if(ca.Type=='引用对象(多个)'){ |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date.day); |
| | | } |
| | | if(classUtils.attrTypeIsObjRefMulti(ca.Type)) { |
| | | var relClsList=[]; |
| | | var attr_rescls = ca.RelCls.split(','); |
| | | for(var ii in attr_rescls){ |
| | | var rescls = attr_rescls[ii].split('|'); |
| | | relClsList.push({id:rescls[0],name:rescls[1]}); |
| | | relClsList.push({ |
| | | id: rescls[0], |
| | | name: rescls[1] |
| | | }); |
| | | } |
| | | ca.RelClsList = relClsList; |
| | | ca.Value = '请'; |
| | | } |
| | | if(ca.Type=='省市区') |
| | | if(classUtils.attrTypeIsRegion(ca.Type)) |
| | | ca.Value = '请选择'; |
| | | if(ca.Type=='布尔值') |
| | | if(classUtils.attrTypeIsBool(ca.Type)) |
| | | ca.Value = false; |
| | | |
| | | attr.push(ca); |
| | |
| | | var attr = attrlist[i].attrs |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | req.push({ attr: ar.attr, val: ar.value?ar.value:'' }); |
| | | req.push({ |
| | | attr: ar.attr, |
| | | val: ar.value ? ar.value : '' |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | console.log(this.$data.classAttrList); |
| | | |
| | | } else { |
| | | uni.showModal({title:"提示",content:"未找到可显示的的属性",showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "未找到可显示的的属性", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }, |
| | | ini_DataObjRunCustomEvent(info){ |
| | |
| | | var global_attr = ''; |
| | | |
| | | var dataInfo = { |
| | | edtype: info.edtype, eventid: info.eventid, projectid: info.projectid, |
| | | rclsid: info.rclsid, robjid: info.robjid, userlogin: info.userlogin, clsid: info.clsid, objid: info.objid, |
| | | attr: JSON.stringify(info.attr), extinfo: JSON.stringify(param.enviroment), inputparameter: inputparameter, global_attr: global_attr |
| | | edtype: info.edtype, |
| | | eventid: info.eventid, |
| | | projectid: info.projectid, |
| | | rclsid: info.rclsid, |
| | | robjid: info.robjid, |
| | | userlogin: info.userlogin, |
| | | clsid: info.clsid, |
| | | objid: info.objid, |
| | | attr: JSON.stringify(info.attr), |
| | | extinfo: JSON.stringify(param.enviroment), |
| | | inputparameter: inputparameter, |
| | | global_attr: global_attr |
| | | } |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{ |
| | |
| | | for (var l = 0; l < this.$data.classAttrList[a].Attr.length; l++) { |
| | | var ca = this.$data.classAttrList[a].Attr[l]; |
| | | if (value[i].attr == ca.Name) { |
| | | if(ca.Type=='字典' || ca.Type=='字典-字符串' || ca.Type=='字典-整数'){ |
| | | if (classUtils.attrTypeIsDict(ca.Type)) { |
| | | var dictItemList=[]; |
| | | for(var d in value[i].choice_list){ |
| | | var list_val =value[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":list_val,"Name":list_val,"label":list_val,"value":list_val}); |
| | | dictItemList.push({ |
| | | "CN_S_NAME": list_val, |
| | | "Name": list_val, |
| | | "label": list_val, |
| | | "value": list_val |
| | | }); |
| | | |
| | | } |
| | | ca.dictitem = dictItemList; |
| | |
| | | } |
| | | } |
| | | if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({title:"错误2.2",content:"open_select_userdlg这个action_type还未处理!",showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误2.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | // else if (action_type == 'tip_dlg') { |
| | | |
| | |
| | | } |
| | | |
| | | }else{ |
| | | uni.showModal({title:"错误2",content:success.msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误2", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex=>{ |
| | | // console.log(ex); |
| | | uni.showModal({title:"错误2.1",content:ex.errMsg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误2.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | DataObjRunCustomEvent(info,data_attr){ |
| | |
| | | } |
| | | } |
| | | var dataInfo = { |
| | | edtype: info.edtype, eventid: info.eventid, projectid: info.projectid.replace('{','').replace('}',''), |
| | | rclsid: info.rclsid, robjid: info.robjid, userlogin: info.userlogin, clsid: info.clsid, objid: info.objid, |
| | | attr: JSON.stringify(info.attr), extinfo: JSON.stringify(enviroment), inputparameter: "", |
| | | global_attr: JSON.stringify(this.$data.global_attr), dataJson:JSON.stringify(info.dataJson) |
| | | edtype: info.edtype, |
| | | eventid: info.eventid, |
| | | projectid: info.projectid.replace('{', '').replace('}', ''), |
| | | rclsid: info.rclsid, |
| | | robjid: info.robjid, |
| | | userlogin: info.userlogin, |
| | | clsid: info.clsid, |
| | | objid: info.objid, |
| | | attr: JSON.stringify(info.attr), |
| | | extinfo: JSON.stringify(enviroment), |
| | | inputparameter: "", |
| | | global_attr: JSON.stringify(this.$data.global_attr), |
| | | dataJson: JSON.stringify(info.dataJson) |
| | | } |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{ |
| | |
| | | var attr = $this.$data.classAttrList[c].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | if(attr[j].Name==result[i].attr){ |
| | | if(attr[j].Type=='字典' || attr[j].Type=='字典-字符串' || attr[j].Type=='字典-整数'){ |
| | | if (classUtils.attrTypeIsDict(attr[j].Type)) { |
| | | var dictItemList=[]; |
| | | for(var d in result[i].choice_list){ |
| | | var val =result[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":val,"Name":val,"label":val,"value":val}); |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr[j].dictitem = dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showModal({title:"错误3",content:success.msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误3", |
| | | content: success.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: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | OKDataObjRunCustomEvent(){ |
| | |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if(ar.Value=='请选择' || ar.Value=='——请选择——') ar.Value=''; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | req.push({ attr: ar.Name, val: ar.Value?'1':'0'}); |
| | | else |
| | | req.push({ attr: ar.Name, val: ar.Value }); |
| | | req.push(this.formatAttr(ar)) |
| | | } |
| | | } |
| | | |
| | |
| | | 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 |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | attr: req, |
| | | } |
| | | var dataInfo = { |
| | | edtype: info.edtype, eventid: info.eventid, projectid: info.projectid,rclsid: info.rclsid, |
| | | robjid: info.robjid, userlogin: info.userlogin, clsid: info.clsid, objid: info.objid, |
| | | attr: JSON.stringify(info.attr), extinfo: JSON.stringify(enviroment), global_attr: JSON.stringify(this.$data.global_attr) |
| | | edtype: info.edtype, |
| | | eventid: info.eventid, |
| | | projectid: info.projectid, |
| | | rclsid: info.rclsid, |
| | | robjid: info.robjid, |
| | | userlogin: info.userlogin, |
| | | clsid: info.clsid, |
| | | objid: info.objid, |
| | | attr: JSON.stringify(info.attr), |
| | | extinfo: JSON.stringify(enviroment), |
| | | global_attr: JSON.stringify(this.$data.global_attr) |
| | | } |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{ |
| | |
| | | |
| | | this.add(); |
| | | }else{ |
| | | uni.showModal({title:"错误4",content:success.msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误4", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex=>{ |
| | | // console.log(ex); |
| | | uni.showModal({title:"错误4.1",content:ex.errMsg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误4.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | DataObjRunCustomEvent_Return(eventid,data_attr,button_callback,index,iindex){ |
| | |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | req.push({ attr: ar.Name, val: ar.Value?'1':'0'}); |
| | | else |
| | | req.push({ attr: ar.Name, val: ar.Value }); |
| | | req.push(this.formatAttr(ar)) |
| | | } |
| | | } |
| | | // if (this.$data.refdatastore.length > 0) { |
| | |
| | | } |
| | | } |
| | | var dataInfo = { |
| | | edtype: "0", eventid: eventid, projectid: '',rclsid: '', robjid: '', userlogin: '', |
| | | clsid: this.$data.param.clsid, objid: '',attr: JSON.stringify(req), |
| | | extinfo: JSON.stringify(extinfo), global_attr: JSON.stringify(this.$data.global_attr) |
| | | edtype: "0", |
| | | eventid: eventid, |
| | | projectid: '', |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.clsid, |
| | | objid: '', |
| | | attr: JSON.stringify(req), |
| | | extinfo: JSON.stringify(extinfo), |
| | | global_attr: JSON.stringify(this.$data.global_attr) |
| | | } |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{ |
| | |
| | | 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); |
| | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | 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> ' + '提示', |
| | | 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){ |
| | | $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; |
| | | $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(); |
| | | if (callback_eventid) { |
| | | var info = { |
| | |
| | | } |
| | | } |
| | | }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.msg,showCancel:false,confirmText:"取消"}); |
| | | uni.showModal({ |
| | | title: "错误5", |
| | | content: success.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: "取消" |
| | | }); |
| | | }); |
| | | }, |
| | | formatAttr(attr) { |
| | | if (classUtils.attrTypeIsObjRefMulti(attr.Type)) //if(ar.Type=='引用对象(多个)') |
| | | if (attr.Value == '请') ar.Value = ''; |
| | | if (classUtils.attrTypeIsUser(attr.Type) || classUtils.attrTypeIsProject(attr |
| | | .Type)) //if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | return { |
| | | attr: attr.Name, |
| | | value: attr.ValID ? attr.ValID : '' |
| | | }; |
| | | else if (classUtils.attrTypeIsBool(attr.Type)) //if(ar.Type=='布尔值') |
| | | return { |
| | | attr: attr.Name, |
| | | value: attr.Value ? '1' : '0' |
| | | }; |
| | | else |
| | | return { |
| | | attr: attr.Name, |
| | | value: attr.Value ? attr.Value : '' |
| | | }; |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .class_attr_title { |
| | | font-size: 44rpx; |
| | | padding-bottom: 22rpx; |
| | | position: relative; |
| | | } |
| | | |
| | | .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_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 i { |
| | | color: #2c6aa0 !important; |
| | | } |
| | | |
| | | .class_attr_title .title_icon i { |
| | | font-size: 80rpx; |
| | | } |
| | | |
| | | .class_attr_title .title { |
| | | padding-right: 22rpx; |
| | | display: inline-block; |
| | | background-color: #fff; |
| | | position: relative; |
| | | bottom: -8rpx; |
| | | } |
| | | |
| | | .class_attr_title .arrow { |
| | | position: absolute; |
| | | top: 6rpx; |
| | | right: 30rpx; |
| | | font-size: 60rpx; |
| | | } |
| | | |
| | | input::-webkit-input-placeholder { |
| | | font-size: 12rpx; |
| | | } |
| | | |
| | | 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 { |
| | | vertical-align: middle; |
| | | line-height: 60rpx; |
| | | } |
| | | |
| | | .no-padding-right { |
| | | padding-right: 0 !important; |
| | | } |
| | | |
| | | .col-xs-12 { |
| | | width: 100%; |
| | | } |
| | | |
| | | .tx_title { |
| | | font-size: 32rpx; |
| | | } |
| | | |
| | | .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 a, |
| | | .text-right2 a { |
| | | color: #337ab7; |
| | | } |
| | | |
| | | .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; |
| | | } |
| | | |
| | | .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_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; |
| | | } |
| | | |
| | | .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 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 a { |
| | | float: right; |
| | | } |
| | | |
| | | .input_vallist ul li a i { |
| | | font-size: 45rpx; |
| | | } |
| | | |
| | | .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-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; |
| | | 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 |
| | | } |
| | | |
| | | .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> |