diff --git a/src/App.vue b/src/App.vue index 3284eec..647fd53 100644 --- a/src/App.vue +++ b/src/App.vue @@ -71,17 +71,9 @@ watch( // const msgData = JSON.parse(JSON.parse(newValue)); const msgData = JSON.parse(newValue); const data = JSON.parse(JSON.stringify(msgData)); + console.log('data ==>', data); + socketStore.setMsg(null); - let baclkTemp; - // 漆包打印空白页, - if (data.templateType.includes('enamelCoverReport') && !data.reprintData) { - const result = await getPrintTemplateList({ templateCode: 'enamelCoverBlank' }); - baclkTemp = JSON.parse(result.rows[0].content); - hiprintTemplate.value = await new hiprint.PrintTemplate({ - template: baclkTemp - }); - print({}, ''); - } getPrintTemplateList({ templateCode: data.templateType }).then(async res => { if (res.code === 200) { diff --git a/src/store/modules/socket/index.ts b/src/store/modules/socket/index.ts index bcbd861..c3cf586 100644 --- a/src/store/modules/socket/index.ts +++ b/src/store/modules/socket/index.ts @@ -29,6 +29,9 @@ export const useSocketStore = defineStore('socket-store', { actions: { setOpenSocket(socket: string) { if (!socket) return; + if (this.connected) { + this.setCloseScoket(); + } // const url = `${wsUrl + socket}?userId=${socket}`; const url = `${wsUrl + socket}`; this.ws = new WebSocket(url); @@ -37,6 +40,7 @@ export const useSocketStore = defineStore('socket-store', { this.socket = socket; localStorage.setItem('socket', socket); console.log('连接服务器端成功'); + window.$message?.success('连接成功'); this.ws.onmessage = res => { console.log('res ==> ', res); this.msg = res.data; @@ -45,6 +49,8 @@ export const useSocketStore = defineStore('socket-store', { this.ws.onclose = () => { console.log('WebSocket connection closed. Reconnecting...'); this.stopHeartbeat(); + window.$message?.success('关闭成功'); + if (!this.connected) return; this.reconnect(); }; }; diff --git a/src/views/md/printTemplate/component/EditDialog.vue b/src/views/md/printTemplate/component/EditDialog.vue index c40bfb3..37c85ef 100644 --- a/src/views/md/printTemplate/component/EditDialog.vue +++ b/src/views/md/printTemplate/component/EditDialog.vue @@ -7,6 +7,7 @@ - + - + diff --git a/src/views/md/printTemplate/index.vue b/src/views/md/printTemplate/index.vue index 8d7f874..611ff04 100644 --- a/src/views/md/printTemplate/index.vue +++ b/src/views/md/printTemplate/index.vue @@ -47,6 +47,7 @@ v-model:value="addForm.templateCode" :options="printTypeList" placeholder="请选择打印模板" + style="width: 200px" > diff --git a/src/views/md/workbench/enamelling/index.vue b/src/views/md/workbench/enamelling/index.vue index c441a7b..79d05da 100644 --- a/src/views/md/workbench/enamelling/index.vue +++ b/src/views/md/workbench/enamelling/index.vue @@ -79,13 +79,13 @@ @update:value="modelHandleChange" /> - + + > = ref([ key: 'equipmentCode', width: 100 }, - { - title: '设备轴号', - align: 'center', - key: 'axleNumber', - width: 100, - render: row => {row.axleNumber} - }, - { - title: '设备轴数', - align: 'center', - width: 100, - key: 'axleQuantity' - }, + // { + // title: '设备轴号', + // align: 'center', + // key: 'axleNumber', + // width: 100, + // render: row => {row.axleNumber} + // }, + // { + // title: '设备轴数', + // align: 'center', + // width: 100, + // key: 'axleQuantity' + // }, { title: '是否启用', key: 'isEnable', @@ -343,18 +343,18 @@ const columns: Ref> = ref([ ); } }, - { - title: '可生产产品规格下限', - align: 'center', - key: 'productionLowerLimit', - width: 220 - }, - { - title: '可生产产品规格上限', - align: 'center', - key: 'productionUpperLimit', - width: 220 - }, + // { + // title: '可生产产品规格下限', + // align: 'center', + // key: 'productionLowerLimit', + // width: 220 + // }, + // { + // title: '可生产产品规格上限', + // align: 'center', + // key: 'productionUpperLimit', + // width: 220 + // }, { title: '所属工序', align: 'center', diff --git a/src/views/md/workbench/wiredrawing/index.vue b/src/views/md/workbench/wiredrawing/index.vue index 4593baf..8fdb700 100644 --- a/src/views/md/workbench/wiredrawing/index.vue +++ b/src/views/md/workbench/wiredrawing/index.vue @@ -78,7 +78,7 @@ @update:value="modelHandleChange" /> - + > = ref([ ); } }, - { - title: '可生产产品规格下限', - align: 'center', - key: 'productionLowerLimit' - }, - { - title: '可生产产品规格上限', - align: 'center', - key: 'productionUpperLimit' - }, + // { + // title: '可生产产品规格下限', + // align: 'center', + // key: 'productionLowerLimit' + // }, + // { + // title: '可生产产品规格上限', + // align: 'center', + // key: 'productionUpperLimit' + // }, { title: '所属工序', align: 'center', diff --git a/src/views/monitor/connectSocket/index.vue b/src/views/monitor/connectSocket/index.vue index aa7c3fe..8307309 100644 --- a/src/views/monitor/connectSocket/index.vue +++ b/src/views/monitor/connectSocket/index.vue @@ -44,13 +44,16 @@