From 903447ebbe51b33846b6549b44754d2e63467523 Mon Sep 17 00:00:00 2001
From: Zy <1448159279@qq.com>
Date: Wed, 28 Oct 2026 08:24:40 +0800
Subject: [PATCH] =?UTF-8?q?10/28=201.=20=E4=BC=9A=E8=AF=9D=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E4=B8=AD=20=E6=B7=BB=E5=8A=A0=E7=AD=89=E5=BE=85?=
=?UTF-8?q?=E6=97=B6=E9=97=B4-=E9=9A=8F=E7=9D=80=E6=97=B6=E9=97=B4?=
=?UTF-8?q?=E5=8F=98=E5=8C=96=202.=20=E4=BC=9A=E8=AF=9D=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=203.=20=E5=85=B3=E9=97=AD?=
=?UTF-8?q?=E6=B6=88=E6=81=AFws=204.=20=E7=9F=A5=E8=AF=86=E5=BA=93?=
=?UTF-8?q?=E5=86=85=E5=AE=B9-=E5=8F=AA=E6=9C=89=E7=BA=AF=E6=96=87?=
=?UTF-8?q?=E5=AD=97=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=9B=BE=E7=89=87=EF=BC=8C?=
=?UTF-8?q?=E9=93=BE=E6=8E=A5=205.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/conversation/types.ts | 4 +++
src/components/Editor/cskb.vue | 35 ++++++++++++++-----------
src/layout/index.vue | 10 +++----
src/utils/push.ts | 31 +++++++++++-----------
src/views/system/conversation/index.vue | 2 +-
src/views/system/cskb/index.vue | 6 +++--
src/views/system/role/index.vue | 4 ++-
7 files changed, 53 insertions(+), 39 deletions(-)
diff --git a/src/api/system/conversation/types.ts b/src/api/system/conversation/types.ts
index 90b5cc9..2f0f70b 100644
--- a/src/api/system/conversation/types.ts
+++ b/src/api/system/conversation/types.ts
@@ -27,6 +27,10 @@ export interface CsSessionVO {
* 状态(0机器人 1排队 2人工 3已结束)
*/
status: boolean;
+ /**
+ * 排队时间
+ */
+ queueTime: string;
/**
* 当前接待客服
*/
diff --git a/src/components/Editor/cskb.vue b/src/components/Editor/cskb.vue
index 16c7819..347d8f3 100644
--- a/src/components/Editor/cskb.vue
+++ b/src/components/Editor/cskb.vue
@@ -35,18 +35,18 @@
>
纯文本 {{ textCount }}/{{ props.maxTextLength }}
- |
-
- 图片 {{ imageCount }}/{{ props.maxImageCount }}
-
- |
-
- 链接 {{ linkCount }}/{{ props.maxLinkCount }}
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -73,7 +73,7 @@ const props = defineProps({
simpleToolbar: propTypes.bool.def(false),
maxTextLength: propTypes.number.def(1000),
maxImageCount: propTypes.number.def(3),
- maxLinkCount: propTypes.number.def(5)
+ maxLinkCount: propTypes.number.def(0)
});
const emit = defineEmits(['update:modelValue', 'countChange']);
@@ -108,8 +108,8 @@ const toolbarConfig = computed>(() => {
toolbarKeys: [
'bold',
'numberedList',
- 'uploadImage',
- 'insertLink',
+ // 'uploadImage',
+ // 'insertLink',
'clearStyle',
],
excludeKeys: []
@@ -272,6 +272,11 @@ const getUploadVideoMenuConfig = () => ({
const editorConfig = computed>(() => ({
placeholder: props.simpleToolbar ? '请输入标准回复话术...' : '请输入内容',
autoFocus: false,
+ hoverbarKeys: {
+ text: {menuKeys: ['bold']},
+ image: {menuKeys: []},
+ link: {menuKeys: []}
+ },
MENU_CONF: {
uploadImage: getUploadImageMenuConfig() as any,
uploadVideo: getUploadVideoMenuConfig() as any
diff --git a/src/layout/index.vue b/src/layout/index.vue
index e448712..543b829 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -61,11 +61,11 @@ watch(
const settingRef = ref>();
onMounted(async () => {
- try {
- await initMessageBox();
- } finally {
- initPush();
- }
+ // try {
+ // await initMessageBox();
+ // } finally {
+ // initPush();
+ // }
});
const handleClickOutside = () => {
diff --git a/src/utils/push.ts b/src/utils/push.ts
index 2fef2f5..2318904 100644
--- a/src/utils/push.ts
+++ b/src/utils/push.ts
@@ -1,11 +1,11 @@
-import { ElNotification } from 'element-plus';
-import type { MessageVO } from '@/api/system/message/types';
-import { getMessageBox } from '@/api/system/message';
-import { useNoticeStore } from '@/store/modules/notice';
-import { useUserStore } from '@/store/modules/user';
-import { getToken } from '@/utils/auth';
-import { isMessageRead } from '@/utils/message-read';
-import { parsePushMessage, resolveNoticeGroup, resolveNoticeTitle, shouldAppendNotice } from '@/utils/push-message';
+import {ElNotification} from 'element-plus';
+import type {MessageVO} from '@/api/system/message/types';
+import {getMessageBox} from '@/api/system/message';
+import {useNoticeStore} from '@/store/modules/notice';
+import {useUserStore} from '@/store/modules/user';
+import {getToken} from '@/utils/auth';
+import {isMessageRead} from '@/utils/message-read';
+import {parsePushMessage, resolveNoticeGroup, resolveNoticeTitle, shouldAppendNotice} from '@/utils/push-message';
let closePushConnection: (() => void) | undefined;
let stopPushWatchers: Array<() => void> = [];
@@ -85,7 +85,7 @@ const buildWsUrl = (path: string) => {
};
const initSsePush = (url: string) => {
- const { data, error, close } = useEventSource(url, [], {
+ const {data, error, close} = useEventSource(url, [], {
autoReconnect: {
retries: 5,
delay: 5000,
@@ -110,7 +110,7 @@ const initSsePush = (url: string) => {
};
const initWsPush = (url: string) => {
- const { close } = useWebSocket(url, {
+ const {close} = useWebSocket(url, {
autoReconnect: {
retries: 3,
delay: 1000,
@@ -153,7 +153,7 @@ export const initMessageBox = async () => {
useNoticeStore().clearNotice();
return;
}
- const { data } = await getMessageBox();
+ const {data} = await getMessageBox();
const notices = [...(data?.systemList ?? []), ...(data?.noticeList ?? []), ...(data?.workflowList ?? [])].map(
toNoticeItem
);
@@ -168,6 +168,7 @@ export const closePush = () => {
};
const resumePushIfNeeded = () => {
+ console.log('走着?')
if (!pushKicked || !getToken() || document.visibilityState !== 'visible') {
return;
}
@@ -186,7 +187,7 @@ const resumePushIfNeeded = () => {
}
}, 300);
};
-
-window.addEventListener('focus', resumePushIfNeeded);
-document.addEventListener('visibilitychange', resumePushIfNeeded);
-window.addEventListener('online', resumePushIfNeeded);
+//
+// window.addEventListener('focus', resumePushIfNeeded);
+// document.addEventListener('visibilitychange', resumePushIfNeeded);
+// window.addEventListener('online', resumePushIfNeeded);
diff --git a/src/views/system/conversation/index.vue b/src/views/system/conversation/index.vue
index 087575c..54a87ea 100644
--- a/src/views/system/conversation/index.vue
+++ b/src/views/system/conversation/index.vue
@@ -142,7 +142,7 @@
-
+
-
+
+
+
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 1b63c73..ff237d5 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -171,7 +171,8 @@
-
+
@@ -322,6 +323,7 @@ import modal from '@/plugins/modal';
import {useDict} from '@/utils/dict';
import {download as requestDownload} from '@/utils/request';
import {parseTime} from '@/utils/ruoyi';
+import {QuestionFilled} from "@element-plus/icons-vue";
const router = useRouter();
const {sys_normal_disable} = toRefs(useDict('sys_normal_disable'));