WXL
17 小时以前 8c6f8c4fcb8bf60efe9f0b9a98f87d8dfad9f25f
src/views/project/donationdetails/index.vue
@@ -432,7 +432,10 @@
          </el-row> -->
          <el-row>
            <el-col :span="6">
              <el-form-item label="所在医疗机构" prop="occupation">
              <el-form-item
                label="所在医疗机构"
                prop="currentMedicalInstitution"
              >
                <el-input
                  v-model="form.currentMedicalInstitution"
                  placeholder="请输入"
@@ -443,7 +446,7 @@
              <el-form-item
                label-width="130px"
                label="所在医疗机构科室"
                prop="education"
                prop="currentDept"
              >
                <el-input v-model="form.currentDept" placeholder="请输入" />
              </el-form-item>
@@ -451,7 +454,7 @@
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="首次医疗机构" prop="occupation">
              <el-form-item label="首次医疗机构" prop="firstMedicalInstitution">
                <el-input
                  v-model="form.firstMedicalInstitution"
                  placeholder="请输入"
@@ -462,7 +465,7 @@
              <el-form-item
                label-width="130px"
                label="首次医疗机构科室"
                prop="education"
                prop="firstDept"
              >
                <el-input v-model="form.firstDept" placeholder="请输入" />
              </el-form-item>
@@ -534,7 +537,7 @@
            </el-col>
          </el-row>
          <el-row>
            <el-form-item label="疾病类型" align="left">
            <el-form-item label="疾病类型" align="left" prop="diseasetype">
              <el-checkbox-group v-model="form.diseasetype">
                <el-checkbox
                  v-for="dict in dict.type.sys_DiseaseType || []"
@@ -554,7 +557,7 @@
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item align="left" label="传染病">
              <el-form-item align="left" label="传染病" prop="infectious">
                <el-checkbox-group v-model="form.infectious">
                  <el-checkbox
                    v-for="dict in dict.type.sys_Infectious || []"
@@ -577,7 +580,7 @@
          </el-row>
          <el-row>
            <el-col :span="9">
              <el-form-item align="left" label="病人状况">
              <el-form-item align="left" label="病人状况" prop="patientstate">
                <el-checkbox-group v-model="form.patientstate">
                  <el-checkbox
                    v-for="dict in dict.type.sys_patientstate || []"
@@ -590,7 +593,7 @@
              </el-form-item>
            </el-col>
            <el-col :span="15" align="left">
              <el-form-item label="其他情况">
              <el-form-item label="其他情况" prop="othercases">
                <el-checkbox-group v-model="form.othercases">
                  <el-checkbox
                    v-for="dict in dict.type.sys_OtherCases || []"
@@ -677,7 +680,7 @@
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item align="left" label="信息来源">
              <el-form-item align="left" label="信息来源" prop="infosources">
                <el-checkbox-group v-model="form.infosources">
                  <el-checkbox
                    v-for="dict in dict.type.sys_InfoSources || []"
@@ -1170,6 +1173,12 @@
                  >{{ item }}
                </el-checkbox>
              </el-checkbox-group>
              <el-input
                v-if="organdecision.includes('其他')"
                v-model="affirmform.organdecisionOther"
                placeholder="请输入其他捐献决定的具体内容"
                style="margin-top: 10px; width: 300px;"
              ></el-input>
            </el-form-item>
          </el-row>
          <el-row>
@@ -1869,6 +1878,9 @@
                  border
                  :key="tableKey"
                  :data="procureddata"
                  lazy
                  :load="loadRowData"
                  :row-key="row => row.organno"
                >
                  <el-table-column
                    label="器官名称"
@@ -2734,6 +2746,7 @@
        kinship: []
      },
      organdecision: [],
      organdecisionOther: "", // 其他选项的具体描述
      kinship: [],
      ethicform: {
        infoid: null
@@ -2741,7 +2754,8 @@
      kinshiplist: ["配偶", "父亲", "母亲", "子女", "受托人"],
      organselection: [
        "肝脏",
        "双肾脏",
        "左肾",
        "右肾",
        "心脏",
        "肺脏",
        "胰腺",
@@ -2845,6 +2859,21 @@
        name: [
          { required: true, message: "请输入捐献者姓名", trigger: "blur" }
        ],
        nationality: [
          { required: true, message: "请输入国籍", trigger: "blur" }
        ],
        currentMedicalInstitution: [
          { required: true, message: "请输入所在医疗机构", trigger: "blur" }
        ],
        currentDept: [
          { required: true, message: "所在医疗机构科室", trigger: "blur" }
        ],
        firstMedicalInstitution: [
          { required: true, message: "请输入首次医疗机构", trigger: "blur" }
        ],
        firstDept: [
          { required: true, message: "请输入首次医疗机构科室", trigger: "blur" }
        ],
        birthday: [
          { required: true, message: "请选择出生日期", trigger: "blur" }
        ],
@@ -2854,7 +2883,30 @@
        residenceaddress: [
          { required: true, message: "请输入住址", trigger: "blur" }
        ],
        registerAddresss: [
          { required: true, message: "请输入现居住地址", trigger: "blur" }
        ],
        diseasetype: [
          { required: true, message: "请选择疾病类型", trigger: "blur" }
        ],
        infectious: [
          { required: true, message: "请选择传染病类型", trigger: "blur" }
        ],
        patientstate: [
          { required: true, message: "请选择病人状况", trigger: "blur" }
        ],
        kinship: [
          { required: true, message: "请选择亲属情况", trigger: "blur" }
        ],
        majorrelatives: [
          { required: true, message: "请输入主要亲属", trigger: "blur" }
        ],
        familyrelations: [
          { required: true, message: "请选择亲属与捐献者关系", trigger: "blur" }
        ],
        infosources: [
          { required: true, message: "请选择信息来源", trigger: "blur" }
        ],
        idcardno: [
          { required: true, message: "请正确输入证件号码", trigger: "blur" }
        ],
@@ -3005,7 +3057,7 @@
        }
        this.customOrganSort();
      },
      deep: true // 深度监听,因为数组内容可能变化
      // deep: true // 深度监听,因为数组内容可能变化
    },
    allocateddata: {
      handler(newVal) {
@@ -3014,11 +3066,16 @@
        }
        this.allocateddataSort();
      },
      deep: true // 深度监听,因为数组内容可能变化
      // deep: true // 深度监听,因为数组内容可能变化
    }
  },
  methods: {
    loadRowData(row, treeNode, resolve) {
    // 只有当行展开或需要时才完整渲染内部组件
    this.$set(row, 'loaded', true)
    resolve()
  },
    // 获取主表及附属数据
    Getbasicinformation() {
      // 左侧流程数据
@@ -3106,7 +3163,7 @@
          if (response.code == 200 && response.rows[0]) {
            this.affirmform = response.rows[0];
            if (this.affirmform.organdecision) {
              this.organdecision = this.affirmform.organdecision.split(",");
              this.organdecision = this.affirmform.organdecision.split(",").flatMap(item => item === "双肾脏" ? ["左肾", "右肾"] : item);;
            }
            if (this.affirmform.kinship) {
              this.kinship = this.affirmform.kinship.split(",");
@@ -3285,6 +3342,8 @@
      this.$refs["form"].validate(valid => {
        console.log("提交的数据们:", this.form);
        if (valid) {
          console.log(112);
          this.form.birthday = this.$moment(this.form.birthday).format(
            "YYYY-MM-DD HH:mm:ss"
          );
@@ -3371,6 +3430,9 @@
              }
            });
          }
        }else{
                this.$modal.msgError("前部步骤表单信息有缺漏请排查后重新保存");
        }
      });
    },
@@ -3399,6 +3461,9 @@
      } else if (this.actives == 2) {
        this.affirmform.infoid = this.infoid;
        this.affirmform.organdecision = this.organdecision.join(",");
        if (!this.organdecision.includes("其他")) {
          this.affirmform.organdecisionOther = "";
        }
        this.affirmform.kinship = this.kinship.join(",");
        this.$refs["affirmform"].validate(valid => {
          if (valid) {
@@ -3614,6 +3679,7 @@
      // 1. 加锁,阻止监听器执行
      this.isSorting = true;
      this.loading = true;
      // 自定义排序函数
      this.procureddata.sort((a, b) => {
        const indexA = this.organOrder.indexOf(a.organname);
@@ -3640,9 +3706,10 @@
      this.procureddata = [...this.procureddata];
      this.$nextTick(() => {
        this.isSorting = false;
      this.loading = false;
      });
    },
     allocateddataSort() {
    allocateddataSort() {
      console.log("调用");
      // 1. 加锁,阻止监听器执行