From dc082351978a1e9f75d7a1471a0ca7ebeac552a5 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期一, 01 六月 2026 11:07:50 +0800
Subject: [PATCH] opo维护
---
src/views/business/ethicalReview/ethicalReviewInfo.vue | 3144 ++++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 2,158 insertions(+), 986 deletions(-)
diff --git a/src/views/business/ethicalReview/ethicalReviewInfo.vue b/src/views/business/ethicalReview/ethicalReviewInfo.vue
index b9a7f8f..8e56dfa 100644
--- a/src/views/business/ethicalReview/ethicalReviewInfo.vue
+++ b/src/views/business/ethicalReview/ethicalReviewInfo.vue
@@ -1,7 +1,9 @@
<template>
<div class="ethics-review-detail">
+ <case-basic-info :case-id="caseId" :show-attachment="true" />
+
<el-card class="detail-card">
- <!-- 鍩虹淇℃伅 -->
+ <!-- 浼︾悊瀹℃煡鍩烘湰淇℃伅 -->
<div slot="header" class="clearfix">
<span class="detail-title">浼︾悊瀹℃煡鍩烘湰淇℃伅</span>
<div style="float: right;">
@@ -10,9 +12,28 @@
</el-button>
<el-button
+ type="success"
+ @click="handleCompleteReview"
+ :disabled="form.status == '3' || form.status == '2'"
+ :loading="completeLoading"
+ >
+ 瀹℃煡瀹屾垚
+ </el-button>
+
+ <el-button
type="warning"
+ @click="handleSuspendReview"
+ :disabled="form.status == '2' || form.status == '3'"
+ :loading="suspendLoading"
+ >
+ 瀹℃煡涓
+ </el-button>
+
+ <el-button
+ type="danger"
@click="handleEndReview"
- :disabled="form.ethicsConclusion === 'terminated'"
+ :disabled="form.status == '2'"
+ :loading="endLoading"
>
缁撴潫瀹℃煡
</el-button>
@@ -22,167 +43,189 @@
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
<el-row :gutter="20">
<el-col :span="8">
- <el-form-item label="浣忛櫌鍙�" prop="hospitalNo">
- <el-input v-model="form.hospitalNo" readonly />
+ <el-form-item label="鍙戣捣涓婚" prop="initiateTheme">
+ <el-input
+ v-model="form.initiateTheme"
+ placeholder="璇疯緭鍏ュ彂璧蜂富棰�"
+ />
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="鎹愮尞鑰呭鍚�" prop="donorName">
- <el-input v-model="form.donorName" />
+ <el-form-item label="鍙戣捣浜�" prop="initiatePerson">
+ <el-input v-model="form.initiatePerson" />
</el-form-item>
</el-col>
- <el-col :span="8">
- <el-form-item label="鎬у埆" prop="gender">
- <el-select v-model="form.gender" style="width: 100%">
- <el-option label="鐢�" value="0" />
- <el-option label="濂�" value="1" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="骞撮緞" prop="age">
- <el-input v-model="form.age" />
- </el-form-item>
- </el-col>
- <el-col :span="16">
- <el-form-item label="鐤剧梾璇婃柇" prop="diagnosis">
- <el-input v-model="form.diagnosis" />
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="浼︾悊缁撹" prop="ethicsConclusion">
- <el-select v-model="form.ethicsConclusion" style="width: 100%">
- <el-option label="瀹℃煡涓�" value="reviewing" />
- <el-option label="鍚屾剰" value="approved" />
+ <!-- <el-col :span="8">
+ <el-form-item label="瀹℃煡鐘舵��" prop="status">
+ <el-select v-model="form.status" style="width: 100%">
<el-option
- label="淇敼鍚庡悓鎰�"
- value="approved_with_modifications"
+ v-for="dict in dict.type.sys_ethical"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
/>
- <el-option label="淇敼鍚庨噸瀹�" value="re-review" />
- <el-option label="涓嶅悓鎰�" value="disapproved" />
- <el-option label="缁堟瀹℃煡" value="terminated" />
+ </el-select>
+ </el-form-item>
+ </el-col> -->
+ </el-row>
+
+ <!-- 涓撳鐩稿叧淇℃伅 -->
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="浼︾悊瀹℃煡缁撹" prop="expertConclusion">
+ <el-select v-model="form.expertConclusion" style="width: 100%">
+ <el-option label="鍚屾剰" value="1" />
+ <el-option label="瀹℃煡涓�" value="2" />
+ <el-option label="涓嶅悓鎰�" value="0" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="瀹℃煡鏃堕棿" prop="reviewTime">
+ <el-form-item label="浼︾悊瀹℃煡缁撹鏃堕棿" prop="expertTime">
<el-date-picker
- v-model="form.reviewTime"
+ v-model="form.expertTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
/>
</el-form-item>
</el-col>
- <el-col :span="8">
- <el-form-item label="鐧昏浜�" prop="registrant">
- <el-input v-model="form.registrant" />
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="24">
+ <el-form-item label="瀹℃煡鎰忚" prop="expertOpinion">
+ <el-input
+ type="textarea"
+ :rows="2"
+ v-model="form.expertOpinion"
+ placeholder="璇疯緭鍏ユ剰瑙�"
+ />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
- <el-form-item label="浼︾悊鎰忚" prop="ethicsOpinion">
+ <el-form-item label="澶囨敞" prop="remark">
<el-input
type="textarea"
:rows="3"
- v-model="form.ethicsOpinion"
- placeholder="璇疯緭鍏ヤ鸡鐞嗗鏌ユ剰瑙�"
+ v-model="form.remark"
+ placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�"
/>
</el-form-item>
</el-col>
</el-row>
-
- <el-form-item label="鐧昏鏃堕棿" prop="registrationTime">
- <el-date-picker
- v-model="form.registrationTime"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- style="width: 100%"
- />
- </el-form-item>
</el-form>
</el-card>
+
<!-- 闄勪欢涓婁紶 -->
<el-card class="attachment-card">
<div slot="header" class="clearfix">
<span class="detail-title">鐩稿叧闄勪欢</span>
- <el-button type="primary" size="mini" @click="handleUploadAttachment">
- 涓婁紶闄勪欢
- </el-button>
</div>
- <el-table :data="attachments" style="width: 100%">
- <el-table-column label="鏂囦欢鍚嶇О" min-width="200">
- <template slot-scope="scope">
- <div class="file-info">
+ <!-- 浣跨敤 UploadAttachment 缁勪欢 -->
+ <UploadAttachment
+ ref="uploadAttachment"
+ :file-list="attachmentFileList"
+ :limit="10"
+ accept=".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx"
+ @change="handleAttachmentChange"
+ @upload-success="handleUploadSuccess"
+ @upload-error="handleUploadError"
+ @remove="handleAttachmentRemove"
+ />
+
+ <!-- 闄勪欢鍒楄〃 -->
+ <div
+ class="attachment-list"
+ v-if="form.annexfilesList && form.annexfilesList.length > 0"
+ >
+ <div class="list-title">
+ 宸蹭笂浼犻檮浠� ({{ form.annexfilesList.length }})
+ </div>
+ <el-table :data="form.annexfilesList" style="width: 100%" size="small">
+ <el-table-column label="鏂囦欢鍚�" min-width="200">
+ <template slot-scope="scope">
<i
class="el-icon-document"
style="margin-right: 8px; color: #409EFF;"
></i>
- <span>{{ scope.row.fileName }}</span>
- </div>
- </template>
- </el-table-column>
+ <span class="file-name">{{ scope.row.fileName }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏂囦欢绫诲瀷" width="100">
+ <template slot-scope="scope">
+ <el-tag size="small">{{
+ getFileType(scope.row.fileName)
+ }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鍒涘缓鏃堕棿" width="160">
+ <template slot-scope="scope">
+ <span>{{ formatDateTime(scope.row.createTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="266">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="primary"
+ @click="handlePreview(scope.row)"
+ >
+ 棰勮
+ </el-button>
+ <el-button
+ size="mini"
+ type="success"
+ @click="handleDownload(scope.row)"
+ >
+ 涓嬭浇
+ </el-button>
+ <el-button
+ size="mini"
+ type="danger"
+ @click="handleRemoveAttachment(scope.$index)"
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
- <el-table-column label="鏂囦欢绫诲瀷" width="100" align="center">
- <template slot-scope="scope">
- <el-tag size="small">{{ getFileType(scope.row.fileName) }}</el-tag>
- </template>
- </el-table-column>
-
- <el-table-column label="鏂囦欢澶у皬" width="100" align="center">
- <template slot-scope="scope">
- <span>{{ formatFileSize(scope.row.fileSize) }}</span>
- </template>
- </el-table-column>
-
- <el-table-column label="涓婁紶鏃堕棿" width="160" align="center">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.uploadTime) }}</span>
- </template>
- </el-table-column>
-
- <el-table-column label="涓婁紶浜�" width="100" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.uploader }}</span>
- </template>
- </el-table-column>
-
- <el-table-column label="鎿嶄綔" width="120" align="center">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-view"
- @click="handlePreviewAttachment(scope.row)"
- >棰勮</el-button
- >
- <el-button
- size="mini"
- type="text"
- icon="el-icon-download"
- @click="handleDownloadAttachment(scope.row)"
- >涓嬭浇</el-button
- >
- </template>
- </el-table-column>
- </el-table>
+ <!-- 绌虹姸鎬� -->
+ <div
+ v-if="!form.annexfilesList || form.annexfilesList.length == 0"
+ class="empty-attachment"
+ >
+ <i
+ class="el-icon-folder-opened"
+ style="font-size: 60px; color: #C0C4CC; margin-bottom: 20px;"
+ ></i>
+ <p style="color: #909399; font-size: 14px;">鏆傛棤闄勪欢锛岃涓婁紶鐩稿叧鏂囦欢</p>
+ </div>
</el-card>
+
<!-- 涓撳瀹℃煡鎯呭喌 -->
<el-card class="expert-card">
<div slot="header" class="clearfix">
- <span class="detail-title"
- >涓撳瀹℃煡鎯呭喌 (18浣嶄笓瀹� + 1浣嶄富濮斾笓瀹�)</span
- >
+ <span class="detail-title">涓撳瀹℃煡鎯呭喌</span>
<div style="float: right;">
+ <el-button
+ type="warning"
+ size="mini"
+ @click="handleRefresh"
+ icon="el-icon-refresh"
+ >
+ 鍒锋柊
+ </el-button>
+ <el-button size="mini" type="primary" @click="handleAddExpert">
+ 娣诲姞涓撳
+ </el-button>
<el-button
size="mini"
type="primary"
@@ -199,17 +242,10 @@
>
鍙戦�佷富濮斾笓瀹�
</el-button>
- <el-button
- size="mini"
- type="warning"
- @click="handleBatchSend"
- :disabled="!canBatchSend"
- >
- 鎵归噺鍙戦��
- </el-button>
</div>
</div>
- <!-- 涓撳缁熻淇℃伅 -->
+
+ <!-- 涓撳缁熻淇℃伅 -->
<div
class="expert-stats"
style="margin-top: 20px; padding: 15px; background: #f5f7fa; border-radius: 4px;"
@@ -217,20 +253,22 @@
<el-row :gutter="20">
<el-col :span="6">
<div class="stat-item">
- <span class="stat-label">涓撳宸插悓鎰�:</span>
- <span class="stat-value">{{ approvedNormalExperts }}/18</span>
+ <span class="stat-label">鏅�氫笓瀹�:</span>
+ <span class="stat-value">{{ normalExpertsCount }}浜�</span>
</div>
</el-col>
<el-col :span="6">
<div class="stat-item">
- <span class="stat-label">涓诲涓撳鐘舵��:</span>
- <span class="stat-value">{{ chiefExpertStatus }}</span>
+ <span class="stat-label">涓诲涓撳:</span>
+ <span class="stat-value">{{ chiefExpertsCount }}浜�</span>
</div>
</el-col>
<el-col :span="6">
<div class="stat-item">
- <span class="stat-label">鎬诲畬鎴愯繘搴�:</span>
- <span class="stat-value">{{ completionRate }}%</span>
+ <span class="stat-label">宸插悓鎰�:</span>
+ <span class="stat-value"
+ >{{ approvedExpertsCount }}/{{ totalExpertsCount }}</span
+ >
</div>
</el-col>
<el-col :span="6">
@@ -245,12 +283,13 @@
</el-col>
</el-row>
</div>
+
<!-- 涓撳瀹℃煡琛ㄦ牸 -->
<el-table
- :data="expertReviews"
+ :data="ethicalreviewopinionsList"
v-loading="expertLoading"
style="width: 100%"
- heiht="300"
+ height="600"
:row-class-name="getExpertRowClassName"
>
<el-table-column label="搴忓彿" width="60" align="center" type="index" />
@@ -262,9 +301,14 @@
fixed="left"
>
<template slot-scope="scope">
- <span>{{ scope.row.expertName }}</span>
+ <span
+ class="expert-name-link"
+ @click="handleViewExpertHistory(scope.row)"
+ >
+ {{ scope.row.expertname }}
+ </span>
<el-tag
- v-if="scope.row.isChief"
+ v-if="scope.row.expertType == '1'"
size="mini"
type="danger"
style="margin-left: 5px;"
@@ -273,18 +317,31 @@
</template>
</el-table-column>
+ <el-table-column label="涓撳缂栧彿" width="120" align="center">
+ <template slot-scope="scope">
+ <span>{{ scope.row.expertNo || "-" }}</span>
+ </template>
+ </el-table-column>
+
<el-table-column label="涓撳绫诲瀷" width="100" align="center">
<template slot-scope="scope">
- <span :class="scope.row.isChief ? 'chief-expert' : 'normal-expert'">
- {{ scope.row.isChief ? "涓诲涓撳" : "涓撳" }}
+ <span
+ :class="
+ scope.row.expertType == '1' ? 'chief-expert' : 'normal-expert'
+ "
+ >
+ {{ getExpertTypeText(scope.row.expertType) }}
</span>
</template>
</el-table-column>
<el-table-column label="瀹℃煡鐘舵��" width="100" align="center">
<template slot-scope="scope">
- <el-tag :type="statusFilter(scope.row.reviewStatus)" size="small">
- {{ statusTextFilter(scope.row.reviewStatus) }}
+ <el-tag
+ :type="getReviewStatusFilter(scope.row.receiveStatus)"
+ size="small"
+ >
+ {{ getReviewStatusText(scope.row.receiveStatus) }}
</el-tag>
</template>
</el-table-column>
@@ -292,35 +349,73 @@
<el-table-column label="涓撳缁撹" width="120" align="center">
<template slot-scope="scope">
<el-tag
- v-if="scope.row.expertConclusion"
- :type="conclusionFilter(scope.row.expertConclusion)"
+ v-if="scope.row.expertconclusion"
+ :type="getConclusionFilter(scope.row.expertconclusion)"
size="small"
>
- {{ conclusionTextFilter(scope.row.expertConclusion) }}
+ {{ getConclusionText(scope.row.expertconclusion) }}
</el-tag>
<span v-else class="no-data">-</span>
</template>
</el-table-column>
-
+ <!-- 鍦�"瀹℃煡鏃堕棿"鍒楀悗闈㈡坊鍔�"鎵嬬闄勪欢"鍒� -->
+ <el-table-column label="鎵嬬闄勪欢" width="120" align="center">
+ <template slot-scope="scope">
+ <template v-if="scope.row.sigin">
+ <!-- 鏈夌鍚嶏紝鏄剧ず鍙偣鍑婚瑙堢殑鍥剧墖 -->
+ <el-button
+ type="text"
+ size="mini"
+ @click="handlePreviewSignature(scope.row.sigin)"
+ class="signature-preview-btn"
+ >
+ <i class="el-icon-picture" style="margin-right: 4px;"></i>
+ 鏌ョ湅绛惧悕
+ </el-button>
+ </template>
+ <template v-else>
+ <!-- 鏃犵鍚嶏紝鏄剧ず鏂滄潬 -->
+ <span class="no-signature">/</span>
+ </template>
+ </template>
+ </el-table-column>
<el-table-column label="瀹℃煡鎰忚" min-width="200" show-overflow-tooltip>
<template slot-scope="scope">
- <span :class="{ 'expert-opinion': scope.row.expertOpinion }">
- {{ scope.row.expertOpinion || "鏆傛棤鎰忚" }}
+ <span :class="{ 'expert-opinion': scope.row.expertopinion }">
+ {{ scope.row.expertopinion || "鏆傛棤鎰忚" }}
</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column label="缁撹椤哄簭" width="100" align="center">
+ <template slot-scope="scope">
+ <span>{{ scope.row.conclusionorder || "-" }}</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column label="鎴鏃堕棿" width="160" align="center">
+ <template slot-scope="scope">
+ <span>{{
+ scope.row.endTime ? formatDateTime(scope.row.endTime) : "鏈缃�"
+ }}</span>
</template>
</el-table-column>
<el-table-column label="瀹℃煡鏃堕棿" width="160" align="center">
<template slot-scope="scope">
<span>{{
- scope.row.reviewTime ? parseTime(scope.row.reviewTime) : "鏈鏌�"
+ scope.row.conclusiontime
+ ? formatDateTime(scope.row.conclusiontime)
+ : "鏈鏌�"
}}</span>
</template>
</el-table-column>
<el-table-column label="鍙戦�佹椂闂�" width="160" align="center">
<template slot-scope="scope">
<span>{{
- scope.row.reviewTime ? parseTime(scope.row.reviewTime) : "鏈彂閫�"
+ scope.row.startTime
+ ? formatDateTime(scope.row.startTime)
+ : "鏈彂閫�"
}}</span>
</template>
</el-table-column>
@@ -332,68 +427,217 @@
type="text"
icon="el-icon-s-promotion"
@click="handleSendToExpert(scope.row)"
- :disabled="scope.row.reviewStatus === 'submitted'"
- :class="{ 'sent-button': scope.row.reviewStatus === 'submitted' }"
+ :disabled="
+ scope.row.receiveStatus == '2' ||
+ scope.row.receiveStatus == '3' ||
+ scope.row.receiveStatus == '4'
+ "
+ :class="{
+ 'sent-button':
+ scope.row.receiveStatus == '2' ||
+ scope.row.receiveStatus == '3'
+ }"
>
- {{ scope.row.reviewStatus === "submitted" ? "宸插彂閫�" : "鍙戦��" }}
+ {{
+ scope.row.receiveStatus == "2" || scope.row.receiveStatus == "3"
+ ? "宸插彂閫�"
+ : "鍙戦��"
+ }}
</el-button>
<el-button
+ v-if="scope.row.receiveStatus == 0"
size="mini"
type="text"
- icon="el-icon-edit"
- @click="handleEditExpertReview(scope.row)"
- :disabled="scope.row.reviewStatus !== 'submitted'"
+ icon="el-icon-delete"
+ @click="handleDeleteExpertReview(scope.row, scope.$index)"
+ style="color: #f56c6c;"
>
- 缂栬緫
- </el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-view"
- @click="handleViewExpertReview(scope.row)"
- >
- 璇︽儏
+ 鍒犻櫎
</el-button>
</template>
</el-table-column>
</el-table>
-
-
</el-card>
+
+ <!-- 娣诲姞涓撳瀵硅瘽妗� -->
+ <el-dialog
+ title="娣诲姞涓撳"
+ :visible.sync="expertDialogVisible"
+ width="900px"
+ @close="handleExpertDialogClose"
+ >
+ <div style="margin-bottom: 20px;">
+ <el-input
+ v-model="expertSearchQuery"
+ placeholder="璇疯緭鍏ヤ笓瀹跺鍚嶆垨缂栧彿鎼滅储"
+ style="width: 300px; margin-right: 10px;"
+ @keyup.enter.native="handleSearchExperts"
+ >
+ <el-button
+ slot="append"
+ icon="el-icon-search"
+ @click="handleSearchExperts"
+ ></el-button>
+ </el-input>
+ <el-select
+ v-model="filterExpertType"
+ placeholder="涓撳绫诲瀷"
+ style="width: 150px; margin-right: 10px;"
+ @change="handleSearchExperts"
+ >
+ <el-option label="鍏ㄩ儴" value=""></el-option>
+ <el-option label="鏅�氫笓瀹�" value="0"></el-option>
+ <el-option label="涓讳换濮斿憳" value="1"></el-option>
+ </el-select>
+ <el-button type="primary" @click="handleSearchExperts">鎼滅储</el-button>
+ <el-button @click="handleResetSearch">閲嶇疆</el-button>
+ </div>
+
+ <el-table
+ :data="filteredExpertList"
+ v-loading="expertListLoading"
+ style="width: 100%"
+ max-height="600"
+ @selection-change="handleExpertSelectionChange"
+ >
+ <el-table-column type="selection" width="55"></el-table-column>
+ <el-table-column
+ label="涓撳濮撳悕"
+ prop="username"
+ width="120"
+ ></el-table-column>
+ <el-table-column
+ label="涓撳缂栧彿"
+ prop="userno"
+ width="120"
+ ></el-table-column>
+ <el-table-column label="涓撳绫诲瀷" width="100">
+ <template slot-scope="scope">
+ <el-tag
+ size="small"
+ :type="getIsChiefExpert(scope.row) ? 'danger' : ''"
+ >
+ {{ getIsChiefExpert(scope.row) ? "涓讳换濮斿憳" : "鏅�氫笓瀹�" }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍗曚綅鍚嶇О"
+ prop="unitname"
+ show-overflow-tooltip
+ ></el-table-column>
+ <el-table-column
+ label="鑱岀О"
+ prop="title"
+ width="100"
+ ></el-table-column>
+ <el-table-column
+ label="鑱旂郴鐢佃瘽"
+ prop="donorno"
+ width="120"
+ ></el-table-column>
+ </el-table>
+
+ <div style="margin-top: 20px; text-align: center;">
+ <el-pagination
+ @size-change="handlePageSizeChange"
+ @current-change="handlePageChange"
+ :current-page="expertPage.pageNum"
+ :page-sizes="[10, 20, 50, 100]"
+ :page-size="expertPage.pageSize"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="filteredExpertTotal"
+ ></el-pagination>
+ </div>
+
+ <div slot="footer">
+ <el-button @click="expertDialogVisible = false">鍙栨秷</el-button>
+ <el-button
+ type="primary"
+ @click="handleConfirmAddExpert"
+ :disabled="selectedExperts.length == 0"
+ >纭畾娣诲姞</el-button
+ >
+ </div>
+ </el-dialog>
<!-- 鍙戦�佷笓瀹跺璇濇 -->
<el-dialog
- title="鍙戦�佷笓瀹跺鏌�"
+ :title="sendDialogTitle"
:visible.sync="sendDialogVisible"
width="500px"
+ @close="handleSendDialogClose"
>
<el-form :model="sendForm" ref="sendForm" label-width="100px">
<el-form-item label="涓撳绫诲瀷" prop="expertType">
- <el-radio-group v-model="sendForm.expertType">
- <el-radio label="normal">涓撳</el-radio>
+ <el-radio-group
+ v-model="sendForm.expertType"
+ @change="handleExpertTypeChange"
+ >
+ <el-radio label="normal">鏅�氫笓瀹�</el-radio>
<el-radio label="chief">涓诲涓撳</el-radio>
</el-radio-group>
</el-form-item>
+
+ <el-form-item label="鍙戦�佹椂闂�" prop="startTime" required>
+ <el-date-picker
+ v-model="sendForm.startTime"
+ type="datetime"
+ placeholder="璇烽�夋嫨鍙戦�佹椂闂�"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ style="width: 100%"
+ />
+ </el-form-item>
+
<el-form-item
- label="閫夋嫨涓撳"
- prop="expertIds"
- v-if="sendForm.expertType === 'normal'"
+ label="鎴鏃堕棿"
+ prop="endTime"
+ :required="sendForm.expertType !== 'chief'"
>
+ <el-date-picker
+ v-model="sendForm.endTime"
+ type="datetime"
+ placeholder="璇烽�夋嫨鎴鏃堕棿"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ style="width: 100%"
+ :disabled="sendForm.expertType == 'chief'"
+ />
+ <div v-if="sendForm.expertType !== 'chief'" style="margin-top: 5px;">
+ <el-button-group>
+ <el-button size="mini" @click="setEndTime(0.5)"
+ >鍗婂皬鏃跺悗</el-button
+ >
+ <el-button size="mini" @click="setEndTime(1)">涓�灏忔椂鍚�</el-button>
+ <el-button size="mini" @click="setEndTime(2)">涓ゅ皬鏃跺悗</el-button>
+ <el-button size="mini" @click="setEndTime(24)">涓�澶╁悗</el-button>
+ </el-button-group>
+ </div>
+ <div
+ v-if="sendForm.expertType == 'chief'"
+ style="font-size: 12px; color: #999; margin-top: 5px;"
+ >
+ 涓诲涓撳鏃犻渶璁剧疆鎴鏃堕棿
+ </div>
+ </el-form-item>
+
+ <el-form-item label="鍙戦�佹柟寮�" prop="sendType" required>
<el-select
- v-model="sendForm.expertIds"
- multiple
- placeholder="璇烽�夋嫨涓撳"
+ v-model="sendForm.sendType"
+ placeholder="璇烽�夋嫨鍙戦�佹柟寮�"
style="width: 100%"
>
- <el-option
- v-for="expert in availableExperts"
- :key="expert.id"
- :label="expert.name"
- :value="expert.id"
- />
+ <el-option label="绯荤粺鍙戦��" value="0"></el-option>
+ <el-option label="閭欢鍙戦��" value="1"></el-option>
+ <el-option label="鐭俊鍙戦��" value="2"></el-option>
+ <el-option label="鍏朵粬鏂瑰紡" value="3"></el-option>
</el-select>
</el-form-item>
- <el-form-item label="鍙戦�佸唴瀹�" prop="content">
+
+ <el-form-item label="鍙戦�佹爣棰�" prop="title" required>
+ <el-input v-model="sendForm.title" placeholder="璇疯緭鍏ュ彂閫佹爣棰�" />
+ </el-form-item>
+
+ <el-form-item label="鍙戦�佸唴瀹�" prop="content" required>
<el-input
type="textarea"
:rows="4"
@@ -401,579 +645,1001 @@
placeholder="璇疯緭鍏ュ彂閫佺粰涓撳鐨勫鏌ュ唴瀹硅鏄�"
/>
</el-form-item>
+
+ <el-form-item label="璺宠浆閾炬帴" prop="url">
+ <el-input
+ v-model="sendForm.url"
+ placeholder="璇疯緭鍏ヨ烦杞摼鎺ワ紙鍙�夛級"
+ />
+ </el-form-item>
</el-form>
<div slot="footer">
<el-button @click="sendDialogVisible = false">鍙栨秷</el-button>
- <el-button type="primary" @click="handleSendConfirm"
- >纭鍙戦��</el-button
+ <el-button
+ type="primary"
+ @click="handleSendConfirm"
+ :loading="sendingAll"
+ :disabled="sendingAll"
>
+ {{
+ sendingAll
+ ? `鍙戦�佷腑 (${sendingProgress}/${sendingTotal})`
+ : "纭鍙戦��"
+ }}
+ </el-button>
</div>
</el-dialog>
+ <!-- 鎴栬�呭湪椤甸潰涓坊鍔犺繘搴︽潯 -->
+ <div v-if="sendingAll" class="send-progress-container">
+ <el-progress
+ :percentage="Math.round((sendingProgress / sendingTotal) * 100)"
+ :text-inside="true"
+ :stroke-width="20"
+ status="success"
+ >
+ <span>宸插彂閫� {{ sendingProgress }} / {{ sendingTotal }}</span>
+ </el-progress>
+ <div class="send-stats">
+ <span class="stat-item success">鎴愬姛: {{ sendingSuccessCount }}</span>
+ <span class="stat-item fail">澶辫触: {{ sendingFailCount }}</span>
+ </div>
+ </div>
+ <!-- 涓撳鍘嗗彶瀹℃壒鎯呭喌瀵硅瘽妗� -->
+ <el-dialog
+ title="涓撳鍘嗗彶瀹℃壒鎯呭喌"
+ :visible.sync="expertHistoryDialogVisible"
+ width="600px"
+ >
+ <div v-loading="expertHistoryLoading">
+ <div v-if="expertHistoryData" style="padding: 20px;">
+ <el-row :gutter="20" style="margin-bottom: 20px;">
+ <el-col :span="12">
+ <div class="history-stat-item">
+ <div class="history-stat-label">涓撳濮撳悕</div>
+ <div class="history-stat-value">
+ {{ currentExpertInfo.expertname || "-" }}
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="12">
+ <div class="history-stat-item">
+ <div class="history-stat-label">涓撳缂栧彿</div>
+ <div class="history-stat-value">
+ {{ currentExpertInfo.expertNo || "-" }}
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+
+ <el-divider></el-divider>
+
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <div class="history-stat-item">
+ <div class="history-stat-label">鎬诲鎵规暟閲�</div>
+ <div
+ class="history-stat-value"
+ style="font-size: 24px; color: #409EFF;"
+ >
+ {{ expertHistoryData.count || 0 }}
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="12">
+ <div class="history-stat-item">
+ <div class="history-stat-label">宸叉帴鏀舵暟閲�</div>
+ <div class="history-stat-value">
+ {{ expertHistoryData.acceptCount || 0 }}
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20" style="margin-top: 20px;">
+ <el-col :span="12">
+ <div class="history-stat-item">
+ <div class="history-stat-label">鏈帴鏀舵暟閲�</div>
+ <div class="history-stat-value">
+ {{ expertHistoryData.notAcceptCount || 0 }}
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="12">
+ <div class="history-stat-item">
+ <div class="history-stat-label">鏈夋剰瑙佹暟閲�</div>
+ <div class="history-stat-value">
+ {{ expertHistoryData.opinionCount || 0 }}
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20" style="margin-top: 20px;">
+ <el-col :span="12">
+ <div class="history-stat-item">
+ <div class="history-stat-label">鏃犳剰瑙佹暟閲�</div>
+ <div class="history-stat-value">
+ {{ expertHistoryData.notOpinionCount || 0 }}
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="12">
+ <div class="history-stat-item">
+ <div class="history-stat-label">鏈夐檮浠舵暟閲�</div>
+ <div class="history-stat-value">
+ {{ expertHistoryData.annexCount || 0 }}
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20" style="margin-top: 20px;">
+ <el-col :span="12">
+ <div class="history-stat-item">
+ <div class="history-stat-label">鏃犻檮浠舵暟閲�</div>
+ <div class="history-stat-value">
+ {{ expertHistoryData.notAnnexCount || 0 }}
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ <div v-else style="text-align: center; padding: 40px 0;">
+ <i
+ class="el-icon-info"
+ style="font-size: 60px; color: #C0C4CC; margin-bottom: 20px;"
+ ></i>
+ <p style="color: #909399; font-size: 14px;">鏆傛棤鍘嗗彶瀹℃壒鏁版嵁</p>
+ </div>
+ </div>
+ <div slot="footer">
+ <el-button @click="expertHistoryDialogVisible = false">鍏抽棴</el-button>
+ </div>
+ </el-dialog>
+
+ <!-- 鏂囦欢棰勮寮圭獥 -->
+ <FilePreviewDialog
+ :visible="previewVisible"
+ :file="currentPreviewFile"
+ @close="previewVisible = false"
+ @download="handleDownload"
+ />
</div>
</template>
+
<script>
+import { getToken } from "@/utils/auth";
import {
- getEthicsReviewDetail,
- updateEthicsReview,
- sendExpertReview,
- endEthicsReview,
- uploadAttachment,
- deleteAttachment,
- getAttachments
-} from "./ethicsReview";
+ reviewinitiateBaseInfoList,
+ ethicalreviewedit,
+ ethicalreviewadd,
+ ethicalreviewInfo,
+ ethicalreExpertTotal,
+ sendNotification,
+ sendcall
+} from "@/api/businessApi";
+import { listExternalperson } from "@/api/project/externalperson";
+import CaseBasicInfo from "@/components/CaseBasicInfo";
+import UploadAttachment from "@/components/UploadAttachment";
+import FilePreviewDialog from "@/components/FilePreviewDialog";
+import dayjs from "dayjs";
export default {
name: "EthicsReviewDetail",
+ components: { CaseBasicInfo, UploadAttachment, FilePreviewDialog },
+ dicts: ["sys_user_sex", "sys_ethical", "Review_status"],
+
data() {
return {
+ // 椤甸潰妯″紡
+ isEdit: false,
+ // 鍩烘湰淇℃伅
+ infoid: undefined,
+ id: undefined,
+ caseId: null,
+ caseNo: "",
+
// 琛ㄥ崟鏁版嵁
form: {
+ // 鍩虹淇℃伅
id: undefined,
- hospitalNo: "",
- donorName: "",
- gender: "",
- age: "",
- diagnosis: "",
- ethicsConclusion: "reviewing",
- ethicsOpinion: "",
- reviewTime: "",
- registrant: "",
- registrationTime: new Date()
- .toISOString()
- .replace("T", " ")
- .substring(0, 19)
+ infoid: undefined,
+ caseNo: "",
+ initiateTheme: "",
+ initiatePerson: "",
+
+ // 鐘舵�佸拰鏃堕棿
+ status: "0", // 0:寰呭鏌�, 1:瀹℃煡涓�, 2:瀹℃煡涓, 3:瀹℃煡瀹屾垚
+ startTime: "",
+ cutOffTime: "",
+ endTime: "",
+
+ // 涓撳淇℃伅
+ expertName: "",
+ expertNo: "",
+ expertType: "0",
+ expertConclusion: "",
+ expertOpinion: "",
+ expertTime: "",
+ orderNo: 1,
+
+ // 澶囨敞
+ remark: "",
+
+ // 闄勪欢淇℃伅
+ annexfilesList: [],
+ filePatch: "",
+
+ // 涓撳瀹℃煡鎰忚鍒楄〃
+ ethicalreviewopinionsList: [],
+
+ // 绯荤粺瀛楁
+ createBy: "",
+ createTime: "",
+ updateBy: "",
+ updateTime: "",
+ delFlag: "0"
},
+
// 琛ㄥ崟楠岃瘉瑙勫垯
rules: {
- donorName: [
- { required: true, message: "鎹愮尞鑰呭鍚嶄笉鑳戒负绌�", trigger: "blur" }
+ initiateTheme: [
+ { required: true, message: "鍙戣捣涓婚涓嶈兘涓虹┖", trigger: "blur" },
+ {
+ min: 2,
+ max: 100,
+ message: "闀垮害鍦� 2 鍒� 100 涓瓧绗�",
+ trigger: "blur"
+ }
],
- ethicsConclusion: [
- { required: true, message: "浼︾悊缁撹涓嶈兘涓虹┖", trigger: "change" }
+ initiatePerson: [
+ { required: true, message: "鍙戣捣浜轰笉鑳戒负绌�", trigger: "blur" }
],
- reviewTime: [
- { required: true, message: "瀹℃煡鏃堕棿涓嶈兘涓虹┖", trigger: "change" }
+ status: [
+ { required: true, message: "瀹℃煡鐘舵�佷笉鑳戒负绌�", trigger: "change" }
+ ],
+ expertName: [
+ { max: 50, message: "闀垮害涓嶈兘瓒呰繃 50 涓瓧绗�", trigger: "blur" }
+ ],
+ expertNo: [
+ { max: 50, message: "闀垮害涓嶈兘瓒呰繃 50 涓瓧绗�", trigger: "blur" }
+ ],
+ expertConclusion: [
+ { max: 2, message: "闀垮害涓嶈兘瓒呰繃 2 涓瓧绗�", trigger: "change" }
+ ],
+ remark: [
+ { max: 500, message: "闀垮害涓嶈兘瓒呰繃 500 涓瓧绗�", trigger: "blur" }
]
},
+ sending: false, // 鍗曚釜鍙戦�佺姸鎬�
+ sendingAll: false, // 鍏ㄥ眬鍙戦�佺姸鎬�
+ sendingProgress: 0, // 鍙戦�佽繘搴�
+ sendingTotal: 0, // 鎬诲彂閫佹暟
+ sendingSuccessCount: 0, // 鎴愬姛鏁�
+ sendingFailCount: 0, // 澶辫触鏁�
+ sendingResults: [], // 鍙戦�佺粨鏋滃垪琛�
+ originalFormData: null, // 鍘熷琛ㄥ崟鏁版嵁
+ originalExpertList: null, // 鍘熷涓撳鍒楄〃
+ originalAttachments: null, // 鍘熷闄勪欢鍒楄〃
+ isDataLoaded: false, // 鏁版嵁鏄惁宸插姞杞�
// 淇濆瓨鍔犺浇鐘舵��
saveLoading: false,
+ completeLoading: false,
+ suspendLoading: false,
+ endLoading: false,
+ sending: false,
- // 闄勪欢鏁版嵁
- attachments: [],
- expertReviews: [
- // 涓撳锛�18浣嶏級- 鍒濆鐘舵�佷负鐢宠涓�
- {
- id: 1,
- expertName: "闄舵槉",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 2,
- expertName: "鍒樻枌",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 3,
- expertName: "浜庢捣鍒� ",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 4,
- expertName: "鐜嬬孩姊�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 5,
- expertName: "鐜嬫槬鍏�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 6,
- expertName: "鐜嬮潤",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 7,
- expertName: "杈规枃瓒�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 8,
- expertName: "闂織鍕�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 9,
- expertName: "璁稿嚖",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 10,
- expertName: "璁镐紶灞�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 11,
- expertName: "寮犵孩宀�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 12,
- expertName: "鏉ㄨ嫃姘�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 13,
- expertName: "瀹嬬帀寮�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 14,
- expertName: "鍛ㄤ紶鍒�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 15,
- expertName: "鑽嗗嚒娉�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 16,
- expertName: "鐭枃鎹�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 17,
- expertName: "钁i渿",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- {
- id: 18,
- expertName: "钄¢噾璐�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- // 涓诲涓撳锛�1浣嶏級
- {
- id: 19,
- expertName: "瀛斿績娑�",
- isChief: true,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- }
- ],
+ // 闄勪欢鐩稿叧
+ attachmentFileList: [],
+
+ // 棰勮鐩稿叧
+ previewVisible: false,
+ currentPreviewFile: null,
+
+ // 涓撳瀹℃煡鏁版嵁
+ expertReviews: [],
expertLoading: false,
attachmentLoading: false,
+
+ // 娣诲姞涓撳瀵硅瘽妗�
+ expertDialogVisible: false,
+ expertList: [],
+ expertListLoading: false,
+ expertSearchQuery: "",
+ filterExpertType: "",
+ expertPage: {
+ pageNum: 1,
+ pageSize: 50
+ },
+ expertTotal: 0,
+ selectedExperts: [],
+
// 鍙戦�佸璇濇
sendDialogVisible: false,
sendForm: {
expertType: "normal",
expertIds: [],
- content: ""
+ startTime: "",
+ endTime: "",
+ sendType: "0",
+ title: "浼︾悊瀹℃煡浠诲姟閫氱煡",
+ content: "",
+ url: ""
},
- // 涓婁紶鐩稿叧
- uploadDialogVisible: false,
- uploadLoading: false,
- tempFileList: [],
- // 鍙敤涓撳鍒楄〃
- availableExperts: [
- { id: 1, name: "寮犳暀鎺�", type: "normal" },
- { id: 2, name: "鏉庢暀鎺�", type: "normal" },
- { id: 3, name: "鐜嬫暀鎺�", type: "normal" },
- { id: 4, name: "璧典富濮�", type: "chief" }
- ]
+
+ // 涓撳鍘嗗彶瀹℃壒鎯呭喌
+ expertHistoryDialogVisible: false,
+ expertHistoryLoading: false,
+ expertHistoryData: null,
+ currentExpertInfo: {},
+
+ // 褰撳墠鍙戦�佺殑涓撳
+ currentSendExperts: []
};
},
computed: {
- // 璁$畻灞炴�э細涓撳鍚屾剰鏁伴噺
- approvedNormalExperts() {
- return this.expertReviews.filter(
- expert => !expert.isChief && expert.expertConclusion === "approved"
+ // 璁$畻灞炴�э細鑾峰彇涓撳鍒楄〃锛堢‘淇濆搷搴斿紡锛�
+ ethicalreviewopinionsList() {
+ return this.form.ethicalreviewopinionsList || [];
+ },
+
+ // 璁$畻灞炴�э細鏅�氫笓瀹舵暟閲�
+ normalExpertsCount() {
+ return this.ethicalreviewopinionsList.filter(
+ expert => expert.expertType == "0"
).length;
},
- // 璁$畻灞炴�э細涓诲涓撳鐘舵��
- chiefExpertStatus() {
- const chiefExpert = this.expertReviews.find(expert => expert.isChief);
- return chiefExpert
- ? this.statusTextFilter(chiefExpert.reviewStatus)
- : "鏈垎閰�";
- },
- // 璁$畻灞炴�э細瀹屾垚杩涘害
- completionRate() {
- const totalExperts = this.expertReviews.length;
- const completedExperts = this.expertReviews.filter(
- expert => expert.reviewStatus === "submitted"
+
+ // 璁$畻灞炴�э細涓诲涓撳鏁伴噺
+ chiefExpertsCount() {
+ return this.ethicalreviewopinionsList.filter(
+ expert => expert.expertType == "1"
).length;
- return totalExperts > 0
- ? Math.round((completedExperts / totalExperts) * 100)
- : 0;
},
+
+ // 璁$畻灞炴�э細鎬讳笓瀹舵暟閲�
+ totalExpertsCount() {
+ return this.ethicalreviewopinionsList.length;
+ },
+
+ // 璁$畻灞炴�э細宸插悓鎰忎笓瀹舵暟閲�
+ approvedExpertsCount() {
+ return this.ethicalreviewopinionsList.filter(
+ expert => expert.expertconclusion == "1"
+ ).length;
+ },
+
// 璁$畻灞炴�э細鎬讳綋缁撹
overallConclusionText() {
- if (this.approvedNormalExperts >= 12) {
+ const total = this.totalExpertsCount;
+ const approved = this.approvedExpertsCount;
+
+ if (total == 0) return "鏈鏌�";
+ if (approved >= Math.ceil(total * 0.7)) {
+ // 瓒呰繃70%鍚屾剰
return "閫氳繃";
- } else if (this.approvedNormalExperts >= 9) {
+ } else if (approved >= Math.ceil(total * 0.5)) {
+ // 瓒呰繃50%鍚屾剰
return "淇敼鍚庨�氳繃";
} else {
return "涓嶉�氳繃";
}
},
+
overallConclusionFilter() {
- if (this.approvedNormalExperts >= 12) {
+ const total = this.totalExpertsCount;
+ const approved = this.approvedExpertsCount;
+
+ if (total == 0) return "info";
+ if (approved >= Math.ceil(total * 0.7)) {
return "success";
- } else if (this.approvedNormalExperts >= 9) {
+ } else if (approved >= Math.ceil(total * 0.5)) {
return "warning";
} else {
return "danger";
}
},
- // 鏄惁鍙互鍙戦�佺粰涓撳
+
+ // 鍙彂閫佺殑鏅�氫笓瀹�
+ availableNormalExperts() {
+ return this.ethicalreviewopinionsList.filter(
+ expert =>
+ expert.expertType == "0" &&
+ (!expert.receiveStatus ||
+ expert.receiveStatus == "0" ||
+ expert.receiveStatus == "1")
+ );
+ },
+
+ // 鍙彂閫佺殑涓诲涓撳
+ availableChiefExperts() {
+ return this.ethicalreviewopinionsList.filter(
+ expert =>
+ expert.expertType == "1" &&
+ (!expert.receiveStatus ||
+ expert.receiveStatus == "0" ||
+ expert.receiveStatus == "1")
+ );
+ },
+
+ // 鏄惁鍙互鍙戦�佺粰鏅�氫笓瀹�
canSendToNormalExperts() {
- return (
- this.expertReviews.filter(
- expert => !expert.isChief && expert.reviewStatus === "applying"
- ).length > 0
- );
+ return this.availableNormalExperts.length > 0;
},
- // 鏄惁鍙互鍙戦�佺粰涓诲涓撳锛堥渶瑕佽嚦灏�12涓笓瀹跺悓鎰忥級
+
+ // 鏄惁鍙互鍙戦�佺粰涓诲涓撳锛堥渶瑕佽嚦灏�12涓櫘閫氫笓瀹跺悓鎰忥級
canSendToChiefExpert() {
- return (
- this.approvedNormalExperts >= 12 &&
- this.expertReviews.filter(
- expert => expert.isChief && expert.reviewStatus === "applying"
- ).length > 0
- );
+ const normalApprovedCount = this.ethicalreviewopinionsList.filter(
+ expert => expert.expertType == "0" && expert.expertconclusion == "1"
+ ).length;
+ return this.availableChiefExperts.length > 0 && normalApprovedCount >= 12;
},
- // 鏄惁鍙互鎵归噺鍙戦��
- canBatchSend() {
- return (
- this.expertReviews.filter(expert => expert.reviewStatus === "applying")
- .length > 0
- );
+
+ // 宸插瓨鍦ㄧ殑涓撳缂栧彿鍒楄〃
+ existingExpertNos() {
+ return this.ethicalreviewopinionsList
+ .map(expert => expert.expertNo)
+ .filter(no => no);
},
- // 鏄惁鍙互鍙戦�佷笓瀹跺鏌�
- canSendToExperts() {
- return this.form.id && this.form.ethicsConclusion === "reviewing";
+
+ // 宸插瓨鍦ㄧ殑涓撳濮撳悕鍒楄〃
+ existingExpertNames() {
+ return this.ethicalreviewopinionsList
+ .map(expert => expert.expertname)
+ .filter(name => name);
},
+
+ // 杩囨护鍚庣殑涓撳鍒楄〃锛堟帓闄ゅ凡瀛樺湪鐨勪笓瀹讹級
+ filteredExpertList() {
+ if (!this.expertList.length) return [];
+
+ return this.expertList.filter(expert => {
+ // 濡傛灉涓撳鏈夌紪鍙凤紝妫�鏌ョ紪鍙锋槸鍚﹀凡瀛樺湪
+ if (expert.userno && this.existingExpertNos.includes(expert.userno)) {
+ return false;
+ }
+ // 濡傛灉涓撳鏈夊鍚嶏紝妫�鏌ュ鍚嶆槸鍚﹀凡瀛樺湪
+ if (
+ expert.username &&
+ this.existingExpertNames.includes(expert.username)
+ ) {
+ return false;
+ }
+ return true;
+ });
+ },
+
+ // 杩囨护鍚庣殑涓撳鎬绘暟
+ filteredExpertTotal() {
+ return this.filteredExpertList.length;
+ },
+
// 褰撳墠鐢ㄦ埛淇℃伅
currentUser() {
return JSON.parse(sessionStorage.getItem("user") || "{}");
+ },
+
+ // 鍙戦�佸璇濇鏍囬
+ sendDialogTitle() {
+ if (this.sendForm.expertType == "chief") {
+ return "鍙戦�佷富濮斾笓瀹跺鏌�";
+ } else if (this.sendForm.expertType == "normal") {
+ return "鍙戦�佹櫘閫氫笓瀹跺鏌�";
+ } else {
+ return "鍙戦�佷笓瀹跺鏌�";
+ }
+ }
+ },
+ watch: {
+ // 鐩戝惉琛ㄥ崟涓殑涓撳鍒楄〃鍙樺寲
+ "form.ethicalreviewopinionsList": {
+ handler(newVal) {
+ console.log("涓撳鍒楄〃鍙樺寲:", newVal);
+ },
+ deep: true
}
},
created() {
- const id = this.$route.query.id;
- if (id) {
- this.getDetail(id);
- this.getAttachments(id);
- // 涓嶅啀闇�瑕佷粠鎺ュ彛鑾峰彇涓撳鍒楄〃锛屼娇鐢ㄥ浐瀹氱殑expertReviews鏁版嵁
- } else if (this.$route.path.includes("/add")) {
- this.generateHospitalNo();
- this.form.registrant = this.currentUser.username || "褰撳墠鐢ㄦ埛";
- }
+ this.infoid = this.$route.query.infoid;
+ this.id = this.$route.query.id;
+ this.caseId = this.$route.query.infoid;
+ this.getDetail(this.infoid, this.id);
+ // 鐩戝惉璺敱鍙樺寲锛岄槻姝㈢敤鎴风寮�椤甸潰
+ window.addEventListener("beforeunload", this.beforeUnloadHandler);
+ },
+ beforeDestroy() {
+ // 绉婚櫎浜嬩欢鐩戝惉鍣�
+ window.removeEventListener("beforeunload", this.beforeUnloadHandler);
},
methods: {
- // 鐢熸垚浣忛櫌鍙�
- generateHospitalNo() {
- const timestamp = Date.now().toString();
- this.form.hospitalNo = "D" + timestamp.slice(-6);
+ // 鍒濆鍖栨柊澧炴暟鎹�
+ initNewData() {
+ this.form.infoid = this.infoid;
+ this.form.caseNo = this.$route.query.caseNo || "";
+ this.form.initiatePerson = this.currentUser.username || "褰撳墠鐢ㄦ埛";
+ this.form.startTime = new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19);
+ this.form.createBy = this.currentUser.username || "admin";
},
- getExpertRowClassName({ row }) {
- return row.isChief ? "chief-expert-row" : "normal-expert-row";
- },
+
// 鑾峰彇璇︽儏
- getDetail(id) {
- getEthicsReviewDetail(id)
- .then(response => {
- if (response.code === 200) {
+ async getDetail(infoid, id) {
+ try {
+ this.expertLoading = true;
+ let response = {};
+ if (id) {
+ response = await ethicalreviewInfo(id);
+ } else if (infoid) {
+ response = await reviewinitiateBaseInfoList({ infoid: infoid });
+ }
+
+ if (response.code == 200) {
+ let detailData = {};
+
+ if (response.data && id) {
this.form = response.data;
- }
- })
- .catch(error => {
- console.error("鑾峰彇浼︾悊瀹℃煡璇︽儏澶辫触:", error);
- this.$message.error("鑾峰彇璇︽儏澶辫触");
- });
- },
+ // 瑙f瀽 filePatch 瀛楁
+ this.parseFilePatch(this.form.filePatch);
+ this.initAttachmentFileList();
- // 鑾峰彇涓撳瀹℃煡鍒楄〃
- getExpertReviews(ethicsReviewId) {
- this.expertLoading = true;
- // 妯℃嫙鏁版嵁 - 瀹為檯椤圭洰涓粠鎺ュ彛鑾峰彇
- setTimeout(() => {
- this.expertReviews = [
- // 涓撳锛�18浣嶏級
- {
- id: 1,
- expertName: "寮犳暀鎺�",
- isChief: false,
- reviewStatus: "submitted",
- expertConclusion: "approved",
- expertOpinion: "绗﹀悎浼︾悊瑕佹眰",
- reviewTime: "2025-12-01 10:30:00"
- },
- {
- id: 2,
- expertName: "鏉庢暀鎺�",
- isChief: false,
- reviewStatus: "submitted",
- expertConclusion: "approved",
- expertOpinion: "鏂规璁捐鍚堢悊",
- reviewTime: "2025-12-01 11:20:00"
- },
- {
- id: 3,
- expertName: "鐜嬫暀鎺�",
- isChief: false,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
- },
- // 涓诲涓撳锛�1浣嶏級
- {
- id: 19,
- expertName: "璧典富濮�",
- isChief: true,
- reviewStatus: "applying",
- expertConclusion: "",
- expertOpinion: "",
- reviewTime: ""
+ if (!this.form.ethicalreviewopinionsList) {
+ this.$set(this.form, "ethicalreviewopinionsList", []);
+ }
+ } else if (response.data && infoid) {
+ this.form = response.data[0];
+ this.parseFilePatch(this.form.filePatch);
+ this.initAttachmentFileList();
+
+ if (!this.form.ethicalreviewopinionsList) {
+ this.$set(this.form, "ethicalreviewopinionsList", []);
+ }
}
- ];
+
+ // 淇濆瓨鍘熷鏁版嵁鐢ㄤ簬姣旇緝
+ this.saveOriginalData();
+
+ this.expertReviews = this.form.ethicalreviewopinionsList;
+ this.isDataLoaded = true;
+
+ this.$message.success("鏁版嵁鍔犺浇鎴愬姛");
+ } else {
+ this.$message.error("鑾峰彇璇︽儏澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("鑾峰彇浼︾悊瀹℃煡璇︽儏澶辫触:", error);
+ this.$message.error("鏁版嵁鍔犺浇澶辫触");
+ } finally {
this.expertLoading = false;
- }, 500);
+ }
},
- // 鑾峰彇闄勪欢鍒楄〃
- getAttachments(ethicsReviewId) {
- this.attachmentLoading = true;
- getAttachments(ethicsReviewId)
- .then(response => {
- if (response.code === 200) {
- this.attachments = response.data;
- }
- this.attachmentLoading = false;
- })
- .catch(error => {
- console.error("鑾峰彇闄勪欢鍒楄〃澶辫触:", error);
- this.attachmentLoading = false;
- });
+ // 淇濆瓨鍘熷鏁版嵁
+ saveOriginalData() {
+ // 娣辨嫹璐濊〃鍗曟暟鎹�
+ this.originalFormData = JSON.parse(JSON.stringify(this.form));
+
+ // 娣辨嫹璐濅笓瀹跺垪琛�
+ this.originalExpertList = this.form.ethicalreviewopinionsList
+ ? JSON.parse(JSON.stringify(this.form.ethicalreviewopinionsList))
+ : [];
+
+ // 娣辨嫹璐濋檮浠跺垪琛�
+ this.originalAttachments = this.form.annexfilesList
+ ? JSON.parse(JSON.stringify(this.form.annexfilesList))
+ : [];
},
- // 鐘舵�佽繃婊ゅ櫒
- statusFilter(status) {
+ // 瑙f瀽 filePatch 瀛楁
+ parseFilePatch(filePatch) {
+ if (!filePatch) {
+ this.form.annexfilesList = [];
+ return;
+ }
+
+ try {
+ this.form.annexfilesList = JSON.parse(filePatch);
+ } catch (error) {
+ console.error("瑙f瀽 filePatch 瀛楁澶辫触:", error);
+ this.form.annexfilesList = [];
+ }
+ },
+
+ // 鍒濆鍖栭檮浠舵枃浠跺垪琛�
+ initAttachmentFileList() {
+ if (this.form.annexfilesList && this.form.annexfilesList.length > 0) {
+ this.attachmentFileList = this.form.annexfilesList.map(item => ({
+ uid:
+ item.id ||
+ Math.random()
+ .toString(36)
+ .substr(2, 9),
+ name: item.fileName,
+ url: item.path || item.fileUrl,
+ status: "success"
+ }));
+ } else {
+ this.attachmentFileList = [];
+ }
+ },
+
+ // 鏋勫缓 filePatch 瀛楁
+ buildFilePatch() {
+ if (!this.form.annexfilesList || this.form.annexfilesList.length == 0) {
+ return "";
+ }
+ return JSON.stringify(this.form.annexfilesList);
+ },
+
+ // 闄勪欢鍙樺寲澶勭悊
+ handleAttachmentChange(fileList) {
+ this.attachmentFileList = fileList;
+ },
+
+ // 闄勪欢绉婚櫎澶勭悊
+ handleAttachmentRemove(file) {
+ if (file.url) {
+ const index = this.form.annexfilesList.findIndex(
+ item => item.path == file.url || item.fileUrl == file.url
+ );
+ if (index > -1) {
+ this.form.annexfilesList.splice(index, 1);
+ }
+ }
+ },
+
+ // 鎵嬪姩鍒犻櫎闄勪欢
+ handleRemoveAttachment(index) {
+ this.form.annexfilesList.splice(index, 1);
+ this.attachmentFileList.splice(index, 1);
+ this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
+ },
+
+ // 涓婁紶鎴愬姛澶勭悊
+ handleUploadSuccess({ file, fileList, response }) {
+ if (response.code == 200) {
+ const attachmentObj = {
+ fileName: file.name,
+ path: response.data || file.url,
+ fileUrl: response.data || file.url,
+ type: this.getFileExtension(file.name),
+ createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
+ infoid: this.infoid,
+ delFlag: 0
+ };
+
+ this.form.annexfilesList.push(attachmentObj);
+ this.$message.success("鏂囦欢涓婁紶鎴愬姛");
+ }
+ },
+
+ // 涓婁紶閿欒澶勭悊
+ handleUploadError({ file, fileList, error }) {
+ console.error("闄勪欢涓婁紶澶辫触:", error);
+ this.$message.error("鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯");
+ },
+
+ // 鏂囦欢棰勮
+ handlePreview(file) {
+ console.log(file, "file");
+
+ this.currentPreviewFile = {
+ fileName: file.fileName,
+ fileUrl: file.path || file.fileUrl,
+ fileType: this.getFileType(file.fileName)
+ };
+ this.previewVisible = true;
+ },
+ // 鏂囦欢棰勮
+ handlePreviewSignature(file) {
+ console.log(file, "file");
+
+ this.currentPreviewFile = {
+ fileName: file,
+ fileUrl: file,
+ fileType: "png"
+ };
+ this.previewVisible = true;
+ },
+
+ // 鏂囦欢涓嬭浇
+ handleDownload(file) {
+ const fileUrl = file.path || file.fileUrl;
+ const fileName = file.fileName;
+
+ if (fileUrl) {
+ const link = document.createElement("a");
+ link.href = fileUrl;
+ link.download = fileName;
+ link.style.display = "none";
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ this.$message.success("寮�濮嬩笅杞芥枃浠�");
+ } else {
+ this.$message.warning("鏂囦欢璺緞涓嶅瓨鍦紝鏃犳硶涓嬭浇");
+ }
+ },
+
+ // 鑾峰彇鏂囦欢绫诲瀷
+ getFileType(fileName) {
+ if (!fileName) return "other";
+
+ const extension = fileName
+ .split(".")
+ .pop()
+ .toLowerCase();
+ const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"];
+ const pdfTypes = ["pdf"];
+ const officeTypes = ["doc", "docx", "xls", "xlsx", "ppt", "pptx"];
+
+ if (imageTypes.includes(extension)) return "image";
+ if (pdfTypes.includes(extension)) return "pdf";
+ if (officeTypes.includes(extension)) return "office";
+ return "other";
+ },
+
+ // 鑾峰彇鏂囦欢鎵╁睍鍚�
+ getFileExtension(filename) {
+ return filename
+ .split(".")
+ .pop()
+ .toLowerCase();
+ },
+
+ // 鏃ユ湡鏃堕棿鏍煎紡鍖�
+ formatDateTime(dateTime) {
+ if (!dateTime) return "";
+
+ try {
+ const date = new Date(dateTime);
+ if (isNaN(date.getTime())) return dateTime;
+
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ const hours = String(date.getHours()).padStart(2, "0");
+ const minutes = String(date.getMinutes()).padStart(2, "0");
+ const seconds = String(date.getSeconds()).padStart(2, "0");
+
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+ } catch (error) {
+ return dateTime;
+ }
+ },
+
+ // 鍒ゆ柇鏄惁涓轰富浠诲鍛�
+ getIsChiefExpert(expert) {
+ // 鑱岀О鍖呭惈"涓讳换濮斿憳"鎴栬�卐xpertType涓�"1"
+ return (
+ (expert.title && expert.title.includes("涓讳换濮斿憳")) ||
+ expert.expertType == "1"
+ );
+ },
+
+ // 涓撳绫诲瀷鏂囨湰杞崲
+ getExpertTypeText(type) {
+ return type == "1" ? "涓诲涓撳" : "鏅�氫笓瀹�";
+ },
+
+ // 瀹℃煡鐘舵�佽繃婊ゅ櫒
+ getReviewStatusFilter(status) {
const statusMap = {
- applying: "info",
- submitted: "success"
+ "0": "info", // 寰呮帴鏀�
+ "1": "warning", // 鏈帴鏀�
+ "2": "success", // 宸叉帴鏀�
+ "3": "danger", // 瓒呮椂
+ "4": "danger", // 涓
+ "5": "success" // 瀹屾垚
};
return statusMap[status] || "info";
},
- statusTextFilter(status) {
+ getReviewStatusText(status) {
const statusMap = {
- applying: "鐢宠涓�",
- submitted: "宸叉彁浜�"
+ "0": "寰呮帴鏀�",
+ "1": "鏈帴鏀�",
+ "2": "宸叉帴鏀�",
+ "3": "瓒呮椂",
+ "4": "涓",
+ "5": "瀹屾垚"
};
return statusMap[status] || "鏈煡";
},
// 缁撹杩囨护鍣�
- conclusionFilter(conclusion) {
+ getConclusionFilter(conclusion) {
const conclusionMap = {
- approved: "success",
- approved_with_modifications: "warning",
- disapproved: "danger"
+ "1": "success", // 鍚屾剰
+ "2": "warning", // 瀹℃煡涓�
+ "0": "danger" // 涓嶅悓鎰�
};
return conclusionMap[conclusion] || "info";
},
- conclusionTextFilter(conclusion) {
+ getConclusionText(conclusion) {
const conclusionMap = {
- approved: "鍚屾剰",
- approved_with_modifications: "淇敼鍚庡悓鎰�",
- disapproved: "涓嶅悓鎰�"
+ "1": "鍚屾剰",
+ "2": "瀹℃煡涓�",
+ "0": "涓嶅悓鎰�"
};
return conclusionMap[conclusion] || "鏈煡";
},
+ // 涓撳琛屾牱寮�
+ getExpertRowClassName({ row }) {
+ return row.expertType == "1" ? "chief-expert-row" : "normal-expert-row";
+ },
+
+ // 鑾峰彇涓撳鍞竴鏍囪瘑
+ getExpertKey(expert) {
+ return expert.id || expert.expertNo || expert.expertname;
+ },
+
+ // 涓撳绫诲瀷鍙樻洿澶勭悊
+ handleExpertTypeChange() {
+ if (this.sendForm.expertType == "chief") {
+ // 涓诲涓撳鏃犻渶璁剧疆鎴鏃堕棿
+ this.sendForm.endTime = "";
+ } else {
+ // 鏅�氫笓瀹堕噸缃埅姝㈡椂闂翠负褰撳墠鏃堕棿
+ this.sendForm.endTime = "";
+ }
+ },
+
+ // 璁剧疆鎴鏃堕棿蹇嵎閿�
+ setEndTime(hours) {
+ const now = new Date();
+ const endTime = new Date(now.getTime() + hours * 60 * 60 * 1000);
+ this.sendForm.endTime = endTime
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19);
+ },
+
// 淇濆瓨淇℃伅
- handleSave() {
- this.$refs.form.validate(valid => {
+ async handleSave() {
+ this.$refs.form.validate(async valid => {
if (valid) {
this.saveLoading = true;
- const apiMethod = this.form.id ? updateEthicsReview : addEthicsReview;
+ // 淇濆瓨娓呯┖id渚夸簬鍚庣鏁翠綋鍒犻櫎鏂板
+ this.form.ethicalreviewopinionsList.forEach(item => {
+ item.id = null;
+ });
+ try {
+ const submitData = {
+ ...this.form,
+ // 纭繚蹇呰瀛楁
+ infoid: this.infoid,
+ caseNo: this.caseNo,
+ // 鏋勫缓 filePatch 瀛楁
+ filePatch: this.buildFilePatch()
+ };
- apiMethod(this.form)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("淇濆瓨鎴愬姛");
- if (!this.form.id) {
- this.form.id = response.data.id;
- this.$router.replace({
- query: { ...this.$route.query, id: this.form.id }
- });
- }
+ let response = null;
+
+ if (submitData.id) {
+ response = await ethicalreviewedit(submitData);
+ } else {
+ response = await ethicalreviewadd(submitData);
+ }
+
+ if (response.code == 200) {
+ this.$message.success("淇濆瓨鎴愬姛");
+ // 淇濆瓨鎴愬姛鍚庢洿鏂板師濮嬫暟鎹�
+ this.saveOriginalData();
+ this.isEdit = false;
+ if (!this.form.id && response.data && response.data.id) {
+ this.form.id = response.data.id;
+ this.$router.replace({
+ query: { ...this.$route.query, id: this.form.id }
+ });
}
- })
- .catch(error => {
- console.error("淇濆瓨澶辫触:", error);
- this.$message.error("淇濆瓨澶辫触");
- })
- .finally(() => {
- this.saveLoading = false;
- });
+ } else {
+ this.$message.error("淇濆瓨澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("淇濆瓨澶辫触:", error);
+ this.$message.error("淇濆瓨澶辫触锛岃閲嶈瘯");
+ } finally {
+ this.saveLoading = false;
+ }
}
});
},
- // 鍙戦�佷笓瀹跺鏌�
- handleSendToExperts() {
- this.sendDialogVisible = true;
- },
-
- // 鍙戦�佺粰涓撳
- handleSendToNormalExperts() {
- const normalExperts = this.expertReviews.filter(
- expert => !expert.isChief && expert.reviewStatus === "applying"
- );
- this.sendForm.expertIds = normalExperts.map(expert => expert.id);
- this.sendForm.expertType = "normal";
- this.sendDialogVisible = true;
- },
-
- // 鍙戦�佺粰涓诲涓撳
- handleSendToChiefExpert() {
- const chiefExpert = this.expertReviews.find(
- expert => expert.isChief && expert.reviewStatus === "applying"
- );
- if (chiefExpert) {
- this.sendForm.expertIds = [chiefExpert.id];
- this.sendForm.expertType = "chief";
- this.sendDialogVisible = true;
- }
- },
-
- // 鎵归噺鍙戦��
- handleBatchSend() {
- const applyingExperts = this.expertReviews.filter(
- expert => expert.reviewStatus === "applying"
- );
- this.sendForm.expertIds = applyingExperts.map(expert => expert.id);
- this.sendForm.expertType = "batch";
- this.sendDialogVisible = true;
- },
-
- // 鍙戦�佺粰鍗曚釜涓撳
- handleSendToExpert(expert) {
- this.sendForm.expertIds = [expert.id];
- this.sendForm.expertType = expert.isChief ? "chief" : "normal";
- this.sendDialogVisible = true;
- },
-
- // 纭鍙戦��
- handleSendConfirm() {
- if (this.sendForm.expertIds.length === 0) {
- this.$message.warning("璇烽�夋嫨瑕佸彂閫佺殑涓撳");
- return;
- }
-
- sendExpertReview({
- ethicsReviewId: this.form.id,
- expertIds: this.sendForm.expertIds,
- content: this.sendForm.content
+ // 瀹℃煡瀹屾垚
+ async handleCompleteReview() {
+ this.$confirm("纭畾瑕佸皢鏈浼︾悊瀹℃煡鐘舵�佽涓哄畬鎴愬悧锛�", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
})
- .then(response => {
- if (response.code === 200) {
- this.$message.success("鍙戦�佹垚鍔�");
- this.sendDialogVisible = false;
- this.getExpertReviews(this.form.id);
- this.sendForm = {
- expertType: "normal",
- expertIds: [],
- content: ""
+ .then(async () => {
+ this.completeLoading = true;
+ try {
+ const updateData = {
+ ...this.form,
+ status: "3", // 瀹℃煡瀹屾垚
+ endTime: new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19)
};
+
+ const response = await ethicalreviewedit(updateData);
+
+ if (response.code == 200) {
+ this.$message.success("瀹℃煡鐘舵�佸凡鏇存柊涓哄畬鎴�");
+ this.form.status = "3";
+ this.form.endTime = updateData.endTime;
+ } else {
+ this.$message.error("鎿嶄綔澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("鏇存柊瀹℃煡鐘舵�佸け璐�:", error);
+ this.$message.error("鏇存柊瀹℃煡鐘舵�佸け璐�");
+ } finally {
+ this.completeLoading = false;
}
})
- .catch(error => {
- console.error("鍙戦�佸け璐�:", error);
- this.$message.error("鍙戦�佸け璐�");
- });
+ .catch(() => {});
+ },
+
+ // 瀹℃煡涓
+ async handleSuspendReview() {
+ this.$confirm(
+ "纭畾瑕佷腑姝㈡湰娆′鸡鐞嗗鏌ュ悧锛熸墍鏈変笓瀹剁殑瀹℃煡鐘舵�佸皢鍙樹负涓銆�",
+ "鎻愮ず",
+ {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }
+ )
+ .then(async () => {
+ this.suspendLoading = true;
+ try {
+ // 鏇存柊鎵�鏈変笓瀹剁殑鎺ユ敹鐘舵�佷负涓
+ if (
+ this.form.ethicalreviewopinionsList &&
+ this.form.ethicalreviewopinionsList.length > 0
+ ) {
+ this.form.ethicalreviewopinionsList.forEach(expert => {
+ expert.receiveStatus = "4"; // 涓鐘舵��
+ expert.updateTime = new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19);
+ });
+ }
+
+ const updateData = {
+ ...this.form,
+ status: "2" // 瀹℃煡涓
+ };
+
+ const response = await ethicalreviewedit(updateData);
+
+ if (response.code == 200) {
+ this.$message.success("瀹℃煡宸蹭腑姝紝鎵�鏈変笓瀹剁姸鎬佸凡鏇存柊");
+ this.form.status = "2";
+ } else {
+ this.$message.error("鎿嶄綔澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("涓瀹℃煡澶辫触:", error);
+ this.$message.error("涓瀹℃煡澶辫触");
+ } finally {
+ this.suspendLoading = false;
+ }
+ })
+ .catch(() => {});
},
// 缁撴潫瀹℃煡
- handleEndReview() {
+ async handleEndReview() {
this.$confirm(
"纭畾瑕佺粨鏉熸湰娆′鸡鐞嗗鏌ュ悧锛熺粨鏉熷悗灏嗘棤娉曚慨鏀逛笓瀹跺鏌ョ粨鏋溿��",
"鎻愮ず",
@@ -983,238 +1649,756 @@
type: "warning"
}
)
- .then(() => {
- endEthicsReview(this.form.id)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("瀹℃煡宸茬粨鏉�");
- this.form.ethicsConclusion = "terminated";
+ .then(async () => {
+ this.endLoading = true;
+ try {
+ const updateData = {
+ ...this.form,
+ status: "4", // 瀹℃煡涓
+ endTime: new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19)
+ };
+
+ const response = await ethicalreviewedit(updateData);
+
+ if (response.code == 200) {
+ this.$message.success("瀹℃煡宸茬粨鏉�");
+ this.form.status = "4";
+ this.form.endTime = updateData.endTime;
+ } else {
+ this.$message.error("鎿嶄綔澶辫触锛�" + (response.msg || "鏈煡閿欒"));
+ }
+ } catch (error) {
+ console.error("缁撴潫瀹℃煡澶辫触:", error);
+ this.$message.error("缁撴潫瀹℃煡澶辫触");
+ } finally {
+ this.endLoading = false;
+ }
+ })
+ .catch(() => {});
+ },
+
+ // 鎵撳紑娣诲姞涓撳瀵硅瘽妗�
+ handleAddExpert() {
+ this.expertDialogVisible = true;
+ this.loadExperts();
+ },
+ /**
+ * 鍒锋柊椤甸潰鏁版嵁
+ */
+ async refreshPageData() {
+ try {
+ // 閲嶇疆鏁版嵁鐘舵��
+ this.isDataLoaded = false;
+
+ // 娓呯┖褰撳墠鏁版嵁
+ this.form = {
+ id: undefined,
+ infoid: undefined,
+ caseNo: "",
+ initiateTheme: "",
+ initiatePerson: "",
+ status: "0",
+ startTime: "",
+ cutOffTime: "",
+ endTime: "",
+ expertName: "",
+ expertNo: "",
+ expertType: "0",
+ expertConclusion: "",
+ expertOpinion: "",
+ expertTime: "",
+ orderNo: 1,
+ remark: "",
+ annexfilesList: [],
+ filePatch: "",
+ ethicalreviewopinionsList: [],
+ createBy: "",
+ createTime: "",
+ updateBy: "",
+ updateTime: "",
+ delFlag: "0"
+ };
+
+ this.attachmentFileList = [];
+ this.originalFormData = null;
+ this.originalExpertList = null;
+ this.originalAttachments = null;
+
+ // 閲嶆柊鑾峰彇鏁版嵁
+ if (this.id) {
+ await this.getDetail(this.infoid, this.id);
+ } else if (this.infoid) {
+ await this.getDetail(this.infoid, null);
+ } else {
+ this.$message.warning("鏃犳硶鍒锋柊锛岀己灏戝繀瑕佺殑鍙傛暟");
+ }
+
+ this.$message.success("鏁版嵁鍒锋柊鎴愬姛");
+ } catch (error) {
+ console.error("鍒锋柊鏁版嵁澶辫触:", error);
+ this.$message.error("鍒锋柊鏁版嵁澶辫触锛岃閲嶈瘯");
+ }
+ },
+
+ /**
+ * 澶勭悊椤甸潰鍒锋柊
+ * 妫�鏌ユ槸鍚︽湁鏈繚瀛樻暟鎹紝纭鍚庡埛鏂伴〉闈�
+ */
+ handleRefresh() {
+ // 妫�鏌ユ槸鍚︽湁鏈繚瀛樼殑缂栬緫
+ if (this.hasUnsavedChanges()) {
+ this.$confirm(
+ "褰撳墠鏈夋湭淇濆瓨鐨勬暟鎹紝鍒锋柊椤甸潰灏嗕涪澶辫繖浜涙洿鏀广�傛槸鍚︾户缁埛鏂帮紵",
+ "璀﹀憡",
+ {
+ confirmButtonText: "缁х画鍒锋柊",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ distinguishCancelAndClose: true,
+ beforeClose: (action, instance, done) => {
+ if (action === "confirm") {
+ instance.confirmButtonLoading = true;
+ instance.confirmButtonText = "鍒锋柊涓�...";
+
+ // 寤惰繜鎵ц浠ョ‘淇漊I鏇存柊
+ setTimeout(() => {
+ done();
+ instance.confirmButtonLoading = false;
+
+ // 鐢ㄦ埛纭鍒锋柊
+ this.refreshPageData();
+ }, 300);
+ } else {
+ this.$message({
+ type: "info",
+ message: "宸插彇娑堝埛鏂�"
+ });
+ done();
}
- })
- .catch(error => {
- console.error("缁撴潫瀹℃煡澶辫触:", error);
- this.$message.error("缁撴潫瀹℃煡澶辫触");
+ }
+ }
+ ).catch(action => {
+ if (action === "cancel") {
+ this.$message({
+ type: "info",
+ message: "宸插彇娑堝埛鏂�"
});
- })
- .catch(() => {});
- },
-
- // 缂栬緫涓撳瀹℃煡
- handleEditExpertReview(expert) {
- this.$prompt("璇疯緭鍏ュ鏌ユ剰瑙�", "缂栬緫涓撳瀹℃煡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- inputValue: expert.expertOpinion || "",
- inputValidator: value => {
- if (!value || value.trim() === "") {
- return "瀹℃煡鎰忚涓嶈兘涓虹┖";
}
- return true;
- }
- })
- .then(({ value }) => {
- // 妯℃嫙鏇存柊涓撳瀹℃煡
- const index = this.expertReviews.findIndex(e => e.id === expert.id);
- if (index !== -1) {
- this.expertReviews[index].expertOpinion = value;
- this.$message.success("瀹℃煡鎰忚宸叉洿鏂�");
- }
- })
- .catch(() => {});
+ });
+ } else {
+ // 娌℃湁鏈繚瀛樼殑缂栬緫锛岀洿鎺ュ埛鏂�
+ this.refreshPageData();
+ }
+ },
+ // 妫�鏌ユ槸鍚︽湁鏈繚瀛樼殑鏁版嵁鍙樺寲
+ hasUnsavedChanges() {
+ if (!this.isDataLoaded) {
+ return false; // 鏁版嵁鏈姞杞斤紝鏃犻渶妫�娴�
+ }
+
+ // 1. 妫�鏌ヨ〃鍗曞瓧娈靛彉鍖�
+ const formFieldsChanged = this.checkFormFieldsChanged();
+
+ // 2. 妫�鏌ヤ笓瀹跺垪琛ㄥ彉鍖�
+ const expertListChanged = this.checkExpertListChanged();
+
+ // 3. 妫�鏌ラ檮浠跺垪琛ㄥ彉鍖�
+ const attachmentsChanged = this.checkAttachmentsChanged();
+
+ return formFieldsChanged || expertListChanged || attachmentsChanged;
},
- // 鏌ョ湅涓撳瀹℃煡璇︽儏
- handleViewExpertReview(expert) {
- this.$alert(
- `
- <div>
- <p><strong>涓撳濮撳悕锛�</strong>${expert.expertName}</p>
- <p><strong>涓撳绫诲瀷锛�</strong>${
- expert.isChief ? "涓诲涓撳" : "涓撳"
- }</p>
- <p><strong>瀹℃煡鐘舵�侊細</strong>${this.statusTextFilter(
- expert.reviewStatus
- )}</p>
- <p><strong>涓撳缁撹锛�</strong>${
- expert.expertConclusion
- ? this.conclusionTextFilter(expert.expertConclusion)
- : "鏈彁浜�"
- }</p>
- <p><strong>瀹℃煡鎰忚锛�</strong>${expert.expertOpinion || "鏃�"}</p>
- <p><strong>瀹℃煡鏃堕棿锛�</strong>${expert.reviewTime || "鏈鏌�"}</p>
- </div>
- `,
- "涓撳瀹℃煡璇︽儏",
- {
- dangerouslyUseHTMLString: true,
- customClass: "expert-review-detail-dialog"
- }
- );
- },
+ // 妫�鏌ヨ〃鍗曞瓧娈垫槸鍚︽湁鍙樺寲
+ checkFormFieldsChanged() {
+ if (!this.originalFormData) return false;
- // 涓婁紶闄勪欢
- handleUploadAttachment() {
- this.uploadDialogVisible = true;
- },
-
- // 涓婁紶鍓嶆牎楠�
- beforeUpload(file) {
- const allowedTypes = [
- "application/pdf",
- "image/jpeg",
- "image/png",
- "application/msword",
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
- "application/vnd.ms-excel",
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+ const formKeys = [
+ "initiateTheme",
+ "initiatePerson",
+ "status",
+ "expertConclusion",
+ "expertOpinion",
+ "expertTime",
+ "remark"
];
- const maxSize = 10 * 1024 * 1024;
+ for (const key of formKeys) {
+ if (this.form[key] !== this.originalFormData[key]) {
+ console.log(
+ `琛ㄥ崟瀛楁鍙樺寲: ${key}`,
+ this.form[key],
+ this.originalFormData[key]
+ );
+ return true;
+ }
+ }
- const isTypeOk =
- allowedTypes.includes(file.type) ||
- file.name.endsWith(".pdf") ||
- file.name.endsWith(".jpg") ||
- file.name.endsWith(".jpeg") ||
- file.name.endsWith(".png") ||
- file.name.endsWith(".doc") ||
- file.name.endsWith(".docx") ||
- file.name.endsWith(".xls") ||
- file.name.endsWith(".xlsx");
+ return false;
+ },
- if (!isTypeOk) {
- this.$message.error("鏂囦欢鏍煎紡涓嶆敮鎸�");
+ // 妫�鏌ヤ笓瀹跺垪琛ㄥ彉鍖�
+ checkExpertListChanged() {
+ if (!this.originalExpertList || !this.form.ethicalreviewopinionsList) {
return false;
}
- if (file.size > maxSize) {
- this.$message.error("鏂囦欢澶у皬涓嶈兘瓒呰繃10MB");
+ const original = this.originalExpertList;
+ const current = this.form.ethicalreviewopinionsList;
+
+ // 1. 妫�鏌ユ暟閲忓彉鍖�
+ if (original.length !== current.length) {
+ console.log("涓撳鏁伴噺鍙樺寲:", original.length, "->", current.length);
+ return true;
+ }
+
+ // 2. 妫�鏌ユ瘡涓笓瀹剁殑鍙樺寲
+ for (let i = 0; i < original.length; i++) {
+ const origExpert = original[i];
+ const currExpert = current[i];
+
+ // 妫�鏌ュ叧閿瓧娈靛彉鍖�
+ const fieldsToCheck = [
+ "expertconclusion",
+ "expertopinion",
+ "receiveStatus",
+ "conclusiontime",
+ "startTime",
+ "endTime",
+ "sendType"
+ ];
+
+ for (const field of fieldsToCheck) {
+ if (origExpert[field] !== currExpert[field]) {
+ console.log(
+ `涓撳${i}鐨�${field}瀛楁鍙樺寲:`,
+ origExpert[field],
+ "->",
+ currExpert[field]
+ );
+ return true;
+ }
+ }
+ }
+
+ return false;
+ },
+
+ // 妫�鏌ラ檮浠跺垪琛ㄥ彉鍖�
+ checkAttachmentsChanged() {
+ if (!this.originalAttachments || !this.form.annexfilesList) {
return false;
}
- return true;
+ const original = this.originalAttachments;
+ const current = this.form.annexfilesList;
+
+ // 妫�鏌ユ暟閲忓彉鍖�
+ if (original.length !== current.length) {
+ console.log("闄勪欢鏁伴噺鍙樺寲:", original.length, "->", current.length);
+ return true;
+ }
+
+ // 妫�鏌ユ枃浠跺悕鍙樺寲锛堥�氬父闄勪欢涓嶄細淇敼锛屽彧澧炲垹锛�
+ const originalFileNames = original.map(f => f.fileName || f.name).sort();
+ const currentFileNames = current.map(f => f.fileName || f.name).sort();
+
+ for (let i = 0; i < originalFileNames.length; i++) {
+ if (originalFileNames[i] !== currentFileNames[i]) {
+ console.log(
+ "闄勪欢鏂囦欢鍚嶅彉鍖�:",
+ originalFileNames[i],
+ "->",
+ currentFileNames[i]
+ );
+ return true;
+ }
+ }
+
+ return false;
},
- // 鏂囦欢閫夋嫨鍙樺寲
- handleFileChange(file, fileList) {
- this.tempFileList = fileList;
+ // 娴忚鍣ㄧ寮�椤甸潰妫�娴�
+ beforeUnloadHandler(event) {
+ if (this.hasUnsavedChanges()) {
+ const message = "鎮ㄦ湁鏈繚瀛樼殑鏇存敼锛岀‘瀹氳绂诲紑鍚楋紵";
+ event.returnValue = message; // 鏍囧噯鏂瑰紡
+ return message; // 鏌愪簺娴忚鍣ㄩ渶瑕佽繑鍥炲瓧绗︿覆
+ }
+ },
+ // 鍔犺浇涓撳鍒楄〃
+ async loadExperts() {
+ try {
+ this.expertListLoading = true;
+ const params = {
+ usertype: "ethical", // 浼︾悊涓撳
+ pageNum: this.expertPage.pageNum,
+ pageSize: this.expertPage.pageSize
+ };
+
+ if (this.expertSearchQuery) {
+ params.username = this.expertSearchQuery;
+ }
+
+ const response = await listExternalperson(params);
+ if (response.code == 200) {
+ this.expertList = response.rows || [];
+ this.expertTotal = response.total || 0;
+ } else {
+ this.$message.error(
+ "鍔犺浇涓撳鍒楄〃澶辫触锛�" + (response.msg || "鏈煡閿欒")
+ );
+ }
+ } catch (error) {
+ console.error("鍔犺浇涓撳鍒楄〃澶辫触:", error);
+ this.$message.error("鍔犺浇涓撳鍒楄〃澶辫触");
+ } finally {
+ this.expertListLoading = false;
+ }
},
- // 鎻愪氦涓婁紶
- submitUpload() {
- if (this.tempFileList.length === 0) {
- this.$message.warning("璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢");
+ // 鎼滅储涓撳
+ handleSearchExperts() {
+ this.expertPage.pageNum = 1;
+ this.loadExperts();
+ },
+
+ // 閲嶇疆鎼滅储
+ handleResetSearch() {
+ this.expertSearchQuery = "";
+ this.filterExpertType = "";
+ this.expertPage.pageNum = 1;
+ this.loadExperts();
+ },
+
+ // 涓撳閫夋嫨鍙樺寲
+ handleExpertSelectionChange(selection) {
+ this.selectedExperts = selection;
+ },
+
+ // 纭娣诲姞涓撳
+ handleConfirmAddExpert() {
+ if (this.selectedExperts.length == 0) {
+ this.$message.warning("璇烽�夋嫨瑕佹坊鍔犵殑涓撳");
return;
}
- this.uploadLoading = true;
+ // 纭繚ethicalreviewopinionsList瀛樺湪
+ if (!this.form.ethicalreviewopinionsList) {
+ this.$set(this.form, "ethicalreviewopinionsList", []);
+ }
- const uploadPromises = this.tempFileList.map(file => {
- const formData = new FormData();
- formData.append("file", file.raw);
- formData.append("ethicsReviewId", this.form.id);
+ // 娣诲姞涓撳鍒板垪琛�
+ this.selectedExperts.forEach(expert => {
+ // 鍒ゆ柇鏄惁涓轰富浠诲鍛�
+ const isChief = this.getIsChiefExpert(expert);
- return uploadAttachment(formData);
+ const expertReview = {
+ id: undefined,
+ infoid: this.infoid,
+ nitiateId: this.form.id || undefined,
+ caseNo: this.form.caseNo,
+ expertname: expert.username,
+ expertNo: expert.userno,
+ expertType: isChief ? "1" : "0", // 涓讳换濮斿憳璁剧疆涓轰富濮斾笓瀹�
+ deptName: expert.unitname || "",
+ title: expert.title || "",
+ donorno: expert.telephone || "",
+ receiveStatus: "0", // 寰呮帴鏀�
+ expertconclusion: "",
+ expertopinion: "",
+ conclusionannex: "",
+ conclusionorder: this.form.ethicalreviewopinionsList.length + 1,
+ conclusiontime: "",
+ startTime: "",
+ endTime: "",
+ sendType: "",
+ createBy: this.currentUser.username || "admin",
+ createTime: new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19),
+ updateBy: this.currentUser.username || "admin",
+ updateTime: new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19),
+ delFlag: "0"
+ };
+
+ // 浣跨敤push娣诲姞锛岀‘淇濆搷搴斿紡
+ this.form.ethicalreviewopinionsList.push(expertReview);
});
- Promise.all(uploadPromises)
- .then(responses => {
- this.$message.success("鏂囦欢涓婁紶鎴愬姛");
- this.uploadDialogVisible = false;
- this.tempFileList = [];
- this.getAttachments(this.form.id);
- })
- .catch(error => {
- console.error("涓婁紶澶辫触:", error);
- this.$message.error("鏂囦欢涓婁紶澶辫触");
- })
- .finally(() => {
- this.uploadLoading = false;
- });
+ this.$message.success(`鎴愬姛娣诲姞 ${this.selectedExperts.length} 浣嶄笓瀹禶);
+ this.expertDialogVisible = false;
+ this.selectedExperts = [];
},
- // 棰勮闄勪欢
- handlePreviewAttachment(attachment) {
- if (attachment.fileName.endsWith(".pdf")) {
- window.open(attachment.fileUrl, "_blank");
- } else if (attachment.fileName.match(/\.(jpg|jpeg|png)$/i)) {
- this.$alert(
- `<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`,
- "鍥剧墖棰勮",
- {
- dangerouslyUseHTMLString: true,
- customClass: "image-preview-dialog"
+ // 娣诲姞涓撳瀵硅瘽妗嗗叧闂�
+ handleExpertDialogClose() {
+ this.selectedExperts = [];
+ this.expertSearchQuery = "";
+ this.filterExpertType = "";
+ this.expertPage.pageNum = 1;
+ },
+
+ // 椤电爜鍙樺寲
+ handlePageChange(pageNum) {
+ this.expertPage.pageNum = pageNum;
+ this.loadExperts();
+ },
+
+ // 姣忛〉鏉℃暟鍙樺寲
+ handlePageSizeChange(pageSize) {
+ this.expertPage.pageSize = pageSize;
+ this.expertPage.pageNum = 1;
+ this.loadExperts();
+ },
+
+ // 鍙戦�佺粰鏅�氫笓瀹�
+ handleSendToNormalExperts() {
+ this.currentSendExperts = this.availableNormalExperts;
+ this.sendForm.expertType = "normal";
+ this.sendForm.endTime = ""; // 閲嶇疆鎴鏃堕棿
+ this.sendDialogVisible = true;
+ },
+
+ // 鍙戦�佺粰涓诲涓撳
+ handleSendToChiefExpert() {
+ this.currentSendExperts = this.availableChiefExperts;
+ this.sendForm.expertType = "chief";
+ this.sendForm.endTime = ""; // 涓诲涓撳鏃犻渶鎴鏃堕棿
+ this.sendDialogVisible = true;
+ },
+
+ // 鍙戦�佺粰鍗曚釜涓撳
+ handleSendToExpert(expert) {
+ this.currentSendExperts = [expert];
+ this.sendForm.expertType = expert.expertType == "1" ? "chief" : "normal";
+ this.sendForm.endTime = expert.expertType == "1" ? "" : ""; // 涓诲涓撳鏃犻渶鎴鏃堕棿
+ this.sendDialogVisible = true;
+ },
+
+ // 鍙戦�佸璇濇鍏抽棴
+ handleSendDialogClose() {
+ this.sendForm = {
+ expertType: "normal",
+ expertIds: [],
+ startTime: "",
+ endTime: "",
+ sendType: "0",
+ title: "浼︾悊瀹℃煡浠诲姟閫氱煡",
+ content: "",
+ url: ""
+ };
+ this.currentSendExperts = [];
+ },
+
+ // 纭鍙戦��
+ async handleSendConfirm() {
+ if (!this.sendForm.startTime) {
+ this.$message.warning("璇烽�夋嫨鍙戦�佹椂闂�");
+ return;
+ }
+
+ // 鏅�氫笓瀹堕渶瑕佹埅姝㈡椂闂达紝涓诲涓撳涓嶉渶瑕�
+ if (this.sendForm.expertType !== "chief" && !this.sendForm.endTime) {
+ this.$message.warning("璇烽�夋嫨鎴鏃堕棿");
+ return;
+ }
+
+ if (!this.sendForm.sendType) {
+ this.$message.warning("璇烽�夋嫨鍙戦�佹柟寮�");
+ return;
+ }
+
+ if (!this.sendForm.title) {
+ this.$message.warning("璇疯緭鍏ュ彂閫佹爣棰�");
+ return;
+ }
+
+ if (!this.sendForm.content) {
+ this.$message.warning("璇疯緭鍏ュ彂閫佸唴瀹�");
+ return;
+ }
+
+ if (this.currentSendExperts.length == 0) {
+ this.$message.warning("娌℃湁鎵惧埌鍙彂閫佺殑涓撳");
+ return;
+ }
+
+ // 鍒濆鍖栧彂閫佺姸鎬�
+ this.sendingAll = true;
+ this.sendingProgress = 0;
+ this.sendingTotal = this.currentSendExperts.length;
+ this.sendingSuccessCount = 0;
+ this.sendingFailCount = 0;
+ this.sendingResults = [];
+
+ // 鍒涘缓涓�涓繘搴﹀璇濇
+ const progressDialog = this.$message({
+ type: "info",
+ message: `姝e湪鍙戦�侀�氱煡锛岃绋嶅��... (0/${this.sendingTotal})`,
+ duration: 0, // 涓嶄細鑷姩鍏抽棴
+ showClose: true
+ });
+
+ try {
+ // 浣跨敤Promise鏁扮粍鏉ラ『搴忔墽琛屽彂閫�
+ for (let i = 0; i < this.currentSendExperts.length; i++) {
+ const expert = this.currentSendExperts[i];
+
+ // 鏇存柊杩涘害
+ this.sendingProgress = i;
+ progressDialog.message = `姝e湪鍙戦�侀�氱煡锛岃绋嶅��... (${i}/${this.sendingTotal})`;
+
+ try {
+ // 鍙戦�佸崟涓笓瀹堕�氱煡
+ const result = await this.sendSingleExpert(expert, i);
+ this.sendingResults.push(result);
+
+ if (result.success) {
+ this.sendingSuccessCount++;
+
+ // 鏇存柊涓撳鐘舵��
+ const index = this.form.ethicalreviewopinionsList.findIndex(
+ e =>
+ e.expertNo == expert.expertNo ||
+ e.expertname == expert.expertname
+ );
+
+ if (index != -1) {
+ this.form.ethicalreviewopinionsList[index].receiveStatus = "1"; // 宸叉帴鏀�
+ this.form.ethicalreviewopinionsList[
+ index
+ ].startTime = this.sendForm.startTime;
+ this.form.ethicalreviewopinionsList[
+ index
+ ].endTime = this.sendForm.endTime;
+ this.form.ethicalreviewopinionsList[
+ index
+ ].sendType = this.sendForm.sendType;
+ this.form.ethicalreviewopinionsList[
+ index
+ ].updateTime = new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19);
+
+ // 浣跨敤Vue.set纭繚鍝嶅簲寮忔洿鏂�
+ this.$set(
+ this.form.ethicalreviewopinionsList,
+ index,
+ this.form.ethicalreviewopinionsList[index]
+ );
+ }
+ } else {
+ this.sendingFailCount++;
+ }
+ } catch (error) {
+ console.error(`鍙戦�佺粰涓撳 ${expert.expertname} 澶辫触:`, error);
+ this.sendingResults.push({
+ success: false,
+ expert: expert.expertname,
+ error: error.message
+ });
+ this.sendingFailCount++;
}
- );
- } else {
- this.$message.info("璇ユ枃浠剁被鍨嬫殏涓嶆敮鎸佸湪绾块瑙堬紝璇蜂笅杞藉悗鏌ョ湅");
+
+ // 濡傛灉涓嶆槸鏈�鍚庝竴涓紝绛夊緟100ms鍐嶅彂閫佷笅涓�涓�
+ if (i < this.currentSendExperts.length - 1) {
+ await this.sleep(100);
+ }
+ }
+
+ // 瀹屾垚杩涘害
+ this.sendingProgress = this.sendingTotal;
+ progressDialog.message = `鍙戦�佸畬鎴愶紝鎴愬姛 ${this.sendingSuccessCount} 涓紝澶辫触 ${this.sendingFailCount} 涓猔;
+
+ // 寤惰繜1绉掑悗鍏抽棴杩涘害瀵硅瘽妗�
+ await this.sleep(1000);
+ progressDialog.close();
+
+ // 鏄剧ず鏈�缁堢粨鏋�
+ if (this.sendingFailCount == 0) {
+ this.$message.success(
+ `鎴愬姛鍙戦�佺粰 ${this.sendingSuccessCount} 浣嶄笓瀹禶
+ );
+ } else if (this.sendingSuccessCount > 0) {
+ this.$message.warning(
+ `鎴愬姛鍙戦�佺粰 ${this.sendingSuccessCount} 浣嶄笓瀹讹紝澶辫触 ${this.sendingFailCount} 浣峘
+ );
+ // 濡傛灉鏈夊け璐ワ紝鍙互鏄剧ず璇︾粏澶辫触淇℃伅
+ this.showFailedDetails();
+ } else {
+ this.$message.error("鍏ㄩ儴鍙戦�佸け璐ワ紝璇风◢鍚庨噸璇�");
+ }
+
+ // 鍏抽棴鍙戦�佸璇濇
+ this.sendDialogVisible = false;
+ this.sendForm = {
+ expertType: "normal",
+ expertIds: [],
+ startTime: "",
+ endTime: "",
+ sendType: "0",
+ title: "浼︾悊瀹℃煡浠诲姟閫氱煡",
+ content: "",
+ url: ""
+ };
+ this.currentSendExperts = [];
+ // 淇濆瓨鏁翠釜鍗曟嵁
+ this.handleSave();
+ } catch (error) {
+ console.error("鍙戦�佽繃绋嬩腑鍙戠敓閿欒:", error);
+ progressDialog.close();
+ this.$message.error("鍙戦�佽繃绋嬩腑鍙戠敓閿欒锛岃閲嶈瘯");
+ } finally {
+ this.sendingAll = false;
+ }
+ },
+ // 鍙戦�佸崟涓笓瀹剁殑鏂规硶
+ async sendSingleExpert(expert, index) {
+ try {
+ // 鏋勫缓鍙戦�佹暟鎹�
+ const sendData = {
+ number: expert.deptname || "", // 鐢ㄦ埛鎵嬫満鍙�
+ title: this.sendForm.title,
+ url: this.sendForm.url || "",
+ createTime: new Date()
+ .toISOString()
+ .replace("T", " ")
+ .substring(0, 19)
+ };
+
+ console.log(`姝e湪鍙戦�佺 ${index + 1} 涓笓瀹�: ${expert.expertname}`);
+
+ // 璋冪敤鍙戦�侀�氱煡鎺ュ彛
+ // const response = await sendNotification(sendData);
+ const response = await sendcall({
+ tel: expert.donorno ? expert.donorno : 13634195431, // 杩欓噷搴旇鏄� expert.deptname 鎴� expert.phone
+ messageContent:
+ "闈掑矝澶у闄勫睘鍖婚櫌涓婃姤娼滃湪鎹愮尞妗堜緥锛岃鐧诲綍OPO绯荤粺鏌ョ湅璇︾粏淇℃伅锛屽強鏃惰繘琛屽鎺ャ�傜櫥褰曢摼鎺�:https://brdeddd.qduhosos.cn/dklejdj/deljf/index"
+ });
+
+ if (response.code == 200) {
+ return {
+ success: true,
+ expert: expert.expertname,
+ index: index
+ };
+ } else {
+ return {
+ success: false,
+ expert: expert.expertname,
+ index: index,
+ error: response.msg
+ };
+ }
+ } catch (error) {
+ console.error(`鍙戦�佺粰涓撳 ${expert.expertname} 澶辫触:`, error);
+ return {
+ success: false,
+ expert: expert.expertname,
+ index: index,
+ error: error.message
+ };
}
},
- // 涓嬭浇闄勪欢
- handleDownloadAttachment(attachment) {
- const link = document.createElement("a");
- link.href = attachment.fileUrl;
- link.download = attachment.fileName;
- link.click();
- this.$message.success(`寮�濮嬩笅杞�: ${attachment.fileName}`);
+ // 鏄剧ず澶辫触璇︽儏鐨勬柟娉�
+ showFailedDetails() {
+ const failedExperts = this.sendingResults.filter(r => !r.success);
+ if (failedExperts.length > 0) {
+ this.$confirm(
+ `鏈� ${failedExperts.length} 浣嶄笓瀹跺彂閫佸け璐ワ紝鏄惁鏌ョ湅澶辫触璇︽儏锛焋,
+ "鍙戦�佺粨鏋�",
+ {
+ confirmButtonText: "鏌ョ湅璇︽儏",
+ cancelButtonText: "鍏抽棴",
+ type: "warning"
+ }
+ )
+ .then(() => {
+ let detailMessage = "鍙戦�佸け璐ョ殑涓撳锛歕n\n";
+ failedExperts.forEach((expert, index) => {
+ detailMessage += `${index + 1}. ${expert.expert}: ${
+ expert.error
+ }\n`;
+ });
+
+ this.$alert(detailMessage, "鍙戦�佸け璐ヨ鎯�", {
+ confirmButtonText: "纭畾",
+ customClass: "failed-details-dialog"
+ });
+ })
+ .catch(() => {});
+ }
},
- // 鍒犻櫎闄勪欢
- handleRemoveAttachment(attachment) {
- this.$confirm("纭畾瑕佸垹闄よ繖涓檮浠跺悧锛�", "鎻愮ず", {
+ // 鐫$湢鍑芥暟锛岀敤浜庨棿闅�
+ sleep(ms) {
+ return new Promise(resolve => setTimeout(resolve, ms));
+ },
+ // 鍒犻櫎涓撳瀹℃煡
+ handleDeleteExpertReview(expert, index) {
+ this.$confirm("纭畾瑕佸垹闄よ涓撳鐨勫鏌ヨ褰曞悧锛�", "鎻愮ず", {
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
type: "warning"
})
.then(() => {
- deleteAttachment(attachment.id)
- .then(response => {
- if (response.code === 200) {
- this.$message.success("闄勪欢鍒犻櫎鎴愬姛");
- this.getAttachments(this.form.id);
- }
- })
- .catch(error => {
- console.error("鍒犻櫎闄勪欢澶辫触:", error);
- this.$message.error("鍒犻櫎闄勪欢澶辫触");
- });
+ // 浠庢暟缁勪腑鍒犻櫎涓撳
+ this.form.ethicalreviewopinionsList.splice(index, 1);
+ this.$message.success("涓撳瀹℃煡璁板綍宸插垹闄�");
})
.catch(() => {});
},
- // 鑾峰彇鏂囦欢绫诲瀷
- getFileType(fileName) {
- const ext = fileName
- .split(".")
- .pop()
- .toLowerCase();
- const typeMap = {
- pdf: "PDF",
- doc: "DOC",
- docx: "DOCX",
- xls: "XLS",
- xlsx: "XLSX",
- jpg: "JPG",
- jpeg: "JPEG",
- png: "PNG"
- };
- return typeMap[ext] || ext.toUpperCase();
- },
+ // 鏌ョ湅涓撳鍘嗗彶瀹℃壒鎯呭喌
+ async handleViewExpertHistory(expert) {
+ if (!expert.expertNo) {
+ this.$message.warning("璇ヤ笓瀹舵病鏈夌紪鍙凤紝鏃犳硶鏌ヨ鍘嗗彶瀹℃壒鎯呭喌");
+ return;
+ }
- // 鏂囦欢澶у皬鏍煎紡鍖�
- formatFileSize(size) {
- if (size === 0) return "0 B";
- const k = 1024;
- const sizes = ["B", "KB", "MB", "GB"];
- const i = Math.floor(Math.log(size) / Math.log(k));
- return parseFloat((size / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
+ this.currentExpertInfo = expert;
+ this.expertHistoryLoading = true;
+ this.expertHistoryDialogVisible = true;
+
+ try {
+ const params = {
+ expertNo: expert.expertNo
+ };
+
+ const response = await ethicalreExpertTotal(params);
+
+ if (response && response.code == 200) {
+ this.expertHistoryData = response.data || response[0] || null;
+ } else {
+ this.$message.error(
+ "鏌ヨ涓撳鍘嗗彶瀹℃壒鎯呭喌澶辫触锛�" + (response?.msg || "鏈煡閿欒")
+ );
+ this.expertHistoryData = null;
+ }
+ } catch (error) {
+ console.error("鏌ヨ涓撳鍘嗗彶瀹℃壒鎯呭喌澶辫触:", error);
+ this.$message.error("鏌ヨ涓撳鍘嗗彶瀹℃壒鎯呭喌澶辫触");
+ this.expertHistoryData = null;
+ } finally {
+ this.expertHistoryLoading = false;
+ }
},
// 鏃堕棿鏍煎紡鍖�
parseTime(time) {
if (!time) return "";
const date = new Date(time);
+ if (isNaN(date.getTime())) return time;
+
return `${date.getFullYear()}-${(date.getMonth() + 1)
.toString()
.padStart(2, "0")}-${date
@@ -1231,6 +2415,7 @@
}
};
</script>
+
<style scoped>
.ethics-review-detail {
padding: 20px;
@@ -1286,22 +2471,6 @@
font-weight: bold;
}
-.upload-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 15px;
- padding: 10px;
- background-color: #f8f9fa;
- border-radius: 4px;
-}
-
-.upload-title {
- font-size: 14px;
- font-weight: 600;
- color: #303133;
-}
-
.file-info {
display: flex;
align-items: center;
@@ -1313,133 +2482,6 @@
color: #909399;
}
-/* 琛ㄥ崟鏍峰紡浼樺寲 */
-:deep(.el-form-item__label) {
- font-weight: 500;
-}
-
-:deep(.el-input__inner) {
- border-radius: 4px;
-}
-
-:deep(.el-textarea__inner) {
- border-radius: 4px;
- resize: vertical;
-}
-
-/* 琛ㄦ牸鏍峰紡浼樺寲 */
-:deep(.el-table) {
- border-radius: 8px;
- overflow: hidden;
-}
-
-:deep(.el-table th) {
- background-color: #f5f7fa;
- color: #606266;
- font-weight: 500;
-}
-
-:deep(.el-table .cell) {
- padding: 8px 12px;
-}
-
-/* 鎸夐挳鏍峰紡浼樺寲 */
-:deep(.el-button--primary) {
- background: linear-gradient(135deg, #409eff 0%, #3375e0 100%);
- border: none;
- border-radius: 4px;
-}
-
-:deep(.el-button--success) {
- background: linear-gradient(135deg, #67c23a 0%, #529b2f 100%);
- border: none;
- border-radius: 4px;
-}
-
-:deep(.el-button--warning) {
- background: linear-gradient(135deg, #e6a23c 0%, #d18c2a 100%);
- border: none;
- border-radius: 4px;
-}
-
-:deep(.el-button--danger) {
- background: linear-gradient(135deg, #f56c6c 0%, #e05b5b 100%);
- border: none;
- border-radius: 4px;
-}
-
-/* 鏍囩鏍峰紡 */
-:deep(.el-tag) {
- border-radius: 12px;
- border: none;
- font-weight: 500;
-}
-
-/* 瀵硅瘽妗嗘牱寮忎紭鍖� */
-:deep(.el-dialog) {
- border-radius: 8px;
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
-}
-
-:deep(.el-dialog__header) {
- background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ed 100%);
- border-bottom: 1px solid #e4e7ed;
- padding: 15px 20px;
-}
-
-:deep(.el-dialog__title) {
- font-weight: 600;
- color: #303133;
-}
-
-/* 涓婁紶缁勪欢鏍峰紡 */
-:deep(.el-upload-dragger) {
- border: 2px dashed #dcdfe6;
- border-radius: 6px;
- background-color: #fafafa;
- transition: all 0.3s ease;
-}
-
-:deep(.el-upload-dragger:hover) {
- border-color: #409eff;
- background-color: #f0f7ff;
-}
-
-/* 鍝嶅簲寮忚璁� */
-@media (max-width: 768px) {
- .ethics-review-detail {
- padding: 10px;
- }
-
- .expert-stats .el-col {
- margin-bottom: 10px;
- }
-
- .upload-header {
- flex-direction: column;
- align-items: flex-start;
- gap: 10px;
- }
-}
-
-/* 鍔ㄧ敾鏁堟灉 */
-.fade-enter-active,
-.fade-leave-active {
- transition: opacity 0.3s ease;
-}
-
-.fade-enter,
-.fade-leave-to {
- opacity: 0;
-}
-
-/* 鍔犺浇鐘舵�� */
-.loading-container {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 200px;
-}
/* 涓撳绫诲瀷鏍峰紡 */
.normal-expert {
color: #409eff;
@@ -1485,49 +2527,179 @@
color: #67c23a !important;
}
-/* 琛ㄦ牸琛屾偓鍋滄晥鏋� */
-:deep(.el-table__row:hover) {
- transform: translateY(-1px);
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
- transition: all 0.3s ease;
-}
-/* 鑷畾涔夋粴鍔ㄦ潯 */
-:deep(::-webkit-scrollbar) {
- width: 6px;
- height: 6px;
+/* 涓撳濮撳悕閾炬帴鏍峰紡 */
+.expert-name-link {
+ color: #409eff;
+ cursor: pointer;
+ text-decoration: none;
+ transition: color 0.3s;
}
-:deep(::-webkit-scrollbar-track) {
- background: #f1f1f1;
- border-radius: 3px;
+.expert-name-link:hover {
+ color: #66b1ff;
+ text-decoration: underline;
}
-:deep(::-webkit-scrollbar-thumb) {
- background: #c1c1c1;
- border-radius: 3px;
+/* 鍘嗗彶缁熻鏍峰紡 */
+.history-stat-item {
+ padding: 10px;
+ border-radius: 4px;
+ background-color: #f5f7fa;
+ text-align: center;
}
-:deep(::-webkit-scrollbar-thumb:hover) {
- background: #a8a8a8;
+.history-stat-label {
+ font-size: 12px;
+ color: #909399;
+ margin-bottom: 5px;
}
-/* 涓撳瀹℃煡琛ㄦ牸鐗规畩鏍峰紡 */
-.expert-table-special :deep(.el-table__row) {
- transition: all 0.3s ease;
+.history-stat-value {
+ font-size: 18px;
+ font-weight: bold;
+ color: #303133;
}
-.expert-table-special :deep(.el-table__row:hover) {
- background-color: #f0f7ff;
- transform: translateY(-1px);
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+.form-section {
+ margin-bottom: 16px;
}
-/* 涓诲涓撳琛岄珮浜� */
-:deep(.chief-expert-row) {
- background-color: #fff7e6 !important;
+.section-header {
+ display: flex;
+ align-items: center;
+ font-weight: bold;
+ color: #303133;
}
-:deep(.chief-expert-row:hover) {
- background-color: #ffecc2 !important;
+.dialog-footer {
+ text-align: right;
+ padding: 20px 0 0;
+}
+
+.attachment-section {
+ margin-bottom: 16px;
+}
+
+.attachment-header {
+ display: flex;
+ align-items: center;
+ margin-bottom: 16px;
+ padding: 8px 0;
+ border-bottom: 1px solid #ebeef5;
+}
+
+.attachment-title {
+ font-weight: bold;
+ margin: 0 8px;
+}
+
+.attachment-tip {
+ font-size: 12px;
+ color: #909399;
+}
+
+.attachment-list {
+ margin-top: 16px;
+}
+
+.list-title {
+ font-weight: bold;
+ margin-bottom: 12px;
+ color: #303133;
+}
+
+.file-name {
+ font-size: 13px;
+}
+
+/* 妗堜緥淇℃伅灞曠ず鏍峰紡 */
+.selected-case-info {
+ margin-bottom: 20px;
+}
+/* 鍙戦�佽繘搴︽牱寮� */
+.send-progress-container {
+ margin: 20px 0;
+ padding: 20px;
+ background: #f5f7fa;
+ border-radius: 8px;
+}
+
+.send-stats {
+ display: flex;
+ justify-content: center;
+ gap: 30px;
+ margin-top: 10px;
+}
+
+.stat-item {
+ font-size: 14px;
+ font-weight: 500;
+ padding: 4px 12px;
+ border-radius: 4px;
+}
+
+.stat-item.success {
+ color: #67c23a;
+ background: #f0f9eb;
+}
+
+.stat-item.fail {
+ color: #f56c6c;
+ background: #fef0f0;
+}
+
+/* 澶辫触璇︽儏瀵硅瘽妗� */
+.failed-details-dialog {
+ min-width: 400px;
+ max-width: 600px;
+}
+
+.failed-details-dialog .el-message-box__content {
+ max-height: 400px;
+ overflow-y: auto;
+ white-space: pre-wrap;
+ word-break: break-word;
+}
+.case-info-card {
+ border-left: 4px solid #67c23a;
+}
+/* 鍦–SS涓坊鍔� */
+:deep(.el-message-box) {
+ max-width: 500px;
+}
+
+/* 娣诲姞鏈繚瀛樼姸鎬佹牱寮� */
+.unsaved-hint {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ background: #e6a23c;
+ color: white;
+ padding: 4px 8px;
+ border-radius: 4px;
+ font-size: 12px;
+ animation: pulse 2s infinite;
+}
+
+@keyframes pulse {
+ 0% {
+ opacity: 0.8;
+ }
+ 50% {
+ opacity: 1;
+ }
+ 100% {
+ opacity: 0.8;
+ }
+}
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .ethics-review-detail {
+ padding: 10px;
+ }
+
+ .expert-stats .el-col {
+ margin-bottom: 10px;
+ }
}
</style>
--
Gitblit v1.9.3