From 3f6e1bc8ee0e8c8b0d1e9c72cac358d7e12d2241 Mon Sep 17 00:00:00 2001
From: wally <18603454788@163.com>
Date: Fri, 29 Oct 2021 15:36:47 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8E=BB=E6=8E=89=E8=8E=B7=E5=8F=96?=
=?UTF-8?q?=E7=8A=B6=E6=80=81=EF=BC=9B=E9=87=91=E5=B1=9E=E9=80=9A=E9=81=93?=
=?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=94=B9=E4=B8=BA4=E4=B8=AA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/apis/index.js | 4 +-
src/components/device-select-and-status.vue | 7 +-
src/views/function-config.vue | 81 ++++++++++++++++-----
3 files changed, 68 insertions(+), 24 deletions(-)
diff --git a/src/apis/index.js b/src/apis/index.js
index 98608ba..efc13cd 100644
--- a/src/apis/index.js
+++ b/src/apis/index.js
@@ -23,10 +23,10 @@ export const getMonthsDate = params => http.get(`${corrosion}/statistics/months`
export const getRealtimeData = params => http.get(`${corrosion}/statistics/realtime`, { params });
// 获取网络配置参数
-export const getConfigNetwork = () => http.get(`${corrosion}/config/network`);
+export const getConfigNetwork = params => http.get(`${corrosion}/config/network`, { params });
// 获取功能配置参数
-export const getConfigFunction = () => http.get(`${corrosion}/config/function`);
+export const getConfigFunction = params => http.get(`${corrosion}/config/function`, { params });
// 提交网络配置参数
export const createConfigNetwork = data => http.post(`${corrosion}/config/network`, data);
diff --git a/src/components/device-select-and-status.vue b/src/components/device-select-and-status.vue
index c643b82..82d32d5 100644
--- a/src/components/device-select-and-status.vue
+++ b/src/components/device-select-and-status.vue
@@ -10,14 +10,13 @@ const store = useStore();
const devices = computed(() => store.state.device.devices); // 设备/站点列表
const deviceId = ref(''); // 选中的设备id
const currentDeviceId = computed(() => store.state.device.currentDeviceId); // 正在操作的设备的id
-const get = computed(() => (props.status.get ? '设置生效' : '等待下发'));
+// const get = computed(() => (props.status.get ? '设置生效' : '等待下发'));
const set = computed(() => (props.status.set ? '设置生效' : '等待下发'));
// 监听currentDeviceId
watch(
() => currentDeviceId.value,
newValue => {
- console.log('newValue: ', newValue);
if (newValue && deviceId.value !== newValue) {
deviceId.value = newValue;
}
@@ -33,8 +32,8 @@ watch(
- 获取状态:
- {{ get }}
+
设置状态:
{{ set }}
diff --git a/src/views/function-config.vue b/src/views/function-config.vue
index 4f8bf1f..cbba5e9 100644
--- a/src/views/function-config.vue
+++ b/src/views/function-config.vue
@@ -1,4 +1,7 @@
+
+
+
@@ -81,22 +84,45 @@
-
-
- 不加密
- 加密
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+ 不加密
+ 加密
+
+
+
+
@@ -131,13 +157,19 @@
+
+
+