diff --git a/src/store/getters.js b/src/store/getters.js index 52841cf..33d5edf 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -1,22 +1,23 @@ const getters = { - sidebar: state => state.app.sidebar, - size: state => state.app.size, - device: state => state.app.device, - visitedViews: state => state.tagsView.visitedViews, - cachedViews: state => state.tagsView.cachedViews, - token: state => state.user.token, - avatar: state => state.user.avatar, - name: state => state.user.name, - userId: state => state.user.userInfo.userId, - introduction: state => state.user.introduction, - roles: state => state.user.roles, - permissions: state => state.user.permissions, - permission_routes: state => state.permission.routes, - userinfo: state => state.user.userInfo, - topbarRouters: state => state.permission.topbarRouters, - defaultRoutes: state => state.permission.defaultRoutes, - sidebarRouters: state => state.permission.sidebarRouters, - onlineUserNum: state => state.socket.onlineNum, - noticeList: state => state.socket.noticeList + sidebar: (state) => state.app.sidebar, + size: (state) => state.app.size, + device: (state) => state.app.device, + visitedViews: (state) => state.tagsView.visitedViews, + cachedViews: (state) => state.tagsView.cachedViews, + token: (state) => state.user.token, + avatar: (state) => state.user.avatar, + name: (state) => state.user.name, + userId: (state) => state.user.userInfo.userId, + introduction: (state) => state.user.introduction, + roles: (state) => state.user.roles, + permissions: (state) => state.user.permissions, + permission_routes: (state) => state.permission.routes, + userinfo: (state) => state.user.userInfo, + topbarRouters: (state) => state.permission.topbarRouters, + defaultRoutes: (state) => state.permission.defaultRoutes, + sidebarRouters: (state) => state.permission.sidebarRouters, + onlineUserNum: (state) => state.socket.onlineNum, + noticeList: (state) => state.socket.noticeList, + counterList: (state) => state.socket.counter, } -export default getters \ No newline at end of file +export default getters diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 5d9935b..c1a0e1c 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -1,6 +1,8 @@ const state = { onlineNum: 0, - noticeList: [] + noticeList: [], + counter:0 + } const mutations = { SET_ONLINEUSER_NUM: (state, num) => { @@ -8,7 +10,10 @@ const mutations = { }, SET_NOTICE_list: (state, data) => { state.noticeList = data; - } + }, + SET_GetCache: (state, data) => { + state.counter = data; + }, } const actions = { @@ -19,9 +24,17 @@ const actions = { // 更新系统通知 getNoticeList({ commit }, data) { commit('SET_NOTICE_list', data) + }, + + //更新缺陷点击 + GetCache({commit},data){ + commit("SET_GetCache",data); } } + + + export default { namespaced: true, state, diff --git a/src/utils/signalR.js b/src/utils/signalR.js index 20cacad..a63f214 100644 --- a/src/utils/signalR.js +++ b/src/utils/signalR.js @@ -64,7 +64,7 @@ export default { // 接收欢迎语 connection.on('welcome', (data) => { console.log('welcome', data) - // Notification.info(data) + // Notification.info(data) }) // 接收后台手动推送消息 connection.on('receiveNotice', (title, data) => { @@ -83,6 +83,11 @@ export default { } }) + //接受缓存 + connection.on('GetCache', (checkid, sum) => { + store.dispatch('socket/GetCache', {checkid,sum}) + }) + }, } diff --git a/src/views/qualityManagement/FQC/firstFQC-v2.vue b/src/views/qualityManagement/FQC/firstFQC-v22.vue similarity index 90% rename from src/views/qualityManagement/FQC/firstFQC-v2.vue rename to src/views/qualityManagement/FQC/firstFQC-v22.vue index c873089..3e9a525 100644 --- a/src/views/qualityManagement/FQC/firstFQC-v2.vue +++ b/src/views/qualityManagement/FQC/firstFQC-v22.vue @@ -104,13 +104,13 @@ export default { name: 'firstFQC', data() { return { - - paint: [{ inspectionModule: '' }], - device: [{ inspectionModule: '' }], - blank: [{ inspectionModule: '' }], // 毛坯 - program: [{ inspectionModule: '' }], // 程序 - team: [{ inspectionModule: '' }], //班组 - + checkItemTable: { + paint: [{ inspectionModule: '' }], + device: [{ inspectionModule: '' }], + blank: [{ inspectionModule: '' }], // 毛坯 + program: [{ inspectionModule: '' }], // 程序 + team: [{ inspectionModule: '' }], //班组 + }, ProductSituationForm: { name: '', }, @@ -129,6 +129,21 @@ export default { .then((result) => { if (result.code == 200) { this.checkItemTable = result.data + this.checkItemTable.paint.forEach((item, index) => { + item.Counter = 0 + }) + this.checkItemTable.device.forEach((item, index) => { + item.Counter = 0 + }) + this.checkItemTable.blank.forEach((item, index) => { + item.Counter = 0 + }) + this.checkItemTable.program.forEach((item, index) => { + item.Counter = 0 + }) + this.checkItemTable.team.forEach((item, index) => { + item.Counter = 0 + }) } }) .catch((err) => {}) diff --git a/src/views/qualityManagement/FQC/firstFQC.vue b/src/views/qualityManagement/FQC/firstFQC.vue index 3e9a525..7826a90 100644 --- a/src/views/qualityManagement/FQC/firstFQC.vue +++ b/src/views/qualityManagement/FQC/firstFQC.vue @@ -18,52 +18,62 @@