spring
2025-04-18 0885aa811a94cae8d7473c9b2957a447110c9b1d
src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
@@ -28,13 +28,24 @@
        <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>
@@ -127,7 +138,7 @@
      <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>
        <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">
@@ -173,6 +184,25 @@
        <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>
@@ -316,7 +346,9 @@
        }
      },
      deleteList: [],
      channelList: []
      channelList: [],
      dialogVisible5: false,
      upLoad5: false,
    };
  },
  // 方法集合
@@ -576,6 +608,11 @@
        structureItemParameterId: row.structureItemParameterId,
        inspectionItemClass: row.inspectionItemClass,
      };
      if (this.deviceName && this.deviceName.includes('网络分析')) {
        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,
@@ -616,6 +653,7 @@
          });
        }
      });
      }
    },
    submitForm3() {
      this.$refs.configForm.validate(valid => {
@@ -725,6 +763,18 @@
      ];
      this.dialogVisible3 = false;
      this.$refs.configForm.resetFields();
    },
    submitForm5() {
      saveDataAcquisitionConfiguration({
        deviceId: this.deviceId,
        isDevice: true,
        importedParts: this.configForm.importedParts,
        importedChannel: this.configForm.importedChannel,
      }).then(res => {
        this.dialogVisible5 = false;
        this.init();
        this.$message.success("添加成功");
      });
    }
  }
};