From b92ab99ae1b08ff3481798e40efafe4323da07b2 Mon Sep 17 00:00:00 2001 From: sunmeng <1162067978@qq.com> Date: Thu, 19 Dec 2024 15:51:11 +0800 Subject: [PATCH] 1 --- src/api/index.js | 9 +++ src/components/setParamsControl.vue | 3 + src/views/manage/deviceInfoManage.vue | 81 ++++++++++++++++++++++++++- 3 files changed, 92 insertions(+), 1 deletion(-) diff --git a/src/api/index.js b/src/api/index.js index bdc144c..f8d421d 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -494,6 +494,11 @@ selControlPermissions(data){ putpermission(data){ return sendPutRequest(`/getcontrol/putpermission`, data) }, +//根据权限id修改权限显示或者隐藏 +updatePermissionState(data){ + return sendPutRequest(`/getcontrol/updatePermissionState`, data) +}, + //根据设备ID获取设备控制值 selpermission(data){ return sendGetRequest(`/getcontrol/selpermission`, data) @@ -700,6 +705,10 @@ getIccid(data){ readControl_setMemo(data){ return sendPostRequest(`/readControl/setMemo`, data) }, + //根据设备id查询控制器权限 + getcontrol_cpermission(data){ + return sendPostRequest(`/getcontrol/cpermission?deviceId=${data}`, '') + }, diff --git a/src/components/setParamsControl.vue b/src/components/setParamsControl.vue index 04be4b2..ad2ff3c 100644 --- a/src/components/setParamsControl.vue +++ b/src/components/setParamsControl.vue @@ -103,6 +103,9 @@ export default { this.routerList = []; this.purview = res.data.data; this.purview.forEach((el, index) => { + if(el.state==1){ + return + } if (el.id == 1) { var list = [ { name: "目标温度", list: [], router: "targetTemperature", isRouter: true, index: 1 }, diff --git a/src/views/manage/deviceInfoManage.vue b/src/views/manage/deviceInfoManage.vue index e6f0bc7..f084873 100644 --- a/src/views/manage/deviceInfoManage.vue +++ b/src/views/manage/deviceInfoManage.vue @@ -63,6 +63,9 @@
编辑
+
+ 权限编辑 +
@@ -372,6 +375,21 @@
取消
+ + + +
控制器权限管理
+
+
+
+ {{ item.nickName }} +
+
+ + +
确定
+
+