gaoluyang
2025-06-10 76aa50cfb9725d0399212c3c8b9e001e82811aa8
src/views/business/inspectionTask/inspection.vue
@@ -422,6 +422,8 @@
              <td :rowspan="item.child.length">{{ item.faName }}</td>
              <td>{{ item.child[0].name }}</td>
              <td style="text-align: left">
                <!-- 添加容器 div -->
                <div class="data-collection-items">
                <el-select v-if="item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1"
                  :multiple-limit="item.child[0].maxNum" clearable filterable multiple placeholder="请选择"
                  @change="setData(item)">
@@ -446,11 +448,14 @@
                  :max="item.child[0].maxNum">
                  <el-checkbox v-for="(n, j) in item.child[0].arr" :key="j" :label="j + '^' + n">{{ n }}</el-checkbox>
                </el-checkbox-group>
                </div>
              </td>
            </tr>
            <tr v-for="(m, i) in item.child" v-show="i > 0" :key="i + 'bbbbbbbbbbbbbb'">
              <td>{{ m.name }}</td>
              <td style="text-align: left">
                 <!-- 添加容器 div -->
                 <div class="data-collection-items">
                <el-select v-if="m.isShowSelect" v-model="m.getDataIndex1" :multiple-limit="m.maxNum" clearable
                  filterable multiple placeholder="请选择">
                  <el-option v-for="(item, index1) in m.arr" :key="index1" :label="index + 1 + '^' + item.result"
@@ -473,6 +478,7 @@
                <el-checkbox-group v-if="!m.isShowSelect" v-model="m.getDataIndex1" :max="m.maxNum">
                  <el-checkbox v-for="(n, j) in m.arr" :key="j" :label="j + '^' + n">{{ n }}</el-checkbox>
                </el-checkbox-group>
              </div>
              </td>
            </tr>
          </template>
@@ -546,8 +552,8 @@
  delfile,
  inspectionOrderDetailsTaskSwitching
} from "@/api/business/inspectionTask.js";
import InspectionWorker from '@/workers/InspectionWorker.worker';
import DataWorker from '../../../workers/DataWorker.worker';
import InspectionWorker from '@/workers/InspectionWorker.worker.js';
import DataWorker from '@/workers/DataWorker.worker.js';
import html2canvas from "html2canvas";
import { mapGetters } from "vuex";
import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue";
@@ -2076,10 +2082,12 @@
        }
      });
      // 本次循环主要是对页面及后端传参进行初始化赋值
      console.log(this.currentSample.insProduct)
      this.currentSample.insProduct.forEach(async (a) => {
        try {
          // 计算值赋值
          let comValue = JSON.parse(a.insProductResult.comValue);
          for (var i = 0; i < comValue.length; i++) {
            if (
              this.param[a.id].comValue.find(
@@ -2663,12 +2671,23 @@
          } else {
            param = this.param;
          }
          let isNoTestValue = ''
          for (let key in param) {
            if (param[key]) {
              if (param[key].insValue?.length === 0) {
                isNoTestValue = 1
              } else {
                isNoTestValue = ''
              }
            }
          }
          saveInsContext({
            param: JSON.stringify(param),
            currentTable: this.currentTable,
            sampleId: this.currentSample.id,
            orderId: this.orderId,
            sonLaboratory: this.sonLaboratory
            sonLaboratory: this.sonLaboratory,
            isNoTestValue: isNoTestValue
          }).then((res) => {
            this.$message.success("已保存");
          });
@@ -2870,7 +2889,7 @@
  },
};
</script>
<style scoped>
<styl scoped>
.custom-table .el-table__header-wrapper th {
  background-color: #87ceeb;
  /* 只对带有my-custom-table类的表格生效 */
@@ -3072,7 +3091,7 @@
  display: inline-flex;
  align-items: center;
}
</style>
</styl>
<style scoped>
/* .inspection .el-form-item__label {
  color: #000;
@@ -3140,4 +3159,15 @@
  max-width: 1000px;
  /* 设置最大宽度 */
}
.data-collection-items {
  display: flex;
  flex-wrap: wrap;
}
.data-collection-items .el-select,
.data-collection-items .el-checkbox {
  flex-basis: 20% ;
  box-sizing: border-box;
  padding: 5px 15px;
}
</style>