Showing
18 changed files
with
103 additions
and
483 deletions
... | ... | @@ -42,7 +42,7 @@ export const getAccountList = (params: AccountParams) => |
42 | 42 | */ |
43 | 43 | export const getOrganizationList = (params?: OrganizationListItem) => |
44 | 44 | defHttp.get<OrganizationListGetResultModel>({ |
45 | - url: Api.BaseOrganization + '/me/organizations', | |
45 | + url: Api.BaseOrganization + '/me/list', | |
46 | 46 | params, |
47 | 47 | }); |
48 | 48 | ... | ... |
1 | +// import { getMenuList } from '/@/api/sys/menu'; | |
2 | +// import { reactive } from 'vue'; | |
3 | + | |
4 | +// const isDolang = reactive({ | |
5 | +// key: 1, | |
6 | +// value: '', | |
7 | +// }); | |
8 | +// //这里判断是否含有首页 | |
9 | +// async function doMenu() { | |
10 | +// const routeList = await getMenuList(); | |
11 | +// const getHomePage = routeList.find((f) => { | |
12 | +// return f.path == '/dashboard'; | |
13 | +// }); | |
14 | +// if (getHomePage?.path == '/dashboard') { | |
15 | +// // router.push('/dashboard'); | |
16 | +// } else { | |
17 | +// const route = routeList[0].path + ''; | |
18 | +// isDolang.key = 1; | |
19 | +// isDolang.value = route; | |
20 | +// return isDolang; | |
21 | +// // router.push(route); | |
22 | +// } | |
23 | +// } | |
24 | + | |
25 | +// setTimeout(() => { | |
26 | +// doMenu(); | |
27 | +// }, 1000); | |
28 | + | |
29 | +// console.log(isDolang.value); | |
30 | +// console.log(typeof isDolang.value); | |
31 | + | |
32 | +// setTimeout(() => { | |
33 | +// console.log(isDolang); | |
34 | +// }, 1500); | |
35 | + | |
1 | 36 | export enum PageEnum { |
2 | 37 | // basic login path |
3 | 38 | BASE_LOGIN = '/login', |
4 | 39 | // basic home path |
5 | - BASE_HOME = '/dashboard', | |
40 | + BASE_HOME = '/system/account', | |
41 | + // BASE_HOME = '/dashboard', | |
6 | 42 | // error page path |
7 | 43 | ERROR_PAGE = '/exception', |
8 | 44 | // error log page path | ... | ... |
1 | -import type { AppRouteModule } from '/@/router/types'; | |
1 | +// import type { AppRouteModule } from '/@/router/types'; | |
2 | 2 | |
3 | -import { LAYOUT } from '/@/router/constant'; | |
4 | -import { t } from '/@/hooks/web/useI18n'; | |
3 | +// import { LAYOUT } from '/@/router/constant'; | |
4 | +// import { t } from '/@/hooks/web/useI18n'; | |
5 | 5 | |
6 | -const dashboard: AppRouteModule = { | |
7 | - path: '/dashboard', | |
8 | - name: 'Dashboard', | |
9 | - component: LAYOUT, | |
10 | - redirect: '/dashboard/analysis', | |
11 | - meta: { | |
12 | - orderNo: 10, | |
13 | - icon: 'ion:grid-outline', | |
14 | - title: t('routes.dashboard.dashboard'), | |
15 | - }, | |
16 | - children: [ | |
17 | - { | |
18 | - path: 'analysis', | |
19 | - name: 'Analysis', | |
20 | - component: () => import('/@/views/dashboard/analysis/index.vue'), | |
21 | - meta: { | |
22 | - // affix: true, | |
23 | - title: t('routes.dashboard.analysis'), | |
24 | - }, | |
25 | - }, | |
26 | - { | |
27 | - path: 'workbench', | |
28 | - name: 'Workbench', | |
29 | - component: () => import('/@/views/dashboard/workbench/index.vue'), | |
30 | - meta: { | |
31 | - title: t('routes.dashboard.workbench'), | |
32 | - }, | |
33 | - }, | |
34 | - ], | |
35 | -}; | |
6 | +// const dashboard: AppRouteModule = { | |
7 | +// path: '/dashboard', | |
8 | +// name: 'Dashboard', | |
9 | +// component: LAYOUT, | |
10 | +// redirect: '/dashboard/analysis', | |
11 | +// meta: { | |
12 | +// orderNo: 10, | |
13 | +// icon: 'ion:grid-outline', | |
14 | +// title: t('routes.dashboard.dashboard'), | |
15 | +// }, | |
16 | +// children: [ | |
17 | +// { | |
18 | +// path: 'analysis', | |
19 | +// name: 'Analysis', | |
20 | +// component: () => import('/@/views/dashboard/analysis/index.vue'), | |
21 | +// meta: { | |
22 | +// // affix: true, | |
23 | +// title: t('routes.dashboard.analysis'), | |
24 | +// }, | |
25 | +// }, | |
26 | +// { | |
27 | +// path: 'workbench', | |
28 | +// name: 'Workbench', | |
29 | +// component: () => import('/@/views/dashboard/workbench/index.vue'), | |
30 | +// meta: { | |
31 | +// title: t('routes.dashboard.workbench'), | |
32 | +// }, | |
33 | +// }, | |
34 | +// ], | |
35 | +// }; | |
36 | 36 | |
37 | -export default dashboard; | |
37 | +// export default dashboard; | ... | ... |
... | ... | @@ -96,7 +96,7 @@ export const useMultipleTabStore = defineStore({ |
96 | 96 | const len = this.tabList.length; |
97 | 97 | const { path } = unref(router.currentRoute); |
98 | 98 | |
99 | - let toPath: PageEnum | string = PageEnum.BASE_HOME; | |
99 | + let toPath: PageEnum | string = BASE_HOME; | |
100 | 100 | |
101 | 101 | if (len > 0) { |
102 | 102 | const page = this.tabList[len - 1]; | ... | ... |
1 | 1 | import type { AppRouteRecordRaw, Menu } from '/@/router/types'; |
2 | - | |
3 | 2 | import { defineStore } from 'pinia'; |
4 | 3 | import { store } from '/@/store'; |
5 | 4 | import { useI18n } from '/@/hooks/web/useI18n'; |
... | ... | @@ -8,22 +7,16 @@ import { useAppStoreWithOut } from './app'; |
8 | 7 | import { toRaw } from 'vue'; |
9 | 8 | import { transformObjToRoute, flatMultiLevelRoutes } from '/@/router/helper/routeHelper'; |
10 | 9 | import { transformRouteToMenu } from '/@/router/helper/menuHelper'; |
11 | - | |
12 | 10 | import projectSetting from '/@/settings/projectSetting'; |
13 | - | |
14 | 11 | import { PermissionModeEnum } from '/@/enums/appEnum'; |
15 | - | |
16 | 12 | import { asyncRoutes } from '/@/router/routes'; |
17 | 13 | import { ERROR_LOG_ROUTE, PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic'; |
18 | - | |
19 | 14 | import { filter } from '/@/utils/helper/treeHelper'; |
20 | - | |
21 | 15 | import { getMenuList } from '/@/api/sys/menu'; |
22 | 16 | import { getPermCode } from '/@/api/sys/user'; |
23 | - | |
24 | 17 | import { useMessage } from '/@/hooks/web/useMessage'; |
25 | 18 | import { PageEnum } from '/@/enums/pageEnum'; |
26 | - | |
19 | +import { router } from '/@/router'; | |
27 | 20 | interface PermissionState { |
28 | 21 | // Permission code list |
29 | 22 | permCodeList: string[] | number[]; |
... | ... | @@ -177,7 +170,7 @@ export const usePermissionStore = defineStore({ |
177 | 170 | |
178 | 171 | createMessage.loading({ |
179 | 172 | content: t('sys.app.menuLoading'), |
180 | - duration: 1, | |
173 | + duration: 0.5, | |
181 | 174 | }); |
182 | 175 | |
183 | 176 | // !Simulate to obtain permission codes from the background, |
... | ... | @@ -186,6 +179,16 @@ export const usePermissionStore = defineStore({ |
186 | 179 | try { |
187 | 180 | this.changePermissionCode(); |
188 | 181 | routeList = (await getMenuList()) as AppRouteRecordRaw[]; |
182 | + //这里判断是否含有首页 | |
183 | + const getHomePage = routeList.find((f) => { | |
184 | + return f.path == '/dashboard'; | |
185 | + }); | |
186 | + if (getHomePage?.path == '/dashboard') { | |
187 | + router.push('/dashboard'); | |
188 | + } else { | |
189 | + const route = routeList[0].path + ''; | |
190 | + router.push(route); | |
191 | + } | |
189 | 192 | } catch (error) { |
190 | 193 | console.error(error); |
191 | 194 | } // Dynamically introduce components |
... | ... | @@ -203,7 +206,7 @@ export const usePermissionStore = defineStore({ |
203 | 206 | routes = [PAGE_NOT_FOUND_ROUTE, ...routeList]; |
204 | 207 | break; |
205 | 208 | } |
206 | - | |
209 | + console.log('错误页'); | |
207 | 210 | routes.push(ERROR_LOG_ROUTE); |
208 | 211 | patchHomeAffix(routes); |
209 | 212 | return routes; | ... | ... |
... | ... | @@ -26,14 +26,7 @@ import { router } from '/@/router'; |
26 | 26 | const globSetting = useGlobSetting(); |
27 | 27 | const urlPrefix = globSetting.urlPrefix; |
28 | 28 | const { createMessage, createErrorModal } = useMessage(); |
29 | - | |
30 | 29 | const getJwtTokenInfo = getAuthCache(REFRESH_TOKEN_KEY); |
31 | -const getRefreshTokenInfo = getAuthCache(JWT_TOKEN_KEY); | |
32 | -// console.log(getJwtTokenInfo); | |
33 | -// console.log(getRefreshTokenInfo); | |
34 | -const getRefreshTokenInfo1 = getAuthCache(PROJ_CFG_KEY); | |
35 | - | |
36 | -// console.log(getRefreshTokenInfo1); | |
37 | 30 | |
38 | 31 | /** |
39 | 32 | * @description: 数据处理,方便区分多种处理方式 | ... | ... |
1 | -import { BasicColumn } from '/@/components/Table'; | |
2 | -import { FormSchema } from '/@/components/Table'; | |
1 | +import { BasicColumn, FormSchema } from '/@/components/Table'; | |
3 | 2 | import { getOrganizationList } from '/@/api/system/system'; |
4 | 3 | import { copyTransFun } from '/@/utils/fnUtils'; |
4 | + | |
5 | 5 | // 表格列数据 |
6 | 6 | export const columns: BasicColumn[] = [ |
7 | 7 | { | ... | ... |
src/views/dashboard/analysis/components/DynamicInfo.vue
deleted
100644 → 0
1 | -<template> | |
2 | - <Card title="最新动态" v-bind="$attrs"> | |
3 | - <template #extra> | |
4 | - <a-button type="link" size="small">更多</a-button> | |
5 | - </template> | |
6 | - <List item-layout="horizontal" :data-source="dynamicInfoItems"> | |
7 | - <template #renderItem="{ item }"> | |
8 | - <ListItem> | |
9 | - <ListItemMeta> | |
10 | - <template #description> | |
11 | - {{ item.date }} | |
12 | - </template> | |
13 | - <!-- eslint-disable-next-line --> | |
14 | - <template #title> {{ item.name }} <span v-html="item.desc"> </span> </template> | |
15 | - <template #avatar> | |
16 | - <Icon :icon="item.avatar" :size="30" /> | |
17 | - </template> | |
18 | - </ListItemMeta> | |
19 | - </ListItem> | |
20 | - </template> | |
21 | - </List> | |
22 | - </Card> | |
23 | -</template> | |
24 | -<script lang="ts" setup> | |
25 | - import { Card, List } from 'ant-design-vue'; | |
26 | - import { dynamicInfoItems } from './data'; | |
27 | - import { Icon } from '/@/components/Icon'; | |
28 | - | |
29 | - const ListItem = List.Item; | |
30 | - const ListItemMeta = List.Item.Meta; | |
31 | -</script> |
src/views/dashboard/analysis/components/ProjectCard.vue
deleted
100644 → 0
1 | -<template> | |
2 | - <Card title="项目" v-bind="$attrs"> | |
3 | - <template #extra> | |
4 | - <a-button type="link" size="small">更多</a-button> | |
5 | - </template> | |
6 | - | |
7 | - <template v-for="item in items" :key="item"> | |
8 | - <CardGrid class="!md:w-1/3 !w-full"> | |
9 | - <span class="flex"> | |
10 | - <Icon :icon="item.icon" :color="item.color" size="30" /> | |
11 | - <span class="text-lg ml-4">{{ item.title }}</span> | |
12 | - </span> | |
13 | - <div class="flex mt-2 h-10 text-secondary"> {{ item.desc }} </div> | |
14 | - <div class="flex justify-between text-secondary"> | |
15 | - <span>{{ item.group }}</span> | |
16 | - <span>{{ item.date }}</span> | |
17 | - </div> | |
18 | - </CardGrid> | |
19 | - </template> | |
20 | - </Card> | |
21 | -</template> | |
22 | -<script lang="ts"> | |
23 | - import { defineComponent } from 'vue'; | |
24 | - import { Card } from 'ant-design-vue'; | |
25 | - import { Icon } from '/@/components/Icon'; | |
26 | - import { groupItems } from './data'; | |
27 | - | |
28 | - export default defineComponent({ | |
29 | - components: { Card, CardGrid: Card.Grid, Icon }, | |
30 | - setup() { | |
31 | - return { items: groupItems }; | |
32 | - }, | |
33 | - }); | |
34 | -</script> |
src/views/dashboard/analysis/components/QuickNav.vue
deleted
100644 → 0
1 | -<template> | |
2 | - <Card title="快捷导航" v-bind="$attrs"> | |
3 | - <template v-for="item in navItems" :key="item"> | |
4 | - <CardGrid> | |
5 | - <span class="flex flex-col items-center"> | |
6 | - <Icon :icon="item.icon" :color="item.color" size="20" /> | |
7 | - <span class="text-md mt-2">{{ item.title }}</span> | |
8 | - </span> | |
9 | - </CardGrid> | |
10 | - </template> | |
11 | - </Card> | |
12 | -</template> | |
13 | -<script lang="ts" setup> | |
14 | - import { Card } from 'ant-design-vue'; | |
15 | - import { navItems } from './data'; | |
16 | - import { Icon } from '/@/components/Icon'; | |
17 | - | |
18 | - const CardGrid = Card.Grid; | |
19 | -</script> |
src/views/dashboard/analysis/components/SaleRadar.vue
deleted
100644 → 0
1 | -<template> | |
2 | - <Card title="销售统计" :loading="loading"> | |
3 | - <div ref="chartRef" :style="{ width, height }"></div> | |
4 | - </Card> | |
5 | -</template> | |
6 | -<script lang="ts" setup> | |
7 | - import { Ref, ref, watch } from 'vue'; | |
8 | - import { Card } from 'ant-design-vue'; | |
9 | - import { useECharts } from '/@/hooks/web/useECharts'; | |
10 | - | |
11 | - const props = defineProps({ | |
12 | - loading: Boolean, | |
13 | - width: { | |
14 | - type: String as PropType<string>, | |
15 | - default: '100%', | |
16 | - }, | |
17 | - height: { | |
18 | - type: String as PropType<string>, | |
19 | - default: '400px', | |
20 | - }, | |
21 | - }); | |
22 | - | |
23 | - const chartRef = ref<HTMLDivElement | null>(null); | |
24 | - const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>); | |
25 | - watch( | |
26 | - () => props.loading, | |
27 | - () => { | |
28 | - if (props.loading) { | |
29 | - return; | |
30 | - } | |
31 | - setOptions({ | |
32 | - legend: { | |
33 | - bottom: 0, | |
34 | - data: ['Visits', 'Sales'], | |
35 | - }, | |
36 | - tooltip: {}, | |
37 | - radar: { | |
38 | - radius: '60%', | |
39 | - splitNumber: 8, | |
40 | - indicator: [ | |
41 | - { | |
42 | - text: '2017', | |
43 | - max: 100, | |
44 | - }, | |
45 | - { | |
46 | - text: '2017', | |
47 | - max: 100, | |
48 | - }, | |
49 | - { | |
50 | - text: '2018', | |
51 | - max: 100, | |
52 | - }, | |
53 | - { | |
54 | - text: '2019', | |
55 | - max: 100, | |
56 | - }, | |
57 | - { | |
58 | - text: '2020', | |
59 | - max: 100, | |
60 | - }, | |
61 | - { | |
62 | - text: '2021', | |
63 | - max: 100, | |
64 | - }, | |
65 | - ], | |
66 | - }, | |
67 | - series: [ | |
68 | - { | |
69 | - type: 'radar', | |
70 | - symbolSize: 0, | |
71 | - areaStyle: { | |
72 | - shadowBlur: 0, | |
73 | - shadowColor: 'rgba(0,0,0,.2)', | |
74 | - shadowOffsetX: 0, | |
75 | - shadowOffsetY: 10, | |
76 | - opacity: 1, | |
77 | - }, | |
78 | - data: [ | |
79 | - { | |
80 | - value: [90, 50, 86, 40, 50, 20], | |
81 | - name: 'Visits', | |
82 | - itemStyle: { | |
83 | - color: '#b6a2de', | |
84 | - }, | |
85 | - }, | |
86 | - { | |
87 | - value: [70, 75, 70, 76, 20, 85], | |
88 | - name: 'Sales', | |
89 | - itemStyle: { | |
90 | - color: '#67e0e3', | |
91 | - }, | |
92 | - }, | |
93 | - ], | |
94 | - }, | |
95 | - ], | |
96 | - }); | |
97 | - }, | |
98 | - { immediate: true } | |
99 | - ); | |
100 | -</script> |
src/views/dashboard/analysis/components/data.ts
deleted
100644 → 0
1 | -interface GroupItem { | |
2 | - title: string; | |
3 | - icon: string; | |
4 | - color: string; | |
5 | - desc: string; | |
6 | - date: string; | |
7 | - group: string; | |
8 | -} | |
9 | - | |
10 | -interface NavItem { | |
11 | - title: string; | |
12 | - icon: string; | |
13 | - color: string; | |
14 | -} | |
15 | - | |
16 | -interface DynamicInfoItem { | |
17 | - avatar: string; | |
18 | - name: string; | |
19 | - date: string; | |
20 | - desc: string; | |
21 | -} | |
22 | - | |
23 | -export const navItems: NavItem[] = [ | |
24 | - { | |
25 | - title: '首页', | |
26 | - icon: 'ion:home-outline', | |
27 | - color: '#1fdaca', | |
28 | - }, | |
29 | - { | |
30 | - title: '仪表盘', | |
31 | - icon: 'ion:grid-outline', | |
32 | - color: '#bf0c2c', | |
33 | - }, | |
34 | - { | |
35 | - title: '组件', | |
36 | - icon: 'ion:layers-outline', | |
37 | - color: '#e18525', | |
38 | - }, | |
39 | - { | |
40 | - title: '系统管理', | |
41 | - icon: 'ion:settings-outline', | |
42 | - color: '#3fb27f', | |
43 | - }, | |
44 | - { | |
45 | - title: '权限管理', | |
46 | - icon: 'ion:key-outline', | |
47 | - color: '#4daf1bc9', | |
48 | - }, | |
49 | - { | |
50 | - title: '图表', | |
51 | - icon: 'ion:bar-chart-outline', | |
52 | - color: '#00d8ff', | |
53 | - }, | |
54 | -]; | |
55 | - | |
56 | -export const dynamicInfoItems: DynamicInfoItem[] = [ | |
57 | - { | |
58 | - avatar: 'dynamic-avatar-1|svg', | |
59 | - name: '威廉', | |
60 | - date: '刚刚', | |
61 | - desc: `在 <a>开源组</a> 创建了项目 <a>Vue</a>`, | |
62 | - }, | |
63 | - { | |
64 | - avatar: 'dynamic-avatar-2|svg', | |
65 | - name: '艾文', | |
66 | - date: '1个小时前', | |
67 | - desc: `关注了 <a>威廉</a> `, | |
68 | - }, | |
69 | - { | |
70 | - avatar: 'dynamic-avatar-3|svg', | |
71 | - name: '克里斯', | |
72 | - date: '1天前', | |
73 | - desc: `发布了 <a>个人动态</a> `, | |
74 | - }, | |
75 | - { | |
76 | - avatar: 'dynamic-avatar-4|svg', | |
77 | - name: 'Vben', | |
78 | - date: '2天前', | |
79 | - desc: `发表文章 <a>如何编写一个Vite插件</a> `, | |
80 | - }, | |
81 | - { | |
82 | - avatar: 'dynamic-avatar-5|svg', | |
83 | - name: '皮特', | |
84 | - date: '3天前', | |
85 | - desc: `回复了 <a>杰克</a> 的问题 <a>如何进行项目优化?</a>`, | |
86 | - }, | |
87 | - { | |
88 | - avatar: 'dynamic-avatar-6|svg', | |
89 | - name: '杰克', | |
90 | - date: '1周前', | |
91 | - desc: `关闭了问题 <a>如何运行项目</a> `, | |
92 | - }, | |
93 | - { | |
94 | - avatar: 'dynamic-avatar-1|svg', | |
95 | - name: '威廉', | |
96 | - date: '1周前', | |
97 | - desc: `发布了 <a>个人动态</a> `, | |
98 | - }, | |
99 | - { | |
100 | - avatar: 'dynamic-avatar-1|svg', | |
101 | - name: '威廉', | |
102 | - date: '2021-04-01 20:00', | |
103 | - desc: `推送了代码到 <a>Github</a>`, | |
104 | - }, | |
105 | -]; | |
106 | - | |
107 | -export const groupItems: GroupItem[] = [ | |
108 | - { | |
109 | - title: 'Github', | |
110 | - icon: 'carbon:logo-github', | |
111 | - color: '', | |
112 | - desc: '不要等待机会,而要创造机会。', | |
113 | - group: '开源组', | |
114 | - date: '2021-04-01', | |
115 | - }, | |
116 | - { | |
117 | - title: 'Vue', | |
118 | - icon: 'ion:logo-vue', | |
119 | - color: '#3fb27f', | |
120 | - desc: '现在的你决定将来的你。', | |
121 | - group: '算法组', | |
122 | - date: '2021-04-01', | |
123 | - }, | |
124 | - { | |
125 | - title: 'Html5', | |
126 | - icon: 'ion:logo-html5', | |
127 | - color: '#e18525', | |
128 | - desc: '没有什么才能比努力更重要。', | |
129 | - group: '上班摸鱼', | |
130 | - date: '2021-04-01', | |
131 | - }, | |
132 | - { | |
133 | - title: 'Angular', | |
134 | - icon: 'ion:logo-angular', | |
135 | - color: '#bf0c2c', | |
136 | - desc: '热情和欲望可以突破一切难关。', | |
137 | - group: 'UI', | |
138 | - date: '2021-04-01', | |
139 | - }, | |
140 | - { | |
141 | - title: 'React', | |
142 | - icon: 'bx:bxl-react', | |
143 | - color: '#00d8ff', | |
144 | - desc: '健康的身体是实目标的基石。', | |
145 | - group: '技术牛', | |
146 | - date: '2021-04-01', | |
147 | - }, | |
148 | - { | |
149 | - title: 'Js', | |
150 | - icon: 'ion:logo-javascript', | |
151 | - color: '#4daf1bc9', | |
152 | - desc: '路是走出来的,而不是空想出来的。', | |
153 | - group: '架构组', | |
154 | - date: '2021-04-01', | |
155 | - }, | |
156 | -]; |
src/views/dashboard/analysis/index.vue
deleted
100644 → 0
1 | -<template> | |
2 | - <PageWrapper> | |
3 | - <template #headerContent> <WorkbenchHeader /> </template> | |
4 | - <div class="lg:flex"> | |
5 | - <div class="lg:w-7/10 w-full !mr-4 enter-y"> | |
6 | - <ProjectCard :loading="loading" class="enter-y" /> | |
7 | - <DynamicInfo :loading="loading" class="!my-4 enter-y" /> | |
8 | - </div> | |
9 | - <div class="lg:w-3/10 w-full enter-y"> | |
10 | - <QuickNav :loading="loading" class="enter-y" /> | |
11 | - | |
12 | - <Card class="!my-4 enter-y" :loading="loading"> | |
13 | - <img class="xl:h-50 h-30 mx-auto" src="../../../assets/svg/illustration.svg" /> | |
14 | - </Card> | |
15 | - | |
16 | - <SaleRadar :loading="loading" class="enter-y" /> | |
17 | - </div> | |
18 | - </div> | |
19 | - <BasicModal | |
20 | - @register="register" | |
21 | - v-bind="$attrs" | |
22 | - :mask="true" | |
23 | - :showCancelBtn="false" | |
24 | - :showOkBtn="false" | |
25 | - :canFullscreen="false" | |
26 | - :closable="false" | |
27 | - :maskStyle="maskColor" | |
28 | - :height="600" | |
29 | - :width="1500" | |
30 | - :maskClosable="false" | |
31 | - title="请修改密码" | |
32 | - :helpMessage="['请您修改密码']" | |
33 | - > | |
34 | - <PasswordDialog /> | |
35 | - </BasicModal> | |
36 | - </PageWrapper> | |
37 | -</template> | |
38 | -<script lang="ts" setup> | |
39 | - import PasswordDialog from '/@/views/system/password/index.vue'; | |
40 | - import { BasicModal, useModal } from '/@/components/Modal'; | |
41 | - import { getAuthCache } from '/@/utils/auth'; | |
42 | - import { USER_INFO_KEY } from '/@/enums/cacheEnum'; | |
43 | - import { ref, onMounted } from 'vue'; | |
44 | - import { Card } from 'ant-design-vue'; | |
45 | - import { PageWrapper } from '/@/components/Page'; | |
46 | - import WorkbenchHeader from './components/WorkbenchHeader.vue'; | |
47 | - import ProjectCard from './components/ProjectCard.vue'; | |
48 | - import QuickNav from './components/QuickNav.vue'; | |
49 | - import DynamicInfo from './components/DynamicInfo.vue'; | |
50 | - import SaleRadar from './components/SaleRadar.vue'; | |
51 | - | |
52 | - const maskColor = ref({ backgroundColor: 'grey' }); | |
53 | - const statusModel = ref(false); | |
54 | - const [register, { openModal }] = useModal(); | |
55 | - onMounted(() => { | |
56 | - const userInfo: object = getAuthCache(USER_INFO_KEY); | |
57 | - if (userInfo.needSetPwd == true) { | |
58 | - statusModel.value = true; | |
59 | - openModal(statusModel.value); | |
60 | - } else if (userInfo.needSetPwd == false) { | |
61 | - openModal(statusModel.value); | |
62 | - } | |
63 | - }); | |
64 | - //Yunteng123456!!! | |
65 | - //Password123456! | |
66 | - //System123456! | |
67 | - //Testrole123456! | |
68 | - const loading = ref(false); | |
69 | - setTimeout(() => { | |
70 | - loading.value = false; | |
71 | - }, 1500); | |
72 | -</script> |
... | ... | @@ -25,8 +25,8 @@ |
25 | 25 | :height="600" |
26 | 26 | :width="1500" |
27 | 27 | :maskClosable="false" |
28 | - title="请修改密码" | |
29 | - :helpMessage="['请您修改密码']" | |
28 | + title="请您修改初始密码" | |
29 | + :helpMessage="['请您修改初始密码']" | |
30 | 30 | > |
31 | 31 | <PasswordDialog /> |
32 | 32 | </BasicModal> |
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 | const statusModel = ref(false); |
48 | 48 | const [register, { openModal }] = useModal(); |
49 | 49 | onMounted(() => { |
50 | - const userInfo: object = getAuthCache(USER_INFO_KEY); | |
50 | + const userInfo = getAuthCache(USER_INFO_KEY); | |
51 | 51 | if (userInfo.needSetPwd == true) { |
52 | 52 | statusModel.value = true; |
53 | 53 | openModal(statusModel.value); | ... | ... |
... | ... | @@ -47,26 +47,27 @@ |
47 | 47 | const getTitle = computed(() => (!unref(isUpdate) ? '新增设备配置' : '编辑设备配置')); |
48 | 48 | const [register] = useModalInner((data) => { |
49 | 49 | isUpdate.value = !!data?.isUpdate; |
50 | + if (!unref(isUpdate)) { | |
51 | + current.value = 0; | |
52 | + } | |
50 | 53 | }); |
51 | 54 | function handleStepPrev() { |
52 | 55 | current.value--; |
53 | 56 | } |
54 | - function handleStep1Next(step1Values: any) { | |
57 | + function handleStep1Next() { | |
55 | 58 | current.value++; |
56 | - console.log(step1Values); | |
57 | 59 | } |
58 | - function handleStep2Next(step2Values: any) { | |
60 | + function handleStep2Next() { | |
59 | 61 | current.value++; |
60 | - console.log(step2Values); | |
61 | 62 | } |
62 | 63 | function handleRedo() { |
63 | 64 | current.value = 0; |
64 | 65 | } |
65 | 66 | const handleSubmit = () => { |
66 | - console.log(1); | |
67 | + console.log(); | |
67 | 68 | }; |
68 | 69 | const handleCancel = () => { |
69 | - console.log(1); | |
70 | + console.log(); | |
70 | 71 | }; |
71 | 72 | return { |
72 | 73 | handleSubmit, | ... | ... |
... | ... | @@ -97,12 +97,11 @@ |
97 | 97 | // console.log(record); |
98 | 98 | try { |
99 | 99 | let ids = [record.id]; |
100 | - await delOrganization(ids).then(() => { | |
101 | - createMessage.success('删除组织成功'); | |
102 | - handleSuccess(); | |
103 | - }); | |
100 | + await delOrganization(ids); | |
101 | + createMessage.success('删除组织成功'); | |
102 | + handleSuccess(); | |
104 | 103 | } catch (e) { |
105 | - return Promise.reject(e); | |
104 | + return e; | |
106 | 105 | } |
107 | 106 | } |
108 | 107 | ... | ... |