diff --git a/rc_autoplc_front/src/api/system/user-role.ts b/rc_autoplc_front/src/api/system/user-role.ts index 9d65c25..f202c31 100644 --- a/rc_autoplc_front/src/api/system/user-role.ts +++ b/rc_autoplc_front/src/api/system/user-role.ts @@ -37,7 +37,7 @@ export function userRoleById(id: string | number) { // 根据角色ID查询关联用户(先封装不调用) export function userRoleByRoleId(roleId: string | number) { return request({ - url: `/user-role/getByRoleId/${roleId}`, + url: `/user-role/role/${roleId}`, method: 'get', }) } @@ -45,7 +45,7 @@ export function userRoleByRoleId(roleId: string | number) { // 根据角色ID删除所有关联(先封装不调用) export function userRoleDelByRoleId(roleId: string | number) { return request({ - url: `/user-role/delByRoleId/${roleId}`, + url: `/user-role/role/${roleId}`, method: 'delete', }) } @@ -53,7 +53,7 @@ export function userRoleDelByRoleId(roleId: string | number) { // 根据用户ID查询关联角色(先封装不调用) export function userRoleByUserId(userId: string | number) { return request({ - url: `/user-role/getByUserId/${userId}`, + url: `/user-role/user/${userId}`, method: 'get', }) } @@ -61,7 +61,7 @@ export function userRoleByUserId(userId: string | number) { // 根据用户ID删除所有关联(先封装不调用) export function userRoleDelByUserId(userId: string | number) { return request({ - url: `/user-role/delByUserId/${userId}`, + url: `/user-role/user/${userId}`, method: 'delete', }) } diff --git a/rc_autoplc_front/src/api/tb/devinfo.ts b/rc_autoplc_front/src/api/tb/devinfo.ts new file mode 100644 index 0000000..dd56c4b --- /dev/null +++ b/rc_autoplc_front/src/api/tb/devinfo.ts @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +export function devInfoadd(data: any) { + return request({ + url: '/devInfo/add', + method: 'post', + data, + }) +} + +export function devInfodel(id: string | number) { + return request({ + url: `/devInfo/del/${id}`, + method: 'delete', + }) +} + +export function devInfoupd(data: any) { + return request({ + url: '/devInfo/update', + method: 'put', + data, + }) +} + +export function devInfolist(data: any) { + return request({ + url: '/devInfo/listPage', + method: 'get', + params: data, + }) +} + +export function devInfobyid(id: string | number) { + return request({ + url: `/devInfo/getById/${id}`, + method: 'get', + }) +} + +export function devselect(data: any) { + return request({ + url: '/devInfo/all', + method: 'get', + params: data, + }) +} \ No newline at end of file diff --git a/rc_autoplc_front/src/api/tb/devparam.ts b/rc_autoplc_front/src/api/tb/devparam.ts new file mode 100644 index 0000000..75d0e18 --- /dev/null +++ b/rc_autoplc_front/src/api/tb/devparam.ts @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +export function devparamadd(data: any) { + return request({ + url: '/devParam/add', + method: 'post', + data, + }) +} + +export function devparamdel(id: string | number) { + return request({ + url: `/devParam/del/${id}`, + method: 'delete', + }) +} + +export function devparamupd(data: any) { + return request({ + url: '/devParam/update', + method: 'put', + data, + }) +} + +export function devparamlist(data: any) { + return request({ + url: '/devParam/listPage', + method: 'get', + params: data, + }) +} + +export function devparambyid(id: string | number) { + return request({ + url: `/devParam/getById/${id}`, + method: 'get', + }) +} + +export function devparamselect(data: any) { + return request({ + url: '/devParam/list', + method: 'get', + params: data, + }) +} \ No newline at end of file diff --git a/rc_autoplc_front/src/api/business/islandinfo.ts b/rc_autoplc_front/src/api/tb/islandinfo.ts similarity index 100% rename from rc_autoplc_front/src/api/business/islandinfo.ts rename to rc_autoplc_front/src/api/tb/islandinfo.ts diff --git a/rc_autoplc_front/src/assets/image/right.png b/rc_autoplc_front/src/assets/image/right.png new file mode 100644 index 0000000..0237eb9 Binary files /dev/null and b/rc_autoplc_front/src/assets/image/right.png differ diff --git a/rc_autoplc_front/src/router/index.ts b/rc_autoplc_front/src/router/index.ts index b6c6386..3604ca3 100644 --- a/rc_autoplc_front/src/router/index.ts +++ b/rc_autoplc_front/src/router/index.ts @@ -37,6 +37,21 @@ const router = createRouter({ name: 'user-role', component: () => import('../views/user-role/index.vue'), }, + { + path: '/island-info', + name: 'island-info', + component: () => import('../views/islandInfo/index.vue'), + }, + { + path: '/devinfo', + name: 'devinfo', + component: () => import('../views/devinfo/index.vue'), + }, + { + path: '/plc-devinfo', + name: 'plc-devinfo', + component: () => import('../views/devinfo/plc.vue'), + }, ], }, ], diff --git a/rc_autoplc_front/src/views/Layout.vue b/rc_autoplc_front/src/views/Layout.vue index 2a35ff0..44daf7b 100644 --- a/rc_autoplc_front/src/views/Layout.vue +++ b/rc_autoplc_front/src/views/Layout.vue @@ -61,6 +61,24 @@ 用户角色管理 + + + + 业务管理 + + + + 功能岛管理 + + + + 设备管理 + + + + PLC设备管理 + + @@ -76,7 +94,7 @@ import { ref, computed } from 'vue' import { useRouter, useRoute } from 'vue-router' import { ElMessage, ElMessageBox } from 'element-plus' -import { User, Setting, Avatar, OfficeBuilding, Briefcase, Document, CaretBottom, UserFilled } from '@element-plus/icons-vue' +import { User, Setting, Avatar, OfficeBuilding, Briefcase, Document, CaretBottom, UserFilled, Grid, Monitor, Connection, Plus } from '@element-plus/icons-vue' import { useAuthStore } from '@/stores/auth' const router = useRouter() diff --git a/rc_autoplc_front/src/views/devinfo/index.vue b/rc_autoplc_front/src/views/devinfo/index.vue new file mode 100644 index 0000000..d68f9d6 --- /dev/null +++ b/rc_autoplc_front/src/views/devinfo/index.vue @@ -0,0 +1,1061 @@ + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + 新增设备 + + + + + + + + + + + + {{ row.devName || '暂无' }} + + + + + {{ row.devModel || '暂无' }} + + + + + + {{ getStatusText(row.status) }} + + + + + + {{ getIslandName(row.islandId) }} + + + + + {{ row.devDesc || '暂无' }} + + + + + {{ row.remark || '暂无' }} + + + + + + + 配置参数 + + + + 编辑 + + + + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 添加一行 + + + + + + + + + + + + {{ row.paramName || '暂无' }} + + + + + + + + + + {{ row.paramType || '暂无' }} + + + + + + + + {{ row.paramUnit || '暂无' }} + + + + + + + + + + {{ row.formType || '暂无' }} + + + + + + + + + 保存 + + + + 编辑 + + + + 删除 + + + + + + + + + + + + + + + + + + diff --git a/rc_autoplc_front/src/views/devinfo/plc.vue b/rc_autoplc_front/src/views/devinfo/plc.vue new file mode 100644 index 0000000..e954c0d --- /dev/null +++ b/rc_autoplc_front/src/views/devinfo/plc.vue @@ -0,0 +1,583 @@ + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + 新增PLC设备 + + + + + + + + + + + + {{ row.devName || '暂无' }} + + + + + {{ row.devModel || '暂无' }} + + + + + {{ row.ipAddr || '暂无' }} + + + + + {{ row.port || '暂无' }} + + + + + {{ row.protocolType || '暂无' }} + + + + + {{ row.company || '暂无' }} + + + + + + {{ getStatusText(row.status) }} + + + + + + {{ row.devDesc || '暂无' }} + + + + + {{ row.remark || '暂无' }} + + + + + + + 编辑 + + + + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rc_autoplc_front/src/views/islandInfo/index.vue b/rc_autoplc_front/src/views/islandInfo/index.vue new file mode 100644 index 0000000..3d55250 --- /dev/null +++ b/rc_autoplc_front/src/views/islandInfo/index.vue @@ -0,0 +1,1091 @@ + + + + + + + + + + + 查询 + 重置 + + + + + + 新增功能岛 + + + + + + + + + + + + + + + + {{ (pagination.pageNum - 1) * pagination.pageSize + index + 1 }} + + + + + + + + + + + + + {{ item.islandName || item.name || '未命名功能岛' }} + + + {{ item.desc || item.islandDesc || item.description || '暂无描述' }} + + + + + handleCommand(command, item)"> + + + + + + + + 编辑 + + + + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 根据功能岛名称自动生成 + + + + + + + + + + 绑定设备 + + + + + + + {{ row.devName || '暂无' }} + + + + + + {{ getStatusText(row.status) }} + + + + + + {{ row.devDesc || '暂无' }} + + + + + 暂无绑定设备 + + + + + + + + + + + + + + + + {{ row.devName || '暂无' }} + + + + + {{ row.devModel || '暂无' }} + + + + + {{ row.ipAddr || '暂无' }} + + + + + {{ row.port !== null && row.port !== undefined ? row.port : '暂无' }} + + + + + {{ row.protocolType || '暂无' }} + + + + + + {{ getStatusText(row.status) }} + + + + + + + + + + + + + + + + diff --git a/rc_autoplc_front/tsconfig.app.json b/rc_autoplc_front/tsconfig.app.json index 913b8f2..ba6658c 100644 --- a/rc_autoplc_front/tsconfig.app.json +++ b/rc_autoplc_front/tsconfig.app.json @@ -1,4 +1,5 @@ { + "extends": "@vue/tsconfig/tsconfig.dom.json", "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], "exclude": ["src/**/__tests__/*"],