Browse Source
Merge pull request #679 from flipped-aurora/gva-vue3
修复user表切换页面和size后角色消失的bug
main
奇淼(piexlmax
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
13 additions and
4 deletions
-
server/service/system/sys_autocode_history.go
-
web/src/view/superAdmin/user/user.vue
|
|
@ -61,6 +61,13 @@ func (autoCodeHistoryService *AutoCodeHistoryService) RollBack(id uint) error { |
|
|
|
// 删除文件
|
|
|
|
|
|
|
|
for _, path := range strings.Split(md.AutoCodePath, ";") { |
|
|
|
|
|
|
|
// 增加安全判断补丁:
|
|
|
|
_path, err := filepath.Abs(path) |
|
|
|
if err != nil || _path != path { |
|
|
|
continue |
|
|
|
} |
|
|
|
|
|
|
|
// 迁移
|
|
|
|
nPath := filepath.Join(global.GVA_CONFIG.AutoCode.Root, |
|
|
|
"rm_file", time.Now().Format("20060102"), filepath.Base(filepath.Dir(filepath.Dir(path))), filepath.Base(filepath.Dir(path)), filepath.Base(path)) |
|
|
|
|
|
@ -147,9 +147,13 @@ export default { |
|
|
|
computed: { |
|
|
|
...mapGetters('user', ['token']) |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
tableData() { |
|
|
|
this.setAuthorityIds() |
|
|
|
} |
|
|
|
}, |
|
|
|
async created() { |
|
|
|
await this.getTableData() |
|
|
|
this.setAuthorityIds() |
|
|
|
const res = await getAuthorityList({ page: 1, pageSize: 999 }) |
|
|
|
this.setOptions(res.data.list) |
|
|
|
}, |
|
|
@ -194,7 +198,6 @@ export default { |
|
|
|
if (res.code === 0) { |
|
|
|
this.$message.success('删除成功') |
|
|
|
await this.getTableData() |
|
|
|
this.setAuthorityIds() |
|
|
|
row.visible = false |
|
|
|
} |
|
|
|
}, |
|
|
@ -207,7 +210,6 @@ export default { |
|
|
|
this.$message({ type: 'success', message: '创建成功' }) |
|
|
|
} |
|
|
|
await this.getTableData() |
|
|
|
this.setAuthorityIds() |
|
|
|
this.closeAddUserDialog() |
|
|
|
} |
|
|
|
}) |
|
|
@ -234,7 +236,7 @@ export default { |
|
|
|
this.$message({ type: 'success', message: '角色设置成功' }) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|