From b3abd460d8f68b9f501b48aeecaa344ff18c033a Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期三, 26 八月 2026 17:05:29 +0800
Subject: [PATCH] feat(mes): 生产任务报工人下拉源调整为工作站人力配置
---
src/views/im/utils/channel.ts | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/views/im/utils/channel.ts b/src/views/im/utils/channel.ts
new file mode 100644
index 0000000..5276fb2
--- /dev/null
+++ b/src/views/im/utils/channel.ts
@@ -0,0 +1,18 @@
+import { useChannelStore } from '../home/store/channelStore'
+import { ImConversationType } from './constants'
+
+/**
+ * 鏋勫缓棰戦亾浼氳瘽鎻忚堪锛坱ype / targetId / name / avatar锛�
+ *
+ * 浼樺厛鐢� channelStore 鎷夊埌鐨勭湡瀹炲悕绉� / 澶村儚锛涙湰鍦扮紦瀛樿繕娌℃媺鍒版椂閫�鍖栦负銆岄閬� N銆嶅崰浣嶆枃妗堛��
+ * 鎶藉埌 utils/channel.ts 鍚庯紝useMessagePuller / websocketStore 鍏辩敤鍚屼竴浠藉崰浣嶉�昏緫锛岄伩鍏嶅澶勫鍒讹紱绫讳技 utils/user.ts 鍙栨樀绉扮殑宸ュ叿闆嗐��
+ */
+export const buildChannelConversationStub = (channelId: number) => {
+ const channel = useChannelStore().getChannel(channelId)
+ return {
+ type: ImConversationType.CHANNEL,
+ targetId: channelId,
+ name: channel?.name || `棰戦亾 ${channelId}`,
+ avatar: channel?.avatar || ''
+ }
+}
--
Gitblit v1.9.3