| | |
| | | </el-form-item> |
| | | <el-form-item label="通道" prop="memoryDir"> |
| | | <el-select v-model="form.memoryDir" placeholder="请选择"> |
| | | <el-option :label="item" :value="item" v-for="(item, index) in channel" :key="index"></el-option> |
| | | <el-option v-for="(a, ai) in dict.type.domestic_network_analyzers" :key="ai" :label="a.label" |
| | | :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | import { |
| | | queryDataAcquisitionConfigurationTwo, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { |
| | | getTCPValuesNew |
| | | } from "@/api/business/inspectionTask.js"; |
| | | export default { |
| | | dicts: ['domestic_network_analyzers'], |
| | | props: ['itemList', 'param', 'equipOptions'], |
| | | data() { |
| | | return { |
| | |
| | | itemListNew: [], |
| | | dialogVisible: false, |
| | | form: {}, |
| | | channel: [], |
| | | // channel: [], |
| | | rules: { |
| | | memoryDir: [ |
| | | { required: true, message: '请选择通道', trigger: 'change' } |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | async init() { |
| | | this.itemListNew = this.HaveJson(this.itemList) |
| | | let equip = null; |
| | | for (let n in this.param) { |
| | |
| | | this.isShowBtn = true |
| | | } |
| | | } |
| | | return equip |
| | | }, |
| | | // 进口网分仪数采 |
| | | async getMetadata() { |
| | | let equip = this.init() |
| | | if (equip) { |
| | | await this.getItemConfig(equip) |
| | | this.itemListNew.forEach(item => { |
| | |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | 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, |
| | | serverPort: equip.port, |
| | | memoryDir: null |
| | | } |
| | | this.channel = equip.channel ? equip.channel.split(',') : [] |
| | | // this.channel = equip.channel ? equip.channel.split(',') : [] |
| | | this.dialogVisible = true |
| | | } |
| | | }, |
| | |
| | | dataItem = { |
| | | Column1: item.inspectionItem, |
| | | // Column2: item.itemReference,// TODO: 相位差-周期数 |
| | | Column2: '周期数', |
| | | TD: item.aisle == null ? '0' : item.aisle, |
| | | BW: item.position == null ? '0' : item.position |
| | | } |
| | |
| | | $.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' |
| | | }, |
| | |
| | | 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 = |
| | |
| | | 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 && |
| | |
| | | } |
| | | } |
| | | |
| | | 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, |
| | |
| | | } |
| | | }) |
| | | |
| | | 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 |
| | | ) |
| | | }) |
| | |
| | | // 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 |
| | |
| | | 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 && |