From d54ac083e2992a5613f5cb22849db9742dbe9a9b Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 22 十月 2025 11:06:14 +0800
Subject: [PATCH] 问卷联调
---
src/views/followvisit/record/detailpage/index.vue | 191 ++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 161 insertions(+), 30 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index d6164c8..fa48d8a 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -52,6 +52,7 @@
<el-table
:data="logsheetlist"
:row-class-name="tableRowClassName"
+ :max-height="350"
style="width: 100%"
@selection-change="handleSelectionChange"
>
@@ -301,7 +302,7 @@
handleOptionChange(
$event,
index,
- item.svyLibTemplateTargetoptions,
+ item.svyTaskTemplateTargetoptions,
item
)
"
@@ -309,10 +310,11 @@
<el-radio
v-for="(
items, indexs
- ) in item.svyLibTemplateTargetoptions"
+ ) in item.svyTaskTemplateTargetoptions"
:class="items.isabnormal ? 'red-star' : ''"
:key="indexs"
:label="items.optioncontent"
+ @click.native.prevent="handleRadioToggle(item, items.optioncontent)"
>{{ items.optioncontent }}</el-radio
>
</el-radio-group>
@@ -359,7 +361,7 @@
@change="$forceUpdate()"
v-for="(
items, indexs
- ) in item.svyLibTemplateTargetoptions"
+ ) in item.svyTaskTemplateTargetoptions"
:key="indexs"
:label="items.optioncontent"
>
@@ -435,6 +437,7 @@
v-for="(items, index) in item.scriptResult"
:key="items"
:label="items"
+ @click.native.prevent="handleRadioToggle(item, items.optioncontent)"
>{{ items }}</el-radio
>
</el-radio-group>
@@ -687,10 +690,24 @@
/>
</div>
</div>
- <el-form-item label="闅忚璁板綍">
+ <el-form-item label="闅忚鍐呭" v-if="orgname == '涓芥按甯備腑鍖婚櫌'">
+ <el-input type="textarea" v-model="form.remark"></el-input>
+ </el-form-item>
+ <el-form-item label="闅忚璁板綍" v-else>
<el-input type="textarea" v-model="form.remark"></el-input>
</el-form-item>
+ <el-form-item label="闅忚鎯呭喌" v-if="orgname == '涓芥按甯備腑鍖婚櫌'">
+ <el-radio-group v-model="form.taskSituation">
+ <el-radio
+ v-for="city in cities"
+ :label="city.value"
+ :value="city.value"
+ :key="city.value"
+ >{{ city.label }}</el-radio
+ >
+ </el-radio-group>
+ </el-form-item>
<el-form-item label="澶勭悊鎰忚">
<div>
<el-button
@@ -736,6 +753,24 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12"
+ ><el-form-item label="鎬у埆" prop="telcode">
+ <el-select v-model="userform.sex" placeholder="璇烽�夋嫨">
+ <el-option label="鐢�" :value="1"> </el-option>
+ <el-option label="濂�" :value="2"> </el-option>
+ </el-select> </el-form-item
+ ></el-col>
+ <el-col :span="12">
+ <el-form-item label="骞撮緞" prop="name">
+ <el-input
+ v-model="userform.age"
+ placeholder="璇疯緭鍏ュ鍚�"
+ maxlength="20"
+ ></el-input> </el-form-item
+ ></el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="12"
><el-form-item label="鑱旂郴鏂瑰紡" prop="telcode">
<el-input
v-model="userform.telcode"
@@ -749,6 +784,16 @@
v-model="userform.relativetelcode"
placeholder="璇疯緭鍏ュ鍚�"
maxlength="20"
+ ></el-input> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="24">
+ <el-form-item label="璇婃柇鍚嶇О" prop="name">
+ <el-input
+ v-model="form.leavediagname"
+ placeholder="璇疯緭鍏ヨ瘖鏂�"
+ maxlength="50"
></el-input> </el-form-item
></el-col>
</el-row>
@@ -970,6 +1015,21 @@
<el-button type="primary" @click="setupsubtask">纭鍒涘缓鏈嶅姟</el-button>
</div>
</el-dialog>
+ <div class="main-content" v-if="orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�'">
+ <!-- <el-button @click="CaldialogVisible = true">鎵撳紑寮规</el-button> -->
+
+ <!-- 寮规璋冪敤 -->
+ <el-dialog
+ title="鍛煎彨鍔熻兘妗�"
+ :visible.sync="CaldialogVisible"
+ width="60%"
+ >
+ <CallCenterLs
+ ref="callCenterModal"
+ :initial-phone="currentPhoneNumber"
+ />
+ </el-dialog>
+ </div>
</div>
</template>
@@ -995,10 +1055,12 @@
} from "@/api/patient/homepage";
import CallButton from "@/components/CallButton";
import MergeAndModify from "./MergeAndModify.vue";
+import CallCenterLs from "@/components/CallCenterLs";
export default {
components: {
CallButton,
MergeAndModify,
+ CallCenterLs,
},
directives: {
numericOnly: {
@@ -1082,6 +1144,7 @@
// 宸叉湁鏁版嵁...
callStatus: "idle", // idle, calling, connected, ended, failed
isEndingCall: false,
+ CaldialogVisible: false,
currentCall: null, // 褰撳墠閫氳瘽瀵硅薄
input: "浠婂ぉ韬綋杩樹笉閿�",
radio: "2",
@@ -1090,8 +1153,35 @@
voice: "",
templateid: "",
again: "",
+ orgname: "",
zcform: {},
form: {},
+ cities: [
+ {
+ label: "姝e父璇煶",
+ value: "1",
+ },
+ {
+ label: "鎮h�呮嫆鎺ユ垨鎷掕",
+ value: "2",
+ },
+ {
+ label: "闈㈣鎴栬�呮帴璇�",
+ value: "3",
+ },
+ {
+ label: "寰俊闅忚",
+ value: "4",
+ },
+ {
+ label: "闅忚鐢佃瘽涓嶆纭�",
+ value: "5",
+ },
+ {
+ label: "鍏朵粬鎯呭喌涓嶅疁闅忚",
+ value: "6",
+ },
+ ],
tableDatatop: [], //棰樼洰琛�
voiceDatatop: [], //棰樼洰琛�
dynamicTags: [],
@@ -1158,8 +1248,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -1295,6 +1385,7 @@
this.Voicetype = this.$route.query.Voicetype;
this.visitCount = this.$route.query.visitCount;
this.serviceType = this.$route.query.serviceType;
+ this.orgname = localStorage.getItem("orgname");
this.getTaskservelist();
},
@@ -1339,13 +1430,10 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
- this.$modal.msgWarning("360鍔熻兘鏆傛湭寮�閫�");
- return; // 闃绘鍚庣画浠g爜鎵ц
+ // this.$modal.msgWarning("360鍔熻兘鏆傛湭寮�閫�");
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -1473,7 +1561,7 @@
return;
}
}
- var objs = item.svyLibTemplateTargetoptions.find(
+ var objs = item.svyTaskTemplateTargetoptions.find(
(items) => items.optioncontent == item.scriptResult
);
if (obj) {
@@ -1605,8 +1693,13 @@
this.$message.error("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜");
return;
}
-
this.currentPhoneNumber = phone;
+ // 鍛煎彨鍒ゆ柇
+ if (this.orgname == "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�") {
+ this.CaldialogVisible = true;
+ return;
+ }
+
this.callType = type;
this.callStatus = "calling";
@@ -1653,7 +1746,10 @@
}, 3000);
},
yuyingetdetail() {
- this.tableDatatop.forEach((item, index) => {
+ const dataToSubmit = JSON.parse(JSON.stringify(this.tableDatatop));
+
+ dataToSubmit.forEach((item, index) => {
+ // 瀵规嫹璐濈殑鏁版嵁杩涜鎿嶄綔锛屼笉褰卞搷鍘熷鐨� scriptResult 鏁扮粍
item.scriptResult = item.scriptResult.join("&");
item.templatequestionnum = index + 1;
item.subId = this.id;
@@ -1665,8 +1761,9 @@
item.patid = this.patid;
item.templateid = item.templateID;
});
+
let obj = {
- serviceSubtaskDetailList: this.tableDatatop,
+ serviceSubtaskDetailList: dataToSubmit, // 鎻愪氦澶勭悊鍚庣殑鍓湰
param1: this.taskid,
param2: this.patid,
subId: this.id,
@@ -1738,16 +1835,17 @@
getTaskservelist({
patid: this.patid,
subId: id,
+ pageSize: 100,
}).then((res) => {
if (res.code == 200) {
this.form = res.rows[0].serviceSubtaskList.find(
(item) => item.id == this.id
);
- console.log(this.form.serviceType, "serviceType");
+ console.log(this.form, "serviceType");
this.logsheetlist = res.rows[0].serviceSubtaskList;
- this.templateid = this.logsheetlist[0].templateid;
- this.selectedTag = this.logsheetlist[0].excep;
+ this.templateid = this.form.templateid;
+ this.selectedTag = this.form.excep;
const targetDate = new Date(this.form.longSendTime); // 鐩爣鏃ユ湡
const now = new Date(); // 褰撳墠鏃堕棿
if (now < targetDate && this.form.sendstate == 2) {
@@ -1779,7 +1877,7 @@
// 杩欓噷璋冪敤浣犵殑鐭俊鍙戦�� API
// 鍋囪 API 涓� sendMsg锛屽弬鏁板彲鑳介渶瑕佹牴鎹疄闄呮儏鍐佃皟鏁�
sendMsg({
- phone: this.userform.telcode, // 纭繚鐢佃瘽鍙风爜瀛楁姝g‘
+ phone: this.userform.telcode, // 纭繚鐢佃瘽鍙风爜瀛楁姝g‘
content: this.smsContent,
})
.then((res) => {
@@ -1825,6 +1923,7 @@
(item) => item.id == this.id
);
objson.remark = this.form.remark;
+ objson.taskSituation = this.form.taskSituation;
objson.excep = this.selectedTag;
if (sendstate) objson.sendstate = sendstate;
Editsingletaskson(objson).then((res) => {
@@ -1917,7 +2016,7 @@
(item) => item.optioncontent == a
);
} else {
- var obj = this.tableDatatop[b].svyLibTemplateTargetoptions.find(
+ var obj = this.tableDatatop[b].svyTaskTemplateTargetoptions.find(
(item) => item.optioncontent == a
);
}
@@ -1927,6 +2026,23 @@
this.tableDatatop[b].isabnormal = false;
}
this.$forceUpdate();
+ },
+ // 鏂板鐨勫垏鎹㈤�変腑/鍙栨秷閫変腑鏂规硶
+ handleRadioToggle(questionItem, optionValue) {
+ // 濡傛灉鐐瑰嚮鐨勬槸褰撳墠宸查�変腑鐨勯�夐」锛屽垯鍙栨秷閫変腑
+ if (questionItem.scriptResult === optionValue) {
+ questionItem.scriptResult = ""; // 娓呯┖閫変腑鍊�
+ // 鍚屾椂閲嶇疆涓庨�夐」鐩稿叧鐨勭姸鎬�
+ questionItem.isabnormal = false;
+ questionItem.showAppendInput = false;
+ // 娉ㄦ剰锛氬彇娑堥�変腑鏃讹紝鎴戜滑閫氬父涓嶅笇鏈涜Е鍙戦鐩烦杞�昏緫锛屾墍浠ョ洿鎺ヨ繑鍥�
+ // 濡傛灉闇�瑕侊紝鍙互鍦ㄨ繖閲屾坊鍔犲彇娑堥�変腑鍚庣殑鐗瑰畾閫昏緫锛屼緥濡傞噸缃鐩簭鍒�
+ } else {
+ // 濡傛灉鐐瑰嚮鐨勬槸鏈�変腑鐨勯�夐」锛屽垯閫氳繃鏇存敼缁戝畾鍊兼潵瑙﹀彂鍘熷鐨� handleOptionChange 鏂规硶
+ // 杩欓噷鍙渶瑕佹敼鍙� v-model 缁戝畾鐨勫�硷紝change浜嬩欢浼氳嚜鍔ㄨЕ鍙�
+ questionItem.scriptResult = optionValue;
+ // 鍚庣画鐨勮烦杞瓑澶嶆潅閫昏緫浼氬湪 handleOptionChange 涓甯告墽琛�
+ }
},
// 鍦╩ethods閮ㄥ垎锛屼慨鏀筯andleOptionChange鏂规硶:
handleOptionChange(selectedOption, questionIndex, options, a) {
@@ -2022,7 +2138,7 @@
},
overdata() {
this.tableDatatop.forEach((item, index) => {
- var obj = item.svyLibTemplateTargetoptions.find(
+ var obj = item.svyTaskTemplateTargetoptions.find(
(items) => items.optioncontent == item.scriptResult
);
if (obj) {
@@ -2152,6 +2268,16 @@
this.getTaskservelist();
},
},
+ // deactivated() {
+ // console.log(11);
+ // },
+ beforeRouteLeave(to, from, next) {
+ this.$refs.callButton.cleanupResources();
+ next(); // 纭繚璋冪敤 nex
+ },
+ // beforeRouteUpdate() {
+ // console.log(33);
+ // },
};
</script>
@@ -2551,10 +2677,11 @@
margin: 0 10px 20px 10px;
/* 褰撶缉鏀炬瘮渚嬪ぇ浜�100%鎴栧睆骞曞搴﹁緝灏忔椂鏀逛负涓婁笅鎺掑垪 */
- @media screen and (max-width: 1200px), (min-resolution: 1.1dppx) {
+ @media screen and (max-width: 1200px), (min-resolution: 1dppx) {
flex-direction: column;
- .call-action, .manual-action {
+ .call-action,
+ .manual-action {
width: 100% !important;
}
}
@@ -2659,7 +2786,8 @@
margin: 10px;
padding: 15px;
- .topic-dev, .scriptTopic-dev {
+ .topic-dev,
+ .scriptTopic-dev {
margin-bottom: 15px;
}
}
@@ -2692,7 +2820,8 @@
/* 涓虹Щ鍔ㄨ澶囦紭鍖栨粴鍔ㄤ綋楠� */
@media screen and (max-width: 768px) {
- .Followuserinfo, .Followuserinfos {
+ .Followuserinfo,
+ .Followuserinfos {
padding: 15px;
margin: 5px;
}
@@ -2705,18 +2834,20 @@
/* 缂╂斁妫�娴嬫牱寮� */
@media screen and (min-resolution: 1.1dppx),
- screen and (-webkit-min-device-pixel-ratio: 1.1),
- screen and (max-width: 1200px) {
+ screen and (-webkit-min-device-pixel-ratio: 1.1),
+ screen and (max-width: 1200px) {
.action-container {
flex-direction: column;
}
- .call-action, .manual-action {
+ .call-action,
+ .manual-action {
width: 100%;
}
/* 璋冩暣鍐呴儴鍏冪礌闂磋窛 */
- .call-container, .Followuserinfos {
+ .call-container,
+ .Followuserinfos {
margin-bottom: 20px;
}
}
--
Gitblit v1.9.3