| | |
| | | </div> |
| | | |
| | | </view> |
| | | <button type="default" @tap="cancel" class="btn_cancel">取消</button> |
| | | <button type="default" @tap="cancel" class="btn_cancel">{{translateSys('cancel')}}</button> |
| | | <button type="default" @tap="sava" class="btn_add">{{title}}</button> |
| | | <!-- 普通弹窗 top bottom center left right --> |
| | | <view> |
| | |
| | | </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> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | title: '新增', |
| | | title: this.translateSys('add2'), |
| | | param: {}, |
| | | type: '', |
| | | classAttrList: [], |
| | |
| | | console.log(param); |
| | | if (!param.EditDlgMode) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "该功能点未配置编辑窗口,请重新配置!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | return; |
| | | } |
| | | if (!param.Edit_dlg.Name) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "该功能点未配置窗口样式,请重新配置!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | }, 500); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误1", |
| | | title: this.translateSys('error') + " 1", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误1.1", |
| | | title: this.translateSys('error') + " 1.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | }); |
| | | |
| | |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误1.2", |
| | | title: this.translateSys('error') + " 1.2", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误1.3", |
| | | title: this.translateSys('error') + " 1.3", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | $this.viewParam(); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误1.4", |
| | | title: this.translateSys('error') + " 1.4", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误1.5", |
| | | title: this.translateSys('error') + " 1.5", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | }); |
| | | } |
| | |
| | | ca.Value = ca.dictitem[d].CN_S_NAME; |
| | | } |
| | | } |
| | | if(utils.classUtils.attrTypeIsDate(ca.Type)){ |
| | | if(utils.classUtils.attrTypeIsDateTime(ca.Type)){ |
| | | var nowDate = new Date(); |
| | | var date = { |
| | | year: nowDate.getFullYear(), |
| | |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "未找到可显示的的属性", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | }, |
| | |
| | | var button_callback = $this.$data.classAttrList[index].Attr[iindex].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('cancel') |
| | | }); |
| | | return; |
| | | } |
| | | if (!button_callback) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "button_callback-event_id为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | } |
| | | if (!$this.$data.popupParam) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "popupParam为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | classAttr_AddRef(e) { |
| | | console.log(e.target); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: "此功能还未实现!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | // 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; |
| | |
| | | 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('cancel') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | if (action.ret == '0') { |
| | | if (action.ret != 0) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: '执行脚本失败,' + action.result, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | return; |
| | | } |
| | | if (action.info) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: '执行脚本失败,' + action.info, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | return; |
| | | } |
| | |
| | | // this.cancel(); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误", |
| | | title: this.translateSys('error') + " ", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | console.log(ex); |
| | | uni.hideLoading(); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | title: this.translateSys('tip') + "", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | 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: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | else uni.showModal({ |
| | | title: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip + ',提示:' + data.ret, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join( |
| | | '<br/>') : ''; |
| | | if (tip) uni.showModal({ |
| | | title: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | |
| | | if (data.action) { |
| | |
| | | } |
| | | if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({ |
| | | title: "错误2.2", |
| | | title: this.translateSys('error') + " 2.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | // else if (action_type == 'tip_dlg') { |
| | |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误2", |
| | | title: this.translateSys('error') + " 2", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | }).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('cancel') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | 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: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | else uni.showModal({ |
| | | title: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip + ',提示:' + data.ret, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join( |
| | | '<br/>') : ''; |
| | | if (tip) uni.showModal({ |
| | | title: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | |
| | | var actionlist = data.action; |
| | |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误3", |
| | | title: this.translateSys('error') + " 3", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | }).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('cancel') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | 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: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | else uni.showModal({ |
| | | title: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip + ',提示:' + data.ret, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join( |
| | | '<br/>') : ''; |
| | | if (tip) uni.showModal({ |
| | | title: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | |
| | | var result = data.result; |
| | |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误4", |
| | | title: this.translateSys('error') + " 4", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | }).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('cancel') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | 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: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | else uni.showModal({ |
| | | title: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip + ',提示:' + data.ret, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | return false |
| | | } else { |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join( |
| | | '<br/>') : ''; |
| | | if (tip) uni.showModal({ |
| | | title: '提示', |
| | | title: this.translateSys('tip') , |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | |
| | | if (data != "") { |
| | |
| | | if (action.action_type == 'open_panel') { |
| | | 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_data_query_dlg') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | this.translateSys('tip') , |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | |
| | | } else { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | this.translateSys('tip') , |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示5.2", |
| | | title: this.translateSys('tip') + "5.2", |
| | | content: '调用 before_click_button 脚本返回空,event_id' + eventid, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误5", |
| | | title: this.translateSys('error') + " 5", |
| | | content: success.err_msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | confirmText: this.translateSys('cancel') |
| | | }); |
| | | } |
| | | }).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('cancel') |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | 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; |
| | | }, |
| | | } |
| | | } |
| | | </script> |