From b60394f8417f6565ea673f47375ee33dd17688c0 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期六, 25 十月 2025 10:19:50 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/record/detailpage/index.vue | 360 ++++++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 267 insertions(+), 93 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 45e79a2..c34b48f 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -52,7 +52,7 @@
<el-table
:data="logsheetlist"
:row-class-name="tableRowClassName"
- height="350"
+ :max-height="350"
style="width: 100%"
@selection-change="handleSelectionChange"
>
@@ -314,6 +314,9 @@
:class="items.isabnormal ? 'red-star' : ''"
:key="indexs"
:label="items.optioncontent"
+ @click.native.prevent="
+ handleRadioToggle(item, items.optioncontent)
+ "
>{{ items.optioncontent }}</el-radio
>
</el-radio-group>
@@ -436,6 +439,9 @@
v-for="(items, index) in item.scriptResult"
:key="items"
:label="items"
+ @click.native.prevent="
+ handleRadioToggle(item, items.optioncontent)
+ "
>{{ items }}</el-radio
>
</el-radio-group>
@@ -688,10 +694,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
@@ -737,6 +757,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"
@@ -750,6 +788,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>
@@ -921,14 +969,14 @@
<el-divider></el-divider>
<el-row>
<el-col :span="12">
- <el-form-item label="闅忚鏂瑰紡" prop="date1">
+ <el-form-item label="闅忚鏂瑰紡" prop="visitType">
<el-select
v-model="form.visitType"
filterable
allow-create
default-first-option
@change="visitChange"
- placeholder="璇烽�夋嫨闅忚鏂瑰紡(渚濆嚭闄㈡椂闂存妧璁$畻)"
+ placeholder="璇烽�夋嫨闅忚鏂瑰紡(渚濆嚭闄㈡椂闂磋绠�)"
>
<el-option
v-for="item in options"
@@ -949,6 +997,8 @@
align="right"
v-model="form.date1"
class="custom-disabled"
+ value-format="yyyy-MM-dd"
+ @change="checkFollowupDate"
></el-date-picker>
</el-form-item>
</el-col>
@@ -971,6 +1021,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>
@@ -996,10 +1061,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: {
@@ -1083,6 +1150,7 @@
// 宸叉湁鏁版嵁...
callStatus: "idle", // idle, calling, connected, ended, failed
isEndingCall: false,
+ CaldialogVisible: false,
currentCall: null, // 褰撳墠閫氳瘽瀵硅薄
input: "浠婂ぉ韬綋杩樹笉閿�",
radio: "2",
@@ -1091,8 +1159,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: [],
@@ -1127,7 +1222,23 @@
resource: [
{ required: true, message: "璇烽�夋嫨闅忚鏂瑰紡", trigger: "change" },
],
- date1: [{ required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" }],
+ date1: [
+ { required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" },
+ {
+ validator: (rule, value, callback) => {
+ if (!value) {
+ return callback(new Error("璇烽�夋嫨闅忚鏃堕棿"));
+ }
+ const selectedDate = new Date(value);
+ const now = new Date();
+ if (selectedDate < now) {
+ return callback(new Error("闅忚鏃堕棿涓嶈兘鏃╀簬褰撳墠鏃ユ湡"));
+ }
+ callback();
+ },
+ trigger: "change",
+ },
+ ],
},
userrules: {
telcode: [{ validator: validatePhone, trigger: "blur" }],
@@ -1159,8 +1270,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",
@@ -1172,56 +1283,56 @@
// 绂佺敤浠婂ぉ鍙婁箣鍓嶇殑鏃ユ湡
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);
- },
- },
- ],
+ // 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: [
{
@@ -1296,6 +1407,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();
},
@@ -1343,10 +1455,7 @@
// 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");
@@ -1379,35 +1488,64 @@
},
// 鍐嶆闅忚鏃堕棿閫夊彇
visitChange(value) {
- // 鏍规嵁閫夋嫨鐨勯殢璁挎柟寮忚缃椂闂�
+ if (!this.form.endtime) {
+ this.$message.warning("璇峰厛纭鍑洪櫌鏃堕棿");
+ this.form.visitType = "";
+ this.$refs.zcform.clearValidate(["visitType"]);
+ return;
+ }
+
+ const dischargeDate = new Date(this.form.endtime);
const now = new Date();
+ let followupDate = new Date(dischargeDate);
+
+ // 鏍规嵁閫夋嫨鐨勯殢璁挎柟寮忚绠楅殢璁挎棩鏈�
if (value.includes("涓冨ぉ鍚�")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 7
- );
+ followupDate.setDate(dischargeDate.getDate() + 7);
} else if (value.includes("15澶╁悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 15
- );
+ followupDate.setDate(dischargeDate.getDate() + 15);
} else if (value.includes("涓�涓湀鍚�")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 30
- );
+ followupDate.setMonth(dischargeDate.getMonth() + 1);
} else if (value.includes("涓変釜鏈堝悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 90
- );
+ followupDate.setMonth(dischargeDate.getMonth() + 3);
} else if (value.includes("鍏釜鏈堝悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 180
- );
+ followupDate.setMonth(dischargeDate.getMonth() + 6);
} else if (value.includes("涓�骞村悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 365
+ followupDate.setFullYear(dischargeDate.getFullYear() + 1);
+ }
+
+ if (followupDate < now) {
+ this.$message.warning(
+ `璁$畻鍑虹殑闅忚鏃堕棿 ${this.formatTime(followupDate)} 宸茶繃鏈焋
);
+ this.form.visitType = "";
+ this.$refs.zcform.clearValidate(["visitType", "date1"]);
+ return;
+ }
+
+ this.form.date1 = this.formatTime(followupDate);
+
+ this.$refs.zcform.clearValidate(["date1"]);
+ },
+ // 妫�鏌ラ殢璁挎棩鏈熸槸鍚︽湁鏁�
+ checkFollowupDate(date) {
+ console.log(date);
+
+ if (!date) {
+ this.form.date1 = '';
+ this.$refs.zcform.clearValidate(["date1"]);
+ return;
+ }
+
+ const selectedDate = new Date(date);
+ const now = new Date();
+
+ if (selectedDate < now) {
+ this.$message.warning("闅忚鏃堕棿涓嶈兘鏃╀簬褰撳墠鏃ユ湡");
+ this.form.date1 = '';
+ this.$refs.zcform.validateField("date1"); // 瑙﹀彂楠岃瘉
}
},
-
// 鑾峰彇璇煶鏁版嵁
getPersonVoices(id) {
let obj = {
@@ -1519,7 +1657,7 @@
this.$modal
.confirm(
'浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
- this.logsheetlist[0].sendname +
+ this.userform.name +
'"鍐嶆闅忚锛�',
"纭",
{
@@ -1606,8 +1744,13 @@
this.$message.error("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜");
return;
}
-
this.currentPhoneNumber = phone;
+ // 鍛煎彨鍒ゆ柇
+ if (this.orgname == "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�") {
+ this.CaldialogVisible = true;
+ return;
+ }
+
this.callType = type;
this.callStatus = "calling";
@@ -1654,7 +1797,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;
@@ -1666,8 +1812,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,
@@ -1726,7 +1873,16 @@
formtidy() {
this.form.visitType2 = this.form.visitType;
this.form.date2 = this.form.longSendTime;
+ // this.form.date1 = this.setCurrentDate();
this.form.remark2 = this.form.remark;
+ },
+ setCurrentDate() {
+ // 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� yyyy-MM-dd
+ const today = new Date();
+ const year = today.getFullYear();
+ const month = String(today.getMonth() + 1).padStart(2, "0");
+ const day = String(today.getDate()).padStart(2, "0");
+ return `${year}-${month}-${day}`;
},
// 鑾峰彇鎮h�呰褰�
getTaskservelist(id) {
@@ -1745,11 +1901,11 @@
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) {
@@ -1827,6 +1983,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) => {
@@ -1888,11 +2045,11 @@
this.$modal
.confirm('鏄惁鏌ョ湅浠诲姟涓�"' + row.taskName + '"鐨勬湇鍔¤鎯呮暟鎹紵')
.then(() => {
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
- this.Voicetype = 1;
- }
- }
+ let type = "";
+ console.log(row, "rwo");
+ if (row.type == 1) {
+ type = 1;
+ }
this.taskid = row.taskid;
this.id = row.id;
this.patid = row.patid;
@@ -1929,6 +2086,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) {
@@ -2563,7 +2737,7 @@
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,
--
Gitblit v1.9.3