|
@@ -10,34 +10,32 @@
|
|
|
</cu-custom>
|
|
|
<My_listbox ref="List" :pullDown="false" @getlist="loadData">
|
|
|
<view class="head">
|
|
|
- <view class="name">{{ detail.devicename }}</view>
|
|
|
- <view class="row">
|
|
|
- 设备编号:{{ detail.serialnumber || ' --' }}
|
|
|
+ <view class="name">
|
|
|
+ <text class="status" :style="{ backgroundColor: detail.bgColor }">{{ detail.status
|
|
|
+ }}</text>
|
|
|
+ {{ detail.devicename }}
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
- 设备状态:<text class="status">{{ detail.status }}</text>
|
|
|
- </view>
|
|
|
- <view class="row">
|
|
|
- 区域:{{ (detail.province + detail.city + detail.county) || ' --' }}
|
|
|
- </view>
|
|
|
- <view class="row">
|
|
|
- 设备地址:{{ detail.address || ' --' }}
|
|
|
+ 设备编号:{{ detail.serialnumber || ' --' }}
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
- 注册时间:{{ detail.createdate || ' --' }}
|
|
|
+ 最近上线时间:{{ detail.lastconnecttime || ' --' }}
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="image">
|
|
|
图片预留区域
|
|
|
</view>
|
|
|
- <horizontal-direction ref="hd" />
|
|
|
- <view class="tabs" :style="{ top: tovw(CustomBar) }">
|
|
|
+ <view class="ceiling" :style="{ top: tovw(CustomBar) }">
|
|
|
+ <horizontal-direction ref="hd" />
|
|
|
+ </view>
|
|
|
+ <view class="ceiling" :style="{ top: tovw(CustomBar + tabsTop) }">
|
|
|
<tabs :tabs="tabs" @changeTab="changeTab" />
|
|
|
</view>
|
|
|
+ <control ref="设备控制" :detail="detail" />
|
|
|
+ <daily-record ref="设备日志" :w_deviceid="w_deviceid" />
|
|
|
<preview ref="详情信息" :detail="detail" />
|
|
|
- <queue ref="操作队列" :w_deviceid="detail.w_deviceid" />
|
|
|
- <record ref="操作记录" :w_deviceid="detail.w_deviceid" />
|
|
|
+
|
|
|
<view style="height: 30px;" />
|
|
|
</My_listbox>
|
|
|
</view>
|
|
@@ -47,25 +45,26 @@
|
|
|
import horizontalDirection from "./modules/horizontalDirection.vue"
|
|
|
import tabs from "./modules/tabs.vue"
|
|
|
import preview from "./modules/preview.vue"
|
|
|
-import record from "./modules/record.vue"
|
|
|
-import queue from "./modules/queue.vue"
|
|
|
+import dailyRecord from "./modules/dailyRecord.vue"
|
|
|
+import control from "./modules/control.vue"
|
|
|
|
|
|
let page = {};
|
|
|
export default {
|
|
|
- components: { horizontalDirection, tabs, preview, record, queue },
|
|
|
+ components: { horizontalDirection, tabs, preview, dailyRecord, control },
|
|
|
name: "facilityD",
|
|
|
data() {
|
|
|
return {
|
|
|
CustomBar: 0,
|
|
|
+ tabsTop: 0,
|
|
|
w_deviceid: 0,
|
|
|
detail: {},
|
|
|
- showTab: '详情信息',
|
|
|
+ showTab: '设备控制',
|
|
|
tabs: [{
|
|
|
- name: '详情信息'
|
|
|
+ name: '设备控制'
|
|
|
}, {
|
|
|
- name: '操作队列',
|
|
|
+ name: '设备日志'
|
|
|
}, {
|
|
|
- name: '操作记录'
|
|
|
+ name: '详情信息'
|
|
|
}]
|
|
|
}
|
|
|
},
|
|
@@ -74,7 +73,6 @@ export default {
|
|
|
this.getDetail(true)
|
|
|
},
|
|
|
mounted() {
|
|
|
- // this.$refs.Dustom.CustomBar
|
|
|
this.CustomBar = -10;
|
|
|
this.$refs.List.setHeight();
|
|
|
},
|
|
@@ -88,9 +86,20 @@ export default {
|
|
|
}).then(res => {
|
|
|
console.log("设备详情", res)
|
|
|
if (this.cutoff(res.msg)) return;
|
|
|
+ switch (res.data.status) {
|
|
|
+ case '在线':
|
|
|
+ res.data.bgColor = "#007aff";
|
|
|
+ break;
|
|
|
+ case '禁用':
|
|
|
+ res.data.bgColor = "#F56C6C";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ res.data.bgColor = "#F9AE3D";
|
|
|
+ break;
|
|
|
+ }
|
|
|
this.detail = res.data;
|
|
|
if (init) {
|
|
|
- this.$refs.hd.getList(this.w_deviceid);
|
|
|
+ this.$refs.hd.getList(this.w_deviceid).then(num => this.tabsTop = num)
|
|
|
setTimeout(() => { this.changeTab({ name: this.showTab }, true) }, 100)
|
|
|
}
|
|
|
})
|
|
@@ -118,10 +127,10 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.tabs {
|
|
|
+.ceiling {
|
|
|
position: sticky;
|
|
|
- box-shadow: rgba(0, 0, 0, 0.45) 0px 25px 20px -20px;
|
|
|
- z-index: 99;
|
|
|
+ box-shadow: rgba(0, 0, 0, 0.18) 0px 2px 4px;
|
|
|
+ z-index: 9;
|
|
|
}
|
|
|
|
|
|
.head {
|
|
@@ -139,6 +148,16 @@ export default {
|
|
|
font-weight: bold;
|
|
|
color: #333333;
|
|
|
margin-bottom: 10px;
|
|
|
+
|
|
|
+ .status {
|
|
|
+ display: inline-block;
|
|
|
+ padding: 2px 6px;
|
|
|
+ border-radius: 4px;
|
|
|
+ color: #FFFFFF;
|
|
|
+ margin-right: 5px;
|
|
|
+ font-weight: normal;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.row {
|
|
@@ -147,9 +166,7 @@ export default {
|
|
|
color: #666666;
|
|
|
margin-bottom: 5px;
|
|
|
|
|
|
- .status {
|
|
|
- color: #3874F6;
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|