From fb34ba28cb908bd328cf6690ab0b19a56428f4e2 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 13 十一月 2026 10:56:55 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/record/detailpage/index.vue | 323 ++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 301 insertions(+), 22 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 1f704a4..9321ac3 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -127,10 +127,9 @@
</el-tooltip>
</template>
</el-table-column>
- <el-table-column
+ <el-table-column
v-if="
- orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�' ||
- orgname == '涓芥按甯備腑鍖婚櫌'
+ orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�' || orgname == '涓芥按甯備腑鍖婚櫌'
"
label="鎷ㄥ彿鐘舵��"
width="120"
@@ -305,8 +304,6 @@
show-overflow-tooltip
>
</el-table-column>
-
-
<el-table-column
prop="bankcardno"
@@ -639,10 +636,16 @@
<el-button
v-if="showQuestionnaireForm"
type="primary"
+ :disabled="!canSaveQuestionnaire"
+ :loading="savingQuestion"
@click="getdetail"
>淇濆瓨闂嵎璇︽儏</el-button
>
- <el-button v-else type="primary" @click="yuyingetdetail"
+ <el-button
+ v-else
+ type="primary"
+ :loading="savingQuestion"
+ @click="yuyingetdetail"
>淇濆瓨闂嵎璇︽儏</el-button
>
</div>
@@ -700,10 +703,15 @@
<el-button
v-if="Voicetype"
type="primary"
+ :loading="savingVoice"
@click="yuyingetdetail"
>淇濆瓨闅忚璇︽儏</el-button
>
- <el-button v-else type="primary" @click="getdetail"
+ <el-button
+ v-else
+ type="primary"
+ :loading="savingQuestion"
+ @click="getdetail"
>淇濆瓨闅忚璇︽儏</el-button
>
</div>
@@ -712,13 +720,51 @@
</div>
</div>
</div>
+
+ <!-- 鏈�夐�夐」鎻愮ず锛氬ぇ瀛楅啋鐩彁閱掞紝鍏佽鐢ㄦ埛鍧氭寔淇濆瓨 -->
+ <el-dialog
+ :visible.sync="confirmSaveVisible"
+ width="640px"
+ append-to-body
+ :close-on-click-modal="false"
+ custom-class="unanswered-dialog"
+ >
+ <div slot="title" class="unanswered-title">
+ <i class="el-icon-warning"></i> 娉ㄦ剰锛氭湁棰樼洰娌℃湁閫夋嫨閫夐」
+ </div>
+ <div class="unanswered-warn">
+ 褰撳墠闂嵎杩樻湁
+ <span class="unanswered-count">{{ unansweredQuestions.length }}</span>
+ 閬撻<strong>娌℃湁閫夋嫨浠讳綍閫夐」</strong>锛岀户缁繚瀛樺皢鎸夆�滄湭浣滅瓟鈥濊褰曪細
+ </div>
+ <div class="unanswered-list">
+ <div v-for="q in unansweredQuestions" :key="q.index">
+ 绗� {{ q.index }} 棰橈細{{ q.title }}
+ </div>
+ </div>
+ <div class="unanswered-tip">纭畾杩樿淇濆瓨鍚楋紵</div>
+ <span slot="footer">
+ <el-button size="medium" @click="confirmSaveVisible = false"
+ >杩斿洖琛ュ~</el-button
+ >
+ <el-button type="danger" size="medium" @click="confirmForceSave"
+ >浠嶈淇濆瓨</el-button
+ >
+ </span>
+ </el-dialog>
<!-- 浜哄伐澶勭悊 -->
<div class="manual-action">
<div class="Followuserinfos">
<!-- 椤堕儴鎿嶄綔鍖哄煙 -->
<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('')">
@@ -798,6 +844,8 @@
</div>
</div>
</div>
+
+
<!-- 琛ㄥ崟鍖哄煙 -->
<div class="form-content">
@@ -1017,6 +1065,14 @@
</el-button>
<el-button plain type="info" @click="Editsingletaskson('5')">
浜哄伐闅忚
+ </el-button>
+ <el-button
+ plain
+ v-if="orgname != '缂欎簯绗簩浜烘皯鍖婚櫌'"
+ type="primary"
+ @click="Editsingletaskson('7')"
+ >
+ 鍥為櫌澶嶆煡澶嶈瘖
</el-button>
<el-button
type="primary"
@@ -1278,6 +1334,15 @@
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>
<!-- 涓嬫闅忚淇℃伅 - 榛樿灞曞紑 -->
@@ -1328,7 +1393,10 @@
</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>
@@ -1336,11 +1404,12 @@
<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">
- <el-input
- type="textarea"
- v-model="form.doctorOpinion"
- ></el-input>
+ <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>
@@ -1589,6 +1658,12 @@
"棰勭害涓嬫澶嶈瘖",
],
tableDatatop: [], //棰樼洰琛�
+ // 淇濆瓨闂嵎锛氭湭绛旈鎻愮ず寮圭獥 / 鐢ㄦ埛鍧氭寔淇濆瓨鏍囪
+ confirmSaveVisible: false,
+ forceSave: false,
+ // 闃查噸澶嶆彁浜わ細淇濆瓨涓鐢ㄦ寜閽�
+ savingQuestion: false,
+ savingVoice: false,
voiceDatatop: [], //棰樼洰琛�
dynamicTags: [],
isMergeMode: false,
@@ -1639,8 +1714,19 @@
trigger: "change",
},
],
+ // 鍖荤敓澶勭悊鎰忚锛氫粎銆岄殢璁夸腑蹇冮殢璁裤��+銆屼附姘村競涓尰闄€�嶆椂蹇呭~锛屽叾浣欐儏鍐典笉鏍¢獙
doctorOpinion: [
- { required: true, message: "璇疯緭鍏ュ尰鐢熷鐞嗘剰瑙�", trigger: "blur" },
+ {
+ validator: (rule, value, callback) => {
+ const needRequired =
+ this.form.resource == "2" && this.orgname === "涓芥按甯備腑鍖婚櫌";
+ if (needRequired && !String(value || "").trim()) {
+ return callback(new Error("璇疯緭鍏ュ尰鐢熷鐞嗘剰瑙�"));
+ }
+ callback();
+ },
+ trigger: "blur",
+ },
],
},
userrules: {
@@ -1742,6 +1828,26 @@
}
},
computed: {
+ // 鏄惁鏈変换鎰忎竴閬撻銆岄�変簡閫夐」銆嶆垨銆屽~浜嗗娉ㄣ��
+ hasAnyAnswer() {
+ return (this.tableDatatop || []).some((item) => this.isQuestionAnswered(item));
+ },
+ // 鍙充晶澶勭悊鎰忚/澶囨敞妗嗘槸鍚︽湁鍐呭
+ hasRemarkText() {
+ const remark = this.form && this.form.remark;
+ return remark !== null && remark !== undefined && String(remark).trim() !== "";
+ },
+ // 淇濆瓨闂嵎璇︽儏鐨勫彲鐐规潯浠讹細闂嵎鏈変綔绛� 鎴� 鍙宠竟澶囨敞妗嗘湁鍐呭锛堟湁鍏朵竴鍗冲彲锛�
+ canSaveQuestionnaire() {
+ return this.hasAnyAnswer || this.hasRemarkText;
+ },
+ // 娌℃湁閫夋嫨閫夐」鐨勯鐩紙淇濆瓨鍓嶇敤澶у瓧閱掔洰鎻愮ず锛屼笉鍖哄垎鏈夋病鏈夊~澶囨敞锛�
+ // index 鐢ㄩ鐩湪闂嵎閲岀殑鍘熷搴忓彿锛屾柟渚垮拰宸﹁竟闂嵎瀵圭収
+ unansweredQuestions() {
+ return (this.tableDatatop || [])
+ .map((item, i) => ({ index: i + 1, title: item.scriptContent || "鏈懡鍚嶉鐩�", raw: item }))
+ .filter((q) => !this.hasOptionValue(q.raw));
+ },
callStatusText() {
if (this.customCallStatus) {
return this.customCallStatus;
@@ -1764,6 +1870,10 @@
failed: "error",
};
return typeMap[this.callStatus];
+ },
+ // 鍖荤敓澶勭悊鎰忚鏄惁蹇呭~锛氶殢璁跨被鍨嬮�夈�岄殢璁夸腑蹇冮殢璁裤�嶄笖褰撳墠鏈烘瀯涓轰附姘村競涓尰闄�
+ isDoctorOpinionRequired() {
+ return this.form.resource == "2" && this.orgname === "涓芥按甯備腑鍖婚櫌";
},
// 鏄惁浠ラ棶鍗峰舰寮忓睍绀猴紙闈炶闊虫湇鍔★紝鎴栬闊虫湇鍔′絾鏃犲畬鏁磋闊虫暟鎹渶鎵嬪姩濉姤锛�
showQuestionnaireForm() {
@@ -1790,13 +1900,7 @@
this.orgname = localStorage.getItem("orgname");
console.log(localStorage.getItem("orgname"));
- if (
- this.orgname == "鐪佺珛鍚屽痉缈犺嫅闄㈠尯" ||
- this.orgname == "鐪佺珛鍚屽痉涔嬫睙闄㈠尯" ||
- this.orgname == "鐪佺珛鍚屽痉闂叉灄闄㈠尯" ||
- this.orgname == "鐪佺珛鍚屽痉闈掑北婀栭櫌鍖�" ||
- this.orgname == "鐪佺珛鍚屽痉澶╃洰灞辫矾闄㈠尯"
- ) {
+ if (this.isTongdeCampus) {
this.showContinuationCareBtn = true;
}
@@ -2153,8 +2257,52 @@
}
});
},
+ // 棰樼洰鏄惁閫変簡閫夐」锛堝崟閫夊瓧绗︿覆 / 澶氶�夋暟缁勶級
+ hasOptionValue(item) {
+ if (!item) {
+ return false;
+ }
+ const val = item.scriptResult;
+ if (Array.isArray(val)) {
+ return val.some(
+ (v) => v !== null && v !== undefined && String(v).trim() !== ""
+ );
+ }
+ return val !== null && val !== undefined && String(val).trim() !== "";
+ },
+ // 棰樼洰鏄惁濉簡澶囨敞
+ hasRemarkValue(item) {
+ if (!item) {
+ return false;
+ }
+ const remark = item.answerps;
+ return (
+ remark !== null && remark !== undefined && String(remark).trim() !== ""
+ );
+ },
+ // 棰樼洰鏄惁宸蹭綔绛旓細閫変簡閫夐」 鎴� 濉簡澶囨敞锛堜袱鑰呮湁鍏朵竴鍗崇畻宸茬瓟锛�
+ isQuestionAnswered(item) {
+ return this.hasOptionValue(item) || this.hasRemarkValue(item);
+ },
+ // 鏈瓟棰樻彁绀洪噷鐐广�屼粛瑕佷繚瀛樸��
+ confirmForceSave() {
+ this.forceSave = true;
+ this.confirmSaveVisible = false;
+ this.getdetail();
+ },
// 鍖绘姢浜哄憳瀛樺偍鏁版嵁
getdetail() {
+ // 闂嵎娌′綔绛斻�佸彸杈瑰娉ㄦ涔熺┖ 鈫� 涓嶅厑璁镐繚瀛�
+ if (!this.canSaveQuestionnaire) {
+ this.$message.warning("璇峰厛鍦ㄩ棶鍗蜂腑浣滅瓟锛屾垨鍦ㄥ彸渚у~鍐欏鐞嗘剰瑙�/澶囨敞");
+ return;
+ }
+ // 杩樻湁棰樼洰娌′綔绛旓細澶у瓧鎻愮ず锛岀敤鎴峰潥鎸佹墠缁х画
+ if (this.unansweredQuestions.length > 0 && !this.forceSave) {
+ this.confirmSaveVisible = true;
+ return;
+ }
+ this.forceSave = false;
console.log(1);
let excep = "";
@@ -2209,6 +2357,11 @@
param6: this.id,
type: 2,
};
+ // 闃查噸澶嶆彁浜わ細淇濆瓨涓啀娆$偣鍑荤洿鎺ュ拷鐣�
+ if (this.savingQuestion) {
+ return;
+ }
+ this.savingQuestion = true;
savequestiondetail(obj).then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("鏈嶅姟淇濆瓨鎴愬姛");
@@ -2251,6 +2404,8 @@
});
}
}
+ }).finally(() => {
+ this.savingQuestion = false;
});
},
Torouter() {
@@ -2268,6 +2423,26 @@
if (this.visitCount != 1) {
this.$router.push({
path: "/logisticsservice/again",
+ });
+ } else {
+ this.$router.push({
+ 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({
@@ -2554,6 +2729,11 @@
type: 1,
};
console.log("c", 4);
+ // 闃查噸澶嶆彁浜わ細淇濆瓨涓啀娆$偣鍑荤洿鎺ュ拷鐣�
+ if (this.savingVoice) {
+ return;
+ }
+ this.savingVoice = true;
const orgName = localStorage.getItem("orgname");
console.log(orgName, "orgName");
@@ -2596,6 +2776,8 @@
this.Torouter();
});
}
+ }).finally(() => {
+ this.savingVoice = false;
});
},
// 鍐嶆闅忚鏁版嵁鏇存浛
@@ -2635,7 +2817,8 @@
console.log(this.form.templatename, "templatename");
this.form.remark = this.form.remark || "";
- this.form.doctorOpinion = this.form.doctorOpinion || "";
+ 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;
@@ -3069,6 +3252,14 @@
}
});
},
+ // 鍒囨崲闅忚绫诲瀷鍚庯紝閲嶇疆鍖荤敓澶勭悊鎰忚鐨勬牎楠岀姸鎬侊紙蹇呭~鏉′欢闅忕被鍨嬪彉鍖栵級
+ handleResourceChange() {
+ this.$nextTick(() => {
+ if (this.$refs.zcform) {
+ this.$refs.zcform.clearValidate("doctorOpinion");
+ }
+ });
+ },
// 鍒涘缓鍐嶆闅忚鏈嶅姟
setupsubtask() {
this.$refs["zcform"].validate((valid) => {
@@ -3084,6 +3275,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) {
@@ -4121,6 +4316,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;
@@ -4431,4 +4661,53 @@
margin-bottom: 12px;
}
}
+
+/* 鏈�夐�夐」鎻愮ず锛氬ぇ瀛楅啋鐩彁閱� */
+.unanswered-title {
+ font-size: 22px;
+ font-weight: 700;
+ color: #f56c6c;
+ display: flex;
+ align-items: center;
+}
+.unanswered-title i {
+ font-size: 26px;
+ margin-right: 10px;
+}
+.unanswered-warn {
+ font-size: 20px;
+ font-weight: 600;
+ color: #303133;
+ line-height: 1.8;
+}
+.unanswered-warn strong {
+ color: #f56c6c;
+ font-size: 22px;
+}
+.unanswered-count {
+ font-size: 40px;
+ font-weight: 700;
+ color: #f56c6c;
+ margin: 0 6px;
+ vertical-align: middle;
+}
+.unanswered-list {
+ margin-top: 14px;
+ max-height: 300px;
+ overflow-y: auto;
+ padding: 12px 16px;
+ background: #fef0f0;
+ border: 1px solid #fbc4c4;
+ border-radius: 6px;
+ font-size: 18px;
+ line-height: 2;
+ color: #303133;
+}
+.unanswered-tip {
+ margin-top: 18px;
+ font-size: 22px;
+ font-weight: 700;
+ color: #f56c6c;
+ text-align: center;
+}
</style>
--
Gitblit v1.9.3