From 43915ff365aa88585be32b8a332382ba314f01b3 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Fri, 28 Jun 2024 18:08:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0im=E8=81=8A=E5=A4=A9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 6 + package.json | 1 + src/api/im.js | 13 ++ src/api/user.js | 13 ++ src/router/index.js | 12 ++ src/views/DeviceList.vue | 3 + src/views/Im.vue | 372 +++++++++++++++++++++++++++++++++++++++ src/views/UserList.vue | 210 ++++++++++++++++++++++ src/views/VideoList.vue | 4 +- 9 files changed, 633 insertions(+), 1 deletion(-) create mode 100644 src/api/im.js create mode 100644 src/views/Im.vue create mode 100644 src/views/UserList.vue 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 @@