| | |
| | | components: { |
| | | pickerAddress |
| | | }, |
| | | onBackPress(e){ |
| | | // console.log("监听返回按钮事件",e); |
| | | if(this.type){ |
| | | var eventChannel = this.$scope.eventChannel; |
| | | // const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.emit(this.type,""); |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: '新增', |
| | | param:{}, |
| | | type:'', |
| | | classAttrList:[], |
| | | classGridStyle:[], |
| | | edit_inital_event:"", //弹窗初始化事件ID |
| | |
| | | uni.setNavigationBarTitle({ title: options.titlename}); //设置顶部标题 |
| | | var param = JSON.parse(options.param); |
| | | this.$data.title = param.Add_BtnName?param.Add_BtnName:options.titlename; //设置按钮文字 |
| | | // console.log(param); |
| | | if(options.type){ |
| | | this.$data.type = options.type; |
| | | } |
| | | console.log(param); |
| | | if(!param.EditDlgMode){ |
| | | uni.showModal({title:"提示",content:"该功能点未配置编辑窗口,请重新配置!",showCancel:false,confirmText:"取消"}); |
| | | return; |
| | |
| | | var attrs = attrlist[i].attrs; |
| | | for (var s = 0; s < this.$data.classAttrList.length; s++) { |
| | | var clsattr = this.$data.classAttrList[s]; |
| | | if (name == clsattr.Name) { |
| | | // if (name == clsattr.Name) { |
| | | var attr = []; |
| | | for (var j = 0; j < attrs.length; j++) { |
| | | for (var l = 0; l < clsattr.Attr.length; l++) { |
| | |
| | | control_style:this.$data.classGridStyle.StyleDef.control_style, |
| | | title_p_wdith:this.$data.classGridStyle.StyleDef.title_p_wdith |
| | | }) |
| | | } |
| | | // } |
| | | } |
| | | } |
| | | if (newattrlist.length > 0) { |
| | |
| | | this.$refs.popup.close(); |
| | | }, |
| | | cancel(e){ |
| | | if(this.type){ |
| | | var eventChannel = this.$scope.eventChannel; |
| | | // const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.emit(this.type,""); |
| | | } |
| | | uni.navigateBack({ |
| | | delta:1 //返回层数,2则上上页 |
| | | }); |
| | |
| | | uni.redirectTo({ |
| | | url:'../modal/3018?param='+JSON.stringify(this.$data.param)+"&titlename="+this.$data.title |
| | | }); |
| | | // this.class_attr_init(); |
| | | // this.cancel(); |
| | | }else{ |
| | | uni.showModal({title:"错误",content:success.err_msg,showCancel:false,confirmText:"取消"}); |
| | | } |
| | |
| | | console.log(success); |
| | | if (success.err_code == 0) { |
| | | var data = success.result; |
| | | 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') { |
| | | if (value) { |
| | | console.log(value); |
| | | for (var i = 0; i < value.length; i++) { |
| | | for (var a = 0; a < this.$data.classAttrList.length; a++) { |
| | | for (var l = 0; l < this.$data.classAttrList[a].Attr.length; l++) { |
| | | var ca = this.$data.classAttrList[a].Attr[l]; |
| | | if (value[i].attr == ca.Name) { |
| | | if(ca.Type=='字典' || ca.Type=='字典-字符串' || ca.Type=='字典-整数'){ |
| | | var dictItemList=[]; |
| | | for(var d in value[i].choice_list){ |
| | | var list_val =value[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":list_val,"Name":list_val,"label":list_val,"value":list_val}); |
| | | |
| | | 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:"取消"}); |
| | | |
| | | 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') { |
| | | if (value) { |
| | | console.log(value); |
| | | for (var i = 0; i < value.length; i++) { |
| | | for (var a = 0; a < this.$data.classAttrList.length; a++) { |
| | | for (var l = 0; l < this.$data.classAttrList[a].Attr.length; l++) { |
| | | var ca = this.$data.classAttrList[a].Attr[l]; |
| | | if (value[i].attr == ca.Name) { |
| | | if(ca.Type=='字典' || ca.Type=='字典-字符串' || ca.Type=='字典-整数'){ |
| | | var dictItemList=[]; |
| | | for(var d in value[i].choice_list){ |
| | | var list_val =value[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":list_val,"Name":list_val,"label":list_val,"value":list_val}); |
| | | |
| | | } |
| | | ca.dictitem = dictItemList; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | }else{ |
| | | ca.Value = value[i].value; |
| | | } |
| | | ca.dictitem = dictItemList; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | }else{ |
| | | ca.Value = value[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!this.$data.refdatastore.filter(function (s) { |
| | | return value[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | this.$data.refdatastore.push(value[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < this.$data.refdatastore.length; j++) { |
| | | if (this.$data.refdatastore[j].attr == value[i].attr) { |
| | | this.$data.refdatastore[j].value = value[i].value; |
| | | |
| | | var length = 0; |
| | | if (!this.$data.refdatastore.filter(function (s) { |
| | | return value[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | this.$data.refdatastore.push(value[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < this.$data.refdatastore.length; j++) { |
| | | if (this.$data.refdatastore[j].attr == value[i].attr) { |
| | | this.$data.refdatastore[j].value = value[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({title:"错误2.2",content:"open_select_userdlg这个action_type还未处理!",showCancel:false,confirmText:"取消"}); |
| | | } |
| | | // else if (action_type == 'tip_dlg') { |
| | | |
| | | // } |
| | | } |
| | | if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({title:"错误2.2",content:"open_select_userdlg这个action_type还未处理!",showCancel:false,confirmText:"取消"}); |
| | | } |
| | | // else if (action_type == 'tip_dlg') { |
| | | |
| | | // } |
| | | } |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | uni.showModal({title:"错误2",content:success.err_msg,showCancel:false,confirmText:"取消"}); |
| | | } |
| | |
| | | console.log(success); |
| | | if (success.err_code == 0) { |
| | | var data = success.result; |
| | | 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++) { |
| | | 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(attr[j].Type=='字典' || attr[j].Type=='字典-字符串' || attr[j].Type=='字典-整数'){ |
| | | var dictItemList=[]; |
| | | for(var d in result[i].choice_list){ |
| | | var val =result[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":val,"Name":val,"label":val,"value":val}); |
| | | if (data.ret != 0) { |
| | | var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data.err_info.join('<br/>') : ''; |
| | | if (data.ret == 801) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | }else{ |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | |
| | | var 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++) { |
| | | 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(attr[j].Type=='字典' || attr[j].Type=='字典-字符串' || attr[j].Type=='字典-整数'){ |
| | | var dictItemList=[]; |
| | | for(var d in result[i].choice_list){ |
| | | var val =result[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":val,"Name":val,"label":val,"value":val}); |
| | | } |
| | | attr[j].dictitem = dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | | } |
| | | attr[j].dictitem = dictItemList; |
| | | // attr[j].dictitem = 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++) { |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } 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 = 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | 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++) { |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } 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 = 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showModal({title:"错误3",content:success.err_msg,showCancel:false,confirmText:"取消"}); |
| | | } |
| | | }).catch(ex=>{ |
| | |
| | | this.$store.dispatch('runCustomEvent',dataInfo).then(success=>{ |
| | | console.log(success); |
| | | if (success.err_code == 0) { |
| | | var data = success.result; |
| | | 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].attr == result[i].attr) { |
| | | this.$data.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | 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:"取消"}); |
| | | |
| | | this.add(); |
| | | 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].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.$store.dispatch('runCustomEvent',dataInfo).then(success=>{ |
| | | console.log(success); |
| | | if (success.err_code == 0) { |
| | | var data = success.result; |
| | | 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 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_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 |
| | | 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:"取消"}); |
| | | |
| | | 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 d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } |
| | | 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.clsid, |
| | | objid: "", |
| | | attr: param.req, |
| | | inputparameter: data, |
| | | dataJson:[], |
| | | } |
| | | $this.DataObjRunCustomEvent(info, param.data_attr); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | else if (action.action_type == 'open_data_query_dlg') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } |
| | | else if (action.action_type == 'open_common_dlg') { |
| | | var $this = this; |
| | | if(val.common_dlg_id == 'check_list'){ |
| | | $this.$data.check_list= val.config; |
| | | if(val.config.appear_style == 'sideslip') //判断是否是侧滑 |
| | | $this.$data.popupType = 'right'; |
| | | else |
| | | $this.$data.popupType = 'center' |
| | | // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
| | | $this.$refs.popup.open($this.$data.popupType); |
| | | var popupParam={ |
| | | index: index, |
| | | iindex:iindex, |
| | | button_callback:button_callback, |
| | | req:req, |
| | | data_attr:data_attr |
| | | } |
| | | $this.$data.popupParam= popupParam; |
| | | } |
| | | } |
| | | 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.clsid, |
| | | objid: "", |
| | | attr: param.req, |
| | | 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.clsid, |
| | | objid: "", |
| | | attr: param.req, |
| | | inputparameter: data, |
| | | dataJson:[], |
| | | } |
| | | |
| | | $this.DataObjRunCustomEvent(info); |
| | | } |
| | | $this.DataObjRunCustomEvent(info, param.data_attr); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | else if (action.action_type == 'open_data_query_dlg') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } |
| | | else if (action.action_type == 'open_common_dlg') { |
| | | var $this = this; |
| | | if(val.common_dlg_id == 'check_list'){ |
| | | $this.$data.check_list= val.config; |
| | | if(val.config.appear_style == 'sideslip') //判断是否是侧滑 |
| | | $this.$data.popupType = 'right'; |
| | | else |
| | | $this.$data.popupType = 'center' |
| | | // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
| | | $this.$refs.popup.open($this.$data.popupType); |
| | | var popupParam={ |
| | | index: index, |
| | | iindex:iindex, |
| | | button_callback:button_callback, |
| | | req:req, |
| | | data_attr:data_attr |
| | | } |
| | | $this.$data.popupParam= popupParam; |
| | | } |
| | | }); |
| | | } else { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showModal({title:"提示5.2",content: '调用 before_click_button 脚本返回空,event_id' + eventid,showCancel:false,confirmText:"取消"}); |
| | | } |
| | | 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.clsid, |
| | | objid: "", |
| | | attr: param.req, |
| | | dataJson:[], |
| | | } |
| | | |
| | | $this.DataObjRunCustomEvent(info); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showModal({title:"提示5.2",content: '调用 before_click_button 脚本返回空,event_id' + eventid,showCancel:false,confirmText:"取消"}); |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showModal({title:"错误5",content:success.err_msg,showCancel:false,confirmText:"取消"}); |