Commit b49ef690 by qiaoyanqi

事件注销指定函数

parent 965f4b2f
......@@ -46,32 +46,30 @@ export default {
mounted() {
this.$portalAPI.on("resetBillData", this.changeData);
this.$portalAPI.on('on-close-tag', this.checkBillChange)
this.curTagId = window.nros.context.getCurrTag()
GMS.vbus.$on("change-form-state", (param) => {
const { state, billId } = param;
if (billId !== undefined) {
this.billId = billId;
}
this.state = state ;
this.init = false;
this.$nextTick(() => {
this.init = true;
});
});
GMS.vbus.$on("workflow-state-change", (val) => {
console.log('refresh', val)
this.init = false;
this.$nextTick(() => {
this.init = true;
})
})
this.curTagId = window.nros.context.getCurrTag();
GMS.vbus.$on("change-form-state", this.changeFormState);
GMS.vbus.$on("workflow-state-change",this.changeFormState)
},
beforeDestroy() {
GMS.vbus.$off("workflow-state-change")
GMS.vbus.$off("change-form-state");
GMS.vbus.$off("workflow-state-change",this.changeFormState)
GMS.vbus.$off("change-form-state",this.changeFormState);
this.$portalAPI.off('on-close-tag', this.checkBillChange)
},
methods: {
changeFormState(param){
if(param && Object.prototype.toString.call(param)=='[object Object]'){
const { state, billId } = param;
if (billId !== undefined) {
this.billId = billId;
}
this.state = state;
}
this.init = false;
this.$nextTick(() => {
this.init = true;
});
},
checkBillChange(cb, id) {
if (id != this.curTagId) {
cb(true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment