diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/sound.js b/src/api/sound.js new file mode 100644 index 0000000..135c304 --- /dev/null +++ b/src/api/sound.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getSoundList(params) { + return request({ + url: '/sound/noCaselist', + method: 'get', + params + }) +} diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/sound.js b/src/api/sound.js new file mode 100644 index 0000000..135c304 --- /dev/null +++ b/src/api/sound.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getSoundList(params) { + return request({ + url: '/sound/noCaselist', + method: 'get', + params + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 02a38d0..52ae240 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -13,6 +13,15 @@ }) } +// 用户查询 +export function getUserSimpleList(params) { + return request({ + url: 'mgr/simplelist', + method: 'post', + params + }) +} + // 添加用户 export function addUser(params) { return request({ diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/sound.js b/src/api/sound.js new file mode 100644 index 0000000..135c304 --- /dev/null +++ b/src/api/sound.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getSoundList(params) { + return request({ + url: '/sound/noCaselist', + method: 'get', + params + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 02a38d0..52ae240 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -13,6 +13,15 @@ }) } +// 用户查询 +export function getUserSimpleList(params) { + return request({ + url: 'mgr/simplelist', + method: 'post', + params + }) +} + // 添加用户 export function addUser(params) { return request({ diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 14e8286..0d2256d 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -31,7 +31,7 @@ import ResetPwd from '@/views/system/user/resetPwd' import { getProject } from '@/utils/baseConfig' import IvrBar from './ivr/ivrBar' - +import { isReceiver } from '@/utils/permission' export default { name: 'AppHeader', components: { IvrBar, ResetPwd }, @@ -55,9 +55,14 @@ this.$store.dispatch('ToggleSideBar') }, logout() { - this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug - }) + // 判断签入签出状态,如果已签入提醒先签出 + if (isReceiver() && this.$store.getters.online === '1') { + this.$message.warning('请先签出!') + } else { + this.$store.dispatch('LogOut').then(() => { + location.reload() // 为了重新实例化vue-router对象 避免bug + }) + } }, resetPwd() { this.showSetPwd = true diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/sound.js b/src/api/sound.js new file mode 100644 index 0000000..135c304 --- /dev/null +++ b/src/api/sound.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getSoundList(params) { + return request({ + url: '/sound/noCaselist', + method: 'get', + params + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 02a38d0..52ae240 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -13,6 +13,15 @@ }) } +// 用户查询 +export function getUserSimpleList(params) { + return request({ + url: 'mgr/simplelist', + method: 'post', + params + }) +} + // 添加用户 export function addUser(params) { return request({ diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 14e8286..0d2256d 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -31,7 +31,7 @@ import ResetPwd from '@/views/system/user/resetPwd' import { getProject } from '@/utils/baseConfig' import IvrBar from './ivr/ivrBar' - +import { isReceiver } from '@/utils/permission' export default { name: 'AppHeader', components: { IvrBar, ResetPwd }, @@ -55,9 +55,14 @@ this.$store.dispatch('ToggleSideBar') }, logout() { - this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug - }) + // 判断签入签出状态,如果已签入提醒先签出 + if (isReceiver() && this.$store.getters.online === '1') { + this.$message.warning('请先签出!') + } else { + this.$store.dispatch('LogOut').then(() => { + location.reload() // 为了重新实例化vue-router对象 避免bug + }) + } }, resetPwd() { this.showSetPwd = true diff --git a/src/layout/components/ivr/ivrBar.vue b/src/layout/components/ivr/ivrBar.vue index b89ad5f..b4fdfca 100644 --- a/src/layout/components/ivr/ivrBar.vue +++ b/src/layout/components/ivr/ivrBar.vue @@ -260,6 +260,7 @@ this.btnStatus.btnHangUp = false this.status = '已签入' this.call = '空闲' + this.$store.commit('SET_ONLINE', '1') // TODO: 通知后台已签入 // 心跳监测定时器 // if (this.webVariable.web_heartbeatInterval > 0) { @@ -306,6 +307,7 @@ this.btnStatus.btnIdle = true this.btnStatus.btnMeeting = true this.btnStatus.btnHangUp = true + this.$store.commit('SET_ONLINE', '0') this.resetWs() // TODO: 通知后台已签出 // 清除定时器 diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/sound.js b/src/api/sound.js new file mode 100644 index 0000000..135c304 --- /dev/null +++ b/src/api/sound.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getSoundList(params) { + return request({ + url: '/sound/noCaselist', + method: 'get', + params + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 02a38d0..52ae240 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -13,6 +13,15 @@ }) } +// 用户查询 +export function getUserSimpleList(params) { + return request({ + url: 'mgr/simplelist', + method: 'post', + params + }) +} + // 添加用户 export function addUser(params) { return request({ diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 14e8286..0d2256d 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -31,7 +31,7 @@ import ResetPwd from '@/views/system/user/resetPwd' import { getProject } from '@/utils/baseConfig' import IvrBar from './ivr/ivrBar' - +import { isReceiver } from '@/utils/permission' export default { name: 'AppHeader', components: { IvrBar, ResetPwd }, @@ -55,9 +55,14 @@ this.$store.dispatch('ToggleSideBar') }, logout() { - this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug - }) + // 判断签入签出状态,如果已签入提醒先签出 + if (isReceiver() && this.$store.getters.online === '1') { + this.$message.warning('请先签出!') + } else { + this.$store.dispatch('LogOut').then(() => { + location.reload() // 为了重新实例化vue-router对象 避免bug + }) + } }, resetPwd() { this.showSetPwd = true diff --git a/src/layout/components/ivr/ivrBar.vue b/src/layout/components/ivr/ivrBar.vue index b89ad5f..b4fdfca 100644 --- a/src/layout/components/ivr/ivrBar.vue +++ b/src/layout/components/ivr/ivrBar.vue @@ -260,6 +260,7 @@ this.btnStatus.btnHangUp = false this.status = '已签入' this.call = '空闲' + this.$store.commit('SET_ONLINE', '1') // TODO: 通知后台已签入 // 心跳监测定时器 // if (this.webVariable.web_heartbeatInterval > 0) { @@ -306,6 +307,7 @@ this.btnStatus.btnIdle = true this.btnStatus.btnMeeting = true this.btnStatus.btnHangUp = true + this.$store.commit('SET_ONLINE', '0') this.resetWs() // TODO: 通知后台已签出 // 清除定时器 diff --git a/src/router/modules/case.js b/src/router/modules/case.js index 014cda2..909fcb2 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -8,32 +8,33 @@ alwaysShow: true, meta: { title: '事件管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/coorBusiness' }, children: [ { path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '' } + meta: { title: '待办事件', icon: '', permission: '/case/workList' } }, { path: '/completedList', name: 'CompletedList', component: () => import('@/views/caseManage/completedList'), - meta: { title: '已办事件', icon: '' } + meta: { title: '已办事件', icon: '', permission: '/completed' } }, { path: '/searchList', name: 'SearchList', component: () => import('@/views/caseManage/searchList'), - meta: { title: '事件查询', icon: '' } + meta: { title: '事件查询', icon: '', permission: '/case/queryListPage' } }, { path: '/revisitList', @@ -51,39 +52,39 @@ path: '/delayApplyList', name: 'delayApplyList', component: () => import('@/views/caseManage/delayApplyList'), - meta: { title: '延期申请', icon: '' } + meta: { title: '延期申请', icon: '', permission: '/delayed' } }, { path: '/delayList', name: 'delayList', component: () => import('@/views/caseManage/delayList'), - meta: { title: '延期查询', icon: '' } + meta: { title: '延期查询', icon: '', permission: '/postponed' } }, { path: '/urgeList', name: 'urgeList', component: () => import('@/views/caseManage/urgeList'), - meta: { title: '催办查询', icon: '' } + meta: { title: '催办查询', icon: '', permission: '/urgeList' } }, { path: '/caseManage', name: 'caseManage', component: () => import('@/views/caseManage/caseManage'), - meta: { title: '事件管理', icon: '' } + meta: { title: '事件管理', icon: '', permission: '/caseManage' } }, { path: '/createCase', name: 'CreateCase', hidden: true, component: () => import('@/views/caseManage/createCase'), - meta: { title: '新建事件', icon: '' } + meta: { title: '新建事件', icon: '', permission: '' } }, { path: '/caseDetail/:id', name: 'caseDetail', hidden: true, component: () => import('@/views/caseManage/caseDetail'), - meta: { title: '事件详情', icon: '' } + meta: { title: '事件详情', icon: '', permission: '' } } ] }, { @@ -94,26 +95,27 @@ alwaysShow: true, meta: { title: '上报请示管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/caseReport' }, children: [ { path: '/workReportList', name: 'WorkReportList', component: () => import('@/views/caseManage/caseReportManage/workReportList'), - meta: { title: '待办上报请示', icon: '' } + meta: { title: '待办上报请示', icon: '', permission: '/workReportList' } }, { path: '/myReportList', name: 'MyReportList', component: () => import('@/views/caseManage/caseReportManage/myReportList'), - meta: { title: '我的上报请示', icon: '' } + meta: { title: '我的上报请示', icon: '', permission: '/myReportList' } }, { path: '/searchReportList', name: 'SearchReportList', component: () => import('@/views/caseManage/caseReportManage/searchReportList'), - meta: { title: '查询上报请示', icon: '' } + meta: { title: '查询上报请示', icon: '', permission: '/searchReportList' } } ] }] diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/sound.js b/src/api/sound.js new file mode 100644 index 0000000..135c304 --- /dev/null +++ b/src/api/sound.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getSoundList(params) { + return request({ + url: '/sound/noCaselist', + method: 'get', + params + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 02a38d0..52ae240 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -13,6 +13,15 @@ }) } +// 用户查询 +export function getUserSimpleList(params) { + return request({ + url: 'mgr/simplelist', + method: 'post', + params + }) +} + // 添加用户 export function addUser(params) { return request({ diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 14e8286..0d2256d 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -31,7 +31,7 @@ import ResetPwd from '@/views/system/user/resetPwd' import { getProject } from '@/utils/baseConfig' import IvrBar from './ivr/ivrBar' - +import { isReceiver } from '@/utils/permission' export default { name: 'AppHeader', components: { IvrBar, ResetPwd }, @@ -55,9 +55,14 @@ this.$store.dispatch('ToggleSideBar') }, logout() { - this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug - }) + // 判断签入签出状态,如果已签入提醒先签出 + if (isReceiver() && this.$store.getters.online === '1') { + this.$message.warning('请先签出!') + } else { + this.$store.dispatch('LogOut').then(() => { + location.reload() // 为了重新实例化vue-router对象 避免bug + }) + } }, resetPwd() { this.showSetPwd = true diff --git a/src/layout/components/ivr/ivrBar.vue b/src/layout/components/ivr/ivrBar.vue index b89ad5f..b4fdfca 100644 --- a/src/layout/components/ivr/ivrBar.vue +++ b/src/layout/components/ivr/ivrBar.vue @@ -260,6 +260,7 @@ this.btnStatus.btnHangUp = false this.status = '已签入' this.call = '空闲' + this.$store.commit('SET_ONLINE', '1') // TODO: 通知后台已签入 // 心跳监测定时器 // if (this.webVariable.web_heartbeatInterval > 0) { @@ -306,6 +307,7 @@ this.btnStatus.btnIdle = true this.btnStatus.btnMeeting = true this.btnStatus.btnHangUp = true + this.$store.commit('SET_ONLINE', '0') this.resetWs() // TODO: 通知后台已签出 // 清除定时器 diff --git a/src/router/modules/case.js b/src/router/modules/case.js index 014cda2..909fcb2 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -8,32 +8,33 @@ alwaysShow: true, meta: { title: '事件管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/coorBusiness' }, children: [ { path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '' } + meta: { title: '待办事件', icon: '', permission: '/case/workList' } }, { path: '/completedList', name: 'CompletedList', component: () => import('@/views/caseManage/completedList'), - meta: { title: '已办事件', icon: '' } + meta: { title: '已办事件', icon: '', permission: '/completed' } }, { path: '/searchList', name: 'SearchList', component: () => import('@/views/caseManage/searchList'), - meta: { title: '事件查询', icon: '' } + meta: { title: '事件查询', icon: '', permission: '/case/queryListPage' } }, { path: '/revisitList', @@ -51,39 +52,39 @@ path: '/delayApplyList', name: 'delayApplyList', component: () => import('@/views/caseManage/delayApplyList'), - meta: { title: '延期申请', icon: '' } + meta: { title: '延期申请', icon: '', permission: '/delayed' } }, { path: '/delayList', name: 'delayList', component: () => import('@/views/caseManage/delayList'), - meta: { title: '延期查询', icon: '' } + meta: { title: '延期查询', icon: '', permission: '/postponed' } }, { path: '/urgeList', name: 'urgeList', component: () => import('@/views/caseManage/urgeList'), - meta: { title: '催办查询', icon: '' } + meta: { title: '催办查询', icon: '', permission: '/urgeList' } }, { path: '/caseManage', name: 'caseManage', component: () => import('@/views/caseManage/caseManage'), - meta: { title: '事件管理', icon: '' } + meta: { title: '事件管理', icon: '', permission: '/caseManage' } }, { path: '/createCase', name: 'CreateCase', hidden: true, component: () => import('@/views/caseManage/createCase'), - meta: { title: '新建事件', icon: '' } + meta: { title: '新建事件', icon: '', permission: '' } }, { path: '/caseDetail/:id', name: 'caseDetail', hidden: true, component: () => import('@/views/caseManage/caseDetail'), - meta: { title: '事件详情', icon: '' } + meta: { title: '事件详情', icon: '', permission: '' } } ] }, { @@ -94,26 +95,27 @@ alwaysShow: true, meta: { title: '上报请示管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/caseReport' }, children: [ { path: '/workReportList', name: 'WorkReportList', component: () => import('@/views/caseManage/caseReportManage/workReportList'), - meta: { title: '待办上报请示', icon: '' } + meta: { title: '待办上报请示', icon: '', permission: '/workReportList' } }, { path: '/myReportList', name: 'MyReportList', component: () => import('@/views/caseManage/caseReportManage/myReportList'), - meta: { title: '我的上报请示', icon: '' } + meta: { title: '我的上报请示', icon: '', permission: '/myReportList' } }, { path: '/searchReportList', name: 'SearchReportList', component: () => import('@/views/caseManage/caseReportManage/searchReportList'), - meta: { title: '查询上报请示', icon: '' } + meta: { title: '查询上报请示', icon: '', permission: '/searchReportList' } } ] }] diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 1dde5c8..7e54bda 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -50,16 +50,18 @@ // } // res.push(tmp) // } - const menu = getMenu(menus, tmp) - if (menu) { // 如果有权限,添加该路由,并根据url的icon更新图标 - tmp.meta.icon = menu.icon // 给route更新icon - tmp.meta.title = menu.name // 给route更新名称 - if (tmp.children) { - tmp.children = filterAsyncRouter(tmp.children, menus) + if (tmp.meta && tmp.meta.permission) { + const menu = getMenu(menus, tmp) + if (menu) { // 如果有权限,添加该路由,并根据url的icon更新图标 + tmp.meta.icon = menu.icon // 给route更新icon + tmp.meta.title = menu.name // 给route更新名称 + if (tmp.children) { + tmp.children = filterAsyncRouter(tmp.children, menus) + } + res.push(tmp) } - res.push(tmp) } else { - if (!tmp.meta || (tmp.meta && !tmp.meta.permission)) { + if (tmp.meta && !tmp.meta.permission) { res.push(tmp) } } diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/sound.js b/src/api/sound.js new file mode 100644 index 0000000..135c304 --- /dev/null +++ b/src/api/sound.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getSoundList(params) { + return request({ + url: '/sound/noCaselist', + method: 'get', + params + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 02a38d0..52ae240 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -13,6 +13,15 @@ }) } +// 用户查询 +export function getUserSimpleList(params) { + return request({ + url: 'mgr/simplelist', + method: 'post', + params + }) +} + // 添加用户 export function addUser(params) { return request({ diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 14e8286..0d2256d 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -31,7 +31,7 @@ import ResetPwd from '@/views/system/user/resetPwd' import { getProject } from '@/utils/baseConfig' import IvrBar from './ivr/ivrBar' - +import { isReceiver } from '@/utils/permission' export default { name: 'AppHeader', components: { IvrBar, ResetPwd }, @@ -55,9 +55,14 @@ this.$store.dispatch('ToggleSideBar') }, logout() { - this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug - }) + // 判断签入签出状态,如果已签入提醒先签出 + if (isReceiver() && this.$store.getters.online === '1') { + this.$message.warning('请先签出!') + } else { + this.$store.dispatch('LogOut').then(() => { + location.reload() // 为了重新实例化vue-router对象 避免bug + }) + } }, resetPwd() { this.showSetPwd = true diff --git a/src/layout/components/ivr/ivrBar.vue b/src/layout/components/ivr/ivrBar.vue index b89ad5f..b4fdfca 100644 --- a/src/layout/components/ivr/ivrBar.vue +++ b/src/layout/components/ivr/ivrBar.vue @@ -260,6 +260,7 @@ this.btnStatus.btnHangUp = false this.status = '已签入' this.call = '空闲' + this.$store.commit('SET_ONLINE', '1') // TODO: 通知后台已签入 // 心跳监测定时器 // if (this.webVariable.web_heartbeatInterval > 0) { @@ -306,6 +307,7 @@ this.btnStatus.btnIdle = true this.btnStatus.btnMeeting = true this.btnStatus.btnHangUp = true + this.$store.commit('SET_ONLINE', '0') this.resetWs() // TODO: 通知后台已签出 // 清除定时器 diff --git a/src/router/modules/case.js b/src/router/modules/case.js index 014cda2..909fcb2 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -8,32 +8,33 @@ alwaysShow: true, meta: { title: '事件管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/coorBusiness' }, children: [ { path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '' } + meta: { title: '待办事件', icon: '', permission: '/case/workList' } }, { path: '/completedList', name: 'CompletedList', component: () => import('@/views/caseManage/completedList'), - meta: { title: '已办事件', icon: '' } + meta: { title: '已办事件', icon: '', permission: '/completed' } }, { path: '/searchList', name: 'SearchList', component: () => import('@/views/caseManage/searchList'), - meta: { title: '事件查询', icon: '' } + meta: { title: '事件查询', icon: '', permission: '/case/queryListPage' } }, { path: '/revisitList', @@ -51,39 +52,39 @@ path: '/delayApplyList', name: 'delayApplyList', component: () => import('@/views/caseManage/delayApplyList'), - meta: { title: '延期申请', icon: '' } + meta: { title: '延期申请', icon: '', permission: '/delayed' } }, { path: '/delayList', name: 'delayList', component: () => import('@/views/caseManage/delayList'), - meta: { title: '延期查询', icon: '' } + meta: { title: '延期查询', icon: '', permission: '/postponed' } }, { path: '/urgeList', name: 'urgeList', component: () => import('@/views/caseManage/urgeList'), - meta: { title: '催办查询', icon: '' } + meta: { title: '催办查询', icon: '', permission: '/urgeList' } }, { path: '/caseManage', name: 'caseManage', component: () => import('@/views/caseManage/caseManage'), - meta: { title: '事件管理', icon: '' } + meta: { title: '事件管理', icon: '', permission: '/caseManage' } }, { path: '/createCase', name: 'CreateCase', hidden: true, component: () => import('@/views/caseManage/createCase'), - meta: { title: '新建事件', icon: '' } + meta: { title: '新建事件', icon: '', permission: '' } }, { path: '/caseDetail/:id', name: 'caseDetail', hidden: true, component: () => import('@/views/caseManage/caseDetail'), - meta: { title: '事件详情', icon: '' } + meta: { title: '事件详情', icon: '', permission: '' } } ] }, { @@ -94,26 +95,27 @@ alwaysShow: true, meta: { title: '上报请示管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/caseReport' }, children: [ { path: '/workReportList', name: 'WorkReportList', component: () => import('@/views/caseManage/caseReportManage/workReportList'), - meta: { title: '待办上报请示', icon: '' } + meta: { title: '待办上报请示', icon: '', permission: '/workReportList' } }, { path: '/myReportList', name: 'MyReportList', component: () => import('@/views/caseManage/caseReportManage/myReportList'), - meta: { title: '我的上报请示', icon: '' } + meta: { title: '我的上报请示', icon: '', permission: '/myReportList' } }, { path: '/searchReportList', name: 'SearchReportList', component: () => import('@/views/caseManage/caseReportManage/searchReportList'), - meta: { title: '查询上报请示', icon: '' } + meta: { title: '查询上报请示', icon: '', permission: '/searchReportList' } } ] }] diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 1dde5c8..7e54bda 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -50,16 +50,18 @@ // } // res.push(tmp) // } - const menu = getMenu(menus, tmp) - if (menu) { // 如果有权限,添加该路由,并根据url的icon更新图标 - tmp.meta.icon = menu.icon // 给route更新icon - tmp.meta.title = menu.name // 给route更新名称 - if (tmp.children) { - tmp.children = filterAsyncRouter(tmp.children, menus) + if (tmp.meta && tmp.meta.permission) { + const menu = getMenu(menus, tmp) + if (menu) { // 如果有权限,添加该路由,并根据url的icon更新图标 + tmp.meta.icon = menu.icon // 给route更新icon + tmp.meta.title = menu.name // 给route更新名称 + if (tmp.children) { + tmp.children = filterAsyncRouter(tmp.children, menus) + } + res.push(tmp) } - res.push(tmp) } else { - if (!tmp.meta || (tmp.meta && !tmp.meta.permission)) { + if (tmp.meta && !tmp.meta.permission) { res.push(tmp) } } diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index 75a389b..53de5aa 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -74,6 +74,4 @@ .no-bottom-el-form-item{ margin-bottom: 0; } -.el-scrollbar__wrap { - overflow-x: hidden; -} + diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/sound.js b/src/api/sound.js new file mode 100644 index 0000000..135c304 --- /dev/null +++ b/src/api/sound.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getSoundList(params) { + return request({ + url: '/sound/noCaselist', + method: 'get', + params + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 02a38d0..52ae240 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -13,6 +13,15 @@ }) } +// 用户查询 +export function getUserSimpleList(params) { + return request({ + url: 'mgr/simplelist', + method: 'post', + params + }) +} + // 添加用户 export function addUser(params) { return request({ diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 14e8286..0d2256d 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -31,7 +31,7 @@ import ResetPwd from '@/views/system/user/resetPwd' import { getProject } from '@/utils/baseConfig' import IvrBar from './ivr/ivrBar' - +import { isReceiver } from '@/utils/permission' export default { name: 'AppHeader', components: { IvrBar, ResetPwd }, @@ -55,9 +55,14 @@ this.$store.dispatch('ToggleSideBar') }, logout() { - this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug - }) + // 判断签入签出状态,如果已签入提醒先签出 + if (isReceiver() && this.$store.getters.online === '1') { + this.$message.warning('请先签出!') + } else { + this.$store.dispatch('LogOut').then(() => { + location.reload() // 为了重新实例化vue-router对象 避免bug + }) + } }, resetPwd() { this.showSetPwd = true diff --git a/src/layout/components/ivr/ivrBar.vue b/src/layout/components/ivr/ivrBar.vue index b89ad5f..b4fdfca 100644 --- a/src/layout/components/ivr/ivrBar.vue +++ b/src/layout/components/ivr/ivrBar.vue @@ -260,6 +260,7 @@ this.btnStatus.btnHangUp = false this.status = '已签入' this.call = '空闲' + this.$store.commit('SET_ONLINE', '1') // TODO: 通知后台已签入 // 心跳监测定时器 // if (this.webVariable.web_heartbeatInterval > 0) { @@ -306,6 +307,7 @@ this.btnStatus.btnIdle = true this.btnStatus.btnMeeting = true this.btnStatus.btnHangUp = true + this.$store.commit('SET_ONLINE', '0') this.resetWs() // TODO: 通知后台已签出 // 清除定时器 diff --git a/src/router/modules/case.js b/src/router/modules/case.js index 014cda2..909fcb2 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -8,32 +8,33 @@ alwaysShow: true, meta: { title: '事件管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/coorBusiness' }, children: [ { path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '' } + meta: { title: '待办事件', icon: '', permission: '/case/workList' } }, { path: '/completedList', name: 'CompletedList', component: () => import('@/views/caseManage/completedList'), - meta: { title: '已办事件', icon: '' } + meta: { title: '已办事件', icon: '', permission: '/completed' } }, { path: '/searchList', name: 'SearchList', component: () => import('@/views/caseManage/searchList'), - meta: { title: '事件查询', icon: '' } + meta: { title: '事件查询', icon: '', permission: '/case/queryListPage' } }, { path: '/revisitList', @@ -51,39 +52,39 @@ path: '/delayApplyList', name: 'delayApplyList', component: () => import('@/views/caseManage/delayApplyList'), - meta: { title: '延期申请', icon: '' } + meta: { title: '延期申请', icon: '', permission: '/delayed' } }, { path: '/delayList', name: 'delayList', component: () => import('@/views/caseManage/delayList'), - meta: { title: '延期查询', icon: '' } + meta: { title: '延期查询', icon: '', permission: '/postponed' } }, { path: '/urgeList', name: 'urgeList', component: () => import('@/views/caseManage/urgeList'), - meta: { title: '催办查询', icon: '' } + meta: { title: '催办查询', icon: '', permission: '/urgeList' } }, { path: '/caseManage', name: 'caseManage', component: () => import('@/views/caseManage/caseManage'), - meta: { title: '事件管理', icon: '' } + meta: { title: '事件管理', icon: '', permission: '/caseManage' } }, { path: '/createCase', name: 'CreateCase', hidden: true, component: () => import('@/views/caseManage/createCase'), - meta: { title: '新建事件', icon: '' } + meta: { title: '新建事件', icon: '', permission: '' } }, { path: '/caseDetail/:id', name: 'caseDetail', hidden: true, component: () => import('@/views/caseManage/caseDetail'), - meta: { title: '事件详情', icon: '' } + meta: { title: '事件详情', icon: '', permission: '' } } ] }, { @@ -94,26 +95,27 @@ alwaysShow: true, meta: { title: '上报请示管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/caseReport' }, children: [ { path: '/workReportList', name: 'WorkReportList', component: () => import('@/views/caseManage/caseReportManage/workReportList'), - meta: { title: '待办上报请示', icon: '' } + meta: { title: '待办上报请示', icon: '', permission: '/workReportList' } }, { path: '/myReportList', name: 'MyReportList', component: () => import('@/views/caseManage/caseReportManage/myReportList'), - meta: { title: '我的上报请示', icon: '' } + meta: { title: '我的上报请示', icon: '', permission: '/myReportList' } }, { path: '/searchReportList', name: 'SearchReportList', component: () => import('@/views/caseManage/caseReportManage/searchReportList'), - meta: { title: '查询上报请示', icon: '' } + meta: { title: '查询上报请示', icon: '', permission: '/searchReportList' } } ] }] diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 1dde5c8..7e54bda 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -50,16 +50,18 @@ // } // res.push(tmp) // } - const menu = getMenu(menus, tmp) - if (menu) { // 如果有权限,添加该路由,并根据url的icon更新图标 - tmp.meta.icon = menu.icon // 给route更新icon - tmp.meta.title = menu.name // 给route更新名称 - if (tmp.children) { - tmp.children = filterAsyncRouter(tmp.children, menus) + if (tmp.meta && tmp.meta.permission) { + const menu = getMenu(menus, tmp) + if (menu) { // 如果有权限,添加该路由,并根据url的icon更新图标 + tmp.meta.icon = menu.icon // 给route更新icon + tmp.meta.title = menu.name // 给route更新名称 + if (tmp.children) { + tmp.children = filterAsyncRouter(tmp.children, menus) + } + res.push(tmp) } - res.push(tmp) } else { - if (!tmp.meta || (tmp.meta && !tmp.meta.permission)) { + if (tmp.meta && !tmp.meta.permission) { res.push(tmp) } } diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index 75a389b..53de5aa 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -74,6 +74,4 @@ .no-bottom-el-form-item{ margin-bottom: 0; } -.el-scrollbar__wrap { - overflow-x: hidden; -} + diff --git a/src/views/caseManage/components/knowledgeDetail.vue b/src/views/caseManage/components/knowledgeDetail.vue index 34adbb1..89061ee 100644 --- a/src/views/caseManage/components/knowledgeDetail.vue +++ b/src/views/caseManage/components/knowledgeDetail.vue @@ -92,3 +92,11 @@ } } + + diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/sound.js b/src/api/sound.js new file mode 100644 index 0000000..135c304 --- /dev/null +++ b/src/api/sound.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getSoundList(params) { + return request({ + url: '/sound/noCaselist', + method: 'get', + params + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 02a38d0..52ae240 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -13,6 +13,15 @@ }) } +// 用户查询 +export function getUserSimpleList(params) { + return request({ + url: 'mgr/simplelist', + method: 'post', + params + }) +} + // 添加用户 export function addUser(params) { return request({ diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 14e8286..0d2256d 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -31,7 +31,7 @@ import ResetPwd from '@/views/system/user/resetPwd' import { getProject } from '@/utils/baseConfig' import IvrBar from './ivr/ivrBar' - +import { isReceiver } from '@/utils/permission' export default { name: 'AppHeader', components: { IvrBar, ResetPwd }, @@ -55,9 +55,14 @@ this.$store.dispatch('ToggleSideBar') }, logout() { - this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug - }) + // 判断签入签出状态,如果已签入提醒先签出 + if (isReceiver() && this.$store.getters.online === '1') { + this.$message.warning('请先签出!') + } else { + this.$store.dispatch('LogOut').then(() => { + location.reload() // 为了重新实例化vue-router对象 避免bug + }) + } }, resetPwd() { this.showSetPwd = true diff --git a/src/layout/components/ivr/ivrBar.vue b/src/layout/components/ivr/ivrBar.vue index b89ad5f..b4fdfca 100644 --- a/src/layout/components/ivr/ivrBar.vue +++ b/src/layout/components/ivr/ivrBar.vue @@ -260,6 +260,7 @@ this.btnStatus.btnHangUp = false this.status = '已签入' this.call = '空闲' + this.$store.commit('SET_ONLINE', '1') // TODO: 通知后台已签入 // 心跳监测定时器 // if (this.webVariable.web_heartbeatInterval > 0) { @@ -306,6 +307,7 @@ this.btnStatus.btnIdle = true this.btnStatus.btnMeeting = true this.btnStatus.btnHangUp = true + this.$store.commit('SET_ONLINE', '0') this.resetWs() // TODO: 通知后台已签出 // 清除定时器 diff --git a/src/router/modules/case.js b/src/router/modules/case.js index 014cda2..909fcb2 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -8,32 +8,33 @@ alwaysShow: true, meta: { title: '事件管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/coorBusiness' }, children: [ { path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '' } + meta: { title: '待办事件', icon: '', permission: '/case/workList' } }, { path: '/completedList', name: 'CompletedList', component: () => import('@/views/caseManage/completedList'), - meta: { title: '已办事件', icon: '' } + meta: { title: '已办事件', icon: '', permission: '/completed' } }, { path: '/searchList', name: 'SearchList', component: () => import('@/views/caseManage/searchList'), - meta: { title: '事件查询', icon: '' } + meta: { title: '事件查询', icon: '', permission: '/case/queryListPage' } }, { path: '/revisitList', @@ -51,39 +52,39 @@ path: '/delayApplyList', name: 'delayApplyList', component: () => import('@/views/caseManage/delayApplyList'), - meta: { title: '延期申请', icon: '' } + meta: { title: '延期申请', icon: '', permission: '/delayed' } }, { path: '/delayList', name: 'delayList', component: () => import('@/views/caseManage/delayList'), - meta: { title: '延期查询', icon: '' } + meta: { title: '延期查询', icon: '', permission: '/postponed' } }, { path: '/urgeList', name: 'urgeList', component: () => import('@/views/caseManage/urgeList'), - meta: { title: '催办查询', icon: '' } + meta: { title: '催办查询', icon: '', permission: '/urgeList' } }, { path: '/caseManage', name: 'caseManage', component: () => import('@/views/caseManage/caseManage'), - meta: { title: '事件管理', icon: '' } + meta: { title: '事件管理', icon: '', permission: '/caseManage' } }, { path: '/createCase', name: 'CreateCase', hidden: true, component: () => import('@/views/caseManage/createCase'), - meta: { title: '新建事件', icon: '' } + meta: { title: '新建事件', icon: '', permission: '' } }, { path: '/caseDetail/:id', name: 'caseDetail', hidden: true, component: () => import('@/views/caseManage/caseDetail'), - meta: { title: '事件详情', icon: '' } + meta: { title: '事件详情', icon: '', permission: '' } } ] }, { @@ -94,26 +95,27 @@ alwaysShow: true, meta: { title: '上报请示管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/caseReport' }, children: [ { path: '/workReportList', name: 'WorkReportList', component: () => import('@/views/caseManage/caseReportManage/workReportList'), - meta: { title: '待办上报请示', icon: '' } + meta: { title: '待办上报请示', icon: '', permission: '/workReportList' } }, { path: '/myReportList', name: 'MyReportList', component: () => import('@/views/caseManage/caseReportManage/myReportList'), - meta: { title: '我的上报请示', icon: '' } + meta: { title: '我的上报请示', icon: '', permission: '/myReportList' } }, { path: '/searchReportList', name: 'SearchReportList', component: () => import('@/views/caseManage/caseReportManage/searchReportList'), - meta: { title: '查询上报请示', icon: '' } + meta: { title: '查询上报请示', icon: '', permission: '/searchReportList' } } ] }] diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 1dde5c8..7e54bda 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -50,16 +50,18 @@ // } // res.push(tmp) // } - const menu = getMenu(menus, tmp) - if (menu) { // 如果有权限,添加该路由,并根据url的icon更新图标 - tmp.meta.icon = menu.icon // 给route更新icon - tmp.meta.title = menu.name // 给route更新名称 - if (tmp.children) { - tmp.children = filterAsyncRouter(tmp.children, menus) + if (tmp.meta && tmp.meta.permission) { + const menu = getMenu(menus, tmp) + if (menu) { // 如果有权限,添加该路由,并根据url的icon更新图标 + tmp.meta.icon = menu.icon // 给route更新icon + tmp.meta.title = menu.name // 给route更新名称 + if (tmp.children) { + tmp.children = filterAsyncRouter(tmp.children, menus) + } + res.push(tmp) } - res.push(tmp) } else { - if (!tmp.meta || (tmp.meta && !tmp.meta.permission)) { + if (tmp.meta && !tmp.meta.permission) { res.push(tmp) } } diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index 75a389b..53de5aa 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -74,6 +74,4 @@ .no-bottom-el-form-item{ margin-bottom: 0; } -.el-scrollbar__wrap { - overflow-x: hidden; -} + diff --git a/src/views/caseManage/components/knowledgeDetail.vue b/src/views/caseManage/components/knowledgeDetail.vue index 34adbb1..89061ee 100644 --- a/src/views/caseManage/components/knowledgeDetail.vue +++ b/src/views/caseManage/components/knowledgeDetail.vue @@ -92,3 +92,11 @@ } } + + diff --git a/src/views/caseManage/createCase.vue b/src/views/caseManage/createCase.vue index 7d52b7a..720da33 100644 --- a/src/views/caseManage/createCase.vue +++ b/src/views/caseManage/createCase.vue @@ -82,7 +82,8 @@ - + + @@ -90,11 +91,11 @@ - - - - - + + + + + @@ -172,13 +173,17 @@ import { getEorc, getCaseSource, getCaseLevel } from '@/api/allDict' import { getCaseType, getCaseDetailType, addCase } from '@/api/callCase' import { getNextNodeList } from '@/api/process' +import { getAreaList } from '@/api/system/area' +import { getCustomerList } from '@/api/customer' + export default { name: 'CreateCase', components: { KnowledgeSearch }, data() { const validateAddress = function(rule, value, callback) { console.log(value) - if (value.areaCode === '' || value.streetCode === '' || value.communityCode === '') { + // if (value.areaCode === '' || value.streetCode === '' || value.communityCode === '') { + if (value.areaCode === '' || value.streetCode === '') { callback(new Error('地址需填写完整')) } else { callback() @@ -195,7 +200,7 @@ return { form: { caseId: '', // 案卷编号,年月日时分秒毫秒+坐席号 - sound: '645ffd84-77d8-11ea-8021-53392d079625', // 来电录音编号 + sound: '', // 来电录音编号 callTime: '', // 来电时间 reporterName: '', // 事件联系人 reporterPhone: '', // 时间联系人电话 @@ -206,7 +211,7 @@ }, // 案卷类别 source: '3', // 来源 address: { - areaCode: '360721', // 区域ID + areaCode: '99', // 区域ID streetCode: '', // 街道ID communityCode: '', // 社区ID gridId: '', // 网格ID @@ -271,6 +276,14 @@ this.fetchCaseDetailTypeList() } }, + 'form.address.areaCode': function(val) { + if (val === '') { + this.form.address.streetCode = '' + this.form.address.communityCode = '' + } else { + this.fetchStreetList() + } + }, 'form.address.streetCode': function(val) { if (val === '') { this.form.address.communityCode = '' @@ -280,10 +293,10 @@ } }, created() { - console.log('createCase Created') this.fetchCaseSourceList() this.fetchCaseLevelList() this.fetchEorcList() + this.fetchAreaList() this.fetchStreetList() this.fetchProcessWayList() }, @@ -343,7 +356,7 @@ }, // 案卷类别 source: '3', // 来源 address: { - areaCode: '360721', // 区域ID + areaCode: '99', // 区域ID streetCode: '', // 街道ID communityCode: '', // 社区ID gridId: '', // 网格ID @@ -365,34 +378,55 @@ }) this.generateCaseId() // 根据电话去查找人 - if (this.reporterPhone) { - this.fetchReporter(this.reporterPhone) + if (this.form.reporterPhone) { + this.fetchReporter(this.form.reporterPhone) } }, // 根据电话去找人 fetchReporter(phone) { - this.reporterName = '张三' + const params = { + tel: phone + } + getCustomerList(params).then(response => { + if (response.code === 200 && response.data && response.data.total === 1) { + this.form.reporterName = response.data.rows[0].name + } + }) }, // 获取联系人列表 fetchReportersList() { - + const params = { + limit: 10000, + offset: 1 + } + getCustomerList(params).then(response => { + if (response.code === 200) { + this.reportersList = response.data.rows + } + }) }, // 案卷来源列表 fetchCaseSourceList() { getCaseSource().then(response => { - this.caseSourceList = response.data + if (response.code === 200) { + this.caseSourceList = response.data + } }) }, // 案卷等级列表 fetchCaseLevelList() { getCaseLevel().then(response => { - this.caseLevelList = response.data + if (response.code === 200) { + this.caseLevelList = response.data + } }) }, // 大类列表 fetchEorcList() { getEorc().then(response => { - this.eorcList = response.data + if (response.code === 200) { + this.eorcList = response.data + } }) }, // 二级类型列表 @@ -418,34 +452,21 @@ }, // 区列表 fetchAreaList() { - this.areaList = [ - { - id: '360721', - name: '蓉江新区' - } - ] + getAreaList('0').then(response => { + this.areaList = response.data + }) }, // 街道列表 fetchStreetList() { - this.streetList = [ - { - id: '020001', - name: '黄金岭街道' - }, - { - id: '360702091', - name: '潭东镇' - } - ] + getAreaList(this.form.address.areaCode).then(response => { + this.streetList = response.data + }) }, // 社区列表 fetchCommunityList() { - this.communityList = [ - { - id: '1', - name: '赣南师范大学' - } - ] + getAreaList(this.form.address.streetCode).then(response => { + this.communityList = response.data + }) }, // 获取处理方式列表 fetchProcessWayList() { @@ -457,7 +478,7 @@ // 自动生成案卷编号,时间+坐席号 generateCaseId() { const id = getToday('yyMMddhhmmss') - const seat = '208' + const seat = this.$store.getters.seat this.form.caseId = id + seat } } diff --git a/src/api/customer.js b/src/api/customer.js new file mode 100644 index 0000000..e6ef166 --- /dev/null +++ b/src/api/customer.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getCustomerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} diff --git a/src/api/sound.js b/src/api/sound.js new file mode 100644 index 0000000..135c304 --- /dev/null +++ b/src/api/sound.js @@ -0,0 +1,13 @@ +/** + * 客户管理接口 + */ +import request from '@/utils/request' + +// 查询客户 +export function getSoundList(params) { + return request({ + url: '/sound/noCaselist', + method: 'get', + params + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 02a38d0..52ae240 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -13,6 +13,15 @@ }) } +// 用户查询 +export function getUserSimpleList(params) { + return request({ + url: 'mgr/simplelist', + method: 'post', + params + }) +} + // 添加用户 export function addUser(params) { return request({ diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 14e8286..0d2256d 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -31,7 +31,7 @@ import ResetPwd from '@/views/system/user/resetPwd' import { getProject } from '@/utils/baseConfig' import IvrBar from './ivr/ivrBar' - +import { isReceiver } from '@/utils/permission' export default { name: 'AppHeader', components: { IvrBar, ResetPwd }, @@ -55,9 +55,14 @@ this.$store.dispatch('ToggleSideBar') }, logout() { - this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug - }) + // 判断签入签出状态,如果已签入提醒先签出 + if (isReceiver() && this.$store.getters.online === '1') { + this.$message.warning('请先签出!') + } else { + this.$store.dispatch('LogOut').then(() => { + location.reload() // 为了重新实例化vue-router对象 避免bug + }) + } }, resetPwd() { this.showSetPwd = true diff --git a/src/layout/components/ivr/ivrBar.vue b/src/layout/components/ivr/ivrBar.vue index b89ad5f..b4fdfca 100644 --- a/src/layout/components/ivr/ivrBar.vue +++ b/src/layout/components/ivr/ivrBar.vue @@ -260,6 +260,7 @@ this.btnStatus.btnHangUp = false this.status = '已签入' this.call = '空闲' + this.$store.commit('SET_ONLINE', '1') // TODO: 通知后台已签入 // 心跳监测定时器 // if (this.webVariable.web_heartbeatInterval > 0) { @@ -306,6 +307,7 @@ this.btnStatus.btnIdle = true this.btnStatus.btnMeeting = true this.btnStatus.btnHangUp = true + this.$store.commit('SET_ONLINE', '0') this.resetWs() // TODO: 通知后台已签出 // 清除定时器 diff --git a/src/router/modules/case.js b/src/router/modules/case.js index 014cda2..909fcb2 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -8,32 +8,33 @@ alwaysShow: true, meta: { title: '事件管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/coorBusiness' }, children: [ { path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '' } + meta: { title: '待办事件', icon: '', permission: '/case/workList' } }, { path: '/completedList', name: 'CompletedList', component: () => import('@/views/caseManage/completedList'), - meta: { title: '已办事件', icon: '' } + meta: { title: '已办事件', icon: '', permission: '/completed' } }, { path: '/searchList', name: 'SearchList', component: () => import('@/views/caseManage/searchList'), - meta: { title: '事件查询', icon: '' } + meta: { title: '事件查询', icon: '', permission: '/case/queryListPage' } }, { path: '/revisitList', @@ -51,39 +52,39 @@ path: '/delayApplyList', name: 'delayApplyList', component: () => import('@/views/caseManage/delayApplyList'), - meta: { title: '延期申请', icon: '' } + meta: { title: '延期申请', icon: '', permission: '/delayed' } }, { path: '/delayList', name: 'delayList', component: () => import('@/views/caseManage/delayList'), - meta: { title: '延期查询', icon: '' } + meta: { title: '延期查询', icon: '', permission: '/postponed' } }, { path: '/urgeList', name: 'urgeList', component: () => import('@/views/caseManage/urgeList'), - meta: { title: '催办查询', icon: '' } + meta: { title: '催办查询', icon: '', permission: '/urgeList' } }, { path: '/caseManage', name: 'caseManage', component: () => import('@/views/caseManage/caseManage'), - meta: { title: '事件管理', icon: '' } + meta: { title: '事件管理', icon: '', permission: '/caseManage' } }, { path: '/createCase', name: 'CreateCase', hidden: true, component: () => import('@/views/caseManage/createCase'), - meta: { title: '新建事件', icon: '' } + meta: { title: '新建事件', icon: '', permission: '' } }, { path: '/caseDetail/:id', name: 'caseDetail', hidden: true, component: () => import('@/views/caseManage/caseDetail'), - meta: { title: '事件详情', icon: '' } + meta: { title: '事件详情', icon: '', permission: '' } } ] }, { @@ -94,26 +95,27 @@ alwaysShow: true, meta: { title: '上报请示管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/caseReport' }, children: [ { path: '/workReportList', name: 'WorkReportList', component: () => import('@/views/caseManage/caseReportManage/workReportList'), - meta: { title: '待办上报请示', icon: '' } + meta: { title: '待办上报请示', icon: '', permission: '/workReportList' } }, { path: '/myReportList', name: 'MyReportList', component: () => import('@/views/caseManage/caseReportManage/myReportList'), - meta: { title: '我的上报请示', icon: '' } + meta: { title: '我的上报请示', icon: '', permission: '/myReportList' } }, { path: '/searchReportList', name: 'SearchReportList', component: () => import('@/views/caseManage/caseReportManage/searchReportList'), - meta: { title: '查询上报请示', icon: '' } + meta: { title: '查询上报请示', icon: '', permission: '/searchReportList' } } ] }] diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 1dde5c8..7e54bda 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -50,16 +50,18 @@ // } // res.push(tmp) // } - const menu = getMenu(menus, tmp) - if (menu) { // 如果有权限,添加该路由,并根据url的icon更新图标 - tmp.meta.icon = menu.icon // 给route更新icon - tmp.meta.title = menu.name // 给route更新名称 - if (tmp.children) { - tmp.children = filterAsyncRouter(tmp.children, menus) + if (tmp.meta && tmp.meta.permission) { + const menu = getMenu(menus, tmp) + if (menu) { // 如果有权限,添加该路由,并根据url的icon更新图标 + tmp.meta.icon = menu.icon // 给route更新icon + tmp.meta.title = menu.name // 给route更新名称 + if (tmp.children) { + tmp.children = filterAsyncRouter(tmp.children, menus) + } + res.push(tmp) } - res.push(tmp) } else { - if (!tmp.meta || (tmp.meta && !tmp.meta.permission)) { + if (tmp.meta && !tmp.meta.permission) { res.push(tmp) } } diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index 75a389b..53de5aa 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -74,6 +74,4 @@ .no-bottom-el-form-item{ margin-bottom: 0; } -.el-scrollbar__wrap { - overflow-x: hidden; -} + diff --git a/src/views/caseManage/components/knowledgeDetail.vue b/src/views/caseManage/components/knowledgeDetail.vue index 34adbb1..89061ee 100644 --- a/src/views/caseManage/components/knowledgeDetail.vue +++ b/src/views/caseManage/components/knowledgeDetail.vue @@ -92,3 +92,11 @@ } } + + diff --git a/src/views/caseManage/createCase.vue b/src/views/caseManage/createCase.vue index 7d52b7a..720da33 100644 --- a/src/views/caseManage/createCase.vue +++ b/src/views/caseManage/createCase.vue @@ -82,7 +82,8 @@ - + + @@ -90,11 +91,11 @@ - - - - - + + + + + @@ -172,13 +173,17 @@ import { getEorc, getCaseSource, getCaseLevel } from '@/api/allDict' import { getCaseType, getCaseDetailType, addCase } from '@/api/callCase' import { getNextNodeList } from '@/api/process' +import { getAreaList } from '@/api/system/area' +import { getCustomerList } from '@/api/customer' + export default { name: 'CreateCase', components: { KnowledgeSearch }, data() { const validateAddress = function(rule, value, callback) { console.log(value) - if (value.areaCode === '' || value.streetCode === '' || value.communityCode === '') { + // if (value.areaCode === '' || value.streetCode === '' || value.communityCode === '') { + if (value.areaCode === '' || value.streetCode === '') { callback(new Error('地址需填写完整')) } else { callback() @@ -195,7 +200,7 @@ return { form: { caseId: '', // 案卷编号,年月日时分秒毫秒+坐席号 - sound: '645ffd84-77d8-11ea-8021-53392d079625', // 来电录音编号 + sound: '', // 来电录音编号 callTime: '', // 来电时间 reporterName: '', // 事件联系人 reporterPhone: '', // 时间联系人电话 @@ -206,7 +211,7 @@ }, // 案卷类别 source: '3', // 来源 address: { - areaCode: '360721', // 区域ID + areaCode: '99', // 区域ID streetCode: '', // 街道ID communityCode: '', // 社区ID gridId: '', // 网格ID @@ -271,6 +276,14 @@ this.fetchCaseDetailTypeList() } }, + 'form.address.areaCode': function(val) { + if (val === '') { + this.form.address.streetCode = '' + this.form.address.communityCode = '' + } else { + this.fetchStreetList() + } + }, 'form.address.streetCode': function(val) { if (val === '') { this.form.address.communityCode = '' @@ -280,10 +293,10 @@ } }, created() { - console.log('createCase Created') this.fetchCaseSourceList() this.fetchCaseLevelList() this.fetchEorcList() + this.fetchAreaList() this.fetchStreetList() this.fetchProcessWayList() }, @@ -343,7 +356,7 @@ }, // 案卷类别 source: '3', // 来源 address: { - areaCode: '360721', // 区域ID + areaCode: '99', // 区域ID streetCode: '', // 街道ID communityCode: '', // 社区ID gridId: '', // 网格ID @@ -365,34 +378,55 @@ }) this.generateCaseId() // 根据电话去查找人 - if (this.reporterPhone) { - this.fetchReporter(this.reporterPhone) + if (this.form.reporterPhone) { + this.fetchReporter(this.form.reporterPhone) } }, // 根据电话去找人 fetchReporter(phone) { - this.reporterName = '张三' + const params = { + tel: phone + } + getCustomerList(params).then(response => { + if (response.code === 200 && response.data && response.data.total === 1) { + this.form.reporterName = response.data.rows[0].name + } + }) }, // 获取联系人列表 fetchReportersList() { - + const params = { + limit: 10000, + offset: 1 + } + getCustomerList(params).then(response => { + if (response.code === 200) { + this.reportersList = response.data.rows + } + }) }, // 案卷来源列表 fetchCaseSourceList() { getCaseSource().then(response => { - this.caseSourceList = response.data + if (response.code === 200) { + this.caseSourceList = response.data + } }) }, // 案卷等级列表 fetchCaseLevelList() { getCaseLevel().then(response => { - this.caseLevelList = response.data + if (response.code === 200) { + this.caseLevelList = response.data + } }) }, // 大类列表 fetchEorcList() { getEorc().then(response => { - this.eorcList = response.data + if (response.code === 200) { + this.eorcList = response.data + } }) }, // 二级类型列表 @@ -418,34 +452,21 @@ }, // 区列表 fetchAreaList() { - this.areaList = [ - { - id: '360721', - name: '蓉江新区' - } - ] + getAreaList('0').then(response => { + this.areaList = response.data + }) }, // 街道列表 fetchStreetList() { - this.streetList = [ - { - id: '020001', - name: '黄金岭街道' - }, - { - id: '360702091', - name: '潭东镇' - } - ] + getAreaList(this.form.address.areaCode).then(response => { + this.streetList = response.data + }) }, // 社区列表 fetchCommunityList() { - this.communityList = [ - { - id: '1', - name: '赣南师范大学' - } - ] + getAreaList(this.form.address.streetCode).then(response => { + this.communityList = response.data + }) }, // 获取处理方式列表 fetchProcessWayList() { @@ -457,7 +478,7 @@ // 自动生成案卷编号,时间+坐席号 generateCaseId() { const id = getToday('yyMMddhhmmss') - const seat = '208' + const seat = this.$store.getters.seat this.form.caseId = id + seat } } diff --git a/src/views/caseManage/waitForCreate.vue b/src/views/caseManage/waitForCreate.vue index 1430d3a..2e0952a 100644 --- a/src/views/caseManage/waitForCreate.vue +++ b/src/views/caseManage/waitForCreate.vue @@ -8,8 +8,8 @@ - - + + @@ -65,7 +65,9 @@ import SearchItem from '@/components/SearchArea/SearchItem' import CreateCase from '@/views/caseManage/createCase' import AudioPlayer from '../../components/AudioPlayer/AudioPlayer' -import { realFormatSecond } from '@/utils/stringutils' +// import { realFormatSecond } from '@/utils/stringutils' +import { getUserSimpleList } from '@/api/system/user' +import { getSoundList } from '@/api/sound' export default { name: 'WaitForCreate', components: { AudioPlayer, SearchItem, SearchArea, AppContainer, NormalTable, CreateCase }, @@ -73,13 +75,13 @@ return { listQuery: { callerNumber: '', // 主叫号码 - calleeUser: '', // 受理人 + agentUser: '', // 受理人 status: '', // 受理状态 startTime: '', // 创建开始时间 endTime: '', // 创建结束时间 offset: 1, limit: 20, - sort: 'callTime', + sort: 'dialStartStamp', order: 'desc' }, // 筛选条件 columns: [ @@ -95,7 +97,7 @@ }, { text: '受理人', - value: 'calleeUserName', + value: 'agentUserName', align: 'center' }, { @@ -106,7 +108,7 @@ }, { text: '来电时间', - value: 'callTime', + value: 'dialStartStamp', align: 'center', width: 160 }, @@ -144,10 +146,15 @@ controlList: 'noDownload noSpeed onlyOnePlaying' }, size: 'small', - soundShow: false // 显示音频弹窗 + soundShow: false, // 显示音频弹窗 + userList: [] } }, created() { + this.fetchUserList() + this.search() + }, + activated() { this.search() }, methods: { @@ -159,14 +166,22 @@ if (!isNowPage) { // 是否显示当前页,否则跳转第一页 this.listQuery.offset = 1 } + this.listLoading = true + // getSoundList(this.listQuery).then(response => { + // if (response.code === 200) { + // this.listLoading = false + // this.list = response.data.rows + // this.total = response.data.total + // } + // }) const that = this setTimeout(function() { that.list = [ - { callid: '122fse223f2122', callerNumber: '15652360420', calleeUserName: '张三', isp: '北京联通', callTime: '2020-04-09 09:00:00', bridgeStamp: 61, statusName: '未接听' }, - { callid: '122fse223f2122', callerNumber: '15652360420', calleeUserName: '张三', isp: '北京联通', callTime: '2020-04-09 09:00:00', bridgeStamp: 61, statusName: '未接听' }, - { callid: '122fse223f2122', callerNumber: '15652360420', calleeUserName: '张三', isp: '北京联通', callTime: '2020-04-09 09:00:00', bridgeStamp: 61, statusName: '未接听' }, - { callid: '122fse223f2122', callerNumber: '15652360420', calleeUserName: '张三', isp: '北京联通', callTime: '2020-04-09 09:00:00', bridgeStamp: 61, statusName: '未接听' }, - { callid: '122fse223f2122', callerNumber: '15652360420', calleeUserName: '张三', isp: '北京联通', callTime: '2020-04-09 09:00:00', bridgeStamp: 61, statusName: '未接听' } + { callid: '122fse223f2122', callerNumber: '15652360420', agentUserName: '张三', isp: '北京联通', dialStartStamp: '2020-04-09 09:00:00', bridgeStamp: 61, statusName: '未接听' }, + { callid: '122fse223f2122', callerNumber: '15652360420', agentUserName: '张三', isp: '北京联通', dialStartStamp: '2020-04-09 09:00:00', bridgeStamp: 61, statusName: '未接听' }, + { callid: '122fse223f2122', callerNumber: '15652360420', agentUserName: '张三', isp: '北京联通', dialStartStamp: '2020-04-09 09:00:00', bridgeStamp: 61, statusName: '未接听' }, + { callid: '122fse223f2122', callerNumber: '15652360420', agentUserName: '张三', isp: '北京联通', dialStartStamp: '2020-04-09 09:00:00', bridgeStamp: 61, statusName: '未接听' }, + { callid: '122fse223f2122', callerNumber: '15652360420', agentUserName: '张三', isp: '北京联通', dialStartStamp: '2020-04-09 09:00:00', bridgeStamp: 61, statusName: '未接听' } ] that.total = 200 that.listLoading = false @@ -176,6 +191,7 @@ openSound(row) { this.soundShow = true this.sound.url = 'https://wdd.js.org/element-audio/static/falling-star.mp3' + // this.sound.url = row.recordName }, // 关闭播放弹窗 closeSound() { @@ -187,7 +203,7 @@ const data = { callid: row.callid, number: row.callerNumber, - callTime: row.callTime + dialStartStamp: row.dialStartStamp } console.log(data) const that = this @@ -200,6 +216,16 @@ this.showAddCase = false // 关闭弹窗 this.search() }, + fetchUserList() { + const params = { + roleTips: 'receiver,monitor' + } + getUserSimpleList(params).then(response => { + if (response.code === 200) { + this.userList = response.data + } + }) + }, // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 changePage(val) { if (val && val.size) {