Fixiaobai
2023-09-15 d77fc6758d8d66e0f3e35486251d211d102857be
src/components/view/rawInsDetail.vue
@@ -12,7 +12,7 @@
            >提 交</el-button
          >
          <el-button
            icon="el-icon-download"
            icon="el-icon-back"
            @click="
              () => {
                goBack();
@@ -194,6 +194,7 @@
          <template slot-scope="scope">
            <el-input
              :disabled="detailId != null"
              @blur="assertTest(scope.row)"
              v-model="scope.row.required"
              placeholder="请输入标准值"
            ></el-input>
@@ -202,6 +203,7 @@
        <el-table-column prop="internal" label="内控值" min-width="150">
          <template slot-scope="scope">
            <el-input
              @blur="assertTest(scope.row)"
              :disabled="detailId != null"
              v-model="scope.row.internal"
              placeholder="请输入内控值"
@@ -424,6 +426,22 @@
    }
  },
  methods: {
    assertTest(row){
      if(!/^[^><=]/.test(row.required)){
        this.$message({
                    message: "标准值["+row.required+"]格式首位应包含>,<或者=",
                    type: 'warning'
                });
                return
      }
      if(!/^[^><=]/.test(row.internal)){
        this.$message({
                    message: "内控值["+row.internal+"]格式首位应包含>,<或者=",
                    type: 'warning'
                });
                return
      }
    },
    // 设备树过滤搜索
    filterNode(value, data) {
      if (!value) return true;
@@ -469,6 +487,7 @@
      this.detailId = res.data;
      this.getDetailInfo();
      this.$message.success(res.message);
      this.goBack();
    },
    // 修改项目的检测值改变结论
@@ -487,9 +506,9 @@
      const res = await this.$axios.post(
        this.$api.url.updateRawInspectsById + `${this.detailId}`
      ).then(res=>{
        this.$parent.removeAllTab()
        this.$message.success("提交成功");
        this.getDetailInfo();
        this.goBack()
      });
    },
    // 获取设备树内容