Commit 7eef0dbb authored by dragondean@qq.com's avatar dragondean@qq.com

优化待出菜单角标

parent 902dbb56
......@@ -56,7 +56,7 @@ export default {
},
computed:{
badge(){
return this.$store.getters.badgeData[this.item.meta.badgeField]
return this.$store.getters.badgeData[this.item.meta?.badgeField]
}
},
methods: {
......
......@@ -55,11 +55,7 @@ export default {
}
},
created() {
// 查询待出订单数量 waitingShipment
getWaitingShipmentCount().then(res => {
console.log('getWaitingShipmentCount', res.data)
this.$store.commit('SET_BADGE_DATA', { waitingShipment: res.data}, )
})
this.$store.dispatch('getBadgeData')
}
};
</script>
......@@ -2,6 +2,7 @@ import {login, logout, getInfo, socialLogin, socialLogin2} from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import {getNotReadInternalMessageTotal,} from '@/api/system/internalMessage'
import {taskTodoCount, userMark} from "@/api/bpm/task";
import {getWaitingShipmentCount} from "@/api/ecw/order";
const user = {
state: {
......@@ -202,6 +203,14 @@ const user = {
reject(err)
})
})
},
// 获取菜单角标数据,当前只有空运待出
getBadgeData({commit}){
// 查询待出订单数量 waitingShipment
getWaitingShipmentCount().then(res => {
console.log('getWaitingShipmentCount', res.data)
commit('SET_BADGE_DATA', { waitingShipment: res.data}, )
})
}
}
}
......
......@@ -363,6 +363,7 @@ export default {
},
activated(){
this.getList()
this.$store.dispatch('getBadgeData')
},
created() {
this.getList();
......@@ -371,6 +372,8 @@ export default {
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
getChannelList().then(res => this.channelList = res.data)
this.$store.dispatch('getBadgeData')
},
methods: {
/** 查询列表 */
......
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