From fa7734ec006ad89865582c83b8f02b55d7d2ead2 Mon Sep 17 00:00:00 2001 From: Joe <1712833832@qq.com> Date: Tue, 30 Jan 2024 17:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=B1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Descriptions.vue | 1 + .../components/FormConfig/components/Text.vue | 6 +- .../components/Dialogs/SmartDevice/index.vue | 94 ++++++++++++++++++- .../components/Switcher.vue | 1 - 4 files changed, 95 insertions(+), 7 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue index 1e683c3b..f8730268 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue @@ -146,6 +146,7 @@ export default { .content { flex: 1; + gap: 6px; } } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue index a8a86879..403be982 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue @@ -52,5 +52,9 @@ export default { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue index dc1ff5b7..57623b5f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue @@ -7,7 +7,17 @@ - 设备参数 + + + + + + @@ -22,9 +32,11 @@ import Button from "@screen/components/Buttons/Button.vue" import Descriptions from '@screen/components/Descriptions.vue'; import Video from "@screen/components/Video" import LineChart from './components/LineChart/index.vue'; +import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue'; import { getRoadInfoByStakeMark, getOrganizationName, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" import { dialogDelayVisible } from "./../mixin" +import request from "@/utils/request"; // 广播发布 export default { @@ -35,7 +47,8 @@ export default { Button, Descriptions, LineChart, - Video + Video, + Switcher }, data() { return { @@ -77,12 +90,60 @@ export default { label: '设备厂商', key: "brand", }, + ], + activeOption: { + active: { + text: "开" + }, + unActive: { + text: "关" + } + }, + devicesList: [ + { + label: '支路1(220v) 电压', + key: "deviceName1", + text: "120v" + }, + { + label: '电流', + key: "electricity", + text: "1000mA" + }, + { + label: '支路2(220v) 电压', + key: "deviceName11", + text: "120v" + }, + { + label: '电流', + key: "electricity", + text: "1000mA" + }, + { + label: '支路3(220v) 电压', + key: "deviceName1", + text: "120v" + }, + { + label: '电流', + key: "electricity", + text: "1000mA" + }, + { + label: '电压', + key: "voltage", + text: "1000mA" + }, ] } }, async created() { this.data = { ...this.dialogData, roadName: null } + console.log("%c [ dialogData ]-103-「index.vue」", "font-size:15px; background:#36347c; color:#7a78c0;", this.dialogData); + + getProduct(this.dialogData.productId) .then(data => { this.dialogData.brand = data.brand; @@ -94,19 +155,42 @@ export default { }) const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark); - console.log("%c [ roadInfo ]-103-「index.vue」", "font-size:15px; background:#36347c; color:#7a78c0;", roadInfo.roadName); if (roadInfo) this.data.roadName = roadInfo.roadName; }, methods: { - handleClickTabs() { } + handleClickTabs() { }, + deviceFunEnable() { + request({ + url: `/business/device/functions/${this.dialogData.iotDeviceId}/${102}`, + method: "get", + params: { + // https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc= + deviceName: "", + // 开关:1=打开,0=关闭 + value: "" + } + }).then(result => { + if (result.code != 200) return; + this.data = result.rows; + this.total = result.total; + }).finally(() => { + closeLoading(); + }) + } } } +