|
|
@@ -5,6 +5,8 @@
|
|
|
>
|
|
|
<div
|
|
|
ref="box"
|
|
|
+ v-loading="!loaded && loading"
|
|
|
+ element-loading-background="transparent"
|
|
|
class="l-flex__fill l-flex--row center jcenter"
|
|
|
>
|
|
|
<div
|
|
|
@@ -16,11 +18,11 @@
|
|
|
<div
|
|
|
v-for="item in items"
|
|
|
:key="item.key"
|
|
|
- :class="['co', item.key]"
|
|
|
- :style="getImg(item.key)"
|
|
|
+ class="co"
|
|
|
+ :class="item.className"
|
|
|
>
|
|
|
<div
|
|
|
- v-if="Array.isArray(item.label)"
|
|
|
+ v-if="item.multiLines"
|
|
|
class="ctext"
|
|
|
>
|
|
|
<div>{{ item.label[0] }}</div>
|
|
|
@@ -32,37 +34,25 @@
|
|
|
>
|
|
|
{{ item.label }}
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="co led"
|
|
|
- :class="{ mini: !fullscreen }"
|
|
|
- >
|
|
|
<device-player
|
|
|
+ v-if="item.key === 'led'"
|
|
|
:device="device"
|
|
|
autoplay
|
|
|
/>
|
|
|
- <div class="ctext">LED大屏</div>
|
|
|
+ <svg-icon
|
|
|
+ v-else
|
|
|
+ class="c-device-dashboard-link-state__img"
|
|
|
+ :icon-class="item.icon"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div
|
|
|
v-for="line in lines"
|
|
|
:key="line.key"
|
|
|
- :class="[
|
|
|
- 'line',
|
|
|
- line.type,
|
|
|
- line.class,
|
|
|
- {
|
|
|
- closed:
|
|
|
- lineToItem[line.key] &&
|
|
|
- linkStateForm[lineToItem[line.key]] !== 0,
|
|
|
- trafficCameraUnbound:
|
|
|
- line.key === 5 && linkStateForm.trafficCamera === 2,
|
|
|
- },
|
|
|
- ]"
|
|
|
+ class="line"
|
|
|
+ :class="line.className"
|
|
|
>
|
|
|
<svg
|
|
|
- v-if="
|
|
|
- lineToItem[line.key] && linkStateForm[lineToItem[line.key]] === 0
|
|
|
- "
|
|
|
+ v-if="line.linked"
|
|
|
class="svg"
|
|
|
>
|
|
|
<polyline
|
|
|
@@ -111,11 +101,72 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import videoPoster from '@/assets/image_no_program.svg'
|
|
|
import { getBoundThirdPartyDevices } from '@/api/external'
|
|
|
-import { ScreenshotCache } from '@/utils/cache'
|
|
|
+import { ThirdPartyDevice } from '@/constant'
|
|
|
import Box from './Box'
|
|
|
|
|
|
+const LinkItems = Object.freeze([
|
|
|
+ {
|
|
|
+ key: 'msr',
|
|
|
+ label: '浪潮屏媒安播云平台'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'device',
|
|
|
+ label: ['浪潮超高清', '媒体播控器'],
|
|
|
+ multiLines: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'led',
|
|
|
+ label: 'LED大屏'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: ThirdPartyDevice.GATEWAY,
|
|
|
+ alias: 'gateway',
|
|
|
+ label: '浪潮物联网关',
|
|
|
+ iconKey: 'gateway',
|
|
|
+ canClick: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: ThirdPartyDevice.TRAFFIC_CAMERA,
|
|
|
+ alias: 'traffic_camera',
|
|
|
+ label: '人流量监测摄像头',
|
|
|
+ iconKey: 'camera',
|
|
|
+ canClick: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: ThirdPartyDevice.LED_CAMERA,
|
|
|
+ alias: 'led_camera',
|
|
|
+ label: 'LED屏监测摄像头',
|
|
|
+ iconKey: 'camera',
|
|
|
+ canClick: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: ThirdPartyDevice.SENDING_CARD,
|
|
|
+ alias: 'sending_card',
|
|
|
+ label: '发送控制设备',
|
|
|
+ iconKey: 'sending-card',
|
|
|
+ canClick: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: ThirdPartyDevice.RECEIVING_CARD,
|
|
|
+ alias: 'receiving_card',
|
|
|
+ label: '接收卡',
|
|
|
+ iconKey: 'receiving-card',
|
|
|
+ canClick: true
|
|
|
+ }
|
|
|
+])
|
|
|
+
|
|
|
+const LineFromeTo = {
|
|
|
+ 1: ['msr', 'device'],
|
|
|
+ 2: ['device', ThirdPartyDevice.SENDING_CARD],
|
|
|
+ 3: [ThirdPartyDevice.SENDING_CARD, ThirdPartyDevice.RECEIVING_CARD],
|
|
|
+ 4: ['msr', ThirdPartyDevice.GATEWAY, ThirdPartyDevice.LED_CAMERA, ThirdPartyDevice.TRAFFIC_CAMERA],
|
|
|
+ 5: ['msr', ThirdPartyDevice.TRAFFIC_CAMERA],
|
|
|
+ 6: ['msr', ThirdPartyDevice.LED_CAMERA],
|
|
|
+ 7: [ThirdPartyDevice.GATEWAY, 'led'],
|
|
|
+ 8: [ThirdPartyDevice.RECEIVING_CARD, 'led']
|
|
|
+}
|
|
|
+
|
|
|
export default {
|
|
|
name: 'LinkState',
|
|
|
components: {
|
|
|
@@ -130,204 +181,181 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
fullscreen: false,
|
|
|
- poster: videoPoster,
|
|
|
scale: 1,
|
|
|
- items: [
|
|
|
- {
|
|
|
- label: '浪潮屏媒安播云平台',
|
|
|
- key: 'msr'
|
|
|
- },
|
|
|
- {
|
|
|
- label: ['浪潮超高清媒体', '播控器'],
|
|
|
- key: 'device'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '浪潮物联网关',
|
|
|
- key: 'gateway'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '发送控制设备',
|
|
|
- key: 'sending_device'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '人流量监测',
|
|
|
- key: 'trafficCamera'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'LED屏画面监测',
|
|
|
- key: 'ledCamera'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '接收卡',
|
|
|
- key: 'receive_card'
|
|
|
- }
|
|
|
- // {
|
|
|
- // label: 'LED大屏',
|
|
|
- // key: 'led'
|
|
|
- // }
|
|
|
- ],
|
|
|
- lineToItem: {
|
|
|
- 1: 'msr',
|
|
|
- 2: 'device',
|
|
|
- 3: 'sending_device',
|
|
|
- 8: 'receive_card',
|
|
|
- 4: 'msr',
|
|
|
- 7: 'gateway',
|
|
|
- 5: 'trafficCamera',
|
|
|
- 6: 'ledCamera'
|
|
|
- },
|
|
|
- linkStateForm: {
|
|
|
- // 0 开启 1 关闭 2未绑定
|
|
|
- msr: 0,
|
|
|
- device: 0,
|
|
|
- gateway: 0,
|
|
|
- sending_device: 0,
|
|
|
- ledCamera: 0,
|
|
|
- trafficCamera: 0,
|
|
|
- receive_card: 0,
|
|
|
- led: 0
|
|
|
- },
|
|
|
+ loading: false,
|
|
|
loaded: false,
|
|
|
- base64: null
|
|
|
+ linkDeviceMap: null
|
|
|
}
|
|
|
},
|
|
|
- // created () {
|
|
|
- // ScreenshotCache.watch(this.device, this.onScreenshotUpdate, 10000)
|
|
|
- // },
|
|
|
computed: {
|
|
|
scaleStyle () {
|
|
|
return this.fullscreen
|
|
|
? null
|
|
|
: { transform: `scale(${this.scale})` }
|
|
|
},
|
|
|
- lines () {
|
|
|
- return Array.from({ length: 8 }, (v, index) => {
|
|
|
- // M4,0 L4,95
|
|
|
- let map
|
|
|
- if (this.fullscreen) {
|
|
|
- map = [
|
|
|
- {
|
|
|
- points: '0,4 150,4',
|
|
|
- path: 'M0,4 L150,4',
|
|
|
- length: 150,
|
|
|
- animation: this.getAnimation(150)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '0,4 150,4',
|
|
|
- path: 'M0,4 L150,4',
|
|
|
- length: 150,
|
|
|
- animation: this.getAnimation(150)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '0,4 150,4',
|
|
|
- path: 'M0,4 L150,4',
|
|
|
- length: 150,
|
|
|
- animation: this.getAnimation(150)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '4,0 4,137',
|
|
|
- path: 'M4,0 L4,137',
|
|
|
- type: 'col',
|
|
|
- length: 137,
|
|
|
- animation: this.getAnimation(137)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '0,50 350,50 350,0 400,0',
|
|
|
- path: 'M0,50 L350,50 L350 0 L400,0',
|
|
|
- type: 'polygon',
|
|
|
- length: 450,
|
|
|
- animation: this.getAnimation(450)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '0,51 350,51 350,100 400,100',
|
|
|
- path: 'M0,51 L350,51 L350,100 L400,100',
|
|
|
- type: 'polygon',
|
|
|
- length: 449,
|
|
|
- animation: this.getAnimation(449)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '0,4 494,4',
|
|
|
- path: 'M0,4 L494,4',
|
|
|
- length: 494,
|
|
|
- animation: this.getAnimation(494)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '4,0 4,78',
|
|
|
- path: 'M4,0 L4,78',
|
|
|
- type: 'col',
|
|
|
- length: 78,
|
|
|
- animation: this.getAnimation(78)
|
|
|
- }
|
|
|
- ]
|
|
|
- } else {
|
|
|
- map = [
|
|
|
- {
|
|
|
- points: '0,4 22,4',
|
|
|
- path: 'M0,4 L22,4',
|
|
|
- length: 22,
|
|
|
- animation: this.getAnimation(22)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '0,4 22,4',
|
|
|
- path: 'M0,4 L22,4',
|
|
|
- length: 22,
|
|
|
- animation: this.getAnimation(22)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '0,4 22,4',
|
|
|
- path: 'M0,4 L22,4',
|
|
|
- length: 22,
|
|
|
- animation: this.getAnimation(22)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '4,0 4,95',
|
|
|
- path: 'M4,0 L4,95',
|
|
|
- type: 'col',
|
|
|
- length: 95,
|
|
|
- animation: this.getAnimation(95)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '0,18 80,18 80 0 105 0',
|
|
|
- path: 'M0,18 L80,18 L80 0 L105 0',
|
|
|
- type: 'polygon',
|
|
|
- length: 123,
|
|
|
- animation: this.getAnimation(123)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '0,19 80,19 80 36 105 36',
|
|
|
- path: 'M0,19 L80,19 L80 36 L105 36',
|
|
|
- type: 'polygon',
|
|
|
- length: 122,
|
|
|
- animation: this.getAnimation(122)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '0,4 119,4',
|
|
|
- path: 'M0,4 L119,4',
|
|
|
- length: 119,
|
|
|
- animation: this.getAnimation(119)
|
|
|
- },
|
|
|
- {
|
|
|
- points: '4,0 4,92',
|
|
|
- path: 'M4,0 L4,92',
|
|
|
- type: 'col',
|
|
|
- length: 92,
|
|
|
- animation: this.getAnimation(92)
|
|
|
- }
|
|
|
- ]
|
|
|
+ online () {
|
|
|
+ return this.device.activate === 2 && this.device.onlineStatus === 1
|
|
|
+ },
|
|
|
+ linkState () {
|
|
|
+ const map = {
|
|
|
+ msr: 1,
|
|
|
+ device: this.online ? 1 : 0,
|
|
|
+ led: this.online ? 1 : 0,
|
|
|
+ [ThirdPartyDevice.GATEWAY]: -1,
|
|
|
+ [ThirdPartyDevice.LED_CAMERA]: -1,
|
|
|
+ [ThirdPartyDevice.TRAFFIC_CAMERA]: -1,
|
|
|
+ [ThirdPartyDevice.SENDING_CARD]: -1,
|
|
|
+ [ThirdPartyDevice.RECEIVING_CARD]: -1
|
|
|
+ }
|
|
|
+ if (this.linkDeviceMap) {
|
|
|
+ for (const item of this.linkDeviceMap) {
|
|
|
+ map[item.deviceType] = item.status
|
|
|
}
|
|
|
-
|
|
|
+ }
|
|
|
+ return map
|
|
|
+ },
|
|
|
+ items () {
|
|
|
+ const map = this.linkState
|
|
|
+ return LinkItems.map(({ key, alias, label, iconKey, multiLines }) => {
|
|
|
+ const status = map[key]
|
|
|
return {
|
|
|
- key: index + 1,
|
|
|
- class: `l${index + 1}`,
|
|
|
- ...map[index]
|
|
|
+ key, label, status, multiLines,
|
|
|
+ icon: status === -1
|
|
|
+ ? 'link-unbound'
|
|
|
+ : `link-${iconKey || key}-${status === 1 ? 'online' : 'offline'}`,
|
|
|
+ className: alias || key
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ lines () {
|
|
|
+ const map = this.fullscreen
|
|
|
+ ? [
|
|
|
+ null,
|
|
|
+ {
|
|
|
+ points: '0,4 150,4',
|
|
|
+ path: 'M0,4 L150,4',
|
|
|
+ length: 150,
|
|
|
+ animation: this.getAnimation(150)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '0,4 150,4',
|
|
|
+ path: 'M0,4 L150,4',
|
|
|
+ length: 150,
|
|
|
+ animation: this.getAnimation(150)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '0,4 150,4',
|
|
|
+ path: 'M0,4 L150,4',
|
|
|
+ length: 150,
|
|
|
+ animation: this.getAnimation(150)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '4,0 4,137',
|
|
|
+ path: 'M4,0 L4,137',
|
|
|
+ type: 'col',
|
|
|
+ length: 137,
|
|
|
+ animation: this.getAnimation(137)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '0,50 350,50 350,0 400,0',
|
|
|
+ path: 'M0,50 L350,50 L350 0 L400,0',
|
|
|
+ type: 'polygon',
|
|
|
+ length: 450,
|
|
|
+ animation: this.getAnimation(450)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '0,51 350,51 350,100 400,100',
|
|
|
+ path: 'M0,51 L350,51 L350,100 L400,100',
|
|
|
+ type: 'polygon',
|
|
|
+ length: 449,
|
|
|
+ animation: this.getAnimation(449)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '0,4 494,4',
|
|
|
+ path: 'M0,4 L494,4',
|
|
|
+ length: 494,
|
|
|
+ animation: this.getAnimation(494)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '4,0 4,78',
|
|
|
+ path: 'M4,0 L4,78',
|
|
|
+ type: 'col',
|
|
|
+ length: 78,
|
|
|
+ animation: this.getAnimation(78)
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ : [
|
|
|
+ null,
|
|
|
+ {
|
|
|
+ points: '0,4 22,4',
|
|
|
+ path: 'M0,4 L22,4',
|
|
|
+ length: 22,
|
|
|
+ animation: this.getAnimation(22)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '0,4 22,4',
|
|
|
+ path: 'M0,4 L22,4',
|
|
|
+ length: 22,
|
|
|
+ animation: this.getAnimation(22)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '0,4 22,4',
|
|
|
+ path: 'M0,4 L22,4',
|
|
|
+ length: 22,
|
|
|
+ animation: this.getAnimation(22)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '4,0 4,95',
|
|
|
+ path: 'M4,0 L4,95',
|
|
|
+ type: 'col',
|
|
|
+ length: 95,
|
|
|
+ animation: this.getAnimation(95)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '0,18 80,18 80 0 105 0',
|
|
|
+ path: 'M0,18 L80,18 L80 0 L105 0',
|
|
|
+ type: 'polygon',
|
|
|
+ length: 123,
|
|
|
+ animation: this.getAnimation(123)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '0,19 80,19 80 36 105 36',
|
|
|
+ path: 'M0,19 L80,19 L80 36 L105 36',
|
|
|
+ type: 'polygon',
|
|
|
+ length: 122,
|
|
|
+ animation: this.getAnimation(122)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '0,4 119,4',
|
|
|
+ path: 'M0,4 L119,4',
|
|
|
+ length: 119,
|
|
|
+ animation: this.getAnimation(119)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ points: '4,0 4,92',
|
|
|
+ path: 'M4,0 L4,92',
|
|
|
+ type: 'col',
|
|
|
+ length: 92,
|
|
|
+ animation: this.getAnimation(92)
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ const state = this.linkState
|
|
|
+ return Object.keys(LineFromeTo).map(key => {
|
|
|
+ const from = LineFromeTo[key][0]
|
|
|
+ const to = LineFromeTo[key].slice(1)
|
|
|
+ const linked = state[from] === 1 && to.some(key => state[key] === 1)
|
|
|
+ return {
|
|
|
+ ...map[key],
|
|
|
+ linked,
|
|
|
+ key: `line${key}`,
|
|
|
+ className: [`l${key}`, linked ? '' : 'closed'].join(' ')
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
- // this.getBoundThirdPartyDevices();
|
|
|
- this.loaded = true
|
|
|
- ScreenshotCache.watch(this.device, this.onScreenshotUpdate, 60 * 60 * 1000)
|
|
|
+ this.getBoundThirdPartyDevices()
|
|
|
+ this.$timer = setInterval(this.getBoundThirdPartyDevices, 10000)
|
|
|
},
|
|
|
mounted () {
|
|
|
this.onFullscreen(this.fullscreen)
|
|
|
@@ -336,107 +364,26 @@ export default {
|
|
|
this.scale = Math.min(278 / width, 244 / height)
|
|
|
},
|
|
|
beforeDestroy () {
|
|
|
- ScreenshotCache.unwatch(this.device.id)
|
|
|
+ clearInterval(this.$timer)
|
|
|
},
|
|
|
methods: {
|
|
|
onFullscreen (fullscreen) {
|
|
|
this.fullscreen = fullscreen
|
|
|
},
|
|
|
getAnimation (length, gap, dur = 2, mode = 'linear') {
|
|
|
- // let style = {
|
|
|
- // strokeDasharray: undefined,
|
|
|
- // strokeDashoffset: undefined,
|
|
|
- // animation: undefined,
|
|
|
- // };
|
|
|
- // let str = "",
|
|
|
- // i = 0;
|
|
|
- // gap = 4;
|
|
|
- // while (i + gap <= length) {
|
|
|
- // i = i + gap;
|
|
|
- // str = str + gap + "px ";
|
|
|
- // }
|
|
|
- // str = str + length + "px";
|
|
|
- // style.strokeDasharray = str;
|
|
|
- // style.strokeDashoffset = length + "px";
|
|
|
- // style.animation = `${dur}s linkLength${length} ${mode} infinite`;
|
|
|
- // return style;
|
|
|
return `${dur}s linkLength${length} ${mode} infinite`
|
|
|
},
|
|
|
- onScreenshotUpdate ({ waiting, base64 }) {
|
|
|
- if (!waiting) {
|
|
|
- this.base64 = base64
|
|
|
- }
|
|
|
- },
|
|
|
getBoundThirdPartyDevices () {
|
|
|
- getBoundThirdPartyDevices(this.device.id, true)
|
|
|
- .then(({ data, success }) => {
|
|
|
- if (!success) {
|
|
|
- return
|
|
|
- }
|
|
|
- const map = {
|
|
|
- 0: 'gateway',
|
|
|
- 1: 'receive_card',
|
|
|
- 2: 'sending_device',
|
|
|
- // 3: 'led'
|
|
|
- 4: 'ledCamera',
|
|
|
- 5: 'trafficCamera'
|
|
|
- }
|
|
|
- const form = {
|
|
|
- device:
|
|
|
- this.device.onlineStatus === 1 && this.device.activate === 2
|
|
|
- ? 0
|
|
|
- : 1,
|
|
|
- gateway: 2,
|
|
|
- sending_device: 2,
|
|
|
- ledCamera: 2,
|
|
|
- trafficCamera: 2,
|
|
|
- receive_card: 2,
|
|
|
- led:
|
|
|
- this.device.onlineStatus === 1 && this.device.activate === 2
|
|
|
- ? 0
|
|
|
- : 1,
|
|
|
- msr: 0
|
|
|
- }
|
|
|
- for (const item of data) {
|
|
|
- form[map[item.deviceType]] = item.status === 1 ? 0 : 1
|
|
|
- }
|
|
|
- this.linkStateForm = form
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.log('err', err)
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- this.loaded = true
|
|
|
- })
|
|
|
- },
|
|
|
- getImg (key) {
|
|
|
- const value = this.linkStateForm[key]
|
|
|
- let background = ''
|
|
|
- let params = {}
|
|
|
- switch (key) {
|
|
|
- case 'msr':
|
|
|
- background = `url("${require('@/assets/linkState/icon_msr.svg')}")`
|
|
|
- break
|
|
|
- case 'led':
|
|
|
- value === 0
|
|
|
- ? (background = `url("${
|
|
|
- this.base64
|
|
|
- ? this.base64
|
|
|
- : require('@/assets/image_no_program.svg')
|
|
|
- }")`)
|
|
|
- : (params = { backgroundColor: '#333333' })
|
|
|
- break
|
|
|
- default:
|
|
|
- if (value === 2) {
|
|
|
- background = `url("${require('@/assets/linkState/icon_unbound.svg')}")`
|
|
|
- } else {
|
|
|
- background = `url("${require(`@/assets/linkState/icon_${
|
|
|
- key === 'trafficCamera' || key === 'ledCamera' ? 'camera' : key
|
|
|
- }_${value === 0 ? 'online' : 'offline'}.svg`)}")`
|
|
|
- }
|
|
|
- break
|
|
|
+ if (this.loading) {
|
|
|
+ return
|
|
|
}
|
|
|
- return { backgroundImage: background, ...params }
|
|
|
+ this.loading = true
|
|
|
+ getBoundThirdPartyDevices(this.device.id, true).then(({ data }) => {
|
|
|
+ this.linkDeviceMap = data
|
|
|
+ this.loaded = true
|
|
|
+ }).finally(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -456,6 +403,11 @@ export default {
|
|
|
height: 244px;
|
|
|
transform-origin: center;
|
|
|
|
|
|
+ &__img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
.co {
|
|
|
position: absolute;
|
|
|
background-position: center;
|
|
|
@@ -520,22 +472,22 @@ export default {
|
|
|
}
|
|
|
|
|
|
.msr {
|
|
|
- @include getPosition(0, 0, 90px, 90px);
|
|
|
+ @include getPosition(0, 0, 92px, 92px);
|
|
|
}
|
|
|
|
|
|
.device {
|
|
|
- @include getPosition(108px, 37px, 40px, 40px);
|
|
|
+ @include getPosition(108px, 32px, 44px, 48px);
|
|
|
}
|
|
|
|
|
|
- .sending_device {
|
|
|
- @include getPosition(176px, 37px, 40px, 40px);
|
|
|
+ .sending_card {
|
|
|
+ @include getPosition(176px, 32px, 44px, 48px);
|
|
|
}
|
|
|
|
|
|
- .receive_card {
|
|
|
- @include getPosition(234px, 33px, 45px, 45px);
|
|
|
+ .receiving_card {
|
|
|
+ @include getPosition(234px, 32px, 44px, 48px);
|
|
|
}
|
|
|
|
|
|
- .trafficCamera {
|
|
|
+ .traffic_camera {
|
|
|
@include getPosition(141px, 107px, 40px, 40px);
|
|
|
|
|
|
.ctext {
|
|
|
@@ -544,7 +496,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .ledCamera {
|
|
|
+ .led_camera {
|
|
|
@include getPosition(141px, 145px, 40px, 40px);
|
|
|
|
|
|
.ctext {
|
|
|
@@ -559,14 +511,6 @@ export default {
|
|
|
|
|
|
.led {
|
|
|
@include getPosition(182px, 168px, 96px, 54px);
|
|
|
-
|
|
|
- &.mini {
|
|
|
- ::v-deep .o-video__btn {
|
|
|
- width: 32px;
|
|
|
- height: 32px;
|
|
|
- font-size: 24px;
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
.l1 {
|
|
|
@@ -641,15 +585,15 @@ export default {
|
|
|
@include getPosition(389px, 118px, 90px, 90px);
|
|
|
}
|
|
|
|
|
|
- .sending_device {
|
|
|
+ .sending_card {
|
|
|
@include getPosition(622px, 118px, 90px, 90px);
|
|
|
}
|
|
|
|
|
|
- .receive_card {
|
|
|
+ .receiving_card {
|
|
|
@include getPosition(854px, 118px, 90px, 90px);
|
|
|
}
|
|
|
|
|
|
- .trafficCamera {
|
|
|
+ .traffic_camera {
|
|
|
@include getPosition(511px, 213px, 90px, 90px);
|
|
|
|
|
|
.ctext {
|
|
|
@@ -657,7 +601,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .ledCamera {
|
|
|
+ .led_camera {
|
|
|
@include getPosition(511px, 308px, 90px, 90px);
|
|
|
|
|
|
.ctext {
|