订单管理修改 订单详情修改 监控室列表和播放功能
This commit is contained in:
45
pages/sys/workbench/monitor/monitors.vue
Normal file
45
pages/sys/workbench/monitor/monitors.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<view class="list-box">
|
||||
<TreeNode v-for="(node, idx) in monitors" :key="node.code || node.id || idx" :node="node" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TreeNode from "./TreeNode.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
TreeNode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
monitors: []
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getMonitors();
|
||||
},
|
||||
methods: {
|
||||
async getMonitors() {
|
||||
try {
|
||||
const res = await this.$u.api.getMonitors();
|
||||
if (res.code === 200) {
|
||||
this.monitors = res.data || [];
|
||||
} else {
|
||||
this.monitors = [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取监控失败", error);
|
||||
this.monitors = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.list-box {
|
||||
background: #f7f7f7;
|
||||
padding-top: 25rpx;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user