From 80072c21848333e37ac5f82417b43658b02b1735 Mon Sep 17 00:00:00 2001 From: dengjia Date: Tue, 2 Sep 2025 17:35:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=96=B0=E5=A2=9E=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E5=B9=B3=E5=8F=B0=EF=BC=9B=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/request/system_management.js | 5 ++ .../alarm_management/components/edit.vue | 32 ++++++++ src/views/alarm_management/info.vue | 8 ++ src/views/login/index.vue | 5 +- .../system_management/role/components/add.vue | 76 ++++++++++++++++++- src/views/system_management/role/index.vue | 13 +++- 6 files changed, 133 insertions(+), 6 deletions(-) diff --git a/src/request/system_management.js b/src/request/system_management.js index 965ef94..020a35e 100644 --- a/src/request/system_management.js +++ b/src/request/system_management.js @@ -9,6 +9,11 @@ export const setRoleDelete = (params) => export const setRoleAdd = (params) => postRequest("/sys/role/save", params); // 角色管理添加 export const setRoleEdit = (params) => postRequest("/sys/role/update", params); // 角色管理修改 export const getRoleView = (params) => postRequest("/sys/role/info", params); // 角色管理查看 +export const getBusServicePlatformListAllName = (params) => + postRequest("busServicePlatform/listAllName", params); // 服务平台管理-所有名称 +export const getBusCompanyInfoListAllName = (params) => + postRequest("busCompanyInfo/listAllName", params); // 对接企业管理-获取服务平台下的企业名称 + export const getDataDictionaryList = (params) => postRequest("/sys/dictionaries/listPage", params); // 数据字典列表 export const setDataDictionaryDelete = (params) => diff --git a/src/views/alarm_management/components/edit.vue b/src/views/alarm_management/components/edit.vue index 7ad97f1..861888f 100644 --- a/src/views/alarm_management/components/edit.vue +++ b/src/views/alarm_management/components/edit.vue @@ -37,6 +37,8 @@ const form = ref({ handleRemark: "", handleResult: "", handleStatus: "", + handleType: "", + alarmPlatform: "", }); const rules = { alarmReason: [ @@ -52,12 +54,28 @@ const rules = { handleStatus: [ { required: true, message: "处理状态不能为空", trigger: "change" }, ], + handleType: [ + { required: true, message: "处理类型不能为空", trigger: "change" }, + ], + alarmPlatform: [ + { required: true, message: "告警平台不能为空", trigger: "change" }, + ], }; const handleStatusOptions = [ // { name: "未处理", id: 1 }, { name: "处理成功", id: 2 }, { name: "不需要处理", id: 3 }, ]; +const handleTypeOptions = [ + { name: "网络原因", id: 1 }, + { name: "bug", id: 2 }, + { name: "其他原因", id: 3 }, +]; +const alarmPlatformOptions = [ + { name: "上级平台", id: 1 }, + { name: "服务平台", id: 2 }, + { name: "企业", id: 3 }, +]; const options = [ { key: "handleBy", label: "处理人" }, { key: "handleRemark", label: "处理备注" }, @@ -68,6 +86,20 @@ const options = [ type: "select", options: handleStatusOptions, }, + { + key: "handleType", + label: "处理类型", + type: "select", + valueKey: "name", + options: handleTypeOptions, + }, + { + key: "alarmPlatform", + label: "告警平台", + type: "select", + valueKey: "name", + options: alarmPlatformOptions, + }, { key: "alarmReason", label: "告警原因", type: "textarea", span: 24 }, ]; const fnSubmit = debounce( diff --git a/src/views/alarm_management/info.vue b/src/views/alarm_management/info.vue index dc8797c..5c18fc4 100644 --- a/src/views/alarm_management/info.vue +++ b/src/views/alarm_management/info.vue @@ -93,6 +93,14 @@ const options = [ key: "handleStatus", label: "处理状态", }, + { + key: "handleType", + label: "处理类型", + }, + { + key: "alarmPlatform", + label: "告警平台", + }, { key: "alarmReason", label: "告警原因", span: 2 }, { key: "receiveData", diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 43913d2..c633dfb 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -38,7 +38,7 @@ - + 登录 @@ -156,7 +156,7 @@ const fnSubmitLogin = async () => { top: 50%; transform: translateY(-50%); width: 480px; - height: 580px; + height: 540px; padding: 42px 35px 94px; background-color: #fff; z-index: 1; @@ -201,7 +201,6 @@ const fnSubmitLogin = async () => { } .button { - margin-top: 88px; .el-button { background: #0a7dfe; height: 45px; diff --git a/src/views/system_management/role/components/add.vue b/src/views/system_management/role/components/add.vue index 7ea2bf9..cefe6f9 100644 --- a/src/views/system_management/role/components/add.vue +++ b/src/views/system_management/role/components/add.vue @@ -16,6 +16,45 @@ placeholder="请输入备注" /> + + + + + + + + + + + + + + + form.value.type, + async (val) => { + if (val !== 1) await fnGetServicePlatformOptions(); + if (val === 3) await fnGetCompanyOptions(); + } +); +const fnGetServicePlatformOptions = async () => { + if (servicePlatformOptions.value.length === 0) { + const { data } = await getBusServicePlatformListAllName(); + servicePlatformOptions.value = data; + } +}; +const fnGetCompanyOptions = async () => { + if (form.value.type !== 3 || form.value.servicePlatformId.length === 0) + return; + const { data } = await getBusCompanyInfoListAllName({ + servicePlatformIds: form.value.servicePlatformId.join(","), + }); + companyOptions.value = data; }; const fnGetData = async () => { const resData = await getRouteList({ parentId: 0 }); @@ -121,11 +191,15 @@ const fnSubmit = debounce( await validate(); const checkedKeys = treeRef.value?.getCheckedKeys() || []; const halfCheckedKeys = treeRef.value?.getHalfCheckedKeys() || []; + const servicePlatformId = form.value.servicePlatformId.join(","); + const companyId = form.value.companyId.join(","); if (props.type === "add") { await setRoleAdd({ ...form.value, menuIdList: [...checkedKeys, ...halfCheckedKeys], roleId: undefined, + servicePlatformId, + companyId, }); } if (props.type === "edit") diff --git a/src/views/system_management/role/index.vue b/src/views/system_management/role/index.vue index 38ead3b..f15cc2f 100644 --- a/src/views/system_management/role/index.vue +++ b/src/views/system_management/role/index.vue @@ -83,6 +83,9 @@ const addOrEditDialog = ref({ remark: "", corpRoleType: "", menuIdList: [], + type: "", + companyId: [], + servicePlatformId: [], }, }); const fnDelete = debounce( @@ -120,8 +123,14 @@ const fnAddOrEdit = async (roleId, type) => { addOrEditDialog.value.type = type; await nextTick(); if (type === "edit") { - const resData = await getRoleView({ roleId }); - addOrEditDialog.value.form = resData.role; + const { role } = await getRoleView({ roleId }); + addOrEditDialog.value.form = role; + addOrEditDialog.value.form.companyId = role.companyId + .split(",") + .map(Number); + addOrEditDialog.value.form.servicePlatformId = role.servicePlatformId + .split(",") + .map(Number); } };