feat: 目录调整&剔除 tab-bar
This commit is contained in:
parent
c63155faaa
commit
40c55173bf
|
@ -362,20 +362,12 @@ export default function usePermission() {
|
||||||
<transition name="fade" mode="out-in" appear>
|
<transition name="fade" mode="out-in" appear>
|
||||||
<component :is="Component" v-if="route.meta.ignoreCache" :key="route.fullPath" />
|
<component :is="Component" v-if="route.meta.ignoreCache" :key="route.fullPath" />
|
||||||
<!-- keep-alive提供组件状态缓存,以便快速渲染组件内容 -->
|
<!-- keep-alive提供组件状态缓存,以便快速渲染组件内容 -->
|
||||||
<keep-alive v-else :include="cacheList">
|
<keep-alive v-else>
|
||||||
<component :is="Component" :key="route.fullPath" />
|
<component :is="Component" :key="route.fullPath" />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</transition>
|
</transition>
|
||||||
</router-view>
|
</router-view>
|
||||||
</template>
|
</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>
|
<a name="KZkaZ"></a>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import MSR from '@/api/http/index';
|
import MSR from '@/api/http/index';
|
||||||
import { GetMemberListUrl, AddMemberUrl } from '@/api/requrls/system/member';
|
import { GetMemberListUrl, AddMemberUrl } from '@/api/requrls/setting/member';
|
||||||
import type { UserListItem, CreateUserParams } from '@/models/system/user';
|
import type { UserListItem, CreateUserParams } from '@/models/setting/user';
|
||||||
import type { TableQueryParams } from '@/models/common';
|
import type { TableQueryParams } from '@/models/common';
|
||||||
|
|
||||||
export function getMemberList(data: TableQueryParams) {
|
export function getMemberList(data: TableQueryParams) {
|
|
@ -1,6 +1,6 @@
|
||||||
import MSR from '@/api/http/index';
|
import MSR from '@/api/http/index';
|
||||||
import { GetPluginListUrl } from '@/api/requrls/system/plugin';
|
import { GetPluginListUrl } from '@/api/requrls/setting/plugin';
|
||||||
import type { PluginList } from '@/models/system/plugin';
|
import type { PluginList } from '@/models/setting/plugin';
|
||||||
import type { TableQueryParams } from '@/models/common';
|
import type { TableQueryParams } from '@/models/common';
|
||||||
|
|
||||||
// eslint-disable-next-line import/prefer-default-export
|
// eslint-disable-next-line import/prefer-default-export
|
|
@ -1,6 +1,6 @@
|
||||||
import MSR from '@/api/http/index';
|
import MSR from '@/api/http/index';
|
||||||
import { ProjectListUrl } from '@/api/requrls/system/project';
|
import { ProjectListUrl } from '@/api/requrls/setting/project';
|
||||||
import type { ProjectListItem } from '@/models/system/project';
|
import type { ProjectListItem } from '@/models/setting/project';
|
||||||
|
|
||||||
export function getProjectList(organizationId: string) {
|
export function getProjectList(organizationId: string) {
|
||||||
return MSR.get<ProjectListItem[]>({ url: ProjectListUrl, params: organizationId });
|
return MSR.get<ProjectListItem[]>({ url: ProjectListUrl, params: organizationId });
|
|
@ -1,8 +1,8 @@
|
||||||
import MSR from '@/api/http/index';
|
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 { 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';
|
import type { TableQueryParams } from '@/models/common';
|
||||||
|
|
||||||
// 获取资源池列表
|
// 获取资源池列表
|
|
@ -1,6 +1,6 @@
|
||||||
import MSR from '@/api/http/index';
|
import MSR from '@/api/http/index';
|
||||||
import { GetUserListUrl, CreateUserUrl, UpdateUserUrl } from '@/api/requrls/system/user';
|
import { GetUserListUrl, CreateUserUrl, UpdateUserUrl } from '@/api/requrls/setting/user';
|
||||||
import type { UserListItem, CreateUserParams } from '@/models/system/user';
|
import type { UserListItem, CreateUserParams } from '@/models/setting/user';
|
||||||
import type { TableQueryParams } from '@/models/common';
|
import type { TableQueryParams } from '@/models/common';
|
||||||
|
|
||||||
export function getUserList(data: TableQueryParams) {
|
export function getUserList(data: TableQueryParams) {
|
|
@ -8,9 +8,9 @@ import {
|
||||||
editGlobalUSettingUrl,
|
editGlobalUSettingUrl,
|
||||||
postUserByUserGroupUrl,
|
postUserByUserGroupUrl,
|
||||||
deleteUserFromUserGroupUrl,
|
deleteUserFromUserGroupUrl,
|
||||||
} from '@/api/requrls/system/usergroup';
|
} from '@/api/requrls/setting/usergroup';
|
||||||
import { TableQueryParams, CommonList } from '@/models/common';
|
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>) {
|
export function updateOrAddUserGroup(data: Partial<UserGroupItem>) {
|
||||||
return MSR.post<UserGroupItem>({
|
return MSR.post<UserGroupItem>({
|
|
@ -10,6 +10,7 @@
|
||||||
import useMenuTree from './use-menu-tree';
|
import useMenuTree from './use-menu-tree';
|
||||||
import { PERSONAL_ROUTE } from '@/router/routes/base';
|
import { PERSONAL_ROUTE } from '@/router/routes/base';
|
||||||
import { BOTTOM_MENU_LIST } from '@/router/constants';
|
import { BOTTOM_MENU_LIST } from '@/router/constants';
|
||||||
|
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
emit: ['collapse'],
|
emit: ['collapse'],
|
||||||
|
@ -114,20 +115,20 @@
|
||||||
const personalMenus = [
|
const personalMenus = [
|
||||||
{
|
{
|
||||||
label: t('personal.info'),
|
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
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
route: PERSONAL_ROUTE.children![0],
|
route: PERSONAL_ROUTE.children![0],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('personal.switchOrg'),
|
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" />,
|
divider: <a-divider class="ms-dropdown-divider" />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('personal.exit'),
|
label: t('personal.exit'),
|
||||||
icon: <icon-export />,
|
icon: <MsIcon type="icon-icon_into-item_outlined" class="text-[var(--color-text-4)]" />,
|
||||||
event: () => logout(),
|
event: () => logout(),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -176,7 +177,7 @@
|
||||||
>
|
>
|
||||||
<a-menu-item class="flex items-center justify-between" key="personalInfo">
|
<a-menu-item class="flex items-center justify-between" key="personalInfo">
|
||||||
<div class="hover:!bg-transparent">
|
<div class="hover:!bg-transparent">
|
||||||
<icon-face-smile-fill />
|
<MsIcon type="icon-icon_member_outlined" />
|
||||||
{userStore.name}
|
{userStore.name}
|
||||||
</div>
|
</div>
|
||||||
<icon-caret-down class="!m-0" />
|
<icon-caret-down class="!m-0" />
|
||||||
|
@ -189,7 +190,7 @@
|
||||||
function travel(_route: (RouteRecordRaw | null)[] | null, nodes = []) {
|
function travel(_route: (RouteRecordRaw | null)[] | null, nodes = []) {
|
||||||
if (_route) {
|
if (_route) {
|
||||||
_route.forEach((element) => {
|
_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 =
|
const node =
|
||||||
element?.children && element?.children.length !== 0 ? (
|
element?.children && element?.children.length !== 0 ? (
|
||||||
<a-sub-menu
|
<a-sub-menu
|
||||||
|
|
|
@ -185,10 +185,10 @@
|
||||||
import TopMenu from '@/components/bussiness/ms-top-menu/index.vue';
|
import TopMenu from '@/components/bussiness/ms-top-menu/index.vue';
|
||||||
import MessageBox from '../message-box/index.vue';
|
import MessageBox from '../message-box/index.vue';
|
||||||
import { NOT_SHOW_PROJECT_SELECT_MODULE } from '@/router/constants';
|
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 { useI18n } from '@/hooks/useI18n';
|
||||||
|
|
||||||
import type { ProjectListItem } from '@/models/system/project';
|
import type { ProjectListItem } from '@/models/setting/project';
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
// const { logout } = useUser();
|
// const { logout } = useUser();
|
||||||
|
@ -355,3 +355,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@/models/setting/project @/api/modules/setting/project
|
||||||
|
|
|
@ -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>
|
|
|
@ -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.
|
|
|
@ -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>
|
|
|
@ -42,7 +42,6 @@
|
||||||
width: `calc(100vw - ${menuWidth}px)`,
|
width: `calc(100vw - ${menuWidth}px)`,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<TabBar v-if="appStore.tabBar" />
|
|
||||||
<a-layout-content>
|
<a-layout-content>
|
||||||
<PageLayout />
|
<PageLayout />
|
||||||
</a-layout-content>
|
</a-layout-content>
|
||||||
|
@ -62,7 +61,6 @@
|
||||||
import NavBar from '@/components/pure/navbar/index.vue';
|
import NavBar from '@/components/pure/navbar/index.vue';
|
||||||
import Menu from '@/components/pure/menu/index.vue';
|
import Menu from '@/components/pure/menu/index.vue';
|
||||||
import Footer from '@/components/pure/footer/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 usePermission from '@/hooks/usePermission';
|
||||||
import PageLayout from './page-layout.vue';
|
import PageLayout from './page-layout.vue';
|
||||||
import MsBreadCrumb from '@/components/bussiness/ms-breadcrumb/index.vue';
|
import MsBreadCrumb from '@/components/bussiness/ms-breadcrumb/index.vue';
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<!-- transition内必须有且只有一个根元素,不然会导致二级路由的组件无法渲染 -->
|
<!-- transition内必须有且只有一个根元素,不然会导致二级路由的组件无法渲染 -->
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<component :is="Component" v-if="route.meta.ignoreCache" :key="route.fullPath" />
|
<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" />
|
<component :is="Component" :key="route.fullPath" />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,14 +12,7 @@
|
||||||
</router-view>
|
</router-view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup></script>
|
||||||
import { computed } from 'vue';
|
|
||||||
import { useTabBarStore } from '@/store';
|
|
||||||
|
|
||||||
const tabBarStore = useTabBarStore();
|
|
||||||
|
|
||||||
const cacheList = computed(() => tabBarStore.getCacheList);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.page-content {
|
.page-content {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { DEFAULT_LAYOUT } from '../base';
|
import { DEFAULT_LAYOUT } from '../base';
|
||||||
import { AppRouteRecordRaw } from '../types';
|
import { AppRouteRecordRaw } from '../types';
|
||||||
|
|
||||||
const System: AppRouteRecordRaw = {
|
const Setting: AppRouteRecordRaw = {
|
||||||
path: '/setting',
|
path: '/setting',
|
||||||
name: 'setting',
|
name: 'setting',
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.settings',
|
locale: 'menu.settings',
|
||||||
icon: 'icon-dashboard',
|
icon: 'icon-a-icon_system_settings',
|
||||||
order: 0,
|
order: 0,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
@ -25,7 +25,7 @@ const System: AppRouteRecordRaw = {
|
||||||
{
|
{
|
||||||
path: 'user',
|
path: 'user',
|
||||||
name: 'settingSystemUser',
|
name: 'settingSystemUser',
|
||||||
component: () => import('@/views/system/user/index.vue'),
|
component: () => import('@/views/setting/system/user/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.settings.system.user',
|
locale: 'menu.settings.system.user',
|
||||||
roles: ['*'],
|
roles: ['*'],
|
||||||
|
@ -35,7 +35,7 @@ const System: AppRouteRecordRaw = {
|
||||||
{
|
{
|
||||||
path: 'usergroup',
|
path: 'usergroup',
|
||||||
name: 'settingSystemUsergroup',
|
name: 'settingSystemUsergroup',
|
||||||
component: () => import('@/views/system/usergroup/index.vue'),
|
component: () => import('@/views/setting/system/usergroup/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.settings.system.usergroup',
|
locale: 'menu.settings.system.usergroup',
|
||||||
roles: ['*'],
|
roles: ['*'],
|
||||||
|
@ -45,7 +45,7 @@ const System: AppRouteRecordRaw = {
|
||||||
{
|
{
|
||||||
path: 'resourcePool',
|
path: 'resourcePool',
|
||||||
name: 'settingSystemResourcePool',
|
name: 'settingSystemResourcePool',
|
||||||
component: () => import('@/views/system/resourcePool/index.vue'),
|
component: () => import('@/views/setting/system/resourcePool/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.settings.system.resourcePool',
|
locale: 'menu.settings.system.resourcePool',
|
||||||
roles: ['*'],
|
roles: ['*'],
|
||||||
|
@ -61,7 +61,7 @@ const System: AppRouteRecordRaw = {
|
||||||
{
|
{
|
||||||
path: 'resourcePoolDetail',
|
path: 'resourcePoolDetail',
|
||||||
name: 'settingSystemResourcePoolDetail',
|
name: 'settingSystemResourcePoolDetail',
|
||||||
component: () => import('@/views/system/resourcePool/detail.vue'),
|
component: () => import('@/views/setting/system/resourcePool/detail.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.settings.system.resourcePoolDetail',
|
locale: 'menu.settings.system.resourcePoolDetail',
|
||||||
roles: ['*'],
|
roles: ['*'],
|
||||||
|
@ -82,7 +82,7 @@ const System: AppRouteRecordRaw = {
|
||||||
{
|
{
|
||||||
path: 'pluginmanger',
|
path: 'pluginmanger',
|
||||||
name: 'settingSystemPluginManger',
|
name: 'settingSystemPluginManger',
|
||||||
component: () => import('@/views/system/pluginManager/index.vue'),
|
component: () => import('@/views/setting/system/pluginManager/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.settings.system.pluginmanger',
|
locale: 'menu.settings.system.pluginmanger',
|
||||||
roles: ['*'],
|
roles: ['*'],
|
||||||
|
@ -105,7 +105,7 @@ const System: AppRouteRecordRaw = {
|
||||||
{
|
{
|
||||||
path: 'member',
|
path: 'member',
|
||||||
name: 'settingOrganizationMember',
|
name: 'settingOrganizationMember',
|
||||||
component: () => import('@/views/organization/member/index.vue'),
|
component: () => import('@/views/setting/organization/member/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.settings.organization.member',
|
locale: 'menu.settings.organization.member',
|
||||||
roles: ['*'],
|
roles: ['*'],
|
||||||
|
@ -117,4 +117,4 @@ const System: AppRouteRecordRaw = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default System;
|
export default Setting;
|
|
@ -3,10 +3,9 @@ import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
||||||
import useAppStore from './modules/app';
|
import useAppStore from './modules/app';
|
||||||
import useVisitStore from './modules/app/visit';
|
import useVisitStore from './modules/app/visit';
|
||||||
import useUserStore from './modules/user';
|
import useUserStore from './modules/user';
|
||||||
import useTabBarStore from './modules/tab-bar';
|
|
||||||
import { debouncePlugin } from './plugins';
|
import { debouncePlugin } from './plugins';
|
||||||
|
|
||||||
const pinia = createPinia().use(debouncePlugin).use(piniaPluginPersistedstate);
|
const pinia = createPinia().use(debouncePlugin).use(piniaPluginPersistedstate);
|
||||||
|
|
||||||
export { useAppStore, useUserStore, useTabBarStore, useVisitStore };
|
export { useAppStore, useUserStore, useVisitStore };
|
||||||
export default pinia;
|
export default pinia;
|
||||||
|
|
|
@ -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;
|
|
|
@ -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>;
|
|
||||||
}
|
|
|
@ -45,7 +45,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive } from 'vue';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import type { AddMemberForm } from '@/models/system/member';
|
import type { AddMemberForm } from '@/models/setting/member';
|
||||||
import { useDialog } from '@/hooks/useDialog';
|
import { useDialog } from '@/hooks/useDialog';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -102,3 +102,4 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
@/models/setting/member
|
|
@ -55,7 +55,7 @@
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import useTable from '@/components/pure/ms-table/useTable';
|
import useTable from '@/components/pure/ms-table/useTable';
|
||||||
import addMemberModal from './components/addMemberModal.vue';
|
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 type { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||||
import useModal from '@/hooks/useModal';
|
import useModal from '@/hooks/useModal';
|
||||||
import { useCommandComponent } from '@/hooks/useCommandComponent';
|
import { useCommandComponent } from '@/hooks/useCommandComponent';
|
||||||
|
@ -170,3 +170,4 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
@/api/modules/setting/member
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
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';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -64,3 +64,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@/models/setting/plugin
|
|
@ -57,7 +57,7 @@
|
||||||
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
|
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
|
||||||
import type { MsTableColumn } from '@/components/pure/ms-table/type';
|
import type { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||||
import type { ActionsItem } from '@/components/pure/ms-table-more-action/types';
|
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 MsButton from '@/components/pure/ms-button/index.vue';
|
||||||
import UploadModel from './uploadModel.vue';
|
import UploadModel from './uploadModel.vue';
|
||||||
import UpdatePluginModal from './updatePluginModal.vue';
|
import UpdatePluginModal from './updatePluginModal.vue';
|
||||||
|
@ -228,3 +228,4 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@/api/modules/setting/pluginManger
|
|
@ -41,7 +41,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useDialog } from '@/hooks/useDialog';
|
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';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
|
|
||||||
|
@ -92,3 +92,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@/models/setting/plugin
|
|
@ -7,7 +7,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watchEffect } from 'vue';
|
import { ref, watchEffect } from 'vue';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import type { StepList } from '@/models/system/plugin';
|
import type { StepList } from '@/models/setting/plugin';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -34,3 +34,4 @@
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@/models/setting/plugin
|
|
@ -42,7 +42,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watchEffect, reactive, onMounted } from 'vue';
|
import { ref, watchEffect, reactive, onMounted } from 'vue';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import type { PluginForm } from '@/models/system/plugin';
|
import type { PluginForm } from '@/models/setting/plugin';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -92,3 +92,4 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@/models/setting/plugin
|
|
@ -29,7 +29,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watchEffect } from 'vue';
|
import { ref, watchEffect } from 'vue';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
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 StepProgress from './stepProgress.vue';
|
||||||
import SceneList from './SceneList.vue';
|
import SceneList from './SceneList.vue';
|
||||||
import uploadPlugin from './uploadPlugin.vue';
|
import uploadPlugin from './uploadPlugin.vue';
|
||||||
|
@ -87,3 +87,4 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less"></style>
|
<style scoped lang="less"></style>
|
||||||
|
@/models/setting/plugin
|
|
@ -342,10 +342,10 @@
|
||||||
import { getYaml, YamlType, job } from './template';
|
import { getYaml, YamlType, job } from './template';
|
||||||
import { downloadStringFile, sleep } from '@/utils';
|
import { downloadStringFile, sleep } from '@/utils';
|
||||||
import { scrollIntoView } from '@/utils/dom';
|
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 { 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 route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -795,3 +795,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@/models/setting/resourcePool @/api/modules/setting/resourcePool
|
|
@ -56,7 +56,7 @@
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
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 useModal from '@/hooks/useModal';
|
||||||
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
||||||
import useTable from '@/components/pure/ms-table/useTable';
|
import useTable from '@/components/pure/ms-table/useTable';
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
import type { Description } from '@/components/pure/ms-description/index.vue';
|
import type { Description } from '@/components/pure/ms-description/index.vue';
|
||||||
import type { MsTableColumn } from '@/components/pure/ms-table/type';
|
import type { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||||
import type { ActionsItem } from '@/components/pure/ms-table-more-action/types';
|
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 { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -387,3 +387,4 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
@/models/setting/resourcePool @/api/modules/setting/resourcePool
|
|
@ -271,7 +271,7 @@
|
||||||
import useTable from '@/components/pure/ms-table/useTable';
|
import useTable from '@/components/pure/ms-table/useTable';
|
||||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||||
import MsTableMoreAction from '@/components/pure/ms-table-more-action/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 { validateEmail, validatePhone } from '@/utils/validate';
|
||||||
import batchModal from './components/batchModal.vue';
|
import batchModal from './components/batchModal.vue';
|
||||||
import inviteModal from './components/inviteModal.vue';
|
import inviteModal from './components/inviteModal.vue';
|
||||||
|
@ -280,7 +280,7 @@
|
||||||
import type { FormInstance, ValidatedError } from '@arco-design/web-vue';
|
import type { FormInstance, ValidatedError } from '@arco-design/web-vue';
|
||||||
import type { MsTableColumn } from '@/components/pure/ms-table/type';
|
import type { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||||
import type { ActionsItem } from '@/components/pure/ms-table-more-action/types';
|
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();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
@ -826,3 +826,4 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
@/models/setting/user @/api/modules/setting/user
|
|
@ -41,7 +41,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import { reactive, ref, watchEffect } from 'vue';
|
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';
|
import type { FormInstance, ValidatedError } from '@arco-design/web-vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -92,3 +92,4 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@/models/setting/usergroup
|
|
@ -40,7 +40,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import { reactive, ref, watchEffect, onUnmounted } from 'vue';
|
import { reactive, ref, watchEffect, onUnmounted } from 'vue';
|
||||||
import { UserOption } from '@/models/system/usergroup';
|
import { UserOption } from '@/models/setting/usergroup';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -114,3 +114,4 @@
|
||||||
color: var(--color-text-4);
|
color: var(--color-text-4);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@/models/setting/usergroup
|
|
@ -53,9 +53,9 @@
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import { RenderFunction, VNodeChild, ref, watchEffect } from 'vue';
|
import { RenderFunction, VNodeChild, ref, watchEffect } from 'vue';
|
||||||
import { type TableColumnData, type TableData } from '@arco-design/web-vue';
|
import { type TableColumnData, type TableData } from '@arco-design/web-vue';
|
||||||
import useUserGroupStore from '@/store/modules/system/usergroup';
|
import useUserGroupStore from '@/store/modules/setting/usergroup';
|
||||||
import { getGlobalUSetting, saveGlobalUSetting } from '@/api/modules/system/usergroup';
|
import { getGlobalUSetting, saveGlobalUSetting } from '@/api/modules/setting/usergroup';
|
||||||
import { UserGroupAuthSeting, AuthTableItem, type AuthScopeType, SavePermissions } from '@/models/system/usergroup';
|
import { UserGroupAuthSeting, AuthTableItem, type AuthScopeType, SavePermissions } from '@/models/setting/usergroup';
|
||||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||||
|
|
||||||
export declare type OperationName = 'selection-checkbox' | 'selection-radio' | 'expand' | 'drag-handle';
|
export declare type OperationName = 'selection-checkbox' | 'selection-radio' | 'expand' | 'drag-handle';
|
||||||
|
@ -295,3 +295,4 @@
|
||||||
width: calc(100% - 24px);
|
width: calc(100% - 24px);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@/models/setting/usergroup @/api/modules/setting/usergroup
|
|
@ -61,7 +61,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
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 MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
|
||||||
import { ActionsItem } from '@/components/pure/ms-table-more-action/types';
|
import { ActionsItem } from '@/components/pure/ms-table-more-action/types';
|
||||||
import AddUserModal from './addUserModal.vue';
|
import AddUserModal from './addUserModal.vue';
|
||||||
|
@ -69,8 +69,8 @@
|
||||||
import useModal from '@/hooks/useModal';
|
import useModal from '@/hooks/useModal';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import popconfirm from './popconfirm.vue';
|
import popconfirm from './popconfirm.vue';
|
||||||
import useUserGroupStore from '@/store/modules/system/usergroup';
|
import useUserGroupStore from '@/store/modules/setting/usergroup';
|
||||||
import { getUserGroupList, updateOrAddUserGroup, deleteUserGroup } from '@/api/modules/system/usergroup';
|
import { getUserGroupList, updateOrAddUserGroup, deleteUserGroup } from '@/api/modules/setting/usergroup';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
@ -299,3 +299,4 @@
|
||||||
color: var(--color-text-1);
|
color: var(--color-text-1);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@/models/setting/usergroup @/api/modules/setting/usergroup
|
|
@ -30,7 +30,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import { watchEffect, ref, computed, onUnmounted } from 'vue';
|
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';
|
import { ValidatedError } from '@arco-design/web-vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -134,3 +134,4 @@
|
||||||
background-color: rgb(var(--primary-9));
|
background-color: rgb(var(--primary-9));
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@/models/setting/usergroup
|
|
@ -11,10 +11,10 @@
|
||||||
import useTable from '@/components/pure/ms-table/useTable';
|
import useTable from '@/components/pure/ms-table/useTable';
|
||||||
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
|
||||||
import { MsTableColumn } from '@/components/pure/ms-table/type';
|
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 { watchEffect } from 'vue';
|
||||||
import { postUserByUserGroup, deleteUserFromUserGroup } from '@/api/modules/system/usergroup';
|
import { postUserByUserGroup, deleteUserFromUserGroup } from '@/api/modules/setting/usergroup';
|
||||||
import { UserTableItem } from '@/models/system/usergroup';
|
import { UserTableItem } from '@/models/setting/usergroup';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const store = useUserGroupStore();
|
const store = useUserGroupStore();
|
||||||
|
@ -58,3 +58,4 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@/models/setting/usergroup @/api/modules/setting/usergroup
|
|
@ -33,7 +33,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
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 UserGroupLeft from './components/index.vue';
|
||||||
import UserTable from './components/userTable.vue';
|
import UserTable from './components/userTable.vue';
|
||||||
import AuthTable from './components/authTable.vue';
|
import AuthTable from './components/authTable.vue';
|
Loading…
Reference in New Issue