diff --git a/package-lock.json b/package-lock.json index 9283c8c..47d9e48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "axios": "^1.6.5", "cors": "^2.8.5", + "crypto-js": "^4.2.0", "element-plus": "^2.4.4", "js-md5": "^0.8.3", "qrcode": "^1.5.3", @@ -1104,6 +1105,11 @@ "node": ">= 0.10" } }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", diff --git a/package.json b/package.json index 47710fb..9290346 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "axios": "^1.6.5", "cors": "^2.8.5", + "crypto-js": "^4.2.0", "element-plus": "^2.4.4", "js-md5": "^0.8.3", "qrcode": "^1.5.3", diff --git a/src/api/im.js b/src/api/im.js new file mode 100644 index 0000000..6cedc58 --- /dev/null +++ b/src/api/im.js @@ -0,0 +1,13 @@ +import request from '@/utils/request.js' + +export const getImKeyService = (Data) => { + const params = new URLSearchParams(); + for (let key in Data) { + params.append(key, Data[key]) + } + return request.post('/im/get_imKey', params,{ + headers: { + 'token': Data.token, // 将 token 替换为您的令牌值 + } + }) +} diff --git a/src/api/user.js b/src/api/user.js index a178f0e..bc54605 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -38,6 +38,19 @@ export const getUUIDService = (registerData) => { return request.post('/user/uuid', params) } +export const SearchUserService = (Data) => { + const params = new URLSearchParams(); + for (let key in Data) { + params.append(key, Data[key]) + } + return request.post('/user/search', params,{ + headers: { + 'token': Data.token, // 将 token 替换为您的令牌值 + } + }) +} + + export const getQRService = (qrData) => { const params = new URLSearchParams(); //console.log("qrdata=",qrData); diff --git a/src/router/index.js b/src/router/index.js index 461ae51..fc44c0b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -4,6 +4,8 @@ import LoginVue from "@/views/Login.vue"; import VideoVue from "@/views/Video.vue"; import VideoListVue from "@/views/VideoList.vue"; import DeviceListVue from "@/views/DeviceList.vue"; +import UserListVue from "@/views/UserList.vue"; +import ImVue from "@/views/Im.vue"; const routes = [ { @@ -26,6 +28,16 @@ const routes = [ name: 'Device', component: DeviceListVue }, + { + path: '/im', + name: 'Im', + component: ImVue + }, + { + path: '/user', + name: 'User', + component: UserListVue + }, { path: '/', redirect: '/login' diff --git a/src/views/DeviceList.vue b/src/views/DeviceList.vue index 7c81116..b278dc4 100644 --- a/src/views/DeviceList.vue +++ b/src/views/DeviceList.vue @@ -150,6 +150,9 @@ export default { @click.prevent="handleMenuSelect('/device')" >设备管理 + 用户 监控设备列表 + + 视频列表 + 设备管理 + 用户 + + + + + Web聊天室({{ chatUser }}) + + + + + + 发送 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/UserList.vue b/src/views/UserList.vue new file mode 100644 index 0000000..ad1182b --- /dev/null +++ b/src/views/UserList.vue @@ -0,0 +1,210 @@ + + + + + 视频列表 + 设备管理 + 用户 + + 用户搜索列表 + + + + + + + + + + + + + + + + 查询 + + + + + + :row-style="this.tableRowClassName" + + + + + + + + 聊天 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/VideoList.vue b/src/views/VideoList.vue index 87e5233..443459b 100644 --- a/src/views/VideoList.vue +++ b/src/views/VideoList.vue @@ -1,6 +1,5 @@