From ae8d12c499079cf95d961bce28f6c677446130b0 Mon Sep 17 00:00:00 2001 From: yaowanxin <3588231647@qq.com> Date: 星期二, 29 七月 2025 10:12:01 +0800 Subject: [PATCH] 增添mqtt设备选项 --- src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue | 1 + src/views/business/inspectionTask/inspection.vue | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue index a8fa850..3857916 100644 --- a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue +++ b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue @@ -272,6 +272,7 @@ { label: "excel", value: ".xls" }, { label: "txt", value: ".txt" }, { label: "mysql", value: ".mysql" }, + { label: "mqtt", value: ".mqtt" }, { label: "png", value: ".png" } ], spanList: [], diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue index b441fb0..01ef6f2 100644 --- a/src/views/business/inspectionTask/inspection.vue +++ b/src/views/business/inspectionTask/inspection.vue @@ -598,6 +598,7 @@ sampleName: null, state: null, }, + isSerialConnected: false, // 鏂板鐘舵�佸彉閲忥紝涓插彛杩炴帴鐘舵�� id: null, changeType: null, insOrder: {}, @@ -1130,9 +1131,12 @@ this.$refs.purchaseDialog.$refs["purchaseForm"].resetFields(); this.purchaseDialog = false; }, + // 鏁版嵁閲囬泦 getDataAcquisitionDevice() { - // connect() + if (this.isSerialConnected) { + connect(); + } // return let itemIds = []; this.currentSample.insProduct.forEach((item) => { @@ -1159,6 +1163,11 @@ this.dataAcquisitionLoading = false; }); }, + // 鍋囪瀛樺湪涓�涓柟娉曠敤浜庢洿鏂颁覆鍙h繛鎺ョ姸鎬� + // updateSerialConnectionStatus(status) { + // this.isSerialConnected = status; + // }, + objectOrder(obj) { let newkey = Object.keys(obj).sort(); let newObj = {}; @@ -1220,6 +1229,7 @@ }; } let list = this.tableList[0].arr; + console.log(this.tableList[0]); // 寰幆椤甸潰鍒楄〃淇℃伅锛屽垽鏂暟閲囨暟鎹搴旈〉闈㈠垪琛ㄤ俊鎭殑妫�楠岄」鏄摢涓紝骞剁粰褰撳墠妫�楠岄」缁戝畾璁惧淇℃伅 list.forEach((item, index) => { let num0 = 0; -- Gitblit v1.9.3