临时提交

This commit is contained in:
lin
2025-10-15 18:59:12 +08:00
parent 83bba5d380
commit d2ffc867e6
7 changed files with 71 additions and 15 deletions

View File

@@ -60,3 +60,9 @@ export function queryTree(params) {
}
})
}
export function sync() {
return request({
method: 'get',
url: `/api/group/sync`,
})
}

View File

@@ -1,7 +1,7 @@
import {
getTreeList,
update,
add, deleteGroup, getPath, queryTree
add, deleteGroup, getPath, queryTree, sync
} from '@/api/group'
const actions = {
@@ -64,6 +64,16 @@ const actions = {
reject(error)
})
})
},
sync({ commit }) {
return new Promise((resolve, reject) => {
sync().then(response => {
const { data } = response
resolve(data)
}).catch(error => {
reject(error)
})
})
}
}

View File

@@ -16,8 +16,9 @@
type="info"
style="text-align: left"
/>
<div v-if="edit" style="margin-top: 18px;font-size: 14px;position: absolute;left: 309px;z-index: 100;" >
<div v-if="edit" style="font-size: 14px;position: absolute;left: 270px;z-index: 100;" >
显示编号 <el-checkbox v-model="showCode" />
<el-button type="text" style="margin-left: 10px" :loading="groupSyncLoading" @click="groupSync">同步</el-button>
</div>
<vue-easy-tree
@@ -147,7 +148,8 @@ export default {
count: this.defaultCount | 15,
total: 0,
groupList: [],
channelList: []
channelList: [],
groupSyncLoading: false
}
},
created() {
@@ -454,6 +456,22 @@ export default {
leaf: true,
id: data.gbId
})
},
groupSync: function() {
this.groupSyncLoading = true
this.$store.dispatch('group/sync').then(data => {
this.$message.success({
showClose: true,
message: '同步消息已经发送, 3秒后自动刷新'
})
setTimeout(() => {
this.refresh('')
}, 3000)
}).finally(() => {
this.groupSyncLoading = false
})
}
}
}