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

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

上级 3e64cb95
......@@ -16,7 +16,7 @@
rel="stylesheet"
/>
<link type="text/css" href="/extras/css/iview.css" rel="stylesheet" />
<script src="/extras/js/system/6.13.0/system.min.js"></script>
<script src="/extras/js/system/6.14.1/system.min.js"></script>
<script
type="systemjs-importmap"
src="/extras/json/system-import.json"
......
......@@ -13,13 +13,13 @@
"dependencies": {
"@floating-ui/dom": "^1.0.11",
"@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.50",
"@ibiz-template/core": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.51",
"@ibiz-template/core": "^0.0.1-beta.51",
"@ibiz-template/model": "^0.0.1-beta.50",
"@ibiz-template/runtime": "^0.0.1-beta.50",
"@ibiz-template/service": "^0.0.1-beta.50",
"@ibiz-template/runtime": "^0.0.1-beta.51",
"@ibiz-template/service": "^0.0.1-beta.51",
"@ibiz-template/theme": "^0.0.1-beta.50",
"@ibiz-template/vue-util": "^0.0.1-beta.50",
"@ibiz-template/vue-util": "^0.0.1-beta.51",
"@ibiz/dynamic-model-api": "^2.1.17",
"dayjs": "^1.11.7",
"lodash-es": "^4.17.21",
......
......@@ -8,26 +8,26 @@ dependencies:
specifier: ^0.0.1-beta.50
version: 0.0.1-beta.50
'@ibiz-template/controller':
specifier: ^0.0.1-beta.50
version: 0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/runtime@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.50)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
specifier: ^0.0.1-beta.51
version: 0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/runtime@0.0.1-beta.51)(@ibiz-template/service@0.0.1-beta.51)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'@ibiz-template/core':
specifier: ^0.0.1-beta.50
version: 0.0.1-beta.50(lodash-es@4.17.21)(qx-util@0.4.8)
specifier: ^0.0.1-beta.51
version: 0.0.1-beta.51(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/model':
specifier: ^0.0.1-beta.50
version: 0.0.1-beta.50(@ibiz/dynamic-model-api@2.1.17)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/runtime':
specifier: ^0.0.1-beta.50
version: 0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.50)(qx-util@0.4.8)
specifier: ^0.0.1-beta.51
version: 0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.51)(qx-util@0.4.8)
'@ibiz-template/service':
specifier: ^0.0.1-beta.50
version: 0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(qx-util@0.4.8)(ramda@0.28.0)
specifier: ^0.0.1-beta.51
version: 0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/theme':
specifier: ^0.0.1-beta.50
version: 0.0.1-beta.50
'@ibiz-template/vue-util':
specifier: ^0.0.1-beta.50
version: 0.0.1-beta.50(@ibiz-template/controller@0.0.1-beta.50)(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.50)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14)
specifier: ^0.0.1-beta.51
version: 0.0.1-beta.51(@ibiz-template/controller@0.0.1-beta.51)(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.51)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14)
'@ibiz/dynamic-model-api':
specifier: ^2.1.17
version: 2.1.17(qx-util@0.4.8)
......@@ -938,8 +938,8 @@ packages:
qx-util: 0.4.8
dev: false
/@ibiz-template/controller@0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/runtime@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.50)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8):
resolution: {integrity: sha512-NOLXOIgLmkL0HTdhw3IarN90GQJI5uaHdMmSQ60I5/PovWk//cuWM7yKHgEyHyWjURsVDF30hc9mKTIja1LIkQ==}
/@ibiz-template/controller@0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/runtime@0.0.1-beta.51)(@ibiz-template/service@0.0.1-beta.51)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8):
resolution: {integrity: sha512-kJCA2xgi3S6svxO6UWB1tm39oYG49ZUpmi6bacjLC3S2Mnzms64H04G20jA7uClgaSnOfmvuC6SZlqgTrlAErw==}
peerDependencies:
'@ibiz-template/core': ^0.0.1-beta.30
'@ibiz-template/model': ^0.0.1-beta.30
......@@ -949,10 +949,10 @@ packages:
qs: ^6.11.0
qx-util: ^0.4.8
dependencies:
'@ibiz-template/core': 0.0.1-beta.50(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.51(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/model': 0.0.1-beta.50(@ibiz/dynamic-model-api@2.1.17)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/runtime': 0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.50)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/runtime': 0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.51)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(qx-util@0.4.8)(ramda@0.28.0)
async-validator: 4.2.5
dayjs: 1.11.7
lodash-es: 4.17.21
......@@ -960,8 +960,8 @@ packages:
qx-util: 0.4.8
dev: false
/@ibiz-template/core@0.0.1-beta.50(lodash-es@4.17.21)(qx-util@0.4.8):
resolution: {integrity: sha512-sqa1Omd+uGsnVWVlay0mdo04bg5JxZBNEjs8J+pRzIW0rqIqkJ6IOKhNcL+LN4TToz/AN2azfhfLYmOUwZWpTg==}
/@ibiz-template/core@0.0.1-beta.51(lodash-es@4.17.21)(qx-util@0.4.8):
resolution: {integrity: sha512-Bqvmg3WyBFt3GlcaUoAsSzNoSJAgOpjgt1rRxtnV+jxkZTUMhLeC3zbyg1ZsBe+JQMVH9Rs54QPmnpf/nsubpw==}
peerDependencies:
lodash-es: ^4.17.21
qx-util: ^0.4.8
......@@ -989,8 +989,8 @@ packages:
qx-util: 0.4.8
dev: false
/@ibiz-template/runtime@0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.50)(qx-util@0.4.8):
resolution: {integrity: sha512-ocvOoWT0vBFODfG3AuHEDQZrDuwC8uG0gCpKwYbudVBPO+ywZmDQJYZydEbdR2hZSs5/nvzc6cSAfBAbYRfZHA==}
/@ibiz-template/runtime@0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.51)(qx-util@0.4.8):
resolution: {integrity: sha512-Zs31UILmTaP8dh1kGePp4uoXf5RiE5lPMs9cMw3cn84uOLZFc2Ftojhta3s2Xtl1tKD3E0QVAqMjr8HFvq+bng==}
peerDependencies:
'@ibiz-template/core': ^0.0.1-beta.30
'@ibiz-template/model': ^0.0.1-beta.30
......@@ -998,22 +998,22 @@ packages:
qx-util: ^0.4.8
dependencies:
'@ibiz-template/command': 0.0.1-beta.50
'@ibiz-template/core': 0.0.1-beta.50(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.51(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/model': 0.0.1-beta.50(@ibiz/dynamic-model-api@2.1.17)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/service': 0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(qx-util@0.4.8)(ramda@0.28.0)
qs: 6.11.1
qx-util: 0.4.8
dev: false
/@ibiz-template/service@0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(qx-util@0.4.8)(ramda@0.28.0):
resolution: {integrity: sha512-rMr78knMB19eZfpM/LpqM/FMOGqYrSwGkOeXxG9Y9Nteurc/b9iIxai+4w+7IgTqU4XcP0KKzOsEhx+VUW+vXA==}
/@ibiz-template/service@0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(qx-util@0.4.8)(ramda@0.28.0):
resolution: {integrity: sha512-sc4vy0zYlbcj2VjB3XShoJArXTLtaFn8NGyBweU8dCSpBw6PMV9Ltdm1SxxEyyrd7a989jCGq2aJfFvE+k8i9g==}
peerDependencies:
'@ibiz-template/core': ^0.0.1-beta.30
'@ibiz-template/model': ^0.0.1-beta.30
qx-util: ^0.4.8
ramda: ^0.28.0
dependencies:
'@ibiz-template/core': 0.0.1-beta.50(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.51(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/model': 0.0.1-beta.50(@ibiz/dynamic-model-api@2.1.17)(lodash-es@4.17.21)(qx-util@0.4.8)
qx-util: 0.4.8
ramda: 0.28.0
......@@ -1023,8 +1023,8 @@ packages:
resolution: {integrity: sha512-ZyUvekQpuTUVh8YuF4i+ylheA5NO0zO+sEVggSvulo9xmhjbqXGP3sUOV12728M3tn5dM3E6alPtGRvlTAiTzQ==}
dev: false
/@ibiz-template/vue-util@0.0.1-beta.50(@ibiz-template/controller@0.0.1-beta.50)(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.50)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14):
resolution: {integrity: sha512-zmnnsCbNMNZFQVZ9WN3G8Q3OydCaxgHlOg1uG9B9dOA/41FMcUep21tLhyEKqi7U2c3nC6bjVKZ81rBwkRGjQQ==}
/@ibiz-template/vue-util@0.0.1-beta.51(@ibiz-template/controller@0.0.1-beta.51)(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.51)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14):
resolution: {integrity: sha512-XmZ4q/hDp0X1yqOISWjFsxy182RhQ6Lg8zoDJHOXjp8HYlR1ob5nnpHNlzBDqhjhzTtknLZbLoCW85rq9T7LrQ==}
peerDependencies:
'@ibiz-template/controller': ^0.0.1-beta.30
'@ibiz-template/core': ^0.0.1-beta.30
......@@ -1036,10 +1036,10 @@ packages:
vue: ^2.7.14
vue-router: ^3.6.5
dependencies:
'@ibiz-template/controller': 0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/runtime@0.0.1-beta.50)(@ibiz-template/service@0.0.1-beta.50)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.50(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/controller': 0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(@ibiz-template/runtime@0.0.1-beta.51)(@ibiz-template/service@0.0.1-beta.51)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.51(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/model': 0.0.1-beta.50(@ibiz/dynamic-model-api@2.1.17)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.50(@ibiz-template/core@0.0.1-beta.50)(@ibiz-template/model@0.0.1-beta.50)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/service': 0.0.1-beta.51(@ibiz-template/core@0.0.1-beta.51)(@ibiz-template/model@0.0.1-beta.50)(qx-util@0.4.8)(ramda@0.28.0)
qs: 6.11.1
qx-util: 0.4.8
ramda: 0.28.0
......
此差异已折叠。
......@@ -3,38 +3,6 @@ import { ModelUtil } from '@ibiz-template/model';
import { getCookie, setCookie } from 'qx-util';
import { UnauthorizedHandler } from '../unauthorized-handler/unauthorized-handler';
/**
* 预加载应用级引用插件
*
* @author chitanda
* @date 2022-10-31 16:10:57
* @return {*} {Promise<void>}
*/
async function loadAppPlugins(): Promise<void> {
const modelService = await ModelUtil.getModelService();
const { app } = modelService;
const pluginRefs = app.getAllPSAppPFPluginRefs();
const all = pluginRefs?.map(async pluginRef => {
if (
pluginRef &&
pluginRef.runtimeObject &&
pluginRef.rTObjectName &&
pluginRef.rTObjectRepo
) {
const config = JSON.parse(pluginRef.rTObjectRepo);
if (config && config.app === true) {
await ibiz.plugin.loadPluginRef(
pluginRef.rTObjectName,
pluginRef.rTObjectRepo,
);
}
}
});
if (all) {
await Promise.all(all);
}
}
/**
* 初始化模型
*
......@@ -51,7 +19,6 @@ async function loadModel(): Promise<void> {
}
return {};
});
await loadAppPlugins();
}
/**
......
......@@ -8,7 +8,7 @@ import {
} from '@ibiz-template/runtime';
import { IPSAppPFPluginRef, IPSSysPFPlugin } from '@ibiz/dynamic-model-api';
import { join } from 'path-browserify';
import { VueConstructor, PluginObject } from 'vue';
import Vue, { VueConstructor, PluginObject } from 'vue';
/**
* 插件工具类
......@@ -57,16 +57,6 @@ export class PluginFactory implements IPluginFactory {
*/
protected pluginCache: Map<string, RemotePluginItem> = new Map();
/**
* 所有的插件
*
* @author chitanda
* @date 2023-02-02 16:02:55
* @protected
* @type {PluginObject<unknown>[]}
*/
protected pluginCodes: PluginObject<unknown>[] = [];
/**
* 预定义插件集合
*
......@@ -95,11 +85,7 @@ export class PluginFactory implements IPluginFactory {
* @date 2023-02-02 16:02:51
* @param {App} app
*/
register(app: VueConstructor): void {
this.pluginCodes.forEach(plugin => {
app.use(plugin);
});
}
register(_app: VueConstructor): void {}
/**
* 加载预置插件
......@@ -127,7 +113,7 @@ export class PluginFactory implements IPluginFactory {
* @param {PluginObject<unknown>} code
*/
protected setPluginCode(code: PluginObject<unknown>): void {
this.pluginCodes.push(code);
Vue.use(code);
}
/**
......@@ -295,12 +281,21 @@ export class PluginFactory implements IPluginFactory {
if (this.urlReg.test(script)) {
return script;
}
let url: string = '';
if (this.urlReg.test(ibiz.env.pluginBaseUrl)) {
if (script.startsWith('/')) {
return ibiz.env.pluginBaseUrl + script;
url = ibiz.env.pluginBaseUrl + script;
} else {
url = `${ibiz.env.pluginBaseUrl}/${script}`;
}
} else {
url = `${join(ibiz.env.pluginBaseUrl, script)}`;
}
return `${ibiz.env.pluginBaseUrl}/${script}`;
const { origin, pathname } = window.location;
if (pathname.endsWith('/') && url.startsWith('/')) {
url = url.substring(1);
}
return `${join(ibiz.env.pluginBaseUrl, script)}`;
url = `${origin}${pathname}${url}`;
return url;
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册