From 2981d5053e768bb893dc33cb55ee0c8c40ad8ef7 Mon Sep 17 00:00:00 2001 From: Wangxin Date: Tue, 29 Jul 2025 15:40:46 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90web=E3=80=91=20=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E3=80=81?= =?UTF-8?q?=E6=9D=83=E9=99=90=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ALOps_sys_fe/alops-ui/.env.development | 2 +- .../src/api/device/deviceInformation.js | 130 +++++ .../src/api/device/deviceManufacturer.js | 130 +++++ .../alops-ui/src/api/device/deviceType.js | 130 +++++ .../alops-ui/src/api/device/dict/data.js | 52 ++ .../alops-ui/src/api/device/dict/type.js | 60 ++ ALOps_sys_fe/alops-ui/src/api/device/files.js | 130 +++++ .../views/device/deviceInformation/index.vue | 534 ++++++++++++++++++ .../views/device/deviceManufacturer/index.vue | 516 +++++++++++++++++ .../src/views/device/deviceType/index.vue | 521 +++++++++++++++++ .../alops-ui/src/views/device/files/index.vue | 516 +++++++++++++++++ ALOps_sys_fe/alops-ui/vue.config.js | 2 +- 12 files changed, 2721 insertions(+), 2 deletions(-) create mode 100644 ALOps_sys_fe/alops-ui/src/api/device/deviceInformation.js create mode 100644 ALOps_sys_fe/alops-ui/src/api/device/deviceManufacturer.js create mode 100644 ALOps_sys_fe/alops-ui/src/api/device/deviceType.js create mode 100644 ALOps_sys_fe/alops-ui/src/api/device/dict/data.js create mode 100644 ALOps_sys_fe/alops-ui/src/api/device/dict/type.js create mode 100644 ALOps_sys_fe/alops-ui/src/api/device/files.js create mode 100644 ALOps_sys_fe/alops-ui/src/views/device/deviceInformation/index.vue create mode 100644 ALOps_sys_fe/alops-ui/src/views/device/deviceManufacturer/index.vue create mode 100644 ALOps_sys_fe/alops-ui/src/views/device/deviceType/index.vue create mode 100644 ALOps_sys_fe/alops-ui/src/views/device/files/index.vue diff --git a/ALOps_sys_fe/alops-ui/.env.development b/ALOps_sys_fe/alops-ui/.env.development index 3f80ff7a..b0e45d4b 100644 --- a/ALOps_sys_fe/alops-ui/.env.development +++ b/ALOps_sys_fe/alops-ui/.env.development @@ -5,7 +5,7 @@ VUE_APP_TITLE = 智能运维系统 ENV = 'development' # 若依管理系统/开发环境 -VUE_APP_BASE_API = '/dev-api' +VUE_APP_BASE_API = 'http://39.102.212.161:8080' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/ALOps_sys_fe/alops-ui/src/api/device/deviceInformation.js b/ALOps_sys_fe/alops-ui/src/api/device/deviceInformation.js new file mode 100644 index 00000000..16227644 --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/api/device/deviceInformation.js @@ -0,0 +1,130 @@ +import request from '@/utils/request' +import { parseStrEmpty } from "@/utils/ruoyi"; + +// 查询用户列表 +export function listUser(query) { + return request({ + url: '/system/user/list', + method: 'get', + params: query + }) +} + +// 查询用户详细 +export function getUser(userId) { + return request({ + url: '/system/user/' + parseStrEmpty(userId), + method: 'get' + }) +} + +// 新增用户 +export function addUser(data) { + return request({ + url: '/system/user', + method: 'post', + data: data + }) +} + +// 修改用户 +export function updateUser(data) { + return request({ + url: '/system/user', + method: 'put', + data: data + }) +} + +// 删除用户 +export function delUser(userId) { + return request({ + url: '/system/user/' + userId, + method: 'delete' + }) +} + +// 用户密码重置 +export function resetUserPwd(userId, password) { + const data = { + userId, + password + } + return request({ + url: '/system/user/resetPwd', + method: 'put', + data: data + }) +} + +// 用户状态修改 +export function changeUserStatus(userId, status) { + const data = { + userId, + status + } + return request({ + url: '/system/user/changeStatus', + method: 'put', + data: data + }) +} + +// 查询用户个人信息 +export function getUserProfile() { + return request({ + url: '/system/user/profile', + method: 'get' + }) +} + +// 修改用户个人信息 +export function updateUserProfile(data) { + return request({ + url: '/system/user/profile', + method: 'put', + data: data + }) +} + +// 用户密码重置 +export function updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return request({ + url: '/system/user/profile/updatePwd', + method: 'put', + data: data + }) +} + +// 用户头像上传 +export function uploadAvatar(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'post', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + data: data + }) +} + +// 查询授权角色 +export function getAuthRole(userId) { + return request({ + url: '/system/user/authRole/' + userId, + method: 'get' + }) +} + +// 保存授权角色 +export function updateAuthRole(data) { + return request({ + url: '/system/user/authRole', + method: 'put', + params: data + }) +} + + diff --git a/ALOps_sys_fe/alops-ui/src/api/device/deviceManufacturer.js b/ALOps_sys_fe/alops-ui/src/api/device/deviceManufacturer.js new file mode 100644 index 00000000..16227644 --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/api/device/deviceManufacturer.js @@ -0,0 +1,130 @@ +import request from '@/utils/request' +import { parseStrEmpty } from "@/utils/ruoyi"; + +// 查询用户列表 +export function listUser(query) { + return request({ + url: '/system/user/list', + method: 'get', + params: query + }) +} + +// 查询用户详细 +export function getUser(userId) { + return request({ + url: '/system/user/' + parseStrEmpty(userId), + method: 'get' + }) +} + +// 新增用户 +export function addUser(data) { + return request({ + url: '/system/user', + method: 'post', + data: data + }) +} + +// 修改用户 +export function updateUser(data) { + return request({ + url: '/system/user', + method: 'put', + data: data + }) +} + +// 删除用户 +export function delUser(userId) { + return request({ + url: '/system/user/' + userId, + method: 'delete' + }) +} + +// 用户密码重置 +export function resetUserPwd(userId, password) { + const data = { + userId, + password + } + return request({ + url: '/system/user/resetPwd', + method: 'put', + data: data + }) +} + +// 用户状态修改 +export function changeUserStatus(userId, status) { + const data = { + userId, + status + } + return request({ + url: '/system/user/changeStatus', + method: 'put', + data: data + }) +} + +// 查询用户个人信息 +export function getUserProfile() { + return request({ + url: '/system/user/profile', + method: 'get' + }) +} + +// 修改用户个人信息 +export function updateUserProfile(data) { + return request({ + url: '/system/user/profile', + method: 'put', + data: data + }) +} + +// 用户密码重置 +export function updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return request({ + url: '/system/user/profile/updatePwd', + method: 'put', + data: data + }) +} + +// 用户头像上传 +export function uploadAvatar(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'post', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + data: data + }) +} + +// 查询授权角色 +export function getAuthRole(userId) { + return request({ + url: '/system/user/authRole/' + userId, + method: 'get' + }) +} + +// 保存授权角色 +export function updateAuthRole(data) { + return request({ + url: '/system/user/authRole', + method: 'put', + params: data + }) +} + + diff --git a/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js b/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js new file mode 100644 index 00000000..16227644 --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js @@ -0,0 +1,130 @@ +import request from '@/utils/request' +import { parseStrEmpty } from "@/utils/ruoyi"; + +// 查询用户列表 +export function listUser(query) { + return request({ + url: '/system/user/list', + method: 'get', + params: query + }) +} + +// 查询用户详细 +export function getUser(userId) { + return request({ + url: '/system/user/' + parseStrEmpty(userId), + method: 'get' + }) +} + +// 新增用户 +export function addUser(data) { + return request({ + url: '/system/user', + method: 'post', + data: data + }) +} + +// 修改用户 +export function updateUser(data) { + return request({ + url: '/system/user', + method: 'put', + data: data + }) +} + +// 删除用户 +export function delUser(userId) { + return request({ + url: '/system/user/' + userId, + method: 'delete' + }) +} + +// 用户密码重置 +export function resetUserPwd(userId, password) { + const data = { + userId, + password + } + return request({ + url: '/system/user/resetPwd', + method: 'put', + data: data + }) +} + +// 用户状态修改 +export function changeUserStatus(userId, status) { + const data = { + userId, + status + } + return request({ + url: '/system/user/changeStatus', + method: 'put', + data: data + }) +} + +// 查询用户个人信息 +export function getUserProfile() { + return request({ + url: '/system/user/profile', + method: 'get' + }) +} + +// 修改用户个人信息 +export function updateUserProfile(data) { + return request({ + url: '/system/user/profile', + method: 'put', + data: data + }) +} + +// 用户密码重置 +export function updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return request({ + url: '/system/user/profile/updatePwd', + method: 'put', + data: data + }) +} + +// 用户头像上传 +export function uploadAvatar(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'post', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + data: data + }) +} + +// 查询授权角色 +export function getAuthRole(userId) { + return request({ + url: '/system/user/authRole/' + userId, + method: 'get' + }) +} + +// 保存授权角色 +export function updateAuthRole(data) { + return request({ + url: '/system/user/authRole', + method: 'put', + params: data + }) +} + + diff --git a/ALOps_sys_fe/alops-ui/src/api/device/dict/data.js b/ALOps_sys_fe/alops-ui/src/api/device/dict/data.js new file mode 100644 index 00000000..6c9eb79b --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/api/device/dict/data.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +// 查询字典数据列表 +export function listData(query) { + return request({ + url: '/system/dict/data/list', + method: 'get', + params: query + }) +} + +// 查询字典数据详细 +export function getData(dictCode) { + return request({ + url: '/system/dict/data/' + dictCode, + method: 'get' + }) +} + +// 根据字典类型查询字典数据信息 +export function getDicts(dictType) { + return request({ + url: '/system/dict/data/type/' + dictType, + method: 'get' + }) +} + +// 新增字典数据 +export function addData(data) { + return request({ + url: '/system/dict/data', + method: 'post', + data: data + }) +} + +// 修改字典数据 +export function updateData(data) { + return request({ + url: '/system/dict/data', + method: 'put', + data: data + }) +} + +// 删除字典数据 +export function delData(dictCode) { + return request({ + url: '/system/dict/data/' + dictCode, + method: 'delete' + }) +} diff --git a/ALOps_sys_fe/alops-ui/src/api/device/dict/type.js b/ALOps_sys_fe/alops-ui/src/api/device/dict/type.js new file mode 100644 index 00000000..a7a6e01f --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/api/device/dict/type.js @@ -0,0 +1,60 @@ +import request from '@/utils/request' + +// 查询字典类型列表 +export function listType(query) { + return request({ + url: '/system/dict/type/list', + method: 'get', + params: query + }) +} + +// 查询字典类型详细 +export function getType(dictId) { + return request({ + url: '/system/dict/type/' + dictId, + method: 'get' + }) +} + +// 新增字典类型 +export function addType(data) { + return request({ + url: '/system/dict/type', + method: 'post', + data: data + }) +} + +// 修改字典类型 +export function updateType(data) { + return request({ + url: '/system/dict/type', + method: 'put', + data: data + }) +} + +// 删除字典类型 +export function delType(dictId) { + return request({ + url: '/system/dict/type/' + dictId, + method: 'delete' + }) +} + +// 刷新字典缓存 +export function refreshCache() { + return request({ + url: '/system/dict/type/refreshCache', + method: 'delete' + }) +} + +// 获取字典选择框列表 +export function optionselect() { + return request({ + url: '/system/dict/type/optionselect', + method: 'get' + }) +} \ No newline at end of file diff --git a/ALOps_sys_fe/alops-ui/src/api/device/files.js b/ALOps_sys_fe/alops-ui/src/api/device/files.js new file mode 100644 index 00000000..16227644 --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/api/device/files.js @@ -0,0 +1,130 @@ +import request from '@/utils/request' +import { parseStrEmpty } from "@/utils/ruoyi"; + +// 查询用户列表 +export function listUser(query) { + return request({ + url: '/system/user/list', + method: 'get', + params: query + }) +} + +// 查询用户详细 +export function getUser(userId) { + return request({ + url: '/system/user/' + parseStrEmpty(userId), + method: 'get' + }) +} + +// 新增用户 +export function addUser(data) { + return request({ + url: '/system/user', + method: 'post', + data: data + }) +} + +// 修改用户 +export function updateUser(data) { + return request({ + url: '/system/user', + method: 'put', + data: data + }) +} + +// 删除用户 +export function delUser(userId) { + return request({ + url: '/system/user/' + userId, + method: 'delete' + }) +} + +// 用户密码重置 +export function resetUserPwd(userId, password) { + const data = { + userId, + password + } + return request({ + url: '/system/user/resetPwd', + method: 'put', + data: data + }) +} + +// 用户状态修改 +export function changeUserStatus(userId, status) { + const data = { + userId, + status + } + return request({ + url: '/system/user/changeStatus', + method: 'put', + data: data + }) +} + +// 查询用户个人信息 +export function getUserProfile() { + return request({ + url: '/system/user/profile', + method: 'get' + }) +} + +// 修改用户个人信息 +export function updateUserProfile(data) { + return request({ + url: '/system/user/profile', + method: 'put', + data: data + }) +} + +// 用户密码重置 +export function updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return request({ + url: '/system/user/profile/updatePwd', + method: 'put', + data: data + }) +} + +// 用户头像上传 +export function uploadAvatar(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'post', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + data: data + }) +} + +// 查询授权角色 +export function getAuthRole(userId) { + return request({ + url: '/system/user/authRole/' + userId, + method: 'get' + }) +} + +// 保存授权角色 +export function updateAuthRole(data) { + return request({ + url: '/system/user/authRole', + method: 'put', + params: data + }) +} + + diff --git a/ALOps_sys_fe/alops-ui/src/views/device/deviceInformation/index.vue b/ALOps_sys_fe/alops-ui/src/views/device/deviceInformation/index.vue new file mode 100644 index 00000000..522ab7be --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/views/device/deviceInformation/index.vue @@ -0,0 +1,534 @@ + + + \ No newline at end of file diff --git a/ALOps_sys_fe/alops-ui/src/views/device/deviceManufacturer/index.vue b/ALOps_sys_fe/alops-ui/src/views/device/deviceManufacturer/index.vue new file mode 100644 index 00000000..78dfacab --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/views/device/deviceManufacturer/index.vue @@ -0,0 +1,516 @@ + + + \ No newline at end of file diff --git a/ALOps_sys_fe/alops-ui/src/views/device/deviceType/index.vue b/ALOps_sys_fe/alops-ui/src/views/device/deviceType/index.vue new file mode 100644 index 00000000..6582b28d --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/views/device/deviceType/index.vue @@ -0,0 +1,521 @@ + + + \ No newline at end of file diff --git a/ALOps_sys_fe/alops-ui/src/views/device/files/index.vue b/ALOps_sys_fe/alops-ui/src/views/device/files/index.vue new file mode 100644 index 00000000..b2f67ebd --- /dev/null +++ b/ALOps_sys_fe/alops-ui/src/views/device/files/index.vue @@ -0,0 +1,516 @@ + + + \ No newline at end of file diff --git a/ALOps_sys_fe/alops-ui/vue.config.js b/ALOps_sys_fe/alops-ui/vue.config.js index 6fb55c84..e7ec6dfb 100644 --- a/ALOps_sys_fe/alops-ui/vue.config.js +++ b/ALOps_sys_fe/alops-ui/vue.config.js @@ -9,7 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin') const name = process.env.VUE_APP_TITLE || '智能运维管理系统' // 网页标题 -const baseUrl = 'http://localhost:8080' // 后端接口 +const baseUrl = 'http://39.102.212.161:8080' // 后端接口 const port = process.env.port || process.env.npm_config_port || 80 // 端口