10/28
1. 会话列表中 添加等待时间-随着时间变化 2. 会话列表筛选条件 3. 关闭消息ws 4. 知识库内容-只有纯文字,没有图片,链接 5.
This commit is contained in:
@@ -27,6 +27,10 @@ export interface CsSessionVO {
|
|||||||
* 状态(0机器人 1排队 2人工 3已结束)
|
* 状态(0机器人 1排队 2人工 3已结束)
|
||||||
*/
|
*/
|
||||||
status: boolean;
|
status: boolean;
|
||||||
|
/**
|
||||||
|
* 排队时间
|
||||||
|
*/
|
||||||
|
queueTime: string;
|
||||||
/**
|
/**
|
||||||
* 当前接待客服
|
* 当前接待客服
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -35,18 +35,18 @@
|
|||||||
>
|
>
|
||||||
纯文本 {{ textCount }}/{{ props.maxTextLength }}
|
纯文本 {{ textCount }}/{{ props.maxTextLength }}
|
||||||
</span>
|
</span>
|
||||||
<span class="divider">|</span>
|
<!-- <span class="divider">|</span>-->
|
||||||
<span
|
<!-- <span-->
|
||||||
:class="{ warn: imageCount >= props.maxImageCount, danger: imageCount > props.maxImageCount }"
|
<!-- :class="{ warn: imageCount >= props.maxImageCount, danger: imageCount > props.maxImageCount }"-->
|
||||||
>
|
<!-- >-->
|
||||||
图片 {{ imageCount }}/{{ props.maxImageCount }}
|
<!-- 图片 {{ imageCount }}/{{ props.maxImageCount }}-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
<span class="divider">|</span>
|
<!-- <span class="divider">|</span>-->
|
||||||
<span
|
<!-- <span-->
|
||||||
:class="{ warn: linkCount >= props.maxLinkCount, danger: linkCount > props.maxLinkCount }"
|
<!-- :class="{ warn: linkCount >= props.maxLinkCount, danger: linkCount > props.maxLinkCount }"-->
|
||||||
>
|
<!-- >-->
|
||||||
链接 {{ linkCount }}/{{ props.maxLinkCount }}
|
<!-- 链接 {{ linkCount }}/{{ props.maxLinkCount }}-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -73,7 +73,7 @@ const props = defineProps({
|
|||||||
simpleToolbar: propTypes.bool.def(false),
|
simpleToolbar: propTypes.bool.def(false),
|
||||||
maxTextLength: propTypes.number.def(1000),
|
maxTextLength: propTypes.number.def(1000),
|
||||||
maxImageCount: propTypes.number.def(3),
|
maxImageCount: propTypes.number.def(3),
|
||||||
maxLinkCount: propTypes.number.def(5)
|
maxLinkCount: propTypes.number.def(0)
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'countChange']);
|
const emit = defineEmits(['update:modelValue', 'countChange']);
|
||||||
@@ -108,8 +108,8 @@ const toolbarConfig = computed<Partial<IToolbarConfig>>(() => {
|
|||||||
toolbarKeys: [
|
toolbarKeys: [
|
||||||
'bold',
|
'bold',
|
||||||
'numberedList',
|
'numberedList',
|
||||||
'uploadImage',
|
// 'uploadImage',
|
||||||
'insertLink',
|
// 'insertLink',
|
||||||
'clearStyle',
|
'clearStyle',
|
||||||
],
|
],
|
||||||
excludeKeys: []
|
excludeKeys: []
|
||||||
@@ -272,6 +272,11 @@ const getUploadVideoMenuConfig = () => ({
|
|||||||
const editorConfig = computed<Partial<IEditorConfig>>(() => ({
|
const editorConfig = computed<Partial<IEditorConfig>>(() => ({
|
||||||
placeholder: props.simpleToolbar ? '请输入标准回复话术...' : '请输入内容',
|
placeholder: props.simpleToolbar ? '请输入标准回复话术...' : '请输入内容',
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
|
hoverbarKeys: {
|
||||||
|
text: {menuKeys: ['bold']},
|
||||||
|
image: {menuKeys: []},
|
||||||
|
link: {menuKeys: []}
|
||||||
|
},
|
||||||
MENU_CONF: {
|
MENU_CONF: {
|
||||||
uploadImage: getUploadImageMenuConfig() as any,
|
uploadImage: getUploadImageMenuConfig() as any,
|
||||||
uploadVideo: getUploadVideoMenuConfig() as any
|
uploadVideo: getUploadVideoMenuConfig() as any
|
||||||
|
|||||||
@@ -61,11 +61,11 @@ watch(
|
|||||||
const settingRef = ref<InstanceType<typeof Settings>>();
|
const settingRef = ref<InstanceType<typeof Settings>>();
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
// try {
|
||||||
await initMessageBox();
|
// await initMessageBox();
|
||||||
} finally {
|
// } finally {
|
||||||
initPush();
|
// initPush();
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleClickOutside = () => {
|
const handleClickOutside = () => {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { ElNotification } from 'element-plus';
|
import {ElNotification} from 'element-plus';
|
||||||
import type { MessageVO } from '@/api/system/message/types';
|
import type {MessageVO} from '@/api/system/message/types';
|
||||||
import { getMessageBox } from '@/api/system/message';
|
import {getMessageBox} from '@/api/system/message';
|
||||||
import { useNoticeStore } from '@/store/modules/notice';
|
import {useNoticeStore} from '@/store/modules/notice';
|
||||||
import { useUserStore } from '@/store/modules/user';
|
import {useUserStore} from '@/store/modules/user';
|
||||||
import { getToken } from '@/utils/auth';
|
import {getToken} from '@/utils/auth';
|
||||||
import { isMessageRead } from '@/utils/message-read';
|
import {isMessageRead} from '@/utils/message-read';
|
||||||
import { parsePushMessage, resolveNoticeGroup, resolveNoticeTitle, shouldAppendNotice } from '@/utils/push-message';
|
import {parsePushMessage, resolveNoticeGroup, resolveNoticeTitle, shouldAppendNotice} from '@/utils/push-message';
|
||||||
|
|
||||||
let closePushConnection: (() => void) | undefined;
|
let closePushConnection: (() => void) | undefined;
|
||||||
let stopPushWatchers: Array<() => void> = [];
|
let stopPushWatchers: Array<() => void> = [];
|
||||||
@@ -85,7 +85,7 @@ const buildWsUrl = (path: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const initSsePush = (url: string) => {
|
const initSsePush = (url: string) => {
|
||||||
const { data, error, close } = useEventSource(url, [], {
|
const {data, error, close} = useEventSource(url, [], {
|
||||||
autoReconnect: {
|
autoReconnect: {
|
||||||
retries: 5,
|
retries: 5,
|
||||||
delay: 5000,
|
delay: 5000,
|
||||||
@@ -110,7 +110,7 @@ const initSsePush = (url: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const initWsPush = (url: string) => {
|
const initWsPush = (url: string) => {
|
||||||
const { close } = useWebSocket(url, {
|
const {close} = useWebSocket(url, {
|
||||||
autoReconnect: {
|
autoReconnect: {
|
||||||
retries: 3,
|
retries: 3,
|
||||||
delay: 1000,
|
delay: 1000,
|
||||||
@@ -153,7 +153,7 @@ export const initMessageBox = async () => {
|
|||||||
useNoticeStore().clearNotice();
|
useNoticeStore().clearNotice();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { data } = await getMessageBox();
|
const {data} = await getMessageBox();
|
||||||
const notices = [...(data?.systemList ?? []), ...(data?.noticeList ?? []), ...(data?.workflowList ?? [])].map(
|
const notices = [...(data?.systemList ?? []), ...(data?.noticeList ?? []), ...(data?.workflowList ?? [])].map(
|
||||||
toNoticeItem
|
toNoticeItem
|
||||||
);
|
);
|
||||||
@@ -168,6 +168,7 @@ export const closePush = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const resumePushIfNeeded = () => {
|
const resumePushIfNeeded = () => {
|
||||||
|
console.log('走着?')
|
||||||
if (!pushKicked || !getToken() || document.visibilityState !== 'visible') {
|
if (!pushKicked || !getToken() || document.visibilityState !== 'visible') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -186,7 +187,7 @@ const resumePushIfNeeded = () => {
|
|||||||
}
|
}
|
||||||
}, 300);
|
}, 300);
|
||||||
};
|
};
|
||||||
|
//
|
||||||
window.addEventListener('focus', resumePushIfNeeded);
|
// window.addEventListener('focus', resumePushIfNeeded);
|
||||||
document.addEventListener('visibilitychange', resumePushIfNeeded);
|
// document.addEventListener('visibilitychange', resumePushIfNeeded);
|
||||||
window.addEventListener('online', resumePushIfNeeded);
|
// window.addEventListener('online', resumePushIfNeeded);
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :show-overflow-tooltip="true" align="center" label="等待时长" prop="os" width="100">
|
<el-table-column :show-overflow-tooltip="true" align="center" label="等待时长" prop="os" width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<AwaitTime :row-id="row.id" :start-time="row.startTime" :status="row.status"/>
|
<AwaitTime :row-id="row.id" :start-time="row.queueTime" :status="row.status"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :show-overflow-tooltip="true" align="center" label="最后消息时间" prop="lastMessageTime"
|
<el-table-column :show-overflow-tooltip="true" align="center" label="最后消息时间" prop="lastMessageTime"
|
||||||
|
|||||||
@@ -9,8 +9,10 @@
|
|||||||
@keyup.enter="handleQuery"/>
|
@keyup.enter="handleQuery"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="分类" prop="category">
|
<el-form-item label="分类" prop="category">
|
||||||
<el-input v-model="queryParams.category" clearable placeholder="请输入分类" size="large"
|
<el-select v-model="queryParams.category" clearable placeholder="请选择分类" size="large">
|
||||||
@keyup.enter="handleQuery"/>
|
<el-option v-for="(item,index) in com_question_categories" :key="index" :label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" clearable placeholder="请选择状态" size="large">
|
<el-select v-model="queryParams.status" clearable placeholder="请选择状态" size="large">
|
||||||
|
|||||||
@@ -171,7 +171,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="form.remark" type="textarea" :rows="3" placeholder="请输入内容"></el-input>
|
<el-input v-model="form.remark" :maxlength="200" :rows="3" placeholder="请输入内容" show-word-limit
|
||||||
|
type="textarea"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -322,6 +323,7 @@ import modal from '@/plugins/modal';
|
|||||||
import {useDict} from '@/utils/dict';
|
import {useDict} from '@/utils/dict';
|
||||||
import {download as requestDownload} from '@/utils/request';
|
import {download as requestDownload} from '@/utils/request';
|
||||||
import {parseTime} from '@/utils/ruoyi';
|
import {parseTime} from '@/utils/ruoyi';
|
||||||
|
import {QuestionFilled} from "@element-plus/icons-vue";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const {sys_normal_disable} = toRefs<any>(useDict('sys_normal_disable'));
|
const {sys_normal_disable} = toRefs<any>(useDict('sys_normal_disable'));
|
||||||
|
|||||||
Reference in New Issue
Block a user