diff --git a/src/renderer/App.vue b/src/renderer/App.vue index 16d3a1c..4e267eb 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -16,13 +16,10 @@ export default { }, mounted() { let that = this - if (that.$store.getters.token) { - that.$store.dispatch('chat/initWebSocket') // 初始化websocket - } - this.showNotify() - this.showNotify() - this.showNotify() - this.showNotify() + // if (that.$store.getters.token) { + + // } + that.$store.dispatch('chat/initWebSocket') // 初始化websocket }, watch: { '$store.state.chat.printer_error': { @@ -50,6 +47,18 @@ export default { }, deep: true, immediate: true + }, + '$store.state.chat.isConnect': { + handler(val) { + let that = this + if (val) { + that.errors = [] + } else { + that.$notify.closeAll() + } + }, + deep: true, + immediate: true } }, methods: { diff --git a/src/renderer/components/workAdd/workAdd.vue b/src/renderer/components/workAdd/workAdd.vue index c5d1829..54eb416 100644 --- a/src/renderer/components/workAdd/workAdd.vue +++ b/src/renderer/components/workAdd/workAdd.vue @@ -1060,13 +1060,17 @@ export default { cursor: pointer; height: 40px; padding: 0 22px; - background: rgba(0, 195, 37, 0.12); + background: transparent; border-radius: 4px; - border: 1px solid rgba(0, 195, 37, 0.32); + border: 1px solid #999; font-weight: 500; font-size: 18px; - color: #00c325; - + color: #333; + &:hover { + background: rgba(0, 195, 37, 0.32); + border: 1px solid rgba(0, 195, 37, 0.32); + color: #00c325; + } img { width: 22px; height: 22px; @@ -1116,13 +1120,18 @@ export default { cursor: pointer; height: 40px; padding: 0 22px; - background: rgba(0, 195, 37, 0.12); + background: transparent; border-radius: 4px; - border: 1px solid rgba(0, 195, 37, 0.32); + border: 1px solid #999; font-weight: 500; font-size: 16px; - color: #00c325; + color: #333; margin-right: 22px; + &:hover { + background: rgba(0, 195, 37, 0.32); + border: 1px solid rgba(0, 195, 37, 0.32); + color: #00c325; + } img { width: 20px; @@ -1419,13 +1428,18 @@ export default { .footer_save { width: 166px; height: 45px; - background: #00bcc3; + background: transparent; border-radius: 4px; font-weight: 500; font-size: 19px; - color: #ffffff; + color: #333; + border: 1px solid #999; padding: 0; margin-right: 22px; + &:hover { + background: #00bcc3; + color: #ffffff; + } } .footer_submit { diff --git a/src/renderer/store/modules/chat.js b/src/renderer/store/modules/chat.js index 05dd777..b558dbd 100644 --- a/src/renderer/store/modules/chat.js +++ b/src/renderer/store/modules/chat.js @@ -535,7 +535,8 @@ const actions = { // 心跳检测重连 pingCheck({ state, commit, dispatch, rootState }) { if (state.pingNum < 4) { - state.pingNum++ + let num = state.pingNum + 1 + commit('setData', { name: 'pingNum', data: num }) timeouter = setTimeout(() => { dispatch('pingCheck') }, 10000) @@ -590,7 +591,8 @@ const actions = { commit('setData', { name: 'connecting', data: false }) commit('setData', { name: 'isConnect', data: false }) commit('setData', { name: 'serviceStatus', data: false }) - state.reconnections += 1 + let num = state.reconnections + 1 + commit('setData', { name: 'reconnections', data: num }) const refreshTime = parseInt(state.refreshTime) * 1000 setTimeout(() => { dispatch('initWebSocket') diff --git a/src/renderer/views/dashboard/index.vue b/src/renderer/views/dashboard/index.vue index 6f3135f..286e736 100644 --- a/src/renderer/views/dashboard/index.vue +++ b/src/renderer/views/dashboard/index.vue @@ -23,7 +23,7 @@
完成刻录数:
-
{{ taskNum[0] }}
+
{{ taskNum[0] }}
废弃刻录数:
@@ -31,7 +31,7 @@
错误:
-
{{ taskNum[2] }}
+
{{ taskNum[2] }}
@@ -287,7 +287,7 @@