| | |
| | | <template> |
| | | <div class="btns"> |
| | | <el-button type="primary" size="small" @click="getMetadata()">进口网分仪数采</el-button> |
| | | <el-button type="primary" size="small" @click="getMetadata0">国产网分仪数采</el-button> |
| | | <el-button type="primary" size="small" @click="getMetadata()" v-if="isShowBtn">进口网分仪数采</el-button> |
| | | <el-button type="primary" size="small" @click="getMetadata0" v-if="isShowBtn">国产网分仪数采</el-button> |
| | | <el-dialog title="国产网分" :visible.sync="dialogVisible" width="30%"> |
| | | <el-form ref="form" :model="form" label-width="50px" :rules="rules"> |
| | | <el-form-item label="IP"> |
| | |
| | | <el-input v-model="form.serverPort" disabled></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="通道" prop="memoryDir"> |
| | | <el-select v-model="form.memoryDir" placeholder="请选择活动区域"> |
| | | <el-select v-model="form.memoryDir" placeholder="请选择"> |
| | | <el-option :label="item" :value="item" v-for="(item, index) in channel" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | memoryDir: [ |
| | | { required: true, message: '请选择通道', trigger: 'change' } |
| | | ], |
| | | } |
| | | }, |
| | | isShowBtn: false,//是否展示按钮 |
| | | } |
| | | }, |
| | | mounted() { |
| | | // console.log(this.param, this.itemList) |
| | | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | console.log(222222, this.param) |
| | | this.itemListNew = this.HaveJson(this.itemList) |
| | | let equip = null; |
| | | for (let n in this.param) { |
| | | let obj = this.equipOptions.find(m => m.value == this.param[n].equipValue[0].v.v) |
| | | if (obj && obj.label && obj.label.indexOf('网络分析仪') > -1) { |
| | | equip = obj |
| | | this.isShowBtn = true |
| | | } |
| | | } |
| | | return equip |
| | | }, |
| | | // 进口网分仪数采 |
| | | async getMetadata() { |
| | | let equip = this.init() |
| | | if (equip) { |
| | |
| | | this.gatherNetworkAnalyzerSampleItem() |
| | | } |
| | | }, |
| | | // 国产网分仪数采 |
| | | getMetadata0() { |
| | | let equip = this.init() |
| | | if (equip) { |
| | |
| | | if (temperatureItem) { |
| | | temperatureItem.itemValue = this.param[temperatureItem.id].resValue.v.v |
| | | } |
| | | console.log('temperatureItem', temperatureItem) |
| | | const temperature = temperatureItem ? temperatureItem.itemValue : null |
| | | |
| | | const cdItem = this.itemListNew.find(m => m.inspectionItem == '电缆长度') |