diff --git a/admin/package-lock.json b/admin/package-lock.json index e5a768cf..228c77e7 100644 --- a/admin/package-lock.json +++ b/admin/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "license": "MIT", "dependencies": { - "@element-plus/icons-vue": "^2.0.6", + "@element-plus/icons-vue": "^2.3.1", "@highlightjs/vue-plugin": "^2.1.0", "@wangeditor/editor": "^5.1.12", "@wangeditor/editor-for-vue": "^5.1.12", @@ -17,6 +17,7 @@ "css-color-function": "^1.3.3", "echarts": "^5.3.3", "element-plus": "^2.2.9", + "flv.js": "^1.6.2", "highlight.js": "^11.6.0", "nprogress": "^0.2.0", "pinia": "^2.0.14", @@ -564,9 +565,12 @@ } }, "node_modules/@element-plus/icons-vue": { - "version": "2.0.6", - "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.6.tgz", - "integrity": "sha512-lPpG8hYkjL/Z97DH5Ei6w6o22Z4YdNglWCNYOPcB33JCF2A4wye6HFgSI7hEt9zdLyxlSpiqtgf9XcYU+m5mew==" + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz", + "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==", + "peerDependencies": { + "vue": "^3.2.0" + } }, "node_modules/@esbuild/linux-loong64": { "version": "0.14.53", @@ -2626,6 +2630,11 @@ "es6-symbol": "^3.1.1" } }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmmirror.com/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, "node_modules/es6-symbol": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/es6-symbol/-/es6-symbol-3.1.3.tgz", @@ -3615,6 +3624,15 @@ "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", "dev": true }, + "node_modules/flv.js": { + "version": "1.6.2", + "resolved": "https://registry.npmmirror.com/flv.js/-/flv.js-1.6.2.tgz", + "integrity": "sha512-xre4gUbX1MPtgQRKj2pxJENp/RnaHaxYvy3YToVVCrSmAWUu85b9mug6pTXF6zakUjNP2lFWZ1rkSX7gxhB/2A==", + "dependencies": { + "es6-promise": "^4.2.8", + "webworkify-webpack": "^2.1.5" + } + }, "node_modules/follow-redirects": { "version": "1.15.1", "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.1.tgz", @@ -7307,6 +7325,11 @@ "integrity": "sha512-h9atBP/bsZohWpHnr+2sic8Iecb60GxftXsWNLLLSqewgIsGzByd2gcIID4nXcG+3tNe4GQG3dLcff3kXupdRA==", "dev": true }, + "node_modules/webworkify-webpack": { + "version": "2.1.5", + "resolved": "https://registry.npmmirror.com/webworkify-webpack/-/webworkify-webpack-2.1.5.tgz", + "integrity": "sha512-2akF8FIyUvbiBBdD+RoHpoTbHMQF2HwjcxfDvgztAX5YwbZNyrtfUMgvfgFVsgDhDPVTlkbb5vyasqDHfIDPQw==" + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", @@ -7790,9 +7813,10 @@ "integrity": "sha512-ej5oVy6lykXsvieQtqZxCOaLT+xD4+QNarq78cIYISHmZXshCvROLudpQN3lfL8G0NL7plMSSK+zlyvCaIJ4Iw==" }, "@element-plus/icons-vue": { - "version": "2.0.6", - "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.6.tgz", - "integrity": "sha512-lPpG8hYkjL/Z97DH5Ei6w6o22Z4YdNglWCNYOPcB33JCF2A4wye6HFgSI7hEt9zdLyxlSpiqtgf9XcYU+m5mew==" + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz", + "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==", + "requires": {} }, "@esbuild/linux-loong64": { "version": "0.14.53", @@ -9567,6 +9591,11 @@ "es6-symbol": "^3.1.1" } }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmmirror.com/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, "es6-symbol": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/es6-symbol/-/es6-symbol-3.1.3.tgz", @@ -10254,6 +10283,15 @@ "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", "dev": true }, + "flv.js": { + "version": "1.6.2", + "resolved": "https://registry.npmmirror.com/flv.js/-/flv.js-1.6.2.tgz", + "integrity": "sha512-xre4gUbX1MPtgQRKj2pxJENp/RnaHaxYvy3YToVVCrSmAWUu85b9mug6pTXF6zakUjNP2lFWZ1rkSX7gxhB/2A==", + "requires": { + "es6-promise": "^4.2.8", + "webworkify-webpack": "^2.1.5" + } + }, "follow-redirects": { "version": "1.15.1", "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.1.tgz", @@ -13253,6 +13291,11 @@ "integrity": "sha512-h9atBP/bsZohWpHnr+2sic8Iecb60GxftXsWNLLLSqewgIsGzByd2gcIID4nXcG+3tNe4GQG3dLcff3kXupdRA==", "dev": true }, + "webworkify-webpack": { + "version": "2.1.5", + "resolved": "https://registry.npmmirror.com/webworkify-webpack/-/webworkify-webpack-2.1.5.tgz", + "integrity": "sha512-2akF8FIyUvbiBBdD+RoHpoTbHMQF2HwjcxfDvgztAX5YwbZNyrtfUMgvfgFVsgDhDPVTlkbb5vyasqDHfIDPQw==" + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", diff --git a/admin/package.json b/admin/package.json index c6c68cf3..8b650313 100644 --- a/admin/package.json +++ b/admin/package.json @@ -10,7 +10,7 @@ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" }, "dependencies": { - "@element-plus/icons-vue": "^2.0.6", + "@element-plus/icons-vue": "^2.3.1", "@highlightjs/vue-plugin": "^2.1.0", "@wangeditor/editor": "^5.1.12", "@wangeditor/editor-for-vue": "^5.1.12", @@ -18,6 +18,7 @@ "css-color-function": "^1.3.3", "echarts": "^5.3.3", "element-plus": "^2.2.9", + "flv.js": "^1.6.2", "highlight.js": "^11.6.0", "nprogress": "^0.2.0", "pinia": "^2.0.14", diff --git a/admin/src/api/device.ts b/admin/src/api/device.ts index 69b6be39..d5ea49de 100644 --- a/admin/src/api/device.ts +++ b/admin/src/api/device.ts @@ -33,4 +33,9 @@ export function apiDeviceDelete(params: any) { // 监测设备详情 export function apiDeviceDetail(params: any) { return request.get({ url: '/device.device/detail', params }) +} + +// 设备监控数据 +export function apiDeviceMonitorData(params: any) { + return request.get({ url: '/device.device/monitorData', params }) } \ No newline at end of file diff --git a/admin/src/config/index.ts b/admin/src/config/index.ts index 10bbb3da..4bf4e940 100644 --- a/admin/src/config/index.ts +++ b/admin/src/config/index.ts @@ -2,8 +2,8 @@ const config = { terminal: 1, //终端 title: '后台管理系统', //网站默认标题 version: '1.6.0', //版本号 - baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名 - // baseUrl: 'http://127.0.0.1:30005/', + // baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名 + baseUrl: 'http://127.0.0.1:30005/', urlPrefix: 'adminapi', //请求默认前缀 timeout: 10 * 1000 //请求超时时长 } diff --git a/admin/src/views/device/detail.vue b/admin/src/views/device/detail.vue new file mode 100644 index 00000000..0d0159d5 --- /dev/null +++ b/admin/src/views/device/detail.vue @@ -0,0 +1,213 @@ + + + \ No newline at end of file diff --git a/admin/src/views/device/edit.vue b/admin/src/views/device/edit.vue index fd652136..add3e7c6 100644 --- a/admin/src/views/device/edit.vue +++ b/admin/src/views/device/edit.vue @@ -70,6 +70,9 @@ :value="item.value" /> + + + @@ -136,6 +139,7 @@ const formData = reactive({ product_id: '', code: '', name: '', + video_url: '', type: '', monitor_item: '', status: '', @@ -171,11 +175,6 @@ const formRules = reactive({ message: '请选择设备类型', trigger: ['blur'] }], - monitor_item: [{ - required: true, - message: '请选择设备监测项', - trigger: ['blur'] - }], status: [{ required: true, message: '请选择设备状态', @@ -202,7 +201,6 @@ const setFormData = async (data: Record) => { formData[key] = data[key] } } - console.log(dictData.monitor_item) } interface ListItem { diff --git a/admin/src/views/device/index.vue b/admin/src/views/device/index.vue index 9225f8b4..e8819089 100644 --- a/admin/src/views/device/index.vue +++ b/admin/src/views/device/index.vue @@ -94,31 +94,31 @@ - + + + - + + + + - - - - - +