diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/allShow.vue b/src/views/monitor/seatMonitor/components/allShow.vue new file mode 100644 index 0000000..11fcb74 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/allShow.vue @@ -0,0 +1,77 @@ + + + + + {{ item.label }} : {{ data[item.value] }} + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/allShow.vue b/src/views/monitor/seatMonitor/components/allShow.vue new file mode 100644 index 0000000..11fcb74 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/allShow.vue @@ -0,0 +1,77 @@ + + + + + {{ item.label }} : {{ data[item.value] }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrArea.vue b/src/views/monitor/seatMonitor/components/ivrArea.vue new file mode 100644 index 0000000..ebe91a7 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrArea.vue @@ -0,0 +1,49 @@ + + + 实时质检 + + + + + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/allShow.vue b/src/views/monitor/seatMonitor/components/allShow.vue new file mode 100644 index 0000000..11fcb74 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/allShow.vue @@ -0,0 +1,77 @@ + + + + + {{ item.label }} : {{ data[item.value] }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrArea.vue b/src/views/monitor/seatMonitor/components/ivrArea.vue new file mode 100644 index 0000000..ebe91a7 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrArea.vue @@ -0,0 +1,49 @@ + + + 实时质检 + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrBtn.vue b/src/views/monitor/seatMonitor/components/ivrBtn.vue new file mode 100644 index 0000000..6187257 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrBtn.vue @@ -0,0 +1,39 @@ + + + + {{ name }} + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/allShow.vue b/src/views/monitor/seatMonitor/components/allShow.vue new file mode 100644 index 0000000..11fcb74 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/allShow.vue @@ -0,0 +1,77 @@ + + + + + {{ item.label }} : {{ data[item.value] }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrArea.vue b/src/views/monitor/seatMonitor/components/ivrArea.vue new file mode 100644 index 0000000..ebe91a7 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrArea.vue @@ -0,0 +1,49 @@ + + + 实时质检 + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrBtn.vue b/src/views/monitor/seatMonitor/components/ivrBtn.vue new file mode 100644 index 0000000..6187257 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrBtn.vue @@ -0,0 +1,39 @@ + + + + {{ name }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/realtimeCheck.vue b/src/views/monitor/seatMonitor/components/realtimeCheck.vue new file mode 100644 index 0000000..86ca9c6 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/realtimeCheck.vue @@ -0,0 +1,63 @@ + + + 实时质检 + + 座席姓名 :{{ seatForm.agentUserName }} + 座席工号 :{{ seatForm.agentName }} + 座席电话 :{{ seatForm.phone }} + 座席状态 :{{ seatForm.signin }} + 登录分机 :{{ seatForm.exten }} + 主叫号码 :{{ seatForm.callerNumber }} + 被叫号码 :{{ seatForm.calleeNumber }} + + 实时质检 + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/allShow.vue b/src/views/monitor/seatMonitor/components/allShow.vue new file mode 100644 index 0000000..11fcb74 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/allShow.vue @@ -0,0 +1,77 @@ + + + + + {{ item.label }} : {{ data[item.value] }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrArea.vue b/src/views/monitor/seatMonitor/components/ivrArea.vue new file mode 100644 index 0000000..ebe91a7 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrArea.vue @@ -0,0 +1,49 @@ + + + 实时质检 + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrBtn.vue b/src/views/monitor/seatMonitor/components/ivrBtn.vue new file mode 100644 index 0000000..6187257 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrBtn.vue @@ -0,0 +1,39 @@ + + + + {{ name }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/realtimeCheck.vue b/src/views/monitor/seatMonitor/components/realtimeCheck.vue new file mode 100644 index 0000000..86ca9c6 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/realtimeCheck.vue @@ -0,0 +1,63 @@ + + + 实时质检 + + 座席姓名 :{{ seatForm.agentUserName }} + 座席工号 :{{ seatForm.agentName }} + 座席电话 :{{ seatForm.phone }} + 座席状态 :{{ seatForm.signin }} + 登录分机 :{{ seatForm.exten }} + 主叫号码 :{{ seatForm.callerNumber }} + 被叫号码 :{{ seatForm.calleeNumber }} + + 实时质检 + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/seat.vue b/src/views/monitor/seatMonitor/components/seat.vue new file mode 100644 index 0000000..a4b1a9c --- /dev/null +++ b/src/views/monitor/seatMonitor/components/seat.vue @@ -0,0 +1,60 @@ + + + + + + + {{ agentName }} + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/allShow.vue b/src/views/monitor/seatMonitor/components/allShow.vue new file mode 100644 index 0000000..11fcb74 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/allShow.vue @@ -0,0 +1,77 @@ + + + + + {{ item.label }} : {{ data[item.value] }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrArea.vue b/src/views/monitor/seatMonitor/components/ivrArea.vue new file mode 100644 index 0000000..ebe91a7 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrArea.vue @@ -0,0 +1,49 @@ + + + 实时质检 + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrBtn.vue b/src/views/monitor/seatMonitor/components/ivrBtn.vue new file mode 100644 index 0000000..6187257 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrBtn.vue @@ -0,0 +1,39 @@ + + + + {{ name }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/realtimeCheck.vue b/src/views/monitor/seatMonitor/components/realtimeCheck.vue new file mode 100644 index 0000000..86ca9c6 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/realtimeCheck.vue @@ -0,0 +1,63 @@ + + + 实时质检 + + 座席姓名 :{{ seatForm.agentUserName }} + 座席工号 :{{ seatForm.agentName }} + 座席电话 :{{ seatForm.phone }} + 座席状态 :{{ seatForm.signin }} + 登录分机 :{{ seatForm.exten }} + 主叫号码 :{{ seatForm.callerNumber }} + 被叫号码 :{{ seatForm.calleeNumber }} + + 实时质检 + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/seat.vue b/src/views/monitor/seatMonitor/components/seat.vue new file mode 100644 index 0000000..a4b1a9c --- /dev/null +++ b/src/views/monitor/seatMonitor/components/seat.vue @@ -0,0 +1,60 @@ + + + + + + + {{ agentName }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue new file mode 100644 index 0000000..38e014c --- /dev/null +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/allShow.vue b/src/views/monitor/seatMonitor/components/allShow.vue new file mode 100644 index 0000000..11fcb74 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/allShow.vue @@ -0,0 +1,77 @@ + + + + + {{ item.label }} : {{ data[item.value] }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrArea.vue b/src/views/monitor/seatMonitor/components/ivrArea.vue new file mode 100644 index 0000000..ebe91a7 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrArea.vue @@ -0,0 +1,49 @@ + + + 实时质检 + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrBtn.vue b/src/views/monitor/seatMonitor/components/ivrBtn.vue new file mode 100644 index 0000000..6187257 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrBtn.vue @@ -0,0 +1,39 @@ + + + + {{ name }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/realtimeCheck.vue b/src/views/monitor/seatMonitor/components/realtimeCheck.vue new file mode 100644 index 0000000..86ca9c6 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/realtimeCheck.vue @@ -0,0 +1,63 @@ + + + 实时质检 + + 座席姓名 :{{ seatForm.agentUserName }} + 座席工号 :{{ seatForm.agentName }} + 座席电话 :{{ seatForm.phone }} + 座席状态 :{{ seatForm.signin }} + 登录分机 :{{ seatForm.exten }} + 主叫号码 :{{ seatForm.callerNumber }} + 被叫号码 :{{ seatForm.calleeNumber }} + + 实时质检 + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/seat.vue b/src/views/monitor/seatMonitor/components/seat.vue new file mode 100644 index 0000000..a4b1a9c --- /dev/null +++ b/src/views/monitor/seatMonitor/components/seat.vue @@ -0,0 +1,60 @@ + + + + + + + {{ agentName }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue new file mode 100644 index 0000000..38e014c --- /dev/null +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/phoneManage/bindSeats.vue b/src/views/phoneManage/bindSeats.vue new file mode 100644 index 0000000..bffcb93 --- /dev/null +++ b/src/views/phoneManage/bindSeats.vue @@ -0,0 +1,112 @@ + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/allShow.vue b/src/views/monitor/seatMonitor/components/allShow.vue new file mode 100644 index 0000000..11fcb74 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/allShow.vue @@ -0,0 +1,77 @@ + + + + + {{ item.label }} : {{ data[item.value] }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrArea.vue b/src/views/monitor/seatMonitor/components/ivrArea.vue new file mode 100644 index 0000000..ebe91a7 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrArea.vue @@ -0,0 +1,49 @@ + + + 实时质检 + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrBtn.vue b/src/views/monitor/seatMonitor/components/ivrBtn.vue new file mode 100644 index 0000000..6187257 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrBtn.vue @@ -0,0 +1,39 @@ + + + + {{ name }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/realtimeCheck.vue b/src/views/monitor/seatMonitor/components/realtimeCheck.vue new file mode 100644 index 0000000..86ca9c6 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/realtimeCheck.vue @@ -0,0 +1,63 @@ + + + 实时质检 + + 座席姓名 :{{ seatForm.agentUserName }} + 座席工号 :{{ seatForm.agentName }} + 座席电话 :{{ seatForm.phone }} + 座席状态 :{{ seatForm.signin }} + 登录分机 :{{ seatForm.exten }} + 主叫号码 :{{ seatForm.callerNumber }} + 被叫号码 :{{ seatForm.calleeNumber }} + + 实时质检 + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/seat.vue b/src/views/monitor/seatMonitor/components/seat.vue new file mode 100644 index 0000000..a4b1a9c --- /dev/null +++ b/src/views/monitor/seatMonitor/components/seat.vue @@ -0,0 +1,60 @@ + + + + + + + {{ agentName }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue new file mode 100644 index 0000000..38e014c --- /dev/null +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/phoneManage/bindSeats.vue b/src/views/phoneManage/bindSeats.vue new file mode 100644 index 0000000..bffcb93 --- /dev/null +++ b/src/views/phoneManage/bindSeats.vue @@ -0,0 +1,112 @@ + + + + + + + + + + + + diff --git a/src/views/phoneManage/editPhone.vue b/src/views/phoneManage/editPhone.vue new file mode 100644 index 0000000..d90a736 --- /dev/null +++ b/src/views/phoneManage/editPhone.vue @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/allShow.vue b/src/views/monitor/seatMonitor/components/allShow.vue new file mode 100644 index 0000000..11fcb74 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/allShow.vue @@ -0,0 +1,77 @@ + + + + + {{ item.label }} : {{ data[item.value] }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrArea.vue b/src/views/monitor/seatMonitor/components/ivrArea.vue new file mode 100644 index 0000000..ebe91a7 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrArea.vue @@ -0,0 +1,49 @@ + + + 实时质检 + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrBtn.vue b/src/views/monitor/seatMonitor/components/ivrBtn.vue new file mode 100644 index 0000000..6187257 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrBtn.vue @@ -0,0 +1,39 @@ + + + + {{ name }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/realtimeCheck.vue b/src/views/monitor/seatMonitor/components/realtimeCheck.vue new file mode 100644 index 0000000..86ca9c6 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/realtimeCheck.vue @@ -0,0 +1,63 @@ + + + 实时质检 + + 座席姓名 :{{ seatForm.agentUserName }} + 座席工号 :{{ seatForm.agentName }} + 座席电话 :{{ seatForm.phone }} + 座席状态 :{{ seatForm.signin }} + 登录分机 :{{ seatForm.exten }} + 主叫号码 :{{ seatForm.callerNumber }} + 被叫号码 :{{ seatForm.calleeNumber }} + + 实时质检 + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/seat.vue b/src/views/monitor/seatMonitor/components/seat.vue new file mode 100644 index 0000000..a4b1a9c --- /dev/null +++ b/src/views/monitor/seatMonitor/components/seat.vue @@ -0,0 +1,60 @@ + + + + + + + {{ agentName }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue new file mode 100644 index 0000000..38e014c --- /dev/null +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/phoneManage/bindSeats.vue b/src/views/phoneManage/bindSeats.vue new file mode 100644 index 0000000..bffcb93 --- /dev/null +++ b/src/views/phoneManage/bindSeats.vue @@ -0,0 +1,112 @@ + + + + + + + + + + + + diff --git a/src/views/phoneManage/editPhone.vue b/src/views/phoneManage/editPhone.vue new file mode 100644 index 0000000..d90a736 --- /dev/null +++ b/src/views/phoneManage/editPhone.vue @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/phoneManage/phoneManage.vue b/src/views/phoneManage/phoneManage.vue new file mode 100644 index 0000000..b40222a --- /dev/null +++ b/src/views/phoneManage/phoneManage.vue @@ -0,0 +1,179 @@ + + + + + + + + 新增 + 删除 + + + + + + + + 绑定座席 + 删除 + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ - + + @@ -39,7 +40,7 @@ import { toTreeList } from '@/utils/structure' import SelectTree from '@/components/SelectTree/singleSelect' // import { getDeptTreeList } from '@/api/system/dept' -import { getTypeList, addType, updateType } from '@/api/knowledge' +import { getTypeList, addKnowledge, updateKnowledge, knowledgeDetail } from '@/api/knowledge' import Tinymce from '../../components/Tinymce/index' export default { @@ -50,7 +51,7 @@ dialogFormVisible: false, // 对话框是否显示 dialogStatus: '', // 对话框类型:create,update btnLoading: false, // 保存按钮的加载中状态 - size:'small', + size: 'small', knowledgeForm: { id: '', // 编号 type: '', // 父级编号 @@ -59,9 +60,9 @@ info: '' // 内容 }, // 表单 typeProps: { - parent: 'typeName', + parent: 'pid', value: 'id', - label: 'name', + label: 'typeName', children: 'children' }, typeTreeList: [], // 类别树列表数据 @@ -93,25 +94,28 @@ this.$refs['dataForm'].clearValidate() }) } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 - this.knowledgeForm = { - id: row.id, // 编号 - type: row.type, // 类别 - name: row.name, // 标题 - keywords: row.keywords, - info: row.info - } + this.fetchKnowledgeDetail(row.kId) } }, + // 获取知识详情 + fetchKnowledgeDetail(id) { + knowledgeDetail(id).then(response => { + if (response.data) { + this.knowledgeForm = { + id: response.data.kId, // id + type: response.data.kType, // 类型 + name: response.data.kName, // 类别名 + keywords: response.data.keywords, // 关键词 + info: response.data.kInfo // 内容 + } + } + }) + }, // 加载类别树形下拉菜单 fetchTypeTree: function() { - getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', type: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', type: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', type: '1', deptName: '顶级', num: '1' } - ] + getTypeList().then(response => { if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) @@ -138,7 +142,7 @@ console.log(this.knowledgeForm) if (valid) { this.btnLoading = true - addType(this.knowledgeForm).then(response => { + addKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { confirmButtonText: '是', @@ -167,7 +171,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { this.btnLoading = true - updateType(this.knowledgeForm).then(response => { + updateKnowledge(this.knowledgeForm).then(response => { if (response.code === 200) { this.$message.success('修改成功') this.$emit('watchChild') diff --git a/src/views/knowledgeManage/kTypeManage.vue b/src/views/knowledgeManage/kTypeManage.vue index 333899e..080c166 100644 --- a/src/views/knowledgeManage/kTypeManage.vue +++ b/src/views/knowledgeManage/kTypeManage.vue @@ -4,7 +4,7 @@ - + 搜索 新增 @@ -14,8 +14,8 @@ - 修改 - 删除 + 修改 + 删除 @@ -43,7 +43,7 @@ data() { return { listQuery: { - keyword: '' + keywords: '' }, columns: [ { @@ -110,11 +110,11 @@ fetchData() { this.listLoading = true getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] this.list = toTreeList(response.data) this.listLoading = false }) diff --git a/src/views/knowledgeManage/knowledgeCheck.vue b/src/views/knowledgeManage/knowledgeCheck.vue index 50cd3a1..54ae36e 100644 --- a/src/views/knowledgeManage/knowledgeCheck.vue +++ b/src/views/knowledgeManage/knowledgeCheck.vue @@ -49,7 +49,7 @@ 详情 - 审核 + 审核 @@ -58,7 +58,7 @@ - + @@ -93,8 +93,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -130,7 +130,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -179,19 +179,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'kId': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'kId': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false @@ -216,10 +216,17 @@ this.$refs.grounddialog.initDialog() } }, + ground(type, val) { + if (type === 'success') { + this.grounding(val) + } else { + this.ungrounding(val) + } + }, // 上架 grounding(val) { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('1', list, val).then(response => { + groundingKnowledge('1', list.join(','), val).then(response => { if (response.code === 200) { this.$message.success('上架成功') } @@ -238,7 +245,7 @@ } ).then(() => { const list = this.multipleSelection.map(item => item.kId) - groundingKnowledge('2', list).then(response => { + groundingKnowledge('2', list.join(',')).then(response => { if (response.code === 200) { this.$message.success('下架成功') } @@ -265,6 +272,7 @@ } else if (type === 'refuse') { this.$message.success('驳回成功') } + this.fetchData() } }) }, diff --git a/src/views/knowledgeManage/knowledgeManage.vue b/src/views/knowledgeManage/knowledgeManage.vue index 730421f..9151116 100644 --- a/src/views/knowledgeManage/knowledgeManage.vue +++ b/src/views/knowledgeManage/knowledgeManage.vue @@ -77,8 +77,8 @@ valid: '', // 可用状态 offset: 1, limit: 20, - sort: 'createTime', - order: 'desc' + sort: '', + order: '' }, // 筛选条件 columns: [ { @@ -114,7 +114,7 @@ }, { text: '可用状态', - value: 'validStatusName', + value: 'validStatus', align: 'center' }, { @@ -148,19 +148,19 @@ this.listLoading = true knowledgeList(this.listQuery).then(response => { if (response.code === 200) { - response.data.rows = [ - { - 'id': '1', - 'kName': '特种设备作业人员操作证怎样办理?', - 'kTypeName': '大类', - 'publisherName': '张三', - 'publishTime': '2020-04-12', - 'checkStatusName': '未审核', - 'groundingStatusName': '未上架', - 'validStatusName': '不可用', - 'validPeroid': '永久' - } - ] + // response.data.rows = [ + // { + // 'id': '1', + // 'kName': '特种设备作业人员操作证怎样办理?', + // 'kTypeName': '大类', + // 'publisherName': '张三', + // 'publishTime': '2020-04-12', + // 'checkStatusName': '未审核', + // 'groundingStatusName': '未上架', + // 'validStatusName': '不可用', + // 'validPeroid': '永久' + // } + // ] this.list = response.data.rows this.total = response.data.total this.listLoading = false diff --git a/src/views/layout/components/AppHeader.vue b/src/views/layout/components/AppHeader.vue index 6326221..1ad01f4 100644 --- a/src/views/layout/components/AppHeader.vue +++ b/src/views/layout/components/AppHeader.vue @@ -52,8 +52,19 @@ this.$store.dispatch('ToggleSideBar') }, logout() { + debugger this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + // location.reload() // 为了重新实例化vue-router对象 避免bug + // location // 为了重新实例化vue-router对象 避免bug + const HOST = process.env.HOST + alert(HOST) + alert(process.env.BASE_API) + const BASE_API = process.env.BASE_API + if (BASE_API === 'http://10.18.0.23:8083/callcenter/api') { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) }, resetPwd() { diff --git a/src/views/monitor/components/callLine.vue b/src/views/monitor/components/callLine.vue deleted file mode 100644 index 08eb5a0..0000000 --- a/src/views/monitor/components/callLine.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/callStatics.vue b/src/views/monitor/components/callStatics.vue deleted file mode 100644 index ce57072..0000000 --- a/src/views/monitor/components/callStatics.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/satisfiedStatics.vue b/src/views/monitor/components/satisfiedStatics.vue deleted file mode 100644 index 10c1c2d..0000000 --- a/src/views/monitor/components/satisfiedStatics.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/components/waitStatics.vue b/src/views/monitor/components/waitStatics.vue deleted file mode 100644 index 32879cc..0000000 --- a/src/views/monitor/components/waitStatics.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor.vue deleted file mode 100644 index 80cab27..0000000 --- a/src/views/monitor/realtimeMonitor.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - 实时监控 - - - - - - - - - - - - - - - diff --git a/src/views/monitor/realtimeMonitor/components/callLine.vue b/src/views/monitor/realtimeMonitor/components/callLine.vue new file mode 100644 index 0000000..f006096 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callLine.vue @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/callStatics.vue b/src/views/monitor/realtimeMonitor/components/callStatics.vue new file mode 100644 index 0000000..978b4e4 --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/callStatics.vue @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue new file mode 100644 index 0000000..10c1c2d --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/satisfiedStatics.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/components/waitStatics.vue b/src/views/monitor/realtimeMonitor/components/waitStatics.vue new file mode 100644 index 0000000..32879cc --- /dev/null +++ b/src/views/monitor/realtimeMonitor/components/waitStatics.vue @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/realtimeMonitor/realtimeMonitor.vue b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue new file mode 100644 index 0000000..08273ef --- /dev/null +++ b/src/views/monitor/realtimeMonitor/realtimeMonitor.vue @@ -0,0 +1,44 @@ + + + + 实时监控 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/allShow.vue b/src/views/monitor/seatMonitor/components/allShow.vue new file mode 100644 index 0000000..11fcb74 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/allShow.vue @@ -0,0 +1,77 @@ + + + + + {{ item.label }} : {{ data[item.value] }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrArea.vue b/src/views/monitor/seatMonitor/components/ivrArea.vue new file mode 100644 index 0000000..ebe91a7 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrArea.vue @@ -0,0 +1,49 @@ + + + 实时质检 + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/ivrBtn.vue b/src/views/monitor/seatMonitor/components/ivrBtn.vue new file mode 100644 index 0000000..6187257 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/ivrBtn.vue @@ -0,0 +1,39 @@ + + + + {{ name }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/realtimeCheck.vue b/src/views/monitor/seatMonitor/components/realtimeCheck.vue new file mode 100644 index 0000000..86ca9c6 --- /dev/null +++ b/src/views/monitor/seatMonitor/components/realtimeCheck.vue @@ -0,0 +1,63 @@ + + + 实时质检 + + 座席姓名 :{{ seatForm.agentUserName }} + 座席工号 :{{ seatForm.agentName }} + 座席电话 :{{ seatForm.phone }} + 座席状态 :{{ seatForm.signin }} + 登录分机 :{{ seatForm.exten }} + 主叫号码 :{{ seatForm.callerNumber }} + 被叫号码 :{{ seatForm.calleeNumber }} + + 实时质检 + + + + + + + + diff --git a/src/views/monitor/seatMonitor/components/seat.vue b/src/views/monitor/seatMonitor/components/seat.vue new file mode 100644 index 0000000..a4b1a9c --- /dev/null +++ b/src/views/monitor/seatMonitor/components/seat.vue @@ -0,0 +1,60 @@ + + + + + + + {{ agentName }} + + + + + + + diff --git a/src/views/monitor/seatMonitor/seatMonitor.vue b/src/views/monitor/seatMonitor/seatMonitor.vue new file mode 100644 index 0000000..38e014c --- /dev/null +++ b/src/views/monitor/seatMonitor/seatMonitor.vue @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/phoneManage/bindSeats.vue b/src/views/phoneManage/bindSeats.vue new file mode 100644 index 0000000..bffcb93 --- /dev/null +++ b/src/views/phoneManage/bindSeats.vue @@ -0,0 +1,112 @@ + + + + + + + + + + + + diff --git a/src/views/phoneManage/editPhone.vue b/src/views/phoneManage/editPhone.vue new file mode 100644 index 0000000..d90a736 --- /dev/null +++ b/src/views/phoneManage/editPhone.vue @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/phoneManage/phoneManage.vue b/src/views/phoneManage/phoneManage.vue new file mode 100644 index 0000000..b40222a --- /dev/null +++ b/src/views/phoneManage/phoneManage.vue @@ -0,0 +1,179 @@ + + + + + + + + 新增 + 删除 + + + + + + + + 绑定座席 + 删除 + + + + + + + + + + + + diff --git a/src/views/qualityManage/qualityModular/components/modulerTree.vue b/src/views/qualityManage/qualityModular/components/modulerTree.vue new file mode 100644 index 0000000..8f62c94 --- /dev/null +++ b/src/views/qualityManage/qualityModular/components/modulerTree.vue @@ -0,0 +1,91 @@ + + + + + + 质检模块管理 + + + + + + + + + + + + diff --git a/src/api/call.js b/src/api/call.js index 18190dd..3aba9ab 100644 --- a/src/api/call.js +++ b/src/api/call.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 坐席状态上报 +// 座席状态上报 export function seatReport(type, recordName) { return request({ url: 'case/workList', diff --git a/src/api/callCase.js b/src/api/callCase.js index d24c507..4bbd433 100644 --- a/src/api/callCase.js +++ b/src/api/callCase.js @@ -108,3 +108,21 @@ data }) } +// 获取工单提醒 +export function caseRemind(params) { + return request({ + url: 'case/workList', + method: 'get', + params + }) +} +// 获取指定类型工单统计数量 +export function getCount(type) { + return request({ + url: 'case/workList', + method: 'get', + params: { + type: type + } + }) +} diff --git a/src/api/knowledge.js b/src/api/knowledge.js index d190bfc..f5c38f1 100644 --- a/src/api/knowledge.js +++ b/src/api/knowledge.js @@ -15,24 +15,26 @@ // 知识库列表 export function knowledgeList(params) { return request({ - url: '/role/list', + url: '/knowledge/listPage', method: 'get', params }) } // 知识库详情 -export function knowledgeDetail(params) { +export function knowledgeDetail(id) { return request({ url: '/knowledge/detail', method: 'get', - params + params: { + kId: id + } }) } // 添加知识 export function addKnowledge(params) { return request({ - url: 'role/add', + url: '/knowledge/add', method: 'post', params }) @@ -40,7 +42,7 @@ // 修改知识 export function updateKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/update', method: 'post', params }) @@ -48,23 +50,20 @@ // 审核知识 export function checkKnowledge(params) { return request({ - url: 'role/update', + url: '/knowledge/check', method: 'post', params }) } // 上架知识 -export function groundingKnowledge(type, ids, validPeriod) { +export function groundingKnowledge(type, ids, validPeroid) { return request({ - url: 'role/update', + url: '/knowledge/grounding', method: 'post', params: { groundingStatus: type, ids: ids, - validPeriod: validPeriod - }, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) + validPeroid: validPeroid } }) } @@ -73,7 +72,7 @@ // 获取知识库类别列表 export function getTypeList(params) { return request({ - url: 'role/list', + url: '/ktype/list', method: 'get', params }) @@ -82,7 +81,7 @@ // 添加类别 export function addType(params) { return request({ - url: 'role/add', + url: '/ktype/add', method: 'post', params }) @@ -90,7 +89,7 @@ // 修改类别 export function updateType(params) { return request({ - url: 'role/update', + url: '/ktype/update', method: 'post', params }) @@ -98,7 +97,7 @@ // 删除类别 export function delType(id) { return request({ - url: 'role/delete', + url: '/ktype/delete', method: 'post', params: { id: id diff --git a/src/api/phone.js b/src/api/phone.js new file mode 100644 index 0000000..9dee42c --- /dev/null +++ b/src/api/phone.js @@ -0,0 +1,36 @@ +// 分机管理接口 +import request from '@/utils/request' + +// 分机列表 +export function phoneList(params) { + return request({ + url: '/extensionPhone/listPage', + method: 'get', + params + }) +} + +// 添加分机 +export function addPhone(params) { + return request({ + url: '/extensionPhone/add', + method: 'post', + params + }) +} +// 更新分机 +export function updatePhone(params) { + return request({ + url: '/extensionPhone/update', + method: 'post', + params + }) +} +// 绑定座席 +export function bindSeats(params) { + return request({ + url: '/extensionPhone/bindUsers', + method: 'post', + params + }) +} diff --git a/src/api/qualityCheck.js b/src/api/qualityCheck.js new file mode 100644 index 0000000..a7cc19d --- /dev/null +++ b/src/api/qualityCheck.js @@ -0,0 +1,90 @@ +/** + * 质检管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 查询质检模块 +export function getQModulerList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检模块 +export function addQModular(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检模块 +export function updateQModular(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检模块 +export function delQModular(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + ids: id + } + }) +} + +// 生效/失效质检模块 +export function activeQModular(id, status) { + return request({ + url: '/qualityModular/active', + method: 'post', + params: { + id: id, + status: status + } + }) +} + +// 查询质检标准 +export function getQIndexList(params) { + return request({ + url: '/customer/listPage', + method: 'get', + params + }) +} +// 新增质检标准 +export function addQIndex(params) { + return request({ + url: '/customer/add', + method: 'post', + params + }) +} +// 编辑质检标准 +export function updateQIndex(params) { + return request({ + url: '/customer/update', + method: 'post', + params + }) +} + +// 删除质检标准 +export function delQIndex(id) { + return request({ + url: '/customer/delete', + method: 'post', + params: { + id: id + } + }) +} + diff --git a/src/icons/svg/icon-check.svg b/src/icons/svg/icon-check.svg new file mode 100644 index 0000000..24ac667 --- /dev/null +++ b/src/icons/svg/icon-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/icon-seat.svg b/src/icons/svg/icon-seat.svg new file mode 100644 index 0000000..85943e0 --- /dev/null +++ b/src/icons/svg/icon-seat.svg @@ -0,0 +1 @@ + diff --git a/src/icons/svg/monitor.svg b/src/icons/svg/monitor.svg new file mode 100644 index 0000000..9caea16 --- /dev/null +++ b/src/icons/svg/monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layout/components/AppHeader.vue b/src/layout/components/AppHeader.vue index 0d2256d..37fbcfa 100644 --- a/src/layout/components/AppHeader.vue +++ b/src/layout/components/AppHeader.vue @@ -60,7 +60,12 @@ this.$message.warning('请先签出!') } else { this.$store.dispatch('LogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug + const BASE_API = process.env.BASE_API + if (BASE_API.search('http://10.18.0.23')) { + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/logout' + } else { + this.$router.replace('/') + } }) } }, diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index b515f61..5bd4260 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -1,7 +1,14 @@ + + + + {{ title }}【{{ count }}】 + + diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 988d662..5e94c9e 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -26,7 +26,7 @@ - + diff --git a/src/permission.js b/src/permission.js index 7fbdb57..88cf056 100644 --- a/src/permission.js +++ b/src/permission.js @@ -7,7 +7,7 @@ NProgress.configure({ showSpinner: false })// NProgress configuration -const whiteList = ['/login', 'config/baseconfig'] // 不重定向白名单 +const whiteList = ['/login', '/401', '/404', 'config/baseconfig'] // 不重定向白名单 // 全局钩子 router.beforeEach((to, from, next) => { NProgress.start() // 加载进度条 diff --git a/src/router/index.js b/src/router/index.js index 7b20a84..bcaea68 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -13,6 +13,7 @@ import { knowledgeRouters } from './modules/knowledge' import { customerRouters } from './modules/customer' import { monitorRouters } from './modules/statistic' +import { qualityCheckRouters } from './modules/qualityCheck' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -78,5 +79,6 @@ ...customerRouters, ...systemRouters, ...monitorRouters, + ...qualityCheckRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/case.js b/src/router/modules/case.js index bfbcc7a..46e85ef 100644 --- a/src/router/modules/case.js +++ b/src/router/modules/case.js @@ -16,13 +16,13 @@ path: '/waitForCreate', name: 'WaitForCreate', component: () => import('@/views/caseManage/waitForCreate'), - meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist' } + meta: { title: '待录事件', icon: '', permission: '/sound/noCaselist', remind: true, type: 'noCaseNum' } }, { path: '/waitForHandle', name: 'WaitForHandle', component: () => import('@/views/caseManage/waitForHandle'), - meta: { title: '待办事件', icon: '', permission: '/case/workList' } + meta: { title: '待办事件', icon: '', permission: '/case/workList', remind: true, type: 'workNum' } }, { path: '/completedList', diff --git a/src/router/modules/qualityCheck.js b/src/router/modules/qualityCheck.js new file mode 100644 index 0000000..6022ebd --- /dev/null +++ b/src/router/modules/qualityCheck.js @@ -0,0 +1,34 @@ +/* Layout */ +import Layout from '@/layout/Layout' +export const qualityCheckRouters = [{ + path: '/quality', + component: Layout, + redirect: '/qualityManage', + name: 'Quality', + alwaysShow: true, + meta: { + title: '质检管理', + icon: 'icon-config', // 图标 + permission: '/qualityManage' + }, + children: [ + { + path: '/qualityModular', + name: 'QualityModular', + component: () => import('@/views/qualityManage/qualityModular/qualityIndexManage'), + meta: { title: '质检模块', icon: '', permission: '/qualityModular' } + }, + { + path: '/qualityCheck', + name: 'QualityCheck', + component: () => import('@/views/knowledgeManage/knowledgeManage'), + meta: { title: '质检录音', icon: '', permission: '/qualityCheck' } + }, + { + path: '/qualityCheckTwice', + name: 'QualityCheckTwice', + component: () => import('@/views/knowledgeManage/knowledgeCheck'), + meta: { title: '质检录音复核', icon: '', permission: '/qualityCheckTwice' } + } + ] +}] diff --git a/src/router/modules/statistic.js b/src/router/modules/statistic.js index 02cbd00..62bed4c 100644 --- a/src/router/modules/statistic.js +++ b/src/router/modules/statistic.js @@ -8,14 +8,21 @@ alwaysShow: true, meta: { title: '监控管理', - icon: 'icon-config' // 图标 + icon: 'icon-config', // 图标 + permission: '/monitorManage' }, children: [ { + path: '/seatMonitor', + name: 'SeatMonitor', + component: () => import('@/views/monitor/seatMonitor/seatMonitor'), + meta: { title: '座席监控', icon: '', permission: '/monitor/seat' } + }, + { path: '/realtimeMonitor', name: 'RealtimeMonitor', - component: () => import('@/views/monitor/realtimeMonitor'), - meta: { title: '实时监控', icon: '' } + component: () => import('@/views/monitor/realtimeMonitor/realtimeMonitor'), + meta: { title: '实时监控', icon: '', permission: '/monitor/reatime' } } ] } diff --git a/src/router/modules/system.js b/src/router/modules/system.js index 18700f3..8b512d5 100644 --- a/src/router/modules/system.js +++ b/src/router/modules/system.js @@ -13,6 +13,12 @@ }, children: [ { + path: '/phone', + name: 'Phone', + component: () => import('@/views/phoneManage/phoneManage'), + meta: { title: '分机管理', icon: 'tree', permission: ['/phoneManage'] } + }, + { path: '/resource', name: 'Resource', component: () => import('@/views/system/resource/listResource'), diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 40254f4..531892e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,7 @@ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken, getSeat, setSeat, removeSeat, getExten, setExten, removeExten } from '@/utils/auth' import { getOnline, setOnline, removeOnline } from '@/utils/auth' +import { getProject } from '@/utils/baseConfig' const user = { state: { @@ -107,7 +108,8 @@ if (process.env.NODE_ENV === 'development') { reject() } else { - window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin' + const systemName = getProject().type + window.location.href = 'http://10.18.0.50:8086/platform-sso-server/login?service=' + process.env.BASE_API + '/app/caslogin?systemName=' + systemName } } }) diff --git a/src/utils/auth.js b/src/utils/auth.js index 605f4cd..54fa9d7 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -53,7 +53,7 @@ export function removeExten() { return Cookies.remove(Exten) } -// 坐席签入状态 +// 座席签入状态 export function getOnline() { return window.localStorage.getItem('online') } diff --git a/src/utils/baseConfig.js b/src/utils/baseConfig.js index 4347e17..1815c28 100644 --- a/src/utils/baseConfig.js +++ b/src/utils/baseConfig.js @@ -1,5 +1,8 @@ const project = { title: '呼叫中心业务平台', + type: 'callcenter', + // title: '城市协同工作平台', + // // type: 'city', ws_ip: '124.205.241.254', ws_port: '28081' } diff --git a/src/views/customerManage/customerList.vue b/src/views/customerManage/customerList.vue index 878fa29..d2712b0 100644 --- a/src/views/customerManage/customerList.vue +++ b/src/views/customerManage/customerList.vue @@ -31,7 +31,7 @@ 详情 - 编辑 + diff --git a/src/views/customerManage/editCustomer.vue b/src/views/customerManage/editCustomer.vue index 4796f12..b069980 100644 --- a/src/views/customerManage/editCustomer.vue +++ b/src/views/customerManage/editCustomer.vue @@ -127,7 +127,7 @@ name: row.name, // 姓名 email: row.email, // 邮箱, tel1: row.tel1, // 联系方式1 - tel2: row.tel1, // 联系方式2 + tel2: row.tel2, // 联系方式2 cardNo: row.cardNo, // 证件号码 address: row.address, // 地址 remarks: row.remarks, // 备注 diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c046487..237b2b3 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -12,6 +12,7 @@ diff --git a/src/views/knowledgeManage/components/TypeTree.vue b/src/views/knowledgeManage/components/TypeTree.vue index facb992..2240c66 100644 --- a/src/views/knowledgeManage/components/TypeTree.vue +++ b/src/views/knowledgeManage/components/TypeTree.vue @@ -45,12 +45,12 @@ fetchTypeTree() { this.treeLoading = true getTypeList().then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] - this.tree = toTreeList(response.data, '', true) + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] + this.tree = toTreeList(response.data, '-1', true) this.treeLoading = false }) }, diff --git a/src/views/knowledgeManage/components/setTimeDialog.vue b/src/views/knowledgeManage/components/setTimeDialog.vue index 98eee7a..f7d4438 100644 --- a/src/views/knowledgeManage/components/setTimeDialog.vue +++ b/src/views/knowledgeManage/components/setTimeDialog.vue @@ -6,6 +6,7 @@ @@ -72,7 +73,7 @@ size: 'small', form: { txt: '' - }, // 表单 + } // 表单 } }, methods: { diff --git a/src/views/knowledgeManage/editKType.vue b/src/views/knowledgeManage/editKType.vue index 5628a23..6f73f7d 100644 --- a/src/views/knowledgeManage/editKType.vue +++ b/src/views/knowledgeManage/editKType.vue @@ -86,13 +86,13 @@ // 加载类别树形下拉菜单 fetchTypeTree: function() { getTypeList(this.listQuery).then(response => { - response.data = [ - { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, - { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, - { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } - ] + // response.data = [ + // { typeName: '大类', id: '1', pid: '', deptName: '顶级', num: '1' }, + // { typeName: '小类1', id: '2', pid: '1', deptName: '顶级', num: '1' }, + // { typeName: '小类2', id: '3', pid: '1', deptName: '顶级', num: '1' } + // ] if (response.data) { - this.typeTreeList = toTreeList(response.data, '0') + this.typeTreeList = toTreeList(response.data, '-1') console.log(this.typeTreeList) } }) diff --git a/src/views/knowledgeManage/editKnowledge.vue b/src/views/knowledgeManage/editKnowledge.vue index 8bcb931..c0dcfcc 100644 --- a/src/views/knowledgeManage/editKnowledge.vue +++ b/src/views/knowledgeManage/editKnowledge.vue @@ -1,6 +1,6 @@ - + @@ -23,7 +23,8 @@ -