| | |
| | | dataObjAdd, |
| | | dataObjRunCustomEvent |
| | | } from "@/api/index.js" |
| | | |
| | | import { |
| | | showInfo, |
| | | showError |
| | | } from "@/js/Page.js" |
| | | export default { |
| | | components: { |
| | | pickerAddress |
| | | }, |
| | | data() { |
| | | return { |
| | | largeMode: getApp().globalData.largeMode || false, |
| | | largeMode: getApp().globalData.largeMode || false, |
| | | title: '新增', |
| | | param: {}, |
| | | focusField: "", |
| | |
| | | this.title = param.Add_BtnName ? param.Add_BtnName : options.titlename; //设置按钮文字 |
| | | // console.log(param); |
| | | if (!param.EditDlgMode) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "该功能点未配置编辑窗口,请重新配置!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showInfo("该功能点未配置编辑窗口,请重新配置!") |
| | | |
| | | return; |
| | | } |
| | | if (!param.Edit_dlg.Name) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "该功能点未配置窗口样式,请重新配置!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showInfo("该功能点未配置窗口样式,请重新配置!") |
| | | |
| | | return; |
| | | } |
| | | this.param = param; |
| | |
| | | this.class_attr_init(); |
| | | |
| | | } catch (ex) { |
| | | uni.showModal({ |
| | | title: "错误1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showError(ex, "错误1" ) |
| | | |
| | | } |
| | | }, |
| | | classAttr_extButton(index, iindex) { //弹框层显示 type:top bottom center left right |
| | |
| | | var before_click_button = $this.classAttrList[index].Attr[iindex].before_click_button; |
| | | var button_callback = $this.classAttrList[index].Attr[iindex].button_callback; |
| | | if (!before_click_button) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "before_click_button-event_id为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showInfo( "before_click_button-event_id为空!") |
| | | |
| | | return; |
| | | } |
| | | if (!button_callback) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "button_callback-event_id为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showInfo( "button_callback-event_id为空!") |
| | | |
| | | return; |
| | | } |
| | | this.DataObjRunCustomEvent_Return(before_click_button, data_attr, button_callback, index, iindex); |
| | |
| | | } |
| | | } |
| | | if (!$this.popupParam) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "popupParam为空!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showInfo( "popupParam为空!") |
| | | |
| | | return; |
| | | } |
| | | $this.classAttrList[$this.popupParam.index].Attr[$this.popupParam.iindex].Value = name; |
| | |
| | | |
| | | if (ele.hidden != true) { |
| | | if (utils.classUtils.attrTypeIsString(ele.Type) || utils.classUtils |
| | | .attrTypeIsInt(ele.Type)) { |
| | | .attrTypeIsInt(ele.Type)) { |
| | | const field = `${e.target.dataset['index']}-${i}` |
| | | if (this |
| | | .focusOldField == |
| | |
| | | }); |
| | | }, |
| | | classAttr_AddRef(e) { |
| | | console.log(e.target); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "此功能还未实现!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | // var value=this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].RelCls[e.detail.value]; |
| | | // this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value; |
| | | }, |
| | | |
| | | showInfo("此功能还未实现!") |
| | | }, |
| | | classAttr_AddPrj(index, iindex) { |
| | | var param = { |
| | | index: index, |
| | |
| | | if (ar.notempty == true && !ar.Value) { |
| | | // if(ar.NotEmpty=='1'){ |
| | | uni.hideLoading(); |
| | | // uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000}); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: ar.DispName + '不能为空!', |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showInfo( ar.DispName + '不能为空!'); |
| | | |
| | | return; |
| | | } |
| | | } |
| | |
| | | console.log(action); |
| | | if (action.ret == '0') { |
| | | if (action.ret != 0) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: '执行脚本失败,' + action.result, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showError( '执行脚本失败,' + action.result, "提示") |
| | | |
| | | return; |
| | | } |
| | | if (action.info) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: '执行脚本失败,' + action.info, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showError( '执行脚本失败,' + action.info, "提示") |
| | | |
| | | return; |
| | | } |
| | | if (action.result_type == '0') { |
| | | uni.showToast({ |
| | | title: action.result, |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | showInfo(action.result); |
| | | |
| | | } |
| | | |
| | | // "{"ret":0, "result_type":0, "result":"创建成功123123123","info":""}" |
| | | } |
| | | } else |
| | | uni.showToast({ |
| | | title: "创建成功!", |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | showInfo("创建成功!"); |
| | | |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/classAttr?param=' + JSON.stringify(this.param) + |
| | |
| | | }).catch(ex => { |
| | | console.log(ex); |
| | | uni.hideLoading(); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showError(ex, "提示") |
| | | }); |
| | | }, |
| | | class_attr_init() { |
| | |
| | | console.log(this.classAttrList); |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "未找到可显示的的属性", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showInfo( "未找到可显示的的属性") |
| | | |
| | | } |
| | | }, |
| | | ini_DataObjRunCustomEvent(info) { |
| | |
| | | } |
| | | } |
| | | } else if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({ |
| | | title: "错误2.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showInfo( "open_select_userdlg这个action_type还未处理!") |
| | | |
| | | } |
| | | // else if (action_type == 'tip_dlg') { |
| | | |
| | |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误2.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showError(ex, "提示2.1") |
| | | }); |
| | | }, |
| | | DataObjRunCustomEvent(info, data_attr) { |
| | |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误3.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showError(ex, "提示3.1") |
| | | }); |
| | | }, |
| | | OKDataObjRunCustomEvent() { |
| | |
| | | this.add(); |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误4.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showError(ex, "提示4.1") |
| | | }); |
| | | }, |
| | | DataObjRunCustomEvent_Return(eventid, data_attr, button_callback, index, iindex) { |
| | |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示5.2", |
| | | content: '调用 before_click_button 脚本返回空,event_id' + eventid, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showError('调用 before_click_button 脚本返回空,event_id' + eventid,"提示5.2") |
| | | |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "提示5.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | showError(ex, "提示5.1") |
| | | |
| | | }); |
| | | }, |
| | | formatAttr(attr) { |
| | |
| | | margin-top: 50rpx; |
| | | padding: 15rpx; |
| | | line-height: 1.5; |
| | | /* background: #27A6E1; |
| | | /* background: #27A6E1; |
| | | border: none; |
| | | color: #fff; */ |
| | | background: #fff; |