spring
2025-04-24 c733b4fc98e348f4f60f71a291c3acfa6d7d4ce9
网分仪调整
已修改1个文件
58 ■■■■ 文件已修改
src/views/business/inspectionTask/components/NetworkAnalyzerDataAcquisition.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 &&