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

tony001 发布系统代码 [TrainSys,Mob]

上级 841b332e
......@@ -7,6 +7,24 @@
## [Unreleased]
## [0.0.2] - 2023-12-06
### Added
- 支持面板分组容器 & 面板分页容器
- 支持确认操作框工具类
- dashboard支持嵌入视图
- 列表支持选择模式和默认模式
- 403时补充弹窗提示,点击确认后退出登录
### Change
- 表单多数据部件样式优化
### Fixed
- 修复关系界面标题为空时绘制标题容器
## [0.0.1] - 2023-12-04
正式发版
......
FROM image.ibizlab.cn/library/nginx-dynamic:v5.4
FROM image.ibizlab.cn/library/nginx-dynamic:v5.1
WORKDIR /
COPY dist /dist
COPY environment.config /
RUN sed -i "s#20086#30086#g" /etc/nginx/conf.d/nginx.conf
RUN sed -i "/server_name/a \ keepalive_time 3600;" /etc/nginx/conf.d/nginx.conf
\ No newline at end of file
{
"name": "@ibiz-template/next-mob",
"private": true,
"version": "0.0.1",
"version": "0.0.2",
"description": "An Ionic project",
"scripts": {
"dev": "vite",
......@@ -11,14 +11,14 @@
},
"dependencies": {
"@ibiz-template-package/vs-tree-ex": "^0.1.1",
"@ibiz-template/core": "^0.4.0",
"@ibiz-template/core": "^0.4.5",
"@ibiz-template/mob-theme": "^0.2.9",
"@ibiz-template/mob-vue3-components": "^0.0.1",
"@ibiz-template/model-helper": "^0.4.4",
"@ibiz-template/runtime": "^0.4.4",
"@ibiz-template/mob-vue3-components": "^0.0.2",
"@ibiz-template/model-helper": "^0.4.5",
"@ibiz-template/runtime": "^0.4.5",
"@ibiz-template/theme": "^0.4.0",
"@ibiz-template/vue3-util": "^0.4.4",
"@ibiz/model-core": "^0.0.21",
"@ibiz-template/vue3-util": "^0.4.5",
"@ibiz/model-core": "^0.0.26",
"async-validator": "^4.2.5",
"dayjs": "^1.11.10",
"echarts": "^5.4.3",
......
此差异已折叠。
......@@ -7,6 +7,7 @@ import {
ModalUtil,
NotificationUtil,
OpenViewUtil,
ConfirmUtil,
OverlayController,
} from '@ibiz-template/mob-vue3-components';
import { OverlayContainer, PluginFactory } from '@ibiz-template/vue3-util';
......@@ -59,6 +60,7 @@ async function createApp(): Promise<void> {
ibiz.openView = new OpenViewUtil(router);
ibiz.message = new MessageUtil();
ibiz.modal = new ModalUtil();
ibiz.confirm = new ConfirmUtil();
ibiz.notification = new NotificationUtil();
ibiz.loading = new LoadingUtil();
ibiz.overlay = new OverlayController();
......
......@@ -17,7 +17,10 @@ import { IErrorHandler } from '@ibiz-template/runtime';
*/
export class UnauthorizedHandler implements IErrorHandler {
match(error: unknown): boolean {
return error instanceof HttpError && error.status === 401;
return (
error instanceof HttpError &&
(error.status === 401 || error.status === 403)
);
}
/**
......@@ -73,10 +76,30 @@ export class UnauthorizedHandler implements IErrorHandler {
const targetUrl = `${UrlHelper.routeBase}/login?ru=${encodeURIComponent(
ru,
)}`;
// 跳转登录地址,不加延时vue-router感知不到路由变更。
setTimeout(() => {
window.location.href = targetUrl;
}, 0);
// 改无权限跳转登录页后,刷新页面。避免无权限模型加载异常
document.body.style.display = 'none';
window.location.href = targetUrl;
window.location.reload();
}
/**
* 处理403
* @author lxm
* @date 2023-12-06 10:19:12
* @protected
* @return {*} {Promise<void>}
*/
protected async handle403(): Promise<void> {
const result = await ibiz.modal.confirm({
title: '当前账户被禁止访问',
desc: '是否要退出当前账户?',
});
if (result) {
const bol = await ibiz.auth.logout();
if (bol) {
window.location.reload();
}
}
}
/**
......@@ -87,13 +110,19 @@ export class UnauthorizedHandler implements IErrorHandler {
* @returns {*} {Promise<void>}
*/
handle(error: unknown): boolean | undefined {
if (error instanceof HttpError && error.status === 401) {
if (ibiz.env.loginMode === LoginMode.CAS) {
this.casLogin();
} else {
this.normalLogin();
if (error instanceof HttpError) {
if (error.status === 401) {
if (ibiz.env.loginMode === LoginMode.CAS) {
this.casLogin();
} else {
this.normalLogin();
}
return true;
}
if (error.status === 403) {
this.handle403();
return true;
}
return true;
}
}
}
......@@ -35,11 +35,6 @@ function IBizVitePlugin(): Plugin[] {
const outFile = join(baseOutModule, pkg, 'index.system.min.js');
copyFileSync(cpFile, outFile);
});
templatePackages.forEach(pkg => {
const cpFile = join(baseModule, pkg, 'dist/index.system.min.js.map');
const outFile = join(baseOutModule, pkg, 'index.system.min.js.map');
copyFileSync(cpFile, outFile);
});
}
// eslint-disable-next-line no-lone-blocks
{
......
......@@ -11537,16 +11537,16 @@
"codeName" : "VMGroup3",
"name" : "视图消息类型测试",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "消息类型-错误信息",
"name" : "消息类型-警告信息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg6"
"id" : "ViewMsg5"
}
}, {
"name" : "消息类型-警告信息",
"name" : "消息类型-错误信息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg5"
"id" : "ViewMsg6"
}
}, {
"name" : "消息类型-常规信息",
......@@ -11569,22 +11569,16 @@
"codeName" : "VMGroup4",
"name" : "视图消息位置测试",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "消息位置-弹出",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg10"
}
}, {
"name" : "消息位置-视图上方",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg7"
}
}, {
"name" : "消息位置-视图内容区",
"name" : "消息位置-弹出",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg9"
"id" : "ViewMsg10"
}
}, {
"name" : "消息位置-视图下方",
......@@ -11592,21 +11586,27 @@
"modelref" : true,
"id" : "ViewMsg8"
}
}, {
"name" : "消息位置-视图内容区",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg9"
}
} ]
}, {
"codeName" : "VMGroup8",
"name" : "【静态测试】",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "关闭模式-本次删除-上方-警告",
"name" : "消息位置-视图下方",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg13"
"id" : "ViewMsg8"
}
}, {
"name" : "消息位置-视图下方",
"name" : "关闭模式-本次删除-上方-警告",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg8"
"id" : "ViewMsg13"
}
}, {
"name" : "消息类型-错误信息",
......@@ -11658,16 +11658,16 @@
"id" : "ViewMsg12"
}
}, {
"name" : "关闭模式-本次删除",
"name" : "关闭模式-删除",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg13"
"id" : "ViewMsg11"
}
}, {
"name" : "关闭模式-删除",
"name" : "关闭模式-本次删除",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg11"
"id" : "ViewMsg13"
}
} ]
}, {
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册