From b4fe2c16274a91fee4fb26d91374f95fbe2dbcec Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 09 十一月 2026 15:28:21 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/record/detailpage/index.vue | 272 +++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 258 insertions(+), 14 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index cb7e4ef..99123e5 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -128,6 +128,28 @@
</template>
</el-table-column>
<el-table-column
+ v-if="
+ orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�' || orgname == '涓芥按甯備腑鍖婚櫌'
+ "
+ label="鎷ㄥ彿鐘舵��"
+ width="120"
+ align="center"
+ key="isManuallyCalled"
+ prop="isManuallyCalled"
+ >
+ <template slot-scope="scope">
+ <el-tag
+ v-if="Number(scope.row.isManuallyCalled) > 0"
+ type="success"
+ :disable-transitions="false"
+ >鎷ㄩ�歿{ scope.row.isManuallyCalled }}娆�</el-tag
+ >
+ <el-tag v-else type="info" :disable-transitions="false"
+ >鏈嫧閫�</el-tag
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
prop="finishtime"
align="center"
label="闅忚瀹屾垚鏃堕棿"
@@ -383,9 +405,20 @@
type="primary"
round
@click="smsSubTask"
- v-if="orgname != '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ v-if="
+ orgname != '鐪佺珛鍚屽痉缈犺嫅闄㈠尯' &&
+ orgname != '涓芥按甯備腑鍖婚櫌'
+ "
>
闂嵎鐭俊鎺ㄩ��
+ </el-button>
+ <el-button
+ type="primary"
+ round
+ @click="weChatSubTask"
+ v-if="orgname == '涓芥按甯備腑鍖婚櫌'"
+ >
+ 闂嵎寰俊鎺ㄩ��
</el-button>
</span>
</div>
@@ -682,7 +715,13 @@
<!-- 椤堕儴鎿嶄綔鍖哄煙 -->
<div class="section-header">
<h3><i class="el-icon-s-operation"></i> 浜哄伐澶勭悊</h3>
+
<div class="header-actions">
+ <div v-if="form.doctorOpinion2" class="last-opinion">
+ <i class="el-icon-sunny"></i>
+ <span class="last-opinion-label">涓婃鐨勫鐞嗘剰瑙侊細</span>
+ <span class="last-opinion-text">{{ form.doctorOpinion2 }}</span>
+ </div>
<!-- 鍩虹鎿嶄綔鎸夐挳缁� -->
<div class="action-group basic-actions">
<el-button type="primary" plain @click="alterpatient('')">
@@ -762,6 +801,8 @@
</div>
</div>
</div>
+
+
<!-- 琛ㄥ崟鍖哄煙 -->
<div class="form-content">
@@ -983,6 +1024,14 @@
浜哄伐闅忚
</el-button>
<el-button
+ plain
+ v-if="orgname != '缂欎簯绗簩浜烘皯鍖婚櫌'"
+ type="primary"
+ @click="Editsingletaskson('7')"
+ >
+ 鍥為櫌澶嶆煡澶嶈瘖
+ </el-button>
+ <el-button
type="primary"
round
@click="sendAgainmsg"
@@ -1144,9 +1193,9 @@
title="鎮h�呭啀娆¢殢璁�"
v-dialogDrags
:visible.sync="dialogFormVisible"
- width="700px"
+ width="900px"
>
- <el-form ref="zcform" :rules="zcrules" :model="form" label-width="80px">
+ <el-form ref="zcform" :rules="zcrules" :model="form" label-width="120px">
<!-- 鍩虹鏈嶅姟淇℃伅 - 榛樿鎶樺彔 -->
<el-collapse v-model="activeNames" @change="handleCollapseChange">
<el-collapse-item title="鍩虹鏈嶅姟淇℃伅" name="basic">
@@ -1242,10 +1291,26 @@
v-model="form.remark2"
></el-input>
</el-form-item>
+ <el-form-item label="澶勭悊鎰忚">
+ <el-input
+ class="custom-disabled"
+ type="textarea"
+ disabled
+ v-model="form.doctorOpinion2"
+ placeholder="鏃�"
+ ></el-input>
+ </el-form-item>
</el-collapse-item>
<!-- 涓嬫闅忚淇℃伅 - 榛樿灞曞紑 -->
<el-collapse-item title="涓嬫闅忚" name="next">
+ <el-form-item label="鍐嶆闅忚浠诲姟">
+ <el-input
+ disabled
+ v-model="nextTaskName"
+ placeholder="鍐嶆闅忚浠诲姟"
+ ></el-input>
+ </el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="闅忚鏂瑰紡" prop="visitType">
@@ -1285,13 +1350,23 @@
</el-col>
</el-row>
<el-form-item label="闅忚绫诲瀷" prop="resource">
- <el-radio-group v-model="form.resource">
+ <el-radio-group
+ v-model="form.resource"
+ @change="handleResourceChange"
+ >
<el-radio label="1">鏈梾鍖洪殢璁�</el-radio>
<el-radio label="2">闅忚涓績闅忚</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="闅忚璁板綍" :required="form.resource == '2'">
<el-input type="textarea" v-model="form.remark"></el-input>
+ </el-form-item>
+ <el-form-item
+ label="鍖荤敓澶勭悊鎰忚"
+ prop="doctorOpinion"
+ :required="isDoctorOpinionRequired"
+ >
+ <el-input type="textarea" v-model="form.doctorOpinion"></el-input>
</el-form-item>
</el-collapse-item>
</el-collapse>
@@ -1312,7 +1387,11 @@
:visible.sync="CaldialogVisible"
width="60%"
>
- <CallCenterLs ref="CallCenterLs" :initial-phone="currentPhoneNumber" />
+ <CallCenterLs
+ ref="CallCenterLs"
+ :initial-phone="currentPhoneNumber"
+ @call-connected="recordCallConnected"
+ />
</el-dialog>
</div>
</div>
@@ -1336,8 +1415,10 @@
query360PatInfonh,
sendMsg,
smsSubTask,
+ weChatSubTask,
getconfigKey,
} from "@/api/AiCentre/index";
+import { getIvrtask } from "@/api/smartor/ivrtask";
import {
messagelistpatient,
alterpatient,
@@ -1487,6 +1568,7 @@
input: "浠婂ぉ韬綋杩樹笉閿�",
radio: "2",
taskname: "",
+ nextTaskName: "",
activeName: "wj",
voice: "",
templateid: "",
@@ -1581,6 +1663,20 @@
callback();
},
trigger: "change",
+ },
+ ],
+ // 鍖荤敓澶勭悊鎰忚锛氫粎銆岄殢璁夸腑蹇冮殢璁裤��+銆屼附姘村競涓尰闄€�嶆椂蹇呭~锛屽叾浣欐儏鍐典笉鏍¢獙
+ doctorOpinion: [
+ {
+ validator: (rule, value, callback) => {
+ const needRequired =
+ this.form.resource == "2" && this.orgname === "涓芥按甯備腑鍖婚櫌";
+ if (needRequired && !String(value || "").trim()) {
+ return callback(new Error("璇疯緭鍏ュ尰鐢熷鐞嗘剰瑙�"));
+ }
+ callback();
+ },
+ trigger: "blur",
},
],
},
@@ -1705,6 +1801,10 @@
failed: "error",
};
return typeMap[this.callStatus];
+ },
+ // 鍖荤敓澶勭悊鎰忚鏄惁蹇呭~锛氶殢璁跨被鍨嬮�夈�岄殢璁夸腑蹇冮殢璁裤�嶄笖褰撳墠鏈烘瀯涓轰附姘村競涓尰闄�
+ isDoctorOpinionRequired() {
+ return this.form.resource == "2" && this.orgname === "涓芥按甯備腑鍖婚櫌";
},
// 鏄惁浠ラ棶鍗峰舰寮忓睍绀猴紙闈炶闊虫湇鍔★紝鎴栬闊虫湇鍔′絾鏃犲畬鏁磋闊虫暟鎹渶鎵嬪姩濉姤锛�
showQuestionnaireForm() {
@@ -2215,8 +2315,29 @@
path: "/followvisit/discharge",
});
}
+ } else if (this.form.serviceType == 3) {
+ if (this.visitCount != 1) {
+ this.$router.push({
+ path: "/logisticsservice/OutpatientAgain",
+ });
+ } else {
+ this.$router.push({
+ path: "/followvisit/discharge",
+ });
+ }
+ } else if (this.form.serviceType == 19) {
+ if (this.visitCount != 1) {
+ this.$router.push({
+ path: "/logisticsservice/operationAgain",
+ });
+ } else {
+ this.$router.push({
+ path: "/followvisit/discharge",
+ });
+ }
} else {
- location.reload();
+ // location.reload();
+ this.$router.go(-1);
}
},
// 鐢佃瘽============================
@@ -2299,6 +2420,22 @@
console.log(err);
});
},
+ weChatSubTask() {
+ this.$modal
+ .confirm("鏄惁鍚戞偅鑰呴�氳繃寰俊鎺ㄩ�侀棶鍗峰唴瀹癸紵")
+ .then(() => {
+ weChatSubTask(this.id).then((res) => {
+ if (String(res.code) === "200") {
+ this.$modal.msgSuccess(res.msg || "鍙戦�佹垚鍔�");
+ } else {
+ this.$modal.msgError(res.message || res.msg || "鍙戦�佸け璐�");
+ }
+ });
+ })
+ .catch((err) => {
+ console.log(err);
+ });
+ },
handleConfirmReplace() {
// 閬嶅巻鎵�鏈夐鐩紙tableDatatop锛�
this.tableDatatop.forEach((item) => {
@@ -2349,7 +2486,7 @@
this.CaldialogVisible = true;
return;
}
- // 涓嬫柟鏄腑鍖婚櫌鍛煎彨
+ // 涓嬫柟鏄附姘村競涓尰闄�
if (this.isSipRegistering) {
this.$message.warning("绯荤粺姝e湪鍒濆鍖栵紝璇风◢鍊�...");
return;
@@ -2379,11 +2516,15 @@
this.callStatus = status.type;
if (status.type === "connected") {
- this.currentCall = {
- phone: this.currentPhoneNumber,
- type: this.callType,
- startTime: new Date(),
- };
+ if (!this.currentCall) {
+ this.currentCall = {
+ phone: this.currentPhoneNumber,
+ type: this.callType,
+ startTime: new Date(),
+ };
+ // 涓芥按甯備腑鍖婚櫌锛氱數璇濇帴閫氬悗璁板綍鎷ㄦ墦鎴愬姛娆℃暟
+ this.recordCallConnected();
+ }
} else if (status.type === "ended" || status.type === "failed") {
this.currentCall = null;
}
@@ -2392,6 +2533,39 @@
if (status.type === "failed") {
this.$message.error(`鍛煎彨澶辫触: ${status.text}`);
}
+ },
+ // 鐢佃瘽鎷ㄦ墦鎴愬姛鍚庯紙鎺ラ�氾級娆℃暟 +1锛屽苟閫氳繃 Editsingletaskson 鏇存柊鏈嶅姟鏁版嵁
+ // 浠呴檺鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄笌涓芥按甯備腑鍖婚櫌
+ recordCallConnected() {
+ const allowedOrgs = ["鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�", "涓芥按甯備腑鍖婚櫌"];
+ if (!allowedOrgs.includes(this.orgname)) return;
+
+ getTaskservelist({
+ patid: this.patid,
+ subId: this.id,
+ }).then((res) => {
+ if (res.code == 200) {
+ const objson = res.rows[0].serviceSubtaskList.find(
+ (item) => item.id == this.id
+ );
+ if (!objson) return;
+ objson.isManuallyCalled = (Number(objson.isManuallyCalled) || 0) + 1;
+ Editsingletaskson(objson).then((r) => {
+ if (r.code == 200) {
+ // 鍙婃椂鏇存柊椤堕儴鏈嶅姟鍒楄〃涓庤〃鍗曚腑鐨勬嫧鍙风姸鎬�
+ const localRow = (this.logsheetlist || []).find(
+ (item) => item.id == this.id
+ );
+ if (localRow) {
+ localRow.isManuallyCalled = objson.isManuallyCalled;
+ }
+ if (this.form && this.form.id == this.id) {
+ this.form.isManuallyCalled = objson.isManuallyCalled;
+ }
+ }
+ });
+ }
+ });
},
// 缁撴潫褰撳墠閫氳瘽
endCurrentCall() {
@@ -2522,6 +2696,8 @@
console.log(this.form.templatename, "templatename");
this.form.remark = this.form.remark || "";
+ this.form.doctorOpinion2 = this.form.doctorOpinion || "";
+ this.form.doctorOpinion = "";
this.logsheetlist = res.rows[0].serviceSubtaskList;
this.templateid = this.form.templateid;
this.selectedTag = this.form.excep;
@@ -2711,8 +2887,29 @@
return tag ? tag.description : "";
},
+ // 鑾峰彇鍐嶆闅忚浠诲姟淇℃伅锛堜笅娆¢殢璁块儴鍒嗗睍绀猴級
+ fetchNextTaskInfo() {
+ const taskid = this.form.taskid || this.taskid;
+ if (!taskid) {
+ this.nextTaskName = "";
+ return;
+ }
+ getIvrtask(taskid).then((r) => {
+ const task = r.data || {};
+ const nextid = task.nexttaskid;
+ if (nextid) {
+ getIvrtask(nextid).then((r2) => {
+ this.nextTaskName =
+ (r2.data && r2.data.taskName) || task.nexttaskname || "";
+ });
+ } else {
+ this.nextTaskName = task.nexttaskname || "";
+ }
+ });
+ },
// 璋冭捣鍐嶆鍙戦��
sendAgain() {
+ this.fetchNextTaskInfo();
getTaskservelist({
patid: this.patid,
visitCount: 2,
@@ -2934,6 +3131,14 @@
}
});
},
+ // 鍒囨崲闅忚绫诲瀷鍚庯紝閲嶇疆鍖荤敓澶勭悊鎰忚鐨勬牎楠岀姸鎬侊紙蹇呭~鏉′欢闅忕被鍨嬪彉鍖栵級
+ handleResourceChange() {
+ this.$nextTick(() => {
+ if (this.$refs.zcform) {
+ this.$refs.zcform.clearValidate("doctorOpinion");
+ }
+ });
+ },
// 鍒涘缓鍐嶆闅忚鏈嶅姟
setupsubtask() {
this.$refs["zcform"].validate((valid) => {
@@ -2949,6 +3154,10 @@
this.form.remark =
this.form.remark + "銆�" + this.getCurrentTime() + "銆�";
let form = structuredClone(this.form);
+ // 鍐嶆闅忚鍗斥�滃洖闄㈠鏌ュ璇娾�濓細澶勭悊鎰忚缃负 suggest=7
+ if (String(form.suggest) !== "7") {
+ form.suggest = "7";
+ }
form.visitTime = this.parseTime(form.date1);
form.finishtime = "";
if (form.resource) {
@@ -3653,14 +3862,14 @@
margin-top: 20px;
}
-.el-input.is-disabled .el-input__inner {
+::v-deep .el-input.is-disabled .el-input__inner {
background-color: #fff;
border-color: #dcdfe6;
color: #080808 !important;
cursor: not-allowed;
}
-.el-textarea.is-disabled .el-textarea__inner {
+::v-deep .el-textarea.is-disabled .el-textarea__inner {
background-color: #fff;
border-color: #dcdfe6;
color: #080808 !important;
@@ -3986,6 +4195,41 @@
}
}
+/* 涓婃鐨勫鐞嗘剰瑙� */
+.last-opinion {
+ display: flex;
+ gap: 8px;
+ margin-bottom: 20px;
+ padding: 8px 14px;
+ background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
+ border: 1px solid #d1fae5;
+ border-left: 4px solid #10b981;
+ border-radius: 8px;
+ box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
+ line-height: 1.5;
+
+ > i {
+ font-size: 18px;
+ color: #10b981;
+ flex-shrink: 0;
+ }
+
+ .last-opinion-label {
+ font-size: 13px;
+ color: #059669;
+ font-weight: 600;
+ white-space: nowrap;
+ flex-shrink: 0;
+ }
+
+ .last-opinion-text {
+ font-size: 14px;
+ color: #334155;
+ word-break: break-word;
+ white-space: pre-wrap;
+ }
+}
+
/* 閫氳瘽鎺у埗鍖哄煙 */
.call-controls {
margin: 15px 0;
--
Gitblit v1.9.3