提交 e1537cb0 编写于 作者: ibizdev's avatar ibizdev

zhujiamin 发布系统代码 [TrainSys,网页端]

上级 f0be851e
import Schema from 'async-validator';
import qs from 'qs';
import { clone } from "ramda";
import { PluralizeRule } from './pluralizeRule';
......@@ -728,6 +729,25 @@ export class Util {
})
}
/**
* 获取路由参数
*
* @param path
*/
public static getRouteParams(path: string) {
const returnParams = {};
let tempPath: any = path.slice(path.indexOf('?') + 1,path.indexOf('#'));
const pathArray: Array<string> = tempPath.split('&');
if (pathArray && pathArray.length > 0) {
pathArray.forEach((item: any) => {
if (item && item.indexOf('=') !== -1) {
Object.assign(returnParams, qs.parse(item));
}
});
}
return returnParams;
}
}
/**
* 创建 UUID
......
......@@ -335,8 +335,8 @@ export default class AppCustomTheme extends Vue {
private getVars(): any {
const select = this.defaultThemes.find((item: any) => item.codeName === this.selectTheme);
const vars = {
// "@primary": select.color,
// "@font-family": this.selectFont
"@primary": select.color,
"@font-family": this.selectFont
};
if (this.themeOptions && Object.keys(this.themeOptions).length > 0) {
Object.keys(this.themeOptions).forEach((key: string) => {
......
......@@ -378,9 +378,10 @@ export default class AppFormItem extends Vue {
* @memberof AppFormItem
*/
public getShowTip(){
if(this.caption && ((this.caption.length)*14) > this.labelWidth ){
this.isShowTip = true;
}
const labelElement: any = this.$el.getElementsByClassName('app-form-item__label')[0];
if(this.caption && labelElement && labelElement.scrollWidth > labelElement.offsetWidth){
this.isShowTip = true;
}
}
}
......
......@@ -31,7 +31,7 @@ export class AppContent extends Vue {
* @memberof AppContent
*/
protected created(): void {
if (this.$slots.content_bottom) {
if (this.$slots.app_content_bottom) {
this.$footerRenderService.registerRightItem(() => {
return (
<div
......@@ -93,19 +93,19 @@ export class AppContent extends Vue {
slot={isSlot ? 'right' : null}
class={{
'app-content-right': true,
'hidden-bottom': !this.$uiState.layoutState.contentBottomShow || !this.$slots.content_bottom,
'hidden-bottom': !this.$uiState.layoutState.contentBottomShow || !this.$slots.app_content_bottom,
}}
>
<split mode="vertical" v-model={this.$uiState.layoutState.contentVerticalSplit} max={0.1}>
<div slot="top" class="app-content-exp">
{this.$slots.default}
</div>
{this.$slots.content_bottom ? (
{this.$slots.app_content_bottom ? (
<div slot="bottom" class="app-content-bottom">
<div class="app-content-bottom-close" on-click={() => this.changeBottom(false)}>
<icon type="ios-arrow-down" />
</div>
{this.$slots.content_bottom}
{this.$slots.app_content_bottom}
</div>
) : null}
</split>
......@@ -122,9 +122,9 @@ export class AppContent extends Vue {
public render(): VNode {
let content: any = null;
if (this.$uiState.layoutState.styleMode === 'STYLE2') {
content = [<div class="app-content-nav">{this.$slots.content_left}</div>, this.renderContent(false)];
content = [<div class="app-content-nav">{this.$slots.app_content_left}</div>, this.renderContent(false)];
} else {
content = this.$slots.content_left ? (
content = this.$slots.app_content_left ? (
<split
class={{ 'app-content-split': true, 'hidden-left': !this.$uiState.layoutState.leftExpContentShow }}
v-model={this.$uiState.layoutState.contentHorizontalSplit}
......@@ -132,7 +132,7 @@ export class AppContent extends Vue {
max={0.5}
>
<div slot="left" class="app-content-left">
{this.$slots.content_left}
{this.$slots.app_content_left}
</div>
{this.renderContent(true)}
</split>
......
......@@ -18,15 +18,15 @@ export class AppHeader extends Vue {
*/
public render(h: any): VNode {
return (
<div class="app-header">
<div class="app-style2-header">
<div class="app-header-left">
{this.$slots.header_left}
{Object.is(this.$uiState.layoutState.styleMode, 'STYLE2') ? (
<app-breadcrumb></app-breadcrumb>
) : null}
</div>
<div class="app-header-center">{this.$slots.header_content}</div>
<div class="app-header-right">{this.$slots.header_right}</div>
<div class="app-header-center">{this.$slots.app_header_content}</div>
<div class="app-header-right">{this.$slots.app_header_right}</div>
</div>
);
}
......
......@@ -26,10 +26,10 @@ export class AppLayout extends Vue {
this.$uiState.layoutState.styleMode !== 'DEFAULT',
}}
>
<div class="app-layout-header-warp">{this.$slots.header}</div>
<div class="app-layout-header-warp">{this.$slots.app_layout_header}</div>
<div class="app-layout-content-warp">{this.$slots.default}</div>
<div class="app-layout-footer-warp">
{this.$slots.footer}
{this.$slots.app_layout_footer}
</div>
</div>
);
......
......@@ -26,12 +26,10 @@
class="tag-caption-content"
>
<i
v-if="
item.meta.iconCls && !Object.is(item.meta.iconCls, '')
"
:class="item.meta.iconCls"
v-if="item.meta.iconCls && !Object.is(item.meta.iconCls, '')"
:class="{[item.meta.iconCls]:true,'tag-caption-content__text-icon':true}"
></i>
<img v-else :src="item.meta.imgPath" class="text-icon" />
<img v-else :src="item.meta.imgPath" class="tag-caption-content__text-image" />
&nbsp;{{ translate(item) }}
</div>
</div>
......
......@@ -150,18 +150,18 @@ export class AppStyle2IndexViewLayout extends AppStyle2DefaultLayout {
}
return (
<app-layout ref="appLayout" style={{ 'font-family': this.selectFont }} class={viewClassNames}>
<template slot="header">
<template slot="app_layout_header">
<app-header>
<template slot="header_left">
<div class="title">
{this.viewInstance.enableAppSwitch ? <span class="menuicon" style="cursor: pointer;" on-click={() => this.contextMenuDragVisiable = !this.contextMenuDragVisiable}><icon type="md-menu" />&nbsp;</span> : null}
<template slot="app_header_left">
<div class="tapp_header_caption">
{this.viewInstance.enableAppSwitch ? <span class="app-header__caption__menuicon" on-click={() => this.contextMenuDragVisiable = !this.contextMenuDragVisiable}><icon type="md-menu" />&nbsp;</span> : null}
{this.showCaption ? this.model.srfCaption : null}
</div>
</template>
<template slot="header_right">
<template slot="app_header_right">
{this.$slots.headerMenus}
{this.$topRenderService.rightItemsRenders.map((fun: any) => fun(h))}
<app-lang title={this.model.srfTitle || this.model.srfCaption} style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-lang title={this.model.srfTitle || this.model.srfCaption}></app-lang>
{<app-orgsector />}
{<app-user viewStyle={this.viewInstance.viewStyle} />}
{/* {<app-custom-theme viewStyle={this.viewInstance.viewStyle}></app-custom-theme>} */}
......@@ -172,7 +172,7 @@ export class AppStyle2IndexViewLayout extends AppStyle2DefaultLayout {
</template>
<app-content>
{leftContent ?
<template slot="content_left">
<template slot="app_content_left">
{leftContent}
</template> : null}
{styleMode === 'DEFAULT' ? this.$slots.tabPageExp : null}
......@@ -182,11 +182,11 @@ export class AppStyle2IndexViewLayout extends AppStyle2DefaultLayout {
</app-keep-alive>
</div>
{this.$slots.bootomExp ?
<template slot="content_bottom">
<template slot="app_content_bottom">
{this.$slots.bootomExp}
</template> : null}
</app-content>
<template slot="footer">
<template slot="app_layout_footer">
{ this.viewInstance.defaultPage
? <app-footer v-notification-signal={this.appLoadingService.isLoading} ref="footer" />
: <app-footer ref="footer" />
......
.app-header-right-menus {
display: flex;
margin-right: 200px;
> .ivu-menu.ivu-menu-horizontal {
height: 35px;
......
.app-style2-header {
display: flex;
justify-content: space-between;
height: 100%;
box-shadow: 1px 0 6px 0 rgba(39, 54, 78, 0.12);
padding: 0px 6px;
> .app-header-left {
.app-header__caption {
font-size: 18px;
font-weight: 700;
}
.app-header__caption__menuicon{
cursor: pointer;
}
}
> .app-header-left,
> .app-header-center,
> .app-header-right {
display: flex;
align-items: center;
.app-header-menus{
margin-right: 100px;
}
}
}
......@@ -118,4 +118,5 @@
@import "./context-menu.less";
@import "./context-menu-drag.less";
@import "./app-studioaction.less";
@import "./disk-image-upload.less";
\ No newline at end of file
@import "./disk-image-upload.less";
@import "./app-header.less";
\ No newline at end of file
.view-style2{
.ibiz-page-tag {
position: relative;
box-sizing: border-box;
height: 34px;
padding: 0 60px 0 30px;
margin: 0;
.ibiz-page-tag__body {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
.view-style2 {
.ibiz-page-tag {
position: relative;
box-sizing: border-box;
height: 34px;
padding: 0 60px 0 30px;
margin: 0;
}
.ibiz-page-tag__body {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
.ivu-tag:hover,
.ivu-tag.tag-is-active {
.ivu-icon-ios-close {
visibility: initial;
}
.ivu-tag:hover,
.ivu-tag.tag-is-active {
.ivu-icon-ios-close {
visibility: initial;
}
span {
.ivu-tag:last-child {
border-right: none;
}
}
span {
.ivu-tag:last-child {
border-right: none;
}
}
}
.move-btn {
font-size: 18px;
width: 30px;
height: 34px;
line-height: 34px;
text-align: center;
cursor: pointer;
}
.move-btn:hover {
background: #efefef;
}
.ibiz-page-tag__left,
.ibiz-page-tag__right,
.ivu-dropdown {
position: absolute;
top: 0;
}
.ibiz-page-tag__left {
left: 0;
}
.ibiz-page-tag__right {
right: 30px;
}
.ivu-dropdown {
right: 0;
}
}
.ibiz-page-tag__body__tags {
position: absolute;
overflow: visible;
white-space: nowrap;
transition: left 0.3s ease;
.ivu-tag {
margin: 0;
.move-btn {
font-size: 18px;
width: 30px;
height: 34px;
line-height: 34px;
border: 0;
border-radius: 0;
font-size: 14px;
.ivu-tag-text {
text-align: center;
cursor: pointer;
border-right: none;
}
.move-btn:hover {
background: #efefef;
}
.ibiz-page-tag__left,
.ibiz-page-tag__right,
.ivu-dropdown {
position: absolute;
top: 0;
}
.ibiz-page-tag__left {
left: 0;
}
.ibiz-page-tag__right {
right: 30px;
}
.ivu-dropdown {
right: 0;
}
> i::before {
.ibiz-page-tag__body__tags {
position: absolute;
overflow: visible;
white-space: nowrap;
transition: left 0.3s ease;
.ivu-tag {
margin: 0;
height: 34px;
line-height: 34px;
border: 0;
border-radius: 0;
font-size: 14px;
}
.ivu-icon-ios-close {
visibility: hidden;
}
.tag-caption-content__text-icon::before {
vertical-align: initial;
}
}
.text-icon {
height: 16px;
margin-bottom: -3px;
.tags-transition-move {
transition: transform 0.3s;
}
.ivu-icon-ios-close {
visibility: hidden;
.tags-transition-enter,
.tags-transition-leave-to {
opacity: 0;
}
.tag-caption-content__text-image {
height: 16px;
margin-bottom: -3px;
}
}
.tags-transition-move {
transition: transform 0.3s;
}
.tags-transition-enter,
.tags-transition-leave-to {
opacity: 0;
}
}
.body__tags__tag-text {
cursor: pointer;
display: table-cell;
.body__tags__tag-text {
cursor: pointer;
display: table-cell;
.ivu-tooltip {
display: block;
.ivu-tooltip {
display: block;
}
.ivu-tooltip-rel {
display: block;
......@@ -112,13 +111,13 @@
overflow: hidden;
text-overflow: ellipsis;
}
}
.tag-caption-content {
max-width: 250px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
.tag-caption-content {
max-width: 250px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
}
......@@ -126,4 +125,4 @@
.view-style2 .ibiz-page-tag {
background-color: #57A3FD;
}
}
}
\ No newline at end of file
......@@ -62,4 +62,29 @@
padding: 0 16px 16px 16px;
}
}
}
.view-style2.appindexview{
.app-header{
.app-header-left,.app-header-center,.app-header-right{
flex-grow: 1;
display: flex;
}
.app-header-right{
justify-content: end;
}
.ivu-dropdown{
position: static;
display: inline-block;
font-size: 15px;
padding: 0px 10px
}
}
.app-lang{
font-size: 15px;
padding: 0 10px;
}
.ivu-split-pane{
height: 100%;
}
}
\ No newline at end of file
......@@ -2194,4 +2194,10 @@ body {
>i:hover{
color: @color-primary-base;
}
}
.view-style2{
.app-footer{
background-color: @color-primary-base;
}
}
\ No newline at end of file
......@@ -21,6 +21,7 @@
var baseUrl = getUrlParam('baseUrl');
var redirectUrl = getUrlParam('redirect_uri');
var client_id = getUrlParam('client_id');
var redirect_state = getUrlParam('redirect_state');
if (code && id && state) {
// 通过授权code请求后台
$.ajax({
......@@ -53,7 +54,7 @@
'Authorization':`Bearer ${data.token}`
},
success: function (data) {
window.location.href = redirectUrl + '?code=' + data;
window.location.href = redirectUrl + '?code=' + data + '&state=' + redirect_state;
}
})
}else{
......
......@@ -21,6 +21,7 @@
var baseUrl = getUrlParam('baseUrl');
var redirectUrl = getUrlParam('redirect_uri');
var client_id = getUrlParam('client_id');
var redirect_state = getUrlParam('redirect_state');
if (code && id && state) {
// 通过授权code请求后台
$.ajax({
......@@ -53,7 +54,7 @@
'Authorization':`Bearer ${data.token}`
},
success: function (data) {
window.location.href = redirectUrl + '?code=' + data;
window.location.href = redirectUrl + '?code=' + data + '&state=' + redirect_state;
}
})
}else{
......
......@@ -215,7 +215,7 @@ export default class Login extends Vue {
* @memberof Login
*/
public created() {
this.curRouteParams = this.getRouteParams(window.location.href);
this.curRouteParams = Util.getRouteParams(window.location.href);
this.unifiedLogin();
this.setRules();
this.initLoginView().then((result: boolean) => {
......@@ -247,12 +247,19 @@ export default class Login extends Vue {
// 已经登录
if (token) {
this.isThridLink = true;
// 系统ID
let srfdcsystem: string = '';
const tempViewParam = ViewTool.getDcSystemIdViewParam();
if (tempViewParam && tempViewParam.srfdcsystem) {
srfdcsystem = tempViewParam.srfdcsystem;
}
const response = await Http.getInstance().get('/uaa/oauth/code', { 'client_id': this.curRouteParams.client_id }, false, {
'Authorization': `Bearer ${token}`,
'srfsystemid': srfdcsystem
});
const { status, data } = response;
if (status == 200) {
window.location.href = `${this.curRouteParams.redirect_uri}?code=${data}`;
window.location.href = `${this.curRouteParams.redirect_uri}?code=${data}&state=${this.curRouteParams.state}`;
} else {
this.$throw(this.$t('components.login.loginfailed') as string, 'loginInit');
}
......@@ -384,7 +391,7 @@ export default class Login extends Vue {
}).then((response: any) => {
const { status, data } = response;
if (status == 200) {
window.location.href = `${this.curRouteParams.redirect_uri}?code=${data}`;
window.location.href = `${this.curRouteParams.redirect_uri}?code=${data}&state=${this.curRouteParams.state}`;
} else {
this.$throw(this.$t('components.login.loginfailed') as string, 'loginInit');
}
......@@ -492,6 +499,12 @@ export default class Login extends Vue {
console.error('未传入客户端ID');
this.$throw(this.$t('components.login.loginfailed') as string, 'dingtalkHandleClick');
}
if (this.curRouteParams.state) {
redirect_uri += `&redirect_state=${this.curRouteParams.state}`;
} else {
console.error('未传入state');
this.$throw(this.$t('components.login.loginfailed') as string, 'dingtalkHandleClick');
}
const redirect_uri_encode = encodeURIComponent(redirect_uri);
// 3.钉钉扫码url
const url =
......@@ -545,6 +558,12 @@ export default class Login extends Vue {
console.error('未传入客户端ID');
this.$throw(this.$t('components.login.loginfailed') as string, 'wxWorkHandleClick');
}
if (this.curRouteParams.state) {
redirect_uri += `&redirect_state=${this.curRouteParams.state}`;
} else {
console.error('未传入state');
this.$throw(this.$t('components.login.loginfailed') as string, 'wxWorkHandleClick');
}
const redirect_uri_encode = encodeURIComponent(redirect_uri);
// 3.钉钉扫码url
const url =
......@@ -648,25 +667,6 @@ export default class Login extends Vue {
return baseUrl;
}
/**
* 获取路由参数
*
* @param path
* @memberof Login
*/
private getRouteParams(path: string) {
const returnParams = {};
const tempPath: any = path.slice(path.indexOf('?') + 1);
const pathArray: Array<string> = tempPath.split('&');
if (pathArray && pathArray.length > 0) {
pathArray.forEach((item: any) => {
if (item && item.indexOf('=') !== -1) {
Object.assign(returnParams, qs.parse(item));
}
});
}
return returnParams;
}
}
</script>
......
import qs from 'qs';
import { GlobalHelp, IPSAppView } from '@ibiz/dynamic-model-api';
import { clearCookie, getCookie, SyncSeriesHook } from 'qx-util';
import { AppServiceBase, Http, getSessionStorage, setSessionStorage, AppModelService, Util, GetModelService, ViewTool, LogUtil } from 'ibiz-core';
import { AppServiceBase, Http, getSessionStorage, setSessionStorage, AppModelService, Util, GetModelService, ViewTool, LogUtil, IParams } from 'ibiz-core';
import { AppCenterService, AppNoticeService, AppViewLogicService, NoticeHandler } from 'ibiz-vue';
import { Environment } from '@/environments/environment';
import i18n from '@/locale';
......@@ -73,27 +73,33 @@ export class AuthGuard {
*/
authGuard(url: string, params: any = {}, router: any): any {
return new Promise((resolve: any, reject: any) => {
const Environment = AppServiceBase.getInstance().getAppEnvironment();
if (Environment && Environment.SaaSMode) {
if (getSessionStorage('activeOrgData')) {
const routeParams: IParams = Util.getRouteParams(window.location.href);
if (routeParams && routeParams.redirect_uri) {
router.push({ name: 'login' });
resolve(false);
} else {
const Environment = AppServiceBase.getInstance().getAppEnvironment();
if (Environment && Environment.SaaSMode) {
if (getSessionStorage('activeOrgData')) {
this.getAppData(url, params, router).then((result: any) => {
result ? resolve(true) : reject(false);
});
} else {
this.getOrgsByDcsystem(router).then((result: boolean) => {
if (!result) {
this.initAppService(router).then(() => reject(false));
} else {
this.getAppData(url, params, router).then((result: any) => {
result ? resolve(true) : reject(false);
});
}
});
}
} else {
this.getAppData(url, params, router).then((result: any) => {
result ? resolve(true) : reject(false);
});
} else {
this.getOrgsByDcsystem(router).then((result: boolean) => {
if (!result) {
this.initAppService(router).then(() => reject(false));
} else {
this.getAppData(url, params, router).then((result: any) => {
result ? resolve(true) : reject(false);
});
}
});
}
} else {
this.getAppData(url, params, router).then((result: any) => {
result ? resolve(true) : reject(false);
});
}
});
}
......@@ -249,7 +255,7 @@ export class AuthGuard {
*/
public async initAppStyle(cssUrl: string) {
const cssContent = await this.loadAppStyle(cssUrl);
if(!cssContent){
if (!cssContent) {
LogUtil.warn("暂无应用样式表");
return;
}
......@@ -294,8 +300,8 @@ export class AuthGuard {
*
* @param cssContent
*/
public mountedAppStyle(cssContent:string){
let appStyleDom:any;
public mountedAppStyle(cssContent: string) {
let appStyleDom: any;
for (let i = document.head.childNodes.length - 1; i >= 0; i--) {
const children: any = document.head.childNodes[i]
if (children.nodeName == "STYLE" && children.getAttribute('title') && children.getAttribute('title') == 'app-style-css') {
......@@ -461,4 +467,6 @@ export class AuthGuard {
store.commit('addAppData', {});
store.dispatch('authresource/commitAuthData', {});
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ import { Store } from 'vuex';
import Router from 'vue-router';
import i18n from '@/locale';
import { Environment } from '@/environments/environment';
import { Http, getSessionStorage } from 'ibiz-core';
import { Http, getSessionStorage, Util, IParams } from 'ibiz-core';
import { AppAuthService, AppLoadingService } from 'ibiz-vue';
import { clearCookie, getCookie, notNilEmpty, SyncSeriesHook } from 'qx-util';
import { MicroAppService } from '@/micro';
......@@ -101,7 +101,9 @@ export class Interceptors {
if (Environment.SaaSMode) {
let activeOrgData = getSessionStorage('activeOrgData');
config.headers['srforgid'] = activeOrgData?.orgid;
config.headers['srfsystemid'] = activeOrgData?.systemid;
if (!config.headers['srfsystemid']) {
config.headers['srfsystemid'] = activeOrgData?.systemid;
}
}
if (getCookie('ibzuaa-token')) {
config.headers['Authorization'] = `Bearer ${getCookie('ibzuaa-token')}`;
......@@ -114,41 +116,41 @@ export class Interceptors {
}
// const appAuthService: AppAuthService = AppAuthService.getInstance();
// if (appAuthService.isExpired(new Date())) {
// let refresh = new Promise((resolve, reject) => {
// appAuthService.refreshToken(config).then((result: any) => {
// if (result) {
// if (getCookie('ibzuaa-token')) {
// config.headers['Authorization'] = `Bearer ${getCookie('ibzuaa-token')}`;
// } else {
// // 第三方应用打开免登
// if (sessionStorage.getItem("srftoken")) {
// const token = sessionStorage.getItem('srftoken');
// config.headers['Authorization'] = `Bearer ${token}`;
// }
// }
// config.headers['Accept-Language'] = i18n.locale;
// if (!Object.is(Environment.BaseUrl, "") && !config.url.startsWith('https://') && !config.url.startsWith('http://') && !config.url.startsWith('./assets') && !config.url.startsWith(`./${MicroAppService.getInstance().getMicroAppFolder()}/assets`)) {
// config.url = Environment.BaseUrl + config.url;
// }
// // 开启loading
// this.beginLoading();
// return resolve(config);
// } else {
// this.doNoLogin(null);
// }
// })
// })
// return refresh;
// let refresh = new Promise((resolve, reject) => {
// appAuthService.refreshToken(config).then((result: any) => {
// if (result) {
// if (getCookie('ibzuaa-token')) {
// config.headers['Authorization'] = `Bearer ${getCookie('ibzuaa-token')}`;
// } else {
// // 第三方应用打开免登
// if (sessionStorage.getItem("srftoken")) {
// const token = sessionStorage.getItem('srftoken');
// config.headers['Authorization'] = `Bearer ${token}`;
// }
// }
// config.headers['Accept-Language'] = i18n.locale;
// if (!Object.is(Environment.BaseUrl, "") && !config.url.startsWith('https://') && !config.url.startsWith('http://') && !config.url.startsWith('./assets') && !config.url.startsWith(`./${MicroAppService.getInstance().getMicroAppFolder()}/assets`)) {
// config.url = Environment.BaseUrl + config.url;
// }
// // 开启loading
// this.beginLoading();
// return resolve(config);
// } else {
// this.doNoLogin(null);
// }
// })
// })
// return refresh;
// } else {
config.headers['Accept-Language'] = i18n.locale;
if (!Object.is(Environment.BaseUrl, "") && !config.url.startsWith('https://') && !config.url.startsWith('http://') && !config.url.startsWith('./assets') && !config.url.startsWith(`./${MicroAppService.getInstance().getMicroAppFolder()}/assets`)) {
config.url = Environment.BaseUrl + config.url;
}
config.headers['Accept-Language'] = i18n.locale;
if (!Object.is(Environment.BaseUrl, "") && !config.url.startsWith('https://') && !config.url.startsWith('http://') && !config.url.startsWith('./assets') && !config.url.startsWith(`./${MicroAppService.getInstance().getMicroAppFolder()}/assets`)) {
config.url = Environment.BaseUrl + config.url;
}
// 开启loading
this.beginLoading();
// 开启loading
this.beginLoading();
return config;
return config;
// }
}, (error: any) => {
return Promise.reject(error);
......@@ -209,23 +211,28 @@ export class Interceptors {
if (MicroAppService.getInstance().getIsMicroApp()) {
MicroAppService.getInstance().noticeBaseApp({ action: 'LOGOUT' })
} else {
if ((Environment as any).casLoginUrl) {
let pathname = location.pathname;
pathname = pathname.substring(0, pathname.lastIndexOf('/'));
let redirect = '';
if (notNilEmpty(Environment.casRedirectUrl)) {
redirect = `redirectUrl=${encodeURIComponent(Environment.casRedirectUrl)}&`;
}
window.location.href = `${(Environment as any).casLoginUrl}/login?${redirect}service=${encodeURIComponent(
`${location.origin}${pathname}/cas-login.html?RU=${encodeURIComponent(location.href)}`,
)}`;
} else if (Environment.loginUrl) {
window.location.href = `${Environment.loginUrl}?redirect=${window.location.href}`;
const routeParams: IParams = Util.getRouteParams(window.location.href);
if (routeParams && routeParams.redirect_uri) {
this.router.push({ name: 'login' });
} else {
if (Object.is(this.router.currentRoute.name, 'login')) {
return;
if ((Environment as any).casLoginUrl) {
let pathname = location.pathname;
pathname = pathname.substring(0, pathname.lastIndexOf('/'));
let redirect = '';
if (notNilEmpty(Environment.casRedirectUrl)) {
redirect = `redirectUrl=${encodeURIComponent(Environment.casRedirectUrl)}&`;
}
window.location.href = `${(Environment as any).casLoginUrl}/login?${redirect}service=${encodeURIComponent(
`${location.origin}${pathname}/cas-login.html?RU=${encodeURIComponent(location.href)}`,
)}`;
} else if (Environment.loginUrl) {
window.location.href = `${Environment.loginUrl}?redirect=${window.location.href}`;
} else {
if (Object.is(this.router.currentRoute.name, 'login')) {
return;
}
this.router.push({ name: 'login', query: { redirect: window.location.hash.replace("#", '') } });
}
this.router.push({ name: 'login', query: { redirect: window.location.hash.replace("#", '') } });
}
}
}
......@@ -239,7 +246,7 @@ export class Interceptors {
private clearAppData() {
// 清除user、token
clearCookie('ibzuaa-token', true);
clearCookie('ibzuaa-expired',true);
clearCookie('ibzuaa-expired', true);
clearCookie('ibzuaa-user', true);
// 清除应用级数据
localStorage.removeItem('localdata')
......
......@@ -104,66 +104,66 @@ export class AppComponentService {
this.viewMap.set("DEPANELVIEW_DEFAULT", 'app-default-depanelview');
this.viewMap.set("DEINDEXVIEW_DEFAULT", 'app-default-deindexview');
// STYLE2 样式
// this.viewMap.set("APPINDEXVIEW_STYLE2", 'app-style2-indexview');
// this.viewMap.set("DEEDITVIEW_STYLE2", 'app-style2-editview');
// this.viewMap.set("DEEDITVIEW2_STYLE2", 'app-style2-editview2');
// this.viewMap.set("DEEDITVIEW3_STYLE2", 'app-style2-editview3');
// this.viewMap.set("DEEDITVIEW4_STYLE2", 'app-style2-editview4');
// this.viewMap.set("DEGRIDVIEW_STYLE2", 'app-style2-gridview');
// this.viewMap.set("DELISTVIEW_STYLE2", 'app-style2-listview');
// this.viewMap.set("DECHARTVIEW_STYLE2", 'app-style2-chartview');
// this.viewMap.set("DECHARTEXPVIEW_STYLE2", 'app-style2-chartexpview');
// this.viewMap.set("DEDATAVIEW_STYLE2", 'app-style2-dataviewview');
// this.viewMap.set("DECALENDARVIEW_STYLE2", 'app-style2-calendarview');
// this.viewMap.set("DEKANBANVIEW_STYLE2", 'app-style2-kanbanview');
// this.viewMap.set("DEPORTALVIEW_STYLE2", 'app-style2-deportalview');
// this.viewMap.set("DETABEXPVIEW_STYLE2", 'app-style2-tabexpview');
// this.viewMap.set("DETABSEARCHVIEW_STYLE2", 'app-style2-tabsearchview');
// this.viewMap.set("DEMEDITVIEW9_STYLE2", 'app-style2-meditview');
// this.viewMap.set("DEGANTTVIEW_STYLE2", 'app-style2-ganttview');
// this.viewMap.set("DETREEVIEW_STYLE2", 'app-style2-treeview');
// this.viewMap.set("DETREEGRIDEXVIEW_STYLE2", 'app-style2-treegridexview');
// this.viewMap.set("DELISTEXPVIEW_STYLE2", 'app-style2-listexpview');
// this.viewMap.set("DEGRIDEXPVIEW_STYLE2", 'app-style2-gridexpview');
// this.viewMap.set("DEWFDYNAEXPGRIDVIEW_STYLE2", 'app-style2-wfdynaexpgridview');
// this.viewMap.set("DEDATAVIEWEXPVIEW_STYLE2", 'app-style2-dataviewexpview');
// this.viewMap.set("DEPICKUPGRIDVIEW_STYLE2", 'app-style2-pickupgridview');
// this.viewMap.set("DEMPICKUPVIEW_STYLE2", 'app-style2-mpickupview');
// this.viewMap.set("DEPICKUPVIEW_STYLE2", 'app-style2-pickupview');
// this.viewMap.set("DECALENDAREXPVIEW_STYLE2", 'app-style2-calendarexpview');
// this.viewMap.set("DETREEEXPVIEW_STYLE2", 'app-style2-treeexpview');
// this.viewMap.set("DEPICKUPTREEVIEW_STYLE2", 'app-style2-pickuptreeview');
// this.viewMap.set("DECUSTOMVIEW_STYLE2", 'app-style2-customview');
// this.viewMap.set("DEOPTVIEW_STYLE2", 'app-style2-optview');
// this.viewMap.set("DEOPTVIEW_STYLE2", 'app-style2-optview');
// this.viewMap.set("APPPORTALVIEW_STYLE2", 'app-style2-portalview');
// this.viewMap.set("DEWFDYNAACTIONVIEW_STYLE2", 'app-style2-wfdynaactionview');
// this.viewMap.set("DEWFDYNASTARTVIEW_STYLE2", 'app-style2-wfdynastartview');
// this.viewMap.set("DEWFDYNAEDITVIEW_STYLE2", 'app-style2-wfdynaeditview');
// this.viewMap.set("DEWFDYNAEDITVIEW3_STYLE2", 'app-style2-wfdynaeditview3');
// this.viewMap.set("DEPORTALVIEW9_STYLE2", 'app-style2-deportalview');
// this.viewMap.set("DEEDITVIEW9_STYLE2", 'app-style2-editview');
// this.viewMap.set("DEGRIDVIEW9_STYLE2", 'app-style2-gridview');
// this.viewMap.set("DELISTVIEW9_STYLE2", 'app-style2-listview');
// this.viewMap.set("DEHTMLVIEW_STYLE2", 'app-style2-htmlview');
// this.viewMap.set("DECHARTVIEW9_STYLE2", 'app-style2-chartview');
// this.viewMap.set("DEDATAVIEW9_STYLE2",'app-style2-dataviewview');
// this.viewMap.set("DEFORMPICKUPDATAVIEW_STYLE2","app-style2-formpickupdataview");
// this.viewMap.set("DEINDEXPICKUPDATAVIEW_STYLE2","app-style2-indexpickupdataview");
// this.viewMap.set("DEWIZARDVIEW_STYLE2", 'app-style2-wizardview');
// this.viewMap.set("DEWFACTIONVIEW_STYLE2", 'app-style2-wfactionview');
// this.viewMap.set("DEREDIRECTVIEW_STYLE2", 'app-style2-deredirectview');
// this.viewMap.set("APPWFSTEPTRACEVIEW_STYLE2", 'app-style2-wfsteptraceview');
// this.viewMap.set("DEREPORTVIEW_STYLE2",'app-style2-dereportview');
// this.viewMap.set("DEMAPEXPVIEW_STYLE2",'app-style2-mapexpview');
// this.viewMap.set("DEPANELVIEW_STYLE2",'app-style2-depanelview');
// this.viewMap.set("DEMAPVIEW_STYLE2", 'app-style2-mapview');
this.viewMap.set("APPINDEXVIEW_STYLE2", 'app-style2-indexview');
this.viewMap.set("DEEDITVIEW_STYLE2", 'app-style2-editview');
this.viewMap.set("DEEDITVIEW2_STYLE2", 'app-style2-editview2');
this.viewMap.set("DEEDITVIEW3_STYLE2", 'app-style2-editview3');
this.viewMap.set("DEEDITVIEW4_STYLE2", 'app-style2-editview4');
this.viewMap.set("DEGRIDVIEW_STYLE2", 'app-style2-gridview');
this.viewMap.set("DELISTVIEW_STYLE2", 'app-style2-listview');
this.viewMap.set("DECHARTVIEW_STYLE2", 'app-style2-chartview');
this.viewMap.set("DECHARTEXPVIEW_STYLE2", 'app-style2-chartexpview');
this.viewMap.set("DEDATAVIEW_STYLE2", 'app-style2-dataviewview');
this.viewMap.set("DECALENDARVIEW_STYLE2", 'app-style2-calendarview');
this.viewMap.set("DEKANBANVIEW_STYLE2", 'app-style2-kanbanview');
this.viewMap.set("DEPORTALVIEW_STYLE2", 'app-style2-deportalview');
this.viewMap.set("DETABEXPVIEW_STYLE2", 'app-style2-tabexpview');
this.viewMap.set("DETABSEARCHVIEW_STYLE2", 'app-style2-tabsearchview');
this.viewMap.set("DEMEDITVIEW9_STYLE2", 'app-style2-meditview');
this.viewMap.set("DEGANTTVIEW_STYLE2", 'app-style2-ganttview');
this.viewMap.set("DETREEVIEW_STYLE2", 'app-style2-treeview');
this.viewMap.set("DETREEGRIDEXVIEW_STYLE2", 'app-style2-treegridexview');
this.viewMap.set("DELISTEXPVIEW_STYLE2", 'app-style2-listexpview');
this.viewMap.set("DEGRIDEXPVIEW_STYLE2", 'app-style2-gridexpview');
this.viewMap.set("DEWFDYNAEXPGRIDVIEW_STYLE2", 'app-style2-wfdynaexpgridview');
this.viewMap.set("DEDATAVIEWEXPVIEW_STYLE2", 'app-style2-dataviewexpview');
this.viewMap.set("DEPICKUPGRIDVIEW_STYLE2", 'app-style2-pickupgridview');
this.viewMap.set("DEMPICKUPVIEW_STYLE2", 'app-style2-mpickupview');
this.viewMap.set("DEPICKUPVIEW_STYLE2", 'app-style2-pickupview');
this.viewMap.set("DECALENDAREXPVIEW_STYLE2", 'app-style2-calendarexpview');
this.viewMap.set("DETREEEXPVIEW_STYLE2", 'app-style2-treeexpview');
this.viewMap.set("DEPICKUPTREEVIEW_STYLE2", 'app-style2-pickuptreeview');
this.viewMap.set("DECUSTOMVIEW_STYLE2", 'app-style2-customview');
this.viewMap.set("DEOPTVIEW_STYLE2", 'app-style2-optview');
this.viewMap.set("DEOPTVIEW_STYLE2", 'app-style2-optview');
this.viewMap.set("APPPORTALVIEW_STYLE2", 'app-style2-portalview');
this.viewMap.set("DEWFDYNAACTIONVIEW_STYLE2", 'app-style2-wfdynaactionview');
this.viewMap.set("DEWFDYNASTARTVIEW_STYLE2", 'app-style2-wfdynastartview');
this.viewMap.set("DEWFDYNAEDITVIEW_STYLE2", 'app-style2-wfdynaeditview');
this.viewMap.set("DEWFDYNAEDITVIEW3_STYLE2", 'app-style2-wfdynaeditview3');
this.viewMap.set("DEPORTALVIEW9_STYLE2", 'app-style2-deportalview');
this.viewMap.set("DEEDITVIEW9_STYLE2", 'app-style2-editview');
this.viewMap.set("DEGRIDVIEW9_STYLE2", 'app-style2-gridview');
this.viewMap.set("DELISTVIEW9_STYLE2", 'app-style2-listview');
this.viewMap.set("DEHTMLVIEW_STYLE2", 'app-style2-htmlview');
this.viewMap.set("DECHARTVIEW9_STYLE2", 'app-style2-chartview');
this.viewMap.set("DEDATAVIEW9_STYLE2",'app-style2-dataviewview');
this.viewMap.set("DEFORMPICKUPDATAVIEW_STYLE2","app-style2-formpickupdataview");
this.viewMap.set("DEINDEXPICKUPDATAVIEW_STYLE2","app-style2-indexpickupdataview");
this.viewMap.set("DEWIZARDVIEW_STYLE2", 'app-style2-wizardview');
this.viewMap.set("DEWFACTIONVIEW_STYLE2", 'app-style2-wfactionview');
this.viewMap.set("DEREDIRECTVIEW_STYLE2", 'app-style2-deredirectview');
this.viewMap.set("APPWFSTEPTRACEVIEW_STYLE2", 'app-style2-wfsteptraceview');
this.viewMap.set("DEREPORTVIEW_STYLE2",'app-style2-dereportview');
this.viewMap.set("DEMAPEXPVIEW_STYLE2",'app-style2-mapexpview');
this.viewMap.set("DEPANELVIEW_STYLE2",'app-style2-depanelview');
this.viewMap.set("DEMAPVIEW_STYLE2", 'app-style2-mapview');
// STYLE3 样式
// this.viewMap.set("APPINDEXVIEW_STYLE3", 'app-style2-indexview');
this.viewMap.set("APPINDEXVIEW_STYLE3", 'app-style2-indexview');
// STYLE4 样式
// this.viewMap.set("APPINDEXVIEW_STYLE4", 'app-default-indexview');
// this.viewMap.set("APPPORTALVIEW_STYLE4", 'app-style4-portalview');
// this.viewMap.set("DEPORTALVIEW_STYLE4", 'app-style4-deportalview');
this.viewMap.set("APPINDEXVIEW_STYLE4", 'app-default-indexview');
this.viewMap.set("APPPORTALVIEW_STYLE4", 'app-style4-portalview');
this.viewMap.set("DEPORTALVIEW_STYLE4", 'app-style4-deportalview');
// 注册视图插件
// 注册视图样式,无插件模式
}
......
......@@ -169,7 +169,7 @@
</changeSet>
<!--输出实体[PHONE]数据结构 -->
<changeSet author="root" id="tab-phone-59-6">
<changeSet author="root" id="tab-phone-61-6">
<createTable tableName="T_PHONE">
<column name="PHONEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_PHONE"/>
......@@ -264,7 +264,7 @@
</changeSet>
<!--输出实体[STUDENT]数据结构 -->
<changeSet author="root" id="tab-student-43-10">
<changeSet author="root" id="tab-student-44-10">
<createTable tableName="T_STUDENT">
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
......
......@@ -175,8 +175,11 @@
"showCaption" : true
}, {
"codeName" : "druipart1",
"contentHeight" : 500.0,
"contentWidth" : 1000.0,
"detailStyle" : "DEFAULT",
"detailType" : "DRUIPART",
"height" : 500.0,
"name" : "druipart1",
"getPSAppView" : {
"accUserMode" : 2,
......@@ -1771,7 +1774,9 @@
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
"height" : 500,
"layout" : "TABLE_24COL",
"width" : 1000
},
"getPSNavigateContexts" : [ {
"key" : "CONTEXTPARAM2",
......@@ -1803,6 +1808,7 @@
"SRFDER1NID" : "DER1N_REGINFO_STUDENT_STUDENTID"
},
"refreshItems" : "studentname;field2;",
"width" : 1000.0,
"needSave" : false,
"refreshItemsSetParamOnly" : false,
"showCaption" : true
......
......@@ -1161,8 +1161,11 @@
"showCaption" : true
}, {
"codeName" : "druipart1",
"contentHeight" : 500.0,
"contentWidth" : 1000.0,
"detailStyle" : "DEFAULT",
"detailType" : "DRUIPART",
"height" : 500.0,
"name" : "druipart1",
"getPSAppView" : {
"accUserMode" : 2,
......@@ -2757,7 +2760,9 @@
},
"getPSLayoutPos" : {
"colMD" : 24,
"layout" : "TABLE_24COL"
"height" : 500,
"layout" : "TABLE_24COL",
"width" : 1000
},
"getPSNavigateContexts" : [ {
"key" : "CONTEXTPARAM2",
......@@ -2789,6 +2794,7 @@
"SRFDER1NID" : "DER1N_REGINFO_STUDENT_STUDENTID"
},
"refreshItems" : "studentname;field2;",
"width" : 1000.0,
"needSave" : false,
"refreshItemsSetParamOnly" : false,
"showCaption" : true
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册