feat(X-Pack): 默认组织管理员可以查看组织下所有日志 #10897

This commit is contained in:
fit2cloud-chenyw 2024-08-07 14:02:11 +08:00
parent b24c8af38e
commit 97dc0ccda2
4 changed files with 32 additions and 3 deletions

View File

@ -33,6 +33,18 @@ const userDrawer = ref(false)
const init = () => { const init = () => {
userDrawer.value = true userDrawer.value = true
} }
const cleanrInnerValue = (index: number) => {
const field = componentList.value[index]?.field
if (!field) {
return
}
myRefs.value[index]?.clear()
for (let i = 0; i < state.conditions.length; i++) {
if (state.conditions[i].field === field) {
state.conditions[i].value = []
}
}
}
const clearInnerTag = (index?: number) => { const clearInnerTag = (index?: number) => {
if (isNaN(index)) { if (isNaN(index)) {
for (let i = 0; i < componentList.value.length; i++) { for (let i = 0; i < componentList.value.length; i++) {
@ -74,6 +86,7 @@ const filterChange = (value, field, operator) => {
if (!exits && value?.length) { if (!exits && value?.length) {
state.conditions.push({ field, value, operator }) state.conditions.push({ field, value, operator })
} }
treeFilterChange(value, field, operator)
} }
const reset = () => { const reset = () => {
clearFilter() clearFilter()
@ -82,14 +95,22 @@ const reset = () => {
const close = () => { const close = () => {
userDrawer.value = false userDrawer.value = false
} }
const emits = defineEmits(['trigger-filter']) const emits = defineEmits(['trigger-filter', 'tree-filter-change'])
const trigger = () => { const trigger = () => {
emits('trigger-filter', state.conditions) emits('trigger-filter', state.conditions)
} }
const treeFilterChange = (value, field, operator) => {
emits('tree-filter-change', {
value,
field,
operator
})
}
defineExpose({ defineExpose({
init, init,
clearFilter, clearFilter,
close close,
cleanrInnerValue
}) })
</script> </script>

@ -1 +1 @@
Subproject commit 11240f0a32fc1916409c82580e79fb17bb7988eb Subproject commit a3398f5493e2ac0fcc5df37345c10afe419853bc

View File

@ -61,4 +61,8 @@ public interface OrgApi {
@Operation(hidden = true) @Operation(hidden = true)
@GetMapping("/detail/{oid}") @GetMapping("/detail/{oid}")
OrgDetailVO detail(@PathVariable("oid") Long oid); OrgDetailVO detail(@PathVariable("oid") Long oid);
@Operation(hidden = true)
@GetMapping("/subOrgs")
List<String> subOrgs();
} }

View File

@ -190,4 +190,8 @@ public interface UserApi {
@GetMapping("/invalidPwd") @GetMapping("/invalidPwd")
InvalidPwdVO invalidPwd(); InvalidPwdVO invalidPwd();
@Hidden
@PostMapping("/subOrgUser")
List<UserItem> subOrgUser(@RequestBody List<Long> oidList);
} }