From c733b4fc98e348f4f60f71a291c3acfa6d7d4ce9 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期四, 24 四月 2025 10:38:59 +0800 Subject: [PATCH] 网分仪调整 --- src/views/business/inspectionTask/components/NetworkAnalyzerDataAcquisition.vue | 58 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/views/business/inspectionTask/components/NetworkAnalyzerDataAcquisition.vue b/src/views/business/inspectionTask/components/NetworkAnalyzerDataAcquisition.vue index 9b30727..86d1199 100644 --- a/src/views/business/inspectionTask/components/NetworkAnalyzerDataAcquisition.vue +++ b/src/views/business/inspectionTask/components/NetworkAnalyzerDataAcquisition.vue @@ -51,7 +51,7 @@ } }, methods: { - init() { + async init() { this.itemListNew = this.HaveJson(this.itemList) let equip = null; for (let n in this.param) { @@ -61,11 +61,6 @@ this.isShowBtn = true } } - return equip - }, - // 杩涘彛缃戝垎浠暟閲� - async getMetadata() { - let equip = this.init() if (equip) { await this.getItemConfig(equip) this.itemListNew.forEach(item => { @@ -77,12 +72,19 @@ } } }) + } + return equip + }, + // 杩涘彛缃戝垎浠暟閲� + async getMetadata() { + let equip = await this.init() + if (equip) { this.gatherNetworkAnalyzerSampleItem() } }, // 鍥戒骇缃戝垎浠暟閲� - getMetadata0() { - let equip = this.init() + async getMetadata0() { + let equip = await this.init() if (equip) { this.form = { serverIp: equip.ip, @@ -247,7 +249,7 @@ $.ajax({ type: 'post', url: - 'http://127.0.0.1:8089/zhrf_CollectData.asmx?op=CalValue', + 'http://127.0.0.1:8088/zhrf_CollectData.asmx?op=CalValue', headers: { 'Content-Type': 'text/xml;charset=utf-8' }, @@ -260,10 +262,8 @@ const resData = resJson.data if (resData.length > 0) { resData.forEach((resDataEle) => { - const paramItem = _that.dataList[ - '閲囬泦椤�' - ].find((ele) => { - return ele.itemName == resDataEle.Column1 + const paramItem = _that.itemListNew.find((ele) => { + return ele.inspectionItem == resDataEle.Column1 }) if (paramItem) { paramItem.acqItemValue = @@ -335,7 +335,7 @@ const length = num ? this.roundFun(num, 6) : undefined const capacity = findFromCL('鐢靛锛堟祴璇曞�硷級') const Xiangweicha = this.itemListNew.find(m => m.inspectionItem.indexOf('鐩镐綅宸�') > -1) - let cycle + let cycle = 4 if ( Xiangweicha && Xiangweicha.itemReference && @@ -392,12 +392,12 @@ } } - const loading = this.$loading({ - lock: true, - text: '鏁版嵁閲囬泦涓�', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }) + // const loading = this.$loading({ + // lock: true, + // text: '鏁版嵁閲囬泦涓�', + // spinner: 'el-icon-loading', + // background: 'rgba(0, 0, 0, 0.7)' + // }) const params = { ...this.form, temperture, @@ -423,16 +423,16 @@ } }) - this.dataList['閲囬泦椤�'].forEach((e) => { - if (e.itemName.indexOf('琛板噺') > -1) { + this.itemListNew.forEach((e) => { + if (e.inspectionItem.indexOf('琛板噺') > -1) { const d = data.find((d) => { const match = d.label.match(/decay_(\d+)m/) return ( match && - (match[1] + 'MHz琛板噺' === e.itemName || - match[1] + 'MHZ琛板噺' === e.itemName || - +match[1] / 1000 + 'GHz琛板噺' === e.itemName || - +match[1] / 1000 + 'GHZ琛板噺' === e.itemName) && + (match[1] + 'MHz琛板噺' === e.inspectionItem || + match[1] + 'MHZ琛板噺' === e.inspectionItem || + +match[1] / 1000 + 'GHz琛板噺' === e.inspectionItem || + +match[1] / 1000 + 'GHZ琛板噺' === e.inspectionItem) && d.channel === +e.aisle ) }) @@ -442,7 +442,7 @@ // e.itemValue = Math.min(e.acqItemValue, e.calItemValue) e.itemValue = e.calItemValue } - } else if (e.itemName.indexOf('椹绘尝姣�') > -1) { + } else if (e.inspectionItem.indexOf('椹绘尝姣�') > -1) { const trace1 = data.find((d) => { const match = d.label.match(/swr_(\d+)m/) return match && d.channel === +e.aisle && d.trace === 1 @@ -469,14 +469,14 @@ if (trace1 || trace2) { e.itemValue = Math.max(value1, value2) } - } else if (e.itemName.indexOf('鐩镐綅宸�') > -1) { + } else if (e.inspectionItem.indexOf('鐩镐綅宸�') > -1) { const d = data.find((d) => { return d.channel === +e.aisle && d.label === 'pha_mean' }) if (d) { e.acqItemValue = this.roundFun(d.decimalVal, 3) } - } else if (e.itemName.indexOf('鐗规�ч樆鎶�') > -1) { + } else if (e.inspectionItem.indexOf('鐗规�ч樆鎶�') > -1) { const trace1 = data.find((d) => { return ( d.channel === +e.aisle && -- Gitblit v1.9.3