diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index bbfa0e8..a7b75ba 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -74,3 +74,8 @@ export const updateUserStatus = (id: number, status: number) => { export const getSimpleUserList = (): Promise => { return request.get({ url: '/admin-api/system/user/list-all-simple' }) } + +// 获取所有用户列表-无权限限制 +export const getAllUserList = (): Promise => { + return request.get({ url: '/admin-api/system/user/no/permission/list-all-simple' }) +} diff --git a/src/directives/permission/hasPermi.ts b/src/directives/permission/hasPermi.ts index d86d2f5..1207464 100644 --- a/src/directives/permission/hasPermi.ts +++ b/src/directives/permission/hasPermi.ts @@ -8,7 +8,7 @@ export function hasPermi(app: App) { const { wsCache } = useCache() const { value } = binding const all_permission = '*:*:*' - const permissions = wsCache.get(CACHE_KEY.USER).permissions + const permissions = wsCache.get(CACHE_KEY.USER)?.permissions || [] if (value && value instanceof Array && value.length > 0) { const permissionFlag = value diff --git a/src/views/Clue/Order/Comp/MallOrderList.vue b/src/views/Clue/Order/Comp/MallOrderList.vue index 1b30752..f0b2cc3 100644 --- a/src/views/Clue/Order/Comp/MallOrderList.vue +++ b/src/views/Clue/Order/Comp/MallOrderList.vue @@ -200,7 +200,7 @@ diff --git a/src/views/Clue/Order/Comp/Reback.vue b/src/views/Clue/Order/Comp/Reback.vue index bc0e7a6..405d03c 100644 --- a/src/views/Clue/Order/Comp/Reback.vue +++ b/src/views/Clue/Order/Comp/Reback.vue @@ -18,7 +18,7 @@ - - - + + + - + import * as FeebackApi from '@/api/clue/payment' -import { getSimpleUserList as getUserOption } from '@/api/system/user' +import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user' import { useUserStore } from '@/store/modules/user' import DialogFeebackAudit from './DialogFeebackAudit.vue' @@ -198,6 +200,7 @@ const searchForm = ref({ }) const userOptions = ref([]) +const allUserOptions = ref([]) const tableList = ref([]) const total = ref(0) @@ -223,6 +226,7 @@ function handleReset() { } } +const totalMoney = ref(0) const loading = ref(false) async function getList() { loading.value = true @@ -230,6 +234,7 @@ async function getList() { const data = await FeebackApi.getPaymentPage(removeNullField(searchForm.value)) tableList.value = data.list total.value = data.total + totalMoney.value = data.totalAmount } finally { loading.value = false } @@ -274,6 +279,25 @@ function getOptions() { getUserOption().then((data) => { userOptions.value = data }) + getAllUserList().then((data) => { + allUserOptions.value = data + }) +} + +function getSummaries(param) { + const { columns } = param + const sums = [] + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '合计' + } else if (column.property == 'money') { + sums[index] = totalMoney.value + } else { + sums[index] = '' + } + }) + + return sums } onMounted(() => { diff --git a/src/views/Clue/Pool/Comp/DialogClue.vue b/src/views/Clue/Pool/Comp/DialogClue.vue index 0746bc0..7132df4 100644 --- a/src/views/Clue/Pool/Comp/DialogClue.vue +++ b/src/views/Clue/Pool/Comp/DialogClue.vue @@ -157,6 +157,9 @@ const props = defineProps({ }, userOptions: { type: Array + }, + allUserOptions: { + type: Array } }) @@ -168,7 +171,7 @@ const formSchema = computed(() => { it.componentProps['disabled'] = formType.value != 'create' } if (it.field == 'convertPeople') { - it.options = props.userOptions.map((it) => ({ ...it, name: it.nickname })) + it.options = props.allUserOptions.map((it) => ({ ...it, name: it.nickname })) } }) return [ diff --git a/src/views/Clue/Pool/Comp/DialogSuccess.vue b/src/views/Clue/Pool/Comp/DialogSuccess.vue index 694f4bd..80487bf 100644 --- a/src/views/Clue/Pool/Comp/DialogSuccess.vue +++ b/src/views/Clue/Pool/Comp/DialogSuccess.vue @@ -122,7 +122,7 @@ @@ -172,6 +173,7 @@ @@ -187,7 +189,7 @@ import DrawerClue from './Comp/DrawerClue.vue' import DialogSuccess from './Comp/DialogSuccess.vue' import DialogFollow from './Comp/DialogFollow.vue' import ClueMap from './Comp/ClueMap.vue' -import { getSimpleUserList as getUserOption } from '@/api/system/user' +import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user' import { removeNullField } from '@/utils' import { formatDate } from '@/utils/formatTime' @@ -356,12 +358,12 @@ function handleGain(id) { } const userOptions = ref([]) +const allUserOptions = ref([]) -onMounted(() => { - getUserOption().then((data) => { - userOptions.value = data - getCurdSchemas() - }) +onMounted(async () => { + userOptions.value = await getUserOption() + allUserOptions.value = await getAllUserList() + getCurdSchemas() })