| | |
| | | <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"> |
| | | disabled="true" :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </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"> |
| | | disabled="true" :maxlength="-1"> |
| | | <div class="text-right2" v-if="attr.Type=='引用对象(单个)'|| attr.Type=='obj-ref'"> |
| | | <a @tap="classAttr_AddRef" :data-classid="attr.RelCls[0].id" |
| | | :data-classname="attr.RelCls[0].name"><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"> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" |
| | | :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </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"> |
| | | disabled="true" :maxlength="-1"> |
| | | <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 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"> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" |
| | | :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </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"> |
| | | disabled="true" :maxlength="-1"> |
| | | <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> |
| | |
| | | :style="{'font-family':classattr.Font.Name?classattr.Font.Name:'initial','font-size':classattr.Font.Size?classattr.Font.Size:'initial','font-weight':classattr.Font.Bold?'bold':'initial','font-style':classattr.Font.Tilt?'italic':'initial','text-decoration':classattr.Font.Underline?'underline':'initial','background-color':classattr.Font.Bk_Color,'color':classattr.Font.Text_Color,'width':classattr.title_p_wdith+'%'}"><i |
| | | class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text> |
| | | <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | :disabled="attr.edit?false:true"> |
| | | :disabled="attr.edit?false:true" :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </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"> |
| | | :disabled="attr.edit?false:true" :maxlength="-1"> |
| | | <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i> |
| | | </view> |
| | | </view> |
| | |
| | | <div class="panel_title">{{param.Sub_Cls.Title}}</div> |
| | | <!-- 从数据扫码区 --> |
| | | <view class="v-area class_attr_body" v-if="param.Sub_Cls.Can_Add_Delete == true"> |
| | | <h4 style="margin: 15rpx 0 0 30rpx;font-weight: bold;">新增{{param.Sub_Cls.Name }}</h4> |
| | | <h4 style="margin: 15rpx 0 0 30rpx;font-weight: bold;"> |
| | | {{`${translateSys('add2')}'${param.Sub_Cls.Name}'` }} |
| | | </h4> |
| | | <view class="form-group"> |
| | | <!-- 左右布局 --> |
| | | <p class="tx_title2">{{param.Scan_Code.Name}}:</p> |
| | | <input type="text" class="attr_field" :value="scanCodeVal" @focus="scan_ontap" @blur="scan_onevent" |
| | | :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'"> |
| | | :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'" |
| | | :maxlength="-1"> |
| | | <div class="text-right2" v-if="param.Scan_Code.Have_Select_Button==true"> |
| | | <a @tap="scan_classAttr_extButton()"><i class="ace-icon fa" |
| | | :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a> |
| | |
| | | <a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width':attr.Width}" disabled="true"> |
| | | :style="{'width':attr.Width}" disabled="true" :maxlength="-1"> |
| | | </view> |
| | | <view v-if="subclassattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | <input type="text" class="attr_field" :data-iiindex="iiindex" :data-index="index" |
| | | :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 16 +'%'}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | <div class="text-right2" v-if="attr.Type=='引用对象(单个)' || attr.Type=='obj-ref'"> |
| | | <a @tap="classAttr_AddRef" :data-classid="attr.RelCls[0].id" |
| | | :data-classname="attr.RelCls[0].name"><i |
| | |
| | | <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"> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" |
| | | :maxlength="-1"> |
| | | </view> |
| | | <view v-if="subclassattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :value="attr.Value" |
| | | :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 16 +'%'}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | <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 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"> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" |
| | | :maxlength="-1"> |
| | | </view> |
| | | <view v-if="subclassattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :value="attr.Value" |
| | | :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 16 +'%'}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | <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> |
| | |
| | | :style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}"><i |
| | | class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text> |
| | | <input type="text" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width':attr.Width}" :disabled="attr.edit?false:true"> |
| | | :style="{'width':attr.Width}" :disabled="attr.edit?false:true" :maxlength="-1"> |
| | | </view> |
| | | <view v-if="subclassattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | <input type="text" class="attr_field" :data-iiindex="iiindex" :data-index="index" |
| | | :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 +'%'}" |
| | | :disabled="attr.edit?false:true"> |
| | | :disabled="attr.edit?false:true" :maxlength="-1"> |
| | | </view> |
| | | </view> |
| | | <view class="form-group" v-if="attr.Type=='省市区' ||attr.Type=='region'" |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <button type="default" @tap="cancel" class="btn_cancel" v-if="param.Sub_Cls.Can_Add_Delete == true">取消</button> |
| | | <button type="default" @tap="cancel" class="btn_cancel" |
| | | v-if="param.Sub_Cls.Can_Add_Delete == true">{{translateSys('cancel')}}</button> |
| | | <button type="default" @tap="sava" class="btn_add" |
| | | v-if="param.Sub_Cls.Can_Add_Delete == true">{{title}}</button> |
| | | <button type="default" @tap="sava" class="btn_sava" |
| | |
| | | <uni-popup class="view-popup" ref="popup" background-color="#fff" @change="popupChange"> |
| | | <view class="popup-header">{{check_list.title}}</view> |
| | | <view class="popup-content" :class="{ 'popup-height': popupType === 'left' || popupType === 'right' }" |
| | | :style="{'width':check_list.width?check_list.width+'px':'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'}"> |
| | | :style="{'width':check_list.width?check_list.width+'px':'375rpx','height':check_list.height?check_list.height+'px':popupType =='center'?'60vh':'88vh'}"> |
| | | <view class="popup-cont" |
| | | :style="{'height':check_list.height?check_list.height-45+'px':popupType =='center'?'50vh':'80vh'}"> |
| | | <view class="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'}"> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="popup-footer"> |
| | | <button type="default" @tap="popup_sava" class="btn_popup_add">确定</button> |
| | | <button type="default" @tap="popup_cancel" class="btn_popup_cancel">取消</button> |
| | | <button type="default" @tap="popup_sava" class="btn_popup_add">{{translateSys('ok')}}</button> |
| | | <button type="default" @tap="popup_cancel" |
| | | class="btn_popup_cancel">{{translateSys('cancel')}}</button> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | |
| | | <script> |
| | | import Base64 from '../../components/js-base64/base64.js' |
| | | import pickerAddress from '../../js/pickerAddress/pickerAddress.vue' |
| | | import classUtils from "@/js/utils.js" |
| | | import utils from "@/js/utils.js" |
| | | import { |
| | | appGetInfo, |
| | | dictGetInfo, |
| | | dictItemGetInfo |
| | | } from "@/api/mobox.js" |
| | | import { |
| | | getUIStyleInfo, |
| | | runCustomEvent, |
| | | dataObjCreate, |
| | | dataObjDel |
| | | } from "@/api/data.js" |
| | | import { |
| | | classAttrList, |
| | | } from "@/api/index.js" |
| | | |
| | | |
| | | export default { |
| | | modules: { |
| | | Base64, |
| | |
| | | console.log(param); |
| | | if (!param.Master_Cls.View_Style) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "该功能点未配置界面窗口,请重新配置!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | | if (!param.Master_Cls.View_Style.Name) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "该功能点未配置窗口样式,请重新配置!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | // Model: param.EditDlgMode, |
| | | // Name: param.Master_Cls.View_Style.Name |
| | | // } |
| | | //主数据类获取 |
| | | var dataInfo = { |
| | | class_id: param.Master_Cls.ID |
| | | }; |
| | | var $this = this; |
| | | $this.$store.state.thisareaFuncID = param.Master_Cls.ID; |
| | | // console.log($this.$store.getters.getclassAttrList); |
| | | if ($this.$store.getters.getclassAttrList) { |
| | | $this.$data.classAttrList = $this.$store.getters.getclassAttrList; |
| | | $this.classGridStyleInfo(param.Master_Cls.ID, $this.$data.param.Master_Cls.View_Style.Name, 'Mast'); |
| | | } else { |
| | | $this.$store.dispatch('classAttrGetList', dataInfo).then(success => { |
| | | // console.log(success); |
| | | if (success.err_code == 0) { |
| | | $this.$data.classAttrList = success.result; |
| | | success.result.forEach(async (group, index) => { |
| | | group.attr_list.forEach(async (attr, key) => { |
| | | if (classUtils.attrTypeIsDict(attr.type)) |
| | | // if (attr.type == "字典-字符串" || attr.type == "字典-整数" ||attr.type == "dict-char" || attr.type == "dict-int") |
| | | { |
| | | await $this.DictItemGetList(attr, key, index, 'mast'); |
| | | } |
| | | }); |
| | | }); |
| | | setTimeout(function() { |
| | | $this.classGridStyleInfo(param.Master_Cls.ID, $this.$data.param.Master_Cls |
| | | .View_Style.Name, 'Mast'); |
| | | }, 500); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误1", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误1.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | } |
| | | this.loadData() |
| | | |
| | | //从数据类获取 |
| | | var subdataInfo = { |
| | | class_id: param.Sub_Cls.ID |
| | | }; |
| | | $this.$store.state.thisareaFuncSubID = param.Sub_Cls.ID; |
| | | if ($this.$store.getters.getSubClassAttrList) { |
| | | $this.$data.subClassAttrList = $this.$store.getters.getSubClassAttrList; |
| | | $this.classGridStyleInfo(param.Sub_Cls.ID, $this.$data.param.Sub_Cls.View_Style.Name, 'Sub'); |
| | | } else { |
| | | $this.$store.dispatch('subClassAttrGetList', subdataInfo).then(success => { |
| | | // console.log(success); |
| | | if (success.err_code == 0) { |
| | | $this.$data.subClassAttrList = success.result; |
| | | success.result.forEach(async (group, index) => { |
| | | group.attr_list.forEach(async (attr, key) => { |
| | | if (classUtils.attrTypeIsDict(attr.type)) { |
| | | //if (attr.type == "字典-字符串" || attr.type == "字典-整数" ||attr.type == "dict-char" || attr.type == "dict-int"){ |
| | | await $this.DictItemGetList(attr, key, index, 'sub'); |
| | | } |
| | | }); |
| | | }); |
| | | setTimeout(function() { |
| | | $this.classGridStyleInfo(param.Sub_Cls.ID, $this.$data.param.Sub_Cls.View_Style |
| | | .Name, 'Sub'); |
| | | }, 500); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误1_1", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误1_1.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | methods: { |
| | | async DictItemGetList(attr, key, index, type) { //Mobox3得到字典项列表 |
| | | this.data = []; |
| | | var $this = this; |
| | | var dataInfo = { |
| | | dict_id: attr.dict_id, |
| | | dict_name: attr.dict_name |
| | | }; |
| | | // console.log(dataInfo); |
| | | this.$store.dispatch('DictItemGetList', dataInfo).then(async (success) => { |
| | | // console.log(success); |
| | | if (success.err_code == 0) { |
| | | if (type == 'mast') { |
| | | $this.$data.classAttrList[index].attr_list[key].dictitem = success.result; |
| | | this.$store.commit("classAttrList", $this.$data.classAttrList); |
| | | } else { |
| | | $this.$data.subClassAttrList[index].attr_list[key].dictitem = success.result; |
| | | this.$store.commit("subClassAttrList", $this.$data.subClassAttrList); |
| | | } |
| | | setData(obj) { |
| | | let that = this; |
| | | let keys = []; |
| | | let val, data; |
| | | |
| | | } else { |
| | | 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: "取消" |
| | | Object.keys(obj).forEach(function(key) { |
| | | keys = key.split("."); |
| | | val = obj[key]; |
| | | data = that.$data; |
| | | keys.forEach(function(key2, index) { |
| | | if (index + 1 == keys.length) { |
| | | that.$set(data, key2, val); |
| | | } else { |
| | | if (!data[key2]) { |
| | | that.$set(data, key2, {}); |
| | | } |
| | | } |
| | | data = data[key2]; |
| | | }); |
| | | }); |
| | | }, |
| | | async classGridStyleInfo(clsid, styleName, clsType) { |
| | | var $this = this; |
| | | var gridstyleInfo = { |
| | | class_id: clsid, |
| | | ui_style_type: 2, |
| | | ui_style_name: styleName |
| | | }; |
| | | // console.log($this.$store.getters.getclassGridStyleInfo); |
| | | //获取主数据类界面样式 |
| | | if (clsType == 'Mast') { |
| | | $this.$store.state.thisEditName = styleName; |
| | | if ($this.$store.getters.getclassGridStyleInfo) { |
| | | $this.$data.classGridStyle = $this.$store.getters.getclassGridStyleInfo; |
| | | $this.viewParam('Mast'); |
| | | } else { |
| | | //console.log(gridstyleInfo); |
| | | $this.$store.dispatch('UIStyleGetInfo', gridstyleInfo).then(success => { |
| | | // console.log(success); |
| | | if (success.err_code == 0) { |
| | | var styledef = Base64.decode(success.result.style_def); |
| | | success.result.style_def = JSON.parse(styledef); |
| | | $this.$data.classGridStyle = success.result; |
| | | // console.log($this.$data.classGridStyle); |
| | | |
| | | $this.viewParam('Mast'); |
| | | } else { |
| | | 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: "取消" |
| | | }); |
| | | }); |
| | | } |
| | | } else if (clsType == 'Sub') { //获取从数据类界面样式 |
| | | $this.$store.state.thisEditSubName = styleName; |
| | | if ($this.$store.getters.getSubClassGridStyleInfo) { |
| | | $this.$data.subClassGridStyle = $this.$store.getters.getSubClassGridStyleInfo; |
| | | $this.viewParam('Sub'); |
| | | } else { |
| | | //console.log(gridstyleInfo); |
| | | $this.$store.dispatch('UIStyleGetInfo', gridstyleInfo).then(success => { |
| | | // console.log(success); |
| | | if (success.err_code == 0) { |
| | | var styledef = Base64.decode(success.result.style_def); |
| | | success.result.style_def = JSON.parse(styledef); |
| | | $this.$data.subClassGridStyle = success.result; |
| | | // console.log($this.$data.subClassGridStyle); |
| | | async loadData() { |
| | | //主数据类获取 |
| | | const param = this.param |
| | | this.$data.classAttrList = await this.classAttrGetList(param.Master_Cls?.ID) |
| | | this.$data.classGridStyle = await this.classGridStyleInfo(param.Master_Cls.ID, param.Master_Cls |
| | | ?.View_Style?.Name) |
| | | this.viewParam('Mast'); |
| | | this.$data.classAttrList = await this.classAttrGetList(param.Sub_Cls?.ID) |
| | | this.$data.classGridStyle = await this.classGridStyleInfo(param.Sub_Cls?.ID, param.Sub_Cls?.View_Style |
| | | ?.Name) |
| | | this.viewParam('Sub'); |
| | | }, |
| | | async DictItemGetList(attr) { //Mobox3得到字典项列表 |
| | | try { |
| | | this.data = []; |
| | | var $this = this; |
| | | var dataInfo = { |
| | | dict_id: attr.dict_id, |
| | | dict_name: attr.dict_name |
| | | }; |
| | | const result = await dictItemGetInfo(dataInfo) |
| | | return result?.dict_item_list || [] |
| | | |
| | | $this.viewParam('Sub'); |
| | | |
| | | // $this.subClass_attr_init(); |
| | | } else { |
| | | 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: "取消" |
| | | }); |
| | | }); |
| | | } |
| | | } catch (ex) { |
| | | uni.showModal({ |
| | | title: this.translateSys('error') + " 1.2", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return [] |
| | | } |
| | | |
| | | }, |
| | | async classAttrGetList(clsid) { |
| | | try { |
| | | |
| | | var $this = this; |
| | | var dataInfo = { |
| | | class_id: clsid, |
| | | }; |
| | | const result = await classAttrList(dataInfo) || [] |
| | | for (let index in result) { |
| | | const group = result[index] |
| | | for (let key in group.attr_list) { |
| | | const attr = group.attr_list[key] |
| | | if (utils.classUtils.attrTypeIsDict(attr.type)) { |
| | | attr.dictitem = await $this.DictItemGetList(attr); |
| | | } |
| | | } |
| | | } |
| | | return result |
| | | } catch (ex) { |
| | | // console.log(ex); |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + " 1.1", |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return [] |
| | | }; |
| | | }, |
| | | |
| | | async classGridStyleInfo(clsid, styleName) { |
| | | try { |
| | | |
| | | var $this = this; |
| | | var gridstyleInfo = { |
| | | class_id: clsid, |
| | | ui_style_type: 2, |
| | | ui_style_name: styleName |
| | | }; |
| | | const result = await getUIStyleInfo(gridstyleInfo) |
| | | var styledef = Base64.decode(result.style_def || ""); |
| | | result.style_def = JSON.parse(styledef); |
| | | return result |
| | | |
| | | } catch (ex) { |
| | | // console.log(ex); |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + " 1.2", |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return {} |
| | | }; |
| | | }, |
| | | viewParam(type) { //将mobox3小写参数转换为mobox2大写参数 |
| | | var classGridStyle = ''; |
| | |
| | | } |
| | | // console.log(ca.dictitem); |
| | | } |
| | | if (classUtils.attrTypeIsDate(ca |
| | | if (utils.classUtils.attrTypeIsDateTime(ca |
| | | .Type |
| | | )) // if(ca.Type=='日期' || ca.Type=='时间' ||ca.Type=='date' || ca.Type=='datetime') |
| | | { |
| | |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date.day); |
| | | } |
| | | if (classUtils.attrTypeIsObjRefMulti(ca |
| | | if (utils.classUtils.attrTypeIsObjRefMulti(ca |
| | | .Type)) // if(ca.Type=='引用对象(多个)' || ca.Type=='obj-ref-multi'){ |
| | | { |
| | | ca.RelClsList = ca.RelCls; |
| | | ca.Value = '请选择'; |
| | | } |
| | | if (classUtils.attrTypeIsRegion(ca.Type)) //if(ca.Type=='省市区'|| ca.Type=='region') |
| | | if (utils.classUtils.attrTypeIsRegion(ca |
| | | .Type)) //if(ca.Type=='省市区'|| ca.Type=='region') |
| | | ca.Value = '请选择'; |
| | | if (classUtils.attrTypeIsBool(ca.Type)) //if(ca.Type=='布尔值'|| ca.Type=='bool') |
| | | if (utils.classUtils.attrTypeIsBool(ca |
| | | .Type)) //if(ca.Type=='布尔值'|| ca.Type=='bool') |
| | | ca.Value = false; |
| | | |
| | | attr.push(ca); |
| | |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "未找到可显示的的属性", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | } |
| | | }, |
| | |
| | | } |
| | | } |
| | | } |
| | | if (classUtils.attrTypeIsDate(ca.Type)) //if(ca.Type=='日期' || ca.Type=='时间') |
| | | if (utils.classUtils.attrTypeIsDateTime(ca |
| | | .Type)) //if(ca.Type=='日期' || ca.Type=='时间') |
| | | { |
| | | var nowDate = new Date(); |
| | | var date = { |
| | |
| | | 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)) //if(ca.Type=='引用对象(多个)') |
| | | if (utils.classUtils.attrTypeIsObjRefMulti(ca.Type)) //if(ca.Type=='引用对象(多个)') |
| | | { |
| | | ca.RelClsList = ca.RelCls; |
| | | ca.Value = '请'; |
| | | } |
| | | if (classUtils.attrTypeIsRegion(ca.Type)) //if(ca.Type=='省市区'||ca.Type=='region') |
| | | if (utils.classUtils.attrTypeIsRegion(ca |
| | | .Type)) //if(ca.Type=='省市区'||ca.Type=='region') |
| | | ca.Value = '请选择'; |
| | | if (classUtils.attrTypeIsBool(ca.Type)) //if(ca.Type=='布尔值'||ca.Type=='bool') |
| | | if (utils.classUtils.attrTypeIsBool(ca.Type)) //if(ca.Type=='布尔值'||ca.Type=='bool') |
| | | ca.Value = false; |
| | | |
| | | attr.push(ca); |
| | |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "未找到可显示的的属性", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | } |
| | | }, |
| | |
| | | var Before_Select_Event = $this.$data.param.Scan_Code.Before_Select_Event; |
| | | if (!Before_Select_Event) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "选择前事件为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | var ar = attr[j]; |
| | | if (ar.Value == '请选择') { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: ar.DispName + "未选择数据!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if (ar.Value == '请选择' || ar.Value == '——请选择——') ar.Value = ''; |
| | | if (classUtils.attrTypeIsDict(ar |
| | | if (utils.classUtils.attrTypeIsDict(ar |
| | | .Type)) //if (ar.Type == '字典' || ar.Type == '字典-字符串' || ar.Type == '字典-整数' ) { |
| | | if (ar.select == true) { //判断下拉是否多选 |
| | | var valStr = ""; |
| | |
| | | uni.hideLoading(); |
| | | // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: ar.DispName + '不能为空!', |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | var After_Select_Event = $this.$data.param.Scan_Code.After_Select_Event; |
| | | if (!After_Select_Event) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "选择后事件为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | } |
| | | if (data.length == 0) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "未选择数据!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | var ar = attr[j]; |
| | | if (ar.Value == '请选择') { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: ar.DispName + "未选择数据!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | uni.showLoading({ |
| | | title: "加载中..." |
| | | }); |
| | | this.$store.dispatch('dataObjDel', dataInfo).then(success => { |
| | | dataObjDel(dataInfo).then(success => { |
| | | // console.log(success); |
| | | uni.hideLoading(); |
| | | if (ret.err_code == 0) { |
| | | $this.$data.subPanelList.splice(index, 1); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "删除成功!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误9", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | $this.$data.subPanelList.splice(index, 1); |
| | | uni.showModal({ |
| | | title: this.translateSys('tip') + "", |
| | | content: "删除成功!", |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | |
| | | }).catch(ex => { |
| | | console.log(ex); |
| | | uni.hideLoading(); |
| | | uni.showModal({ |
| | | title: "提示9.1", |
| | | title: this.translateSys('tip') + "9.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | }); |
| | | } |
| | |
| | | for (var j = 0; j < attr |
| | | .length; j++) { |
| | | var ar = attr[j]; |
| | | if (classUtils.attrTypeIsDict( |
| | | if (utils.classUtils.attrTypeIsDict( |
| | | ar.Type |
| | | )) //if(ar.Type=='字典' || ar.Type=='字典-字符串' || ar.Type=='字典-整数') |
| | | req.push({ |
| | |
| | | .button_callback; |
| | | if (!before_click_button) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "before_click_button-event_id为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | | if (!button_callback) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "button_callback-event_id为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | classAttr_AddRef(e) { |
| | | console.log(e.target); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "此功能还未实现!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | // 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; |
| | |
| | | if (ar.Value == '请选择' || ar |
| | | .Value == '——请选择——') ar.Value = |
| | | ''; |
| | | if (classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (ar.select == |
| | | true) { //判断下拉是否多选 |
| | | var valStr = ""; |
| | |
| | | name: ar.Name, |
| | | value: ar.Value |
| | | }); |
| | | } else |
| | | { |
| | | const node = this.formatAttr(ar) |
| | | req.push({ |
| | | name: node.attr, |
| | | value: node.value |
| | | }); |
| | | } |
| | | |
| | | } else { |
| | | const node = this.formatAttr(ar) |
| | | req.push({ |
| | | name: node.attr, |
| | | value: node.value |
| | | }); |
| | | } |
| | | |
| | | |
| | | if (ar.notempty == true && !ar |
| | | .Value) { |
| | |
| | | uni.hideLoading(); |
| | | // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: ar |
| | | .DispName + |
| | | '不能为空!', |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | }; |
| | | console.log(dataInfo); |
| | | // return |
| | | this.$store.dispatch('createDataObj', |
| | | dataInfo).then(success => { |
| | | console.log(success); |
| | | dataObjCreate(dataInfo).then(result => { |
| | | console.log(result); |
| | | uni.hideLoading(); |
| | | if (success.err_code == 0) { |
| | | var result = success |
| | | .result; |
| | | if (success.result |
| | | .action) { |
| | | var action = JSON |
| | | .parse(success |
| | | .result.Action |
| | | ); |
| | | if (action.ret == |
| | | if (success.result |
| | | .action) { |
| | | var action = JSON |
| | | .parse(success |
| | | .result.Action |
| | | ); |
| | | if (action.ret == |
| | | '0') { |
| | | if (action |
| | | .result_type == |
| | | '0') { |
| | | if (action |
| | | .result_type == |
| | | '0') { |
| | | uni.showToast({ |
| | | title: action |
| | | .result, |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | } |
| | | // "{"ret":0, "result_type":0, "result":"创建成功123123123","info":""}" |
| | | uni.showToast({ |
| | | title: action |
| | | .result, |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | } |
| | | } else |
| | | uni.showToast({ |
| | | title: "创建成功!", |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/3037?param=' + |
| | | JSON |
| | | .stringify( |
| | | this |
| | | .$data |
| | | .param |
| | | ) + |
| | | "&titlename=" + |
| | | this.$data |
| | | .title |
| | | // "{"ret":0, "result_type":0, "result":"创建成功123123123","info":""}" |
| | | } |
| | | } else |
| | | uni.showToast({ |
| | | title: "创建成功!", |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | // this.class_attr_init(); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误", |
| | | content: success |
| | | .err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/3037?param=' + |
| | | JSON |
| | | .stringify( |
| | | this |
| | | .$data |
| | | .param |
| | | ) + |
| | | "&titlename=" + |
| | | this.$data |
| | | .title |
| | | }); |
| | | // this.class_attr_init(); |
| | | |
| | | }).catch(ex => { |
| | | console.log(ex); |
| | | uni.hideLoading(); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | ); //将字符串转换为base64编码 |
| | | var obj_attr = {}; |
| | | info.attr.forEach(item => { |
| | | obj_attr[item.attr] = item.val; |
| | | obj_attr[item.attr] = item.value; |
| | | }); |
| | | if (!info.eventid.includes('{')) info |
| | | .eventid = '{' + info.eventid + '}'; |
| | |
| | | }; |
| | | 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, |
| | | runCustomEvent( |
| | | dataInfo).then(data => { |
| | | console.log(data); |
| | | 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: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | 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: "取消" |
| | | }); |
| | | else uni.showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip + |
| | | ',提示:' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? |
| | | typeof data.info == |
| | | 'string' ? data |
| | | .info : data.info |
| | | .join('<br/>') : |
| | | ''; |
| | | if (tip) uni |
| | | .showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | |
| | | if (data.action) { |
| | | var actionlist = |
| | | data.action; |
| | | if (actionlist) { |
| | | for (var j = |
| | | 0; j < |
| | | actionlist |
| | | .length; j++ |
| | | if (data.action) { |
| | | var actionlist = |
| | | data.action; |
| | | if (actionlist) { |
| | | for (var j = |
| | | 0; j < |
| | | actionlist |
| | | .length; j++ |
| | | ) { |
| | | var action = |
| | | actionlist[ |
| | | j] |
| | | var action_type = |
| | | action |
| | | .action_type; |
| | | var value = |
| | | action |
| | | .value; |
| | | if (action_type == |
| | | 'set_dlg_attr' |
| | | ) { |
| | | var action = |
| | | actionlist[ |
| | | j] |
| | | var action_type = |
| | | action |
| | | .action_type; |
| | | var value = |
| | | action |
| | | .value; |
| | | if (action_type == |
| | | 'set_dlg_attr' |
| | | ) { |
| | | if ( |
| | | value) { |
| | | var val = |
| | | value; |
| | | if (typeof value == |
| | | 'string' |
| | | ) { |
| | | val = |
| | | JSON |
| | | .parse( |
| | | value |
| | | ); |
| | | } |
| | | console |
| | | .log( |
| | | val |
| | | if ( |
| | | value) { |
| | | var val = |
| | | value; |
| | | if (typeof value == |
| | | 'string' |
| | | ) { |
| | | val = |
| | | JSON |
| | | .parse( |
| | | value |
| | | ); |
| | | for ( |
| | | var i = |
| | | 0; i < |
| | | } |
| | | console |
| | | .log( |
| | | val |
| | | .length; i++ |
| | | ); |
| | | for ( |
| | | var i = |
| | | 0; i < |
| | | val |
| | | .length; i++ |
| | | ) { |
| | | for ( |
| | | var a = |
| | | 0; a < |
| | | this |
| | | .$data |
| | | .classAttrList |
| | | .length; a++ |
| | | ) { |
| | | for ( |
| | | var a = |
| | | 0; a < |
| | | var l = |
| | | 0; l < |
| | | this |
| | | .$data |
| | | .classAttrList |
| | | .length; a++ |
| | | .classAttrList[ |
| | | a |
| | | ] |
| | | .Attr |
| | | .length; l++ |
| | | ) { |
| | | for ( |
| | | var l = |
| | | 0; l < |
| | | var ca = |
| | | this |
| | | .$data |
| | | .classAttrList[ |
| | | a |
| | | ] |
| | | .Attr |
| | | .length; l++ |
| | | .Attr[ |
| | | l |
| | | ]; |
| | | if (val[ |
| | | i] |
| | | .attr == |
| | | ca |
| | | .Name |
| | | ) { |
| | | var ca = |
| | | this |
| | | .$data |
| | | .classAttrList[ |
| | | a |
| | | ] |
| | | .Attr[ |
| | | l |
| | | ]; |
| | | if (val[ |
| | | i] |
| | | .attr == |
| | | ca |
| | | .Name |
| | | ) { |
| | | if (classUtils.attrTypeIsDict(ca.Type)) { |
| | | var |
| | | dictItemList = []; |
| | | for ( |
| | | var d in |
| | | val[ |
| | | i] |
| | | .choice_list |
| | | ) { |
| | | var val = |
| | | val[ |
| | | i] |
| | | .choice_list[ |
| | | d |
| | | ]; |
| | | dictItemList |
| | | .push({ |
| | | "CN_S_NAME": val, |
| | | "CN_S_VALUE": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | if (utils.classUtils.attrTypeIsDict(ca.Type)) { |
| | | var |
| | | dictItemList = []; |
| | | for ( |
| | | var d in |
| | | val[ |
| | | i] |
| | | .choice_list |
| | | ) { |
| | | var val = |
| | | val[ |
| | | i] |
| | | .choice_list[ |
| | | d |
| | | ]; |
| | | dictItemList |
| | | .push({ |
| | | "CN_S_NAME": val, |
| | | "CN_S_VALUE": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | |
| | | } |
| | | ca.dictitem = |
| | | dictItemList; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | } else { |
| | | // ca.value = val[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = |
| | | 0; |
| | | if (! |
| | | this |
| | | .$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s |
| | | ) { |
| | | return val[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | } |
| | | ) |
| | | .length |
| | | ) { |
| | | length |
| | | = |
| | | 1; |
| | | this.$data |
| | | .refdatastore |
| | | .push( |
| | | val[ |
| | | i] |
| | | ); |
| | | } |
| | | if (length == |
| | | 0 |
| | | ) { |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | ) { |
| | | if (this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .attr == |
| | | val[ |
| | | i] |
| | | .attr |
| | | ) { |
| | | this.$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .value = |
| | | val[ |
| | | i] |
| | | .value; |
| | | ca.dictitem = |
| | | dictItemList; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | } else { |
| | | // ca.value = val[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (action_type == |
| | | 'open_select_userdlg' |
| | | ) { |
| | | uni.showModal({ |
| | | title: "错误2.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } |
| | | if (action_type == |
| | | 'open_select_userdlg' |
| | | ) { |
| | | uni.showModal({ |
| | | title: this.translateSys('error') + " 2.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误2", |
| | | content: success |
| | | .err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误2.1", |
| | | title: this.translateSys('error') + " 2.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | ); //将字符串转换为base64编码 |
| | | var obj_attr = {}; |
| | | info.attr.forEach(item => { |
| | | obj_attr[item.attr] = item.val; |
| | | obj_attr[item.attr] = item.value; |
| | | }); |
| | | if (!info.eventid.includes('{')) info |
| | | .eventid = '{' + info.eventid + '}'; |
| | |
| | | }; |
| | | 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, |
| | | runCustomEvent( |
| | | dataInfo).then(data => { |
| | | console.log(data); |
| | | 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: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | 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: "取消" |
| | | }); |
| | | else uni.showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip + |
| | | ',提示:' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? |
| | | typeof data.info == |
| | | 'string' ? data |
| | | .info : data.info |
| | | .join('<br/>') : |
| | | ''; |
| | | if (tip) uni |
| | | .showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | |
| | | var actionlist = data |
| | | .action; |
| | | if (actionlist) { |
| | | console.log( |
| | | actionlist); |
| | | for (var i = 0; i < |
| | | actionlist |
| | | .length; i++) { |
| | | var action = |
| | | actionlist[ |
| | | i]; |
| | | if (action |
| | | .action_type == |
| | | 'set_dlg_attr' |
| | | var actionlist = data |
| | | .action; |
| | | if (actionlist) { |
| | | console.log( |
| | | actionlist); |
| | | for (var i = 0; i < |
| | | actionlist |
| | | .length; i++) { |
| | | var action = |
| | | actionlist[ |
| | | i]; |
| | | if (action |
| | | .action_type == |
| | | 'set_dlg_attr' |
| | | ) { |
| | | var result = |
| | | action |
| | | .value; |
| | | for (var i = |
| | | 0; i < |
| | | result |
| | | .length; i++ |
| | | ) { |
| | | var result = |
| | | action |
| | | .value; |
| | | for (var i = |
| | | 0; i < |
| | | result |
| | | .length; i++ |
| | | if (result[ |
| | | i |
| | | ] |
| | | .choice_list |
| | | ) { |
| | | if (result[ |
| | | i |
| | | ] |
| | | .choice_list |
| | | ) { |
| | | for ( |
| | | var c = |
| | | 0; c < |
| | | $this |
| | | .$data |
| | | .classAttrList |
| | | .length; c++ |
| | | ) { |
| | | var attr = |
| | | $this |
| | | .$data |
| | | .classAttrList[ |
| | | c |
| | | ] |
| | | .Attr; |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | if (attr[ |
| | | j |
| | | ] |
| | | .Name == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | 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, |
| | | "CN_S_VALUE": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr[ |
| | | j] |
| | | .dictitem = |
| | | dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | for ( |
| | | var c = |
| | | 0; c < |
| | |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | console |
| | | .log( |
| | | attr[ |
| | | j |
| | | ] |
| | | .Name + |
| | | '==' + |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ); |
| | | if (attr[ |
| | | j |
| | | ] |
| | |
| | | ] |
| | | .attr |
| | | ) { |
| | | attr[ |
| | | j] |
| | | .Value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | if (utils.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, |
| | | "CN_S_VALUE": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr[ |
| | | j] |
| | | .dictitem = |
| | | dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | var length = |
| | | 0; |
| | | if (! |
| | | } |
| | | for ( |
| | | var c = |
| | | 0; c < |
| | | $this |
| | | .$data |
| | | .classAttrList |
| | | .length; c++ |
| | | ) { |
| | | var attr = |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s |
| | | ) { |
| | | return result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | } |
| | | ) |
| | | .length |
| | | .classAttrList[ |
| | | c |
| | | ] |
| | | .Attr; |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | length |
| | | = |
| | | 1; |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .push( |
| | | result[ |
| | | i |
| | | ] |
| | | ); |
| | | } |
| | | if (length == |
| | | 0 |
| | | ) { |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | ) { |
| | | if ($this |
| | | .$data |
| | | .refdatastore[ |
| | | console |
| | | .log( |
| | | attr[ |
| | | j |
| | | ] |
| | | .attr == |
| | | .Name + |
| | | '==' + |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | $this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else if (data |
| | | .action[i] |
| | | .action_type == |
| | | 'set_global_attr' |
| | | ) { |
| | | $this.$data |
| | | .global_attr = |
| | | data |
| | | .action[ |
| | | i] |
| | | .value || []; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (data.result) { |
| | | var result = data |
| | | .result; |
| | | for (var i = 0; i < |
| | | result |
| | | .length; i++) { |
| | | for (var c = |
| | | 0; c < |
| | | $this.$data |
| | | .classAttrList |
| | | .length; c++ |
| | | ) { |
| | | var attr = |
| | | $this |
| | | .$data |
| | | .classAttrList[ |
| | | c] |
| | | .Attr; |
| | | for (var j = |
| | | 0; j < |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | if (attr[ |
| | | j |
| | | ] |
| | | .Name == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | attr[ |
| | | j] |
| | | .Value = |
| | | ); |
| | | if (attr[ |
| | | j |
| | | ] |
| | | .Name == |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | .attr |
| | | ) { |
| | | attr[ |
| | | j] |
| | | .Value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else if (data |
| | | .action[i] |
| | | .action_type == |
| | | 'set_global_attr' |
| | | ) { |
| | | $this.$data |
| | | .global_attr = |
| | | data |
| | | .action[ |
| | | i] |
| | | .value || []; |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!$this |
| | | if (data.result) { |
| | | var result = data |
| | | .result; |
| | | for (var i = 0; i < |
| | | result |
| | | .length; i++) { |
| | | for (var c = |
| | | 0; c < |
| | | $this.$data |
| | | .classAttrList |
| | | .length; c++ |
| | | ) { |
| | | var attr = |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s |
| | | ) { |
| | | return result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | }) |
| | | .length) { |
| | | length = 1; |
| | | $this.$data |
| | | .refdatastore |
| | | .push( |
| | | .classAttrList[ |
| | | c] |
| | | .Attr; |
| | | for (var j = |
| | | 0; j < |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | if (attr[ |
| | | j |
| | | ] |
| | | .Name == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | attr[ |
| | | j] |
| | | .Value = |
| | | result[ |
| | | i |
| | | ] |
| | | ); |
| | | .value; |
| | | } |
| | | } |
| | | if (length == |
| | | 0) { |
| | | for (var j = |
| | | 0; j < |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!$this |
| | | .$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s |
| | | ) { |
| | | if ($this |
| | | return result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | }) |
| | | .length) { |
| | | length = 1; |
| | | $this.$data |
| | | .refdatastore |
| | | .push( |
| | | result[ |
| | | i |
| | | ] |
| | | ); |
| | | } |
| | | if (length == |
| | | 0) { |
| | | for (var j = |
| | | 0; j < |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | ) { |
| | | if ($this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .attr == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | $this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .attr == |
| | | .value = |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | $this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误3", |
| | | content: success |
| | | .err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误3.1", |
| | | title: this.translateSys('error') + " 3.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | ); //将字符串转换为base64编码 |
| | | var obj_attr = {}; |
| | | info.attr.forEach(item => { |
| | | obj_attr[item.attr] = item.val; |
| | | obj_attr[item.attr] = item.value; |
| | | }); |
| | | if (!eventid.includes('{')) eventid = '{' + |
| | | eventid + '}'; |
| | |
| | | }; |
| | | 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: "取消" |
| | | }); |
| | | runCustomEvent(dataInfo).then(data => { |
| | | console.log(data); |
| | | |
| | | var result = data |
| | | .result; |
| | | for (var i = 0; i < |
| | | result.length; i++ |
| | | ) { |
| | | // self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value); |
| | | var length = 0; |
| | | if (!this.$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s) { |
| | | return result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | }).length |
| | | ) { |
| | | length = 1; |
| | | this.$data |
| | | .refdatastore |
| | | .push( |
| | | result[ |
| | | i] |
| | | ); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = |
| | | 0; j < this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | ) { |
| | | if (this |
| | | .$data |
| | | .refdatastore[ |
| | | j] |
| | | 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: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | else uni.showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip + |
| | | ',提示:' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? |
| | | typeof data.info == |
| | | 'string' ? data |
| | | .info : data.info |
| | | .join('<br/>') : |
| | | ''; |
| | | if (tip) uni |
| | | .showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | |
| | | var result = data |
| | | .result; |
| | | for (var i = 0; i < |
| | | result.length; i++ |
| | | ) { |
| | | // self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value); |
| | | var length = 0; |
| | | if (!this.$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s) { |
| | | return result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | result[ |
| | | i] |
| | | s |
| | | .attr |
| | | ) { |
| | | this.$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | }).length |
| | | ) { |
| | | length = 1; |
| | | this.$data |
| | | .refdatastore |
| | | .push( |
| | | result[ |
| | | i] |
| | | ); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = |
| | | 0; j < this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | ) { |
| | | if (this |
| | | .$data |
| | | .refdatastore[ |
| | | j] |
| | | .attr == |
| | | result[ |
| | | i] |
| | | .attr |
| | | ) { |
| | | this.$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | |
| | | this.add(); |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误4", |
| | | content: success |
| | | .err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | |
| | | this.add(); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误4.1", |
| | | title: this.translateSys('error') + " 4.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | ); //将字符串转换为base64编码 |
| | | var obj_attr = {}; |
| | | req.forEach(item => { |
| | | obj_attr[item.attr] = item.val; |
| | | obj_attr[item.attr] = item.value; |
| | | }); |
| | | if (!eventid.includes('{')) eventid = '{' + |
| | | eventid + '}'; |
| | |
| | | }; |
| | | 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, |
| | | runCustomEvent(dataInfo).then(data => { |
| | | console.log(data); |
| | | 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: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | 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: "取消" |
| | | }); |
| | | else uni.showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip + |
| | | ',提示:' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? |
| | | typeof data.info == |
| | | 'string' ? data |
| | | .info : data.info |
| | | .join('<br/>') : |
| | | ''; |
| | | if (tip) uni |
| | | .showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | |
| | | if (data != "") { |
| | | var actions = data |
| | | .action; |
| | | console.log( |
| | | actions); |
| | | if (actions) { |
| | | for (var i = |
| | | 0; i < |
| | | actions |
| | | .length; i++ |
| | | if (data != "") { |
| | | var actions = data |
| | | .action; |
| | | console.log( |
| | | actions); |
| | | if (actions) { |
| | | for (var i = |
| | | 0; i < |
| | | actions |
| | | .length; i++ |
| | | ) { |
| | | var action = |
| | | actions[ |
| | | i]; |
| | | var val = |
| | | action |
| | | .value; |
| | | var enviroment = |
| | | JSON |
| | | .stringify( |
| | | enviroment |
| | | ); |
| | | |
| | | if (action |
| | | .action_type == |
| | | 'open_panel' |
| | | ) { |
| | | var action = |
| | | actions[ |
| | | i]; |
| | | var val = |
| | | var d = |
| | | dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | this.translateSys('tip'), |
| | | content: action |
| | | .action_type + |
| | | '此action尚未处理!' |
| | | }); |
| | | d |
| | | .show(); |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'open_select_userdlg' |
| | | ) { |
| | | var style = |
| | | val |
| | | .style; |
| | | // style == 'user' ? '选择人员' : style == 'department' ? '选择部门' : style == 'role' ? '选择角色' : '' |
| | | var $this = |
| | | this; |
| | | var param = { |
| | | index: index, |
| | | iindex: iindex, |
| | | button_callback: button_callback, |
| | | req: req, |
| | | data_attr: data_attr |
| | | } |
| | | uni.navigateTo({ |
| | | 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 info = { |
| | | eventid: callback_eventid, |
| | | edtype: "0", |
| | | projectid: '', |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: $this |
| | | .$data |
| | | .param |
| | | .Master_Cls |
| | | .ID, |
| | | objid: "", |
| | | attr: param |
| | | .req, |
| | | inputparameter: data |
| | | } |
| | | $this |
| | | .DataObjRunCustomEvent( |
| | | info, |
| | | param |
| | | .data_attr |
| | | ); |
| | | } |
| | | } |
| | | }); |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'open_data_query_dlg' |
| | | ) { |
| | | |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'open_common_dlg' |
| | | ) { |
| | | var value = |
| | | action |
| | | .value; |
| | | var enviroment = |
| | | JSON |
| | | .stringify( |
| | | enviroment |
| | | ); |
| | | |
| | | var d = |
| | | dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | this.translateSys('tip'), |
| | | content: action |
| | | .action_type + |
| | | '此action尚未处理!' |
| | | }); |
| | | d |
| | | .show(); |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'open_project_query_dlg' |
| | | ) { |
| | | //console.log(action.value.select_range); |
| | | //console.log(action.value.mulit_select); |
| | | var priRel = |
| | | '-1'; |
| | | if (action |
| | | .action_type == |
| | | 'open_panel' |
| | | ) { |
| | | var d = |
| | | dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | content: action |
| | | .action_type + |
| | | '此action尚未处理!' |
| | | }); |
| | | d |
| | | .show(); |
| | | } else if ( |
| | | .value |
| | | .select_range == |
| | | '全部相关' |
| | | ) |
| | | priRel = |
| | | '0'; |
| | | else if ( |
| | | action |
| | | .action_type == |
| | | 'open_select_userdlg' |
| | | ) { |
| | | var style = |
| | | val |
| | | .style; |
| | | // style == 'user' ? '选择人员' : style == 'department' ? '选择部门' : style == 'role' ? '选择角色' : '' |
| | | var $this = |
| | | this; |
| | | var param = { |
| | | index: index, |
| | | iindex: iindex, |
| | | button_callback: button_callback, |
| | | req: req, |
| | | data_attr: data_attr |
| | | } |
| | | uni.navigateTo({ |
| | | url: '../selpsn/index?mulit=false¶m=' + |
| | | JSON |
| | | .stringify( |
| | | param |
| | | ), |
| | | events: { |
| | | AddPer( |
| | | data, |
| | | param |
| | | ) { |
| | | // console.log(param); |
| | | console |
| | | .log( |
| | | data |
| | | ); |
| | | var callback_eventid = |
| | | .value |
| | | .select_range == |
| | | '我负责的项目' |
| | | ) |
| | | priRel = |
| | | '1'; |
| | | else if ( |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我创建的' |
| | | ) |
| | | priRel = |
| | | '2'; |
| | | else if ( |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我参与的' || |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我参加的' |
| | | ) |
| | | priRel = |
| | | '3'; |
| | | else if ( |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我关注的' |
| | | ) |
| | | priRel = |
| | | '4'; |
| | | else if ( |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我下属的项目' |
| | | ) |
| | | priRel = |
| | | '5'; |
| | | |
| | | var $this = |
| | | this; |
| | | var param_ = { |
| | | index: index, |
| | | iindex: iindex, |
| | | button_callback: button_callback, |
| | | req: req |
| | | } |
| | | uni.navigateTo({ |
| | | url: '../selPrj/index?relation=' + |
| | | priRel + |
| | | '¶m=' + |
| | | JSON |
| | | .stringify( |
| | | param_ |
| | | ), |
| | | events: { |
| | | AddPer( |
| | | data, |
| | | param |
| | | ) { |
| | | $this |
| | | .$data |
| | | .classAttrList[ |
| | | param |
| | | .button_callback |
| | | .trim(); |
| | | .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 = { |
| | | eventid: callback_eventid, |
| | | edtype: "0", |
| | | projectid: '', |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | edtype: "2", |
| | | projectid: data[ |
| | | 0 |
| | | ] |
| | | .ID, |
| | | rclsid: "", |
| | | robjid: "", |
| | | userlogin: "", |
| | | clsid: $this |
| | | .$data |
| | | .param |
| | |
| | | objid: "", |
| | | attr: param |
| | | .req, |
| | | inputparameter: data |
| | | } |
| | | |
| | | $this |
| | | .DataObjRunCustomEvent( |
| | | info, |
| | | param |
| | | .data_attr |
| | | info |
| | | ); |
| | | } |
| | | } |
| | | }); |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'open_data_query_dlg' |
| | | ) { |
| | | |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'open_common_dlg' |
| | | ) { |
| | | var value = |
| | | action |
| | | .value; |
| | | 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_project_query_dlg' |
| | | ) { |
| | | //console.log(action.value.select_range); |
| | | //console.log(action.value.mulit_select); |
| | | var priRel = |
| | | '-1'; |
| | | if (action |
| | | .value |
| | | .select_range == |
| | | '全部相关' |
| | | ) |
| | | priRel = |
| | | '0'; |
| | | else if ( |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我负责的项目' |
| | | ) |
| | | priRel = |
| | | '1'; |
| | | else if ( |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我创建的' |
| | | ) |
| | | priRel = |
| | | '2'; |
| | | else if ( |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我参与的' || |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我参加的' |
| | | ) |
| | | priRel = |
| | | '3'; |
| | | else if ( |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我关注的' |
| | | ) |
| | | priRel = |
| | | '4'; |
| | | else if ( |
| | | action |
| | | .value |
| | | .select_range == |
| | | '我下属的项目' |
| | | ) |
| | | priRel = |
| | | '5'; |
| | | |
| | | var $this = |
| | | this; |
| | | var param_ = { |
| | | index: index, |
| | | iindex: iindex, |
| | | button_callback: button_callback, |
| | | req: req |
| | | } |
| | | uni.navigateTo({ |
| | | 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; |
| | | var callback_eventid = |
| | | param |
| | | .button_callback |
| | | .trim(); |
| | | if ( |
| | | callback_eventid) { |
| | | var info = { |
| | | eventid: callback_eventid, |
| | | edtype: "2", |
| | | projectid: data[ |
| | | 0 |
| | | ] |
| | | .ID, |
| | | rclsid: "", |
| | | robjid: "", |
| | | userlogin: "", |
| | | clsid: $this |
| | | .$data |
| | | .param |
| | | .Master_Cls |
| | | .ID, |
| | | objid: "", |
| | | attr: param |
| | | .req, |
| | | } |
| | | |
| | | $this |
| | | .DataObjRunCustomEvent( |
| | | info |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | var d = |
| | | dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | this.translateSys('tip'), |
| | | content: action |
| | | .action_type + |
| | | '此action尚未处理!' |
| | | }); |
| | | } else { |
| | | var d = |
| | | dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | content: action |
| | | .action_type + |
| | | '此action尚未处理!' |
| | | }); |
| | | d |
| | | .show(); |
| | | } |
| | | d |
| | | .show(); |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示5.2", |
| | | content: '调用 before_click_button 脚本返回空,event_id' + |
| | | eventid, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: this.translateSys('tip') + "5.2", |
| | | content: '调用 before_click_button 脚本返回空,event_id' + |
| | | eventid, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误5", |
| | | content: success |
| | | .err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "提示5.1", |
| | | title: this.translateSys('tip') + "5.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | }; |
| | | 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, |
| | | runCustomEvent(dataInfo).then(data => { |
| | | console.log(data); |
| | | 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: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | 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: "取消" |
| | | }); |
| | | else uni.showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip + |
| | | ',提示:' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? |
| | | typeof data.info == |
| | | 'string' ? data |
| | | .info : data.info |
| | | .join('<br/>') : |
| | | ''; |
| | | if (tip) uni |
| | | .showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | |
| | | var actionlist = data |
| | | .action; |
| | | if (actionlist) { |
| | | for (var j = 0; j < |
| | | actionlist |
| | | .length; j++) { |
| | | var action = |
| | | actionlist[ |
| | | j] |
| | | var action_type = |
| | | action |
| | | .action_type; |
| | | var value = |
| | | action |
| | | .value; |
| | | if (action_type == |
| | | 'set_dlg_attr' |
| | | ) { |
| | | if ( |
| | | value) { |
| | | var val = |
| | | value; |
| | | if (typeof value == |
| | | 'string' |
| | | ) { |
| | | val = |
| | | JSON |
| | | .parse( |
| | | value |
| | | ); |
| | | } |
| | | console |
| | | .log( |
| | | val |
| | | var actionlist = data |
| | | .action; |
| | | if (actionlist) { |
| | | for (var j = 0; j < |
| | | actionlist |
| | | .length; j++) { |
| | | var action = |
| | | actionlist[ |
| | | j] |
| | | var action_type = |
| | | action |
| | | .action_type; |
| | | var value = |
| | | action |
| | | .value; |
| | | if (action_type == |
| | | 'set_dlg_attr' |
| | | ) { |
| | | if ( |
| | | value) { |
| | | var val = |
| | | value; |
| | | if (typeof value == |
| | | 'string' |
| | | ) { |
| | | val = |
| | | JSON |
| | | .parse( |
| | | value |
| | | ); |
| | | for ( |
| | | var i = |
| | | 0; i < |
| | | } |
| | | console |
| | | .log( |
| | | val |
| | | .length; i++ |
| | | ); |
| | | for ( |
| | | var i = |
| | | 0; i < |
| | | val |
| | | .length; i++ |
| | | ) { |
| | | for ( |
| | | var a = |
| | | 0; a < |
| | | this |
| | | .$data |
| | | .subClassAttrList |
| | | .length; a++ |
| | | ) { |
| | | for ( |
| | | var a = |
| | | 0; a < |
| | | var l = |
| | | 0; l < |
| | | this |
| | | .$data |
| | | .subClassAttrList |
| | | .length; a++ |
| | | .subClassAttrList[ |
| | | a |
| | | ] |
| | | .Attr |
| | | .length; l++ |
| | | ) { |
| | | for ( |
| | | var l = |
| | | 0; l < |
| | | var ca = |
| | | this |
| | | .$data |
| | | .subClassAttrList[ |
| | | a |
| | | ] |
| | | .Attr |
| | | .length; l++ |
| | | .Attr[ |
| | | l |
| | | ]; |
| | | if (val[ |
| | | i] |
| | | .attr == |
| | | ca |
| | | .Name |
| | | ) { |
| | | var ca = |
| | | this |
| | | .$data |
| | | .subClassAttrList[ |
| | | a |
| | | ] |
| | | .Attr[ |
| | | l |
| | | ]; |
| | | if (val[ |
| | | i] |
| | | .attr == |
| | | ca |
| | | .Name |
| | | ) { |
| | | if (classUtils.attrTypeIsDict(ca.Type)) { |
| | | var |
| | | dictItemList = []; |
| | | for ( |
| | | var d in |
| | | val[ |
| | | i] |
| | | .choice_list |
| | | ) { |
| | | var val = |
| | | val[ |
| | | i] |
| | | .choice_list[ |
| | | d |
| | | ]; |
| | | dictItemList |
| | | .push({ |
| | | "CN_S_NAME": val, |
| | | "CN_S_VALUE": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | if (utils.classUtils.attrTypeIsDict(ca.Type)) { |
| | | var |
| | | dictItemList = []; |
| | | for ( |
| | | var d in |
| | | val[ |
| | | i] |
| | | .choice_list |
| | | ) { |
| | | var val = |
| | | val[ |
| | | i] |
| | | .choice_list[ |
| | | d |
| | | ]; |
| | | dictItemList |
| | | .push({ |
| | | "CN_S_NAME": val, |
| | | "CN_S_VALUE": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | |
| | | } |
| | | ca.dictitem = |
| | | dictItemList; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | } else { |
| | | // ca.value = val[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = |
| | | 0; |
| | | if (! |
| | | this |
| | | .$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s |
| | | ) { |
| | | return val[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | } |
| | | ) |
| | | .length |
| | | ) { |
| | | length |
| | | = |
| | | 1; |
| | | this.$data |
| | | .refdatastore |
| | | .push( |
| | | val[ |
| | | i] |
| | | ); |
| | | } |
| | | if (length == |
| | | 0 |
| | | ) { |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | ) { |
| | | if (this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .attr == |
| | | val[ |
| | | i] |
| | | .attr |
| | | ) { |
| | | this.$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .value = |
| | | val[ |
| | | i] |
| | | .value; |
| | | ca.dictitem = |
| | | dictItemList; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | } else { |
| | | // ca.value = val[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (action_type == |
| | | 'open_select_userdlg' |
| | | ) { |
| | | uni.showModal({ |
| | | title: "错误6.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } |
| | | if (action_type == |
| | | 'open_select_userdlg' |
| | | ) { |
| | | uni.showModal({ |
| | | title: this.translateSys('error') + " 6.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误6", |
| | | content: success |
| | | .err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误6.1", |
| | | title: this.translateSys('error') + " 6.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | }; |
| | | 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, |
| | | runCustomEvent(dataInfo).then(data => { |
| | | console.log(data); |
| | | 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: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | 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: "取消" |
| | | }); |
| | | else uni.showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip + |
| | | ',提示:' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? |
| | | typeof data.info == |
| | | 'string' ? data |
| | | .info : data.info |
| | | .join('<br/>') : |
| | | ''; |
| | | if (tip) uni |
| | | .showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | |
| | | var actionlist = data |
| | | .action; |
| | | if (actionlist) { |
| | | console.log( |
| | | actionlist); |
| | | for (var ii = |
| | | 0; ii < |
| | | actionlist |
| | | .length; ii++ |
| | | var actionlist = data |
| | | .action; |
| | | if (actionlist) { |
| | | console.log( |
| | | actionlist); |
| | | for (var ii = |
| | | 0; ii < |
| | | actionlist |
| | | .length; ii++ |
| | | ) { |
| | | var action = |
| | | actionlist[ |
| | | ii]; |
| | | if (action |
| | | .action_type == |
| | | 'set_dlg_attr' |
| | | ) { |
| | | var action = |
| | | actionlist[ |
| | | ii]; |
| | | if (action |
| | | .action_type == |
| | | 'set_dlg_attr' |
| | | var result = |
| | | action |
| | | .value; |
| | | for (var i = |
| | | 0; i < |
| | | result |
| | | .length; i++ |
| | | ) { |
| | | var result = |
| | | action |
| | | .value; |
| | | for (var i = |
| | | 0; i < |
| | | result |
| | | .length; i++ |
| | | if (result[ |
| | | i |
| | | ] |
| | | .choice_list |
| | | ) { |
| | | if (result[ |
| | | i |
| | | ] |
| | | .choice_list |
| | | ) { |
| | | for ( |
| | | var s = |
| | | 0; s < |
| | | $this |
| | | .$data |
| | | .subPanelList |
| | | .length; s++ |
| | | ) { |
| | | for ( |
| | | var c = |
| | | 0; c < |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .subClassAttrList |
| | | .length; c++ |
| | | ) { |
| | | var attr = |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .subClassAttrList[ |
| | | c |
| | | ] |
| | | .Attr; |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | if (attr[ |
| | | j |
| | | ] |
| | | .Name == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | 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, |
| | | "CN_S_VALUE": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr[ |
| | | j] |
| | | .dictitem = |
| | | dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | for ( |
| | | var s = |
| | | 0; s < |
| | |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | console |
| | | .log( |
| | | attr[ |
| | | j |
| | | ] |
| | | .Name + |
| | | '==' + |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ); |
| | | if (attr[ |
| | | j |
| | | ] |
| | |
| | | ] |
| | | .attr |
| | | ) { |
| | | attr[ |
| | | j] |
| | | .Value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | if (utils.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, |
| | | "CN_S_VALUE": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr[ |
| | | j] |
| | | .dictitem = |
| | | dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | var length = |
| | | 0; |
| | | if (! |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s |
| | | ) { |
| | | return result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | } |
| | | ) |
| | | .length |
| | | ) { |
| | | length |
| | | = |
| | | 1; |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .push( |
| | | result[ |
| | | i |
| | | ] |
| | | ); |
| | | } |
| | | if (length == |
| | | 0 |
| | | ) { |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | ) { |
| | | if ($this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .attr == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | $this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'set_global_attr' |
| | | ) { |
| | | $this |
| | | .$actiontr = |
| | | action |
| | | .value || []; |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'open_common_dlg' |
| | | ) { //打开侧滑弹框 |
| | | var $this = |
| | | this; |
| | | if (action |
| | | .value |
| | | .common_dlg_id == |
| | | 'check_list' |
| | | ) { |
| | | $this |
| | | .$data |
| | | .check_list = |
| | | action |
| | | .value |
| | | .config; |
| | | if (action |
| | | .value |
| | | .config |
| | | .appear_style == |
| | | 'sideslip' |
| | | ) //判断是否是侧滑 |
| | | $this |
| | | .$data |
| | | .popupType = |
| | | 'right'; |
| | | else |
| | | $this |
| | | .$data |
| | | .popupType = |
| | | 'center' |
| | | // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
| | | $this |
| | | .$refs |
| | | .popup |
| | | .open( |
| | | $this |
| | | .$data |
| | | .popupType |
| | | ); |
| | | } |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'add_subcls_panel' |
| | | ) { //主从数据类扫码查询数据 |
| | | var result = |
| | | action |
| | | .value; |
| | | var $this = |
| | | this; |
| | | var list_1 = |
| | | JSON |
| | | .parse( |
| | | JSON |
| | | .stringify( |
| | | this |
| | | .$data |
| | | .subClassAttrList |
| | | ) |
| | | ); |
| | | var scanCodeVal = |
| | | for ( |
| | | var s = |
| | | 0; s < |
| | | $this |
| | | .$data |
| | | .scanCodeVal; |
| | | var rand = |
| | | ''; |
| | | for (var i = |
| | | 0; i < |
| | | 5; i++ |
| | | ) { //生成5位随机数 |
| | | rand += |
| | | Math |
| | | .floor( |
| | | Math |
| | | .random() * |
| | | 10 |
| | | ); |
| | | } |
| | | if (inputParamter[ |
| | | 0] |
| | | .attr |
| | | ) { |
| | | if (inputParamter[ |
| | | 0 |
| | | ] |
| | | .attr == |
| | | "mast_input_3037" |
| | | ) //判断是主数据类扫码查询数据 |
| | | scanCodeVal = |
| | | "mast_input_3037-" + |
| | | rand; |
| | | } |
| | | if (info |
| | | .attr[ |
| | | 0] |
| | | .attr |
| | | ) { |
| | | if (info |
| | | .attr[ |
| | | 0 |
| | | ] |
| | | .attr == |
| | | "mast_input_3037" |
| | | ) //判断是主数据类扫码查询数据 |
| | | scanCodeVal = |
| | | "mast_input_3037-" + |
| | | rand; |
| | | } |
| | | $this.$data |
| | | .subPanelList |
| | | .push({ |
| | | scanCodeVal: scanCodeVal, |
| | | subClassAttr: list_1 |
| | | }); |
| | | for (var i = |
| | | 0; i < |
| | | result |
| | | .length; i++ |
| | | .length; s++ |
| | | ) { |
| | | for ( |
| | | var s = |
| | | 0; s < |
| | | var c = |
| | | 0; c < |
| | | $this |
| | | .$data |
| | | .subPanelList |
| | | .length; s++ |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .subClassAttrList |
| | | .length; c++ |
| | | ) { |
| | | if ($this |
| | | var attr = |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .scanCodeVal == |
| | | scanCodeVal |
| | | ) { |
| | | if (result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | "S_ID" |
| | | ) |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .ObjID = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | var _subClassAttr = |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .subClassAttr; |
| | | for ( |
| | | var c = |
| | | 0; c < |
| | | _subClassAttr |
| | | .length; c++ |
| | | ) { |
| | | var attr = |
| | | _subClassAttr[ |
| | | c |
| | | ] |
| | | .Attr; |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | if (attr[ |
| | | j |
| | | ] |
| | | .Name == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | attr[ |
| | | j] |
| | | .Value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // $this.$data.subPanelList[s].subClassAttr=list_1; |
| | | } |
| | | } |
| | | |
| | | var length = |
| | | 0; |
| | | if (! |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s |
| | | ) { |
| | | return result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | } |
| | | ) |
| | | .length |
| | | ) { |
| | | length |
| | | = |
| | | 1; |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .push( |
| | | result[ |
| | | i |
| | | ] |
| | | ); |
| | | } |
| | | if (length == |
| | | 0 |
| | | ) { |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | ) { |
| | | if ($this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .attr == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | $this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (data.result) { |
| | | var list_1 = JSON |
| | | .parse(JSON |
| | | .stringify( |
| | | this |
| | | .$data |
| | | .subClassAttrList |
| | | )); |
| | | var scanCodeVal = |
| | | $this.$data |
| | | .scanCodeVal; |
| | | var rand = ''; |
| | | for (var i = 0; i < |
| | | 5; i++ |
| | | ) { //生成5位随机数 |
| | | rand += Math |
| | | .floor(Math |
| | | .random() * |
| | | 10); |
| | | } |
| | | if (inputParamter[ |
| | | 0].attr) { |
| | | if (inputParamter[ |
| | | 0] |
| | | .attr == |
| | | "mast_input_3037" |
| | | ) //判断是主数据类扫码查询数据 |
| | | scanCodeVal = |
| | | "mast_input_3037-" + |
| | | rand; |
| | | } |
| | | if (info.attr[0] |
| | | .attr) { |
| | | if (info.attr[ |
| | | 0] |
| | | .attr == |
| | | "mast_input_3037" |
| | | ) //判断是主数据类扫码查询数据 |
| | | scanCodeVal = |
| | | "mast_input_3037-" + |
| | | rand; |
| | | } |
| | | $this.$data |
| | | .subPanelList |
| | | .push({ |
| | | scanCodeVal: scanCodeVal, |
| | | subClassAttr: list_1 |
| | | }); |
| | | var result = data |
| | | .result; |
| | | for (var i = 0; i < |
| | | result |
| | | .length; i++) { |
| | | for (var s = |
| | | 0; s < |
| | | $this.$data |
| | | .subPanelList |
| | | .length; s++ |
| | | ) { |
| | | if ($this |
| | | .$data |
| | | .subPanelList[ |
| | | s] |
| | | .scanCodeVal == |
| | | scanCodeVal |
| | | ) { |
| | | if (result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | "S_ID" |
| | | ) |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .ObjID = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | var _subClassAttr = |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .subClassAttr; |
| | | for ( |
| | | var c = |
| | | 0; c < |
| | | _subClassAttr |
| | | .length; c++ |
| | | ) { |
| | | var attr = |
| | | _subClassAttr[ |
| | | .subClassAttrList[ |
| | | c |
| | | ] |
| | | .Attr; |
| | |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | console |
| | | .log( |
| | | attr[ |
| | | j |
| | | ] |
| | | .Name + |
| | | '==' + |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ); |
| | | if (attr[ |
| | | j |
| | | ] |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!$this |
| | | .$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s |
| | | ) { |
| | | return result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | }) |
| | | .length) { |
| | | length = 1; |
| | | $this.$data |
| | | .refdatastore |
| | | .push( |
| | | result[ |
| | | i |
| | | ] |
| | | ); |
| | | } |
| | | if (length == |
| | | 0) { |
| | | for (var j = |
| | | 0; j < |
| | | } |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'set_global_attr' |
| | | ) { |
| | | $this |
| | | .$actiontr = |
| | | action |
| | | .value || []; |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'open_common_dlg' |
| | | ) { //打开侧滑弹框 |
| | | var $this = |
| | | this; |
| | | if (action |
| | | .value |
| | | .common_dlg_id == |
| | | 'check_list' |
| | | ) { |
| | | $this |
| | | .$data |
| | | .check_list = |
| | | action |
| | | .value |
| | | .config; |
| | | if (action |
| | | .value |
| | | .config |
| | | .appear_style == |
| | | 'sideslip' |
| | | ) //判断是否是侧滑 |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | .popupType = |
| | | 'right'; |
| | | else |
| | | $this |
| | | .$data |
| | | .popupType = |
| | | 'center' |
| | | // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
| | | $this |
| | | .$refs |
| | | .popup |
| | | .open( |
| | | $this |
| | | .$data |
| | | .popupType |
| | | ); |
| | | } |
| | | } else if ( |
| | | action |
| | | .action_type == |
| | | 'add_subcls_panel' |
| | | ) { //主从数据类扫码查询数据 |
| | | var result = |
| | | action |
| | | .value; |
| | | var $this = |
| | | this; |
| | | var list_1 = |
| | | JSON |
| | | .parse( |
| | | JSON |
| | | .stringify( |
| | | this |
| | | .$data |
| | | .subClassAttrList |
| | | ) |
| | | ); |
| | | var scanCodeVal = |
| | | $this |
| | | .$data |
| | | .scanCodeVal; |
| | | var rand = |
| | | ''; |
| | | for (var i = |
| | | 0; i < |
| | | 5; i++ |
| | | ) { //生成5位随机数 |
| | | rand += |
| | | Math |
| | | .floor( |
| | | Math |
| | | .random() * |
| | | 10 |
| | | ); |
| | | } |
| | | if (inputParamter[ |
| | | 0] |
| | | .attr |
| | | ) { |
| | | if (inputParamter[ |
| | | 0 |
| | | ] |
| | | .attr == |
| | | "mast_input_3037" |
| | | ) //判断是主数据类扫码查询数据 |
| | | scanCodeVal = |
| | | "mast_input_3037-" + |
| | | rand; |
| | | } |
| | | if (info |
| | | .attr[ |
| | | 0] |
| | | .attr |
| | | ) { |
| | | if (info |
| | | .attr[ |
| | | 0 |
| | | ] |
| | | .attr == |
| | | "mast_input_3037" |
| | | ) //判断是主数据类扫码查询数据 |
| | | scanCodeVal = |
| | | "mast_input_3037-" + |
| | | rand; |
| | | } |
| | | $this.$data |
| | | .subPanelList |
| | | .push({ |
| | | scanCodeVal: scanCodeVal, |
| | | subClassAttr: list_1 |
| | | }); |
| | | for (var i = |
| | | 0; i < |
| | | result |
| | | .length; i++ |
| | | ) { |
| | | for ( |
| | | var s = |
| | | 0; s < |
| | | $this |
| | | .$data |
| | | .subPanelList |
| | | .length; s++ |
| | | ) { |
| | | if ($this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .attr == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | .scanCodeVal == |
| | | scanCodeVal |
| | | ) { |
| | | $this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | if (result[ |
| | | i |
| | | ] |
| | | .value = |
| | | .attr == |
| | | "S_ID" |
| | | ) |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .ObjID = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | var _subClassAttr = |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .subClassAttr; |
| | | for ( |
| | | var c = |
| | | 0; c < |
| | | _subClassAttr |
| | | .length; c++ |
| | | ) { |
| | | var attr = |
| | | _subClassAttr[ |
| | | c |
| | | ] |
| | | .Attr; |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | if (attr[ |
| | | j |
| | | ] |
| | | .Name == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | attr[ |
| | | j] |
| | | .Value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // $this.$data.subPanelList[s].subClassAttr=list_1; |
| | | } |
| | | } |
| | | |
| | | var length = |
| | | 0; |
| | | if (! |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s |
| | | ) { |
| | | return result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | } |
| | | ) |
| | | .length |
| | | ) { |
| | | length |
| | | = |
| | | 1; |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .push( |
| | | result[ |
| | | i |
| | | ] |
| | | ); |
| | | } |
| | | if (length == |
| | | 0 |
| | | ) { |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | ) { |
| | | if ($this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .attr == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | $this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误7", |
| | | content: success |
| | | .err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | |
| | | if (data.result) { |
| | | var list_1 = JSON |
| | | .parse(JSON |
| | | .stringify( |
| | | this |
| | | .$data |
| | | .subClassAttrList |
| | | )); |
| | | var scanCodeVal = |
| | | $this.$data |
| | | .scanCodeVal; |
| | | var rand = ''; |
| | | for (var i = 0; i < |
| | | 5; i++ |
| | | ) { //生成5位随机数 |
| | | rand += Math |
| | | .floor(Math |
| | | .random() * |
| | | 10); |
| | | } |
| | | if (inputParamter[ |
| | | 0].attr) { |
| | | if (inputParamter[ |
| | | 0] |
| | | .attr == |
| | | "mast_input_3037" |
| | | ) //判断是主数据类扫码查询数据 |
| | | scanCodeVal = |
| | | "mast_input_3037-" + |
| | | rand; |
| | | } |
| | | if (info.attr[0] |
| | | .attr) { |
| | | if (info.attr[ |
| | | 0] |
| | | .attr == |
| | | "mast_input_3037" |
| | | ) //判断是主数据类扫码查询数据 |
| | | scanCodeVal = |
| | | "mast_input_3037-" + |
| | | rand; |
| | | } |
| | | $this.$data |
| | | .subPanelList |
| | | .push({ |
| | | scanCodeVal: scanCodeVal, |
| | | subClassAttr: list_1 |
| | | }); |
| | | var result = data |
| | | .result; |
| | | for (var i = 0; i < |
| | | result |
| | | .length; i++) { |
| | | for (var s = |
| | | 0; s < |
| | | $this.$data |
| | | .subPanelList |
| | | .length; s++ |
| | | ) { |
| | | if ($this |
| | | .$data |
| | | .subPanelList[ |
| | | s] |
| | | .scanCodeVal == |
| | | scanCodeVal |
| | | ) { |
| | | if (result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | "S_ID" |
| | | ) |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .ObjID = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | var _subClassAttr = |
| | | $this |
| | | .$data |
| | | .subPanelList[ |
| | | s |
| | | ] |
| | | .subClassAttr; |
| | | for ( |
| | | var c = |
| | | 0; c < |
| | | _subClassAttr |
| | | .length; c++ |
| | | ) { |
| | | var attr = |
| | | _subClassAttr[ |
| | | c |
| | | ] |
| | | .Attr; |
| | | for ( |
| | | var j = |
| | | 0; j < |
| | | attr |
| | | .length; j++ |
| | | ) { |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | if (attr[ |
| | | j |
| | | ] |
| | | .Name == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | attr[ |
| | | j] |
| | | .Value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!$this |
| | | .$data |
| | | .refdatastore |
| | | .filter( |
| | | function( |
| | | s |
| | | ) { |
| | | return result[ |
| | | i |
| | | ] |
| | | .attr == |
| | | s |
| | | .attr |
| | | }) |
| | | .length) { |
| | | length = 1; |
| | | $this.$data |
| | | .refdatastore |
| | | .push( |
| | | result[ |
| | | i |
| | | ] |
| | | ); |
| | | } |
| | | if (length == |
| | | 0) { |
| | | for (var j = |
| | | 0; j < |
| | | $this |
| | | .$data |
| | | .refdatastore |
| | | .length; j++ |
| | | ) { |
| | | if ($this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .attr == |
| | | result[ |
| | | i |
| | | ] |
| | | .attr |
| | | ) { |
| | | $this |
| | | .$data |
| | | .refdatastore[ |
| | | j |
| | | ] |
| | | .value = |
| | | result[ |
| | | i |
| | | ] |
| | | .value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误7.1", |
| | | title: this.translateSys('error') + " 7.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | if (ar.Value == '请选择' || ar |
| | | .Value == '——请选择——') ar.Value = |
| | | ''; |
| | | if (classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (ar.select == |
| | | true) { //判断下拉是否多选 |
| | | var valStr = ""; |
| | |
| | | uni.hideLoading(); |
| | | // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: ar |
| | | .DispName + |
| | | '不能为空!', |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | if (ar.Value == '请选择' || ar |
| | | .Value == '——请选择——') ar |
| | | .Value = ''; |
| | | if (classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (ar.select == |
| | | true) { //判断下拉是否多选 |
| | | var valStr = ""; |
| | |
| | | uni.hideLoading(); |
| | | // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: ar |
| | | .DispName + |
| | | '不能为空!', |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | }; |
| | | console.log(dataInfo); |
| | | // return; |
| | | this.$store.dispatch('runCustomEvent', |
| | | dataInfo).then(success => { |
| | | console.log(success); |
| | | runCustomEvent(dataInfo).then(data => { |
| | | console.log(data); |
| | | uni.hideLoading(); |
| | | 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, |
| | | 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: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | 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: "取消" |
| | | }); |
| | | else uni.showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip + |
| | | ',提示:' + |
| | | data |
| | | .ret, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? |
| | | typeof data.info == |
| | | 'string' ? data |
| | | .info : data.info |
| | | .join('<br/>') : |
| | | ''; |
| | | if (tip) uni |
| | | .showModal({ |
| | | title: this.translateSys('tip'), |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | |
| | | var result = data |
| | | .result; |
| | | if (eventID != $this |
| | | .$data.param |
| | | .After_OK_Event.ID) |
| | | $this |
| | | .scan_OKDataObjRunCustomEvent( |
| | | $this.$data |
| | | .param |
| | | .After_OK_Event |
| | | .ID); |
| | | else { |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/3037?param=' + |
| | | JSON |
| | | .stringify( |
| | | $this |
| | | .$data |
| | | .param |
| | | ) + |
| | | "&titlename=" + |
| | | var result = data |
| | | .result; |
| | | if (eventID != $this |
| | | .$data.param |
| | | .After_OK_Event.ID) |
| | | $this |
| | | .scan_OKDataObjRunCustomEvent( |
| | | $this.$data |
| | | .param |
| | | .After_OK_Event |
| | | .ID); |
| | | else { |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/3037?param=' + |
| | | JSON |
| | | .stringify( |
| | | $this |
| | | .$data |
| | | .title |
| | | }); |
| | | } |
| | | .param |
| | | ) + |
| | | "&titlename=" + |
| | | $this |
| | | .$data |
| | | .title |
| | | }); |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误8", |
| | | content: success |
| | | .err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.hideLoading(); |
| | | uni.showModal({ |
| | | title: "错误8.1", |
| | | title: this.translateSys('error') + " 8.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('close') |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | formatAttr(attr) { |
| | | if (classUtils.attrTypeIsObjRefMulti(attr.Type)) //if(ar.Type=='引用对象(多个)') |
| | | if (utils.classUtils.attrTypeIsObjRefMulti(attr.Type)) //if(ar.Type=='引用对象(多个)') |
| | | if (attr.Value == '请') ar.Value = ''; |
| | | if (classUtils.attrTypeIsUser(attr.Type) || classUtils.attrTypeIsProject(attr |
| | | if (utils.classUtils.attrTypeIsUser(attr.Type) || utils.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=='布尔值') |
| | | else if (utils.classUtils.attrTypeIsBool(attr.Type)) //if(ar.Type=='布尔值') |
| | | return { |
| | | attr: attr.Name, |
| | | value: attr.Value ? '1' : '0' |
| | |
| | | attr: attr.Name, |
| | | value: attr.Value ? attr.Value : '' |
| | | }; |
| | | }, |
| | | translate(t) { |
| | | if (typeof this.$t == "function") return this.$t(`page.${t}`) |
| | | else return t; |
| | | }, |
| | | translateSys(t) { |
| | | if (typeof this.$t == "function") return this.$t(`sys.${t}`) |
| | | else return t; |
| | | }, |
| | | } |
| | | } |
| | |
| | | margin-top: 50rpx; |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | background: #27A6E1; |
| | | /* background: #27A6E1; |
| | | border: none; |
| | | color: #fff; |
| | | color: #fff; */ |
| | | background: #fff; |
| | | color: #000; |
| | | font-size: 38rpx; |
| | | font-weight: bold; |
| | | float: left; |
| | |
| | | .popup-footer { |
| | | float: right; |
| | | position: absolute; |
| | | bottom: 0; |
| | | bottom: 10rpx; |
| | | right: 20rpx; |
| | | } |
| | | |
| | |
| | | margin-top: 50rpx; |
| | | padding: 15rpx; |
| | | line-height: 1.5; |
| | | background: #27A6E1; |
| | | /* background: #27A6E1; |
| | | border: none; |
| | | color: #fff; |
| | | color: #fff; */ |
| | | background: #fff; |
| | | color: #000; |
| | | font-size: 38rpx; |
| | | font-weight: bold; |
| | | /* float: right; */ |