完成
This commit is contained in:
@@ -21,5 +21,8 @@ const getters = {
|
||||
counterList_v1: (state) => state.socket.counter_v1,
|
||||
counterList_v2: (state) => state.socket.counter_v2,
|
||||
counterList_v3: (state) => state.socket.counter_v3,
|
||||
polishetotalNumber:(state)=>state.inspection.polishetotalNumber
|
||||
|
||||
|
||||
}
|
||||
export default getters
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import app from './modules/app'
|
||||
import inspection from './modules/inspection'
|
||||
import user from './modules/user'
|
||||
import tagsView from './modules/tagsView'
|
||||
import permission from './modules/permission'
|
||||
@@ -19,6 +20,7 @@ const state = {
|
||||
const store = new Vuex.Store({
|
||||
modules: {
|
||||
app,
|
||||
inspection,
|
||||
user,
|
||||
tagsView,
|
||||
permission,
|
||||
|
||||
30
src/store/modules/inspection.js
Normal file
30
src/store/modules/inspection.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import { calculate_polish_total_number } from '@/api/qualityManagement/firstFQC.js'
|
||||
const state = {
|
||||
polishetotalNumber: 0,
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
SET_polish_total_number: (state, num) => {
|
||||
state.polishetotalNumber = num
|
||||
},
|
||||
}
|
||||
|
||||
const actions = {
|
||||
//传入工单号
|
||||
change_polish_total_number({ commit }, workorder_id) {
|
||||
//计算抛光数总数
|
||||
calculate_polish_total_number({ workorder_id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
commit('SET_polish_total_number', res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
}
|
||||
Reference in New Issue
Block a user