From a5cba9ab040f6f97558046885dce3017f9bab7e9 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 11 八月 2026 14:12:29 +0800
Subject: [PATCH] 提交
---
src/views/sfstatistics/propaganda/index.vue | 373 +++++++++++++++++------------------------------------
1 files changed, 119 insertions(+), 254 deletions(-)
diff --git a/src/views/sfstatistics/propaganda/index.vue b/src/views/sfstatistics/propaganda/index.vue
index 781ac98..5f258a4 100644
--- a/src/views/sfstatistics/propaganda/index.vue
+++ b/src/views/sfstatistics/propaganda/index.vue
@@ -182,7 +182,19 @@
sortable="custom"
>
<template slot-scope="scope">
- <span class="count-highlight">{{ scope.row.totalCount }}</span>
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'totalCountInfo',
+ '瀹f暀鍙戦�佹�婚噺鏄庣粏'
+ )
+ "
+ >
+ <span class="count-highlight">{{ scope.row.totalCount }}</span>
+ </el-button>
</template>
</el-table-column>
@@ -193,7 +205,19 @@
sortable="custom"
>
<template slot-scope="scope">
- <span class="success-count">{{ scope.row.sendSuccessCount }}</span>
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'sendSuccessCountInfo',
+ '鍙戦�佹垚鍔熼噺鏄庣粏'
+ )
+ "
+ >
+ <span class="success-count">{{ scope.row.sendSuccessCount }}</span>
+ </el-button>
</template>
</el-table-column>
@@ -204,7 +228,15 @@
sortable="custom"
>
<template slot-scope="scope">
- <span class="read-count">{{ scope.row.readCount }}</span>
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'readCountInfo', '宸茶閲忔槑缁�')
+ "
+ >
+ <span class="read-count">{{ scope.row.readCount }}</span>
+ </el-button>
</template>
</el-table-column>
@@ -216,16 +248,28 @@
sortable="custom"
>
<template slot-scope="scope">
- <el-progress
- :percentage="scope.row.sendSuccessRate * 100"
- :stroke-width="8"
- :show-text="false"
- style="width: 80px; margin: 0 auto"
- :color="getRateColor(scope.row.sendSuccessRate)"
- />
- <span class="rate-text"
- >{{ (scope.row.sendSuccessRate * 100).toFixed(1) }}%</span
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(
+ scope.row,
+ 'sendSuccessRate',
+ '鍙戦�佹垚鍔熺巼鏄庣粏'
+ )
+ "
>
+ <el-progress
+ :percentage="scope.row.sendSuccessRate * 100"
+ :stroke-width="8"
+ :show-text="false"
+ style="width: 80px; margin: 0 auto"
+ :color="getRateColor(scope.row.sendSuccessRate)"
+ />
+ <span class="rate-text"
+ >{{ (scope.row.sendSuccessRate * 100).toFixed(1) }}%</span
+ >
+ </el-button>
</template>
</el-table-column>
@@ -237,16 +281,24 @@
sortable="custom"
>
<template slot-scope="scope">
- <el-progress
- :percentage="scope.row.readRate * 100"
- :stroke-width="8"
- :show-text="false"
- style="width: 80px; margin: 0 auto"
- :color="getRateColor(scope.row.readRate)"
- />
- <span class="rate-text"
- >{{ (scope.row.readRate * 100).toFixed(1) }}%</span
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ handleViewDetails(scope.row, 'readRate', '宸茶鐜囨槑缁�')
+ "
>
+ <el-progress
+ :percentage="scope.row.readRate * 100"
+ :stroke-width="8"
+ :show-text="false"
+ style="width: 80px; margin: 0 auto"
+ :color="getRateColor(scope.row.readRate)"
+ />
+ <span class="rate-text"
+ >{{ (scope.row.readRate * 100).toFixed(1) }}%</span
+ >
+ </el-button>
</template>
</el-table-column>
@@ -282,124 +334,24 @@
/>
</div>
- <!-- 鍒嗙粍璇︽儏寮圭獥 -->
- <el-dialog
+ <!-- 鏄庣粏鏁版嵁寮圭獥 -->
+ <PropagandaDetailDialog
+ :visible="detailVisible"
:title="detailTitle"
- :visible.sync="detailVisible"
- width="80%"
- :before-close="handleCloseDetail"
- >
- <div v-loading="detailLoading">
- <el-row :gutter="20" class="detail-header">
- <el-col :span="6">
- <div class="detail-item">
- <label>鍒嗙粍鍚嶇О锛�</label>
- <span>{{ currentGroup.groupName }}</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="detail-item">
- <label>鍒嗙粍缂栫爜锛�</label>
- <span>{{ currentGroup.groupCode }}</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="detail-item">
- <label>鍙戦�佹垚鍔熺巼锛�</label>
- <span class="rate-highlight"
- >{{ (currentGroup.sendSuccessRate * 100).toFixed(1) }}%</span
- >
- </div>
- </el-col>
- <el-col :span="6">
- <div class="detail-item">
- <label>宸茶鐜囷細</label>
- <span class="rate-highlight"
- >{{ (currentGroup.readRate * 100).toFixed(1) }}%</span
- >
- </div>
- </el-col>
- </el-row>
-
- <el-tabs v-model="detailActiveTab" class="detail-tabs">
- <el-tab-pane label="瓒嬪娍鍒嗘瀽" name="trend">
- <!-- 杩欓噷鍙互鏀剧疆鍥捐〃缁勪欢 -->
- <div class="chart-placeholder">
- 瓒嬪娍鍥捐〃锛堝彲鏍规嵁闇�姹傛帴鍏Charts锛�
- </div>
- </el-tab-pane>
- <el-tab-pane label="鏄庣粏鏁版嵁" name="detail">
- <el-table
- :data="detailList"
- border
- style="width: 100%; margin-top: 20px"
- >
- <el-table-column
- prop="patientName"
- label="鎮h�呭鍚�"
- align="center"
- width="120"
- ></el-table-column>
- <el-table-column
- prop="patientNo"
- label="鎮h�呯紪鍙�"
- align="center"
- width="120"
- ></el-table-column>
- <el-table-column
- prop="sendTime"
- label="鍙戦�佹椂闂�"
- align="center"
- width="180"
- ></el-table-column>
- <el-table-column
- prop="readTime"
- label="闃呰鏃堕棿"
- align="center"
- width="180"
- ></el-table-column>
- <el-table-column
- prop="educationTitle"
- label="瀹f暀鏍囬"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="status"
- label="鐘舵��"
- align="center"
- width="100"
- >
- <template slot-scope="scope">
- <el-tag
- :type="
- scope.row.status === '宸茶'
- ? 'success'
- : scope.row.status === '鍙戦�佹垚鍔�'
- ? 'info'
- : 'danger'
- "
- size="small"
- >
- {{ scope.row.status }}
- </el-tag>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- </el-tabs>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="detailVisible = false">鍏� 闂�</el-button>
- </span>
- </el-dialog>
+ :data="detailList"
+ :loading="detailLoading"
+ @close="detailVisible = false"
+ />
</div>
</template>
<script>
-import { gethelibraryCount } from "@/api/AiCentre/index";
+import { gethelibraryCount, gethelibraryCountHyperlink } from "@/api/AiCentre/index";
+import PropagandaDetailDialog from "./components/PropagandaDetailDialog.vue";
export default {
name: "EducationStatistics",
+ components: { PropagandaDetailDialog },
data() {
return {
// 鏌ヨ鍙傛暟
@@ -436,8 +388,6 @@
// 璇︽儏寮圭獥
detailVisible: false,
detailTitle: "",
- detailActiveTab: "trend",
- currentGroup: {},
detailList: [],
// 鏃ユ湡閫夋嫨鍣ㄩ厤缃�
@@ -656,78 +606,48 @@
return "#F56C6C";
},
- // 鏌ョ湅鍒嗙粍璇︽儏
- handleGroupDetail(row) {
- this.currentGroup = row;
- this.detailTitle = `${row.groupName} - 瀹f暀缁熻璇︽儏`;
- this.detailActiveTab = "trend";
+ // 鐐瑰嚮缁熻鏁板瓧鏌ョ湅鏄庣粏锛堜豢闅忚缁熻妯″紡锛�
+ handleViewDetails(row, infoKey, titleSuffix) {
+ const groupName = row.groupName || "";
+ this.detailTitle = `${groupName} - ${titleSuffix}`;
this.detailVisible = true;
- this.loadDetailData();
- },
-
- // 鍔犺浇璇︽儏鏁版嵁
- async loadDetailData() {
this.detailLoading = true;
- try {
- // 杩欓噷搴旇璋冪敤鑾峰彇璇︽儏鐨勬帴鍙�
- // 妯℃嫙鏁版嵁
- setTimeout(() => {
- this.detailList = [
- {
- patientName: "寮犱笁",
- patientNo: "P202312001",
- sendTime: "2023-12-01 10:30:00",
- readTime: "2023-12-01 14:20:00",
- educationTitle: "楠ㄧ鏈悗搴峰鎸囧",
- status: "宸茶",
- },
- {
- patientName: "鏉庡洓",
- patientNo: "P202312002",
- sendTime: "2023-12-01 11:15:00",
- readTime: "",
- educationTitle: "蹇冭绠$柧鐥呴闃�",
- status: "鍙戦�佹垚鍔�",
- },
- {
- patientName: "鐜嬩簲",
- patientNo: "P202312003",
- sendTime: "2023-12-02 09:45:00",
- readTime: "2023-12-02 16:10:00",
- educationTitle: "绯栧翱鐥呴ギ椋熸寚瀵�",
- status: "宸茶",
- },
- ];
- this.detailLoading = false;
- }, 500);
- } catch (error) {
- console.error("鍔犺浇璇︽儏鏁版嵁澶辫触:", error);
- this.$message.error("鍔犺浇璇︽儏鏁版嵁澶辫触");
- this.detailLoading = false;
+ this.detailList = [];
+
+ const params = {
+ hyperLinkInfoType: infoKey,
+ hospType: this.queryParams.hospType,
+ };
+
+ // 鏍规嵁缁熻缁村害浼犲叆瀵瑰簲鐨勮繃婊ゅ弬鏁�
+ if (this.queryParams.groupType == "1") {
+ // 鎸夌瀹ょ粺璁�
+ params.deptcodes = [row.groupCode];
+ } else if (this.queryParams.groupType == "2") {
+ // 鎸夌梾鍖虹粺璁�
+ params.hospitaldistrictcodes = [row.groupCode];
}
- },
- // 鏌ョ湅璇︽儏
- handleDetail(row) {
- this.currentGroup = row;
- this.detailTitle = `${row.groupName} - 鏄庣粏鏁版嵁`;
- this.detailActiveTab = "detail";
- this.detailVisible = true;
- this.loadDetailData();
- },
+ // 浼犲叆鏃堕棿鑼冨洿
+ if (
+ this.queryParams.dateRange &&
+ this.queryParams.dateRange.length === 2
+ ) {
+ params.starttime = this.queryParams.dateRange[0];
+ params.endtime = this.queryParams.dateRange[1];
+ }
+ if (this.queryParams.visittime) {
+ params.visittime = this.queryParams.visittime;
+ }
- // 瀵煎嚭褰撳墠鍒嗙粍鏁版嵁
- handleExportGroup(row) {
- this.$confirm(`纭畾瑕佸鍑� "${row.groupName}" 鐨勭粺璁℃暟鎹悧?`, "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- // 杩欓噷璋冪敤瀵煎嚭鎺ュ彛
- this.$message.success("瀵煎嚭浠诲姟宸插紑濮嬶紝璇风◢鍚庡湪涓嬭浇涓績鏌ョ湅");
+ gethelibraryCountHyperlink(params)
+ .then((response) => {
+ this.detailList = response.data || [];
+ this.detailLoading = false;
})
- .catch(() => {});
+ .catch(() => {
+ this.detailLoading = false;
+ });
},
// 瀵煎嚭鍏ㄩ儴鏁版嵁
@@ -738,26 +658,10 @@
type: "warning",
})
.then(() => {
- // 鏋勫缓瀵煎嚭鍙傛暟
const exportParams = { ...this.queryParams };
delete exportParams.pageNum;
delete exportParams.pageSize;
-
- // 杩欓噷璋冪敤瀵煎嚭鎺ュ彛
this.$message.success("瀵煎嚭浠诲姟宸插紑濮嬶紝璇风◢鍚庡湪涓嬭浇涓績鏌ョ湅");
- })
- .catch(() => {});
- },
-
- // 鍏抽棴璇︽儏寮圭獥
- handleCloseDetail(done) {
- this.$confirm("纭鍏抽棴锛�", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- done();
})
.catch(() => {});
},
@@ -856,45 +760,6 @@
}
}
- .detail-header {
- margin-bottom: 20px;
- padding: 20px;
- background: #f8f9fa;
- border-radius: 8px;
-
- .detail-item {
- label {
- color: #909399;
- font-size: 14px;
- }
-
- span {
- font-size: 16px;
- font-weight: 500;
- color: #303133;
- }
-
- .rate-highlight {
- color: #409eff;
- font-weight: 600;
- }
- }
- }
-
- .detail-tabs {
- margin-top: 20px;
- }
-
- .chart-placeholder {
- height: 300px;
- display: flex;
- align-items: center;
- justify-content: center;
- background: #f8f9fa;
- border-radius: 8px;
- color: #909399;
- border: 1px dashed #dcdfe6;
- }
}
// 鍝嶅簲寮忚皟鏁�
--
Gitblit v1.9.3