From c70f5e1d471ddf002ef0ebd5f4c6a5ed1c865d0d Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 21 十月 2026 17:47:58 +0800
Subject: [PATCH] 测试完成
---
src/components/Assistant/index.vue | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 101 insertions(+), 13 deletions(-)
diff --git a/src/components/Assistant/index.vue b/src/components/Assistant/index.vue
index 51d7c7b..44da194 100644
--- a/src/components/Assistant/index.vue
+++ b/src/components/Assistant/index.vue
@@ -68,7 +68,10 @@
v-for="(item, index) in statsItems"
:key="index"
class="stat-item"
- :class="{ 'stat-item-highlight': item.highlight }"
+ :class="{
+ 'stat-item-highlight': item.highlight,
+ 'stat-item-top': item.id === 'myTasks',
+ }"
@click="handleItemClick(item)"
>
<div class="stat-icon">
@@ -102,6 +105,16 @@
<path
d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"
/>
+ </svg>
+ <svg
+ v-else-if="item.icon === 'IconClock'"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
+ >
+ <circle cx="12" cy="12" r="9" />
+ <path d="M12 7v5l3 3" />
</svg>
</div>
<div class="stat-info">
@@ -195,7 +208,6 @@
<el-form-item label="鐥呭尯">
<el-input v-model="smsForm.leavehospitaldistrictname"></el-input>
</el-form-item>
- <!-- 鐭俊鍙戦�佸璇濇 - 妯℃澘閫夋嫨鍖哄煙锛堝寮虹増锛� -->
<el-form-item label="閫夋嫨妯℃澘">
<el-row :gutter="10">
<el-col :span="7">
@@ -244,14 +256,19 @@
<el-option
v-for="tmpl in filteredTemplateOptions"
:key="tmpl.templetid"
- :label="`銆�${tmpl.templetno}銆�${tmpl.templetname}`"
+ :label="tmpl.templetname"
:value="tmpl.templetid"
>
- <span style="float: left">{{ tmpl.templetname }}</span>
- <span style="float: right; color: #909399; font-size: 12px">
- {{ tmpl.deptName || "閫氱敤" }} /
- {{ tmpl.wardName || "鍏ㄩ儴" }}
- </span>
+ <div class="template-option-content">
+ <div class="template-option-text">
+ {{ tmpl.templetcontent || "鏆傛棤鍐呭" }}
+ </div>
+ <div class="template-option-meta">
+ <span>{{ tmpl.deptName || "閫氱敤" }}</span>
+ <span class="meta-separator">/</span>
+ <span>{{ tmpl.wardName || "鍏ㄩ儴" }}</span>
+ </div>
+ </div>
</el-option>
</el-select>
</el-col>
@@ -380,6 +397,7 @@
import {
getCurrentUserServiceSubtaskCount,
sendMsg,
+ getNearTimeoutCount,
} from "@/api/AiCentre/index";
import {
listSmstemplet,
@@ -477,6 +495,16 @@
// 缁熻鏁版嵁
statsItems: [
{
+ id: "myTasks",
+ label: "鎴戠殑浠诲姟",
+ value: "0",
+ unread: 0,
+ urltype: 5,
+ icon: "IconTask",
+ url: "/followvisit/discharge",
+ trend: { type: "stable", arrow: "", value: "" },
+ },
+ {
id: "pending",
label: "寰呴殢璁�",
value: "0",
@@ -508,12 +536,12 @@
trend: { type: "up", arrow: "", value: "" },
},
{
- id: "myTasks",
- label: "鎴戠殑浠诲姟",
+ id: "nearTimeout",
+ label: "涓磋繎瓒呮椂浠诲姟",
value: "0",
unread: 0,
urltype: 5,
- icon: "IconTask",
+ icon: "IconClock",
url: "/followvisit/discharge",
trend: { type: "stable", arrow: "", value: "" },
},
@@ -811,6 +839,13 @@
},
handleItemClick(item) {
+ // 涓磋繎瓒呮椂浠诲姟锛氭墦寮�鐧诲綍鍚庡脊绐楋紝鑰岄潪璺宠浆鍒楄〃椤�
+ if (item.id === "nearTimeout") {
+ this.$root.$emit("open-near-timeout");
+ this.toggleExpand();
+ return;
+ }
+
if (item.url) {
console.log(item.url, "item.url");
@@ -938,6 +973,11 @@
// 妯℃嫙鏁版嵁鏇存柊
const mockData = {
+ myTasks: {
+ value: "156",
+ unread: null,
+ trend: { type: "stable", arrow: "鈫�", value: "0" },
+ },
pending: {
value: "128",
unread: null,
@@ -953,8 +993,8 @@
unread: null,
trend: { type: "up", arrow: "鈫�", value: "3" },
},
- myTasks: {
- value: "156",
+ nearTimeout: {
+ value: "0",
unread: null,
trend: { type: "stable", arrow: "鈫�", value: "0" },
},
@@ -964,6 +1004,8 @@
mockData.failed.value = response.failedVisitCount;
mockData.abnormal.value = response.abnormalVisitCount;
mockData.myTasks.value = response.allVisitCount;
+ // 涓磋繎瓒呮椂浠诲姟鏁伴噺锛堟帴鍙f湭灏辩华锛屽厛鐢� mock锛�
+ mockData.nearTimeout.value = await getNearTimeoutCount();
this.statsItems = this.statsItems.map((item) => {
const data = mockData[item.id] || {};
return {
@@ -1019,6 +1061,40 @@
</script>
<style scoped>
+.wide-template-popper {
+ width: 420px !important; /* 杩涗竴姝ュ姞瀹斤紝閫傚簲鍐呭灞曠ず */
+}
+
+.template-option-content {
+ padding: 8px 0;
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+}
+
+.template-option-text {
+ font-size: 13px;
+ color: #303133;
+ line-height: 1.6;
+ display: -webkit-box;
+ -webkit-line-clamp: 3; /* 鏈�澶氭樉绀�3琛� */
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ word-break: break-all;
+}
+
+.template-option-meta {
+ font-size: 12px;
+ color: #909399;
+ display: flex;
+ align-items: center;
+ gap: 4px;
+}
+
+.meta-separator {
+ color: #dcdfe6;
+}
.float-ball {
position: fixed;
z-index: 9999;
@@ -1189,6 +1265,18 @@
background: linear-gradient(to bottom right, #f0f9ff, #f8fafc);
}
+.stat-item-top {
+ grid-column: 1 / -1;
+ display: flex;
+ align-items: center;
+ flex-direction: row;
+ gap: 16px;
+}
+
+.stat-item-top .stat-icon {
+ margin-bottom: 0;
+}
+
.stat-icon {
width: 32px;
height: 32px;
--
Gitblit v1.9.3