| | |
| | | :span-method="spanMethod"> |
| | | <el-table-column type="index" label="序号" align="center" width="65"></el-table-column> |
| | | <el-table-column prop="deviceName" align="center" min-width="100" label="设备名称"></el-table-column> |
| | | <el-table-column prop="fileType" align="center" label="文件后缀"></el-table-column> |
| | | <el-table-column prop="collectUrl" align="center" min-width="100" show-overflow-tooltip |
| | | label="采集地址"></el-table-column> |
| | | <el-table-column prop="storageUrl" align="center" min-width="100" show-overflow-tooltip |
| | | label="存储地址"></el-table-column> |
| | | <el-table-column prop="ip" align="center" label="IP地址" min-width="100"></el-table-column> |
| | | <el-table-column prop="fileType" align="center" label="文件后缀" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="collectUrl" align="center" min-width="100" show-overflow-tooltip label="采集地址" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="storageUrl" align="center" min-width="100" show-overflow-tooltip label="存储地址" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="ip" align="center" label="IP地址" min-width="100" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="sample" align="center" label="检验对象" show-overflow-tooltip |
| | | min-width="150"></el-table-column> |
| | | <el-table-column prop="inspectionItemClass" align="center" label="检验项分类" min-width="120"></el-table-column> |
| | | <el-table-column prop="inspectionItem" align="center" label="检验项" min-width="100"></el-table-column> |
| | | <el-table-column prop="inspectionItemSubclass" align="center" label="检验子项" min-width="100"></el-table-column> |
| | | <el-table-column prop="referx" align="center" label="参照X" min-width="100"></el-table-column> |
| | | <el-table-column prop="x" align="center" label="X"></el-table-column> |
| | | <el-table-column prop="refery" align="center" label="参照Y" min-width="100"></el-table-column> |
| | | <el-table-column prop="y" align="center" label="Y"></el-table-column> |
| | | <el-table-column prop="anotherName" align="center" label="别名" min-width="100"></el-table-column> |
| | | <el-table-column prop="matchingName" align="center" label="匹配名称" min-width="100"></el-table-column> |
| | | <el-table-column prop="formula" align="center" label="公式"></el-table-column> |
| | | <el-table-column prop="importedParts" align="center" label="部位" min-width="100" |
| | | v-if="deviceName && deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="importedChannel" align="center" label="通道" min-width="100" |
| | | v-if="deviceName && deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="referx" align="center" label="参照X" min-width="100" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="x" align="center" label="X" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="refery" align="center" label="参照Y" min-width="100" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="y" align="center" label="Y" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="anotherName" align="center" label="别名" min-width="100" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="matchingName" align="center" label="匹配名称" min-width="100" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column prop="formula" align="center" label="公式" |
| | | v-if="deviceName && !deviceName.includes('网络分析')"></el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="dataConfig(scope.row)">数采配置</el-button> |
| | |
| | | </div> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="configForm.ip"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && deviceName.includes('网络分析')"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>端口: |
| | | </div> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="configForm.port"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('网络分析')"> |
| | | <div class="search_label"> |
| | | <span style="color:red;margin-right: 4px;">*</span>采集地址: |
| | | </div> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="configForm.collectUrl"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <!-- <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && deviceName.includes('网络分析')"> |
| | | <div class="search_label" style="width: 130px;"> |
| | | <span style="color:red;margin-right: 4px;">*</span>网分仪采集通道: |
| | | </div> |
| | | <el-select v-model="configForm.channel" multiple filterable allow-create placeholder="请选择"> |
| | | <el-option v-for="(item, index) in channelList" :key="index" :label="item" :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> --> |
| | | <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('网络分析')"> |
| | | <div class="search_label">储存地址:</div> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="configForm.storageUrl"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('网络分析')"> |
| | | <div class="search_label"> |
| | | <span style="color:red;margin-right: 4px;">*</span>文件后缀: |
| | | </div> |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('网络分析')"> |
| | | <div class="search_label">委托字段:</div> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="configForm.entrustCode"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('网络分析')"> |
| | | <div class="search_label">样品字段:</div> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="configForm.sampleCode"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_thing" style="margin-bottom: 14px;" v-if="deviceName && !deviceName.includes('网络分析')"> |
| | | <div class="search_label">文件名称:</div> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="configForm.dbFileName"></el-input> |
| | | </div> |
| | |
| | | <el-row> |
| | | <el-button @click="dialogVisible4 = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitForm4" :loading="upLoad4">确 定</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="数采配置" :visible.sync="dialogVisible5" width="400px"> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"> |
| | | <span style="color:red;margin-right: 4px;">*</span>部位: |
| | | </div> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="configForm.importedParts"></el-input> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 14px;"> |
| | | <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>通道: |
| | | </div> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="configForm.importedChannel"></el-input> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="dialogVisible5 = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitForm5" :loading="upLoad5">确 定</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | deviceId: { |
| | | type: Number, |
| | | default: () => [] |
| | | } |
| | | }, |
| | | deviceName: { |
| | | type: String, |
| | | default: () => '' |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.init(); |
| | |
| | | entrustCode: "", |
| | | sampleCode: "", |
| | | dbFileName: "", |
| | | fiberOpticRibbon: "" |
| | | fiberOpticRibbon: "", |
| | | port: '', |
| | | channel: [] |
| | | }, |
| | | domains: [ |
| | | { |
| | |
| | | { label: "db", value: ".db" }, |
| | | { label: "mdb", value: ".mdb" }, |
| | | { label: "word", value: ".docx" }, |
| | | { label: "excel", value: ".xlsx" }, |
| | | // { label: "excel", value: ".xlsx" }, |
| | | { label: "xlsx", value: ".xlsx" }, |
| | | { label: "txt", value: ".txt" }, |
| | | { label: "png", value: ".png" } |
| | | { label: "png", value: ".png" }, |
| | | { label: "et", value: ".et" }, |
| | | { label: "xls", value: ".xls" }, |
| | | { label: "pdf", value: ".pdf" } |
| | | ], |
| | | spanList: [], |
| | | specialSpanList: [], |
| | |
| | | ] |
| | | } |
| | | }, |
| | | deleteList: [] |
| | | deleteList: [], |
| | | channelList: [], |
| | | dialogVisible5: false, |
| | | upLoad5: false, |
| | | currentInfo: {} |
| | | }; |
| | | }, |
| | | // 方法集合 |
| | |
| | | "fiberOpticRibbon", |
| | | this.tableList[0].fiberOpticRibbon |
| | | ) |
| | | this.$set(this.configForm, "port", this.tableList[0].port); |
| | | // let arr = this.tableList[0].channel ? this.tableList[0].channel.split(',') : [] |
| | | // this.$set(this.configForm, "channel", arr); |
| | | // this.channelList = arr |
| | | } |
| | | }, |
| | | init() { |
| | |
| | | "fiberOpticRibbon", |
| | | this.tableList[0].fiberOpticRibbon |
| | | ) |
| | | // let arr = this.tableList[0].channel ? this.tableList[0].channel.split(',') : [] |
| | | // this.$set( |
| | | // this.configForm, |
| | | // "channel", |
| | | // arr |
| | | // ) |
| | | // this.$set( |
| | | // this.configForm, |
| | | // "port", |
| | | // this.tableList[0].port |
| | | // ) |
| | | // this.channelList = arr; |
| | | } |
| | | // 一般的合并行 |
| | | if ( |
| | |
| | | entrustCode: this.configForm.entrustCode, |
| | | sampleCode: this.configForm.sampleCode, |
| | | dbFileName: this.configForm.dbFileName, |
| | | fiberOpticRibbon: this.configForm.fiberOpticRibbon |
| | | fiberOpticRibbon: this.configForm.fiberOpticRibbon, |
| | | port: this.configForm.port, |
| | | // channel: this.configForm.channel |
| | | }); |
| | | if (this.deviceName && this.deviceName.includes('网络分析')) { |
| | | if (!this.configForm.port) { |
| | | return this.$message.error("请填写端口"); |
| | | } |
| | | // if (!this.configForm.channel || !this.configForm.channel.length) { |
| | | // return this.$message.error("请填写网分仪采集通道"); |
| | | // } |
| | | } |
| | | this.upLoad4 = true; |
| | | saveDataAcquisitionConfiguration({ deviceId: this.deviceId, ...obj }).then(res => { |
| | | if (res.code == 200) { |
| | |
| | | structureItemParameterId: row.structureItemParameterId, |
| | | inspectionItemClass: row.inspectionItemClass, |
| | | }; |
| | | this.dialogVisible3 = true; |
| | | queryDataAcquisitionConfiguration({ |
| | | deviceId: this.deviceId, |
| | | inspectionItem: row.inspectionItem.trim(), |
| | | isDevice: true, |
| | | inspectionItemSubclass: row.inspectionItemSubclass.trim(), |
| | | inspectionItemClass: row.inspectionItemClass ? row.inspectionItemClass.trim() : '', |
| | | structureItemParameterId: row.structureItemParameterId |
| | | }).then(res => { |
| | | const data = res.data; |
| | | if (data[0]) { |
| | | this.domains.splice(0, 1); |
| | | let formula = data[0].formula |
| | | let isIncludes = false |
| | | if (formula && formula != "") { |
| | | for (let key in this.formulas) { |
| | | if (formula.includes(this.formulas[key].label)) { |
| | | isIncludes = true |
| | | if (this.deviceName && this.deviceName.includes('网络分析')) { |
| | | this.currentInfo = row |
| | | this.dialogVisible5 = true; |
| | | this.$set(this.configForm, 'importedParts', row.importedParts ? row.importedParts : '') |
| | | this.$set(this.configForm, 'importedChannel', row.importedChannel ? row.importedChannel : '') |
| | | } else { |
| | | this.dialogVisible3 = true; |
| | | queryDataAcquisitionConfiguration({ |
| | | deviceId: this.deviceId, |
| | | inspectionItem: row.inspectionItem.trim(), |
| | | isDevice: true, |
| | | inspectionItemSubclass: row.inspectionItemSubclass.trim(), |
| | | inspectionItemClass: row.inspectionItemClass ? row.inspectionItemClass.trim() : '', |
| | | structureItemParameterId: row.structureItemParameterId |
| | | }).then(res => { |
| | | const data = res.data; |
| | | if (data[0]) { |
| | | this.domains.splice(0, 1); |
| | | let formula = data[0].formula |
| | | let isIncludes = false |
| | | if (formula && formula != "") { |
| | | for (let key in this.formulas) { |
| | | if (formula.includes(this.formulas[key].label)) { |
| | | isIncludes = true |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (!isIncludes && formula) { |
| | | let formulaValue = formula.slice(1, -1) |
| | | this.$set(this.configForm, "formula", formulaValue); |
| | | } else { |
| | | this.$set(this.configForm, "formula", data[0].formula); |
| | | } |
| | | data.forEach(i => { |
| | | this.domains.push({ |
| | | referx: i.referx, |
| | | refery: i.refery, |
| | | x: i.x, |
| | | y: i.y, |
| | | anotherName: i.anotherName, |
| | | matchingName: i.matchingName, |
| | | id: i.id |
| | | if (!isIncludes && formula) { |
| | | let formulaValue = formula.slice(1, -1) |
| | | this.$set(this.configForm, "formula", formulaValue); |
| | | } else { |
| | | this.$set(this.configForm, "formula", data[0].formula); |
| | | } |
| | | data.forEach(i => { |
| | | this.domains.push({ |
| | | referx: i.referx, |
| | | refery: i.refery, |
| | | x: i.x, |
| | | y: i.y, |
| | | anotherName: i.anotherName, |
| | | matchingName: i.matchingName, |
| | | id: i.id |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | submitForm3() { |
| | | this.$refs.configForm.validate(valid => { |
| | |
| | | ]; |
| | | this.dialogVisible3 = false; |
| | | this.$refs.configForm.resetFields(); |
| | | }, |
| | | submitForm5() { |
| | | this.currentInfo.importedParts = this.configForm.importedParts |
| | | this.currentInfo.importedChannel = this.configForm.importedChannel |
| | | this.currentInfo.deviceId = this.deviceId |
| | | saveDataAcquisitionConfiguration({ |
| | | deviceId: this.deviceId, |
| | | isDevice: false, |
| | | dataConfigList: [{ ...this.currentInfo }], |
| | | }).then(res => { |
| | | this.dialogVisible5 = false; |
| | | this.init(); |
| | | this.$message.success("添加成功"); |
| | | }); |
| | | } |
| | | } |
| | | }; |