| | |
| | | |
| | | <button type="default" @tap="cancel" class="btn_cancel" v-if="param.Sub_Cls.Can_Add_Delete == true">取消</button> |
| | | <button type="default" @tap="sava" class="btn_add" v-if="param.Sub_Cls.Can_Add_Delete == true">{{title}}</button> |
| | | <button type="default" @tap="cancel" class="btn_sava" v-else-if="param.Sub_Cls.Can_Add_Delete == false">{{title}}</button> |
| | | <button type="default" @tap="sava" class="btn_sava" v-else-if="param.Sub_Cls.Can_Add_Delete == false">{{title}}</button> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | sava(){ |
| | | if (this.$data.param.Before_OK_Event) //判断功能点参数是否有确定前脚本 |
| | | this.scan_OKDataObjRunCustomEvent(this.$data.param.Before_OK_Event.ID); |
| | | else |
| | | else if (this.$data.param.After_OK_Event) //判断功能点参数是否有确定后脚本 |
| | | this.scan_OKDataObjRunCustomEvent(this.$data.param.After_OK_Event.ID); |
| | | else |
| | | uni.navigateBack({delta:1 });//返回层数,2则上上页 |
| | | }, |
| | | add(){ |
| | | uni.showLoading({ |
| | |
| | | objects:objects |
| | | } |
| | | }; |
| | | console.log(JSON.stringify(dataJson)); |
| | | // console.log(JSON.stringify(dataJson)); |
| | | var dataInfo = { |
| | | edtype: "7", eventid: eventID, projectid: '',rclsid: '', robjid: '', userlogin: '', |
| | | clsid: 'MBOX', objid: '',attr: JSON.stringify([]), extinfo: JSON.stringify([]), |
| | | global_attr: JSON.stringify($this.$data.global_attr),dataJson:JSON.stringify(dataJson) |
| | | } |
| | | console.log(JSON.stringify(dataInfo)); |
| | | // console.log(JSON.stringify(dataInfo)); |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{ |
| | | console.log(success); |
| | |
| | | if (success.code=='00000') { |
| | | var data = JSON.parse(success.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].attr == result[i].attr) { |
| | | $this.$data.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(eventID != $this.$data.param.After_OK_Event.ID) |
| | | $this.scan_OKDataObjRunCustomEvent($this.$data.param.After_OK_Event.ID); |
| | | else{ |