yxh
yxh
2023-08-28 df1103bf5ba31714f7828bb9b1cba585223abdf3
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>
@@ -685,14 +683,15 @@
    },
    /** 伦理审查弹窗 */
    showDonationEvaluationDialog(dontateInfo) {
      console.log("伦理审查11", dontateInfo);
      //查找是否存在伦理审查记录
      //this.curCase = dontateInfo;
      this.curCase = {
        id: dontateInfo.id,
        recordstate: null,
        donorno: dontateInfo.donorno,
        name: dontateInfo.name,
        recordstate: null,
      };
      this.reset();
      this.form.donorno = dontateInfo.donorno;
      this.form.infoid = dontateInfo.id;
@@ -733,51 +732,56 @@
    },
    /** 保存捐献评估 */
    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.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 +804,7 @@
        }
      });
    },
    /** 判断新增或是编辑 */
    checkEditOrAdd(dontateInfo) {
      if (dontateInfo.recordstate == 4) {
@@ -813,6 +818,7 @@
    handlePreview(file) {
      console.log(file);
    },
    //显示专家意见弹窗
    showExpertAdviceDialog() {
      this.resetExperAdviceForm();
@@ -820,6 +826,7 @@
      this.expertAdviceForm.donorno = this.curCase.donorno;
      this.isShowExpertAdviceDialog = true;
    },
    //保存专家意见
    saveExpertAdvice() {
      this.$refs["expertAdviceForm"].validate((valid) => {
@@ -869,6 +876,7 @@
        })
        .catch(() => { });
    },
    /** 修改按钮操作 */
    handleUpdateExpert(row) {
      this.reset();