11
WXL
2024-02-20 4fbeee3784d4be5483ed7ec9e00a875d66bc9ed0
src/views/project/ethicalReview/index.vue
@@ -61,36 +61,34 @@
    </el-form>
    <el-table :default-sort="{ prop: 'createTime' }" v-loading="loading" :data="listnews" border>
      <el-table-column label="报告时间" align="center" prop="reporttime" width="140">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.reporttime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column label="姓名" align="center" prop="name" width="120" />
      <el-table-column label="捐献者" align="center" prop="name" width="120" />
      <el-table-column label="年龄" align="center" prop="age" width="100" />
      <el-table-column label="性别" align="center" prop="sex" width="100">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_user_sex" :value="parseInt(scope.row.sex)" />
        </template>
      </el-table-column>
      <el-table-column label="年龄" align="center" prop="age" width="100" />
      <el-table-column label="医疗机构" align="center" prop="treatmenthospitalname" />
      <el-table-column label="审查结论" align="center" prop="flowconclusion" width="100">
      <el-table-column label="伦理审查结论" align="center" prop="flowconclusion" width="100">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_EthicalReview" :value="scope.row.flowconclusion" />
        </template>
      </el-table-column>
      <el-table-column label="审查意见" align="center" prop="flowcontent" />
      <el-table-column label="审查时间" align="center" prop="createTime" width="160" />
      <!-- <el-table-column label="身份证号" prop="idcardno" width="200" /> -->
      <el-table-column label="报告人" align="center" prop="reportername" width="100" />
      <el-table-column label="报告时间" align="center" prop="reporttime" width="140">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.reporttime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <!--
      <el-table-column label="捐献进度" align="center" prop="recordstate">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_DonationStatus" :value="scope.row.recordstate" />
        </template>
      </el-table-column>
      </el-table-column> -->
      <el-table-column label="操作" align="center" width="150px" class-name="small-padding fixed-width" fixed="right">
        <template slot-scope="scope">
@@ -113,7 +111,7 @@
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="姓名">
            <el-form-item label="捐献者姓名">
              <el-input v-model="curCase.name" placeholder="请输入姓名" disabled />
            </el-form-item>
          </el-col>
@@ -216,7 +214,7 @@
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button type="primary" :loading="loading" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
@@ -684,100 +682,114 @@
      this.handleQuery();
    },
    /** 伦理审查弹窗 */
    showDonationEvaluationDialog(dontateInfo) {
      console.log("伦理审查11", dontateInfo);
    showDonationEvaluationDialog(row) {
      this.$router.push({
        path: "/organ/donationdetails/",
        query: {
          id: row.id,
          organType: "edit",
        }
      });
      //查找是否存在伦理审查记录
      //this.curCase = dontateInfo;
      this.curCase = {
        id: dontateInfo.id,
        recordstate: null,
        donorno: dontateInfo.donorno,
      };
      this.reset();
      this.form.donorno = dontateInfo.donorno;
      this.form.infoid = dontateInfo.id;
      this.expertAdviceQueryParam.infoid = dontateInfo.id;
      this.expertAdviceQueryParam.donorno = dontateInfo.donorno;
      // this.listnews.ConclusionTime = this.expertAdviceForm.conclusiontime;
      // this.getExpertList();
      this.form.flowname = "伦理审查";
      if (dontateInfo.fcid) {
        let queryParam = {
          id: dontateInfo.fcid,
          flowname: "伦理审查",
        };
        // flowname: "伦理审查",
        listDonateflowchart(queryParam).then((response) => {
          let evaluationList = response.rows;
          console.log("伦理审查", response.rows);
          if (evaluationList.length == 1) {
            this.form = evaluationList[0];
            this.open = true;
            this.$nextTick(function () {
              this.$refs.ethicalannex.getAnnexList();
            });
            this.title = "修改伦理审查";
          } else if (evaluationList.length == 0) {
            this.$modal.msgError("未找到本案例的伦理审查记录,请联系管理员!");
          } else {
            this.$modal.msgError("数据重复");
          }
        });
      } else {
        this.title = "新增伦理审查";
        this.open = true;
        this.$nextTick(function () {
          this.$refs.ethicalannex.getAnnexList();
        });
      }
      // this.curCase = {
      //   id: dontateInfo.id,
      //   donorno: dontateInfo.donorno,
      //   name: dontateInfo.name,
      //   recordstate: null,
      // };
      // this.reset();
      // this.form.donorno = dontateInfo.donorno;
      // this.form.infoid = dontateInfo.id;
      // this.expertAdviceQueryParam.infoid = dontateInfo.id;
      // this.expertAdviceQueryParam.donorno = dontateInfo.donorno;
      // // this.listnews.ConclusionTime = this.expertAdviceForm.conclusiontime;
      // // this.getExpertList();
      // this.form.flowname = "伦理审查";
      // if (dontateInfo.fcid) {
      //   let queryParam = {
      //     id: dontateInfo.fcid,
      //     flowname: "伦理审查",
      //   };
      //   // flowname: "伦理审查",
      //   listDonateflowchart(queryParam).then((response) => {
      //     let evaluationList = response.rows;
      //     console.log("伦理审查", response.rows);
      //     if (evaluationList.length == 1) {
      //       this.form = evaluationList[0];
      //       this.open = true;
      //       this.$nextTick(function () {
      //         this.$refs.ethicalannex.getAnnexList();
      //       });
      //       this.title = "修改伦理审查";
      //     } else if (evaluationList.length == 0) {
      //       this.$modal.msgError("未找到本案例的伦理审查记录,请联系管理员!");
      //     } else {
      //       this.$modal.msgError("数据重复");
      //     }
      //   });
      // } else {
      //   this.title = "新增伦理审查";
      //   this.open = true;
      //   this.$nextTick(function () {
      //     this.$refs.ethicalannex.getAnnexList();
      //   });
      // }
    },
    /** 保存捐献评估 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          //判断审查意见录入
          if (this.form.flowconclusion == 2 || this.form.flowconclusion == 3) {
            var exp = this.form.flowcontent;
            if (typeof exp == "undefined" || exp == null || exp == "") {
              this.$modal.msgError("请输入审查意见!");
              return;
      this.loading = true;
      this.$nextTick(() => {
        this.$refs["form"].validate((valid) => {
          if (valid) {
            //判断审查意见录入
            if (this.form.flowconclusion == 2 || this.form.flowconclusion == 3) {
              var exp = this.form.flowcontent;
              if (typeof exp == "undefined" || exp == null || exp == "") {
                this.$modal.msgError("请输入审查意见!");
                return;
              }
            }
            //判断是否是新纪录
            if (this.form.id != null) {
              // updateEthicalreviewopinions没有权限
              updateDonateflowchart(this.form).then((response) => {
                this.$modal.msgSuccess("修改成功");
                //更新捐献状态
                if (this.form.flowconclusion == 1) {
                  this.curCase.recordstate = 8;
                } else {
                  this.curCase.recordstate = 9;
                }
                updateDonatebaseinfo(this.curCase).then((response) => {
                  this.open = false;
                  this.getList();
                });
              });
            } else {
              addDonateflowchart(this.form).then((response) => {
                //更新捐献状态
                if (this.form.flowconclusion == 1) {
                  this.curCase.recordstate = 8;
                } else {
                  this.curCase.recordstate = 9;
                }
                updateDonatebaseinfo(this.curCase).then((response) => {
                  this.$modal.msgSuccess("新增成功");
                  this.open = false;
                  this.getList();
                });
              });
            }
          }
          //判断是否是新纪录
          if (this.form.id != null) {
            // updateEthicalreviewopinions没有权限
            updateDonateflowchart(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              //更新捐献状态
              if (this.form.flowconclusion == 1) {
                this.curCase.recordstate = 8;
              } else {
                this.curCase.recordstate = 9;
              }
              updateDonatebaseinfo(this.curCase).then((response) => {
                this.open = false;
                this.getList();
              });
            });
          } else {
            addDonateflowchart(this.form).then((response) => {
              //更新捐献状态
              if (this.form.flowconclusion == 1) {
                this.curCase.recordstate = 8;
              } else {
                this.curCase.recordstate = 9;
              }
              updateDonatebaseinfo(this.curCase).then((response) => {
                this.$modal.msgSuccess("新增成功");
                this.open = false;
                this.getList();
              });
            });
          }
        }
      });
        });
      this.loading = false;
      })
    },
    /** 获取捐献评估 */
    getDonationEvaluation(dontateInfo) {
      //this.loading = true;
@@ -800,6 +812,7 @@
        }
      });
    },
    /** 判断新增或是编辑 */
    checkEditOrAdd(dontateInfo) {
      if (dontateInfo.recordstate == 4) {
@@ -813,6 +826,7 @@
    handlePreview(file) {
      console.log(file);
    },
    //显示专家意见弹窗
    showExpertAdviceDialog() {
      this.resetExperAdviceForm();
@@ -820,6 +834,7 @@
      this.expertAdviceForm.donorno = this.curCase.donorno;
      this.isShowExpertAdviceDialog = true;
    },
    //保存专家意见
    saveExpertAdvice() {
      this.$refs["expertAdviceForm"].validate((valid) => {
@@ -869,6 +884,7 @@
        })
        .catch(() => { });
    },
    /** 修改按钮操作 */
    handleUpdateExpert(row) {
      this.reset();