(ids = v.map((e) => e.id))">
@@ -114,6 +111,7 @@ export default {
areaId: '',
bindVisible: false,
changeInfo: {},
+ btnLoading: false,
locate: false
}
},
@@ -198,6 +196,22 @@ export default {
},
})
},
+ update () {
+ this.btnLoading = true
+ this.instance.post(`/app/appdlbquipment/sync`, null, {
+ timeout: 1000000
+ }).then(res => {
+ if (res.code == 0) {
+ this.$message.success('更新成功')
+ this.getList()
+ }
+
+ this.btnLoading = false
+ }).catch(() => {
+
+ this.btnLoading = false
+ })
+ },
},
}
diff --git a/packages/device/IntelligentSecurity/components/deviceSlider.vue b/packages/device/IntelligentSecurity/components/deviceSlider.vue
index f134875f..c17368f9 100644
--- a/packages/device/IntelligentSecurity/components/deviceSlider.vue
+++ b/packages/device/IntelligentSecurity/components/deviceSlider.vue
@@ -22,7 +22,10 @@
prefix-icon="el-icon-search"
@clear="search.name = '', handleTreeFilter()" clearable/>
- 设备列表
+
{
if (res?.data) {
this.staData = res.data.count
@@ -122,6 +128,21 @@ export default {
})
},
+ updateDev() {
+ this.btnLoading = true
+ this.instance.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
+ })
+ },
+
handleTreeCommand(e, node) {
this.$emit('treeCommand', {
type: e,
@@ -154,14 +175,16 @@ export default {
handleTreeFilter() {
this.$refs.deviceTree?.filter(this.search.name)
},
-
onChange() {
this.$refs.deviceTree?.filter(this.search.name)
- }
+ },
+
},
+
created() {
- this.dict.load("deviceStatus")
- this.getDevices()
+ this.$dict.load("deviceStatus").then(()=>{
+ this.getDevices()
+ })
},
mounted() {
@@ -247,6 +270,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 {