|
|
@ -7,7 +7,17 @@ |
|
|
|
<ElTabPane label="详细设计" name="first"> |
|
|
|
<Descriptions :list="list" :data="data" style="gap: 18px" /> |
|
|
|
</ElTabPane> |
|
|
|
<ElTabPane label="设备参数" name="second">设备参数</ElTabPane> |
|
|
|
<ElTabPane label="设备参数" name="second"> |
|
|
|
<Descriptions :list="devicesList" style="gap: 18px"> |
|
|
|
<template #content-electricity> |
|
|
|
<span>1000mA</span> |
|
|
|
<Switcher class="switcher" :activeOption="activeOption" /> |
|
|
|
</template> |
|
|
|
<template #content-voltage> |
|
|
|
<Switcher class="switcher" :activeOption="activeOption" /> |
|
|
|
</template> |
|
|
|
</Descriptions> |
|
|
|
</ElTabPane> |
|
|
|
<ElTabPane label="在线统计率" name="third"> |
|
|
|
<LineChart v-if="activeName === 'third'" /> |
|
|
|
</ElTabPane> |
|
|
@ -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(); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang='scss'> |
|
|
|
div.switcher { |
|
|
|
font-size: 12px; |
|
|
|
padding: 2px; |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style lang='scss' scoped> |
|
|
|
.SmartDevice { |
|
|
|
width: 600px; |
|
|
|
width: 510px; |
|
|
|
height: 240px; |
|
|
|
color: #fff; |
|
|
|
display: flex; |
|
|
|