同步地区组件

This commit is contained in:
aixianling
2022-03-17 11:03:48 +08:00
parent 36ff4ab3e1
commit 38b9f8f3c8
2 changed files with 32 additions and 25 deletions

View File

@@ -131,12 +131,12 @@ export default {
obj.select('#areaSelector').boundingClientRect() obj.select('#areaSelector').boundingClientRect()
obj.exec(rect => { obj.exec(rect => {
if (rect.length) { if (rect.length) {
this.height = `calc(100% - ${rect[0].height}px)` this.height = `calc(100% - ${rect[0]?.height}px)`
} }
}) })
}, },
getFullArea(areaId) { getFullArea(areaId) {
return areaId && this.$http.post('/admin/area/getAllParentAreaId', null, { return areaId && this.$instance.post('/admin/area/getAllParentAreaId', null, {
withoutToken: true, withoutToken: true,
params: {areaId}, params: {areaId},
}).then((res) => { }).then((res) => {
@@ -327,6 +327,8 @@ export default {
} }
::v-deep .pendingList { ::v-deep .pendingList {
height: 500px;
overflow-y: auto;
padding: 0 32px 120px; padding: 0 32px 120px;
box-sizing: border-box; box-sizing: border-box;

View File

@@ -1,11 +1,9 @@
<template> <template>
<section class="videoSurveillance"> <section class="videoSurveillance">
<div class="area-content"> <div class="area-content">
<AiAreaPicker class="ai-area" :value="areaId" :areaId="areaId" :name.sync="areaName" @select="areaSelect"> <AiAreaPicker class="ai-area" :name.sync="areaName" @select="areaSelect">
<div class="ai-area__wrapper"> <div class="ai-area__wrapper">
<span class="label" v-if="areaName">{{ areaName }}</span> <u-icon name="arrow-down" color="#666" size="24" :label="areaName||'请选择'" label-pos="left" label-size="40"/>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#666" size="24"></u-icon>
</div> </div>
</AiAreaPicker> </AiAreaPicker>
</div> </div>
@@ -30,8 +28,11 @@
<img class="img" :src="item.indexUrl" alt="" v-if="item.deviceStatus == 1"/> <img class="img" :src="item.indexUrl" alt="" v-if="item.deviceStatus == 1"/>
<img class="img" src="https://cdn.cunwuyun.cn/dvcp/AppVideoSurve/offline.png" alt="" v-else/> <img class="img" src="https://cdn.cunwuyun.cn/dvcp/AppVideoSurve/offline.png" alt="" v-else/>
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
<img class="icon" src="https://cdn.cunwuyun.cn/dvcp/AppVideoSurve/https://cdn.cunwuyun.cn/dvcp/AppVideoSurve" alt="" v-if="item.deviceStatus == 1" /> <img class="icon" src="https://cdn.cunwuyun.cn/dvcp/AppVideoSurve/https://cdn.cunwuyun.cn/dvcp/AppVideoSurve"
<img class="icon" src="https://cdn.cunwuyun.cn/dvcp/AppVideoSurve/not-https://cdn.cunwuyun.cn/dvcp/AppVideoSurve" alt="" v-else /> alt="" v-if="item.deviceStatus == 1"/>
<img class="icon"
src="https://cdn.cunwuyun.cn/dvcp/AppVideoSurve/not-https://cdn.cunwuyun.cn/dvcp/AppVideoSurve" alt=""
v-else/>
</div> </div>
<AiEmpty v-if="!list.length"/> <AiEmpty v-if="!list.length"/>
</div> </div>
@@ -59,7 +60,8 @@ export default {
} }
}, },
computed: {...mapState(['user'])}, computed: {...mapState(['user'])},
onLoad() {}, onLoad() {
},
onShow() { onShow() {
this.areaId = this.$areaId this.areaId = this.$areaId
this.areaName = this.$areaName this.areaName = this.$areaName
@@ -123,10 +125,12 @@ export default {
background: #fff; background: #fff;
padding: 0 32px; padding: 0 32px;
height: 100%; height: 100%;
.area-content { .area-content {
.ai-area { .ai-area {
.ai-area__wrapper { .ai-area__wrapper {
padding: 28px 0; padding: 28px 0;
.label { .label {
font-size: 40px; font-size: 40px;
font-weight: 600; font-weight: 600;
@@ -219,6 +223,7 @@ export default {
left: 158px; left: 158px;
} }
} }
.item:nth-child(2n + 0) { .item:nth-child(2n + 0) {
margin-left: 3.5%; margin-left: 3.5%;
} }