Commit b49ef690 by qiaoyanqi

事件注销指定函数

parent 965f4b2f
...@@ -46,32 +46,30 @@ export default { ...@@ -46,32 +46,30 @@ export default {
mounted() { mounted() {
this.$portalAPI.on("resetBillData", this.changeData); this.$portalAPI.on("resetBillData", this.changeData);
this.$portalAPI.on('on-close-tag', this.checkBillChange) this.$portalAPI.on('on-close-tag', this.checkBillChange)
this.curTagId = window.nros.context.getCurrTag() this.curTagId = window.nros.context.getCurrTag();
GMS.vbus.$on("change-form-state", (param) => {
const { state, billId } = param; GMS.vbus.$on("change-form-state", this.changeFormState);
if (billId !== undefined) { GMS.vbus.$on("workflow-state-change",this.changeFormState)
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;
})
})
}, },
beforeDestroy() { beforeDestroy() {
GMS.vbus.$off("workflow-state-change") GMS.vbus.$off("workflow-state-change",this.changeFormState)
GMS.vbus.$off("change-form-state"); GMS.vbus.$off("change-form-state",this.changeFormState);
this.$portalAPI.off('on-close-tag', this.checkBillChange) this.$portalAPI.off('on-close-tag', this.checkBillChange)
}, },
methods: { 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) { checkBillChange(cb, id) {
if (id != this.curTagId) { if (id != this.curTagId) {
cb(true) 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