1
lkk
2025-04-11 c3e7f99b9070230896865a7a0f805473aeed83ea
src/components/public/index.vue
@@ -17,7 +17,7 @@
        :inline="true"
        label-width="68px"
      > -->
        <!-- <el-form-item label="病种名称" prop="bingzhong">
      <!-- <el-form-item label="病种名称" prop="bingzhong">
          <el-input
            v-model="queryParams.bingzhong"
            placeholder="请输入简称"
@@ -44,14 +44,16 @@
            >搜索</el-button
          >
        </el-form-item> -->
        <!-- <el-form-item>
      <!-- <el-form-item>
          <h3 >{{ queryParams.proName  || '暂无项目名称'  }}</h3>
        </el-form-item> -->
        <!-- <el-form-item>
      <!-- <el-form-item>
          <h3 style="margin-left: 160px">已选项目</h3>
        </el-form-item> -->
      <!-- </el-form> -->
      <h2 style="text-align: center;margin-top: -30px;">{{ queryParams.proName  || '暂无项目名称'  }}</h2>
      <h2 style="text-align: center; margin-top: -30px">
        {{ queryParams.proName || "暂无项目名称" }}
      </h2>
      <div style="display: flex; width: 100%">
        <div style="width: 50%; margin-right: 40px">
          <el-table
@@ -157,6 +159,10 @@
      type: Array,
      default: () => [],
    },
    proSex: {
      type: String,
      default: "2"
    }
  },
  data() {
    return {
@@ -164,7 +170,7 @@
      // 弹出层标题
      title: "",
      yxbx: "",
      proName:'',
      proName: "",
      //   lastDesc: "",
      total: 0,
      dataList: [],
@@ -177,8 +183,8 @@
      queryParams: {
        bingzhong: "",
        bzPinyin: "",
        proId:"",
        proName:"",
        proId: "",
        proSex: "2",
        pageNum: 1,
        pageSize: 10,
      },
@@ -203,15 +209,24 @@
        if (newVal && newVal.length > 0) {
          const firstProject = newVal[0]; // 你也可以遍历所有项目,看你业务需求
          this.queryParams.proId = firstProject.proId; // 假设项目中叫 id
          this.queryParams.proName = firstProject.proName; // 假设叫 proName
          this.proName = firstProject.proName
          this.proName = firstProject.proName;
        }
      },
    },
    proSex: {
      handler(newVal) {
        this.queryParams.proSex = newVal;
        this.getList();
      },
      immediate: true
    }
  },
  mounted() {},
  created() {},
  created() {
    this.queryParams.proSex = this.proSex;
    this.getList();
  },
  methods: {
    async getList() {
      try {
@@ -264,13 +279,12 @@
    },
    handleSelectionChange(selection) {
      this.list = selection;
      // this.list = selection;
      this.list = [...selection];
      this.updateFormContent(selection);
    },
    updateFormContent(selection) {
      if (!selection.length) return;
      // 如果处于检查状态,使用传入的值
      if (this.checkStatus === "1") {
        this.updateData(this.proResult, this.conclusion);
@@ -282,15 +296,17 @@
      this.form.jcsj = "";
      // 使用map和join替代forEach和字符串拼接
      this.form.desc = selection
        .map((item) => item.bingzhong || item.ruleStr)
        .filter(Boolean)
        .join(",");
      if (selection.length > 0) {
        this.form.desc = selection
          .map((item) => item.bingzhong || item.ruleStr)
          .filter(Boolean)
          .join(",");
      this.form.jcsj = selection
        .map((item) => item.yxbx)
        .filter(Boolean)
        .join(",");
        this.form.jcsj = selection
          .map((item) => item.yxbx)
          .filter(Boolean)
          .join(",");
      }
    },
    handleOk() {