zouyu
2023-09-15 e03f39a06c9f17ee0bf9a2b1fa24b7de0ea2e3d4
src/components/view/rawInsDetail.vue
@@ -12,7 +12,7 @@
            >提 交</el-button
          >
          <el-button
            icon="el-icon-download"
            icon="el-icon-back"
            @click="
              () => {
                goBack();
@@ -350,6 +350,7 @@
</template>
<script>
import { triggerRef } from "vue";
import RawIns from "./raw-ins.vue";
export default {
  components: { RawIns },
@@ -383,6 +384,7 @@
      } else {
        conclusion.testState = 1;
      }
      console.log([conclusion]);
      return [conclusion];
    }
  },
@@ -467,10 +469,24 @@
      this.detailId = res.data;
      this.getDetailInfo();
      this.$message.success(res.message);
      this.goBack();
    },
    // 修改项目的检测值改变结论
    async changeState(row, index) {
      let val=row.testValueList.filter(item=>{
        return item!=''&&item!=null
      })
      let eq=val.filter(item=>{
        return /^[^><=]/.test(item)
      })
      if(eq.length>0){
        this.$message({
                    message: "输入值["+eq+"]格式首位应包含>,<或者=",
                    type: 'warning'
                });
      return
      }
      if (this.detailId !== null) {
        const res = await this.$axios.post(this.$api.url.updaterawInsProduct, {
          DevId: row.deviceId,
@@ -485,9 +501,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()
      });
    },
    // 获取设备树内容
@@ -505,6 +521,7 @@
        name: "",
        required: "",
        textValue: "",
        testState:null,
        testValueList: [],
        unit: ""
      };