在代码添加功能,要求点击退回时显示是否确认行,模板参考(是否收取伦理审查费)<template>
<div class="check_inspect">
<!-- bolPiReview用于判断是否是PI审查(分配委员后的新流程) -->
<div
v-if="isToDealWith || bolPiReview"
v-loading="submitClickLoading || ethicsHistoryLoading"
class="inspect_check_row"
>
<el-form ref="submitFormRef" :model="submitParams" :rules="rules">
<el-row class="inspect_check_row_col" type="flex">
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
><span style="color: red;">*</span>处理结果
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="processingResults">
<el-radio-group
v-model="submitParams.processingResults"
@change="processingChange"
>
<el-radio :label="1">通过</el-radio>
<el-radio :label="0">退回</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row class="inspect_check_row_col" type="flex">
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>处理意见
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="content" style="width: 100%">
<el-input
v-model="submitParams.content"
type="textarea"
autosize
class="check_row_input_textarea"
placeholder="请输入意见内容"
/>
</el-form-item>
</el-col>
</el-row>
<!-- 当前审查流程进度为PI审查且上此审查流程进度为快审/备案的总结退回和转为会审的退回不显示是否需要重审 -->
<el-row
v-if="isProjectPi && submitParams.processingResults === 1 && (ethicProcess === flowConfig.IRBS_PI_REVIEW && ![flowConfig.IRBS_SUBMIT1, flowConfig.IRBS_SUBMIT2].includes(lastProcess) || ethicProcess !== flowConfig.IRBS_PI_REVIEW)"
class="inspect_check_row_col"
type="flex"
>
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>
<span style="color: red;margin-left: 10px">*</span>是否需要重审
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="skipNext">
<el-radio-group v-model="submitParams.skipNext">
<el-radio :label="false">需要</el-radio>
<el-radio :label="true">不需要</el-radio>
</el-radio-group>
<div style="color: #de345e">
请确认若机构、伦理、项目其他PI(如有)审查退回,申请人修改后重新提交,您是否需要重新审查
</div>
</el-form-item>
</el-col>
</el-row>
<template
v-if="
submitParams.processingResults === 1 &&
ethicProcess === flowConfig.IRBS_MODEL
"
>
<el-row class="inspect_check_row_col" type="flex">
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>审查方式
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="review">
<el-radio-group
v-model="submitParams.review"
@change="selectModel"
>
<el-radio
v-for="review in reviewList"
:key="review.dictValue"
:label="review.dictValue"
>
{{ review.dictLabel }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<template v-if="submitParams.review !== ''">
<!-- 备案审查 -->
<template
v-if="submitParams.review === '0'"
class="inspect_check_row_col"
type="flex"
>
<el-row class="inspect_check_row_col" type="flex">
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>是否需要委员审查
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="skip">
<el-radio-group v-model="submitParams.skip">
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row
v-if="submitParams.skip === 1"
class="inspect_check_row_col"
type="flex"
>
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>选择委员
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="committeeList">
<el-checkbox-group
v-model="submitParams.committeeList"
:max="1"
>
<el-checkbox
v-for="committee in committeeList"
:key="committee.userId"
:label="JSON.stringify(committee)"
:disabled="userIsCpPI(committee.userId) || bolAvoided(committee.userId)"
>
{{ committee.nickName }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</template>
<template v-else>
<!-- 审查方式不是备案审查,则需选择是否收取审查费 -->
<el-row
class="inspect_check_row_col"
type="flex"
>
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>是否收取伦理审查费
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="bolCharge" style="width: 100%">
<el-radio-group v-model="submitParams.bolCharge">
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<!-- 快速审查 -->
<el-row
v-if="submitParams.review === '1'"
class="inspect_check_row_col"
type="flex"
>
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>选择委员
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="committeeList">
<el-checkbox-group v-model="submitParams.committeeList">
<el-checkbox
v-for="committee in committeeList"
:key="committee.userId"
:label="JSON.stringify(committee)"
:disabled="userIsCpPI(committee.userId) || bolAvoided(committee.userId)"
>
{{ committee.nickName }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<!-- 会议审查 -->
<template v-else>
<el-row class="inspect_check_row_col" type="flex">
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>是否主审
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="preside">
<el-radio-group v-model="submitParams.preside">
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row
v-if="submitParams.preside === 1"
class="inspect_check_row_col"
type="flex"
>
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>选择主审委员
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="presideList">
<el-checkbox-group v-model="submitParams.presideList">
<el-checkbox
v-for="committee in committeeList"
:key="committee.userId"
:label="JSON.stringify(committee)"
:disabled="userIsCpPI(committee.userId) || bolAvoided(committee.userId)"
>
{{ committee.nickName }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-row class="inspect_check_row_col" type="flex">
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>是否聘请独立顾问
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="consultancy">
<el-radio-group v-model="submitParams.consultancy">
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row
v-if="submitParams.consultancy === 1"
class="inspect_check_row_col"
type="flex"
>
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>选择独立顾问
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-form-item prop="consultancyList">
<el-checkbox-group v-model="submitParams.consultancyList">
<el-checkbox
v-for="committee in dlGwList"
:key="committee.userId"
:label="JSON.stringify(committee)"
>
{{ committee.nickName }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-row
class="inspect_check_row_col"
type="flex"
>
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>
汇报序号
</el-col>
<el-col
:span="18"
class="inspect_check_row_col_content"
>
<el-form-item prop="reportNumber" style="width: 100%">
<el-input
v-model="submitParams.reportNumber"
type="number"
class="check_row_input"
placeholder="请输入汇报序号"
/>
</el-form-item>
</el-col>
</el-row>
</template>
</template>
</template>
</template>
<div
v-if="![undefined, null, ''].includes(lastTimePresideInfo) && submitParams.processingResults === 1 &&
ethicProcess === flowConfig.IRBS_MODEL"
class="preside-info"
>
<span>最近一次审查分配的主审委员为:{{ lastTimePresideInfo }}</span>
</div>
</el-form>
</div>
<!-- 提交审查 -->
<div v-if="isToCommit || bolPiReview" style="text-align: center; margin-top: 20px;">
<el-button
v-if="
submitParams.processingResults === 1 &&
ethicProcess === flowConfig.IRBS_MODEL
"
:loading="submitClickLoading"
type="primary"
class="custom-submit-button"
style="width: 120px;"
@click="submitClick(0)"
>保存</el-button>
<el-button
:loading="submitClickLoading"
type="primary"
class="custom-submit-button"
style="width: 120px;"
@click="submitClick(1)"
>提交
</el-button>
</div>
<!-- 转为会审 -->
<el-dialog title="提示" :visible.sync="dialogVisible" width="60%">
<div class="inspect_check_row">
<template>
<el-row class="inspect_check_row_col" type="flex">
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>是否主审
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-radio-group v-model="submitParams.preside">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row
v-if="submitParams.preside"
class="inspect_check_row_col"
type="flex"
>
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>选择主审委员
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-checkbox-group v-model="submitParams.presideList">
<el-checkbox
v-for="committee in committeeList"
:key="committee.userId"
:label="committee"
:disabled="userIsCpPI(committee.userId)"
>
{{ committee.nickName }}
</el-checkbox>
</el-checkbox-group>
</el-col>
</el-row>
<el-row class="inspect_check_row_col" type="flex">
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>是否聘请独立顾问
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-radio-group v-model="submitParams.consultancy">
<el-radio :label="true">是</el-radio>
<el-radio :label="false">否</el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row
v-if="submitParams.consultancy"
class="inspect_check_row_col"
type="flex"
>
<el-col
:span="6"
class="inspect_check_row_col_title div-flex-container"
>选择独立顾问
</el-col>
<el-col :span="18" class="inspect_check_row_col_content">
<el-checkbox-group v-model="submitParams.consultancyList">
<el-checkbox
v-for="committee in dlGwList"
:key="committee.userId"
:label="committee"
>
{{ committee.nickName }}
</el-checkbox>
</el-checkbox-group>
</el-col>
</el-row>
</template>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="becomeConference">确 定</el-button>
</span>
</el-dialog>
<!-- 利益冲突声明模板 -->
<benefit-conflict-dialog ref="benefitConflictDialogRef" />
<!-- 签名进度 -->
<sign-progress ref="signProgressRef" :sign-count="signCount" :sign-number="signNumber" />
</div>
</template>
<script>
import defaultDictMixin from '@/views/project/details/mixin/defaultDictMixin';
import {
piReview,
msReview,
docReview,
toMeetingReview, bolConflictRecordAndSign, downloadBenefitConflictTemplatePdf,
newPiReview
} from '../../api';
import { awaitWrapV1, worn } from '@/utils/ghc-utils';
import { getCommitteeList } from '@/api/project';
import { sessionStoreUtils } from '@/utils/ghc-utils';
import _, { isEmpty } from 'lodash';
import { requestEthicsHistoryInfo } from '@/views/project/details/api';
import { getLastTimePreside } from '../../../../../api/review-base';
import { flowConfig } from '../../../../../constants';
import BenefitConflictDialog from './benefitConflictDialog';
import { approvalNeedSignFileList } from '@/api/signQys'
import { getSignProcessCode, getSignRoleKey } from '@/utils/signProcessCode'
import { deepClone } from '../../../../../utils';
import {
approvalSignFile,
followNeedSignFileList,
followNeedStampFileList,
followSignFile, followStampFile
} from '../../../../../api/signQys';
import SignProgress from '../../../../components/signProgress';
export default {
name: 'CtmsDetailCheckInspect',
components: {
BenefitConflictDialog,
SignProgress
},
mixins: [defaultDictMixin],
props: {
projectType: {
type: [String, Number],
default: 1
},
currentSchemeInfo: {
type: Object,
default: () => {}
},
projectInfoData: {
type: Object,
default: _ => {}
}
},
data() {
const checkContent = (r, v, cb) => {
const submitParams = this.submitParams;
if (submitParams.processingResults === 0) {
if (!v) {
return cb(new Error('处理意见不能为空!'));
}
}
cb();
};
const checkReview = (r, v, cb) => {
// const submitParams = this.submitParams
if (this.customCheck) {
if (!v) {
return cb(new Error('请选择审查方式!'));
}
cb();
}
};
const checkCommitteeList = (r, v, cb) => {
const submitParams = this.submitParams;
if (
this.customCheck &&
(submitParams.review === '1' || submitParams.review === '0')
) {
if (!v || v.length <= 0) {
return cb(new Error('请选择委员!'));
}
cb();
}
};
const checkPreside = (r, v, cb) => {
const submitParams = this.submitParams;
if (this.customCheck && submitParams.review === '2') {
if (v === null || v === undefined || v === '') {
return cb(new Error('请选择是否主审!'));
}
cb();
}
};
const checkPresideList = (r, v, cb) => {
const submitParams = this.submitParams;
if (
this.customCheck &&
submitParams.review === '2' &&
submitParams.preside === 1
) {
if (!v || v.length <= 0) {
return cb(new Error('请选择主审委员!'));
}
cb();
}
};
const checkConsultancy = (r, v, cb) => {
const submitParams = this.submitParams;
if (this.customCheck && submitParams.review === '2') {
if (v === null || v === undefined || v === '') {
return cb(new Error('请选择是否聘请独立顾问!'));
}
cb();
}
};
const checkConsultancyList = (r, v, cb) => {
const submitParams = this.submitParams;
if (
this.customCheck &&
submitParams.review === '2' &&
submitParams.consultancy === 1
) {
if (!v || v.length <= 0) {
return cb(new Error('请选择主审委员!'));
}
cb();
}
};
return {
checkTableKey: '',
submitClickLoading: false,
skipNext: undefined,
submitParams: {
processingResults: '',
content: '',
review: '',
preside: '',
skip: '',
consultancy: '',
committeeList: [],
presideList: [],
consultancyList: [],
skipNext: undefined,
// 是否收费
bolCharge: undefined,
// 汇报序号
reportNumber: undefined
},
rules: {
processingResults: [
{ required: true, message: '请选择处理结果', trigger: 'change' }
],
content: [
{
trigger: 'blur',
validator: checkContent
}
],
review: [{ trigger: 'change', validator: checkReview }],
skipNext: [
{
required: true,
trigger: 'change',
message: '请选择是否需要重审'
}
],
bolCharge: [
{ required: true, message: '请选择是否收取伦理审查费', trigger: 'change' }
],
skip: [
{ required: true, message: '请选择是否需要委员审查', trigger: 'change' }
],
preside: [
{ required: true, validator: checkPreside }
],
presideList: [
{ required: true, validator: checkPresideList }
],
consultancy: [
{ required: true, validator: checkConsultancy }
],
consultancyList: [
{ required: true, validator: checkConsultancyList }
],
committeeList: [
{ required: true, validator: checkCommitteeList }
]
},
committeeReviewList: {
list: [],
agree: 0,
updateAgree: 0,
updateReview: 0,
stop: 0,
disagree: 0,
avoid: 0
},
project: JSON.parse(sessionStorage.getItem('projectInfoData')),
dialogVisible: false,
ethicsHistoryLoading: false,
lastTimePresideList: [], // 上次审查的主审列表
// 待签名文件数组
needSignFileList: [],
// 待签名文件copy数组,用于文件签名进度显示
// needSignFileListCopy: [],
// 已签名个数
signNumber: 0,
// 待盖章文件数组
needStampFileList: [],
// 已盖章个数
stampNumber: 0
};
},
computed: {
customCheck() {
return (
this.submitParams.processingResults === 1 &&
this.isIrbsReviewFile &&
!this.isProjectPi
);
},
getPehId() {
return this.$route.query.pehId;
},
isToDealWith() {
return this.isToCommit;
},
// 用户是否为当前项目的PI
userIsCpPI() {
return userId => {
const { researcherUserId } = this.projectInfoData;
if (!researcherUserId) return false;
try {
return researcherUserId.split(',').includes(userId.toString());
} catch (e) {
worn(e);
return false;
}
};
},
// 可获取:当前用户是否为 PI 并且是否审查完成
isProjectPi() {
const { reviewPiList } = this.currentSchemeInfo;
if (!reviewPiList) return false;
try {
return reviewPiList.split(',').includes(this.userId.toString());
} catch (e) {
worn(e);
return false;
}
},
// 可获取:当前用户是否为秘书,并且是否审查完成
isIrbsReviewFile() {
const arrayList = [this.flowConfig.IRBS_FILE, this.flowConfig.IRBS_MODEL];
return (
arrayList.includes(this.ethicProcess) && this.roleKey === 'secretary'
);
},
// 可获取:当前用户是否审查完成
isToCommit() {
if (this.isIrbsReviewFile) {
return true;
} else {
if (this.isProjectPi) {
return this.currentSchemeInfo.piAgree === -1;
} else {
if (this.checkPermission('doc:review')) {
return this.currentSchemeInfo.msAgree === -1;
}
return false;
}
}
},
// 上次审查的主审委员信息
lastTimePresideInfo() {
const _ = this.$lodash
let info = ''
if (!_.isEmpty(this.lastTimePresideList)) {
const presideNameList = this.lastTimePresideList.map(item => item.nickName)
info = presideNameList.toString()
}
return info
},
// 待签名总数
signCount() {
if (this.needSignFileList && this.needSignFileList instanceof Array && this.needSignFileList.length > 0) {
return this.needSignFileList.length
}
return 0
},
// 已签名个数
/* signNumber() {
if(this.needSignFileListCopy && this.needSignFileListCopy instanceof Array && this.needSignFileListCopy.length > 0) {
return this.needSignFileListCopy.length
}
return 0
}*/
// 当前流程进度为PI审查(分配委员后的新流程),是否
bolPiReview() {
return this.ethicProcess === this.flowConfig.IRBS_PI_REVIEW
},
// 当前委员是否回避过
bolAvoided() {
return userId => {
return this.avoidCommitteeVoteList.some(item => item.committeeId === userId)
}
}
},
created() {
this.getSaveHistoryInfo();
this.project = this.projectInfoData
this.requestCommitteeReviewList();
this.getLastTimePresideList()
},
methods: {
submitClick(status) {
if (status === 0) { // 直接保存
this.handleSubmit(status)
} else {
console.log("1111")
this.$refs.submitFormRef.validate(valid => {
console.log("222")
if (valid) {
console.log("进入内部方法")
// this.handleSubmit(status)
return false
}
this.notifyWarning('请检查必填项是否填写完成!');
});
}
},
// 统一处理提交方法
handleSubmit(status) {
this.submitClickLoading = true;
const [msg] = this.isRecordConfirm(this.submitParams, status);
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async() => {
if ([this.flowConfig.IRBS_FILE, this.flowConfig.IRBS_PI_REVIEW].includes(this.ethicProcess)) {
// 如果是PI审查
if (this.isProjectPi) {
const query = {
projectId: this.projectInfoData.id,
userId: this.userId
}
// 通过进行签名操作
// if(this.submitParams.processingResults === 1) {
// 初始审查
if (this.$route.query.reviewCategory === '1' && [undefined, null, ''].includes(this.$route.query.reviewType)) {
// PI审查时判断当前PI是否已确认利益冲突说明文件(在benefit_conflict_record表有记录),且对应的文件该PI已签名(在签名文件表中有记录)
const res = await bolConflictRecordAndSign(query)
// 如果需要当前用户对利益冲突声明模板进行确认,则弹窗
if (res.code === 200) {
if (res.data) {
const benefitData = res.data
// 是否有系统自动生成的模板
if (benefitData.bolAutoGenerateTemplate) {
// 如果没有记录,没签名,则弹窗利益冲突弹框
if (!benefitData.bolConflictRecord || !benefitData.bolTemplateSign) {
this.submitClickLoading = false
this.handleConflict(status)
return;
}
}
}
}
// 如果通过,则进行签名处理
if (this.submitParams.processingResults === 1) {
// const flag = true
const flagObj = {
flag: true
}
// PI立项签名的相关操作
await this.getNeedSignFileList('PI', flagObj)
if (!flagObj.flag) {
this.$message.error('签名失败,请重新操作')
return;
}
}
} else if (![undefined, null, ''].includes(this.$route.query.reviewType)) {
// 如果通过,则进行签名处理
if (this.submitParams.processingResults === 1) {
let processCode = ''
switch (this.$route.query.reviewType) {
case '6':
case '11':
processCode = 'followReviewFile'
break;
default:
break;
}
const flagObj = {
flag: true
}
// 跟踪审查
await this.getFollowFile('PI', processCode, flagObj)
if (!flagObj.flag) {
this.$message.error('签名失败,请重新操作')
return;
}
/* const stampFlag = true
// PI进行跟踪审查时,处理机构进行盖章的文件
await this.handleStampFollowFile(processCode, stampFlag)
if(!stampFlag) {
this.$message.error("盖章失败,请重新操作")
}*/
}
}
// }
// 项目流程的后续进度
await this.sendSubmitRequest(status);
this.submitClickLoading = false
} else { // 秘书资料审查
// 通过进行签名操作
if (this.submitParams.processingResults === 1) {
// 初始审查
if (this.$route.query.reviewCategory === '1' && [undefined, null, ''].includes(this.$route.query.reviewType)) {
const flagObj = {
flag: true
}
// 秘书立项签名的相关操作
await this.getNeedSignFileList('MS', flagObj)
if (!flagObj.flag) {
this.$message.error('签名失败,请重新操作')
return;
}
} else if (![undefined, null, ''].includes(this.$route.query.reviewType)) {
let processCode = ''
switch (this.$route.query.reviewType) {
case '6':
case '11':
processCode = 'followReviewFile'
break;
default:
break;
}
const flagObj = {
flag: true
}
// 跟踪审查
await this.getFollowFile('MS', processCode, flagObj)
if (!flagObj.flag) {
this.$message.error('签名失败,请重新操作')
return;
}
}
}
// 项目流程的后续进度
await this.sendSubmitRequest(status);
this.submitClickLoading = false
}
} else {
await this.sendSubmitRequest(status);
this.submitClickLoading = false
}
})
.catch(_ => {
this.submitClickLoading = false;
});
return false;
},
isRecordConfirm(form, status) {
if (form.review === '0' && form.skip === 0) {
return ['确定同意备案吗? 同意后直接进入备案回执页面。', true];
} else if (form.review === '1' && status === 1 && form.committeeList.length === 1) { // 如果选择的审查访视为快审,审查结果为通过,且只选择一个委员
return ['您选择的审查方式为【快速审查】,且只选了一位委员,请确认是否提交?', true];
} else {
if (status === 0) {
return ['确认保存审查?', false];
} else {
return ['此操作不可逆, 请确认是否提交审查?', false];
}
}
},
async sendSubmitRequest(status) {
// this.submitClickLoading = true;
// 委员审查选项解析
if (this.submitParams.committeeList.length > 0) {
for (let i = 0; i < this.submitParams.committeeList.length; i++) {
this.submitParams.committeeList[i] = JSON.parse(
this.submitParams.committeeList[i]
);
}
}
// 主审委员解析
if (this.submitParams.presideList.length > 0) {
for (let i = 0; i < this.submitParams.presideList.length; i++) {
this.submitParams.presideList[i] = JSON.parse(
this.submitParams.presideList[i]
);
}
}
// 独立顾问解析
if (this.submitParams.consultancyList.length > 0) {
for (let i = 0; i < this.submitParams.consultancyList.length; i++) {
this.submitParams.consultancyList[i] = JSON.parse(
this.submitParams.consultancyList[i]
);
}
}
const { data, err } = await this.sentToRequest({
projectId: this.projectInfoData.id,
...this.submitParams,
status
});
if (err) {
this.submitClickLoading = false;
return false;
}
if (data.code === 200) {
this.msgSuccess('操作成功!');
// this.$emit('project-child-cpn-update')
}
await this.$store.dispatch('tagsView/delView', this.$route);
// 如果备案需要直接到待总结
const [msg, isRecord] = this.isRecordConfirm(this.submitParams);
if (isRecord) {
this.openBlankPath({
// path: '/record-review-receipt',
path: '/conclusion_certificate_records',
query: {
...this.$route.query,
projectType: this.projectType,
maxData: '0',
checkType: 0
}
});
}
if (this.$route.query.projectListTab) {
this.$router.replace({
path: '/project/list',
query: {
projectListTab: this.$route.query.projectListTab
}
});
} else {
this.$router.go(-1);
}
this.submitClickLoading = false;
},
processingChange(e) {
if (e === 1) {
// 如果处理结果是选择通过
if (this.currentSchemeInfo.reviewCategory === 4) {
this.submitParams.review = '0';
} else if (this.currentSchemeInfo.reviewCategory === 1) {
// 初始审查
/**
* 【初始审查】类别,3方同审的项目,分配委员时,默认设置为【会议审查】,但秘书可手动修改;
* 【初始审查】类别,2方同审的项目,分配委员时,默认设置为【快速审查】,但秘书可手动修改;
* */
// orgReivew 为0的时候, 说明是两方同审, 为1的时候, piApproval 为没有值 也是两方同审
if (
this.project.orgReview === 0 ||
(this.project.orgReview === 1 &&
[undefined, null, ''].includes(this.project.piApproval))
) {
if (this.projectType === 4) { // 科研的项目才选择快审
this.submitParams.review = '1';
}
} else {
this.submitParams.review = '2';
}
}
} else {
const content = this.submitParams.content
this.submitParams = {
processingResults: 0,
content: content,
review: '',
preside: '',
skip: '',
consultancy: '',
committeeList: [],
presideList: [],
consultancyList: [],
skipNext: undefined,
// 是否收费
bolCharge: undefined
}
this.skipNext = undefined
}
/* if (e === 1 && this.currentSchemeInfo.reviewCategory === 4) {
this.submitParams.review = '0'
}*/
},
async sentToRequest(params) {
let data;
if (this.ethicProcess === this.flowConfig.IRBS_FILE) {
const submitParams = {
skipNext: this.submitParams.skipNext || false,
projectOption: params,
pehId: this.getPehId
};
if (this.isProjectPi) {
if (submitParams.projectOption.processingResults.toString() === '0') {
submitParams.skipNext = false;
}
submitParams.projectOption.opinionType = 'PI审查';
data = await awaitWrapV1(piReview(submitParams));
} else {
submitParams.projectOption.opinionType = '伦理资料审查';
data = await awaitWrapV1(docReview(submitParams));
}
} else if (this.ethicProcess === this.flowConfig.IRBS_PI_REVIEW) { // 当前审查进度为PI审查(分配委员后的新流程)
const submitParams = {
skipNext: this.submitParams.skipNext || false,
projectOption: params,
pehId: this.getPehId
};
if (this.isProjectPi) {
if (submitParams.projectOption.processingResults.toString() === '0') {
submitParams.skipNext = false;
}
submitParams.projectOption.opinionType = 'PI审查';
data = await awaitWrapV1(newPiReview(submitParams));
} else {
// 当前操作人不是项目pi
this.$message.error('当前登录人不是此项目的pi,无法提交审查')
}
} else {
const submitParams = {};
for (const submitParamsKey in this.submitParams) {
if (this.submitParams[submitParamsKey] !== 'undefined') {
submitParams[submitParamsKey] = this.submitParams[submitParamsKey];
}
}
const { preside, skip } = this.submitParams;
submitParams.preside = preside === '' ? false : preside;
submitParams.skip = skip === '' ? true : skip;
submitParams.pehId = this.getPehId;
submitParams.saveRecordData = JSON.stringify(submitParams);
submitParams.saveSubmitStatus = params.status;
data = await awaitWrapV1(
msReview({
projectId: this.projectInfoData.id,
projectOption: {
opinionType: '分配委员',
projectId: this.projectInfoData.id,
content: submitParams.content,
processingResults: submitParams.processingResults
},
...submitParams
})
);
}
return data;
},
/** 请求委员表决数据记录 **/
requestCommitteeReviewList() {
this.submitClickLoading = true;
getCommitteeList({ pehId: this.$route.query.pehId, type: 2 })
.then(res => {
if (res.code === 200) {
this.committeeReviewList = res.data;
}
this.submitClickLoading = false;
})
.catch(e => {
console.log(e);
this.submitClickLoading = false;
});
},
// 项目总结批件(快审)
projectApprovalSummarize(row) {
this.$confirm('确认信息无误进入批件吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
const obj = JSON.parse(sessionStorage.getItem('projectInfoData'));
const { href } = this.$router.resolve({
path: row
? '/conclusion_certificate_rapid'
: '/conclusion_certificate_records',
query: {
projectId: obj.projectId,
projectType: obj.projectType
}
});
const winObj = window.open(href, '_blank');
const loop = setInterval(function() {
if (winObj.closed) {
clearInterval(loop);
}
}, 1000);
})
.catch(_ => {});
},
// 转为会审
becomeConference() {
this.submitParams.projectOption = {
projectId: this.projectId,
opinionType: '秘书审查',
processingResults: 1
};
this.submitParams.review = this.project.review;
toMeetingReview(this.submitParams)
.then(res => {
this.$message.success(res.msg);
})
.catch(err => {
worn(err);
});
},
// 选择审查方式
selectModel(val) {
this.submitParams.committeeList = [];
this.submitParams.presideList = [];
this.submitParams.consultancyList = [];
this.submitParams.reportNumber = undefined
// 如果选择的不是备案审查,则清除是否需要委员审查
if (val * 1 !== 0) {
this.submitParams.skip = '';
this.submitParams.skipNext = undefined;
}
// 如果是快审or备审,带出默认选中委员
/* if (val * 1 !== 2) {
this.submitClickLoading = true
getLastReviewCommittee().then(res => {
this.submitParams.committeeList = []
this.committeeList.map(item => {
if (res.data && res.data.length > 0) {
res.data.map(it => {
if (item.userId * 1 === it.userId * 1) {
this.submitParams.committeeList.push(item)
}
})
}
})
this.submitClickLoading = false
}).catch(err => {
console.log(err)
this.submitClickLoading = false
})
}*/
},
async getSaveHistoryInfo() {
this.ethicsHistoryLoading = true
// const ethicsHistoryInfo = sessionStoreUtils.getItem('ethicsHistoryInfo');
const pehId = this.$route.query.pehId
const { data } = await requestEthicsHistoryInfo(pehId)
// 默认设置机构是否要审数据
this.project.orgReview = data.orgReview
this.ethicsHistoryLoading = false
// 如果当前是分配委员,且上一步为退后后提交,则不显示之前的数据记录
if (!(data.ethicProcess === flowConfig.IRBS_MODEL && [flowConfig.IRBS_SUBMIT3, flowConfig.IRBS_PI_REVIEW].includes(data.lastProcess)) && data.ethicProcess !== flowConfig.IRBS_PI_REVIEW) {
const saveInfo = JSON.parse(data.saveRecordData);
if (!isEmpty(saveInfo)) {
this.submitParams = _.cloneDeep(saveInfo);
if (saveInfo.committeeList && saveInfo.committeeList.length > 0) {
this.submitParams.committeeList = [];
saveInfo.committeeList.map(item => {
this.submitParams.committeeList.push(JSON.stringify(item));
});
}
if (saveInfo.consultancyList && saveInfo.consultancyList.length > 0) {
this.submitParams.consultancyList = [];
saveInfo.consultancyList.map(item => {
this.submitParams.consultancyList.push(JSON.stringify(item));
});
}
if (saveInfo.presideList && saveInfo.presideList.length > 0) {
this.submitParams.presideList = [];
saveInfo.presideList.map(item => {
this.submitParams.presideList.push(JSON.stringify(item));
});
}
}
}
},
getLastTimePresideList() {
getLastTimePreside(this.$route.query.projectId).then(res => {
if (res.data) {
this.lastTimePresideList = res.data
}
})
},
// 利益冲突声明模板
handleConflict(status) {
this.$confirm('查询到您有利益冲突声明的模板未确认,请进行确认后提交审查', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const data = {
project: JSON.parse(sessionStorage.getItem('projectInfoData')),
status: status
}
this.$refs['benefitConflictDialogRef'].open(data)
})
},
// 利益冲突声明模板生成
handlePdf(status) {
const project = JSON.parse(sessionStorage.getItem('projectInfoData'))
const data = {
projectId: project.id,
userId: this.userId
}
this.submitClickLoading = true
downloadBenefitConflictTemplatePdf(data).then(async res => {
if (res.code === 200) {
this.$message.success('利益冲突声明文件已签名完成')
// 标识是否后续操作
// const flag = true
const flagObj = {
flag: true
}
// 通过进行签名操作
if (this.submitParams.processingResults === 1) {
// 初始审查
if (this.$route.query.reviewCategory === '1' && [undefined, null, ''].includes(this.$route.query.reviewType)) {
// 秘书立项签名的相关操作
await this.getNeedSignFileList('PI', flagObj)
} else if (![undefined, null, ''].includes(this.$route.query.reviewType)) {
let processCode = ''
switch (this.$route.query.reviewType) {
case '6':
case '11':
processCode = 'followReviewFile'
break;
default:
break;
}
// 跟踪审查
await this.getFollowFile('PI', processCode, flagObj)
}
}
if (!flagObj.flag) {
this.$message.error('签名失败,请重新操作')
return;
}
// 项目流程的后续进度
await this.sendSubmitRequest(status);
this.submitClickLoading = false
}
}).catch(err => {
this.submitClickLoading = false
console.log(err)
})
},
/**
* 获取需签名的文件数组,并进行签名
* */
async getNeedSignFileList(roleKey, flagObj) {
let processCode = '';
switch (roleKey) {
case 'QA':
processCode = 'projectApprovalQA'
break;
case 'PI':
processCode = 'projectApprovalPI'
break;
case 'MS':
processCode = 'projectApprovalMS'
break;
}
const query = {
processCode: getSignProcessCode(processCode),
signRoleKey: getSignRoleKey(roleKey),
projectId: this.projectId
}
flagObj.flag = false
// 查询立项需签名文件列表
await approvalNeedSignFileList(query).then(async res => {
if (res.code === 200) {
this.needSignFileList = res.data
// this.needSignFileListCopy = deepClone(this.needSignFileList)
// 如果有需签名的文件,则遍历循环进行签名接口的调用
if (this.needSignFileList && this.needSignFileList instanceof Array && this.needSignFileList.length > 0) {
this.signNumber = 0;
// 打开签名进度
this.$refs['signProgressRef'].open()
for (const needSignFile of this.needSignFileList) {
// 进行立项文件的签名
// const fileRes = await approvalSignFile(needSignFile)
// let fileRes
let bolSkip = false
await approvalSignFile(needSignFile).then(res => {
if (res.code === 200) {
const file = res.data
if (![undefined, null, ''].includes(file)) {
if (![undefined, null, ''].includes(file.newFileId)) {
// 去除已签名的文件
// this.needSignFileListCopy = this.needSignFileListCopy.filter(item => item.fileId !== file.oldFileId)
this.signNumber++;
}
}
}
}).catch(err => {
console.log(err)
bolSkip = true
this.$refs['signProgressRef'].handleClose()
this.submitClickLoading = false
})
if (bolSkip) {
break;
}
/* if(fileRes.code === 200) {
let file = fileRes.data
if(![undefined, null, ''].includes(file)) {
if(![undefined, null, ''].includes(file.newFileId)) {
// 去除已签名的文件
// this.needSignFileListCopy = this.needSignFileListCopy.filter(item => item.fileId !== file.oldFileId)
this.signNumber++;
}
}
}*/
}
if (this.signNumber === this.needSignFileList.length) {
flagObj.flag = true
}
} else {
flagObj.flag = true
}
}
})
},
/**
* 获取需签名的跟踪审查文件,并进行签名
* */
async getFollowFile(roleKey, processCode, flagObj) {
if (![undefined, null, ''].includes(processCode)) {
// let processCode = '';
switch (roleKey) {
case 'PI':
processCode += 'PI'
break;
case 'MS':
processCode += 'MS'
break;
}
const query = {
processCode: getSignProcessCode(processCode),
signRoleKey: getSignRoleKey(roleKey),
projectId: this.projectId,
pehId: this.getPehId
}
flagObj.flag = false
await followNeedSignFileList(query).then(async res => {
console.log(res)
if (res.code === 200) {
this.needSignFileList = res.data
// this.needSignFileListCopy = deepClone(this.needSignFileList)
// 如果有需签名的文件,则遍历循环进行签名接口的调用
if (this.needSignFileList && this.needSignFileList instanceof Array && this.needSignFileList.length > 0) {
this.signNumber = 0;
// 打开签名进度
this.$refs['signProgressRef'].open()
for (const needSignFile of this.needSignFileList) {
// 进行跟踪审查的文件签名
// const fileRes = await followSignFile(needSignFile)
let bolSkip = false
await followSignFile(needSignFile).then(res => {
if (res.code === 200) {
const file = res.data
if (![undefined, null, ''].includes(file)) {
if (![undefined, null, ''].includes(file.newFileId)) {
// 去除已签名的文件
// this.needSignFileListCopy = this.needSignFileListCopy.filter(item => item.fileId !== file.oldFileId)
this.signNumber++;
}
if (![undefined, null, ''].includes(file.fileMinioList)) {
// 更新跟踪审查的JSON文件
for (let i = 0; i < this.needSignFileList.length; i++) {
const oldFileMinioList = this.needSignFileList[i].fileMinioList
const oldFileMinioListIds = this.needSignFileList[i].fileMinioList.map(item => item.id)
if (oldFileMinioListIds.includes(file.oldFileId)) {
this.needSignFileList[i].fileMinioList = file.fileMinioList
}
/* if(count === i) {
this.needSignFileList[i].fileMinioList = file.fileMinioList
}*/
this.needSignFileList[i].projectEthicsDataDTOList = file.projectEthicsDataDTOList
this.needSignFileList[i].projectEthicsDataList = file.projectEthicsDataList
}
}
}
}
}).catch(err => {
console.log(err)
bolSkip = true
this.$refs['signProgressRef'].handleClose()
this.submitClickLoading = false
})
if (bolSkip) {
break;
}
}
if (this.signNumber === this.needSignFileList.length) {
flagObj.flag = true
}
} else {
flagObj.flag = true
}
}
})
}
},
/**
* 处理跟踪审查机构进行盖章的文件--PI触发
* */
async handleStampFollowFile(processCode, stampFlag) {
if (![undefined, null, ''].includes(processCode)) {
// 文件夹类型(和签名主配置表的projectType对应)
let folderType = 0;
switch (processCode) {
case 'followReviewFile': // 项目文件修订
{
switch (this.projectType) {
case 1: // 药物
folderType = 8 // 项目文件修订药物
break;
case 2: // 器械
folderType = 11 // 项目文件修订器械
break;
case 3: // 应用类医疗技术
break;
case 4: // 非注册类(科研)
folderType = 10
break;
case 5: // 干细胞
break;
case 7: // 特医食品
folderType = 12
break;
}
}
default:
break;
}
const query = {
processCode: getSignProcessCode(processCode),
projectId: this.projectId,
pehId: this.getPehId,
folderType: folderType
}
stampFlag = false
await followNeedStampFileList(query).then(async res => {
if (res.code === 200) {
this.needStampFileList = res.data
// 如果有盖章文件,则遍历循环进行盖章接口的调用
if (this.needStampFileList && this.needStampFileList instanceof Array && this.needStampFileList.length > 0) {
this.stampNumber = 0;
for (const needStampFile of this.needStampFileList) {
// 进行跟踪审查的文件的盖章
const fileRes = await followStampFile(needStampFile)
if (fileRes.code === 200) {
const file = fileRes.data
if (![undefined, null, ''].includes(file)) {
if (![undefined, null, ''].includes(file.newFileId)) {
this.signNumber++;
}
if (![undefined, null, ''].includes(file.fileMinioList)) {
// 更新跟踪审查的JSON文件
for (let i = 0; i < this.needStampFileList.length; i++) {
const oldFileMinioList = this.needStampFileList[i].fileMinioList
const oldFileMinioListIds = this.needStampFileList[i].fileMinioList.map(item => item.id)
if (oldFileMinioListIds.includes(file.oldFileId)) {
this.needStampFileList[i].fileMinioList = file.fileMinioList
}
this.needStampFileList[i].projectEthicsDataDTOList = file.projectEthicsDataDTOList
this.needStampFileList[i].projectEthicsDataList = file.projectEthicsDataList
}
}
}
}
}
if (this.signNumber === this.needSignFileList.length) {
stampFlag = true
}
} else {
stampFlag = true
}
}
})
}
}
}
};
</script>
<style lang="scss" scoped>
.check_inspect {
margin: 20px auto;
}
.form_header {
background-color: #dbecfe;
text-align: center;
height: 44px;
line-height: 44px;
font-weight: bold;
}
.check_row_input_textarea {
::v-deep textarea {
border: none;
/*min-width: 800px !important;*/
/*min-height: 150px !important;*/
}
}
.check_row_input {
::v-deep input {
border: none;
}
}
.form_footer {
margin-top: 30px;
margin-bottom: 30px;
text-align: center;
}
.inspect_check_row {
.el-form-item {
margin-bottom: 0 !important;
}
.inspect_check_row_col {
min-height: 50px;
border: 1px solid #f0f0f0;
}
.inspect_check_row_col_title {
font-size: 16px;
border-right: 1px solid #e2e2e2;
}
.inspect_check_row_col_content {
display: flex;
align-items: center;
padding: 5px;
}
.inspect_check_row_col_content {
::v-deep .el-radio__label {
font-size: 16px;
}
::v-deep .el-form-item__content {
font-size: 16px;
}
::v-deep .el-textarea__inner {
font-size: 16px;
}
}
}
.col_result {
border: none;
.pass_txt {
font-weight: bold;
color: #e65d6e;
}
.noPass_txt {
font-weight: bold;
color: #1ab394;
}
.el-col {
padding: 10px;
}
}
.preside-info {
text-align: center;
color: red;
}
</style>
最新发布