From 91f78c7a3c325b7627f269524cdf92f006948cdf Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 20 十月 2025 17:37:35 +0800
Subject: [PATCH] 景宁电话接入
---
src/views/patient/propaganda/Missioncreation.vue | 204 ++++++++++++++++++++++++++++++++++----------------
1 files changed, 138 insertions(+), 66 deletions(-)
diff --git a/src/views/patient/propaganda/Missioncreation.vue b/src/views/patient/propaganda/Missioncreation.vue
index 2c5ed42..f666f1a 100644
--- a/src/views/patient/propaganda/Missioncreation.vue
+++ b/src/views/patient/propaganda/Missioncreation.vue
@@ -124,14 +124,33 @@
</el-select> </el-form-item
></el-col>
</el-row>
- <el-form-item label="鍙戦�佽缃細" v-if="currenttype != 2">
+ <el-form-item label="鎵ц鍛ㄦ湡" prop="longTask">
+ <el-radio-group v-model="form.longTask">
+ <el-radio :label="0">鑷畾涔夊懆鏈�</el-radio>
+ <el-radio :label="1">闀挎湡浠诲姟</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-row :gutter="20" v-if="form.longTask">
+ <el-col :span="8">
+ <el-form-item label="鍛ㄦ湡鏃堕棿" prop="name">
+ <el-input
+ v-model="form.sendDay"
+ placeholder="榛樿5澶╁悗"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-form-item label="鎵ц璁剧疆" v-if="!form.longTask">
<el-radio-group v-model="form.sendType">
<el-radio :label="1">鏃堕棿娈靛彂閫�</el-radio>
<el-radio :label="3">鏃堕棿鐐瑰彂閫�</el-radio>
<el-radio :label="2">鍗冲埢鍙戦��</el-radio>
</el-radio-group>
</el-form-item>
- <el-form-item label="鍙戦�佹棩鏈燂細" v-if="form.sendType == 1">
+ <el-form-item
+ label="鎵ц鏃ユ湡锛�"
+ v-if="form.sendType == 1 && !form.longTask"
+ >
<el-date-picker
v-model="daytime"
@change="changeTimeday"
@@ -144,7 +163,10 @@
</el-date-picker>
</el-form-item>
- <el-form-item label="鍙戦�佹椂闂寸偣锛�" v-if="form.sendType == 3">
+ <el-form-item
+ label="鎵ц鏃堕棿鐐癸細"
+ v-if="form.sendType == 3 && !form.longTask"
+ >
<div style="display: flex">
<div style="margin-right: 10px">
<el-date-picker
@@ -159,7 +181,10 @@
</div>
</el-form-item>
- <el-form-item label="鍙戦�佹椂闂存锛�" v-if="form.sendType == 1">
+ <el-form-item
+ label="鎵ц鏃堕棿娈碉細"
+ v-if="form.sendType == 1 && !form.longTask"
+ >
<div style="display: flex">
<div style="margin-right: 10px">
<span style="font-size: 18px; margin-right: 10px">鈶�</span>
@@ -390,7 +415,6 @@
icon="el-icon-upload2"
size="medium"
@click="handleImport"
-
>瀵煎叆</el-button
>
</el-col>
@@ -514,11 +538,19 @@
<!-- 妯℃澘棰勮 -->
<el-dialog title="妯℃澘棰勮" :visible.sync="previewtf" width="60%">
<div class="preview-left">
- <!-- 鍗曢�� -->
- <div v-html="htmlRichText"></div>
+ <!-- 鏍规嵁妯℃澘绫诲瀷鏄剧ず涓嶅悓鍐呭 -->
+ <div v-if="currentTemplateType == '2'">
+ <!-- 閫氱煡妯℃澘鍙樉绀虹函鏂囨湰鍐呭 -->
+ <div style="white-space: pre-wrap; font-size: 16px; line-height: 1.6">
+ {{ plainTextContent }}
+ </div>
+ </div>
+ <div v-else>
+ <!-- 鍏朵粬绫诲瀷妯℃澘鏄剧ず瀵屾枃鏈唴瀹� -->
+ <div v-html="htmlRichText"></div>
+ </div>
</div>
<span slot="footer" class="dialog-footer">
- <!-- <el-button @click="previewGo">鍓嶅線妯℃澘璇︽儏淇敼</el-button> -->
<el-button type="primary" @click="previewFn">纭浣跨敤</el-button>
</span>
</el-dialog>
@@ -590,13 +622,16 @@
<el-table :data="uploadingData" style="width: 100%">
<el-table-column prop="serial" label="鎮h�卛d"> </el-table-column>
- <el-table-column prop="name" label="濮撳悕"
- width="100"> </el-table-column>
- <el-table-column prop="sex" label="鎬у埆"width="100"> </el-table-column>
- <el-table-column prop="idcardno" width="300" label="璇佷欢鍙风爜"> </el-table-column>
+ <el-table-column prop="name" label="濮撳悕" width="100">
+ </el-table-column>
+ <el-table-column prop="sex" label="鎬у埆" width="100">
+ </el-table-column>
+ <el-table-column prop="idcardno" width="300" label="璇佷欢鍙风爜">
+ </el-table-column>
<el-table-column prop="goday" label="鍑虹敓鏃ユ湡"> </el-table-column>
- <el-table-column prop="telcode" width="200" label="鑱旂郴鏂瑰紡"> </el-table-column>
- <el-table-column prop="createTime" width="200" label="鍒涘缓鏃ユ湡">
+ <el-table-column prop="telcode" width="200" label="鑱旂郴鏂瑰紡">
+ </el-table-column>
+ <el-table-column prop="createTime" width="200" label="鍒涘缓鏃ユ湡">
</el-table-column>
</el-table>
<!-- <pagination
@@ -637,26 +672,20 @@
<el-form-item label="瀹f暀鍚嶇О">
<el-input v-model="topqueryParams.preachname"></el-input>
</el-form-item>
- <el-form-item label="瀹f暀鍒嗙被" prop="region">
+ <el-form-item label="瀹f暀绫诲瀷" prop="region">
<el-select
- v-model="topqueryParams.assortid"
+ v-model="topqueryParams.hetype"
size="medium"
filterable
placeholder="璇烽�夋嫨鍒嗙被"
>
- <el-option-group
- v-for="group in sortlist"
- :key="group.id"
- :label="group.assortname"
+ <el-option
+ v-for="item in heLibraryAssortList"
+ :key="item.id"
+ :label="item.value"
+ :value="item.id"
>
- <el-option
- v-for="item in group.heLibraryAssortList"
- :key="item.id"
- :label="item.assortname"
- :value="item.id"
- >
- </el-option>
- </el-option-group>
+ </el-option>
</el-select>
</el-form-item>
@@ -751,6 +780,8 @@
return {
title: "瀹f暀鍐呭鍒楄〃",
currenttype: 1, //1瀹f暀2闂ㄨ瘖3鍑洪櫌4澶嶈瘖5浣撴6闂嵎
+ currentTemplateType: "", // 褰撳墠妯℃澘绫诲瀷
+ plainTextContent: "", // 绾枃鏈唴瀹�
id: "", //
previewid: "", //浠诲姟妯℃澘浼犻�抜d
libName: "",
@@ -800,7 +831,7 @@
tableLabelxj: [
{ label: "鍒涘缓浜�", width: "", prop: "createBy" },
{ label: "瀹f暀鍚嶇О", width: "180", prop: "preachname" },
- { label: "瀹f暀鎻忚堪", width: "180", prop: "preachcontent" },
+ { label: "瀹f暀鍐呭", width: "180", prop: "preachcontent" },
// { label: "瀹f暀褰㈠紡", width: "", prop: "playType" },
{ label: "閫傜敤鏂瑰紡", width: "", prop: "suitway" },
{ label: "淇敼鏃ユ湡", width: "", prop: "uploadTime" },
@@ -914,15 +945,23 @@
],
variableListTime: [],
sortlist: [],
+ heLibraryAssortList: [
+ { id: 1, value: "瀹f暀" },
+ { id: 2, value: "閫氱煡" },
+ ],
tasktopic: null, //鏂板绫诲瀷
SelectPatientslist: [],
form: {
patTaskRelevances: [],
sendType: 1,
+ longTask: 0,
templatename: "",
templateid: null,
libtemplateid: null,
- kcb: "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸"+localStorage.getItem("orgname")+"鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瑙傜湅杩欎唤瀹f暀璧勮銆�",
+ kcb:
+ "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸" +
+ localStorage.getItem("orgname") +
+ "鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瑙傜湅杩欎唤瀹f暀璧勮銆�",
jsy: "鐢熸椿涓婅鍔抽�哥粨鍚堬紝娉ㄦ剰浼戞伅鍜岃惀鍏伙紝閫傚綋閿荤偧锛屾垝鐑熼檺閰掞紝淇濇寔蹇冩儏鑸掔晠锛屽畾鏈熷璇娿�傞偅鏈瀹f暀鍐呭灏卞埌杩欓噷锛岀鎮ㄨ韩浣撳仴搴凤紒",
},
taskoptions: [
@@ -970,7 +1009,7 @@
this.belongDepts = store.getters.belongDepts;
this.form.typename = this.$route.query.typename;
this.form.serviceType = Number(this.$route.query.serviceType);
- this.listDept();
+ // this.listDept();
this.Acquisitiontype();
this.Getdetails();
this.getheLibraryAssort();
@@ -1087,7 +1126,7 @@
submitForm(formName) {
this.form.preachform = this.checkList.join(",");
// this.formatFn(1);
- if (!this.form.patTaskRelevances[0]) {
+ if (!this.form.patTaskRelevances[0]&&this.form.longTask==0) {
this.$modal.msgError("璇烽�夋嫨鐥呬汉");
return;
}
@@ -1105,7 +1144,7 @@
this.form.isoperation = 2;
} else {
this.form.isoperation = 1;
- this.form.sendState=1;
+ this.form.sendState = 1;
}
if (!this.form.type) {
this.form.type = this.$route.query.type;
@@ -1133,28 +1172,33 @@
// ----------------------琛ㄦ牸瀛愮粍浠朵簨浠�
// 閫夋嫨妯℃澘骞堕瑙�
selectfn(row, type) {
- // 妯℃澘鎯呭喌涓嬭幏鍙栨ā鏉夸俊鎭�
this.libName = row.preachname;
this.htmlRichText = null;
this.libId = row.id;
- console.log(row, "row");
this.Tasktemplate = row;
+
+ // 璁剧疆褰撳墠妯℃澘绫诲瀷
+ this.currentTemplateType = row.hetype || "1"; // 榛樿涓哄鏁欑被鍨�
+
this.previewtf = true;
this.previewid = row.svyid;
- console.log(this.questionList, "questionList");
- // this.Variablehandling(row.svyLibScripts, 1);
- console.log(row.htmlRichText);
- axios
- .get(row.htmlRichText)
- .then((response) => {
- console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
- this.htmlRichText = response.data;
- this.htmlRichText = this.addStyleToImages(this.htmlRichText);
- })
- .catch((error) => {
- this.$modal.msgError("鑾峰彇瀵屾枃鏈け璐�");
- console.error("Failed to fetch file:", error);
- });
+
+ if (this.currentTemplateType == "2") {
+ // 濡傛灉鏄�氱煡妯℃澘锛岃幏鍙栫函鏂囨湰鍐呭
+ this.plainTextContent = row.preachcontent;
+ } else {
+ // 鍏朵粬绫诲瀷妯℃澘鑾峰彇瀵屾枃鏈唴瀹�
+ axios
+ .get(row.htmlRichText)
+ .then((response) => {
+ this.htmlRichText = response.data;
+ this.htmlRichText = this.addStyleToImages(this.htmlRichText);
+ })
+ .catch((error) => {
+ this.$modal.msgError("鑾峰彇瀵屾枃鏈け璐�");
+ console.error("Failed to fetch file:", error);
+ });
+ }
},
// 棰勮妯℃澘
previewfnm() {
@@ -1165,16 +1209,24 @@
this.Tasktemplate = res.rows[0];
this.previewtf = true;
this.previewid = res.rows[0].svyid;
- axios
- .get(res.rows[0].htmlRichText)
- .then((response) => {
- this.htmlRichText = response.data;
- this.htmlRichText = this.addStyleToImages(this.htmlRichText);
- })
- .catch((error) => {
- this.$modal.msgError("鑾峰彇瀵屾枃鏈け璐�");
- console.error("Failed to fetch file:", error);
- });
+ this.currentTemplateType = res.rows[0].hetype || "1"; // 榛樿涓哄鏁欑被鍨�
+
+ if (this.currentTemplateType == "2") {
+ // 濡傛灉鏄�氱煡妯℃澘锛岃幏鍙栫函鏂囨湰鍐呭
+ this.plainTextContent = res.rows[0].preachcontent;
+ } else {
+ // 鍏朵粬绫诲瀷妯℃澘鑾峰彇瀵屾枃鏈唴瀹�
+ axios
+ .get(res.rows[0].htmlRichText)
+ .then((response) => {
+ this.htmlRichText = response.data;
+ this.htmlRichText = this.addStyleToImages(this.htmlRichText);
+ })
+ .catch((error) => {
+ this.$modal.msgError("鑾峰彇瀵屾枃鏈け璐�");
+ console.error("Failed to fetch file:", error);
+ });
+ }
});
},
addStyleToImages(html) {
@@ -1257,7 +1309,7 @@
handleExport() {},
// 閫夋嫨鎮h�呰〃鏁版嵁
- handleSelectionChange(selection,type) {
+ handleSelectionChange(selection, type) {
console.log("澶氶�夋偅鑰�");
this.SelectPatientslist = selection;
this.multiple = !selection.length;
@@ -1272,8 +1324,8 @@
item.sfzh = item.idcardno;
}
if (type) {
- item.hospType=type
- }else{
+ item.hospType = type;
+ } else {
item.hospType = this.patientqueryParams.allhosp;
}
this.overallCase.push(item);
@@ -1351,7 +1403,10 @@
templateid: null,
libtemplateid: null,
serviceType: Number(this.$route.query.serviceType),
- kcb: "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸"+localStorage.getItem("orgname")+"鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤闅忚闂嵎銆�",
+ kcb:
+ "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸" +
+ localStorage.getItem("orgname") +
+ "鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瑙傜湅杩欎唤瀹f暀璧勮銆�",
jsy: "鐢熸椿涓婅鍔抽�哥粨鍚堬紝娉ㄦ剰浼戞伅鍜岃惀鍏伙紝閫傚綋閿荤偧锛屾垝鐑熼檺閰掞紝淇濇寔蹇冩儏鑸掔晠锛屽畾鏈熷璇娿�傞偅鏈鍥炶灏卞埌杩欓噷锛岀鎮ㄨ韩浣撳仴搴凤紒",
};
@@ -1584,9 +1639,9 @@
this.$refs.upload.submit();
this.dractive++;
} else if (this.dractive == 2) {
- this.handleSelectionChange(this.uploadingData,4);
+ this.handleSelectionChange(this.uploadingData, 4);
this.upload.open = false;
- this.dractive = 1
+ this.dractive = 1;
}
},
@@ -1737,6 +1792,23 @@
}
}
}
+/* 鏂板鏍峰紡 */
+.preview-left {
+ padding: 20px;
+ max-height: 70vh;
+ overflow-y: auto;
+}
+
+/* 绾枃鏈唴瀹规牱寮� */
+.plain-text-content {
+ white-space: pre-wrap;
+ font-size: 16px;
+ line-height: 1.6;
+ padding: 15px;
+ background: #f9f9f9;
+ border-radius: 4px;
+}
+
.download {
text-align: center;
.el-upload__tip {
@@ -1767,7 +1839,7 @@
}
}
.button-textsc {
- color: #28cfe6;
+ color: #3664D9;
}
.button-textxg {
color: #de7897;
--
Gitblit v1.9.3