瀏覽代碼

目录和命名调整,请求地址和身份认证地址调整;

zhangchong 2 年之前
父節點
當前提交
a13483d49b

+ 5 - 6
.env.development

@@ -1,12 +1,11 @@
 # 本地环境
 ENV = 'development'
 
-# 本地环境接口地址
-VITE_API_URL = 'http://open.call.fengwo.com'
-# VITE_API_URL = 'http://192.168.100.22'
-# 多个baseUrl测试
-VITE_API_URL_TWO = 'http://localhost:9999/'
-VITE_API_URL_THREE = 'http://localhost:7777/'
+# 基础请求地址
+VITE_API_URL = 'http://hotline.fw.com'
+
+# 身份认证地址
+VITE_API_URL_IDENTITY = 'http://identity.fengwo.com'
 
 #socket API
 VITE_APP_SOCKET_API = '/hubs/callcenter'

+ 6 - 5
.env.production

@@ -1,11 +1,12 @@
 # 线上环境
 ENV = 'production'
 
-# 线上环境接口地址
-VITE_API_URL = 'http://open.call.fengwo.com'
-# 多个baseUrl测试
-VITE_API_URL_TWO = 'http://localhost:9999'
-VITE_API_URL_THREE = 'http://localhost:7777'
+# 基础请求地址
+VITE_API_URL = 'http://hotline.fw.com'
+
+# 身份认证地址
+VITE_API_URL_IDENTITY = 'http://identity.fengwo.com'
+
 
 #socket API
 VITE_APP_SOCKET_API = '/msghub'

+ 134 - 6
package-lock.json

@@ -22,6 +22,7 @@
 				"nprogress": "^0.2.0",
 				"pinia": "^2.0.14",
 				"qrcodejs2-fixes": "^0.0.2",
+				"qs": "^6.11.0",
 				"screenfull": "^6.0.2",
 				"sortablejs": "^1.15.0",
 				"v-viewer": "^3.0.10",
@@ -37,6 +38,7 @@
 			"devDependencies": {
 				"@types/node": "^18.0.3",
 				"@types/nprogress": "^0.2.0",
+				"@types/qs": "^6.9.7",
 				"@typescript-eslint/eslint-plugin": "^5.30.5",
 				"@typescript-eslint/parser": "^5.30.5",
 				"@vitejs/plugin-vue": "^2.3.3",
@@ -351,6 +353,12 @@
 			"integrity": "sha512-1cYJrqq9GezNFPsWTZpFut/d4CjpZqA0vhqDUPFWYKF1oIyBz5qnoYMzR+0C/T96t3ebLAC1SSnwrVOm5/j74A==",
 			"dev": true
 		},
+		"node_modules/@types/qs": {
+			"version": "6.9.7",
+			"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
+			"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
+			"dev": true
+		},
 		"node_modules/@types/semver": {
 			"version": "7.3.12",
 			"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.12.tgz",
@@ -1308,6 +1316,18 @@
 			"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
 			"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
 		},
+		"node_modules/call-bind": {
+			"version": "1.0.2",
+			"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+			"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+			"dependencies": {
+				"function-bind": "^1.1.1",
+				"get-intrinsic": "^1.0.2"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/ljharb"
+			}
+		},
 		"node_modules/callsites": {
 			"version": "3.1.0",
 			"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -2558,8 +2578,20 @@
 		"node_modules/function-bind": {
 			"version": "1.1.1",
 			"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
-			"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
-			"dev": true
+			"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+		},
+		"node_modules/get-intrinsic": {
+			"version": "1.1.3",
+			"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
+			"integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
+			"dependencies": {
+				"function-bind": "^1.1.1",
+				"has": "^1.0.3",
+				"has-symbols": "^1.0.3"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/ljharb"
+			}
 		},
 		"node_modules/glob": {
 			"version": "7.2.3",
@@ -2656,7 +2688,6 @@
 			"version": "1.0.3",
 			"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
 			"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
-			"dev": true,
 			"dependencies": {
 				"function-bind": "^1.1.1"
 			},
@@ -2672,6 +2703,17 @@
 				"node": ">=8"
 			}
 		},
+		"node_modules/has-symbols": {
+			"version": "1.0.3",
+			"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+			"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+			"engines": {
+				"node": ">= 0.4"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/ljharb"
+			}
+		},
 		"node_modules/html-void-elements": {
 			"version": "2.0.1",
 			"resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz",
@@ -3196,6 +3238,14 @@
 				"url": "https://github.com/fb55/nth-check?sponsor=1"
 			}
 		},
+		"node_modules/object-inspect": {
+			"version": "1.12.2",
+			"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
+			"integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==",
+			"funding": {
+				"url": "https://github.com/sponsors/ljharb"
+			}
+		},
 		"node_modules/once": {
 			"version": "1.4.0",
 			"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -3479,6 +3529,20 @@
 			"resolved": "https://registry.npmjs.org/qrcodejs2-fixes/-/qrcodejs2-fixes-0.0.2.tgz",
 			"integrity": "sha512-wMUXYMOixAEJlLnjk5MbLiFaz0gQObWYm/TIFWB5+j7sTY5gPyr09Cx1EpcLYbsgfFdN3wHjrKAhZofTuCBGhg=="
 		},
+		"node_modules/qs": {
+			"version": "6.11.0",
+			"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
+			"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
+			"dependencies": {
+				"side-channel": "^1.0.4"
+			},
+			"engines": {
+				"node": ">=0.6"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/ljharb"
+			}
+		},
 		"node_modules/querystringify": {
 			"version": "2.2.0",
 			"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
@@ -3794,6 +3858,19 @@
 				"node": ">=8"
 			}
 		},
+		"node_modules/side-channel": {
+			"version": "1.0.4",
+			"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+			"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+			"dependencies": {
+				"call-bind": "^1.0.0",
+				"get-intrinsic": "^1.0.2",
+				"object-inspect": "^1.9.0"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/ljharb"
+			}
+		},
 		"node_modules/slash": {
 			"version": "3.0.0",
 			"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -4827,6 +4904,12 @@
 			"integrity": "sha512-1cYJrqq9GezNFPsWTZpFut/d4CjpZqA0vhqDUPFWYKF1oIyBz5qnoYMzR+0C/T96t3ebLAC1SSnwrVOm5/j74A==",
 			"dev": true
 		},
+		"@types/qs": {
+			"version": "6.9.7",
+			"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
+			"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
+			"dev": true
+		},
 		"@types/semver": {
 			"version": "7.3.12",
 			"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.12.tgz",
@@ -5518,6 +5601,15 @@
 			"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
 			"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
 		},
+		"call-bind": {
+			"version": "1.0.2",
+			"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+			"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+			"requires": {
+				"function-bind": "^1.1.1",
+				"get-intrinsic": "^1.0.2"
+			}
+		},
 		"callsites": {
 			"version": "3.1.0",
 			"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -6362,8 +6454,17 @@
 		"function-bind": {
 			"version": "1.1.1",
 			"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
-			"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
-			"dev": true
+			"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+		},
+		"get-intrinsic": {
+			"version": "1.1.3",
+			"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
+			"integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
+			"requires": {
+				"function-bind": "^1.1.1",
+				"has": "^1.0.3",
+				"has-symbols": "^1.0.3"
+			}
 		},
 		"glob": {
 			"version": "7.2.3",
@@ -6439,7 +6540,6 @@
 			"version": "1.0.3",
 			"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
 			"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
-			"dev": true,
 			"requires": {
 				"function-bind": "^1.1.1"
 			}
@@ -6449,6 +6549,11 @@
 			"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
 			"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
 		},
+		"has-symbols": {
+			"version": "1.0.3",
+			"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+			"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
+		},
 		"html-void-elements": {
 			"version": "2.0.1",
 			"resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz",
@@ -6862,6 +6967,11 @@
 				"boolbase": "^1.0.0"
 			}
 		},
+		"object-inspect": {
+			"version": "1.12.2",
+			"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
+			"integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ=="
+		},
 		"once": {
 			"version": "1.4.0",
 			"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -7032,6 +7142,14 @@
 			"resolved": "https://registry.npmjs.org/qrcodejs2-fixes/-/qrcodejs2-fixes-0.0.2.tgz",
 			"integrity": "sha512-wMUXYMOixAEJlLnjk5MbLiFaz0gQObWYm/TIFWB5+j7sTY5gPyr09Cx1EpcLYbsgfFdN3wHjrKAhZofTuCBGhg=="
 		},
+		"qs": {
+			"version": "6.11.0",
+			"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
+			"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
+			"requires": {
+				"side-channel": "^1.0.4"
+			}
+		},
 		"querystringify": {
 			"version": "2.2.0",
 			"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
@@ -7212,6 +7330,16 @@
 			"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
 			"dev": true
 		},
+		"side-channel": {
+			"version": "1.0.4",
+			"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+			"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+			"requires": {
+				"call-bind": "^1.0.0",
+				"get-intrinsic": "^1.0.2",
+				"object-inspect": "^1.9.0"
+			}
+		},
 		"slash": {
 			"version": "3.0.0",
 			"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",

+ 2 - 0
package.json

@@ -23,6 +23,7 @@
 		"nprogress": "^0.2.0",
 		"pinia": "^2.0.14",
 		"qrcodejs2-fixes": "^0.0.2",
+		"qs": "^6.11.0",
 		"screenfull": "^6.0.2",
 		"sortablejs": "^1.15.0",
 		"v-viewer": "^3.0.10",
@@ -38,6 +39,7 @@
 	"devDependencies": {
 		"@types/node": "^18.0.3",
 		"@types/nprogress": "^0.2.0",
+		"@types/qs": "^6.9.7",
 		"@typescript-eslint/eslint-plugin": "^5.30.5",
 		"@typescript-eslint/parser": "^5.30.5",
 		"@vitejs/plugin-vue": "^2.3.3",

+ 0 - 0
src/api/system/blacklist.ts → src/api/callCenter/blacklist.ts


+ 0 - 0
src/api/system/callRecord.ts → src/api/callCenter/callRecord.ts


+ 0 - 0
src/api/ivr/ivr.ts → src/api/callCenter/ivr.ts


+ 0 - 0
src/api/system/systemParameter.ts → src/api/callCenter/systemParameter.ts


+ 0 - 0
src/api/system/tels.ts → src/api/callCenter/tels.ts


+ 0 - 0
src/api/system/telsGroup.ts → src/api/callCenter/telsGroup.ts


+ 11 - 6
src/api/login/index.ts

@@ -4,24 +4,29 @@
  * @version: 
  * @Date: 2022-08-09 16:19:55
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-08-26 14:51:33
+ * @LastEditTime: 2022-10-24 16:51:52
  */
 import request from '/@/utils/request';
 
 /**
  * 用户登录
- * @param params 要传的参数值
+ * @param data 要传的参数值
  * @returns 返回接口数据
  * 登录api接口集合
  * @method signIn 用户登录
  * @method signOut 用户退出登录
  */
-
-export function signIn(params?: object) {
+// @ts-ignore
+import qs from 'qs';
+export function signIn(data?: object) {
 	return request({
-		url: '/api/v1/home/login',
+		url: '/connect/token',
 		method: 'post',
-		data: params,
+		data: qs.stringify(data),
+		baseURL:import.meta.env.VITE_API_URL_IDENTITY, // 请求地址修改为身份认证地址
+		headers: {
+			'Content-Type': 'application/x-www-form-urlencoded',
+		}
 	});
 }
 export function signOut(params: object){

+ 2 - 1
src/layout/navBars/breadcrumb/user.vue

@@ -126,8 +126,9 @@ import { Session, Local } from '/@/utils/storage';
 // import UserNews from '/@/layout/navBars/breadcrumb/userNews.vue';
 import Search from '/@/layout/navBars/breadcrumb/search.vue';
 import Watermark from '/@/utils/wartermark';
+// 引入需要的api
 import { onDuty,offDuty,telRest,telUnrest } from '/@/api/user';
-import { getTelsList } from '/@/api/system/tels';
+import { getTelsList } from '/@/api/callCenter/tels';
 export default defineComponent({
 	name: 'layoutBreadcrumbUser',
 	components: { 

+ 13 - 13
src/router/route.ts

@@ -108,9 +108,9 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 						},
 					},
 					{
-						path: '/system/tels',
+						path: '/callCenter/tels',
 						name: 'tels',
-						component: () => import('/@/views/system/tels/index.vue'),
+						component: () => import('/@/views/callCenter/tels/index.vue'),
 						meta: {
 							title: '分机管理',
 							isLink: '',
@@ -123,9 +123,9 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 						},
 					},
 					{
-						path: '/system/telsGroup',
+						path: '/callCenter/telsGroup',
 						name: 'telsGroup',
-						component: () => import('/@/views/system/telsGroup/index.vue'),
+						component: () => import('/@/views/callCenter/telsGroup/index.vue'),
 						meta: {
 							title: '分机组管理',
 							isLink: '',
@@ -138,9 +138,9 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 						},
 					},
 					{
-						path: '/system/callRecord',
+						path: '/callCenter/callRecord',
 						name: 'callRecord',
-						component: () => import('/@/views/system/callRecord/index.vue'),
+						component: () => import('/@/views/callCenter/callRecord/index.vue'),
 						meta: {
 							title: '通话记录',
 							isLink: '',
@@ -153,9 +153,9 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 						},
 					},
 					{
-						path: '/system/blacklist',
+						path: '/callCenter/blacklist',
 						name: 'blacklist',
-						component: () => import('/@/views/system/blacklist/index.vue'),
+						component: () => import('/@/views/callCenter/blacklist/index.vue'),
 						meta: {
 							title: '黑名单配置',
 							isLink: '',
@@ -168,9 +168,9 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 						},
 					},
 					{
-						path: '/system/systemParameter',
+						path: '/callCenter/systemParameter',
 						name: 'systemParameter',
-						component: () => import('/@/views/system/systemParameter/index.vue'),
+						component: () => import('/@/views/callCenter/systemParameter/index.vue'),
 						meta: {
 							title: '系统参数',
 							isLink: '',
@@ -233,7 +233,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 					{
 						path: '/ivrConfig/ivrCategroy',
 						name: 'ivrCategroy',
-						component: () => import('../views/iverConfig/index.vue'),
+						component: () => import('/@/views/callCenter/iverConfig/index.vue'),
 						meta: {
 							title: 'ivr分类',
 							isLink: '',
@@ -248,7 +248,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 					{
 						path: '/ivrConfig/ivrList',
 						name: 'ivrList',
-						component: () => import('../views/iverConfig/ivrList.vue'),
+						component: () => import('/@/views/callCenter/iverConfig/ivrList.vue'),
 						meta: {
 							title: 'ivr列表',
 							isLink: '',
@@ -263,7 +263,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 					{
 						path: '/ivrConfig/details/:id/:tagsViewName',
 						name: 'ivrConfigDetails',
-						component: () => import('/@/views/iverConfig/details.vue'),
+						component: () => import('/@/views/callCenter/iverConfig/details.vue'),
 						meta: {
 							title: 'ivr配置详情',
 							isLink: '',

+ 1 - 1
src/views/system/blacklist/index.vue → src/views/callCenter/blacklist/index.vue

@@ -76,7 +76,7 @@ import { ElMessageBox, ElMessage } from 'element-plus';
 import { Refresh, Search ,Plus} from '@element-plus/icons-vue';
 import type { FormInstance } from 'element-plus';
 import { formatDate } from '/@/utils/formatTime';
-import { blacklistPaged, addBlacklist, balcklistDelete} from '/@/api/system/blacklist';
+import { blacklistPaged, addBlacklist, balcklistDelete} from '/@/api/callCenter/blacklist';
 import { throttle } from '/@/utils/tools';
 interface queryState{
 	queryParams:{

+ 4 - 2
src/views/system/callRecord/index.vue → src/views/callCenter/callRecord/index.vue

@@ -4,7 +4,7 @@
  * @version: 
  * @Date: 2022-08-16 13:46:36
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-09-22 09:48:26
+ * @LastEditTime: 2022-10-24 17:14:27
 -->
 <template>
 	<div class="system-user-container">
@@ -51,7 +51,9 @@ import { ref, reactive, toRefs, onMounted} from 'vue';
 import { Refresh, Search } from '@element-plus/icons-vue';
 import type { FormInstance } from 'element-plus';
 import { formatDate } from '/@/utils/formatTime';
-import { callPaged } from '/@/api/system/callRecord';
+// 引入api
+import { callPaged } from '/@/api/callCenter/callRecord';
+// 引入节流
 import { throttle } from '/@/utils/tools';
 interface queryState{
 	queryParams:{

+ 4 - 3
src/views/iverConfig/details.vue → src/views/callCenter/iverConfig/details.vue

@@ -234,9 +234,10 @@ import { storeToRefs } from 'pinia';
 import { ElMessage, ElMessageBox, ElSwitch } from 'element-plus'
 import { useThemeConfig } from '/@/stores/themeConfig';
 import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
-import { getIvrTree, baseInfo, getIvrById, voicequerylist , addEditIvr,delIvrTree,replaceRootApi} from "/@/api/ivr/ivr"
-import { getTelsGroupList } from '/@/api/system/telsGroup';
-import { getTelsList } from '/@/api/system/tels';
+// 引入api
+import { getIvrTree, baseInfo, getIvrById, voicequerylist , addEditIvr,delIvrTree,replaceRootApi} from "/@/api/callCenter/ivr"
+import { getTelsGroupList } from '/@/api/callCenter/telsGroup';
+import { getTelsList } from '/@/api/callCenter/tels';
 let cloneNodeDrag = ref(false);
 let state = reactive<any>({
     data: {},

+ 1 - 1
src/views/iverConfig/index.vue → src/views/callCenter/iverConfig/index.vue

@@ -56,7 +56,7 @@
 import { getCurrentInstance, reactive, ref, toRefs} from "vue";
 import {ElMessage, ElMessageBox} from 'element-plus'
 import { Plus } from '@element-plus/icons-vue';
-import {getIvrCategories,addIvrCategroies, updateIvrCategroies, deleteIvrCategroies} from "/@/api/ivr/ivr";
+import {getIvrCategories,addIvrCategroies, updateIvrCategroies, deleteIvrCategroies} from "/@/api/callCenter/ivr";
 import { formatDate } from '/@/utils/formatTime';
 // import { useRouter } from "vue-router";
 const loading = ref(false);

+ 5 - 4
src/views/iverConfig/ivrList.vue → src/views/callCenter/iverConfig/ivrList.vue

@@ -532,10 +532,11 @@ import { Plus } from '@element-plus/icons-vue';
 import {useThemeConfig} from '/@/stores/themeConfig';
 import {useTagsViewRoutes} from '/@/stores/tagsViewRoutes';
 import {storeToRefs} from 'pinia';
-import { getIvrList, voicequerylist,resetConfig } from '/@/api/ivr/ivr';
-import {getIvrCategories,baseInfo,addIvr,updateIvr,getIvrById,addEditIvr} from "/@/api/ivr/ivr";
-import { getTelsGroupList } from '/@/api/system/telsGroup';
-import { getTelsList } from '/@/api/system/tels';
+// 引入api
+import { getIvrList, voicequerylist,resetConfig } from '/@/api/callCenter/ivr';
+import {getIvrCategories,baseInfo,addIvr,updateIvr,getIvrById,addEditIvr} from "/@/api/callCenter/ivr";
+import { getTelsGroupList } from '/@/api/callCenter/telsGroup';
+import { getTelsList } from '/@/api/callCenter/tels';
 
 const storesThemeConfig = useThemeConfig();
 const stores = useTagsViewRoutes();

+ 1 - 1
src/views/system/systemParameter/index.vue → src/views/callCenter/systemParameter/index.vue

@@ -114,7 +114,7 @@
 
 <script lang="ts" setup name="systemParameter">
 import {reactive, ref,toRefs} from "vue";
-import {getsyssettings,modifysettings} from "/@/api/system/systemParameter";
+import {getsyssettings,modifysettings} from "/@/api/callCenter/systemParameter";
 import { ElMessage } from 'element-plus';
 const list = ref<any>([]);
 const arr = ref<any>([]);

+ 3 - 2
src/views/system/tels/index.vue → src/views/callCenter/tels/index.vue

@@ -4,7 +4,7 @@
  * @version: 
  * @Date: 2022-08-16 13:42:46
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-09-22 09:51:24
+ * @LastEditTime: 2022-10-24 17:11:15
 -->
 <template>
     <div class="tels">
@@ -36,8 +36,9 @@
 import { ref } from "vue";
 import { ElMessage, ElMessageBox } from 'element-plus';
 import { Refresh } from '@element-plus/icons-vue';
-import { getTelsList, syncTel } from '/@/api/system/tels';
 import { formatDate } from '/@/utils/formatTime';
+// 引入api
+import { getTelsList, syncTel } from '/@/api/callCenter/tels';
 const loading = ref(false);
 const list = ref<any>([]);
 

+ 6 - 5
src/views/system/telsGroup/index.vue → src/views/callCenter/telsGroup/index.vue

@@ -115,16 +115,17 @@
 import { ref,reactive,getCurrentInstance,toRefs,computed } from "vue";
 import { ElMessage } from 'element-plus';
 import { Plus } from '@element-plus/icons-vue';
-import { getTelsGroupList,addTelsGroup,updateTelsGroup,baseInfoTelsGroup } from '/@/api/system/telsGroup';
-import { getTelsList } from '/@/api/system/tels';
-import { formatDate } from '/@/utils/formatTime';
 import {useThemeConfig} from '/@/stores/themeConfig';
 import {useTagsViewRoutes} from '/@/stores/tagsViewRoutes';
-import {  voicequerylist} from '/@/api/ivr/ivr';
 import {storeToRefs} from 'pinia';
+import { formatDate } from '/@/utils/formatTime';
+// 引入需要的api
+import { getTelsGroupList,addTelsGroup,updateTelsGroup,baseInfoTelsGroup } from '/@/api/callCenter/telsGroup';
+import { getTelsList } from '/@/api/callCenter/tels';
+import { voicequerylist} from '/@/api/callCenter/ivr';
 const loading = ref(false);
 const list = ref<any>([]);
-const voiceData = ref<any>([]); //
+const voiceData = ref<any>([]); // 音频文件
 const dialogTitle = ref('配置分机组')
 const isShowDialog = ref(false);
 const data = ref<any>([]); //分机列表

+ 21 - 13
src/views/login/component/account.vue

@@ -1,7 +1,7 @@
 <template>
 	<el-form size="large" class="login-content-form"  ref="ruleFormRef" :model="ruleForm" @submit.native.prevent>
-		<el-form-item class="login-animation1" prop="userName" :rules="[{ required: true, message: '请输入账号', trigger: 'blur' }]">
-			<el-input type="text" placeholder="请输入账号" v-model="ruleForm.userName" clearable @keyup.enter="onSignIn(ruleFormRef)" autocomplete="off">
+		<el-form-item class="login-animation1" prop="username" :rules="[{ required: true, message: '请输入账号', trigger: 'blur' }]">
+			<el-input type="text" placeholder="请输入账号" v-model="ruleForm.username" clearable @keyup.enter="onSignIn(ruleFormRef)" autocomplete="off">
 				<template #prefix>
 					<el-icon class="el-input__icon">
 						<ele-Cellphone />
@@ -10,7 +10,7 @@
 				</template>
 			</el-input>
 		</el-form-item>
-		<!-- <el-form-item class="login-animation2" prop="password" :rules="[{required: false,message: '请输入密码',trigger: 'blur'}]">
+		<el-form-item class="login-animation2" prop="password" :rules="[{required: true,message: '请输入密码',trigger: 'blur'}]">
 			<el-input :type="isShowPassword ? 'text' : 'password'" placeholder="请输入密码" v-model="ruleForm.password"
 				autocomplete="off">
 				<template #prefix>
@@ -25,7 +25,7 @@
 					</i>
 				</template>
 			</el-input>
-		</el-form-item> -->
+		</el-form-item>
 		<!-- <el-form-item class="login-animation3">
 			<el-col :span="15">
 				<el-input type="text" maxlength="4" placeholder="请输入验证码" v-model="ruleForm.code" clearable autocomplete="off">
@@ -65,6 +65,14 @@ import { NextLoading } from '/@/utils/loading';
 import Watermark from '/@/utils/wartermark';
 import type { FormInstance } from 'element-plus';
 import { signIn } from '/@/api/login';
+// 登录参数类型
+interface LoginState {
+	grant_type: string;
+	client_id:string;
+	client_secret:string;
+	username:string;
+	password:string;
+}
 export default defineComponent({
 	name: 'loginAccount',
 	setup() {
@@ -75,12 +83,11 @@ export default defineComponent({
 		const state = reactive({
 			isShowPassword: false,
 			ruleForm: {
-				userName: '',
-				password: '',
-				code: '',
+				username: '',
+				password: ''
 			},
 			loading: {
-				signIn: false,
+			signIn: false,
 			},
 		});
 		const ruleFormRef = ref<FormInstance>()
@@ -99,11 +106,12 @@ export default defineComponent({
 			await formEl.validate((valid, fields) => {
 				if (valid) {
 					state.loading.signIn = true;
-					signIn({PhoneNo:state.ruleForm.userName}).then(async (res:any)=>{//登录
+					let req:LoginState = Object.assign({grant_type:'password',client_id:'hotline_admin',client_secret:'8c6c0b2b-6fd8-401c-849c-95888f4248ed'},state.ruleForm);
+					signIn(req).then(async (res:any)=>{//登录
 						// 存储 token 到浏览器缓存
-						Session.set('token', res.content);
+						Session.set('token', res.access_token);
 						// 模拟数据,对接接口时,记得删除多余代码及对应依赖的引入。用于 `/src/stores/userInfo.ts` 中不同用户登录判断(模拟数据)
-						Cookies.set('userName', state.ruleForm.userName);
+						Cookies.set('userName', state.ruleForm.username);
 						if (!themeConfig.value.isRequestRoutes) {
 							// 前端控制路由,2、请注意执行顺序
 							await initFrontEndControlRoutes();
@@ -141,8 +149,8 @@ export default defineComponent({
 
 			// 设置水印
 			themeConfig.value.isWartermark = true;
-			themeConfig.value.wartermarkText = state.ruleForm.userName;
-			Watermark.set(state.ruleForm.userName)
+			themeConfig.value.wartermarkText = state.ruleForm.username;
+			Watermark.set(state.ruleForm.username)
 			setLocalThemeConfig();
 
 			// 登录成功提示