From 70e4d2c33cc2e3af590d1816c0c703da341538cf Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 04 九月 2026 14:13:32 +0800
Subject: [PATCH] 测试完成
---
src/views/patient/propaganda/index.vue | 143 +++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 136 insertions(+), 7 deletions(-)
diff --git a/src/views/patient/propaganda/index.vue b/src/views/patient/propaganda/index.vue
index 1a2a831..f1b9f34 100644
--- a/src/views/patient/propaganda/index.vue
+++ b/src/views/patient/propaganda/index.vue
@@ -373,7 +373,6 @@
</template>
</el-table-column> -->
<el-table-column
- fixed="right"
label="浠诲姟缁撴灉璁板綍"
width="120"
align="center"
@@ -394,7 +393,6 @@
</template>
</el-table-column>
<el-table-column
- fixed="right"
label="瀹f暀鏃堕棿"
sortable
align="center"
@@ -403,6 +401,17 @@
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.finishtime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column fixed="right" label="鎿嶄綔" align="center" width="100">
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ icon="el-icon-view"
+ @click="previewTemplate(scope.row)"
+ >棰勮</el-button
+ >
</template>
</el-table-column>
<!-- <el-table-column
@@ -557,6 +566,10 @@
>
</span>
</el-dialog>
+ <!-- 瀹f暀妯℃澘棰勮 -->
+ <el-dialog title="妯℃澘棰勮" :visible.sync="previewtf" width="60%">
+ <div v-html="htmlRichText"></div>
+ </el-dialog>
</div>
</template>
@@ -570,10 +583,11 @@
resetUserPwd,
changeUserStatus,
} from "@/api/system/user";
-import { getTaskservelist } from "@/api/AiCentre/index";
+import { getTaskservelist, getlibrarylist } from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import axios from "axios";
export default {
name: "Discharge",
@@ -632,6 +646,8 @@
inputVisible: false,
inputValue: "",
previewVisible: false, //闂ㄨ瘖瀹f暀棰勮寮规
+ previewtf: false, //瀹f暀妯℃澘棰勮寮规
+ htmlRichText: "", //瀹f暀妯℃澘棰勮瀵屾枃鏈�
radio: "",
radios: [],
previewtype: 2, //棰勮闂ㄨ瘖瀹f暀绫诲瀷
@@ -847,8 +863,8 @@
store.getters.belongWards.map((obj) => obj.districtCode);
}
this.loading = true;
- console.log(this.topqueryParams.leavehospitaldistrictcodes,'123');
- console.log(this.topqueryParams.leaveldeptcodes,'344');
+ console.log(this.topqueryParams.leavehospitaldistrictcodes, "123");
+ console.log(this.topqueryParams.leaveldeptcodes, "344");
if (
this.topqueryParams.leavehospitaldistrictcodes[0] &&
@@ -878,6 +894,48 @@
// 鏌ョ湅闂ㄨ瘖瀹f暀璇︽儏
Referencequestion(row) {
this.previewVisible = true;
+ },
+ // 棰勮瀹f暀妯℃澘锛堥�氳繃 libtemplateid 鏌ヨ妯℃澘淇℃伅锛�
+ previewTemplate(row) {
+ if (!row.libtemplateid) {
+ this.$message.warning("璇ヤ换鍔℃湭鍏宠仈瀹f暀妯℃澘");
+ return;
+ }
+ this.htmlRichText = null;
+ this.previewtf = true;
+ getlibrarylist({ id: row.libtemplateid })
+ .then((res) => {
+ const tpl = (res.rows && res.rows[0]) || null;
+ if (!tpl || !tpl.htmlRichText) {
+ this.$message.warning("璇ユā鏉挎殏鏃犻瑙堝唴瀹�");
+ return;
+ }
+ axios
+ .get(tpl.htmlRichText)
+ .then((response) => {
+ this.htmlRichText = response.data;
+ this.htmlRichText = this.addStyleToImages(this.htmlRichText);
+ })
+ .catch(() => {
+ this.$message.error("鑾峰彇妯℃澘鍐呭澶辫触");
+ });
+ })
+ .catch(() => {
+ this.$message.error("鏌ヨ妯℃澘淇℃伅澶辫触");
+ });
+ },
+ // 淇瀵屾枃鏈浘鐗囪矾寰勪笌鏍峰紡
+ addStyleToImages(html) {
+ if (!html) return html;
+ let processedHtml = html.replace(
+ /\/aifollowup\/aifollowup\//g,
+ "/aifollowup/"
+ );
+ processedHtml = processedHtml.replace(
+ /<img([^>]*)style=(['"])(?:(?!\2).)*\2([^>]*)>/g,
+ '<img$1style="width:100%;height:auto;"$3>'
+ );
+ return processedHtml;
},
// 娣诲姞寮规鎼滅储
remoteMethod(query) {
@@ -1101,8 +1159,8 @@
<style lang="scss" scoped>
.el-button--primary.is-plain {
color: #ffffff;
- background: #409eff;
- border-color: #4fabe9;
+ background: #5b7cfa;
+ border-color: #5b7cfa;
}
.document {
@@ -1227,4 +1285,75 @@
// font-size: 24px;
// }
// }
+/* ================= 娓呮柊楂樼骇绠�绾﹂ ================= */
+.app-container {
+ background: #f5f7fb;
+ border-radius: 14px;
+ padding: 20px;
+}
+
+/* 鏌ヨ琛ㄥ崟锛氱櫧鑹插渾瑙掑崱鐗� */
+::v-deep .el-form--inline {
+ background: #ffffff;
+ border-radius: 14px;
+ padding: 22px 22px 8px;
+ margin-bottom: 18px;
+ box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
+}
+
+/* 闅愯棌鍒嗗壊绾� */
+::v-deep .el-divider {
+ display: none;
+}
+
+/* 宸ュ叿鏍忓簳閮ㄩ棿璺� */
+.mb8 {
+ margin-bottom: 18px;
+}
+
+/* 鎸夐挳锛氬渾瑙� + 鏌斿拰杩囨浮 */
+::v-deep .el-button {
+ border-radius: 8px;
+ font-weight: 500;
+ transition: all 0.25s ease;
+}
+
+/* 涓绘寜閽細娓呮柊闈涜摑 */
+::v-deep .el-button--primary:not(.is-plain) {
+ background: #5b7cfa;
+ border-color: #5b7cfa;
+}
+::v-deep .el-button--primary:not(.is-plain):hover,
+::v-deep .el-button--primary:not(.is-plain):focus {
+ background: #7593fb;
+ border-color: #7593fb;
+}
+
+/* 琛ㄦ牸锛氱櫧鑹插渾瑙掑崱鐗� + 鏌斿拰琛ㄥご */
+::v-deep .el-table {
+ border-radius: 14px;
+ overflow: hidden;
+ box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
+}
+::v-deep .el-table::before {
+ display: none;
+}
+::v-deep .el-table th {
+ background: #f7f9fd !important;
+ color: #3f4d63;
+ font-weight: 600;
+}
+::v-deep .el-table td {
+ padding: 12px 0;
+}
+
+/* 鏍囩鍦嗚 */
+::v-deep .el-tag {
+ border-radius: 6px;
+}
+
+/* 鍒嗛〉闂磋窛 */
+::v-deep .pagination-container {
+ padding-top: 18px;
+}
</style>
--
Gitblit v1.9.3