|
@@ -163,7 +163,7 @@ import useFetch from '@/hooks/useFetch'
|
|
import useUserManageFilter from './hooks/useUserManageFilter'
|
|
import useUserManageFilter from './hooks/useUserManageFilter'
|
|
import useUserManageTable from './hooks/useUserManageTable'
|
|
import useUserManageTable from './hooks/useUserManageTable'
|
|
import useUploadFile from '@/hooks/useUploadFile'
|
|
import useUploadFile from '@/hooks/useUploadFile'
|
|
-
|
|
|
|
|
|
+import useMainStore from '@/store/main'
|
|
import useVW from '@/hooks/useVW'
|
|
import useVW from '@/hooks/useVW'
|
|
import bus from '@/utils/bus'
|
|
import bus from '@/utils/bus'
|
|
import type { ExtractMultipleApiResponse } from '@/api/api'
|
|
import type { ExtractMultipleApiResponse } from '@/api/api'
|
|
@@ -174,6 +174,7 @@ const { fetch: importUsersFile, loading: importUsersLoading } = useFetch('import
|
|
const importUsersModel = reactive<any>({
|
|
const importUsersModel = reactive<any>({
|
|
file: void 0,
|
|
file: void 0,
|
|
})
|
|
})
|
|
|
|
+const mainStore = useMainStore()
|
|
watch(
|
|
watch(
|
|
fileList,
|
|
fileList,
|
|
() => {
|
|
() => {
|
|
@@ -308,8 +309,11 @@ function onDisableUser(row: ExtractMultipleApiResponse<'getUserList'>) {
|
|
row.id && toggleFetch({ enable: !row.enable, ids: [row.id] }).then(fetchTable)
|
|
row.id && toggleFetch({ enable: !row.enable, ids: [row.id] }).then(fetchTable)
|
|
}
|
|
}
|
|
|
|
|
|
-onOptionInit(onSearch)
|
|
|
|
-// onSearch()
|
|
|
|
|
|
+if (mainStore.myUserInfo?.role === 'ADMIN') {
|
|
|
|
+ onSearch()
|
|
|
|
+} else {
|
|
|
|
+ onOptionInit(onSearch)
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|