feat: 目录调整&剔除 tab-bar

This commit is contained in:
baiqi 2023-07-19 14:46:24 +08:00 committed by fit2-zhao
parent c63155faaa
commit 40c55173bf
67 changed files with 78 additions and 464 deletions

View File

@ -362,20 +362,12 @@ export default function usePermission() {
<transition name="fade" mode="out-in" appear>
<component :is="Component" v-if="route.meta.ignoreCache" :key="route.fullPath" />
<!-- keep-alive提供组件状态缓存以便快速渲染组件内容 -->
<keep-alive v-else :include="cacheList">
<keep-alive v-else>
<component :is="Component" :key="route.fullPath" />
</keep-alive>
</transition>
</router-view>
</template>
<script lang="ts" setup>
import { computed } from 'vue';
import { useTabBarStore } from '@/store';
const tabBarStore = useTabBarStore();
const cacheList = computed(() => tabBarStore.getCacheList);
</script>
```
<a name="KZkaZ"></a>

View File

@ -1,6 +1,6 @@
import MSR from '@/api/http/index';
import { GetMemberListUrl, AddMemberUrl } from '@/api/requrls/system/member';
import type { UserListItem, CreateUserParams } from '@/models/system/user';
import { GetMemberListUrl, AddMemberUrl } from '@/api/requrls/setting/member';
import type { UserListItem, CreateUserParams } from '@/models/setting/user';
import type { TableQueryParams } from '@/models/common';
export function getMemberList(data: TableQueryParams) {

View File

@ -1,6 +1,6 @@
import MSR from '@/api/http/index';
import { GetPluginListUrl } from '@/api/requrls/system/plugin';
import type { PluginList } from '@/models/system/plugin';
import { GetPluginListUrl } from '@/api/requrls/setting/plugin';
import type { PluginList } from '@/models/setting/plugin';
import type { TableQueryParams } from '@/models/common';
// eslint-disable-next-line import/prefer-default-export

View File

@ -1,6 +1,6 @@
import MSR from '@/api/http/index';
import { ProjectListUrl } from '@/api/requrls/system/project';
import type { ProjectListItem } from '@/models/system/project';
import { ProjectListUrl } from '@/api/requrls/setting/project';
import type { ProjectListItem } from '@/models/setting/project';
export function getProjectList(organizationId: string) {
return MSR.get<ProjectListItem[]>({ url: ProjectListUrl, params: organizationId });

View File

@ -1,8 +1,8 @@
import MSR from '@/api/http/index';
import { PoolListUrl, UpdatePoolUrl, AddPoolUrl, DetailPoolUrl } from '@/api/requrls/system/resourcePool';
import { PoolListUrl, UpdatePoolUrl, AddPoolUrl, DetailPoolUrl } from '@/api/requrls/setting/resourcePool';
import type { LocationQueryValue } from 'vue-router';
import type { ResourcePoolItem, AddResourcePoolParams } from '@/models/system/resourcePool';
import type { ResourcePoolItem, AddResourcePoolParams } from '@/models/setting/resourcePool';
import type { TableQueryParams } from '@/models/common';
// 获取资源池列表

View File

@ -1,6 +1,6 @@
import MSR from '@/api/http/index';
import { GetUserListUrl, CreateUserUrl, UpdateUserUrl } from '@/api/requrls/system/user';
import type { UserListItem, CreateUserParams } from '@/models/system/user';
import { GetUserListUrl, CreateUserUrl, UpdateUserUrl } from '@/api/requrls/setting/user';
import type { UserListItem, CreateUserParams } from '@/models/setting/user';
import type { TableQueryParams } from '@/models/common';
export function getUserList(data: TableQueryParams) {

View File

@ -8,9 +8,9 @@ import {
editGlobalUSettingUrl,
postUserByUserGroupUrl,
deleteUserFromUserGroupUrl,
} from '@/api/requrls/system/usergroup';
} from '@/api/requrls/setting/usergroup';
import { TableQueryParams, CommonList } from '@/models/common';
import { UserGroupItem, UserGroupAuthSeting, SaveGlobalUSettingData, UserTableItem } from '@/models/system/usergroup';
import { UserGroupItem, UserGroupAuthSeting, SaveGlobalUSettingData, UserTableItem } from '@/models/setting/usergroup';
export function updateOrAddUserGroup(data: Partial<UserGroupItem>) {
return MSR.post<UserGroupItem>({

View File

@ -10,6 +10,7 @@
import useMenuTree from './use-menu-tree';
import { PERSONAL_ROUTE } from '@/router/routes/base';
import { BOTTOM_MENU_LIST } from '@/router/constants';
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
export default defineComponent({
emit: ['collapse'],
@ -114,20 +115,20 @@
const personalMenus = [
{
label: t('personal.info'),
icon: <icon-user />,
icon: <MsIcon type="icon-icon-contacts" class="text-[var(--color-text-4)]" />,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
route: PERSONAL_ROUTE.children![0],
},
{
label: t('personal.switchOrg'),
icon: <icon-swap />,
icon: <MsIcon type="icon-icon_switch_outlined1" class="text-[var(--color-text-4)]" />,
},
{
divider: <a-divider class="ms-dropdown-divider" />,
},
{
label: t('personal.exit'),
icon: <icon-export />,
icon: <MsIcon type="icon-icon_into-item_outlined" class="text-[var(--color-text-4)]" />,
event: () => logout(),
},
];
@ -176,7 +177,7 @@
>
<a-menu-item class="flex items-center justify-between" key="personalInfo">
<div class="hover:!bg-transparent">
<icon-face-smile-fill />
<MsIcon type="icon-icon_member_outlined" />
{userStore.name}
</div>
<icon-caret-down class="!m-0" />
@ -189,7 +190,7 @@
function travel(_route: (RouteRecordRaw | null)[] | null, nodes = []) {
if (_route) {
_route.forEach((element) => {
const icon = element?.meta?.icon ? () => h(compile(`<${element?.meta?.icon}/>`)) : null;
const icon = element?.meta?.icon ? () => <MsIcon type={element?.meta?.icon as string} /> : null;
const node =
element?.children && element?.children.length !== 0 ? (
<a-sub-menu

View File

@ -185,10 +185,10 @@
import TopMenu from '@/components/bussiness/ms-top-menu/index.vue';
import MessageBox from '../message-box/index.vue';
import { NOT_SHOW_PROJECT_SELECT_MODULE } from '@/router/constants';
import { getProjectList } from '@/api/modules/system/project';
import { getProjectList } from '@/api/modules/setting/project';
import { useI18n } from '@/hooks/useI18n';
import type { ProjectListItem } from '@/models/system/project';
import type { ProjectListItem } from '@/models/setting/project';
const appStore = useAppStore();
// const { logout } = useUser();
@ -355,3 +355,4 @@
}
}
</style>
@/models/setting/project @/api/modules/setting/project

View File

@ -1,79 +0,0 @@
<template>
<div class="tab-bar-container">
<a-affix ref="affixRef" :offset-top="offsetTop">
<div class="tab-bar-box pl-[20px]">
<div class="tab-bar-scroll leading-[32px]">
<div class="tags-wrap h-[48px] px-0 py-[4px]">
<tab-item v-for="(tag, index) in tabList" :key="tag.fullPath" :index="index" :item-data="tag" />
</div>
</div>
<div class="tag-bar-operation h-[32px] w-[100px]"></div>
</div>
</a-affix>
</div>
</template>
<script lang="ts" setup>
import { ref, computed, watch, onUnmounted } from 'vue';
import type { RouteLocationNormalized } from 'vue-router';
import { listenerRouteChange, removeRouteListener } from '@/utils/route-listener';
import { useAppStore, useTabBarStore } from '@/store';
import tabItem from './tab-item.vue';
const appStore = useAppStore();
const tabBarStore = useTabBarStore();
const affixRef = ref();
const tabList = computed(() => {
return tabBarStore.getTabList;
});
const offsetTop = computed(() => {
return appStore.navbar ? 60 : 0;
});
watch(
() => appStore.navbar,
() => {
affixRef.value.updatePosition();
}
);
listenerRouteChange((route: RouteLocationNormalized) => {
if (!route.meta.noAffix && !tabList.value.some((tag) => tag.fullPath === route.fullPath)) {
tabBarStore.updateTabList(route);
}
}, true);
onUnmounted(() => {
removeRouteListener();
});
</script>
<style scoped lang="less">
.tab-bar-container {
@apply relative;
background-color: var(--color-bg-1);
.tab-bar-box {
@apply flex p-0;
border-bottom: 1px solid var(--color-border);
background-color: var(--color-bg-1);
.tab-bar-scroll {
@apply flex-1 overflow-hidden;
.tags-wrap {
@apply overflow-x-auto whitespace-nowrap;
:deep(.arco-tag) {
@apply inline-flex cursor-pointer items-center;
margin-right: 6px;
&:first-child {
.arco-tag-close-btn {
@apply hidden;
}
}
}
}
}
}
}
</style>

View File

@ -1,12 +0,0 @@
## 组件说明
该组件非官方最终设计规范,以单独组件存在。
同时仅仅提供最基本的功能,后续进行优化及更改。
## Component description
The component unofficial final design specification exists as a separate component.
At the same time, only the most basic functions are provided, and subsequent optimizations and changes will be made.

View File

@ -1,189 +0,0 @@
<template>
<a-dropdown trigger="contextMenu" :popup-max-height="false" @select="actionSelect">
<span
class="arco-tag arco-tag-size-medium arco-tag-checked"
:class="{ 'link-activated': itemData.fullPath === $route.fullPath }"
@click="goto(itemData)"
>
<span class="tag-link">
{{ $t(itemData.title) }}
</span>
<span
class="arco-icon-hover arco-tag-icon-hover arco-icon-hover-size-medium arco-tag-close-btn"
@click.stop="tagClose(itemData, index)"
>
<icon-close />
</span>
</span>
<template #content>
<a-doption :disabled="disabledReload" :value="Eaction.reload">
<icon-refresh />
<span>重新加载</span>
</a-doption>
<a-doption class="sperate-line" :disabled="disabledCurrent" :value="Eaction.current">
<icon-close />
<span>关闭当前标签页</span>
</a-doption>
<a-doption :disabled="disabledLeft" :value="Eaction.left">
<icon-to-left />
<span>关闭左侧标签页</span>
</a-doption>
<a-doption class="sperate-line" :disabled="disabledRight" :value="Eaction.right">
<icon-to-right />
<span>关闭右侧标签页</span>
</a-doption>
<a-doption :value="Eaction.others">
<icon-swap />
<span>关闭其它标签页</span>
</a-doption>
<a-doption :value="Eaction.all">
<icon-folder-delete />
<span>关闭全部标签页</span>
</a-doption>
</template>
</a-dropdown>
</template>
<script lang="ts" setup>
import { PropType, computed } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { useTabBarStore } from '@/store';
import type { TabProps } from '@/store/modules/tab-bar/types';
import { DEFAULT_ROUTE_NAME, REDIRECT_ROUTE_NAME } from '@/router/constants';
// eslint-disable-next-line no-shadow
enum Eaction {
reload = 'reload',
current = 'current',
left = 'left',
right = 'right',
others = 'others',
all = 'all',
}
const props = defineProps({
itemData: {
type: Object as PropType<TabProps>,
default() {
return [];
},
},
index: {
type: Number,
default: 0,
},
});
const router = useRouter();
const route = useRoute();
const tabBarStore = useTabBarStore();
const goto = (tag: TabProps) => {
router.push({ ...tag });
};
const tabList = computed(() => {
return tabBarStore.getTabList;
});
const disabledReload = computed(() => {
return props.itemData.fullPath !== route.fullPath;
});
const disabledCurrent = computed(() => {
return props.index === 0;
});
const disabledLeft = computed(() => {
return [0, 1].includes(props.index);
});
const disabledRight = computed(() => {
return props.index === tabList.value.length - 1;
});
const tagClose = (tag: TabProps, idx: number) => {
tabBarStore.deleteTag(idx, tag);
if (props.itemData.fullPath === route.fullPath) {
const latest = tabList.value[idx - 1]; // tab
router.push({ name: latest.name });
}
};
const findCurrentRouteIndex = () => {
return tabList.value.findIndex((el) => el.fullPath === route.fullPath);
};
const actionSelect = async (value: any) => {
const { itemData, index } = props;
const copyTagList = [...tabList.value];
if (value === Eaction.current) {
tagClose(itemData, index);
} else if (value === Eaction.left) {
const currentRouteIdx = findCurrentRouteIndex();
copyTagList.splice(1, props.index - 1);
tabBarStore.freshTabList(copyTagList);
if (currentRouteIdx < index) {
router.push({ name: itemData.name });
}
} else if (value === Eaction.right) {
const currentRouteIdx = findCurrentRouteIndex();
copyTagList.splice(props.index + 1);
tabBarStore.freshTabList(copyTagList);
if (currentRouteIdx > index) {
router.push({ name: itemData.name });
}
} else if (value === Eaction.others) {
const filterList = tabList.value.filter((el, idx) => {
return idx === 0 || idx === props.index;
});
tabBarStore.freshTabList(filterList);
router.push({ name: itemData.name });
} else if (value === Eaction.reload) {
tabBarStore.deleteCache(itemData);
await router.push({
name: REDIRECT_ROUTE_NAME,
params: {
path: route.fullPath,
},
});
tabBarStore.addCache(itemData.name);
} else {
tabBarStore.resetTabList();
router.push({ name: DEFAULT_ROUTE_NAME });
}
};
</script>
<style scoped lang="less">
.tag-link {
@apply no-underline;
color: var(--color-text-2);
}
.link-activated {
color: rgb(var(--link-6));
.tag-link {
color: rgb(var(--link-6));
}
& + .arco-tag-close-btn {
color: rgb(var(--link-6));
}
}
:deep(.arco-dropdown-option-content) {
span {
margin-left: 10px;
}
}
.arco-dropdown-open {
.tag-link {
color: rgb(var(--danger-6));
}
.arco-tag-close-btn {
color: rgb(var(--danger-6));
}
}
.sperate-line {
border-bottom: 1px solid var(--color-neutral-3);
}
</style>

View File

@ -42,7 +42,6 @@
width: `calc(100vw - ${menuWidth}px)`,
}"
>
<TabBar v-if="appStore.tabBar" />
<a-layout-content>
<PageLayout />
</a-layout-content>
@ -62,7 +61,6 @@
import NavBar from '@/components/pure/navbar/index.vue';
import Menu from '@/components/pure/menu/index.vue';
import Footer from '@/components/pure/footer/index.vue';
import TabBar from '@/components/pure/tab-bar/index.vue';
import usePermission from '@/hooks/usePermission';
import PageLayout from './page-layout.vue';
import MsBreadCrumb from '@/components/bussiness/ms-breadcrumb/index.vue';

View File

@ -4,7 +4,7 @@
<!-- transition内必须有且只有一个根元素不然会导致二级路由的组件无法渲染 -->
<div class="page-content">
<component :is="Component" v-if="route.meta.ignoreCache" :key="route.fullPath" />
<keep-alive v-else :include="cacheList">
<keep-alive v-else>
<component :is="Component" :key="route.fullPath" />
</keep-alive>
</div>
@ -12,14 +12,7 @@
</router-view>
</template>
<script lang="ts" setup>
import { computed } from 'vue';
import { useTabBarStore } from '@/store';
const tabBarStore = useTabBarStore();
const cacheList = computed(() => tabBarStore.getCacheList);
</script>
<script lang="ts" setup></script>
<style lang="less" scoped>
.page-content {

View File

@ -1,13 +1,13 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
const System: AppRouteRecordRaw = {
const Setting: AppRouteRecordRaw = {
path: '/setting',
name: 'setting',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.settings',
icon: 'icon-dashboard',
icon: 'icon-a-icon_system_settings',
order: 0,
},
children: [
@ -25,7 +25,7 @@ const System: AppRouteRecordRaw = {
{
path: 'user',
name: 'settingSystemUser',
component: () => import('@/views/system/user/index.vue'),
component: () => import('@/views/setting/system/user/index.vue'),
meta: {
locale: 'menu.settings.system.user',
roles: ['*'],
@ -35,7 +35,7 @@ const System: AppRouteRecordRaw = {
{
path: 'usergroup',
name: 'settingSystemUsergroup',
component: () => import('@/views/system/usergroup/index.vue'),
component: () => import('@/views/setting/system/usergroup/index.vue'),
meta: {
locale: 'menu.settings.system.usergroup',
roles: ['*'],
@ -45,7 +45,7 @@ const System: AppRouteRecordRaw = {
{
path: 'resourcePool',
name: 'settingSystemResourcePool',
component: () => import('@/views/system/resourcePool/index.vue'),
component: () => import('@/views/setting/system/resourcePool/index.vue'),
meta: {
locale: 'menu.settings.system.resourcePool',
roles: ['*'],
@ -61,7 +61,7 @@ const System: AppRouteRecordRaw = {
{
path: 'resourcePoolDetail',
name: 'settingSystemResourcePoolDetail',
component: () => import('@/views/system/resourcePool/detail.vue'),
component: () => import('@/views/setting/system/resourcePool/detail.vue'),
meta: {
locale: 'menu.settings.system.resourcePoolDetail',
roles: ['*'],
@ -82,7 +82,7 @@ const System: AppRouteRecordRaw = {
{
path: 'pluginmanger',
name: 'settingSystemPluginManger',
component: () => import('@/views/system/pluginManager/index.vue'),
component: () => import('@/views/setting/system/pluginManager/index.vue'),
meta: {
locale: 'menu.settings.system.pluginmanger',
roles: ['*'],
@ -105,7 +105,7 @@ const System: AppRouteRecordRaw = {
{
path: 'member',
name: 'settingOrganizationMember',
component: () => import('@/views/organization/member/index.vue'),
component: () => import('@/views/setting/organization/member/index.vue'),
meta: {
locale: 'menu.settings.organization.member',
roles: ['*'],
@ -117,4 +117,4 @@ const System: AppRouteRecordRaw = {
],
};
export default System;
export default Setting;

View File

@ -3,10 +3,9 @@ import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import useAppStore from './modules/app';
import useVisitStore from './modules/app/visit';
import useUserStore from './modules/user';
import useTabBarStore from './modules/tab-bar';
import { debouncePlugin } from './plugins';
const pinia = createPinia().use(debouncePlugin).use(piniaPluginPersistedstate);
export { useAppStore, useUserStore, useTabBarStore, useVisitStore };
export { useAppStore, useUserStore, useVisitStore };
export default pinia;

View File

@ -1,95 +0,0 @@
import type { RouteLocationNormalized } from 'vue-router';
import { defineStore } from 'pinia';
import { DEFAULT_ROUTE, DEFAULT_ROUTE_NAME, REDIRECT_ROUTE_NAME } from '@/router/constants';
import { isString } from '@/utils/is';
import { TabBarState, TabProps } from './types';
const formatTag = (route: RouteLocationNormalized): TabProps => {
const { name, meta, fullPath, query } = route;
return {
title: meta.locale || '',
name: String(name),
fullPath,
query,
ignoreCache: meta.ignoreCache,
};
};
const BAN_LIST = [REDIRECT_ROUTE_NAME];
const useTabBarStore = defineStore('tabBar', {
state: (): TabBarState => ({
cacheTabList: new Set([DEFAULT_ROUTE_NAME]),
tabList: [DEFAULT_ROUTE],
}),
getters: {
getTabList(): TabProps[] {
return this.tabList;
},
getCacheList(): string[] {
return Array.from(this.cacheTabList);
},
},
actions: {
/**
* tabs
* @param route
* @returns void
*/
updateTabList(route: RouteLocationNormalized) {
if (BAN_LIST.includes(route.name as string)) return;
this.tabList.push(formatTag(route));
if (!route.meta.ignoreCache) {
this.cacheTabList.add(route.name as string);
}
},
/**
* tab
* @param idx
* @param tag
*/
deleteTag(idx: number, tag: TabProps) {
this.tabList.splice(idx, 1);
this.cacheTabList.delete(tag.name);
},
/**
*
* @param name
*/
addCache(name: string) {
if (isString(name) && name !== '') this.cacheTabList.add(name);
},
/**
*
* @param tag
*/
deleteCache(tag: TabProps) {
this.cacheTabList.delete(tag.name);
},
/**
* tabs
* @param tabs tabs
*/
freshTabList(tabs: TabProps[]) {
this.tabList = tabs;
this.cacheTabList.clear();
// 要先判断ignoreCache
this.tabList
.filter((el) => !el.ignoreCache)
.map((el) => el.name)
.forEach((x) => this.cacheTabList.add(x));
},
/**
* tabs
*/
resetTabList() {
this.tabList = [DEFAULT_ROUTE];
this.cacheTabList.clear();
this.cacheTabList.add(DEFAULT_ROUTE_NAME);
},
},
});
export default useTabBarStore;

View File

@ -1,12 +0,0 @@
export interface TabProps {
title: string;
name: string;
fullPath: string;
query?: any;
ignoreCache?: boolean;
}
export interface TabBarState {
tabList: TabProps[];
cacheTabList: Set<string>;
}

View File

@ -45,7 +45,7 @@
<script setup lang="ts">
import { ref, reactive } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import type { AddMemberForm } from '@/models/system/member';
import type { AddMemberForm } from '@/models/setting/member';
import { useDialog } from '@/hooks/useDialog';
const { t } = useI18n();
@ -102,3 +102,4 @@
</script>
<style lang="less" scoped></style>
@/models/setting/member

View File

@ -55,7 +55,7 @@
import { Message } from '@arco-design/web-vue';
import useTable from '@/components/pure/ms-table/useTable';
import addMemberModal from './components/addMemberModal.vue';
import { getMemberList } from '@/api/modules/system/member';
import { getMemberList } from '@/api/modules/setting/member';
import type { MsTableColumn } from '@/components/pure/ms-table/type';
import useModal from '@/hooks/useModal';
import { useCommandComponent } from '@/hooks/useCommandComponent';
@ -170,3 +170,4 @@
</script>
<style lang="less" scoped></style>
@/api/modules/setting/member

View File

@ -20,7 +20,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import type { SceneItem, SceneList } from '@/models/system/plugin';
import type { SceneItem, SceneList } from '@/models/setting/plugin';
import { useI18n } from '@/hooks/useI18n';
const { t } = useI18n();
@ -64,3 +64,4 @@
}
}
</style>
@/models/setting/plugin

View File

@ -57,7 +57,7 @@
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
import type { MsTableColumn } from '@/components/pure/ms-table/type';
import type { ActionsItem } from '@/components/pure/ms-table-more-action/types';
import { getPluginList } from '@/api/modules/system/pluginManger';
import { getPluginList } from '@/api/modules/setting/pluginManger';
import MsButton from '@/components/pure/ms-button/index.vue';
import UploadModel from './uploadModel.vue';
import UpdatePluginModal from './updatePluginModal.vue';
@ -228,3 +228,4 @@
</script>
<style scoped></style>
@/api/modules/setting/pluginManger

View File

@ -41,7 +41,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import { useDialog } from '@/hooks/useDialog';
import type { SceneItem, SceneList } from '@/models/system/plugin';
import type { SceneItem, SceneList } from '@/models/setting/plugin';
import { useI18n } from '@/hooks/useI18n';
@ -92,3 +92,4 @@
}
}
</style>
@/models/setting/plugin

View File

@ -7,7 +7,7 @@
<script setup lang="ts">
import { ref, watchEffect } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import type { StepList } from '@/models/system/plugin';
import type { StepList } from '@/models/setting/plugin';
const { t } = useI18n();
const props = defineProps<{
@ -34,3 +34,4 @@
padding: 10px;
}
</style>
@/models/setting/plugin

View File

@ -42,7 +42,7 @@
<script setup lang="ts">
import { ref, watchEffect, reactive, onMounted } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import type { PluginForm } from '@/models/system/plugin';
import type { PluginForm } from '@/models/setting/plugin';
const { t } = useI18n();
const props = defineProps<{
@ -92,3 +92,4 @@
</script>
<style scoped></style>
@/models/setting/plugin

View File

@ -29,7 +29,7 @@
<script setup lang="ts">
import { ref, watchEffect } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import type { StepList } from '@/models/system/plugin';
import type { StepList } from '@/models/setting/plugin';
import StepProgress from './stepProgress.vue';
import SceneList from './SceneList.vue';
import uploadPlugin from './uploadPlugin.vue';
@ -87,3 +87,4 @@
</script>
<style scoped lang="less"></style>
@/models/setting/plugin

View File

@ -342,10 +342,10 @@
import { getYaml, YamlType, job } from './template';
import { downloadStringFile, sleep } from '@/utils';
import { scrollIntoView } from '@/utils/dom';
import { addPool, getPoolInfo } from '@/api/modules/system/resourcePool';
import { addPool, getPoolInfo } from '@/api/modules/setting/resourcePool';
import type { MsBatchFormInstance, FormItemModel } from '@/components/bussiness/ms-batch-form/types';
import type { AddResourcePoolParams, NodesListItem } from '@/models/system/resourcePool';
import type { AddResourcePoolParams, NodesListItem } from '@/models/setting/resourcePool';
const route = useRoute();
const router = useRouter();
@ -795,3 +795,4 @@
}
}
</style>
@/models/setting/resourcePool @/api/modules/setting/resourcePool

View File

@ -56,7 +56,7 @@
import { useRouter } from 'vue-router';
import { Message } from '@arco-design/web-vue';
import { useI18n } from '@/hooks/useI18n';
import { getPoolList } from '@/api/modules/system/resourcePool';
import { getPoolList } from '@/api/modules/setting/resourcePool';
import useModal from '@/hooks/useModal';
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
import useTable from '@/components/pure/ms-table/useTable';
@ -68,7 +68,7 @@
import type { Description } from '@/components/pure/ms-description/index.vue';
import type { MsTableColumn } from '@/components/pure/ms-table/type';
import type { ActionsItem } from '@/components/pure/ms-table-more-action/types';
import type { ResourcePoolItem } from '@/models/system/resourcePool';
import type { ResourcePoolItem } from '@/models/setting/resourcePool';
const { t } = useI18n();
const router = useRouter();
@ -387,3 +387,4 @@
</script>
<style lang="less" scoped></style>
@/models/setting/resourcePool @/api/modules/setting/resourcePool

View File

@ -271,7 +271,7 @@
import useTable from '@/components/pure/ms-table/useTable';
import MsButton from '@/components/pure/ms-button/index.vue';
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
import { getUserList, batchCreateUser } from '@/api/modules/system/user';
import { getUserList, batchCreateUser } from '@/api/modules/setting/user';
import { validateEmail, validatePhone } from '@/utils/validate';
import batchModal from './components/batchModal.vue';
import inviteModal from './components/inviteModal.vue';
@ -280,7 +280,7 @@
import type { FormInstance, ValidatedError } from '@arco-design/web-vue';
import type { MsTableColumn } from '@/components/pure/ms-table/type';
import type { ActionsItem } from '@/components/pure/ms-table-more-action/types';
import type { UserListItem } from '@/models/system/user';
import type { UserListItem } from '@/models/setting/user';
const { t } = useI18n();
@ -826,3 +826,4 @@
</script>
<style lang="less" scoped></style>
@/models/setting/user @/api/modules/setting/user

View File

@ -41,7 +41,7 @@
<script lang="ts" setup>
import { useI18n } from '@/hooks/useI18n';
import { reactive, ref, watchEffect } from 'vue';
import { UserGroupItem } from '@/models/system/usergroup';
import { UserGroupItem } from '@/models/setting/usergroup';
import type { FormInstance, ValidatedError } from '@arco-design/web-vue';
const { t } = useI18n();
@ -92,3 +92,4 @@
});
};
</script>
@/models/setting/usergroup

View File

@ -40,7 +40,7 @@
<script lang="ts" setup>
import { useI18n } from '@/hooks/useI18n';
import { reactive, ref, watchEffect, onUnmounted } from 'vue';
import { UserOption } from '@/models/system/usergroup';
import { UserOption } from '@/models/setting/usergroup';
const { t } = useI18n();
const props = defineProps<{
@ -114,3 +114,4 @@
color: var(--color-text-4);
}
</style>
@/models/setting/usergroup

View File

@ -53,9 +53,9 @@
import { useI18n } from '@/hooks/useI18n';
import { RenderFunction, VNodeChild, ref, watchEffect } from 'vue';
import { type TableColumnData, type TableData } from '@arco-design/web-vue';
import useUserGroupStore from '@/store/modules/system/usergroup';
import { getGlobalUSetting, saveGlobalUSetting } from '@/api/modules/system/usergroup';
import { UserGroupAuthSeting, AuthTableItem, type AuthScopeType, SavePermissions } from '@/models/system/usergroup';
import useUserGroupStore from '@/store/modules/setting/usergroup';
import { getGlobalUSetting, saveGlobalUSetting } from '@/api/modules/setting/usergroup';
import { UserGroupAuthSeting, AuthTableItem, type AuthScopeType, SavePermissions } from '@/models/setting/usergroup';
import MsButton from '@/components/pure/ms-button/index.vue';
export declare type OperationName = 'selection-checkbox' | 'selection-radio' | 'expand' | 'drag-handle';
@ -295,3 +295,4 @@
width: calc(100% - 24px);
}
</style>
@/models/setting/usergroup @/api/modules/setting/usergroup

View File

@ -61,7 +61,7 @@
<script lang="ts" setup>
import { ref, onMounted } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import { CustomMoreActionItem, PopVisibleItem, RenameType, UserGroupItem } from '@/models/system/usergroup';
import { CustomMoreActionItem, PopVisibleItem, RenameType, UserGroupItem } from '@/models/setting/usergroup';
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
import { ActionsItem } from '@/components/pure/ms-table-more-action/types';
import AddUserModal from './addUserModal.vue';
@ -69,8 +69,8 @@
import useModal from '@/hooks/useModal';
import { Message } from '@arco-design/web-vue';
import popconfirm from './popconfirm.vue';
import useUserGroupStore from '@/store/modules/system/usergroup';
import { getUserGroupList, updateOrAddUserGroup, deleteUserGroup } from '@/api/modules/system/usergroup';
import useUserGroupStore from '@/store/modules/setting/usergroup';
import { getUserGroupList, updateOrAddUserGroup, deleteUserGroup } from '@/api/modules/setting/usergroup';
const { t } = useI18n();
@ -299,3 +299,4 @@
color: var(--color-text-1);
}
</style>
@/models/setting/usergroup @/api/modules/setting/usergroup

View File

@ -30,7 +30,7 @@
<script setup lang="ts">
import { useI18n } from '@/hooks/useI18n';
import { watchEffect, ref, computed, onUnmounted } from 'vue';
import { CustomMoreActionItem, RenameType, UserGroupItem } from '@/models/system/usergroup';
import { CustomMoreActionItem, RenameType, UserGroupItem } from '@/models/setting/usergroup';
import { ValidatedError } from '@arco-design/web-vue';
const { t } = useI18n();
@ -134,3 +134,4 @@
background-color: rgb(var(--primary-9));
}
</style>
@/models/setting/usergroup

View File

@ -11,10 +11,10 @@
import useTable from '@/components/pure/ms-table/useTable';
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
import { MsTableColumn } from '@/components/pure/ms-table/type';
import useUserGroupStore from '@/store/modules/system/usergroup';
import useUserGroupStore from '@/store/modules/setting/usergroup';
import { watchEffect } from 'vue';
import { postUserByUserGroup, deleteUserFromUserGroup } from '@/api/modules/system/usergroup';
import { UserTableItem } from '@/models/system/usergroup';
import { postUserByUserGroup, deleteUserFromUserGroup } from '@/api/modules/setting/usergroup';
import { UserTableItem } from '@/models/setting/usergroup';
const { t } = useI18n();
const store = useUserGroupStore();
@ -58,3 +58,4 @@
}
});
</script>
@/models/setting/usergroup @/api/modules/setting/usergroup

View File

@ -33,7 +33,7 @@
<script lang="ts" setup>
import { ref } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import useUserGroupStore from '@/store/modules/system/usergroup';
import useUserGroupStore from '@/store/modules/setting/usergroup';
import UserGroupLeft from './components/index.vue';
import UserTable from './components/userTable.vue';
import AuthTable from './components/authTable.vue';