From f806aff5702fc6be9c9348d51964366cbf434bf7 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期四, 11 六月 2026 09:43:39 +0800
Subject: [PATCH] 维护
---
src/views/business/ethicalReview/ethicalReviewInfo.vue | 127 ++++++++++++++++++++++++++++--------------
1 files changed, 84 insertions(+), 43 deletions(-)
diff --git a/src/views/business/ethicalReview/ethicalReviewInfo.vue b/src/views/business/ethicalReview/ethicalReviewInfo.vue
index 8e56dfa..529af28 100644
--- a/src/views/business/ethicalReview/ethicalReviewInfo.vue
+++ b/src/views/business/ethicalReview/ethicalReviewInfo.vue
@@ -620,7 +620,7 @@
</div>
</el-form-item>
- <el-form-item label="鍙戦�佹柟寮�" prop="sendType" required>
+ <!-- <el-form-item label="鍙戦�佹柟寮�" prop="sendType" required>
<el-select
v-model="sendForm.sendType"
placeholder="璇烽�夋嫨鍙戦�佹柟寮�"
@@ -631,27 +631,27 @@
<el-option label="鐭俊鍙戦��" value="2"></el-option>
<el-option label="鍏朵粬鏂瑰紡" value="3"></el-option>
</el-select>
- </el-form-item>
+ </el-form-item> -->
- <el-form-item label="鍙戦�佹爣棰�" prop="title" required>
+ <!-- <el-form-item label="鍙戦�佹爣棰�" prop="title" required>
<el-input v-model="sendForm.title" placeholder="璇疯緭鍏ュ彂閫佹爣棰�" />
- </el-form-item>
+ </el-form-item> -->
- <el-form-item label="鍙戦�佸唴瀹�" prop="content" required>
+ <!-- <el-form-item label="鍙戦�佸唴瀹�" prop="content" required>
<el-input
type="textarea"
:rows="4"
v-model="sendForm.content"
placeholder="璇疯緭鍏ュ彂閫佺粰涓撳鐨勫鏌ュ唴瀹硅鏄�"
/>
- </el-form-item>
+ </el-form-item> -->
- <el-form-item label="璺宠浆閾炬帴" prop="url">
+ <!-- <el-form-item label="璺宠浆閾炬帴" prop="url">
<el-input
v-model="sendForm.url"
placeholder="璇疯緭鍏ヨ烦杞摼鎺ワ紙鍙�夛級"
/>
- </el-form-item>
+ </el-form-item> -->
</el-form>
<div slot="footer">
<el-button @click="sendDialogVisible = false">鍙栨秷</el-button>
@@ -962,7 +962,6 @@
startTime: "",
endTime: "",
sendType: "0",
- title: "浼︾悊瀹℃煡浠诲姟閫氱煡",
content: "",
url: ""
},
@@ -1504,9 +1503,9 @@
if (valid) {
this.saveLoading = true;
// 淇濆瓨娓呯┖id渚夸簬鍚庣鏁翠綋鍒犻櫎鏂板
- this.form.ethicalreviewopinionsList.forEach(item => {
- item.id = null;
- });
+ // this.form.ethicalreviewopinionsList.forEach(item => {
+ // item.id = null;
+ // });
try {
const submitData = {
...this.form,
@@ -1532,10 +1531,12 @@
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 }
- });
+ this.id = this.form.id;
+ // this.$router.replace({
+ // query: { ...this.$route.query, id: this.form.id }
+ // });
}
+ this.refreshPageData();
} else {
this.$message.error("淇濆瓨澶辫触锛�" + (response.msg || "鏈煡閿欒"));
}
@@ -2060,6 +2061,9 @@
// 鍙戦�佺粰鏅�氫笓瀹�
handleSendToNormalExperts() {
+ if (!this.validateAllIds(this.ethicalreviewopinionsList)) {
+ return;
+ }
this.currentSendExperts = this.availableNormalExperts;
this.sendForm.expertType = "normal";
this.sendForm.endTime = ""; // 閲嶇疆鎴鏃堕棿
@@ -2068,6 +2072,9 @@
// 鍙戦�佺粰涓诲涓撳
handleSendToChiefExpert() {
+ if (!this.validateAllIds(this.ethicalreviewopinionsList)) {
+ return;
+ }
this.currentSendExperts = this.availableChiefExperts;
this.sendForm.expertType = "chief";
this.sendForm.endTime = ""; // 涓诲涓撳鏃犻渶鎴鏃堕棿
@@ -2076,12 +2083,40 @@
// 鍙戦�佺粰鍗曚釜涓撳
handleSendToExpert(expert) {
+ if (!this.validateAllIds(this.ethicalreviewopinionsList)) {
+ return;
+ }
this.currentSendExperts = [expert];
this.sendForm.expertType = expert.expertType == "1" ? "chief" : "normal";
this.sendForm.endTime = expert.expertType == "1" ? "" : ""; // 涓诲涓撳鏃犻渶鎴鏃堕棿
this.sendDialogVisible = true;
},
+ validateAllIds(arr, idField = "id") {
+ if (!Array.isArray(arr) || arr.length === 0) {
+ this.$message.warning("璇峰厛閫夋嫨涓撳鍒楄〃");
+ return false;
+ }
+
+ const emptyIdItems = arr.filter(item => {
+ const id = item[idField];
+ return (
+ id === undefined ||
+ id === null ||
+ id === "" ||
+ id.toString().trim() === ""
+ );
+ });
+
+ if (emptyIdItems.length > 0) {
+ this.$message.warning(
+ "褰撳墠閫変腑涓撳鍒楄〃鏈夋湭淇濆瓨鏁版嵁锛岃淇濆瓨鍒锋柊鍚庡啀鍙戦��"
+ );
+ return false;
+ }
+
+ return true;
+ },
// 鍙戦�佸璇濇鍏抽棴
handleSendDialogClose() {
this.sendForm = {
@@ -2090,7 +2125,6 @@
startTime: "",
endTime: "",
sendType: "0",
- title: "浼︾悊瀹℃煡浠诲姟閫氱煡",
content: "",
url: ""
};
@@ -2110,20 +2144,20 @@
return;
}
- if (!this.sendForm.sendType) {
- this.$message.warning("璇烽�夋嫨鍙戦�佹柟寮�");
- return;
- }
+ // if (!this.sendForm.sendType) {
+ // this.$message.warning("璇烽�夋嫨鍙戦�佹柟寮�");
+ // return;
+ // }
- if (!this.sendForm.title) {
- this.$message.warning("璇疯緭鍏ュ彂閫佹爣棰�");
- return;
- }
+ // if (!this.sendForm.title) {
+ // this.$message.warning("璇疯緭鍏ュ彂閫佹爣棰�");
+ // return;
+ // }
- if (!this.sendForm.content) {
- this.$message.warning("璇疯緭鍏ュ彂閫佸唴瀹�");
- return;
- }
+ // if (!this.sendForm.content) {
+ // this.$message.warning("璇疯緭鍏ュ彂閫佸唴瀹�");
+ // return;
+ // }
if (this.currentSendExperts.length == 0) {
this.$message.warning("娌℃湁鎵惧埌鍙彂閫佺殑涓撳");
@@ -2245,7 +2279,6 @@
startTime: "",
endTime: "",
sendType: "0",
- title: "浼︾悊瀹℃煡浠诲姟閫氱煡",
content: "",
url: ""
};
@@ -2262,27 +2295,35 @@
},
// 鍙戦�佸崟涓笓瀹剁殑鏂规硶
async sendSingleExpert(expert, index) {
+ console.log(expert, "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)
+ // // 鏋勫缓鍙戦�佹暟鎹�
+ // const sendData = {
+ // number: expert.deptname || "", // 鐢ㄦ埛鎵嬫満鍙�
+ // title: this.sendForm.title,
+ // url: this.sendForm.url || "",
+ // createTime: new Date()
+ // .toISOString()
+ // .replace("T", " ")
+ // .substring(0, 19)
+ // };
+ const sendDatas = {
+ expertNo: expert.expertNo || "",
+ id: expert.id || "",
+ infoId: this.infoid || ""
};
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"
- });
+ // const response = await sendcall({
+ // tel: expert.donorno ? expert.donorno : 13634195431, // 杩欓噷搴旇鏄� expert.deptname 鎴� expert.phone
+ // messageContent:
+ // "闈掑矝澶у闄勫睘鍖婚櫌涓婃姤娼滃湪鎹愮尞妗堜緥锛岃鐧诲綍OPO绯荤粺鏌ョ湅璇︾粏淇℃伅锛屽強鏃惰繘琛屽鎺ャ�傜櫥褰曢摼鎺�:https://brdeddd.qduhosos.cn/dklejdj/deljf/index"
+ // });
+ const response = await sendNotification(sendDatas);
if (response.code == 200) {
return {
--
Gitblit v1.9.3