chore: 优化 apis 导入,随着模块和接口的增加,方便维护

This commit is contained in:
2024-09-06 21:14:13 +08:00
parent cb03111c22
commit 8a80db0f92
80 changed files with 210 additions and 179 deletions

View File

@@ -33,7 +33,7 @@
<script setup lang="ts">
import { type FormInstance, Message } from '@arco-design/web-vue'
import { useStorage } from '@vueuse/core'
import { getImageCaptcha } from '@/apis'
import { getImageCaptcha } from '@/apis/common'
import { useTabsStore, useUserStore } from '@/stores'
import { encryptByRsa } from '@/utils/encrypt'

View File

@@ -22,7 +22,7 @@
<script setup lang="ts">
import { type FormInstance, Message } from '@arco-design/web-vue'
import { updateUserPassword } from '@/apis'
import { updateUserPassword } from '@/apis/system'
import { encryptByRsa } from '@/utils/encrypt'
interface Form {

View File

@@ -93,7 +93,7 @@ import Background from './components/background/index.vue'
import AccountLogin from './components/account/index.vue'
import PhoneLogin from './components/phone/index.vue'
import EmailLogin from './components/email/index.vue'
import { socialAuth } from '@/apis'
import { socialAuth } from '@/apis/auth'
import { useAppStore } from '@/stores'
import { useDevice } from '@/hooks'

View File

@@ -7,7 +7,7 @@
<script setup lang="ts">
import { Message } from '@arco-design/web-vue'
import { useRoute, useRouter } from 'vue-router'
import { bindSocialAccount } from '@/apis'
import { bindSocialAccount } from '@/apis/system'
import { useTabsStore, useUserStore } from '@/stores'
import { isLogin } from '@/utils/auth'

View File

@@ -46,7 +46,7 @@
<script setup lang="ts">
import dayjs from 'dayjs'
import { type LogQuery, exportLoginLog, listLog } from '@/apis'
import { type LogQuery, exportLoginLog, listLog } from '@/apis/monitor'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import DateRangePicker from '@/components/DateRangePicker/index.vue'
import { useDownload, useTable } from '@/hooks'

View File

@@ -68,7 +68,7 @@
</template>
<script lang="ts" setup>
import { type LogDetailResp, getLog } from '@/apis'
import { type LogDetailResp, getLog } from '@/apis/monitor'
const dataId = ref('')
const dataDetail = ref<LogDetailResp>()

View File

@@ -58,7 +58,7 @@
<script setup lang="ts">
import dayjs from 'dayjs'
import OperationLogDetailDrawer from './OperationLogDetailDrawer.vue'
import { type LogQuery, type LogResp, exportOperationLog, listLog } from '@/apis'
import { type LogQuery, type LogResp, exportOperationLog, listLog } from '@/apis/monitor'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import DateRangePicker from '@/components/DateRangePicker/index.vue'
import { useDownload, useTable } from '@/hooks'

View File

@@ -44,7 +44,7 @@
<script setup lang="ts">
import { Message } from '@arco-design/web-vue'
import { type OnlineUserQuery, kickout, listOnlineUser } from '@/apis'
import { type OnlineUserQuery, kickout, listOnlineUser } from '@/apis/monitor'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import DateRangePicker from '@/components/DateRangePicker/index.vue'
import { useUserStore } from '@/stores'

View File

@@ -156,7 +156,7 @@
<script setup lang="ts">
import { type ColProps, type FormInstance, Message } from '@arco-design/web-vue'
import { useWindowSize } from '@vueuse/core'
import { addJob, listGroup, updateJob } from '@/apis'
import { addJob, listGroup, updateJob } from '@/apis/schedule'
import { useForm } from '@/hooks'
import { useDict } from '@/hooks/app'

View File

@@ -36,7 +36,7 @@
<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import type { JobResp } from '@/apis'
import type { JobResp } from '@/apis/schedule'
import { useDict } from '@/hooks/app'
const { width } = useWindowSize()

View File

@@ -73,7 +73,7 @@ import { Message } from '@arco-design/web-vue'
import { useRouter } from 'vue-router'
import JobAddModal from './JobAddModal.vue'
import JobDetailDrawer from './JobDetailDrawer.vue'
import { type JobQuery, type JobResp, deleteJob, listGroup, listJob, triggerJob, updateJobStatus } from '@/apis'
import { type JobQuery, type JobResp, deleteJob, listGroup, listJob, triggerJob, updateJobStatus } from '@/apis/schedule'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useTable } from '@/hooks'
import { useDict } from '@/hooks/app'

View File

@@ -1,10 +1,10 @@
<template>
<a-modal v-model:visible="visible" title="任务日志详情" :bodyStyle="{ maxHeight: '80vh', overflow: 'auto' }"
<a-modal v-model:visible="visible" title="任务日志详情" :body-style="{ maxHeight: '80vh', overflow: 'auto' }"
:width="width >= 1500 ? 1500 : '100%'" :footer="false" @close="closed">
<div style="display: flex;">
<div style="padding: 10px 10px;">
<div class="job_list">
<div :class="`job_list_item ${item.id === activeId ? 'active' : ''}`" v-for="item in dataList" :key="item.id"
<div v-for="item in dataList" :key="item.id" :class="`job_list_item ${item.id === activeId ? 'active' : ''}`"
@click="onStartInfo(item)">
<div class="content">
<span class="title">{{ item.clientInfo.split('@')[1] }}</span>
@@ -20,14 +20,13 @@
<GiCodeView :code-json="content" />
</div>
</div>
</a-modal>
</a-modal>
</template>
<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import { type JobInstanceQuery, type JobInstanceResp, type JobLogResp, listJobInstance, listJobInstanceLog } from '@/apis'
import dayjs from "dayjs";
import dayjs from 'dayjs'
import { type JobInstanceQuery, type JobInstanceResp, type JobLogResp, listJobInstance, listJobInstanceLog } from '@/apis/schedule'
const { width } = useWindowSize()
const queryForm = reactive<JobInstanceQuery>({})
@@ -35,39 +34,38 @@ const dataList = ref<JobInstanceResp[]>([])
const loading = ref(false)
const activeId = ref<string | number>('')
const statusList = {
'1': {
1: {
title: '待处理',
color: 'gray',
isRun: false
},
'2': {
2: {
title: '运行中',
color: 'cyan',
isRun: true
},
'3': {
3: {
title: '成功',
color: 'green',
isRun: false
},
'4': {
4: {
title: '已失败',
color: 'red',
isRun: false
},
'5': {
5: {
title: '已停止',
color: 'purple',
isRun: false
},
'6': {
6: {
title: '已取消',
color: 'orange',
isRun: false
}
}
const visible = ref(false)
// 格式化日志
@@ -79,7 +77,6 @@ const formatLog = (log: any) => {
const content = ref('')
const setIntervalNode = ref<NodeJS.Timeout>()
// 详情
const onDetail = (record: JobLogResp) => {
visible.value = true
@@ -109,13 +106,11 @@ const onLogDetail = async (record: JobInstanceResp) => {
} catch (error) {
content.value = ''
}
}
const onStartInfo = (record: JobInstanceResp) => {
content.value = ''
clearInterval(setIntervalNode.value)
let isRun = statusList[record.taskStatus].isRun
const isRun = statusList[record.taskStatus].isRun
if (isRun) {
setIntervalNode.value = setInterval(() => {
onLogDetail(record)
@@ -123,8 +118,6 @@ const onStartInfo = (record: JobInstanceResp) => {
} else {
onLogDetail(record)
}
}
// 查询列表数据
const getInstanceList = async (query: JobInstanceQuery = { ...queryForm }) => {

View File

@@ -65,7 +65,7 @@ import { Message } from '@arco-design/web-vue'
import { useRoute } from 'vue-router'
import dayjs from 'dayjs'
import JobLogDetailModal from './LogDetailModal.vue'
import { type JobLogQuery, type JobLogResp, listGroup, listJobLog, retryJob, stopJob } from '@/apis'
import { type JobLogQuery, type JobLogResp, listGroup, listJobLog, retryJob, stopJob } from '@/apis/schedule'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useTable } from '@/hooks'
import { useDict } from '@/hooks/app'

View File

@@ -99,7 +99,7 @@ import { useWindowSize } from '@vueuse/core'
import { type FileItem, Message } from '@arco-design/web-vue'
import { VueCropper } from 'vue-cropper'
import BasicInfoUpdateModal from './BasicInfoUpdateModal.vue'
import { uploadAvatar } from '@/apis'
import { uploadAvatar } from '@/apis/system'
import 'vue-cropper/dist/index.css'
import { useUserStore } from '@/stores'
import getAvatar from '@/utils/avatar'

View File

@@ -16,7 +16,7 @@
<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import { Message } from '@arco-design/web-vue'
import { updateUserBaseInfo } from '@/apis'
import { updateUserBaseInfo } from '@/apis/system'
import { type Columns, GiForm } from '@/components/GiForm'
import { useForm } from '@/hooks'
import { useUserStore } from '@/stores'

View File

@@ -107,7 +107,7 @@ import {
listOption,
resetOptionValue,
updateOption
} from '@/apis'
} from '@/apis/system'
import { useAppStore } from '@/stores'
import { useForm } from '@/hooks'
import { fileToBase64 } from '@/utils'

View File

@@ -61,7 +61,7 @@ import {
listOption,
resetOptionValue,
updateOption
} from '@/apis'
} from '@/apis/system'
import { useForm } from '@/hooks'
defineOptions({ name: 'MailSetting' })

View File

@@ -81,7 +81,7 @@
<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import { type FormInstance, Message, Modal } from '@arco-design/web-vue'
import { type OptionResp, type SecurityConfig, listOption, resetOptionValue, updateOption } from '@/apis'
import { type OptionResp, type SecurityConfig, listOption, resetOptionValue, updateOption } from '@/apis/system'
import { useForm } from '@/hooks'
defineOptions({ name: 'SecuritySetting' })

View File

@@ -16,7 +16,7 @@
<script setup lang="ts">
import { Message } from '@arco-design/web-vue'
import { addDept, getDept, updateDept } from '@/apis'
import { addDept, getDept, updateDept } from '@/apis/system'
import { type Columns, GiForm } from '@/components/GiForm'
import { useForm } from '@/hooks'
import { useDept } from '@/hooks/app'

View File

@@ -74,7 +74,7 @@
<script setup lang="ts">
import DeptAddModal from './DeptAddModal.vue'
import { type DeptQuery, type DeptResp, deleteDept, exportDept, listDept } from '@/apis'
import { type DeptQuery, type DeptResp, deleteDept, exportDept, listDept } from '@/apis/system'
import type GiTable from '@/components/GiTable/index.vue'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useDownload, useTable } from '@/hooks'

View File

@@ -24,7 +24,7 @@
<script setup lang="ts">
import { Message } from '@arco-design/web-vue'
import { addDictItem, getDictItem, updateDictItem } from '@/apis'
import { addDictItem, getDictItem, updateDictItem } from '@/apis/system'
import { type Columns, GiForm } from '@/components/GiForm'
import { useForm } from '@/hooks'

View File

@@ -12,15 +12,15 @@
<DictTree placeholder="请输入关键词" @node-click="handleSelectDict" />
</a-col>
<a-col :xs="24" :sm="16" :md="17" :lg="18" :xl="19" :xxl="20" flex="1" class="h-full ov-hidden">
<GiTable
<GiTable
row-key="id"
:data="dataList"
:columns="columns"
:data="dataList"
:columns="columns"
:loading="loading"
:scroll="{ x: '100%', y: '100%', minWidth: 600 }"
:pagination="pagination"
:scroll="{ x: '100%', y: '100%', minWidth: 600 }"
:pagination="pagination"
:disabled-tools="['size']"
:disabled-column-keys="['label']"
:disabled-column-keys="['label']"
@refresh="search"
>
<template #custom-left>
@@ -44,9 +44,9 @@
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:dict:item:update']" @click="onUpdate(record)">修改</a-link>
<a-link
v-permission="['system:dict:item:delete']"
status="danger"
<a-link
v-permission="['system:dict:item:delete']"
status="danger"
@click="onDelete(record)"
>
删除
@@ -64,7 +64,7 @@
<script setup lang="ts">
import DictTree from './tree/index.vue'
import DictItemAddModal from './DictItemAddModal.vue'
import { type DictItemQuery, type DictItemResp, deleteDictItem, listDictItem } from '@/apis'
import { type DictItemQuery, type DictItemResp, deleteDictItem, listDictItem } from '@/apis/system'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useTable } from '@/hooks'
import { isMobile } from '@/utils'

View File

@@ -16,7 +16,7 @@
<script setup lang="ts">
import { Message } from '@arco-design/web-vue'
import { addDict, getDict, updateDict } from '@/apis'
import { addDict, getDict, updateDict } from '@/apis/system'
import { type Columns, GiForm } from '@/components/GiForm'
import { useForm } from '@/hooks'

View File

@@ -13,7 +13,7 @@
</template>
<script lang="ts" setup>
import type { DictResp } from '@/apis'
import type { DictResp } from '@/apis/system'
interface Props {
data: DictResp

View File

@@ -42,7 +42,7 @@ import type { TreeNodeData } from '@arco-design/web-vue'
import { mapTree } from 'xe-utils'
import DictAddModal from './DictAddModal.vue'
import RightMenu from './RightMenu.vue'
import { type DictQuery, type DictResp, deleteDict, listDict } from '@/apis'
import { type DictQuery, type DictResp, deleteDict, listDict } from '@/apis/system'
import has from '@/utils/has'
interface Props {

View File

@@ -21,7 +21,7 @@
<script setup lang="ts">
import { useDraggable, useElementSize, useWindowSize } from '@vueuse/core'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
interface Props {
data: FileItem

View File

@@ -3,7 +3,7 @@ import { createApp } from 'vue'
import ArcoVueIcon from '@arco-design/web-vue/es/icon'
import ArcoVue from '@arco-design/web-vue'
import ModalContent from './ModalContent.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
function createModal<T extends { callback?: () => void }>(component: Component, options?: T) {
// 创建一个挂载容器

View File

@@ -22,7 +22,7 @@
<script setup lang="ts">
import FileImage from '../../main/FileMain/FileImage.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
import { formatFileSize } from '@/utils'
interface Props {

View File

@@ -1,7 +1,7 @@
import { h } from 'vue'
import { Modal } from '@arco-design/web-vue'
import ModalContent from './ModalContent.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
/** 打开 详情 弹窗 */
export function openFileDetailModal(fileItem: FileItem) {

View File

@@ -15,7 +15,7 @@
<script lang="ts" setup>
import type { FormInstance } from '@arco-design/web-vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
interface Props {
data: FileItem

View File

@@ -1,7 +1,7 @@
import { h, ref } from 'vue'
import { Message, Modal } from '@arco-design/web-vue'
import ModalContent from './ModalContent.vue'
import { type FileItem, updateFile } from '@/apis'
import { type FileItem, updateFile } from '@/apis/system'
export function openFileRenameModal(data: FileItem, callback?: () => void) {
const ModalContentRef = ref<InstanceType<typeof ModalContent>>()

View File

@@ -4,7 +4,7 @@
<script lang="ts" setup>
import Player from 'xgplayer'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
interface Props {
data: FileItem

View File

@@ -1,7 +1,7 @@
import { h } from 'vue'
import { Modal } from '@arco-design/web-vue'
import ModalContent from './ModalContent.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
export function previewFileVideoModal(data: FileItem) {
return Modal.open({

View File

@@ -24,7 +24,7 @@ import { LegendComponent, TitleComponent, TooltipComponent } from 'echarts/compo
import { CanvasRenderer } from 'echarts/renderers'
import { FileTypeList } from '@/constant/file'
import { useChart } from '@/hooks'
import { type FileStatisticsResp, getFileStatistics } from '@/apis'
import { type FileStatisticsResp, getFileStatistics } from '@/apis/system'
import { formatFileSize } from '@/utils'
use([TitleComponent, TooltipComponent, LegendComponent, PieChart, CanvasRenderer])

View File

@@ -42,7 +42,7 @@
<script setup lang="ts">
import FileImage from './FileImage.vue'
import FileRightMenu from './FileRightMenu.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
interface Props {
data?: FileItem[]

View File

@@ -5,7 +5,7 @@
<script setup lang="ts">
import { FileIcon, ImageTypes } from '@/constant/file'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
interface Props {
data: FileItem

View File

@@ -67,7 +67,7 @@
import type { TableInstance, TableRowSelection } from '@arco-design/web-vue'
import FileImage from './FileImage.vue'
import FileRightMenu from './FileRightMenu.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
import { formatFileSize } from '@/utils'
interface Props {

View File

@@ -35,7 +35,7 @@
<script setup lang="ts">
import { ref } from 'vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
import { encodeByBase64 } from '@/utils/encrypt'
const emit = defineEmits(['download'])

View File

@@ -10,7 +10,7 @@
<script setup lang="ts">
import GiOption from '@/components/GiOption/index.vue'
import GiOptionItem from '@/components/GiOptionItem/index.vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
interface Props {
data?: FileItem

View File

@@ -1,5 +1,5 @@
import { computed, ref } from 'vue'
import type { FileItem } from '@/apis'
import type { FileItem } from '@/apis/system'
type Mode = 'grid' | 'list'

View File

@@ -123,7 +123,7 @@
<script setup lang="ts">
import { type FormInstance, Message } from '@arco-design/web-vue'
import { mapTree } from 'xe-utils'
import { type MenuResp, addMenu, getMenu, updateMenu } from '@/apis'
import { type MenuResp, addMenu, getMenu, updateMenu } from '@/apis/system'
import { useForm } from '@/hooks'
import { filterTree, transformPathToName } from '@/utils'

View File

@@ -85,7 +85,7 @@
<script setup lang="ts">
import MenuAddModal from './MenuAddModal.vue'
import { type MenuQuery, type MenuResp, deleteMenu, listMenu } from '@/apis'
import { type MenuQuery, type MenuResp, deleteMenu, listMenu } from '@/apis/system'
import type GiTable from '@/components/GiTable/index.vue'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { DisEnableStatusList } from '@/constant/common'

View File

@@ -68,7 +68,7 @@
import { type FormInstance, Message } from '@arco-design/web-vue'
import { MdEditor } from 'md-editor-v3'
import { useWindowSize } from '@vueuse/core'
import { addNotice, getNotice, updateNotice } from '@/apis'
import { addNotice, getNotice, updateNotice } from '@/apis/system'
import { useForm } from '@/hooks'
import { useDict } from '@/hooks/app'

View File

@@ -38,7 +38,7 @@
<script setup lang="ts">
import { MdPreview } from 'md-editor-v3'
import { useWindowSize } from '@vueuse/core'
import { type NoticeResp, getNotice } from '@/apis'
import { type NoticeResp, getNotice } from '@/apis/system'
const { width } = useWindowSize()
const dataDetail = ref<NoticeResp>()

View File

@@ -56,7 +56,7 @@
<script lang="ts" setup>
import NoticeAddModal from './NoticeAddModal.vue'
import NoticeDetailModal from './NoticeDetailModal.vue'
import { type NoticeQuery, type NoticeResp, deleteNotice, listNotice } from '@/apis'
import { type NoticeQuery, type NoticeResp, deleteNotice, listNotice } from '@/apis/system'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useTable } from '@/hooks'
import { useDict } from '@/hooks/app'

View File

@@ -23,7 +23,7 @@ import { Message } from '@arco-design/web-vue'
import AiEditor from '../components/edit/index.vue'
import { useTabsStore } from '@/stores'
import { type Columns, GiForm, type Options } from '@/components/GiForm'
import { addNotice, getNotice, updateNotice } from '@/apis'
import { addNotice, getNotice, updateNotice } from '@/apis/system'
import { useForm } from '@/hooks'
import { useDict } from '@/hooks/app'

View File

@@ -34,7 +34,7 @@
<script setup lang="tsx">
import AiEditor from '../components/detail/index.vue'
import { useTabsStore } from '@/stores'
import { getNotice } from '@/apis'
import { getNotice } from '@/apis/system'
import { useForm } from '@/hooks'
const containerRef = ref<HTMLElement | null>()

View File

@@ -104,7 +104,7 @@
<script setup lang="ts">
import { type FormInstance, Message, type TreeNodeData } from '@arco-design/web-vue'
import { useWindowSize } from '@vueuse/core'
import { addRole, getRole, updateRole } from '@/apis'
import { addRole, getRole, updateRole } from '@/apis/system'
import { useForm } from '@/hooks'
import { useDept, useDict, useMenu } from '@/hooks/app'

View File

@@ -53,7 +53,7 @@
<script lang="ts" setup>
import { useWindowSize } from '@vueuse/core'
import { type RoleDetailResp, getRole } from '@/apis'
import { type RoleDetailResp, getRole } from '@/apis/system'
import { useDept, useDict, useMenu } from '@/hooks/app'
const { width } = useWindowSize()

View File

@@ -83,7 +83,7 @@
<script setup lang="ts">
import { type FormInstance, Message, type TreeNodeData } from '@arco-design/web-vue'
import { useWindowSize } from '@vueuse/core'
import { addRole, getRole, updateRole } from '@/apis'
import { addRole, getRole, updateRole } from '@/apis/system'
import { useForm } from '@/hooks'
import { useDept, useDict, useMenu } from '@/hooks/app'

View File

@@ -60,7 +60,7 @@
import RoleUpdateDrawer from './RoleUpdateDrawer.vue'
import RoleDetailDrawer from './RoleDetailDrawer.vue'
import RoleAddModal from './RoleAddModal.vue'
import { type RoleQuery, type RoleResp, deleteRole, listRole } from '@/apis'
import { type RoleQuery, type RoleResp, deleteRole, listRole } from '@/apis/system'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useTable } from '@/hooks'
import { useDict } from '@/hooks/app'

View File

@@ -94,7 +94,7 @@
<script setup lang="ts">
import { type FormInstance, Message } from '@arco-design/web-vue'
import { useWindowSize } from '@vueuse/core'
import { addStorage, getStorage, updateStorage } from '@/apis'
import { addStorage, getStorage, updateStorage } from '@/apis/system'
import { useForm } from '@/hooks'
import { useDict } from '@/hooks/app'
import { encryptByRsa } from '@/utils/encrypt'

View File

@@ -68,7 +68,7 @@
<script setup lang="ts">
import StorageAddDrawer from './StorageAddDrawer.vue'
import { type StorageQuery, type StorageResp, deleteStorage, listStorage } from '@/apis'
import { type StorageQuery, type StorageResp, deleteStorage, listStorage } from '@/apis/system'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useTable } from '@/hooks'
import { useDict } from '@/hooks/app'

View File

@@ -78,7 +78,7 @@
<script setup lang="ts">
import { type FormInstance, Message, type TreeNodeData } from '@arco-design/web-vue'
import { useWindowSize } from '@vueuse/core'
import { addUser, getUser, updateUser } from '@/apis'
import { addUser, getUser, updateUser } from '@/apis/system'
import type { Gender, Status } from '@/types/global'
import { useForm } from '@/hooks'
import { useDept, useRole } from '@/hooks/app'

View File

@@ -30,7 +30,7 @@
<script lang="ts" setup>
import { useWindowSize } from '@vueuse/core'
import { type UserDetailResp, getUser } from '@/apis'
import { type UserDetailResp, getUser } from '@/apis/system'
const { width } = useWindowSize()

View File

@@ -84,7 +84,7 @@
<script setup lang="ts">
import { type FormInstance, Message, type RequestOption } from '@arco-design/web-vue'
import { useWindowSize } from '@vueuse/core'
import { type UserImportResp, downloadImportUserTemplate, importUser, parseImportUser } from '@/apis'
import { type UserImportResp, downloadImportUserTemplate, importUser, parseImportUser } from '@/apis/system'
import { useDownload, useForm } from '@/hooks'
const emit = defineEmits<{

View File

@@ -16,7 +16,7 @@
<script setup lang="ts">
import { Message } from '@arco-design/web-vue'
import { resetUserPwd } from '@/apis'
import { resetUserPwd } from '@/apis/system'
import { type Columns, GiForm } from '@/components/GiForm'
import { useForm } from '@/hooks'
import { encryptByRsa } from '@/utils/encrypt'

View File

@@ -96,7 +96,7 @@ import UserAddDrawer from './UserAddDrawer.vue'
import UserImportDrawer from './UserImportDrawer.vue'
import UserDetailDrawer from './UserDetailDrawer.vue'
import UserResetPwdModal from './UserResetPwdModal.vue'
import { type UserQuery, type UserResp, deleteUser, exportUser, listUser } from '@/apis'
import { type UserQuery, type UserResp, deleteUser, exportUser, listUser } from '@/apis/system'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useDownload, useTable } from '@/hooks'
import { isMobile } from '@/utils'

View File

@@ -143,7 +143,7 @@
<script setup lang="ts">
import { type FormInstance, Message } from '@arco-design/web-vue'
import { useWindowSize } from '@vueuse/core'
import { type FieldConfigResp, type GeneratorConfigResp, getGenConfig, listFieldConfig, listFieldConfigDict, saveGenConfig } from '@/apis'
import { type FieldConfigResp, type GeneratorConfigResp, getGenConfig, listFieldConfig, listFieldConfigDict, saveGenConfig } from '@/apis/tool'
import type { LabelValueState } from '@/types/global'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useForm } from '@/hooks'

View File

@@ -66,7 +66,7 @@
<script setup lang="ts">
import { Message, type TreeNodeData } from '@arco-design/web-vue'
import { useClipboard } from '@vueuse/core'
import { type GeneratePreviewResp, genPreview } from '@/apis'
import { type GeneratePreviewResp, genPreview } from '@/apis/tool'
// 生成
const emit = defineEmits<{ (e: 'generate', tableNames: string[]): void }>()

View File

@@ -40,7 +40,7 @@
<script setup lang="ts">
import GenConfigDrawer from './GenConfigDrawer.vue'
import GenPreviewModal from './GenPreviewModal.vue'
import { generate, listGenerator } from '@/apis'
import { generate, listGenerator } from '@/apis/tool'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useTable } from '@/hooks'
import { isMobile } from '@/utils'