From 996206735df06887e3f3e453797b1289a2a793e7 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期六, 25 四月 2026 10:21:31 +0800
Subject: [PATCH] 青岛维护
---
src/views/business/ethicalReview/ethicalReviewInfo.vue | 717 +++++++++++++++++++++++++++++++++--------------------------
1 files changed, 398 insertions(+), 319 deletions(-)
diff --git a/src/views/business/ethicalReview/ethicalReviewInfo.vue b/src/views/business/ethicalReview/ethicalReviewInfo.vue
index ca2a9c2..9e76ff2 100644
--- a/src/views/business/ethicalReview/ethicalReviewInfo.vue
+++ b/src/views/business/ethicalReview/ethicalReviewInfo.vue
@@ -28,29 +28,26 @@
<el-input
v-model="form.initiateTheme"
placeholder="璇疯緭鍏ュ彂璧蜂富棰�"
-
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="鍙戣捣浜�" prop="initiatePerson">
- <el-input v-model="form.initiatePerson" />
+ <el-input v-model="form.initiatePerson" />
</el-form-item>
</el-col>
-
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="瀹℃煡鐘舵��" prop="status">
- <el-select
- v-model="form.status"
- style="width: 100%"
-
- >
- <el-option label="鏂板缓" value="0" />
- <el-option label="瀹℃煡涓�" value="1" />
- <el-option label="缁撴潫" value="2" />
+ <el-select v-model="form.status" style="width: 100%">
+ <el-option
+ v-for="dict in dict.type.sys_ethical"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
</el-select>
</el-form-item>
</el-col>
@@ -61,7 +58,6 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
-
/>
</el-form-item>
</el-col>
@@ -72,7 +68,6 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
-
>
</el-date-picker>
</el-form-item>
@@ -83,21 +78,17 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="涓撳濮撳悕" prop="expertName">
- <el-input v-model="form.expertName" />
+ <el-input v-model="form.expertName" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="涓撳缂栧彿" prop="expertNo">
- <el-input v-model="form.expertNo" />
+ <el-input v-model="form.expertNo" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="涓撳绫诲瀷" prop="expertType">
- <el-select
- v-model="form.expertType"
- style="width: 100%"
-
- >
+ <el-select v-model="form.expertType" style="width: 100%">
<el-option label="鏅�氫笓瀹�" value="normal" />
<el-option label="涓诲涓撳" value="chief" />
</el-select>
@@ -108,12 +99,9 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="涓撳缁撹" prop="expertConclusion">
- <el-select
- v-model="form.expertConclusion"
- style="width: 100%"
-
- >
+ <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>
@@ -125,7 +113,6 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%"
-
/>
</el-form-item>
</el-col>
@@ -136,7 +123,6 @@
:min="1"
:max="20"
style="width: 100%"
-
/>
</el-form-item>
</el-col>
@@ -150,7 +136,6 @@
:rows="2"
v-model="form.expertOpinion"
placeholder="璇疯緭鍏ヤ笓瀹舵剰瑙�"
-
/>
</el-form-item>
</el-col>
@@ -164,12 +149,10 @@
:rows="3"
v-model="form.remark"
placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�"
-
/>
</el-form-item>
</el-col>
</el-row>
-
</el-form>
</el-card>
@@ -177,67 +160,90 @@
<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 type="primary" size="mini" @click="openUploadDialog">
涓婁紶闄勪欢
- </el-button>
+ </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>
<!-- 涓撳瀹℃煡鎯呭喌 -->
@@ -472,45 +478,13 @@
</div>
</el-dialog>
- <!-- 涓婁紶闄勪欢瀵硅瘽妗� -->
- <el-dialog
- title="涓婁紶闄勪欢"
- :visible.sync="uploadDialogVisible"
- width="500px"
- :close-on-click-modal="false"
- >
- <el-upload
- ref="uploadRef"
- class="upload-demo"
- drag
- :action="uploadAction"
- :headers="headers"
- multiple
- :file-list="tempFileList"
- :before-upload="beforeUpload"
- :on-change="handleFileChange"
- :on-remove="handleTempRemove"
- :on-success="handleUploadSuccess"
- :auto-upload="false"
- >
- <i class="el-icon-upload"></i>
- <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
- <div class="el-upload__tip" slot="tip">
- 鏀寔涓婁紶pdf銆乯pg銆乸ng銆乨oc銆乨ocx銆亁ls銆亁lsx鏍煎紡鏂囦欢锛屽崟涓枃浠朵笉瓒呰繃10MB
- </div>
- </el-upload>
- <div slot="footer" class="dialog-footer">
- <el-button @click="uploadDialogVisible = false">鍙栨秷</el-button>
- <el-button
- type="primary"
- @click="submitUpload"
- :loading="uploadLoading"
- :disabled="tempFileList.length === 0"
- >
- 纭涓婁紶
- </el-button>
- </div>
- </el-dialog>
+ <!-- 鏂囦欢棰勮寮圭獥 -->
+ <FilePreviewDialog
+ :visible="previewVisible"
+ :file="currentPreviewFile"
+ @close="previewVisible = false"
+ @download="handleDownload"
+ />
</div>
</template>
@@ -519,13 +493,18 @@
import {
reviewinitiateBaseInfoList,
ethicalreviewedit,
- ethicalreviewadd
+ ethicalreviewadd,
+ ethicalreviewInfo
} from "@/api/businessApi";
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 },
+ components: { CaseBasicInfo, UploadAttachment, FilePreviewDialog },
+ dicts: ["sys_user_sex", "sys_ethical"],
data() {
return {
@@ -533,6 +512,7 @@
isEdit: false,
// 鍩烘湰淇℃伅
infoid: undefined,
+ id: undefined,
caseId: null,
caseNo: "",
@@ -563,6 +543,10 @@
// 澶囨敞
remark: "",
+ // 闄勪欢淇℃伅
+ annexfilesList: [],
+ filePatch: "",
+
// 绯荤粺瀛楁
createBy: "",
createTime: "",
@@ -571,41 +555,51 @@
delFlag: "0"
},
// 琛ㄥ崟楠岃瘉瑙勫垯
- rules: {
- initiateTheme: [
- { required: true, message: "鍙戣捣涓婚涓嶈兘涓虹┖", trigger: "blur" },
- { min: 2, max: 100, message: "闀垮害鍦� 2 鍒� 100 涓瓧绗�", trigger: "blur" }
- ],
- initiatePerson: [
- { required: true, message: "鍙戣捣浜轰笉鑳戒负绌�", trigger: "blur" }
- ],
- status: [
- { required: true, message: "瀹℃煡鐘舵�佷笉鑳戒负绌�", trigger: "change" }
- ],
- startTime: [
- { required: true, message: "鍙戣捣鏃堕棿涓嶈兘涓虹┖", trigger: "change" }
- ],
- cutOffTime: [
- { 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" }
- ]
-},
+ rules: {
+ initiateTheme: [
+ { required: true, message: "鍙戣捣涓婚涓嶈兘涓虹┖", trigger: "blur" },
+ {
+ min: 2,
+ max: 100,
+ message: "闀垮害鍦� 2 鍒� 100 涓瓧绗�",
+ trigger: "blur"
+ }
+ ],
+ initiatePerson: [
+ { required: true, message: "鍙戣捣浜轰笉鑳戒负绌�", trigger: "blur" }
+ ],
+ status: [
+ { required: true, message: "瀹℃煡鐘舵�佷笉鑳戒负绌�", trigger: "change" }
+ ],
+ startTime: [
+ { required: true, message: "鍙戣捣鏃堕棿涓嶈兘涓虹┖", trigger: "change" }
+ ],
+ cutOffTime: [
+ { 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" }
+ ]
+ },
// 淇濆瓨鍔犺浇鐘舵��
saveLoading: false,
- // 闄勪欢鏁版嵁
- attachments: [],
+ // 闄勪欢鐩稿叧
+ attachmentFileList: [],
+
+ // 棰勮鐩稿叧
+ previewVisible: false,
+ currentPreviewFile: null,
+
// 涓撳瀹℃煡鏁版嵁
expertReviews: [
// 涓撳锛�18浣嶏級- 鍒濆鐘舵�佷负鐢宠涓�
@@ -812,15 +806,6 @@
content: ""
},
- // 涓婁紶鐩稿叧
- uploadDialogVisible: false,
- uploadLoading: false,
- tempFileList: [],
- uploadAction: process.env.VUE_APP_BASE_API + "/common/upload",
- headers: {
- Authorization: "Bearer " + getToken()
- },
-
// 鍙敤涓撳鍒楄〃
availableExperts: [
{ id: 1, name: "闄舵槉", type: "normal" },
@@ -919,15 +904,9 @@
},
created() {
this.infoid = this.$route.query.infoid;
+ this.id = this.$route.query.id;
this.caseId = this.$route.query.infoid;
- // const id = this.$route.query.id;
- this.getDetail(this.infoid);
-
- // if (id && !this.$route.path.includes("/add")) {
- // this.getDetail(this.infoid);
- // } else if (this.$route.path.includes("/add") && this.infoid) {
- // this.initNewData();
- // }
+ this.getDetail(this.infoid, this.id);
},
methods: {
// 鍒濆鍖栨柊澧炴暟鎹�
@@ -943,16 +922,29 @@
},
// 鑾峰彇璇︽儏
- async getDetail(infoid) {
+ async getDetail(infoid, id) {
try {
this.expertLoading = true;
- const response = await reviewinitiateBaseInfoList({ infoid: infoid });
+ 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) {
+ if (response.data && id) {
+ this.form = response.data;
+ // 瑙f瀽 filePatch 瀛楁
+ this.parseFilePatch(this.form.filePatch);
+ this.initAttachmentFileList();
+ } else if (response.data && infoid) {
this.form = response.data[0];
+ // 瑙f瀽 filePatch 瀛楁
+ this.parseFilePatch(this.form.filePatch);
+ this.initAttachmentFileList();
}
console.log(this.form, "this.form ");
@@ -971,21 +963,177 @@
}
},
+ // 瑙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("鏂囦欢涓婁紶澶辫触锛岃閲嶈瘯");
+ },
+
+ // 鎵撳紑涓婁紶瀵硅瘽妗�
+ openUploadDialog() {
+ this.$refs.uploadAttachment.openUpload();
+ },
+
+ // 鏂囦欢棰勮
+ handlePreview(file) {
+ this.currentPreviewFile = {
+ fileName: file.fileName,
+ fileUrl: file.path || file.fileUrl,
+ fileType: this.getFileType(file.fileName)
+ };
+ 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;
+ }
+ },
+
// 鑾峰彇涓撳瀹℃煡鍒楄〃
getExpertReviews(ethicsReviewId) {
this.expertLoading = true;
- // 妯℃嫙鏁版嵁 - 瀹為檯椤圭洰涓粠鎺ュ彛鑾峰彇
setTimeout(() => {
this.expertLoading = false;
- }, 500);
- },
-
- // 鑾峰彇闄勪欢鍒楄〃
- getAttachments(ethicsReviewId) {
- this.attachmentLoading = true;
- // 妯℃嫙鑾峰彇闄勪欢
- setTimeout(() => {
- this.attachmentLoading = false;
}, 500);
},
@@ -1040,7 +1188,9 @@
...this.form,
// 纭繚蹇呰瀛楁
infoid: this.infoid,
- caseNo: this.caseNo
+ caseNo: this.caseNo,
+ // 鏋勫缓 filePatch 瀛楁
+ filePatch: this.buildFilePatch()
};
let response = null;
@@ -1158,11 +1308,9 @@
return;
}
- // 妯℃嫙鍙戦��
this.$message.success("鍙戦�佹垚鍔�");
this.sendDialogVisible = false;
- // 鏇存柊涓撳鐘舵��
this.sendForm.expertIds.forEach(expertId => {
const index = this.expertReviews.findIndex(
expert => expert.id === expertId
@@ -1197,7 +1345,6 @@
}
})
.then(({ value }) => {
- // 妯℃嫙鏇存柊涓撳瀹℃煡
const index = this.expertReviews.findIndex(e => e.id === expert.id);
if (index !== -1) {
this.expertReviews[index].expertOpinion = value;
@@ -1236,135 +1383,6 @@
);
},
- // 涓婁紶闄勪欢鐩稿叧鏂规硶
- 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 maxSize = 10 * 1024 * 1024;
-
- 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");
-
- if (!isTypeOk) {
- this.$message.error("鏂囦欢鏍煎紡涓嶆敮鎸�");
- return false;
- }
-
- if (file.size > maxSize) {
- this.$message.error("鏂囦欢澶у皬涓嶈兘瓒呰繃10MB");
- return false;
- }
-
- return true;
- },
-
- // 鏂囦欢閫夋嫨鍙樺寲
- handleFileChange(file, fileList) {
- this.tempFileList = fileList;
- },
-
- // 绉婚櫎涓存椂鏂囦欢
- handleTempRemove(file, fileList) {
- this.tempFileList = fileList;
- },
-
- // 涓婁紶鎴愬姛澶勭悊
- handleUploadSuccess(response, file, fileList) {
- if (response.code === 200) {
- this.$message.success("鏂囦欢涓婁紶鎴愬姛");
- this.uploadDialogVisible = false;
- this.tempFileList = [];
- } else {
- this.$message.error(response.msg || "鏂囦欢涓婁紶澶辫触");
- }
- },
-
- // 鎻愪氦涓婁紶
- async submitUpload() {
- if (this.tempFileList.length === 0) {
- this.$message.warning("璇峰厛閫夋嫨瑕佷笂浼犵殑鏂囦欢");
- return;
- }
- this.$refs.uploadRef.submit();
- this.uploadLoading = true;
- },
-
- // 棰勮闄勪欢
- 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"
- }
- );
- } else {
- this.$message.info("璇ユ枃浠剁被鍨嬫殏涓嶆敮鎸佸湪绾块瑙堬紝璇蜂笅杞藉悗鏌ョ湅");
- }
- },
-
- // 涓嬭浇闄勪欢
- handleDownloadAttachment(attachment) {
- const link = document.createElement("a");
- link.href = attachment.fileUrl;
- link.download = attachment.fileName;
- link.click();
- this.$message.success(`寮�濮嬩笅杞�: ${attachment.fileName}`);
- },
-
- // 鑾峰彇鏂囦欢绫诲瀷
- 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();
- },
-
- // 鏂囦欢澶у皬鏍煎紡鍖�
- 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];
- },
-
// 鏃堕棿鏍煎紡鍖�
parseTime(time) {
if (!time) return "";
@@ -1385,6 +1403,8 @@
}
};
</script>
+
+
<style scoped>
.ethics-review-detail {
@@ -1496,7 +1516,66 @@
.sent-button {
color: #67c23a !important;
}
+.form-section {
+ margin-bottom: 16px;
+}
+.section-header {
+ display: flex;
+ align-items: center;
+ font-weight: bold;
+ color: #303133;
+}
+
+.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;
+}
+
+.case-info-card {
+ border-left: 4px solid #67c23a;
+}
/* 鍝嶅簲寮忚璁� */
@media (max-width: 768px) {
.ethics-review-detail {
--
Gitblit v1.9.3