|
|
@ -10,7 +10,6 @@ export default { |
|
|
|
setup() { |
|
|
|
const config = ref(null); |
|
|
|
const route = useRoute(); |
|
|
|
const messageCount = ref(-1); |
|
|
|
const onCommand = async (item, rows) => { |
|
|
|
console.log(item.path, item, rows); |
|
|
|
}; |
|
|
@ -19,16 +18,18 @@ export default { |
|
|
|
const model = "vmi/balance"; |
|
|
|
const useConfig = (await import(`../../models/${model}.js`)).default; |
|
|
|
config.value = useConfig(route.meta?.businessType, route.meta); |
|
|
|
let notify = null; |
|
|
|
PubSub.subscribe(event, async (_, data) => { |
|
|
|
messageCount.value = parseInt(data); |
|
|
|
}); |
|
|
|
ElNotification({ |
|
|
|
title: "Prompt", |
|
|
|
message: messageCount.value, |
|
|
|
duration: 0, |
|
|
|
notify?.close(); |
|
|
|
notify = ElNotification({ |
|
|
|
position: "bottom-right", |
|
|
|
title: "待同步库存数量", |
|
|
|
message: data, |
|
|
|
duration: 0, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
onUnmounted(() => PubSub.unsubscribe(event)); |
|
|
|
return { config, onCommand, messageCount }; |
|
|
|
return { config, onCommand }; |
|
|
|
}, |
|
|
|
}; |
|
|
|