From 39456e021497f60964555406831fe2a9833997fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Thu, 9 Jan 2025 17:12:03 +0800 Subject: [PATCH] =?UTF-8?q?GP12=E8=A7=A6=E6=91=B8=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/mqtt/emqxUtil.js | 116 ++++---- src/views/business/QcGp12BaseDefect.vue | 22 +- src/views/business/QcGp12BaseGroup.vue | 16 +- .../business/QcGp12BaseLabelAnalysis.vue | 16 +- src/views/business/QcGp12BaseSite.vue | 16 +- src/views/business/QcGp12LogWorkorder.vue | 108 ++++---- src/views/business/QcGp12RecordLabelScan.vue | 21 +- .../business/QcGp12RecordWorkorderDefect.vue | 26 +- .../business/QcGp12ServiceStatistics.vue | 44 +-- src/views/business/QcGp12ServiceWorkorder.vue | 158 ++++++----- .../gp12/touchScreen/main/index.css | 15 +- .../gp12/touchScreen/main/index.vue | 22 +- .../gp12/touchScreen/workorder/index.vue | 254 +++++++++--------- 13 files changed, 396 insertions(+), 438 deletions(-) diff --git a/src/utils/mqtt/emqxUtil.js b/src/utils/mqtt/emqxUtil.js index fb03c19..721c4e7 100644 --- a/src/utils/mqtt/emqxUtil.js +++ b/src/utils/mqtt/emqxUtil.js @@ -1,86 +1,92 @@ -import mqtt from '@/plugins/mqtt.min.js'; -export const title = "shgg_mes" +import mqtt from '@/plugins/mqtt.min.js' +export const title = 'shgg_mes' // const mqtt = require('mqtt'); // 云服务器环境 // const url = 'wss://ff6bab7a.ala.cn-hangzhou.emqxsl.cn:8084/mqtt'; // 本地环境 -// const url = 'ws://127.0.0.1:8083/mqtt'; +// const url = 'ws://192.168.0.58:8083/mqtt' // 线上环境 -const url = 'ws://192.168.60.251:8083/mqtt'; +const url = 'ws://192.168.60.251:8083/mqtt' // 创建客户端实例 const options = { - clean: true, - connectTimeout: 4000, - clientId: 'emqx_test' + Math.random().toString(16).substring(2, 8), - username: 'user', - password: '123456' + clean: true, + connectTimeout: 4000, + clientId: 'emqx_test' + Math.random().toString(16).substring(2, 8), + username: 'user', + password: '123456', } // 首检topic export const firstFQCTopic = { - // 累加值变动 - AccumulatorChange: title + '/firstFQC/AccumulatorChange', - // 班组切换 - TeamChange: title + '/firstFQC/TeamChange', - // 工单切换 - OrderChange: title + '/firstFQC/OrderChange', - // 首检当前操作工单保留消息 - NowOrderRetain: title + '/firstFQC/NowOrderRetain' + // 累加值变动 + AccumulatorChange: title + '/firstFQC/AccumulatorChange', + // 班组切换 + TeamChange: title + '/firstFQC/TeamChange', + // 工单切换 + OrderChange: title + '/firstFQC/OrderChange', + // 首检当前操作工单保留消息 + NowOrderRetain: title + '/firstFQC/NowOrderRetain', } // 抛光topic export const againFQCTopic = { - // 累加值变动 - AccumulatorChange: title + '/againFQC/AccumulatorChange', - // 班组切换 - TeamChange: title + '/againFQC/TeamChange', - // 工单切换 - OrderChange: title + '/againFQC/OrderChange' + // 累加值变动 + AccumulatorChange: title + '/againFQC/AccumulatorChange', + // 班组切换 + TeamChange: title + '/againFQC/TeamChange', + // 工单切换 + OrderChange: title + '/againFQC/OrderChange', } // 包装topic export const thirtyFQCTopic = { - // 累加值变动 - AccumulatorChange: title + '/thirtyFQC/AccumulatorChange', - // 班组切换 - TeamChange: title + '/thirtyFQC/TeamChange', - // 工单切换 - OrderChange: title + '/thirtyFQC/OrderChange' + // 累加值变动 + AccumulatorChange: title + '/thirtyFQC/AccumulatorChange', + // 班组切换 + TeamChange: title + '/thirtyFQC/TeamChange', + // 工单切换 + OrderChange: title + '/thirtyFQC/OrderChange', +} + +// GP12-topic +export const GP12Topic = { + // GP12标签扫码 + SiteComLabelCode: title + '/gp12/SiteComLabelCode', } export function createClient(clientId = null) { - let _options = options; - if (clientId !== null) { - _options.clientId = clientId; - } - return mqtt.connect(url, options); + let _options = options + if (clientId !== null) { + _options.clientId = clientId + } + return mqtt.connect(url, options) } export function endClient(client) { - if (client === null) { - return; - } - if (client.connected) { - client.end(); - } + if (client === null) { + return + } + if (client.connected) { + client.end() + } } export function parseJSON(jsonStr = '') { - try { - return JSON.parse(jsonStr); - } catch (e) { - return null; - } + try { + return JSON.parse(jsonStr) + } catch (e) { + return null + } } export function stringJSON(object) { - try { - return JSON.stringify(object); - } catch (e) { - return null; - } + try { + return JSON.stringify(object) + } catch (e) { + return null + } } // 检查是否连接 export function checkClient(client) { - if (client === null) { - return false; - } - return client.connected; -} \ No newline at end of file + if (client === null) { + return false + } + return client.connected +} diff --git a/src/views/business/QcGp12BaseDefect.vue b/src/views/business/QcGp12BaseDefect.vue index 71f2c1b..2214861 100644 --- a/src/views/business/QcGp12BaseDefect.vue +++ b/src/views/business/QcGp12BaseDefect.vue @@ -39,19 +39,11 @@ @selection-change="handleSelectionChange"> - - - - - - - - - + + + + + @@ -109,8 +101,8 @@ - {{ item.dictLabel }} + {{ item.dictLabel + }} diff --git a/src/views/business/QcGp12BaseGroup.vue b/src/views/business/QcGp12BaseGroup.vue index bc314a4..3bf6dc7 100644 --- a/src/views/business/QcGp12BaseGroup.vue +++ b/src/views/business/QcGp12BaseGroup.vue @@ -41,16 +41,8 @@ - - - - - - + + @@ -102,8 +94,8 @@ - {{ item.dictLabel }} + {{ item.dictLabel + }} diff --git a/src/views/business/QcGp12BaseLabelAnalysis.vue b/src/views/business/QcGp12BaseLabelAnalysis.vue index 4309e9e..5bb61a3 100644 --- a/src/views/business/QcGp12BaseLabelAnalysis.vue +++ b/src/views/business/QcGp12BaseLabelAnalysis.vue @@ -43,16 +43,8 @@ - - - - - - + + @@ -116,8 +108,8 @@ - {{ item.dictLabel }} + {{ item.dictLabel + }} diff --git a/src/views/business/QcGp12BaseSite.vue b/src/views/business/QcGp12BaseSite.vue index b80776f..ee2db84 100644 --- a/src/views/business/QcGp12BaseSite.vue +++ b/src/views/business/QcGp12BaseSite.vue @@ -41,16 +41,8 @@ - - - - - - + + @@ -102,8 +94,8 @@ - {{ item.dictLabel }} + {{ item.dictLabel + }} diff --git a/src/views/business/QcGp12LogWorkorder.vue b/src/views/business/QcGp12LogWorkorder.vue index eb2f337..1c4a141 100644 --- a/src/views/business/QcGp12LogWorkorder.vue +++ b/src/views/business/QcGp12LogWorkorder.vue @@ -9,9 +9,9 @@ @@ -875,30 +887,29 @@ export default { border-radius: 10px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 设置阴影 */ - margin-top: 10px; - margin-bottom: 10px; + margin-top: 2px; + margin-bottom: 2px; /* 增加卡片底部间距 */ } -.workorder-card { - min-height: 600px; -} - .card-header { color: #ecf0f1; - display: flex; align-items: center; justify-content: center; - font-size: 28px; + font-size: 20px; font-weight: 600; - } +.workorder-card { + min-height: 400px; +} + + .workorder-card-header { width: 100%; - font-size: 24px; - font-weight: 700; + font-size: 18px; + font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; @@ -907,15 +918,15 @@ export default { .workorder-card-table { width: 100%; - font-size: 20px; - font-weight: 600; + font-size: 16px; + font-weight: 500; border: 2px solid #000; border-collapse: collapse; } .workorder-card-table td { - padding: 10px; border: 2px solid #000; + padding: 5px; } .workorder-card-button-box { @@ -932,14 +943,13 @@ export default { align-items: center; justify-content: space-between; margin-bottom: 10px; - font-size: 20px; + font-size: 16px; font-weight: 600; } .defect-item-left { - - height: 120px; - font-size: 24px; + height: 100px; + font-size: 16px; font-weight: 600; display: flex; align-items: center; @@ -952,7 +962,7 @@ export default { border-radius: 5%; margin-top: 5px; margin-bottom: 5px; - background-color: #016129; + background-color: #11a983; display: flex; flex-direction: column; align-items: center; @@ -962,7 +972,7 @@ export default { } .defect-item-box:hover { - background-color: #00a876; + background-color: #008c62; /* 悬停时的背景颜色 */ transform: scale(1.05); /* 悬停时稍微放大 */ @@ -972,14 +982,14 @@ export default { .defect-item-name { width: 100%; - height: 100px; - font-size: 20px; + height: 60px; + font-size: 16px; font-weight: 600; text-align: center; display: flex; align-items: center; justify-content: center; - /* writing-mode: vertical-lr; */ + writing-mode: vertical-lr; letter-spacing: 5px; } @@ -987,7 +997,7 @@ export default { color: red; width: 100%; height: 40px; - font-size: 28px; + font-size: 20px; font-weight: 600; display: flex; align-items: center; @@ -995,7 +1005,7 @@ export default { } .number-text { - font-size: 28px; + font-size: 20px; font-weight: 600; }