qx
2025-06-05 93452e1aad484102f15234d1a6f76764bd18a5ca
src/components/public/index.vue
@@ -1,15 +1,26 @@
<template>
  <div>
    <el-dialog :title="title" :visible.sync="open" width="1080px" append-to-body>
    <el-dialog
      :title="title"
      :visible.sync="open"
      width="1080px"
      append-to-body
    >
      <h3 v-if="fList.proResult">检测项目 :{{ fList.project.proName }}</h3>
      <h3 v-if="fList.proResult">
        检测结果 :{{ fList.proResult }}{{ fList.project.proMetering }}
      </h3>
      <h2 style="text-align: center;">{{ proName || '暂无项目名称' }}</h2>
      <h2 style="text-align: center">{{ proName || "暂无项目名称" }}</h2>
      <div style="display: flex; width: 100%">
        <div style="width: 50%; margin-right: 40px">
          <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
          <el-form
            :model="queryParams"
            ref="queryForm"
            size="small"
            :inline="true"
            label-width="68px"
          >
            <!-- <el-form-item label="病种名称" prop="bingzhong">
          <el-input
            v-model="queryParams.bingzhong"
@@ -20,11 +31,22 @@
          />
        </el-form-item>-->
            <el-form-item label="检查结论" prop="ruleStr">
              <el-input v-model="queryParams.ruleStr" placeholder="请输入检查结论" clearable @keyup.enter.native="getList"
                style="width: 130px" />
              <el-input
                v-model="queryParams.ruleStr"
                placeholder="请输入检查结论"
                clearable
                @keyup.enter.native="getList"
                style="width: 130px"
              />
            </el-form-item>
            <el-form-item>
              <el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
              <el-button
                type="primary"
                icon="el-icon-search"
                size="mini"
                @click="getList"
                >搜索</el-button
              >
            </el-form-item>
            <!-- <el-form-item>
          <h3 >{{ queryParams.proName  || '暂无项目名称'  }}</h3>
@@ -33,25 +55,48 @@
          <h3 style="margin-left: 160px">已选项目</h3>
        </el-form-item> -->
          </el-form>
          <el-table :data="dataList" ref="multipleTable" v-loading="loading" @selection-change="handleSelectionChange"
            border height="480px">
          <el-table
            :data="dataList"
            ref="multipleTable"
            v-loading="loading"
            @selection-change="handleSelectionChange"
            border
            height="480px"
          >
            <el-table-column type="selection" width="40" align="center" />
            <el-table-column label="序号" type="index" align="center" width="50px" />
            <el-table-column
              label="序号"
              type="index"
              align="center"
              width="50px"
            />
            <!-- <el-table-column label="规则" align="center" prop="ruleStr" /> -->
            <el-table-column label="检查所见" align="center" prop="yxbx" />
            <el-table-column label="检查结论" align="center" prop="ruleStr" />
          </el-table>
          <div class="pag">
            <div class="pag1" style="margin-left: 630px">
              <pagination small v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
                :limit.sync="queryParams.pageSize" @pagination="getList" />
              <pagination
                small
                v-show="total > 0"
                :total="total"
                :page.sync="queryParams.pageNum"
                :limit.sync="queryParams.pageSize"
                @pagination="getList"
              />
            </div>
          </div>
        </div>
        <div class="jianc">
          <!-- <h3 style="margin-top: -30px;">已选项目</h3> -->
          <el-form :model="form" ref="queryForm" size="small" label-width="68px" :label-position="labelPosition">
          <el-form
            :model="form"
            ref="queryForm"
            size="small"
            label-width="68px"
            :label-position="labelPosition"
          >
            <!--  :inline="true" -->
            <!-- <el-form-item>
              <el-input
@@ -61,10 +106,22 @@
              ></el-input>
            </el-form-item> -->
            <el-form-item label="检查所见" prop="jcsj">
              <el-input v-model="form.jcsj" clearable type="textarea" :autosize="{ minRows: 7 }" style="width: 380px" />
              <el-input
                v-model="form.jcsj"
                clearable
                type="textarea"
                :autosize="{ minRows: 7 }"
                style="width: 380px"
              />
            </el-form-item>
            <el-form-item label="检查结论" prop="desc">
              <el-input v-model="form.desc" clearable type="textarea" :autosize="{ minRows: 7 }" style="width: 380px" />
              <el-input
                v-model="form.desc"
                clearable
                type="textarea"
                :autosize="{ minRows: 7 }"
                style="width: 380px"
              />
            </el-form-item>
          </el-form>
        </div>
@@ -109,7 +166,7 @@
      // 弹出层标题
      title: "",
      yxbx: "",
      proName: '',
      proName: "",
      //   lastDesc: "",
      total: 0,
      dataList: [],
@@ -132,7 +189,7 @@
  },
  watch: {
    checkStatus(newValue) {
      console.log(565658)
      console.log(565658);
      if (newValue === "1") {
        this.updateData(this.proResult, this.conclusion);
      }
@@ -147,14 +204,14 @@
          const firstProject = newVal[0]; // 你也可以遍历所有项目,看你业务需求
          this.queryParams.proId = firstProject.proId; // 假设项目中叫 id
          //this.queryParams.proName = firstProject.proName; // 假设叫 proName
          this.proName = firstProject.proName
          this.proName = firstProject.proName;
        }
      },
    },
  },
  mounted() { },
  mounted() {},
  created() { },
  created() {},
  methods: {
    async getList() {
      try {
@@ -201,9 +258,8 @@
    },
    updateData(proResult, conclusion) {
      console.log(proResult, conclusion, 5658)
      console.log(proResult, conclusion, 5658);
      if (this.checkStatus == 1) {
        this.form.jcsj = proResult; // 更新检查所见
        this.form.desc = conclusion; // 更新检查结论
      } else {
@@ -212,12 +268,12 @@
      }
      if (this.list.length != 0) {
        let desc = ""
        let desc = "";
        desc += this.list
          .map((item) => item.bingzhong || item.ruleStr)
          .filter(Boolean)
          .join(",");
        let jcsj = ""
        let jcsj = "";
        jcsj += this.list
          .map((item) => item.yxbx)
          .filter(Boolean)
@@ -261,6 +317,19 @@
      if (!this.form.desc && !this.form.jcsj) {
        this.$message.warning("请选择数据");
        return;
      } else {
        const desc = this.form.desc?.trim();
        const jcsj = this.form.jcsj?.trim();
        // 如果没有选中表格项
        if (!this.list || this.list.length === 0) {
          if (!desc && !jcsj) {
            this.$message.warning(
              "请填写有效的检查所见和检查结论,或选择表格数据"
            );
            return;
          }
        }
      }
      try {
@@ -283,7 +352,7 @@
    },
    callcolos() {
      this.open = false;
    }
    },
  },
  computed: {
    isCheckMode() {
@@ -315,6 +384,6 @@
.jianc {
  width: 100%;
  height: 600px;
  padding-top: 40px
  padding-top: 40px;
}
</style>