BUG 30794

This commit is contained in:
aixianling
2022-08-10 10:18:35 +08:00
parent 9bd1f380be
commit eb2d76de61

View File

@@ -17,7 +17,10 @@
<el-input v-model="search.name" size="mini" placeholder="设备名称" prefix-icon="el-icon-search"
@change="handleTreeFilter" clearable/>
</div>
<div title>设备列表</div>
<div title>
<div>设备列表</div>
<el-button type="text" icon="iconfont iconResetting" @click="updateDev" size="mini" :loading="btnLoading">刷新</el-button>
</div>
<div fill class="deviceList">
<el-scrollbar>
<el-tree ref="deviceTree" :data="treeData" :props="propsConfig" @node-click="handleNodeClick"
@@ -79,7 +82,8 @@ export default {
name: '',
search: {
bind: ''
}
},
btnLoading: false,
}
},
methods: {
@@ -98,6 +102,20 @@ export default {
}
})
},
updateDev() {
this.btnLoading = true
this.ins.post(`/app/appzyvideoequipment/sync`, null, {
timeout: 1000000
}).then(res => {
if (res.code == 0) {
this.$message.success('更新成功')
this.getDevices()
}
this.btnLoading = false
}).catch(() => {
this.btnLoading = false
})
},
handleNodeClick(data) {
this.$emit('select', data)
},
@@ -173,6 +191,18 @@ export default {
background: #3E4A69;
padding: 0 16px;
line-height: 28px;
display: flex;
justify-content: space-between;
align-items: center;
::v-deep .el-button {
padding: 0 4px;
height: 28px;
background: #3E4A69;
}
::v-deep .el-button:hover {
border: none;
}
}
::v-deep.deviceList {