提交 d67f1831 编写于 作者: RedPig97's avatar RedPig97

update: 更新

上级 23eaaec8
...@@ -2,12 +2,23 @@ ...@@ -2,12 +2,23 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link type="text/css" href="./assets/css/loading.css" rel="stylesheet">
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title> <title>Vite App</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<div id="app-loading-x" class="app-loading-x">
<div class="app-loading-x-container">
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
</div>
</div>
<script type="module" src="/src/main.ts"></script> <script type="module" src="/src/main.ts"></script>
<script src="./environments/environment.js"></script> <script src="./environments/environment.js"></script>
</body> </body>
......
@charset "utf-8";
.app-loading-x {
background: radial-gradient(#55A0FE, #1767CB);
height: 100vh;
width: 100vw;
overflow: hidden;
position: absolute;
top: 0;
left: 0;
z-index: 10000;
}
.app-loading-x-container {
position: absolute;
top: 50%;
width: 100%;
color: #fff;
text-align: center;
transform: translateY(-50%);
}
.app-loading-x-container label {
display: inline-block;
font-size: 20px;
opacity: 0;
}
.app-loading-x-container label:nth-child(6) {
animation: loading 3s infinite ease-in-out
}
.app-loading-x-container label:nth-child(5) {
animation: loading 3s .1s infinite ease-in-out
}
.app-loading-x-container label:nth-child(4) {
animation: loading 3s .2s infinite ease-in-out
}
.app-loading-x-container label:nth-child(3) {
animation: loading 3s .3s infinite ease-in-out
}
.app-loading-x-container label:nth-child(2) {
animation: loading 3s .4s infinite ease-in-out
}
.app-loading-x-container label:nth-child(1) {
animation: loading 3s .5s infinite ease-in-out
}
@keyframes loading{
0% {
transform:translateX(-300px);
opacity:0
}
33% {
transform:translateX(0);
opacity:1
}
66% {
transform:translateX(0);
opacity:1
}
100% {
transform:translateX(300px);opacity:0
}
}
\ No newline at end of file
...@@ -37,12 +37,12 @@ const getLayout = (item: IParam ,name: string) => { ...@@ -37,12 +37,12 @@ const getLayout = (item: IParam ,name: string) => {
v-for="(menu, index) in menus" v-for="(menu, index) in menus"
v-show="!menu.hidden" v-show="!menu.hidden"
:key="index" :key="index"
:class="['app-menu__card', menu.itemSysCss]" :class="['app-menu__center', menu.itemSysCss]"
:bordered="false" :bordered="false"
:title="menu.caption" :title="menu.caption"
> >
<template v-if="Object.is(menu.layoutPos.layout, 'FLEX')"> <template v-if="Object.is(menu.layoutPos.layout, 'FLEX')">
<a-space :size="24" class="app-menu__card--flex"> <a-space :size="24" class="app-menu__center--flex">
<template v-for="item in menu.items"> <template v-for="item in menu.items">
<a-button v-if="!item.hidden" size="large" :class="['app-menu-item', item.itemSysCss]" @click="onClick(item)"> <a-button v-if="!item.hidden" size="large" :class="['app-menu-item', item.itemSysCss]" @click="onClick(item)">
{{ item.caption }} {{ item.caption }}
...@@ -51,7 +51,7 @@ const getLayout = (item: IParam ,name: string) => { ...@@ -51,7 +51,7 @@ const getLayout = (item: IParam ,name: string) => {
</a-space> </a-space>
</template> </template>
<template v-else> <template v-else>
<a-row :wrap="true" class="app-menu__card--grid" :gutter="20" style="row-gap: 20px;"> <a-row :wrap="true" class="app-menu__center--grid" :gutter="20" style="row-gap: 20px;">
<a-col <a-col
v-for="(item,key) in menu.items" v-for="(item,key) in menu.items"
:key="key" :key="key"
......
...@@ -170,33 +170,16 @@ const handleSubmit = (): void => { ...@@ -170,33 +170,16 @@ const handleSubmit = (): void => {
if (!validatestate) { if (!validatestate) {
return; return;
} }
const loginname: string = loginState.loginname; App.getAppAuthService()
Http.getInstance() .login(loginState)
.post('/v7/login', loginState, true) .then((res: any) => {
.then((post: any) => {
const { status, data } = post;
if (status == 200) {
if (data && data.token) {
setCookie('ibzuaa-token', data.token, 7, true);
}
if (data && data.user) {
setCookie('ibzuaa-user', JSON.stringify(data.user), 7, true);
}
// 设置cookie,保存账号密码7天
setCookie('loginname', loginname, 7, true);
// TODO 从路由中获取
const url: any = unref(route).query?.redirecrt ? unref(route).query.redirecrt : '/'; const url: any = unref(route).query?.redirecrt ? unref(route).query.redirecrt : '/';
router.push({ path: url }); router.push({ path: url });
}
}) })
.catch((error: any) => { .catch((error: any) => {
console.log('登录失败', error);
const data = error.data; const data = error.data;
if (data && data.message) { if (data) {
loginTip.value = data.message; App.getNotificationService().error({ message: '登录失败', description: data.message || '' });
// this.$throw((this.$t('components.login.loginfailed') as string) + ' ' + data.message,'handleSubmit');
} else {
// this.$throw(this.$t('components.login.loginfailed') as string,'handleSubmit');
} }
}); });
}; };
......
...@@ -178,7 +178,7 @@ export abstract class AppAuthServiceBase implements IAppAuthService { ...@@ -178,7 +178,7 @@ export abstract class AppAuthServiceBase implements IAppAuthService {
return result; return result;
} }
} catch (error: any) { } catch (error: any) {
return error; throw error;
} }
} }
......
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import Router from '@/router'; import Router from '@/router';
import Antd from 'ant-design-vue'; import Antd from 'ant-design-vue';
import AppDrawerComponent from "@components/render/app-drawer.vue"; import AppDrawerComponent from "@components/common/app-drawer.vue";
import AppLoading from '@components/render/app-loading.vue'; import AppLoading from '@components/common/app-loading.vue';
import { IParam, ViewDetail } from '@core'; import { IParam, ViewDetail } from '@core';
export class AppDrawer { export class AppDrawer {
......
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import Router from '@/router'; import Router from '@/router';
import Antd from 'ant-design-vue'; import Antd from 'ant-design-vue';
import AppModalComponent from "@components/render/app-modal.vue"; import AppModalComponent from "@components/common/app-modal.vue";
import AppLoading from '@components/render/app-loading.vue'; import AppLoading from '@components/common/app-loading.vue';
import { IParam, ViewDetail } from '@core'; import { IParam, ViewDetail } from '@core';
export class AppModal { export class AppModal {
......
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import Router from '@/router'; import Router from '@/router';
import Antd from 'ant-design-vue'; import Antd from 'ant-design-vue';
import AppPopoverComponent from "@components/render/app-popover.vue"; import AppPopoverComponent from "@components/common/app-popover.vue";
import AppLoading from '@components/render/app-loading.vue'; import AppLoading from '@components/common/app-loading.vue';
import { IParam, ViewDetail } from '@core'; import { IParam, ViewDetail } from '@core';
import { createPopper, Instance } from '@popperjs/core/lib/popper-lite.js'; import { createPopper, Instance } from '@popperjs/core/lib/popper-lite.js';
import preventOverflow from '@popperjs/core/lib/modifiers/preventOverflow.js'; import preventOverflow from '@popperjs/core/lib/modifiers/preventOverflow.js';
......
.app-menu__card { .app-menu__center {
.app-menu__card--flex { .app-menu__center--flex {
flex-wrap: wrap; flex-wrap: wrap;
.ant-btn { .ant-btn {
width: 320px; width: 320px;
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} }
} }
} }
.app-menu__card--grid { .app-menu__center--grid {
row-gap: 20px; row-gap: 20px;
.ant-btn { .ant-btn {
width: 100%; width: 100%;
......
@use './app-split.scss'; @use './app-split.scss';
@use './login.scss'; @use './login.scss';
@use './icon-text.scss';
@use './app-quick-group.scss';
@use './app-menu-center.scss';
\ No newline at end of file
@use './editors'; @use './editors';
@use './render';
@use './layout'; @use './layout';
@use './common'; @use './common';
\ No newline at end of file
.app-index-view-layout--default { .app-index-view-layout--default {
height: 100%; height: 100%;
width: 100%; width: 100%;
.index-view-header {
}
.center-menu-card { .center-menu-card {
height: 100%; height: 100%;
overflow: auto; overflow: auto;
} }
.index-view-header {
font-size: 18px;
.trigger:hover {
color: #1890ff;
}
}
} }
@use './icon-text.scss';
@use './app-quick-group.scss';
@use './app-menu-center.scss';
\ No newline at end of file
.app-menu {
height: 100%;
}
.app-menu--center { .app-menu--center {
.ant-card-head-title { .ant-card-head-title {
text-align: left; text-align: left;
......
...@@ -2,7 +2,7 @@ import { Subject } from 'rxjs'; ...@@ -2,7 +2,7 @@ import { Subject } from 'rxjs';
import Router from '@/router'; import Router from '@/router';
import Antd from 'ant-design-vue'; import Antd from 'ant-design-vue';
import AppDrawerComponent from "./app-drawer.vue"; import AppDrawerComponent from "./app-drawer.vue";
import AppLoading from '@components/render/app-loading.vue'; import AppLoading from '@components/common/app-loading.vue';
import { IParam, ViewDetail } from '@core'; import { IParam, ViewDetail } from '@core';
export class AppDrawer { export class AppDrawer {
......
...@@ -2,7 +2,7 @@ import { Subject } from 'rxjs'; ...@@ -2,7 +2,7 @@ import { Subject } from 'rxjs';
import Router from '@/router'; import Router from '@/router';
import Antd from 'ant-design-vue'; import Antd from 'ant-design-vue';
import AppModalComponent from "./app-modal.vue"; import AppModalComponent from "./app-modal.vue";
import AppLoading from '@components/render/app-loading.vue'; import AppLoading from '@components/common/app-loading.vue';
import { IParam, ViewDetail } from '@core'; import { IParam, ViewDetail } from '@core';
export class AppModal { export class AppModal {
......
...@@ -2,7 +2,7 @@ import { Subject } from 'rxjs'; ...@@ -2,7 +2,7 @@ import { Subject } from 'rxjs';
import Router from '@/router'; import Router from '@/router';
import Antd from 'ant-design-vue'; import Antd from 'ant-design-vue';
import AppPopoverComponent from "./app-popover.vue"; import AppPopoverComponent from "./app-popover.vue";
import AppLoading from '@components/render/app-loading.vue'; import AppLoading from '@components/common/app-loading.vue';
import { IParam, ViewDetail } from '@core'; import { IParam, ViewDetail } from '@core';
import './app-popover.scss'; import './app-popover.scss';
import { createPopper, Instance } from '@popperjs/core/lib/popper-lite.js'; import { createPopper, Instance } from '@popperjs/core/lib/popper-lite.js';
......
...@@ -42,7 +42,7 @@ const collapsedChange = () => { ...@@ -42,7 +42,7 @@ const collapsedChange = () => {
<AppDefaultIndexViewLayout :class="['app-index-view', state.viewSysCss]" :showCaptionBar="state.showCaptionBar" :menuAlign="state.menuAlign" :collapsed="collapsed"> <AppDefaultIndexViewLayout :class="['app-index-view', state.viewSysCss]" :showCaptionBar="state.showCaptionBar" :menuAlign="state.menuAlign" :collapsed="collapsed">
<template #caption> <template #caption>
<div class="index-view-header"> <div class="index-view-header">
\{{state.viewCaption}} <div class="sys-title">\{{state.viewCaption}}</div>
<MenuUnfoldOutlined <MenuUnfoldOutlined
v-if="collapsed && Object.is(state.menuAlign,'LEFT')" v-if="collapsed && Object.is(state.menuAlign,'LEFT')"
class="trigger" class="trigger"
...@@ -75,14 +75,3 @@ const collapsedChange = () => { ...@@ -75,14 +75,3 @@ const collapsedChange = () => {
</template> </template>
</AppDefaultIndexViewLayout> </AppDefaultIndexViewLayout>
</template> </template>
\ No newline at end of file
<style lang="scss">
.app-index-view {
.index-view-header {
font-size: 18px;
>.trigger:hover {
color: #1890ff;
}
}
}
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册