From 258c210687a68ac39a0bc47de21fe25460a76736 Mon Sep 17 00:00:00 2001 From: 23688nl <329261568@qq.com> Date: Fri, 6 May 2022 17:41:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=EF=BC=9A=20=E7=BD=91?= =?UTF-8?q?=E5=85=B3=20=E5=85=B3=E8=81=94=E5=AD=90=E8=AE=BE=E5=A4=87=20?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=85=B3=E8=81=94=E7=AD=89=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/wxok.html | 41 ++ src/api/iot/device.js | 27 + src/assets/styles/loading.scss | 53 ++ .../{indexbox.vue => checkbox.vue} | 261 +++++++--- src/permission.js | 3 + src/utils/loading.js | 46 ++ src/views/bigScreen/v3/index.vue | 31 +- src/views/iot/device/index.vue | 2 +- src/views/iot/model/index.vue | 2 + .../trigger/profile/insertTriggerDialog.vue | 2 +- .../profile/DeviceDetailsView/childDevice.vue | 478 ++++++++++++++---- .../DeviceTrigger/profile/conditionTemp.vue | 133 +++-- .../profile/insertTriggerDialog.vue | 4 +- 13 files changed, 832 insertions(+), 251 deletions(-) create mode 100644 public/wxok.html create mode 100644 src/assets/styles/loading.scss rename src/components/SelectTable/{indexbox.vue => checkbox.vue} (52%) create mode 100644 src/utils/loading.js diff --git a/public/wxok.html b/public/wxok.html new file mode 100644 index 00000000..064ee9ad --- /dev/null +++ b/public/wxok.html @@ -0,0 +1,41 @@ + + + + +
+
+ + 绑定成功 +
+
+ + \ No newline at end of file diff --git a/src/api/iot/device.js b/src/api/iot/device.js index 988a4de0..e9a89ad8 100644 --- a/src/api/iot/device.js +++ b/src/api/iot/device.js @@ -124,3 +124,30 @@ export function setSwitchControl(data) { data: data }); } + +// 获取未绑定设备列表 +export function listNoParent(query) { + return request({ + url: "/iot/device/no-parent", + method: "get", + params: query + }); +} + +// 绑定子设备 +export function relationChild(data) { + return request({ + url: "/iot/device/bind", + method: "put", + data: data + }); +} + +// 绑定子设备 +export function disassociateChild(data) { + return request({ + url: "/iot/device/unBind/", + method: "put", + data: data + }); +} diff --git a/src/assets/styles/loading.scss b/src/assets/styles/loading.scss new file mode 100644 index 00000000..df4d4516 --- /dev/null +++ b/src/assets/styles/loading.scss @@ -0,0 +1,53 @@ + +.loading-next { + width: 100%; + height: 100%; + background: #00000038; +} +.loading-next .loading-next-box { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.loading-next .loading-next-box-warp { + width: 80px; + height: 80px; +} +.loading-next .loading-next-box-warp .loading-next-box-item { + width: 33.333333%; + height: 33.333333%; + background: #1890ff; + float: left; + animation: loading-next-animation 1.2s infinite ease; + border-radius: 1px; +} +.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(7) { + animation-delay: 0s; +} +.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(4), +.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(8) { + animation-delay: 0.1s; +} +.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(1), +.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(5), +.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(9) { + animation-delay: 0.2s; +} +.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(2), +.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(6) { + animation-delay: 0.3s; +} +.loading-next .loading-next-box-warp .loading-next-box-item:nth-child(3) { + animation-delay: 0.4s; +} +@keyframes loading-next-animation { + 0%, + 70%, + 100% { + transform: scale3D(1, 1, 1); + } + 35% { + transform: scale3D(0, 0, 1); + } +} diff --git a/src/components/SelectTable/indexbox.vue b/src/components/SelectTable/checkbox.vue similarity index 52% rename from src/components/SelectTable/indexbox.vue rename to src/components/SelectTable/checkbox.vue index 41e43b2f..e357d7db 100644 --- a/src/components/SelectTable/indexbox.vue +++ b/src/components/SelectTable/checkbox.vue @@ -1,5 +1,5 @@ diff --git a/src/views/profile/DeviceTrigger/profile/conditionTemp.vue b/src/views/profile/DeviceTrigger/profile/conditionTemp.vue index 7dfd90d1..57568b77 100644 --- a/src/views/profile/DeviceTrigger/profile/conditionTemp.vue +++ b/src/views/profile/DeviceTrigger/profile/conditionTemp.vue @@ -1,17 +1,27 @@