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

优化待出菜单角标

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