From eec6e9b89b46ee43d0b8cdfe508eed8b58574498 Mon Sep 17 00:00:00 2001 From: Leo_Ding <2405260743@qq.com> Date: Mon, 3 Nov 2025 10:20:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=BC=E5=8F=AB=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/JsonMap/index.vue | 154 +++++---- src/layouts/components/BasicHeader.vue | 14 +- src/locales/lang/zh-CN/menu.js | 15 +- src/router/routes/callBaseSet.js | 30 ++ src/router/routes/callServerObj.js | 30 ++ src/router/routes/index.js | 10 +- src/router/routes/operator.js | 30 ++ src/router/routes/serverSet.js | 11 + src/router/routes/serviceStaffCall.js | 29 ++ src/router/routes/trafficMgt.js | 73 ++++ src/store/modules/user.js | 5 +- .../callType/components/EditDialog.vue | 144 ++++++++ src/views/callBaseSet/callType/index.vue | 211 ++++++++++++ src/views/home/index.vue | 6 +- .../operator/compontent/EditDialog.vue | 144 ++++++++ src/views/operatorMgt/operator/index.vue | 247 ++++++++++++++ src/views/serverObj/serverList/index.vue | 12 +- .../callLog/components/EditDialog.vue | 144 ++++++++ src/views/trafficMgt/callLog/index.vue | 320 ++++++++++++++++++ .../missedCalls/components/EditDialog.vue | 144 ++++++++ src/views/trafficMgt/missedCalls/index.vue | 211 ++++++++++++ .../myCallLog/components/EditDialog.vue | 144 ++++++++ src/views/trafficMgt/myCallLog/index.vue | 320 ++++++++++++++++++ .../quality/components/EditDialog.vue | 144 ++++++++ src/views/trafficMgt/quality/index.vue | 211 ++++++++++++ .../qualityLog/components/EditDialog.vue | 144 ++++++++ src/views/trafficMgt/qualityLog/index.vue | 211 ++++++++++++ 27 files changed, 3074 insertions(+), 84 deletions(-) create mode 100644 src/router/routes/callBaseSet.js create mode 100644 src/router/routes/callServerObj.js create mode 100644 src/router/routes/operator.js create mode 100644 src/router/routes/serviceStaffCall.js create mode 100644 src/router/routes/trafficMgt.js create mode 100644 src/views/callBaseSet/callType/components/EditDialog.vue create mode 100644 src/views/callBaseSet/callType/index.vue create mode 100644 src/views/operatorMgt/operator/compontent/EditDialog.vue create mode 100644 src/views/operatorMgt/operator/index.vue create mode 100644 src/views/trafficMgt/callLog/components/EditDialog.vue create mode 100644 src/views/trafficMgt/callLog/index.vue create mode 100644 src/views/trafficMgt/missedCalls/components/EditDialog.vue create mode 100644 src/views/trafficMgt/missedCalls/index.vue create mode 100644 src/views/trafficMgt/myCallLog/components/EditDialog.vue create mode 100644 src/views/trafficMgt/myCallLog/index.vue create mode 100644 src/views/trafficMgt/quality/components/EditDialog.vue create mode 100644 src/views/trafficMgt/quality/index.vue create mode 100644 src/views/trafficMgt/qualityLog/components/EditDialog.vue create mode 100644 src/views/trafficMgt/qualityLog/index.vue diff --git a/src/components/JsonMap/index.vue b/src/components/JsonMap/index.vue index 464df2c..d244511 100644 --- a/src/components/JsonMap/index.vue +++ b/src/components/JsonMap/index.vue @@ -1,6 +1,10 @@ @@ -10,96 +14,95 @@ import AMapLoader from '@amap/amap-jsapi-loader' // 地图容器引用 const mapContainer = ref(null) + +// 地图实例 let map = null -// 观南社区 - 我们将通过高德行政区查询 API 获取其边界 -const districtName = '观南社区' -const city = '南通市' +// 🎯 目标区域:北京中轴线核心区域(天安门、故宫一带) +const targetArea = { + center: [116.397428, 39.90923], // 天安门 + bounds: [ + [116.385, 39.895], // 西南角 [minLng, minLat] + [116.410, 39.920] // 东北角 [maxLng, maxLat] + ], + zoom: 14 // 合适的缩放级别 +} + +// 🌆 标注点数据(仅限目标区域内) +const markers = [ + { position: [116.397428, 39.90923], title: '天安门', address: '北京市东城区长安街', tel: '010-12345678' }, + { position: [116.3961, 39.9087], title: '故宫博物院', address: '北京市东城区景山前街4号', tel: '010-87654321' }, + { position: [116.4076, 39.9037], title: '王府井', address: '北京市东城区王府井大街', tel: '010-11223344' }, + { position: [116.3780, 39.9042], title: '国家大剧院', address: '北京市西城区西长安街2号', tel: '010-55667788' }, + { position: [116.4255, 39.9075], title: '北京站', address: '北京市东城区毛家湾胡同甲13号', tel: '010-34534534' }, + { position: [116.4625, 39.9100], title: '三里屯', address: '北京市朝阳区三里屯路', tel: '010-67867867' } +] // 初始化地图 const initMap = async () => { try { - // 🔥 关键:必须在这里声明需要加载的插件 await AMapLoader.load({ key: '38b334d84b1f89aa39d4efae76f0b341', // 替换为你的高德 Key - version: '2.0', - plugins: ['AMap.DistrictSearch'] // ✅ 显式加载行政区查询插件 + version: '2.0' }) - console.log('高德地图 SDK 及插件加载成功') + console.log('高德地图 SDK 加载成功') - // 创建地图实例 + // 初始化地图 map = new window.AMap.Map(mapContainer.value, { + center: targetArea.center, + zoom: targetArea.zoom, viewMode: '3D', - pitch: 20, + pitch: 35, + rotation: 0, + showLabel: true }) - // 现在可以安全使用 DistrictSearch - const districtSearch = new window.AMap.DistrictSearch({ - level: 'community', // 查询社区级 - subdistrict: 0 // 不返回下级 - }) + // 🔒 设置地图限制范围(禁止拖出该区域) + const amapBounds = new window.AMap.Bounds( + new window.AMap.LngLat(targetArea.bounds[0][0], targetArea.bounds[0][1]), + new window.AMap.LngLat(targetArea.bounds[1][0], targetArea.bounds[1][1]) + ) + map.setLimitBounds(amapBounds) - const city = '南通市' - const districtName = '观南社区' + console.log('地图已限制在指定区域内') - districtSearch.search(`${city}${districtName}`, (status, result) => { - if (status === 'complete' && result.districtList.length > 0) { - const data = result.districtList[0] - const bounds = data.boundaries + // 添加标注(使用默认图标) + markers.forEach(item => { + const marker = new window.AMap.Marker({ + position: item.position, + title: item.title, + extData: item // 绑定数据用于点击事件 + }) - if (!bounds || bounds.length === 0) { - alert('❌ 未获取到观南社区的边界数据,请确认该社区存在') - return - } + // 创建信息窗口 + const infoWindow = new window.AMap.InfoWindow({ + content: ` +
+

${item.title}

+

📍 地址:${item.address}

+

📞 电话:${item.tel}

+
+ `, + offset: new window.AMap.Pixel(0, -10) + }) - // 多边形路径 - const path = bounds[0].map(coord => new window.AMap.LngLat(coord[0], coord[1])) + // 点击打开信息窗口 + marker.on('click', () => { + infoWindow.open(map, marker.getPosition()) + }) - // 绘制多边形 - const polygon = new window.AMap.Polygon({ - path: path, - strokeColor: '#4facfe', - strokeWeight: 4, - strokeOpacity: 0.9, - fillColor: 'transparent' - }) - map.add(polygon) - - // 自动适配视野 - map.setFitView(polygon) - const currentZoom = map.getZoom() - map.setZoom(currentZoom - 0.5) // 微调避免太松 - - // 添加中心标注 - const marker = new window.AMap.Marker({ - position: data.center, - label: { content: '观南社区', direction: 'top' } - }) - map.add(marker) - - // 🛑 拖拽限制:防止地图中心移出区域 - map.on('dragend', () => { - const center = map.getCenter() - const isInside = window.AMap.GeometryUtil.isPointInRing(center, path) - if (!isInside) { - console.log('已超出观南社区范围,自动回弹') - map.panTo(data.center) - } - }) - - console.log('✅ 成功加载并显示观南社区') - } else { - alert('🔍 未找到“观南社区”,请检查名称是否正确(建议尝试:观南村、或去掉“市”)') - } + // 添加到地图 + map.add(marker) }) } catch (e) { console.error('地图初始化失败:', e) - alert('❌ 地图加载失败,请检查网络或高德 Key 权限') + alert('地图加载失败,请检查高德 Key 或网络连接') } } +// 组件挂载后初始化地图 onMounted(() => { console.log('组件已挂载,准备初始化地图') initMap() @@ -108,11 +111,13 @@ onMounted(() => { \ No newline at end of file diff --git a/src/layouts/components/BasicHeader.vue b/src/layouts/components/BasicHeader.vue index 10c5150..8fbdfed 100644 --- a/src/layouts/components/BasicHeader.vue +++ b/src/layouts/components/BasicHeader.vue @@ -47,9 +47,9 @@ {{ $t('component.RightContent.profile') }} --> - + - 返回平台 + 返回平台 @@ -68,7 +68,7 @@ import { Modal } from 'ant-design-vue' import { storeToRefs } from 'pinia' import { computed, useSlots, ref } from 'vue' import { useRouter } from 'vue-router' -import { LoginOutlined, SettingOutlined, EditOutlined, TranslationOutlined, BarChartOutlined,LeftOutlined } from '@ant-design/icons-vue' +import { LoginOutlined, SettingOutlined, EditOutlined, TranslationOutlined, BarChartOutlined, LeftOutlined } from '@ant-design/icons-vue' import { useAppStore, useUserStore } from '@/store' import ActionButton from './ActionButton.vue' import { theme as antTheme } from 'ant-design-vue' @@ -157,9 +157,11 @@ function handleLogout() { */ function handleOpen() { - const multiTab = useMultiTab() - multiTab.$reset() - router.replace({path:'/platForm'}) + storage.local.removeItem('platform') + storage.local.removeItem('stationId') + const multiTab = useMultiTab() + multiTab.$reset() + router.replace({ path: '/platForm' }) } /** diff --git a/src/locales/lang/zh-CN/menu.js b/src/locales/lang/zh-CN/menu.js index d495b43..c4f3d1f 100644 --- a/src/locales/lang/zh-CN/menu.js +++ b/src/locales/lang/zh-CN/menu.js @@ -1,3 +1,5 @@ +import callBaseSet from "../../../router/routes/callBaseSet"; + export default { welcome: '欢迎', home: '首页', @@ -63,5 +65,16 @@ export default { serverProjectManage:'服务项目管理', serviceStaffyuying:'服务人员', workorderYunying:'工单管理', - waitWorkOrder:'待派单' + waitWorkOrder:'待派单', + callServerObj:'服务对象管理', + callBaseSet:'基础配置', + callType:'呼叫类型', + trafficMgt:'话务管理', + callLog:'通话记录', + myCallLog:'我的通话记录', + missedCalls:'未接来电', + quality:'质检管理', + qualityLog:'质检记录', + operatorMgt:'话务员管理', + operator:'话务员列表', } diff --git a/src/router/routes/callBaseSet.js b/src/router/routes/callBaseSet.js new file mode 100644 index 0000000..0340883 --- /dev/null +++ b/src/router/routes/callBaseSet.js @@ -0,0 +1,30 @@ +import { DollarOutlined } from '@ant-design/icons-vue' + +export default [ + { + path: 'callBaseSet', + name: 'callBaseSet', + component: 'RouteViewLayout', + meta: { + icon: DollarOutlined, + title: '基础配置', + isMenu: true, + keepAlive: true, + permission: '*', + }, + children: [ + { + path: 'callType', + name: 'callType', + component: 'callBaseSet/callType/index.vue', + meta: { + title: '通话类型', + isMenu: true, + keepAlive: true, + permission: '*', + }, + }, + + ], + }, +] diff --git a/src/router/routes/callServerObj.js b/src/router/routes/callServerObj.js new file mode 100644 index 0000000..140c14a --- /dev/null +++ b/src/router/routes/callServerObj.js @@ -0,0 +1,30 @@ +import { DollarOutlined } from '@ant-design/icons-vue' + +export default [ + { + path: 'callServerObj', + name: 'callServerObj', + component: 'RouteViewLayout', + meta: { + icon: DollarOutlined, + title: '服务对象管理', + isMenu: true, + keepAlive: true, + permission: '*', + }, + children: [ + { + path: 'callServerList', + name: 'callServerList', + component: 'serverObj/serverList/index.vue', + meta: { + title: '服务对象列表', + isMenu: true, + keepAlive: true, + permission: '*', + }, + }, + + ], + }, +] diff --git a/src/router/routes/index.js b/src/router/routes/index.js index e0cc627..6ea0979 100644 --- a/src/router/routes/index.js +++ b/src/router/routes/index.js @@ -19,6 +19,10 @@ import serverSet from './serverSet' import yunYingServerObj from './yunyingServerObj' import serviceStaffYunYing from './serviceStaffYunYing' import workorderYunying from './workorderYunying' +import callServerObj from './callServerObj' +import callBaseSet from './callBaseSet' +import trafficMgt from './trafficMgt' +import operator from './operator' export default [ ...home, // ...form, @@ -40,5 +44,9 @@ export default [ ...serverSet, ...yunYingServerObj, ...serviceStaffYunYing, - ...workorderYunying + ...workorderYunying, + ...callServerObj, + ...callBaseSet, + ...trafficMgt, + ...operator, ] diff --git a/src/router/routes/operator.js b/src/router/routes/operator.js new file mode 100644 index 0000000..aa2fe44 --- /dev/null +++ b/src/router/routes/operator.js @@ -0,0 +1,30 @@ +import { DollarOutlined } from '@ant-design/icons-vue' + +export default [ + { + path: 'operatorMgt', + name: 'operatorMgt', + component: 'RouteViewLayout', + meta: { + icon: DollarOutlined, + title: '话务员管理', + isMenu: true, + keepAlive: true, + permission: '*', + }, + children: [ + { + path: 'operator', + name: 'operator', + component: 'operatorMgt/operator/index.vue', + meta: { + title: '话务员列表', + isMenu: true, + keepAlive: true, + permission: '*', + }, + }, + + ], + }, +] diff --git a/src/router/routes/serverSet.js b/src/router/routes/serverSet.js index 6c45160..3d51dd8 100644 --- a/src/router/routes/serverSet.js +++ b/src/router/routes/serverSet.js @@ -24,6 +24,17 @@ export default [ permission: '*', }, }, + { + path: 'callBaseSet', + name: 'callBaseSet', + component: 'baseSet/callBaseSet/index.vue', + meta: { + title: '基础配置', + isMenu: true, + keepAlive: true, + permission: '*', + }, + }, ], }, ] diff --git a/src/router/routes/serviceStaffCall.js b/src/router/routes/serviceStaffCall.js new file mode 100644 index 0000000..9b18c35 --- /dev/null +++ b/src/router/routes/serviceStaffCall.js @@ -0,0 +1,29 @@ +import { DollarOutlined } from '@ant-design/icons-vue' + +export default [ + { + path: 'serviceStaffCall', + name: 'serviceStaffCall', + component: 'RouteViewLayout', + meta: { + icon: DollarOutlined, + title: '服务人员', + isMenu: true, + keepAlive: true, + permission: '*', + }, + children: [ + { + path: 'serviceStaffList', + name: 'serviceStaffList', + component: 'serviceStaff/serviceStaffList/index.vue', + meta: { + title: '服务人员', + isMenu: true, + keepAlive: true, + permission: '*', + }, + }, + ], + }, +] diff --git a/src/router/routes/trafficMgt.js b/src/router/routes/trafficMgt.js new file mode 100644 index 0000000..d9a74ca --- /dev/null +++ b/src/router/routes/trafficMgt.js @@ -0,0 +1,73 @@ +import { DollarOutlined } from '@ant-design/icons-vue' + +export default [ + { + path: 'trafficMgt', + name: 'trafficMgt', + component: 'RouteViewLayout', + meta: { + icon: DollarOutlined, + title: '话务管理', + isMenu: true, + keepAlive: true, + permission: '*', + }, + children: [ + { + path: 'myCallLog', + name: 'myCallLog', + component: 'trafficMgt/myCallLog/index.vue', + meta: { + title: '我的通话记录', + isMenu: true, + keepAlive: true, + permission: '*', + }, + }, + { + path: 'callLog', + name: 'callLog', + component: 'trafficMgt/callLog/index.vue', + meta: { + title: '通话记录', + isMenu: true, + keepAlive: true, + permission: '*', + }, + }, + { + path: 'missedCalls', + name: 'missedCalls', + component: 'trafficMgt/missedCalls/index.vue', + meta: { + title: '未接来电', + isMenu: true, + keepAlive: true, + permission: '*', + }, + }, + { + path: 'quality', + name: 'quality', + component: 'trafficMgt/quality/index.vue', + meta: { + title: '质检管理', + isMenu: true, + keepAlive: true, + permission: '*', + }, + }, + { + path: 'qualityLog', + name: 'qualityLog', + component: 'trafficMgt/qualityLog/index.vue', + meta: { + title: '质检记录', + isMenu: true, + keepAlive: true, + permission: '*', + }, + }, + ], + }, +] diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 2f67da5..1ccf8bc 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -51,8 +51,9 @@ const useUserStore = defineStore('user', { const appStore = useAppStore() const multiTab = useMultiTab() const router = useRouter() - storage.local.removeItem(config('storage.token')) - storage.local.removeItem(config('storage.userInfo')) + // storage.local.removeItem(config('storage.token')) + // storage.local.removeItem(config('storage.userInfo')) + storage.local.clear() this.$reset() appStore.$reset() multiTab.$reset() diff --git a/src/views/callBaseSet/callType/components/EditDialog.vue b/src/views/callBaseSet/callType/components/EditDialog.vue new file mode 100644 index 0000000..98d524b --- /dev/null +++ b/src/views/callBaseSet/callType/components/EditDialog.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/src/views/callBaseSet/callType/index.vue b/src/views/callBaseSet/callType/index.vue new file mode 100644 index 0000000..db45b61 --- /dev/null +++ b/src/views/callBaseSet/callType/index.vue @@ -0,0 +1,211 @@ + + + + + diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 4a11928..fdeda75 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,6 +1,6 @@ + + diff --git a/src/views/operatorMgt/operator/index.vue b/src/views/operatorMgt/operator/index.vue new file mode 100644 index 0000000..be6da8b --- /dev/null +++ b/src/views/operatorMgt/operator/index.vue @@ -0,0 +1,247 @@ + + + + + diff --git a/src/views/serverObj/serverList/index.vue b/src/views/serverObj/serverList/index.vue index 0d0b944..106a764 100644 --- a/src/views/serverObj/serverList/index.vue +++ b/src/views/serverObj/serverList/index.vue @@ -3,13 +3,13 @@