From 270f9915dcce0d9ebed1e0d0bb19e0fbffa8d5f7 Mon Sep 17 00:00:00 2001 From: lai <10633968+laiyujun1@user.noreply.gitee.com> Date: Fri, 6 Jun 2025 16:44:32 +0800 Subject: [PATCH] add psap version --- src/api/agentManage/callback.ts | 16 + src/i18n/locales/en-US.ts | 9 + src/i18n/locales/zh-CN.ts | 9 + src/views/agentManage/callback/index.vue | 227 ++++++++ .../components/mfOverview/DashboardCards.vue | 7 +- src/views/ne/neConfig/index.vue | 526 ++++++++---------- 6 files changed, 486 insertions(+), 308 deletions(-) create mode 100644 src/api/agentManage/callback.ts create mode 100644 src/views/agentManage/callback/index.vue diff --git a/src/api/agentManage/callback.ts b/src/api/agentManage/callback.ts new file mode 100644 index 00000000..38cb7af9 --- /dev/null +++ b/src/api/agentManage/callback.ts @@ -0,0 +1,16 @@ +import { request } from '@/plugins/http-fetch'; + + +/** + * 查询定时任务调度列表 + * @param query 查询参数 + * @returns object + */ +export function listCallBack(query: Record) { + return request({ + url: '/psap/v1/mf/ticket/list', + method: 'get', + params: query, + }); +} + diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index baf42d8f..51eca940 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -358,6 +358,15 @@ export default { answeredTime:'Answered Time', callDuration:'Call Duration', msdData:'MSD Info', + }, + callback:{ + callerIdNumber:'Caller Number', + calleeIdNumber:'Callee Number', + status:'Status', + ticketId:'Ticket ID', + startTime:'Start Time', + msdData:'MSD Info', + agentName: 'Agent Name', } }, dashboard: { diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 98eeefce..0dc333f3 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -358,6 +358,15 @@ export default { answeredTime:'接听时间', callDuration:'通话时长', msdData:'MSD内容', + }, + callback:{ + callerIdNumber:'主叫号码', + calleeIdNumber:'被叫号码', + status:'状态', + ticketId:'工单编号', + startTime:'开始时间', + msdData:'MSD内容', + agentName: '座席名称', } }, dashboard: { diff --git a/src/views/agentManage/callback/index.vue b/src/views/agentManage/callback/index.vue new file mode 100644 index 00000000..47296b19 --- /dev/null +++ b/src/views/agentManage/callback/index.vue @@ -0,0 +1,227 @@ + + + + + diff --git a/src/views/dashboard/overview/components/mfOverview/DashboardCards.vue b/src/views/dashboard/overview/components/mfOverview/DashboardCards.vue index f5ac6e8a..f52305b8 100644 --- a/src/views/dashboard/overview/components/mfOverview/DashboardCards.vue +++ b/src/views/dashboard/overview/components/mfOverview/DashboardCards.vue @@ -54,7 +54,7 @@ function updateChartData(newValue: number, dataArray: any) { const isFirstLoadUser = ref(true); function updateUserChartData(newValue: number, dataArray: any) { // 如果是第一次加载,用当前值填充整个数组 - if (isFirstLoad.value) { + if (isFirstLoadUser.value) { dataArray.value = Array(7).fill(newValue); } else { // 非第一次加载,正常更新数据(移除第一个,添加新值) @@ -272,7 +272,6 @@ function fnGetList() { prevFailedCallsCount.value = failedCallsCount.value; - // 更新 activeCallsData 和 mosData failedCallsCount.value = res.total; // 数组长度 failedCallsCountChange.value = prevFailedCallsCount.value ? prevFailedCallsCount.value - failedCallsCount.value : 0; @@ -323,7 +322,7 @@ onBeforeUnmount(() => {
{{ t('views.dashboard.overview.userTitle') }}
- +
{{ t('views.dashboard.overview.totalUser') }}
@@ -342,7 +341,7 @@ onBeforeUnmount(() => { - +
{{ t('views.dashboard.overview.onlineUser') }}
diff --git a/src/views/ne/neConfig/index.vue b/src/views/ne/neConfig/index.vue index ad5754a4..49d78eff 100644 --- a/src/views/ne/neConfig/index.vue +++ b/src/views/ne/neConfig/index.vue @@ -13,6 +13,9 @@ import useConfigList from './hooks/useConfigList'; import useConfigArray from './hooks/useConfigArray'; import useConfigArrayChild from './hooks/useConfigArrayChild'; import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig'; +import { useRoute } from 'vue-router'; +const route = useRoute(); + const neInfoStore = useNeInfoStore(); const { t } = useI18n(); const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({ @@ -76,6 +79,7 @@ function fnSelectConfigNode(_: any, info: any) { if (treeState.selectNode.paramName == key) { return; } + fnActiveConfigNode(key); } @@ -168,15 +172,44 @@ function fnActiveConfigNode(key: string | number) { // 列表字段 const columns: Record[] = []; for (const rule of arrayState.dataRule.record) { - columns.push({ - title: rule.display, - dataIndex: rule.name, - align: 'left', - resizable: true, - width: 150, - minWidth: 100, - maxWidth: 350, - }); + if (rule.name === 'name') { + columns.push({ + title: rule.display, + dataIndex: rule.name, + align: 'left', + resizable: true, + width: 150, + minWidth: 100, + maxWidth: 350, + customFilterDropdown: true, + onFilter: (value: any, record: any) => { + const regex = new RegExp('^[0-9]{4,8}$'); + const name = record.name.value?.toString().trim() || ''; + const filterValue = value?.toString().trim(); + return regex.test(name) && name.includes(filterValue); // 正则匹配且模糊查询 + }, + onFilterDropdownOpenChange: (visible: any) => { + if (visible) { + setTimeout(() => { + searchInput.value.focus(); + }, 100); + } + }, + }); + } else { + columns.push({ + title: rule.display, + dataIndex: rule.name, + align: 'left', + resizable: true, + width: 150, + minWidth: 100, + maxWidth: 350, + }); + } + + + } columns.push({ title: t('common.operate'), @@ -203,7 +236,7 @@ function fnActiveConfigNode(key: string | number) { } /**查询配置可选属性值列表 */ -function fnGetNeConfig() { +function fnGetNeConfig(routeSelect?: string) { const neType = neTypeSelect.value[0]; if (!neType) { message.warning({ @@ -240,7 +273,8 @@ function fnGetNeConfig() { const item = JSON.parse(JSON.stringify(treeState.data[0])); treeState.selectNode = item; treeState.selectLoading = false; - fnActiveConfigNode(item.key); + // fnActiveConfigNode(((route.query.treeName as string)||item.key)); + fnActiveConfigNode(routeSelect || item.key); } } }); @@ -362,6 +396,25 @@ const { arrayEditClose, }); +const state = reactive({ + searchText: '', + searchedColumn: '', +}); + +const searchInput = ref(); + +const handleSearch = (selectedKeys: any, confirm: any, dataIndex: any) => { + confirm(); + state.searchText = selectedKeys[0]; + state.searchedColumn = dataIndex; +}; + +const handleReset = (clearFilters: any) => { + clearFilters({ confirm: true }); + state.searchText = ''; +}; + + onMounted(() => { // 获取网元网元列表 neInfoStore.fnNelist().then(res => { @@ -381,7 +434,7 @@ onMounted(() => { return; } // 默认选择AMF - const item = neCascaderOptions.value.find(s => s.value === 'AMF'); + const item = neCascaderOptions.value.find(s => s.value === ((route.query.neType as string) || 'MF')); if (item && item.children) { const info = item.children[0]; neTypeSelect.value = [info.neType, info.neId]; @@ -389,7 +442,7 @@ onMounted(() => { const info = neCascaderOptions.value[0].children[0]; neTypeSelect.value = [info.neType, info.neId]; } - fnGetNeConfig(); + fnGetNeConfig((route.query.treeName as string)); } } else { message.warning({ @@ -404,13 +457,7 @@ onMounted(() => {