Fixiaobai
2023-09-15 cdf986d7321208634387a8ab5eafa8e8e3d872f8
	modified:   src/components/view/processInspectionUpdate.vue
modified: src/components/view/rawInsDetail.vue
已修改2个文件
36 ■■■■■ 文件已修改
src/components/view/processInspectionUpdate.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/rawInsDetail.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/processInspectionUpdate.vue
@@ -126,7 +126,7 @@
                        <el-button v-if="!scope.row.isSelectDevice" type="text" @click="clickTableSelect(scope)">{{
                            scope.row.dname == null ? "请选择" : scope.row.dname
                        }}</el-button>
                        <el-select v-if="scope.row.isSelectDevice" style="width: 100%;" @change="clickNodeSure(scope.row)"
                        <el-select v-if="scope.row.isSelectDevice" style="width: 100%;" onchange="clickNodeSure(scope.row)"
                             v-model="filterText" placeholder="请选择">
                            <el-option v-for="item in materialOptions" :key="item.id" :label="item.device" :value="item.id">
                            </el-option>
@@ -171,10 +171,10 @@
        </div>
        <el-dialog title="请选择设备" :visible.sync="centerDialogVisible" width="20%">
            <div class="div_device_dialog">
                <el-select style="width: 100%;" @change="clickNodeSure()" v-model="filterText" placeholder="请选择">
                <!-- <el-select style="width: 100%;" @change="clickNodeSure()" v-model="filterText" placeholder="请选择">
                    <el-option v-for="item in materialOptions" :key="item.id" :label="item.device" :value="item.id">
                    </el-option>
                </el-select>
                </el-select> -->
            </div>
            <!-- <span slot="footer" class="dialog-footer">
                <el-button @click="centerDialogVisible = false">取 消</el-button>
@@ -367,6 +367,7 @@
        },
        // 获取设备树内容
        getOptions(row) {
            this.filterText=0
            this.$axios.get(this.$api.url.inspectionItemChooseDev, {
                params: {
                    father: row.father,
@@ -392,6 +393,7 @@
        },
        // 点击树里面的确定
        clickNodeSure(row) {
            console.log(row);
            let select = this.materialOptions.filter(item => {
                return item.id === this.filterText
            })[0]
@@ -414,6 +416,7 @@
                    })
                    .then(res => {
                        row.isSelectDevice = false
                        console.log("row",row);
                        this.filterText=0
                        this.getTableData()
                        this.centerDialogVisible = false;
src/components/view/rawInsDetail.vue
@@ -479,11 +479,12 @@
      console.log(this.projectTable);
      if(this.projectTable.length>0){
        let filterTable= this.projectTable.filter(item=>{
        return item.required===''||item.internal===''||item.required===null||item.internal===null
        return item.required===''||item.internal===''||
        item.required===null||item.internal===null||item.name===''
        })
        if(filterTable.length>0) {
          this.$message({
                    message: "标准值和内控值不能为空!",
                    message: "项目名称,标准值和内控值不能为空!",
                    type: 'warning'
                });
          return
@@ -494,15 +495,25 @@
        i.testValue = i.testValueList.join(",");
      });
      this.detailInfo.rawInsProducts = this.projectTable;
      const res = await this.$axios.post(
      this.$axios.post(
        this.$api.url.addRawInspects,
        { ...this.detailInfo },
        { headers: { "Content-Type": "application/json" } }
      );
      this.detailId = res.data;
      this.getDetailInfo();
      this.$message.success(res.message);
      this.goBack();
      ).then(res=>{
        console.log(res);
        if(res.code=="201"){
          this.$message({
                    message: res.message,
                    type: 'warning'
                });
         return
        }else{
          // this.detailId = res.data;
          // this.getDetailInfo();
          // // this.$message.success(res.message);
          // this.goBack();
        }
      });
    },
    // 修改项目的检测值改变结论