11
WXL
2023-11-05 24112d26079c0010f0baff217d9ddcd9dfb595b4
src/views/project/donatebaseinfo/index.vue
@@ -124,15 +124,15 @@
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
            v-hasPermi="['project:donatebaseinfo:edit']">修改</el-button>
            v-hasPermi="['project:donatebaseinfo:edit']">详情</el-button>
          <el-button v-if="scope.row.recordstate == 0" size="mini" type="text" icon="el-icon-delete"
          <!-- <el-button v-if="scope.row.recordstate == 0" size="mini" type="text" icon="el-icon-delete"
            @click="handleDelete(scope.row)" v-hasPermi="['project:donatebaseinfo:remove']">删除</el-button>
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handletermination(scope.row)"
            v-hasPermi="['project:donatebaseinfo:edit']">终止</el-button>
          <el-button size="mini" type="text" icon="el-icon-refrigerator" @click="handledownload(scope.row)">下载</el-button>
          <el-button v-if="scope.row.recordstate == 0 || scope.row.recordstate == 3" size="mini" type="text"
            icon="el-icon-thumb" @click="handleapproval(scope.row)">上报审核</el-button>
            icon="el-icon-thumb" @click="handleapproval(scope.row)">上报审核</el-button> -->
          <!-- 撤销申请 -->
        </template>
      </el-table-column>
@@ -1179,53 +1179,66 @@
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      //设置报告人和部门/组
      this.form.reporterno = this.currentuser.userName;
      this.form.reportername = this.currentuser.nickName;
      this.form.deptid = this.currentuser.deptid;
      this.showSaveBtn = true;
      //this.$refs.annex.getAnnexList();
      this.open = true;
      this.$nextTick(function () {
        this.$refs.annex.getAnnexList();
      this.$router.push({
        path: "/organ/donationdetails/",
        query: {
          organType: "add",
        }
      });
      // this.reset();
      // //设置报告人和部门/组
      // this.form.reporterno = this.currentuser.userName;
      // this.form.reportername = this.currentuser.nickName;
      // this.form.deptid = this.currentuser.deptid;
      this.title = "人体器官潜在捐献者登记表";
      // this.showSaveBtn = true;
      // //this.$refs.annex.getAnnexList();
      // this.open = true;
      // this.$nextTick(function () {
      //   this.$refs.annex.getAnnexList();
      // });
      // this.title = "人体器官潜在捐献者登记表";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.showSaveBtn = true;
      const id = row.id || this.ids;
      //this.$refs.annex.getAnnexList();
      getDonatebaseinfo(id).then((response) => {
        this.reset();
        this.$nextTick(function () {
          this.$refs.annex.getAnnexList();
        });
        this.form = response.data;
        response.data.sex = parseInt(response.data.sex);
        this.form.id = response.data.id;
        this.form.diseasetype = this.form.diseasetype.split(",");
        this.form.infectious = this.form.infectious.split(",");
        this.form.selfwill = this.form.selfwill.split(",");
        this.form.othercases = this.form.othercases.split(",");
        this.form.infosources = this.form.infosources.split(",");
        this.form.kinship = this.form.kinship.split(",");
        this.form.patientstate = this.form.patientstate.split(",");
        this.open = true;
        this.title = "人体器官潜在捐献者登记表";
        this.registerAddresss.sheng = response.data.registerprovincename;
        this.residenceAddresss.sheng = response.data.residenceprovincename;
        this.registerAddresss.shi = response.data.registercityname;
        this.residenceAddresss.shi = response.data.residencecityname;
        this.residenceAddresss.qu = response.data.residencetownname;
        this.registerAddresss.qu = response.data.registertownname;
      this.$router.push({
        path: "/organ/donationdetails/",
        query: {
          id: row.id,
          organType: "edit",
        }
      });
      // this.showSaveBtn = true;
      // const id = row.id || this.ids;
      // //this.$refs.annex.getAnnexList();
      // getDonatebaseinfo(id).then((response) => {
      //   this.reset();
      //   this.$nextTick(function () {
      //     this.$refs.annex.getAnnexList();
      //   });
      //   this.form = response.data;
      //   response.data.sex = parseInt(response.data.sex);
      //   this.form.id = response.data.id;
      //   this.form.diseasetype = this.form.diseasetype.split(",");
      //   this.form.infectious = this.form.infectious.split(",");
      //   this.form.selfwill = this.form.selfwill.split(",");
      //   this.form.othercases = this.form.othercases.split(",");
      //   this.form.infosources = this.form.infosources.split(",");
      //   this.form.kinship = this.form.kinship.split(",");
      //   this.form.patientstate = this.form.patientstate.split(",");
      //   this.open = true;
      //   this.title = "人体器官潜在捐献者登记表";
      //   this.registerAddresss.sheng = response.data.registerprovincename;
      //   this.residenceAddresss.sheng = response.data.residenceprovincename;
      //   this.registerAddresss.shi = response.data.registercityname;
      //   this.residenceAddresss.shi = response.data.residencecityname;
      //   this.residenceAddresss.qu = response.data.residencetownname;
      //   this.registerAddresss.qu = response.data.registertownname;
      // });
    },
// 终止案例
    handletermination(row) {