在vuex里的store.js里写
const actions = {
getWorkCount(content){
Axios.post("PlanTask/GetPlanTaskNum.do", {}).then(res => {
content.state.fiaworkfiow=res.data.data.fiaworkfiow,
});
},
}
export default new Vuex.Store({
state,
actions
})
在调用的地方写
this.$store.dispatch('getWorkCount');