From 741805d8daa2d2baa0b6b75bc1724488baf9c6bc Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 15 六月 2026 14:55:10 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/record/detailpage/index.vue | 323 ++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 219 insertions(+), 104 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index cfe9b61..1dfa1a7 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -95,43 +95,45 @@
>
</el-table-column>
<el-table-column
- prop="sendstate"
+ label="闅忚鐘舵��"
align="center"
- width="200"
- label="浠诲姟鐘舵��"
+ key="sendstateView"
+ prop="sendstateView"
+ width="120"
>
<template slot-scope="scope">
- <div v-if="scope.row.sendstate == 1">
- <el-tag type="primary" :disable-transitions="false"
- >琛ㄥ崟宸查鍙�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstate == 2">
- <el-tag type="primary" :disable-transitions="false"
- >寰呴殢璁�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstate == 3">
- <el-tag type="success" :disable-transitions="false"
- >琛ㄥ崟宸插彂閫�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstate == 4">
- <el-tag type="info" :disable-transitions="false">涓嶆墽琛�</el-tag>
- </div>
- <div v-if="scope.row.sendstate == 5">
- <el-tag type="danger" :disable-transitions="false"
- >鍙戦�佸け璐�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstate == 6">
- <el-tag type="success" :disable-transitions="false"
- >宸插畬鎴�</el-tag
- >
- </div>
- <div v-if="scope.row.sendstate == 7">
- <el-tag type="danger" :disable-transitions="false">瓒呮椂</el-tag>
- </div>
+ <el-tooltip
+ class="item"
+ effect="dark"
+ :content="scope.row.remark"
+ placement="top-start"
+ >
+ <div v-if="scope.row.sendstateView == 1">
+ <el-tag type="primary" :disable-transitions="false"
+ >寰呴殢璁�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstateView == 2">
+ <el-tag type="primary" :disable-transitions="false"
+ >闅忚涓�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstateView == 3">
+ <el-tag type="warning" :disable-transitions="false"
+ >鏈畬鎴�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstateView == 4">
+ <el-tag type="success" :disable-transitions="false"
+ >宸插畬鎴�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstateView == 5">
+ <el-tag type="danger" :disable-transitions="false"
+ >鏃犻渶闅忚</el-tag
+ >
+ </div>
+ </el-tooltip>
</template>
</el-table-column>
<el-table-column
@@ -142,6 +144,18 @@
show-overflow-tooltip
>
</el-table-column>
+ <el-table-column
+ v-if="orgname == '鍗楀崕澶у闄勫睘绗竴鍖婚櫌'"
+ label="鍏ラ櫌鏃ユ湡"
+ width="200"
+ align="center"
+ key="starttime"
+ prop="starttime"
+ >
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.starttime) }}</span>
+ </template></el-table-column
+ >
<el-table-column
label="鍑洪櫌鏃ユ湡"
width="200"
@@ -153,6 +167,7 @@
<span>{{ formatTime(scope.row.endtime) }}</span>
</template></el-table-column
>
+
<el-table-column
label="璐d换鎶ゅ+"
width="120"
@@ -262,9 +277,33 @@
<!-- 闅忚鍐呭 -->
<div class="call-action">
<div class="call-container">
- <!-- <div class="call-header">
- <h2>涓�閿懠鍙姛鑳�</h2>
- </div> -->
+ <div
+ style="display: flex"
+ v-if="orgname == '鍗楀崕澶у闄勫睘绗竴鍖婚櫌' && !Voicetype"
+ >
+ <template-selector
+ v-model="form.templateid"
+ :templateName="form.templatename"
+ :service-type="form.serviceType"
+ :is-editable="form.sendState !== 2"
+ @select="handleTemplateSelect"
+ @clear="handleTemplateClear"
+ />
+ <div
+ v-if="defaultKey"
+ style="
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+ padding: 33px 0 0 50px;
+ "
+ >
+ <el-button type="success" round @click="handleConfirmReplace">
+ 榛樿濉厖
+ </el-button>
+ </div>
+ </div>
<div class="headline">
<div>闅忚鍐呭</div>
@@ -291,9 +330,14 @@
v-if="item.scriptType == 1 && !item.astrict"
>
<div class="dev-text">
- {{ index + 1 }}銆乕鍗曢�塢<span>{{
- item.scriptContent
- }}</span>
+ {{ index + 1 }}. [鍗曢�塢
+
+ <span> {{ item.scriptContent }}</span>
+ <span style="margin-left: 20px"
+ ><dict-tag
+ :options="dict.type.dimensionality_type"
+ :value="item.dimension"
+ /></span>
</div>
<div class="dev-xx">
<el-radio-group v-model="item.scriptResult">
@@ -344,9 +388,14 @@
v-if="item.scriptType == 2 && !item.astrict"
>
<div class="dev-text">
- {{ index + 1 }}銆乕澶氶�塢<span>{{
+ {{ index + 1 }}. [澶氶�塢<span>{{
item.scriptContent
}}</span>
+ <span style="margin-left: 20px"
+ ><dict-tag
+ :options="dict.type.dimensionality_type"
+ :value="item.dimension"
+ /></span>
</div>
<div class="dev-xx">
<el-checkbox-group
@@ -378,9 +427,14 @@
v-if="item.scriptType == 4 && !item.astrict"
>
<div class="dev-text">
- {{ index + 1 }}銆乕闂瓟]<span>{{
+ {{ index + 1 }}. [闂瓟]<span>{{
item.scriptContent
}}</span>
+ <span style="margin-left: 20px"
+ ><dict-tag
+ :options="dict.type.dimensionality_type"
+ :value="item.dimension"
+ /></span>
<span v-if="item.valueType == 3">(鍙兘杈撳叆鏁板瓧)</span>
</div>
<div class="dev-xx" v-if="item.valueType == 3">
@@ -414,9 +468,8 @@
>
<div v-if="item.targetvalue">
<div class="dev-text">
- {{ index + 1 }}銆乕鍗曢�塢<span>{{
- item.questiontext
- }}</span>
+ {{ index + 1 }}. [鍗曢�塢
+ <span>{{ item.questiontext }}</span>
</div>
<div class="dev-xx">
<el-radio-group
@@ -447,7 +500,7 @@
<div class="scriptTopic-dev" :key="index" v-else>
<div class="dev-text">
- {{ index + 1 }}銆乕闂瓟]<span>{{
+ {{ index + 1 }}. [闂瓟]<span>{{
item.questiontext
}}</span>
<span v-if="item.valueType == 3">(鍙兘杈撳叆鏁板瓧)</span>
@@ -793,7 +846,13 @@
</el-form-item>
<!-- 闅忚鎯呭喌 -->
- <el-form-item label="闅忚鎯呭喌" v-if="orgname == '涓芥按甯備腑鍖婚櫌'">
+ <el-form-item
+ label="闅忚鎯呭喌"
+ v-if="
+ orgname == '涓芥按甯備腑鍖婚櫌' ||
+ orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�'
+ "
+ >
<el-radio-group v-model="form.taskSituation">
<el-radio
v-for="city in cities"
@@ -1157,7 +1216,10 @@
savequestiondetail,
addPersonVoices,
query360PatInfo,
+ updateTemplate,
+ query360PatInfonh,
sendMsg,
+ getconfigKey,
} from "@/api/AiCentre/index";
import {
messagelistpatient,
@@ -1165,6 +1227,7 @@
listcontactinformation,
} from "@/api/patient/homepage";
import CallButton from "@/components/CallButton";
+import TemplateSelector from "@/components/optionalModule";
import MergeAndModify from "./MergeAndModify.vue";
import CallCenterLs from "@/components/CallCenterLs";
import store from "@/store";
@@ -1173,6 +1236,7 @@
CallButton,
MergeAndModify,
CallCenterLs,
+ TemplateSelector,
},
directives: {
numericOnly: {
@@ -1237,6 +1301,7 @@
},
dicts: [
"sys_normal_disable",
+ "dimensionality_type",
"quickfollow_up",
"sys_user_sex",
"sys_yujing",
@@ -1258,6 +1323,7 @@
return {
visitAgain: 1,
userid: "",
+ defaultKey: false, //鏄惁鍙粯璁ゅ~鎶�
currentPhoneNumber: "",
callType: "", // 鐢ㄤ簬鍖哄垎鏄摢涓數璇�
isSipRegistering: true, // SIP娉ㄥ唽鐘舵��
@@ -1295,6 +1361,7 @@
showContinuationCareBtn: false, // 鎺у埗寤剁画鎶ょ悊鎸夐挳鏄剧ず
// 璺敱鐩戝惉鐩稿叧
routeWatcher: null,
+
lastRoutePath: this.$route.path,
input: "浠婂ぉ韬綋杩樹笉閿�",
radio: "2",
@@ -1439,56 +1506,6 @@
// 绂佺敤浠婂ぉ鍙婁箣鍓嶇殑鏃ユ湡
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000;
},
- // shortcuts: [
- // {
- // text: "涓冨ぉ鍚�",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
- // picker.$emit("pick", date);
- // },
- // },
- // {
- // text: "15澶╁悗",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 15);
- // picker.$emit("pick", date);
- // },
- // },
- // {
- // text: "涓�涓湀鍚�",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 30);
- // picker.$emit("pick", date);
- // },
- // },
- // {
- // text: "涓変釜鏈堝悗",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 90);
- // picker.$emit("pick", date);
- // },
- // },
- // {
- // text: "鍏釜鏈堝悗",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 180);
- // picker.$emit("pick", date);
- // },
- // },
- // {
- // text: "涓�骞村悗",
- // onClick(picker) {
- // const date = new Date();
- // date.setTime(date.getTime() + 3600 * 1000 * 24 * 365);
- // picker.$emit("pick", date);
- // },
- // },
- // ],
},
options: [
{
@@ -1577,7 +1594,6 @@
this.visitAgain = store.getters.visitAgain;
console.log(store.getters.visitAgain);
-
this.orgname = localStorage.getItem("orgname");
if (this.orgname == "鐪佺珛鍚屽痉缈犺嫅闄㈠尯") {
this.showContinuationCareBtn = true;
@@ -1612,6 +1628,7 @@
];
}
this.getTaskservelist();
+ this.getconfigKey();
},
mounted() {
// 鐩戝惉瀛愮粍浠剁殑sipStatus灞炴�у彉鍖�
@@ -1651,7 +1668,30 @@
return "scriptTopic-dev"; // 姝e父 - 榛樿鏍峰紡
}
},
+ getconfigKey() {
+ getconfigKey("default.value.icon").then((res) => {
+ if (res.msg) {
+ if (
+ this.getAssignArr(res.msg).includes(this.$store.state.user.name) ||
+ this.$store.state.user.name == "admin"
+ ) {
+ this.defaultKey = true;
+ } else {
+ this.defaultKey = false;
+ }
+ }
+ });
+ },
+ getAssignArr(rule) {
+ let arr = [];
+ let assiginArr = rule.split(",");
+ for (let i = 0; i < assiginArr.length; i++) {
+ arr[i] = assiginArr[i];
+ }
+ arr.sort(this.compare);
+ return arr;
+ },
// 鑾峰彇閫夐」鏍峰紡绫�
getOptionClass(items) {
if (items.isabnormal == 1) {
@@ -1728,8 +1768,8 @@
const orgname = localStorage.getItem("orgname");
if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
query360PatInfonh(id).then((res) => {
- if (res.url) {
- window.open(res.url, "_blank");
+ if (res.data) {
+ window.open(res.data, "_blank");
} else {
this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
}
@@ -1952,7 +1992,11 @@
this.Editsingletasksonyic(this.serviceStates);
const orgName = localStorage.getItem("orgname");
- if (this.form.isVisitAgain != 1 || orgName == "涓芥按甯備腑鍖婚櫌"||this.visitAgain==1) {
+ if (
+ this.form.isVisitAgain != 1 ||
+ orgName == "涓芥按甯備腑鍖婚櫌" ||
+ this.visitAgain == 1
+ ) {
this.Torouter();
return;
}
@@ -2036,6 +2080,68 @@
message: "璇疯緭鍏ユ纭殑鐢佃瘽鍙风爜锛堟墜鏈哄彿鎴栧甫鍖哄彿鐨勫浐瀹氱數璇濓級",
};
}
+ },
+ handleTemplateSelect(templateData) {
+ console.log("閫夋嫨浜嗘ā鏉�:", templateData);
+ // 澶勭悊妯℃澘閫夋嫨閫昏緫
+ let templateobj = templateData.templateData;
+ templateobj.templateid = templateobj.svyid;
+ templateobj.taskid = this.form.taskid;
+ templateobj.isoperation = 1;
+ templateobj.svyTaskTemplateScriptVOS = templateobj.svyTemplateLibScripts;
+ templateobj.svyTaskTemplateScriptVOS.forEach((item) => {
+ item.taskid = this.form.taskid;
+ item.templateid = item.svyid;
+ item.svyTaskTemplateTargetoptions = item.svyLibTemplateTargetoptions;
+ });
+ let obj = {
+ subId: this.form.id,
+ svyTaskTemplateVO: templateobj,
+ };
+ updateTemplate(obj).then((res) => {
+ if (res.code) {
+ location.reload();
+ this.$modal.msgSuccess("妯℃澘淇敼鎴愬姛");
+ } else {
+ }
+ });
+ },
+
+ handleTemplateClear() {
+ console.log("娓呴櫎浜嗘ā鏉块�夋嫨");
+ },
+ handleConfirmReplace() {
+ // 閬嶅巻鎵�鏈夐鐩紙tableDatatop锛�
+ this.tableDatatop.forEach((item) => {
+ // 鍙鐞嗘湭濉姤鐨勯鐩紙scriptResult 涓虹┖鎴栫┖鏁扮粍锛�
+ if (
+ !item.scriptResult ||
+ (Array.isArray(item.scriptResult) && item.scriptResult.length === 0)
+ ) {
+ // 鏌ユ壘閫夐」涓� defaultValue 涓� 2 鐨勯�夐」
+ const defaultOption = item.svyTaskTemplateTargetoptions?.find(
+ (opt) => opt.defaultValue == 2
+ );
+ console.log(item);
+
+ if (defaultOption) {
+ // 鏍规嵁棰樼洰绫诲瀷璧嬪��
+ if (item.scriptType === "1") {
+ // 鍗曢�夐锛氱洿鎺ヨ祴鍊间负 optioncontent 瀛楃涓�
+ item.scriptResult = defaultOption.optioncontent;
+ } else if (item.scriptType === "2") {
+ // 澶氶�夐锛氳祴鍊间负鍖呭惈 optioncontent 鐨勬暟缁�
+ item.scriptResult = [defaultOption.optioncontent];
+ } else if (item.scriptType === "4") {
+ // 濉┖棰橈細涓�鑸病鏈夐�夐」锛屼絾濡傛灉鏈夊垯璧嬪��
+ item.scriptResult = defaultOption.optioncontent;
+ }
+
+ // 瑙﹀彂瑙嗗浘鏇存柊锛堝洜涓� Vue 鍙兘鏃犳硶妫�娴嬪埌娣卞眰宓屽瀵硅薄鐨勫彉鍖栵級
+ this.$forceUpdate();
+ }
+ }
+ });
},
// 浣跨敤绀轰緥
isValidPhone(phone) {
@@ -2149,7 +2255,11 @@
const orgName = localStorage.getItem("orgname");
console.log(orgName, "orgName");
- if (this.form.isVisitAgain != 1 || orgName == "涓芥按甯備腑鍖婚櫌"||this.visitAgain==1) {
+ if (
+ this.form.isVisitAgain != 1 ||
+ orgName == "涓芥按甯備腑鍖婚櫌" ||
+ this.visitAgain == 1
+ ) {
this.Torouter();
return;
}
@@ -2214,14 +2324,16 @@
this.form = res.rows[0].serviceSubtaskList.find(
(item) => item.id == this.id
);
+ console.log(this.form.templatename, "templatename");
+
this.form.remark = this.form.remark || "";
this.logsheetlist = res.rows[0].serviceSubtaskList;
this.templateid = this.form.templateid;
this.selectedTag = this.form.excep;
const targetDate = new Date(this.form.visitTime); // 鐩爣鏃ユ湡
const now = new Date(); // 褰撳墠鏃堕棿
- console.log(now,'褰撳墠鏃堕棿');
- console.log(targetDate,'鐩爣鏃ユ湡');
+ console.log(now, "褰撳墠鏃堕棿");
+ console.log(targetDate, "鐩爣鏃ユ湡");
if (now < targetDate && this.form.sendstate == 2) {
this.$confirm("褰撳墠鏈嶅姟鏈埌鍙戦�佹椂闂磋璋ㄦ厧淇敼", "鎻愮ず", {
@@ -2278,6 +2390,8 @@
if (res.code == 200) {
objson = res.rows[0].serviceSubtaskList[0];
objson.suggest = son;
+ objson.remark = this.form.remark;
+ objson.taskSituation = this.form.taskSituation;
Editsingletaskson(objson).then((res) => {
if (res.code) {
this.$modal.msgSuccess("鏈嶅姟璁板綍鎴愬姛");
@@ -3052,6 +3166,7 @@
.dev-text {
margin-bottom: 10px;
+ display: flex;
}
}
}
--
Gitblit v1.9.3