@ibiz-template/runtime 0.7.13-alpha.0 → 0.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +441 -122
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +8 -1
- package/out/controller/common/index.d.ts +0 -1
- package/out/controller/common/index.d.ts.map +1 -1
- package/out/controller/common/index.js +0 -1
- package/out/controller/common/view/app-data-upload-view.controller.js +1 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts +8 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.js +13 -0
- package/out/controller/control/panel/panel/panel-item.controller.d.ts +7 -0
- package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel-item.controller.js +14 -0
- package/out/controller/control/panel/panel/panel.controller.d.ts +27 -0
- package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel.controller.js +29 -0
- package/out/controller/control/search-bar/interface-util.d.ts.map +1 -1
- package/out/controller/control/search-bar/interface-util.js +5 -1
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts +28 -1
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +38 -0
- package/out/controller/hub.controller.d.ts +73 -2
- package/out/controller/hub.controller.d.ts.map +1 -1
- package/out/controller/hub.controller.js +88 -12
- package/out/controller/notification/internal-message.controller.js +1 -1
- package/out/controller/utils/data-file-util/data-file-util.d.ts +1 -1
- package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -1
- package/out/controller/utils/data-file-util/data-file-util.js +6 -2
- package/out/engine/view-base.engine.d.ts +8 -1
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +14 -3
- package/out/interface/controller/app.d.ts +55 -7
- package/out/interface/controller/app.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-panel.controller.d.ts +23 -0
- package/out/interface/controller/controller/control/i-panel.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-toolbar.controller.d.ts +11 -0
- package/out/interface/controller/controller/control/i-toolbar.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/panel-item/i-panel-item.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/panel-item/i-panel-item.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/view/index.d.ts +0 -1
- package/out/interface/controller/controller/view/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/index.d.ts +1 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/login-view.event.d.ts +25 -0
- package/out/interface/controller/event/argument/login-view.event.d.ts.map +1 -0
- package/out/interface/controller/event/view/i-app-login-view.event.d.ts +26 -0
- package/out/interface/controller/event/view/i-app-login-view.event.d.ts.map +1 -0
- package/out/interface/controller/event/view/i-app-login-view.event.js +1 -0
- package/out/interface/controller/event/view/index.d.ts +1 -0
- package/out/interface/controller/event/view/index.d.ts.map +1 -1
- package/out/interface/controller/event/view/index.js +1 -0
- package/out/interface/controller/state/view/i-app-login-view.state.d.ts +11 -0
- package/out/interface/controller/state/view/i-app-login-view.state.d.ts.map +1 -0
- package/out/interface/controller/state/view/i-app-login-view.state.js +1 -0
- package/out/interface/controller/state/view/index.d.ts +1 -0
- package/out/interface/controller/state/view/index.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.js +1 -0
- package/out/interface/provider/i-toolbar-item.provider.d.ts +19 -0
- package/out/interface/provider/i-toolbar-item.provider.d.ts.map +1 -0
- package/out/interface/provider/i-toolbar-item.provider.js +1 -0
- package/out/interface/provider/index.d.ts +1 -0
- package/out/interface/provider/index.d.ts.map +1 -1
- package/out/interface/service/service/i-auth.service.d.ts +11 -0
- package/out/interface/service/service/i-auth.service.d.ts.map +1 -1
- package/out/interface/util/i-app-util/i-app-util.d.ts +77 -0
- package/out/interface/util/i-app-util/i-app-util.d.ts.map +1 -0
- package/out/interface/util/i-app-util/i-app-util.js +1 -0
- package/out/interface/util/i-short-cut/i-short-cut.d.ts +41 -11
- package/out/interface/util/i-short-cut/i-short-cut.d.ts.map +1 -1
- package/out/interface/util/index.d.ts +2 -1
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/register/helper/index.d.ts +1 -0
- package/out/register/helper/index.d.ts.map +1 -1
- package/out/register/helper/index.js +1 -0
- package/out/register/helper/toolbar-item-register.d.ts +25 -0
- package/out/register/helper/toolbar-item-register.d.ts.map +1 -0
- package/out/register/helper/toolbar-item-register.js +55 -0
- package/out/service/service/auth/v7-auth.service.d.ts +64 -0
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +85 -7
- package/out/service/service/authority/authority.service.d.ts.map +1 -1
- package/out/service/service/authority/authority.service.js +5 -3
- package/out/service/service/internal-message/internal-message.service.js +2 -2
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +1 -1
- package/out/types.d.ts +9 -1
- package/out/types.d.ts.map +1 -1
- package/out/ui-action/provider/loginout-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/loginout-ui-action-provider.js +1 -4
- package/out/utils/file-util/file-util.d.ts +1 -1
- package/out/utils/file-util/file-util.d.ts.map +1 -1
- package/out/utils/file-util/file-util.js +14 -1
- package/out/utils/index.d.ts +1 -1
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -1
- package/out/utils/short-cut/short-cut-util.d.ts +42 -3
- package/out/utils/short-cut/short-cut-util.d.ts.map +1 -1
- package/out/utils/short-cut/short-cut-util.js +63 -13
- package/package.json +3 -3
- package/out/controller/common/view/app-login-view.controller.d.ts +0 -54
- package/out/controller/common/view/app-login-view.controller.d.ts.map +0 -1
- package/out/controller/common/view/app-login-view.controller.js +0 -62
- package/out/interface/controller/controller/view/i-app-login-view.controller.d.ts +0 -40
- package/out/interface/controller/controller/view/i-app-login-view.controller.d.ts.map +0 -1
- package/out/utils/short-cut/index.d.ts +0 -2
- package/out/utils/short-cut/index.d.ts.map +0 -1
- package/out/utils/short-cut/index.js +0 -1
- /package/out/interface/controller/{controller/view/i-app-login-view.controller.js → event/argument/login-view.event.js} +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -5135,6 +5135,7 @@ var FileUtil = class {
|
|
|
5135
5135
|
* @memberof FileUtil
|
|
5136
5136
|
*/
|
|
5137
5137
|
async fileDownload(url, name) {
|
|
5138
|
+
var _a;
|
|
5138
5139
|
const response = await ibiz.net.request(url, {
|
|
5139
5140
|
method: "get",
|
|
5140
5141
|
responseType: "blob",
|
|
@@ -5147,7 +5148,17 @@ var FileUtil = class {
|
|
|
5147
5148
|
if (!response.data) {
|
|
5148
5149
|
throw new RuntimeError5(ibiz.i18n.t("runtime.platform.fileStreamData"));
|
|
5149
5150
|
} else {
|
|
5150
|
-
|
|
5151
|
+
let fileName = "";
|
|
5152
|
+
const disposition = (_a = qs2.parse(response.headers["content-disposition"], {
|
|
5153
|
+
delimiter: ";"
|
|
5154
|
+
})) == null ? void 0 : _a.filename;
|
|
5155
|
+
if (disposition) {
|
|
5156
|
+
if (disposition.startsWith('"') && disposition.endsWith('"')) {
|
|
5157
|
+
fileName = disposition.substring(1, disposition.length - 1);
|
|
5158
|
+
}
|
|
5159
|
+
}
|
|
5160
|
+
if (name)
|
|
5161
|
+
fileName = name;
|
|
5151
5162
|
downloadFileFromBlob(response.data, fileName);
|
|
5152
5163
|
}
|
|
5153
5164
|
}
|
|
@@ -5181,6 +5192,7 @@ var FileUtil = class {
|
|
|
5181
5192
|
};
|
|
5182
5193
|
|
|
5183
5194
|
// src/utils/short-cut/short-cut-util.ts
|
|
5195
|
+
import { QXEvent as QXEvent2 } from "qx-util";
|
|
5184
5196
|
var ShortCutUtil = class {
|
|
5185
5197
|
/**
|
|
5186
5198
|
* Creates an instance of ShortCutUtil.
|
|
@@ -5194,7 +5206,17 @@ var ShortCutUtil = class {
|
|
|
5194
5206
|
* @type {IShortCut[]}
|
|
5195
5207
|
* @memberof ShortCutUtil
|
|
5196
5208
|
*/
|
|
5197
|
-
this.$ShortCut =
|
|
5209
|
+
this.$ShortCut = {
|
|
5210
|
+
items: [],
|
|
5211
|
+
mode: "vertical"
|
|
5212
|
+
};
|
|
5213
|
+
/**
|
|
5214
|
+
* 事件监听器
|
|
5215
|
+
*
|
|
5216
|
+
* @protected
|
|
5217
|
+
* @memberof ShortCutUtil
|
|
5218
|
+
*/
|
|
5219
|
+
this.evt = new QXEvent2();
|
|
5198
5220
|
this.initShortCut();
|
|
5199
5221
|
}
|
|
5200
5222
|
/**
|
|
@@ -5203,7 +5225,17 @@ var ShortCutUtil = class {
|
|
|
5203
5225
|
* @memberof ShortCutUtil
|
|
5204
5226
|
*/
|
|
5205
5227
|
get data() {
|
|
5206
|
-
return this.$ShortCut;
|
|
5228
|
+
return this.$ShortCut.items;
|
|
5229
|
+
}
|
|
5230
|
+
/**
|
|
5231
|
+
* 快捷方式模式
|
|
5232
|
+
*
|
|
5233
|
+
* @readonly
|
|
5234
|
+
* @type {string}
|
|
5235
|
+
* @memberof ShortCutUtil
|
|
5236
|
+
*/
|
|
5237
|
+
get mode() {
|
|
5238
|
+
return this.$ShortCut.mode;
|
|
5207
5239
|
}
|
|
5208
5240
|
/**
|
|
5209
5241
|
* 初始化快捷方式数据
|
|
@@ -5212,7 +5244,7 @@ var ShortCutUtil = class {
|
|
|
5212
5244
|
* @memberof ShortCutUtil
|
|
5213
5245
|
*/
|
|
5214
5246
|
initShortCut() {
|
|
5215
|
-
const shortcut = window.localStorage.getItem("
|
|
5247
|
+
const shortcut = window.localStorage.getItem("IBizShortCut");
|
|
5216
5248
|
if (shortcut) {
|
|
5217
5249
|
this.$ShortCut = JSON.parse(shortcut);
|
|
5218
5250
|
}
|
|
@@ -5223,7 +5255,36 @@ var ShortCutUtil = class {
|
|
|
5223
5255
|
* @memberof ShortCutUtil
|
|
5224
5256
|
*/
|
|
5225
5257
|
saveShortCut() {
|
|
5226
|
-
|
|
5258
|
+
this.evt.emit("change", [...this.$ShortCut.items]);
|
|
5259
|
+
window.localStorage.setItem("IBizShortCut", JSON.stringify(this.$ShortCut));
|
|
5260
|
+
}
|
|
5261
|
+
/**
|
|
5262
|
+
* 设置快捷方式模式
|
|
5263
|
+
*
|
|
5264
|
+
* @param {('horizontal' | 'vertical')} mode
|
|
5265
|
+
* @memberof ShortCutUtil
|
|
5266
|
+
*/
|
|
5267
|
+
setShortCutMode(mode) {
|
|
5268
|
+
this.$ShortCut.mode = mode;
|
|
5269
|
+
window.localStorage.setItem("IBizShortCut", JSON.stringify(this.$ShortCut));
|
|
5270
|
+
}
|
|
5271
|
+
/**
|
|
5272
|
+
* 订阅数据改变事件
|
|
5273
|
+
*
|
|
5274
|
+
* @param {(data: IShortCutData) => void} callback 回调
|
|
5275
|
+
* @memberof ShortCutUtil
|
|
5276
|
+
*/
|
|
5277
|
+
onChange(callback) {
|
|
5278
|
+
this.evt.on("change", callback);
|
|
5279
|
+
}
|
|
5280
|
+
/**
|
|
5281
|
+
* 取消订阅
|
|
5282
|
+
*
|
|
5283
|
+
* @param {(data: IShortCutData) => void} callback
|
|
5284
|
+
* @memberof ShortCutUtil
|
|
5285
|
+
*/
|
|
5286
|
+
offChange(callback) {
|
|
5287
|
+
this.evt.off("change", callback);
|
|
5227
5288
|
}
|
|
5228
5289
|
/**
|
|
5229
5290
|
* 计算快捷方式key
|
|
@@ -5257,11 +5318,13 @@ var ShortCutUtil = class {
|
|
|
5257
5318
|
* @memberof ShortCutUtil
|
|
5258
5319
|
*/
|
|
5259
5320
|
addShortCut(shortCut) {
|
|
5260
|
-
const index = this.$ShortCut.findIndex(
|
|
5321
|
+
const index = this.$ShortCut.items.findIndex(
|
|
5322
|
+
(item) => item.key === shortCut.key
|
|
5323
|
+
);
|
|
5261
5324
|
if (index > -1) {
|
|
5262
|
-
this.$ShortCut.splice(index, 1, shortCut);
|
|
5325
|
+
this.$ShortCut.items.splice(index, 1, shortCut);
|
|
5263
5326
|
} else {
|
|
5264
|
-
this.$ShortCut.push(shortCut);
|
|
5327
|
+
this.$ShortCut.items.push(shortCut);
|
|
5265
5328
|
}
|
|
5266
5329
|
this.saveShortCut();
|
|
5267
5330
|
}
|
|
@@ -5272,9 +5335,9 @@ var ShortCutUtil = class {
|
|
|
5272
5335
|
* @memberof ShortcutUtil
|
|
5273
5336
|
*/
|
|
5274
5337
|
removeShortCut(key) {
|
|
5275
|
-
const index = this.$ShortCut.findIndex((item) => item.key === key);
|
|
5338
|
+
const index = this.$ShortCut.items.findIndex((item) => item.key === key);
|
|
5276
5339
|
if (index > -1) {
|
|
5277
|
-
this.$ShortCut.splice(index, 1);
|
|
5340
|
+
this.$ShortCut.items.splice(index, 1);
|
|
5278
5341
|
this.saveShortCut();
|
|
5279
5342
|
}
|
|
5280
5343
|
}
|
|
@@ -5286,7 +5349,7 @@ var ShortCutUtil = class {
|
|
|
5286
5349
|
* @memberof ShortcutUtil
|
|
5287
5350
|
*/
|
|
5288
5351
|
changeIndex(newIndex, oldIndex) {
|
|
5289
|
-
const { length } = this.$ShortCut;
|
|
5352
|
+
const { length } = this.$ShortCut.items;
|
|
5290
5353
|
if (oldIndex < 0 || oldIndex >= length || newIndex < 0 || newIndex >= length) {
|
|
5291
5354
|
throw new Error(
|
|
5292
5355
|
ibiz.i18n.t("runtime.utils.shortCut.invalidIndexNewIndex", {
|
|
@@ -5296,8 +5359,8 @@ var ShortCutUtil = class {
|
|
|
5296
5359
|
})
|
|
5297
5360
|
);
|
|
5298
5361
|
}
|
|
5299
|
-
const removedItem = this.$ShortCut.splice(oldIndex, 1)[0];
|
|
5300
|
-
this.$ShortCut.splice(newIndex, 0, removedItem);
|
|
5362
|
+
const removedItem = this.$ShortCut.items.splice(oldIndex, 1)[0];
|
|
5363
|
+
this.$ShortCut.items.splice(newIndex, 0, removedItem);
|
|
5301
5364
|
this.saveShortCut();
|
|
5302
5365
|
}
|
|
5303
5366
|
/**
|
|
@@ -5308,7 +5371,7 @@ var ShortCutUtil = class {
|
|
|
5308
5371
|
* @memberof ShortCutUtil
|
|
5309
5372
|
*/
|
|
5310
5373
|
isExist(key) {
|
|
5311
|
-
const index = this.$ShortCut.findIndex((item) => item.key === key);
|
|
5374
|
+
const index = this.$ShortCut.items.findIndex((item) => item.key === key);
|
|
5312
5375
|
if (index >= 0) {
|
|
5313
5376
|
return true;
|
|
5314
5377
|
}
|
|
@@ -6662,9 +6725,40 @@ function getErrorViewProvider(code) {
|
|
|
6662
6725
|
return provider;
|
|
6663
6726
|
}
|
|
6664
6727
|
|
|
6728
|
+
// src/register/helper/toolbar-item-register.ts
|
|
6729
|
+
var TOOLBAR_ITEM_PROVIDER_PREFIX = "TOOLBAR_ITEM";
|
|
6730
|
+
function registerToolbarItemProvider(key, callback) {
|
|
6731
|
+
ibiz.register.register("".concat(TOOLBAR_ITEM_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
6732
|
+
}
|
|
6733
|
+
function getProvider17(key) {
|
|
6734
|
+
return ibiz.register.get(
|
|
6735
|
+
"".concat(TOOLBAR_ITEM_PROVIDER_PREFIX, "_").concat(key)
|
|
6736
|
+
);
|
|
6737
|
+
}
|
|
6738
|
+
async function getToolbarItemProvider(model) {
|
|
6739
|
+
let provider;
|
|
6740
|
+
const { sysPFPluginId, appId: appId2 } = model;
|
|
6741
|
+
if (sysPFPluginId) {
|
|
6742
|
+
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId2);
|
|
6743
|
+
if (pluginKey) {
|
|
6744
|
+
provider = getProvider17(pluginKey);
|
|
6745
|
+
}
|
|
6746
|
+
if (!provider) {
|
|
6747
|
+
ibiz.log.error(
|
|
6748
|
+
ibiz.i18n.t("runtime.register.helper.toolbarItem", {
|
|
6749
|
+
pluginKey
|
|
6750
|
+
})
|
|
6751
|
+
);
|
|
6752
|
+
} else {
|
|
6753
|
+
return provider;
|
|
6754
|
+
}
|
|
6755
|
+
}
|
|
6756
|
+
return provider;
|
|
6757
|
+
}
|
|
6758
|
+
|
|
6665
6759
|
// src/service/utils/app-counter/app-counter.ts
|
|
6666
6760
|
import { IBizContext, RuntimeError as RuntimeError14 } from "@ibiz-template/core";
|
|
6667
|
-
import { notNilEmpty as notNilEmpty5, QXEvent as
|
|
6761
|
+
import { notNilEmpty as notNilEmpty5, QXEvent as QXEvent3 } from "qx-util";
|
|
6668
6762
|
import { clone as clone3 } from "ramda";
|
|
6669
6763
|
var AppCounter = class {
|
|
6670
6764
|
/**
|
|
@@ -6679,7 +6773,7 @@ var AppCounter = class {
|
|
|
6679
6773
|
this.destroyed = false;
|
|
6680
6774
|
this.context = IBizContext.create();
|
|
6681
6775
|
this.params = {};
|
|
6682
|
-
this.evt = new
|
|
6776
|
+
this.evt = new QXEvent3();
|
|
6683
6777
|
/**
|
|
6684
6778
|
* 计数器数据
|
|
6685
6779
|
*
|
|
@@ -7014,7 +7108,7 @@ import {
|
|
|
7014
7108
|
RuntimeModelError as RuntimeModelError7
|
|
7015
7109
|
} from "@ibiz-template/core";
|
|
7016
7110
|
import { clone as clone4, isNil as isNil5 } from "ramda";
|
|
7017
|
-
import { QXEvent as
|
|
7111
|
+
import { QXEvent as QXEvent4, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
7018
7112
|
var DynamicCodeListCache = class {
|
|
7019
7113
|
constructor(codeList) {
|
|
7020
7114
|
/**
|
|
@@ -7059,7 +7153,7 @@ var DynamicCodeListCache = class {
|
|
|
7059
7153
|
* @date 2024-04-10 17:04:00
|
|
7060
7154
|
* @protected
|
|
7061
7155
|
*/
|
|
7062
|
-
this.evt = new
|
|
7156
|
+
this.evt = new QXEvent4();
|
|
7063
7157
|
/**
|
|
7064
7158
|
* 常见关键字
|
|
7065
7159
|
*
|
|
@@ -7172,7 +7266,8 @@ var DynamicCodeListCache = class {
|
|
|
7172
7266
|
if (dataAppDEFieldId && data[dataAppDEFieldId]) {
|
|
7173
7267
|
try {
|
|
7174
7268
|
result.data = ScriptFactory.execSingleLine(
|
|
7175
|
-
|
|
7269
|
+
dataAppDEFieldId,
|
|
7270
|
+
data
|
|
7176
7271
|
);
|
|
7177
7272
|
} catch (error) {
|
|
7178
7273
|
ibiz.log.error(ibiz.i18n.t("runtime.service.dynamicCodeTable"));
|
|
@@ -10361,8 +10456,8 @@ var AuthorityService = class {
|
|
|
10361
10456
|
if (this.enablePermission) {
|
|
10362
10457
|
const app = await ibiz.hub.getApp(this.appModel.appId);
|
|
10363
10458
|
const opPriv = await app.getOPPriv(dataAccessAction, appDeId);
|
|
10364
|
-
if (
|
|
10365
|
-
return
|
|
10459
|
+
if (this.enablePermission && (opPriv == null ? void 0 : opPriv.mapSysUniResCode) && !this.calcByResCode(opPriv.mapSysUniResCode)) {
|
|
10460
|
+
return false;
|
|
10366
10461
|
}
|
|
10367
10462
|
}
|
|
10368
10463
|
if (appDeId) {
|
|
@@ -10385,6 +10480,13 @@ var V7AuthService = class {
|
|
|
10385
10480
|
get isAnonymous() {
|
|
10386
10481
|
return getCookie(CoreConst.IS_ANONYMOUS) === "1";
|
|
10387
10482
|
}
|
|
10483
|
+
/**
|
|
10484
|
+
* 使用匿名账号登录
|
|
10485
|
+
*
|
|
10486
|
+
* @author tony001
|
|
10487
|
+
* @date 2024-05-14 17:05:47
|
|
10488
|
+
* @return {*} {Promise<boolean>}
|
|
10489
|
+
*/
|
|
10388
10490
|
async anonymousLogin() {
|
|
10389
10491
|
const { anonymousUser, anonymousPwd } = ibiz.env;
|
|
10390
10492
|
if (!anonymousUser || !anonymousPwd) {
|
|
@@ -10407,8 +10509,20 @@ var V7AuthService = class {
|
|
|
10407
10509
|
}
|
|
10408
10510
|
return result;
|
|
10409
10511
|
}
|
|
10512
|
+
/**
|
|
10513
|
+
* 登录
|
|
10514
|
+
*
|
|
10515
|
+
* @author tony001
|
|
10516
|
+
* @date 2024-05-14 17:05:54
|
|
10517
|
+
* @param {string} loginName
|
|
10518
|
+
* @param {string} password
|
|
10519
|
+
* @param {boolean} [remember]
|
|
10520
|
+
* @param {IData} [headers]
|
|
10521
|
+
* @return {*} {Promise<boolean>}
|
|
10522
|
+
*/
|
|
10410
10523
|
async login(loginName, password, remember, headers) {
|
|
10411
10524
|
try {
|
|
10525
|
+
this.clearAuthData();
|
|
10412
10526
|
const res = await ibiz.net.post(
|
|
10413
10527
|
"/v7/login",
|
|
10414
10528
|
{
|
|
@@ -10447,16 +10561,17 @@ var V7AuthService = class {
|
|
|
10447
10561
|
}
|
|
10448
10562
|
return false;
|
|
10449
10563
|
}
|
|
10564
|
+
/**
|
|
10565
|
+
* 登出
|
|
10566
|
+
*
|
|
10567
|
+
* @author tony001
|
|
10568
|
+
* @date 2024-05-14 17:05:04
|
|
10569
|
+
* @return {*} {Promise<boolean>}
|
|
10570
|
+
*/
|
|
10450
10571
|
async logout() {
|
|
10451
10572
|
try {
|
|
10452
10573
|
await ibiz.net.get("/v7/logout");
|
|
10453
|
-
|
|
10454
|
-
clearCookie(CoreConst.TOKEN_EXPIRES);
|
|
10455
|
-
clearCookie(CoreConst.TOKEN_REMEMBER);
|
|
10456
|
-
clearCookie(CoreConst.REFRESH_TOKEN);
|
|
10457
|
-
clearCookie(CoreConst.IS_ANONYMOUS);
|
|
10458
|
-
ibiz.appData = void 0;
|
|
10459
|
-
ibiz.orgData = void 0;
|
|
10574
|
+
this.clearAuthData();
|
|
10460
10575
|
return true;
|
|
10461
10576
|
} catch (err) {
|
|
10462
10577
|
ibiz.notification.error({
|
|
@@ -10466,6 +10581,33 @@ var V7AuthService = class {
|
|
|
10466
10581
|
}
|
|
10467
10582
|
return false;
|
|
10468
10583
|
}
|
|
10584
|
+
/**
|
|
10585
|
+
* 变更密码
|
|
10586
|
+
*
|
|
10587
|
+
* @author tony001
|
|
10588
|
+
* @date 2024-05-14 17:05:22
|
|
10589
|
+
* @param {string} oldPwd
|
|
10590
|
+
* @param {string} newPwd
|
|
10591
|
+
* @return {*} {Promise<boolean>}
|
|
10592
|
+
*/
|
|
10593
|
+
async changePwd(oldPwd, newPwd) {
|
|
10594
|
+
try {
|
|
10595
|
+
await ibiz.net.post("/uaa/changepwd", {
|
|
10596
|
+
oldPwd,
|
|
10597
|
+
newPwd
|
|
10598
|
+
});
|
|
10599
|
+
return true;
|
|
10600
|
+
} catch (err) {
|
|
10601
|
+
return false;
|
|
10602
|
+
}
|
|
10603
|
+
}
|
|
10604
|
+
/**
|
|
10605
|
+
* 页面未关闭情况下,自动延长登录时间
|
|
10606
|
+
*
|
|
10607
|
+
* @author tony001
|
|
10608
|
+
* @date 2024-05-14 17:05:38
|
|
10609
|
+
* @return {*} {Promise<void>}
|
|
10610
|
+
*/
|
|
10469
10611
|
async extendLogin() {
|
|
10470
10612
|
if (this.isAnonymous) {
|
|
10471
10613
|
return;
|
|
@@ -10510,6 +10652,13 @@ var V7AuthService = class {
|
|
|
10510
10652
|
}, wait);
|
|
10511
10653
|
}
|
|
10512
10654
|
}
|
|
10655
|
+
/**
|
|
10656
|
+
* 通过refreshToken换算token
|
|
10657
|
+
*
|
|
10658
|
+
* @author tony001
|
|
10659
|
+
* @date 2024-05-14 17:05:45
|
|
10660
|
+
* @return {*} {Promise<void>}
|
|
10661
|
+
*/
|
|
10513
10662
|
async refreshToken() {
|
|
10514
10663
|
const remember = getCookie(CoreConst.TOKEN_REMEMBER);
|
|
10515
10664
|
const refreshToken = getCookie(CoreConst.REFRESH_TOKEN);
|
|
@@ -10535,6 +10684,13 @@ var V7AuthService = class {
|
|
|
10535
10684
|
}
|
|
10536
10685
|
}
|
|
10537
10686
|
}
|
|
10687
|
+
/**
|
|
10688
|
+
* 获取当前环境的权限信息(无登录则返回undefined)
|
|
10689
|
+
*
|
|
10690
|
+
* @author tony001
|
|
10691
|
+
* @date 2024-05-14 17:05:57
|
|
10692
|
+
* @return {*} {(IAuthInfo | undefined)}
|
|
10693
|
+
*/
|
|
10538
10694
|
getAuthInfo() {
|
|
10539
10695
|
const token = getCookie(CoreConst.TOKEN);
|
|
10540
10696
|
const isAnonymous = !!getCookie(CoreConst.IS_ANONYMOUS);
|
|
@@ -10556,6 +10712,22 @@ var V7AuthService = class {
|
|
|
10556
10712
|
ibiz.appData = res.data;
|
|
10557
10713
|
}
|
|
10558
10714
|
}
|
|
10715
|
+
/**
|
|
10716
|
+
* 清空权限数据
|
|
10717
|
+
*
|
|
10718
|
+
* @author tony001
|
|
10719
|
+
* @date 2024-05-14 17:05:18
|
|
10720
|
+
* @protected
|
|
10721
|
+
*/
|
|
10722
|
+
clearAuthData() {
|
|
10723
|
+
clearCookie(CoreConst.TOKEN);
|
|
10724
|
+
clearCookie(CoreConst.TOKEN_EXPIRES);
|
|
10725
|
+
clearCookie(CoreConst.TOKEN_REMEMBER);
|
|
10726
|
+
clearCookie(CoreConst.REFRESH_TOKEN);
|
|
10727
|
+
clearCookie(CoreConst.IS_ANONYMOUS);
|
|
10728
|
+
ibiz.appData = void 0;
|
|
10729
|
+
ibiz.orgData = void 0;
|
|
10730
|
+
}
|
|
10559
10731
|
};
|
|
10560
10732
|
|
|
10561
10733
|
// src/service/service/async-action/async-action.service.ts
|
|
@@ -12875,7 +13047,7 @@ var InternalMessageService = class {
|
|
|
12875
13047
|
const fetchParams = {
|
|
12876
13048
|
page: 0,
|
|
12877
13049
|
size: 20,
|
|
12878
|
-
sort: "
|
|
13050
|
+
sort: "timestamp,desc"
|
|
12879
13051
|
};
|
|
12880
13052
|
Object.assign(fetchParams, params);
|
|
12881
13053
|
const res = await ibiz.net.post(
|
|
@@ -12939,7 +13111,7 @@ var InternalMessageService = class {
|
|
|
12939
13111
|
const res = await ibiz.net.post("".concat(this.baseUrl, "/fetch_cur_receiver"), {
|
|
12940
13112
|
page: 0,
|
|
12941
13113
|
size: 1,
|
|
12942
|
-
sort: "
|
|
13114
|
+
sort: "timestamp,desc",
|
|
12943
13115
|
searchconds: [
|
|
12944
13116
|
{
|
|
12945
13117
|
condtype: "GROUP",
|
|
@@ -13792,7 +13964,7 @@ var MapData = class {
|
|
|
13792
13964
|
};
|
|
13793
13965
|
|
|
13794
13966
|
// src/service/vo/panel-data/panel-data.ts
|
|
13795
|
-
import { QXEvent as
|
|
13967
|
+
import { QXEvent as QXEvent5 } from "qx-util";
|
|
13796
13968
|
function updateKeyDefine3(target, keys) {
|
|
13797
13969
|
keys.forEach((key) => {
|
|
13798
13970
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
@@ -13807,7 +13979,7 @@ function updateKeyDefine3(target, keys) {
|
|
|
13807
13979
|
}
|
|
13808
13980
|
var PanelData = class {
|
|
13809
13981
|
constructor(fields, origin) {
|
|
13810
|
-
const _evt = new
|
|
13982
|
+
const _evt = new QXEvent5();
|
|
13811
13983
|
const keyMap = {};
|
|
13812
13984
|
const reverseKeyMap = {};
|
|
13813
13985
|
fields.forEach((field) => {
|
|
@@ -14029,7 +14201,7 @@ var GanttCodeListNodeData = class extends TreeCodeListNodeData {
|
|
|
14029
14201
|
};
|
|
14030
14202
|
|
|
14031
14203
|
// src/service/mqtt/mqtt.service.ts
|
|
14032
|
-
import { QXEvent as
|
|
14204
|
+
import { QXEvent as QXEvent6, createUUID as createUUID7 } from "qx-util";
|
|
14033
14205
|
var MqttService = class {
|
|
14034
14206
|
/**
|
|
14035
14207
|
* Creates an instance of MqttService.
|
|
@@ -14050,7 +14222,7 @@ var MqttService = class {
|
|
|
14050
14222
|
* @author chitanda
|
|
14051
14223
|
* @date 2023-10-23 15:10:06
|
|
14052
14224
|
*/
|
|
14053
|
-
this.evt = new
|
|
14225
|
+
this.evt = new QXEvent6();
|
|
14054
14226
|
/**
|
|
14055
14227
|
* 连接选项
|
|
14056
14228
|
*
|
|
@@ -15148,7 +15320,7 @@ var LoadingState = class {
|
|
|
15148
15320
|
};
|
|
15149
15321
|
|
|
15150
15322
|
// src/controller/ctx/ctx.ts
|
|
15151
|
-
import { QXEvent as
|
|
15323
|
+
import { QXEvent as QXEvent7 } from "qx-util";
|
|
15152
15324
|
|
|
15153
15325
|
// src/controller/ctx/ctx.state.ts
|
|
15154
15326
|
var CTXState = class {
|
|
@@ -15178,7 +15350,7 @@ var CTX = class {
|
|
|
15178
15350
|
* @date 2023-04-26 07:54:46
|
|
15179
15351
|
* @protected
|
|
15180
15352
|
*/
|
|
15181
|
-
this.evt = new
|
|
15353
|
+
this.evt = new QXEvent7(3e3);
|
|
15182
15354
|
/**
|
|
15183
15355
|
* 当前视图控制器集合(包含自身视图控制器,部件控制器,和下一层级的视图的控制器)
|
|
15184
15356
|
* @author lxm
|
|
@@ -15521,8 +15693,8 @@ var ButtonContainerState = class {
|
|
|
15521
15693
|
};
|
|
15522
15694
|
|
|
15523
15695
|
// src/controller/utils/event/qx-event-ex.ts
|
|
15524
|
-
import { clearAll, QXEvent as
|
|
15525
|
-
var QXEventEx = class extends
|
|
15696
|
+
import { clearAll, QXEvent as QXEvent8 } from "qx-util";
|
|
15697
|
+
var QXEventEx = class extends QXEvent8 {
|
|
15526
15698
|
constructor() {
|
|
15527
15699
|
super(...arguments);
|
|
15528
15700
|
this.anyEventFns = [];
|
|
@@ -16103,12 +16275,16 @@ async function openDataImport(opts) {
|
|
|
16103
16275
|
modal.present();
|
|
16104
16276
|
await modal.onWillDismiss();
|
|
16105
16277
|
}
|
|
16106
|
-
async function downloadImportTemplate(appDataEntity, dataImport) {
|
|
16278
|
+
async function downloadImportTemplate(appDataEntity, dataImport, context) {
|
|
16107
16279
|
var _a;
|
|
16108
|
-
let templateUrl = "".concat(appDataEntity.codeName2.toLowerCase(), "/importtemplate");
|
|
16280
|
+
let templateUrl = "/".concat(appDataEntity.codeName2.toLowerCase(), "/importtemplate");
|
|
16109
16281
|
if (dataImport == null ? void 0 : dataImport.codeName) {
|
|
16110
16282
|
templateUrl += "?srfimporttag=".concat(dataImport.codeName);
|
|
16111
16283
|
}
|
|
16284
|
+
if (context) {
|
|
16285
|
+
const resPath = calcResPath(context, appDataEntity);
|
|
16286
|
+
templateUrl = resPath + templateUrl;
|
|
16287
|
+
}
|
|
16112
16288
|
const res = await ibiz.net.request(templateUrl, {
|
|
16113
16289
|
responseType: "blob"
|
|
16114
16290
|
});
|
|
@@ -17338,7 +17514,7 @@ var AppDataUploadViewController = class extends ViewController {
|
|
|
17338
17514
|
*/
|
|
17339
17515
|
downloadTemplate() {
|
|
17340
17516
|
const { appDataEntity, deDataImport } = this.state;
|
|
17341
|
-
downloadImportTemplate(appDataEntity, deDataImport);
|
|
17517
|
+
downloadImportTemplate(appDataEntity, deDataImport, this.context);
|
|
17342
17518
|
}
|
|
17343
17519
|
/**
|
|
17344
17520
|
* 选中导入文件并导入
|
|
@@ -17381,58 +17557,6 @@ var AppDataUploadViewController = class extends ViewController {
|
|
|
17381
17557
|
var MobViewController = class extends ViewController {
|
|
17382
17558
|
};
|
|
17383
17559
|
|
|
17384
|
-
// src/controller/common/view/app-login-view.controller.ts
|
|
17385
|
-
import { AsyncSeriesHook as AsyncSeriesHook2 } from "qx-util";
|
|
17386
|
-
var AppLoginViewController = class extends ViewController {
|
|
17387
|
-
constructor() {
|
|
17388
|
-
super(...arguments);
|
|
17389
|
-
/**
|
|
17390
|
-
* 钩子
|
|
17391
|
-
*
|
|
17392
|
-
* @memberof AppLoginViewController
|
|
17393
|
-
*/
|
|
17394
|
-
this.hooks = {
|
|
17395
|
-
beforeLogin: new AsyncSeriesHook2(),
|
|
17396
|
-
afterLogin: new AsyncSeriesHook2()
|
|
17397
|
-
};
|
|
17398
|
-
}
|
|
17399
|
-
/**
|
|
17400
|
-
* 校验登录视图
|
|
17401
|
-
*
|
|
17402
|
-
* @return {*} {Promise<boolean>}
|
|
17403
|
-
* @memberof AppLoginViewController
|
|
17404
|
-
*/
|
|
17405
|
-
async validate(parentId) {
|
|
17406
|
-
const context = {
|
|
17407
|
-
validate: true,
|
|
17408
|
-
parentId
|
|
17409
|
-
};
|
|
17410
|
-
await this.hooks.beforeLogin.call(context);
|
|
17411
|
-
return context.validate;
|
|
17412
|
-
}
|
|
17413
|
-
/**
|
|
17414
|
-
* 销毁Hooks钩子
|
|
17415
|
-
*
|
|
17416
|
-
* @protected
|
|
17417
|
-
* @memberof AppLoginViewController
|
|
17418
|
-
*/
|
|
17419
|
-
destroyHooks() {
|
|
17420
|
-
this.hooks.beforeLogin.clear();
|
|
17421
|
-
this.hooks.afterLogin.clear();
|
|
17422
|
-
}
|
|
17423
|
-
/**
|
|
17424
|
-
* 生命周期-销毁完成
|
|
17425
|
-
*
|
|
17426
|
-
* @protected
|
|
17427
|
-
* @return {*} {Promise<void>}
|
|
17428
|
-
* @memberof AppLoginViewController
|
|
17429
|
-
*/
|
|
17430
|
-
async onDestroyed() {
|
|
17431
|
-
await super.onDeactivated();
|
|
17432
|
-
this.destroyHooks();
|
|
17433
|
-
}
|
|
17434
|
-
};
|
|
17435
|
-
|
|
17436
17560
|
// src/controller/common/view/wf-step-trace-view.controller.ts
|
|
17437
17561
|
var WFStepTraceViewController = class extends ViewController {
|
|
17438
17562
|
initState() {
|
|
@@ -23377,10 +23501,7 @@ var LoginOutUIActionProvider = class extends UIActionProviderBase {
|
|
|
23377
23501
|
desc: ibiz.i18n.t("runtime.uiAction.wantLogout")
|
|
23378
23502
|
});
|
|
23379
23503
|
if (confirm) {
|
|
23380
|
-
|
|
23381
|
-
if (bol) {
|
|
23382
|
-
window.location.reload();
|
|
23383
|
-
}
|
|
23504
|
+
await ibiz.hub.controller.logout();
|
|
23384
23505
|
}
|
|
23385
23506
|
return {};
|
|
23386
23507
|
}
|
|
@@ -23405,6 +23526,25 @@ function presetUIActionProvider() {
|
|
|
23405
23526
|
|
|
23406
23527
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
23407
23528
|
var ToolbarController = class extends ControlController {
|
|
23529
|
+
constructor() {
|
|
23530
|
+
super(...arguments);
|
|
23531
|
+
/**
|
|
23532
|
+
* 所有工具栏项
|
|
23533
|
+
*
|
|
23534
|
+
* @author zhanghengfeng
|
|
23535
|
+
* @date 2024-05-15 18:05:07
|
|
23536
|
+
* @type {IDEToolbarItem[]}
|
|
23537
|
+
*/
|
|
23538
|
+
this.allToolbarItems = [];
|
|
23539
|
+
/**
|
|
23540
|
+
* 工具栏项适配器集合
|
|
23541
|
+
*
|
|
23542
|
+
* @author zhanghengfeng
|
|
23543
|
+
* @date 2024-05-15 18:05:25
|
|
23544
|
+
* @type {{ [key: string]: IToolbarItemProvider }}
|
|
23545
|
+
*/
|
|
23546
|
+
this.itemProviders = {};
|
|
23547
|
+
}
|
|
23408
23548
|
get _evt() {
|
|
23409
23549
|
return this.evt;
|
|
23410
23550
|
}
|
|
@@ -23462,12 +23602,31 @@ var ToolbarController = class extends ControlController {
|
|
|
23462
23602
|
}
|
|
23463
23603
|
}
|
|
23464
23604
|
}
|
|
23605
|
+
/**
|
|
23606
|
+
* 初始化工具栏项适配器
|
|
23607
|
+
*
|
|
23608
|
+
* @author zhanghengfeng
|
|
23609
|
+
* @date 2024-05-15 18:05:08
|
|
23610
|
+
* @protected
|
|
23611
|
+
* @return {*} {Promise<void>}
|
|
23612
|
+
*/
|
|
23613
|
+
async initToolbarItemProviders() {
|
|
23614
|
+
await Promise.all(
|
|
23615
|
+
this.allToolbarItems.map(async (item) => {
|
|
23616
|
+
const provider = await getToolbarItemProvider(item);
|
|
23617
|
+
if (provider) {
|
|
23618
|
+
this.itemProviders[item.id] = provider;
|
|
23619
|
+
}
|
|
23620
|
+
})
|
|
23621
|
+
);
|
|
23622
|
+
}
|
|
23465
23623
|
async onCreated() {
|
|
23466
23624
|
await super.onCreated();
|
|
23467
23625
|
this.state.viewMode = this.ctx.view.modal.mode;
|
|
23468
23626
|
recursiveIterate2(
|
|
23469
23627
|
this.model,
|
|
23470
23628
|
(item) => {
|
|
23629
|
+
this.allToolbarItems.push(item);
|
|
23471
23630
|
if (item.itemType) {
|
|
23472
23631
|
const uiItem = item;
|
|
23473
23632
|
const buttonState = new UIActionButtonState(
|
|
@@ -23490,6 +23649,7 @@ var ToolbarController = class extends ControlController {
|
|
|
23490
23649
|
},
|
|
23491
23650
|
{ childrenFields: ["detoolbarItems"] }
|
|
23492
23651
|
);
|
|
23652
|
+
await this.initToolbarItemProviders();
|
|
23493
23653
|
if (!this.state.manualCalcButtonState) {
|
|
23494
23654
|
await this.calcButtonState(void 0, this.model.appDataEntityId);
|
|
23495
23655
|
} else {
|
|
@@ -23805,6 +23965,13 @@ var CustomDashboardController = class {
|
|
|
23805
23965
|
* @type {string}
|
|
23806
23966
|
*/
|
|
23807
23967
|
this.ownerId = "";
|
|
23968
|
+
/**
|
|
23969
|
+
* 是否多模式
|
|
23970
|
+
*
|
|
23971
|
+
* @type {boolean}
|
|
23972
|
+
* @memberof CustomDashboardController
|
|
23973
|
+
*/
|
|
23974
|
+
this.multiMode = false;
|
|
23808
23975
|
this.context = dashboard.context;
|
|
23809
23976
|
this.params = dashboard.params;
|
|
23810
23977
|
this.init(dashboard.controlParams);
|
|
@@ -23829,6 +23996,10 @@ var CustomDashboardController = class {
|
|
|
23829
23996
|
if (controlParams.owner_id) {
|
|
23830
23997
|
this.ownerId = this.context[controlParams.owner_id];
|
|
23831
23998
|
}
|
|
23999
|
+
if (controlParams.multimode === "true") {
|
|
24000
|
+
this.multiMode = true;
|
|
24001
|
+
this.type = "dynamic";
|
|
24002
|
+
}
|
|
23832
24003
|
if (this.model.appDynaDashboardUtilId) {
|
|
23833
24004
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
23834
24005
|
this.util = new UtilService(
|
|
@@ -23858,6 +24029,8 @@ var CustomDashboardController = class {
|
|
|
23858
24029
|
return "".concat(base, "_").concat(this.context.srfpersonid);
|
|
23859
24030
|
case "data":
|
|
23860
24031
|
return "".concat(base, "_").concat(this.ownerType, "_").concat(this.ownerId);
|
|
24032
|
+
case "dynamic":
|
|
24033
|
+
return "".concat(base, "_").concat(this.context.srfdynadashboardid);
|
|
23861
24034
|
default:
|
|
23862
24035
|
return base;
|
|
23863
24036
|
}
|
|
@@ -31578,9 +31751,18 @@ var ListController = class extends MDControlController {
|
|
|
31578
31751
|
|
|
31579
31752
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
31580
31753
|
import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError58 } from "@ibiz-template/core";
|
|
31754
|
+
import { AsyncSeriesHook as AsyncSeriesHook2 } from "qx-util";
|
|
31581
31755
|
var PanelController = class extends ControlController {
|
|
31582
31756
|
constructor(model, context, params, ctx, container) {
|
|
31583
31757
|
super(model, context, params, ctx);
|
|
31758
|
+
/**
|
|
31759
|
+
* 面板钩子
|
|
31760
|
+
*
|
|
31761
|
+
* @memberof PanelController
|
|
31762
|
+
*/
|
|
31763
|
+
this.hooks = {
|
|
31764
|
+
validate: new AsyncSeriesHook2()
|
|
31765
|
+
};
|
|
31584
31766
|
/**
|
|
31585
31767
|
* 所有面板成员的控制器
|
|
31586
31768
|
*
|
|
@@ -31640,14 +31822,34 @@ var PanelController = class extends ControlController {
|
|
|
31640
31822
|
async onMounted() {
|
|
31641
31823
|
this.load();
|
|
31642
31824
|
}
|
|
31825
|
+
/**
|
|
31826
|
+
* 生命周期-销毁完成
|
|
31827
|
+
*
|
|
31828
|
+
* @protected
|
|
31829
|
+
* @return {*} {Promise<void>}
|
|
31830
|
+
* @memberof PanelController
|
|
31831
|
+
*/
|
|
31643
31832
|
async onDestroyed() {
|
|
31644
31833
|
var _a, _b;
|
|
31645
31834
|
await super.onDestroyed();
|
|
31646
31835
|
(_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
|
|
31836
|
+
this.hooks.validate.clear();
|
|
31647
31837
|
Object.values(this.panelItems).forEach((item) => {
|
|
31648
31838
|
item.destroy();
|
|
31649
31839
|
});
|
|
31650
31840
|
}
|
|
31841
|
+
/**
|
|
31842
|
+
* 值校验
|
|
31843
|
+
*
|
|
31844
|
+
* @param {string} [parentId] 数据父容器标识
|
|
31845
|
+
* @return {*} {Promise<boolean>}
|
|
31846
|
+
* @memberof PanelController
|
|
31847
|
+
*/
|
|
31848
|
+
async validate(parentId) {
|
|
31849
|
+
const result = [];
|
|
31850
|
+
await this.hooks.validate.call({ result, parentId });
|
|
31851
|
+
return result.every((value) => value);
|
|
31852
|
+
}
|
|
31651
31853
|
/**
|
|
31652
31854
|
* 初始化面板成员控制器
|
|
31653
31855
|
*
|
|
@@ -32029,6 +32231,11 @@ var PanelItemController = class {
|
|
|
32029
32231
|
if (hasVisibleLogic) {
|
|
32030
32232
|
this.state.visible = false;
|
|
32031
32233
|
}
|
|
32234
|
+
this.panel.hooks.validate.tapPromise(async (context) => {
|
|
32235
|
+
if (!context.parentId || context.parentId === this.dataParent.model.id) {
|
|
32236
|
+
context.result.push(await this.validate());
|
|
32237
|
+
}
|
|
32238
|
+
});
|
|
32032
32239
|
await this.onInit();
|
|
32033
32240
|
}
|
|
32034
32241
|
async onInit() {
|
|
@@ -32047,6 +32254,15 @@ var PanelItemController = class {
|
|
|
32047
32254
|
}
|
|
32048
32255
|
destroy() {
|
|
32049
32256
|
}
|
|
32257
|
+
/**
|
|
32258
|
+
* 值校验
|
|
32259
|
+
* 由子类具体实现
|
|
32260
|
+
* @return {*} {Promise<boolean>}
|
|
32261
|
+
* @memberof PanelItemController
|
|
32262
|
+
*/
|
|
32263
|
+
async validate() {
|
|
32264
|
+
return true;
|
|
32265
|
+
}
|
|
32050
32266
|
/**
|
|
32051
32267
|
* 创建面板状态对象
|
|
32052
32268
|
*
|
|
@@ -32987,7 +33203,7 @@ function validateFilterNodes(filterNodes) {
|
|
|
32987
33203
|
}
|
|
32988
33204
|
if (node.nodeType === "FIELD") {
|
|
32989
33205
|
hasFilter = true;
|
|
32990
|
-
hasError = !node.field || !node.valueOP || isNil30(node.value);
|
|
33206
|
+
hasError = !node.field || !node.valueOP || !ExcludeOPs.includes(node.valueOP) && isNil30(node.value);
|
|
32991
33207
|
} else if (node.nodeType === "ITEMS") {
|
|
32992
33208
|
hasError = !node.field || !node.valueOP;
|
|
32993
33209
|
} else {
|
|
@@ -39217,35 +39433,118 @@ var GanttController = class extends TreeGridExController {
|
|
|
39217
39433
|
// src/controller/hub.controller.ts
|
|
39218
39434
|
var HubController = class {
|
|
39219
39435
|
constructor() {
|
|
39436
|
+
/**
|
|
39437
|
+
* 全局共享数据对象
|
|
39438
|
+
*
|
|
39439
|
+
* @author tony001
|
|
39440
|
+
* @date 2024-05-14 14:05:22
|
|
39441
|
+
* @type {IData}
|
|
39442
|
+
*/
|
|
39220
39443
|
this.session = {};
|
|
39221
39444
|
}
|
|
39222
|
-
|
|
39223
|
-
|
|
39445
|
+
/**
|
|
39446
|
+
* 登录(包含调用登录逻辑,及跳转应用界面)
|
|
39447
|
+
*
|
|
39448
|
+
* @author tony001
|
|
39449
|
+
* @date 2024-05-14 16:05:04
|
|
39450
|
+
* @param {string} loginName
|
|
39451
|
+
* @param {string} password
|
|
39452
|
+
* @param {(boolean | undefined)} [remember]
|
|
39453
|
+
* @param {(IData | undefined)} [headers]
|
|
39454
|
+
* @param {(IData | undefined)} [opts]
|
|
39455
|
+
* @return {*} {Promise<boolean>}
|
|
39456
|
+
*/
|
|
39457
|
+
async login(loginName, password, remember, headers, opts) {
|
|
39458
|
+
const bol = await ibiz.appUtil.login(
|
|
39459
|
+
loginName,
|
|
39460
|
+
password,
|
|
39461
|
+
remember,
|
|
39462
|
+
headers,
|
|
39463
|
+
opts
|
|
39464
|
+
);
|
|
39465
|
+
return bol;
|
|
39224
39466
|
}
|
|
39225
|
-
|
|
39226
|
-
|
|
39227
|
-
|
|
39228
|
-
|
|
39229
|
-
|
|
39230
|
-
|
|
39231
|
-
|
|
39232
|
-
|
|
39233
|
-
|
|
39467
|
+
/**
|
|
39468
|
+
* 登出(包含调用登录逻辑,及跳转登录页)
|
|
39469
|
+
*
|
|
39470
|
+
* @author tony001
|
|
39471
|
+
* @date 2024-05-14 16:05:01
|
|
39472
|
+
* @param {(IData | undefined)} [opts]
|
|
39473
|
+
* @return {*} {Promise<boolean>}
|
|
39474
|
+
*/
|
|
39475
|
+
async logout(opts) {
|
|
39476
|
+
const bol = await ibiz.appUtil.logout(opts);
|
|
39477
|
+
return bol;
|
|
39478
|
+
}
|
|
39479
|
+
/**
|
|
39480
|
+
* 变更密码
|
|
39481
|
+
*
|
|
39482
|
+
* @author tony001
|
|
39483
|
+
* @date 2024-05-14 16:05:54
|
|
39484
|
+
* @param {string} oldPwd
|
|
39485
|
+
* @param {string} newPwd
|
|
39486
|
+
* @param {(IData | undefined)} [opts]
|
|
39487
|
+
* @return {*} {Promise<boolean>}
|
|
39488
|
+
*/
|
|
39489
|
+
async changePwd(oldPwd, newPwd, opts) {
|
|
39490
|
+
const bol = await ibiz.appUtil.changePwd(oldPwd, newPwd, opts);
|
|
39491
|
+
return bol;
|
|
39492
|
+
}
|
|
39493
|
+
/**
|
|
39494
|
+
* 切换组织(包括界面刷新)
|
|
39495
|
+
*
|
|
39496
|
+
* @author tony001
|
|
39497
|
+
* @date 2024-05-14 16:05:09
|
|
39498
|
+
* @param {string} oldOrgId
|
|
39499
|
+
* @param {string} newOrgId
|
|
39500
|
+
* @param {(IData | undefined)} [opts]
|
|
39501
|
+
* @return {*} {Promise<boolean>}
|
|
39502
|
+
*/
|
|
39503
|
+
async switchOrg(oldOrgId, newOrgId, opts) {
|
|
39504
|
+
const bol = await ibiz.appUtil.switchOrg(oldOrgId, newOrgId, opts);
|
|
39505
|
+
return bol;
|
|
39506
|
+
}
|
|
39507
|
+
/**
|
|
39508
|
+
* 切换主题
|
|
39509
|
+
*
|
|
39510
|
+
* @author tony001
|
|
39511
|
+
* @date 2024-05-14 16:05:12
|
|
39512
|
+
* @param {string} oldTheme
|
|
39513
|
+
* @param {string} newTheme
|
|
39514
|
+
* @param {(IData | undefined)} [opts]
|
|
39515
|
+
* @return {*} {Promise<boolean>}
|
|
39516
|
+
*/
|
|
39517
|
+
async switchTheme(oldTheme, newTheme, opts) {
|
|
39518
|
+
const bol = await ibiz.appUtil.switchTheme(oldTheme, newTheme, opts);
|
|
39519
|
+
return bol;
|
|
39520
|
+
}
|
|
39521
|
+
/**
|
|
39522
|
+
* 切换语言
|
|
39523
|
+
*
|
|
39524
|
+
* @author tony001
|
|
39525
|
+
* @date 2024-05-14 16:05:01
|
|
39526
|
+
* @param {string} oldLanguage
|
|
39527
|
+
* @param {string} newLanguage
|
|
39528
|
+
* @param {(IData | undefined)} [opts]
|
|
39529
|
+
* @return {*} {Promise<boolean>}
|
|
39530
|
+
*/
|
|
39531
|
+
async switchLanguage(oldLanguage, newLanguage, opts) {
|
|
39532
|
+
const bol = await ibiz.appUtil.switchTheme(oldLanguage, newLanguage, opts);
|
|
39234
39533
|
return bol;
|
|
39235
39534
|
}
|
|
39236
39535
|
};
|
|
39237
39536
|
|
|
39238
39537
|
// src/controller/notification/notice.controller.ts
|
|
39239
|
-
import { QXEvent as
|
|
39538
|
+
import { QXEvent as QXEvent11 } from "qx-util";
|
|
39240
39539
|
|
|
39241
39540
|
// src/controller/notification/async-action.controller.ts
|
|
39242
|
-
import { QXEvent as
|
|
39541
|
+
import { QXEvent as QXEvent9 } from "qx-util";
|
|
39243
39542
|
import { clone as clone33 } from "ramda";
|
|
39244
39543
|
import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
|
|
39245
39544
|
import dayjs8 from "dayjs";
|
|
39246
39545
|
var AsyncActionController = class {
|
|
39247
39546
|
constructor() {
|
|
39248
|
-
this.evt = new
|
|
39547
|
+
this.evt = new QXEvent9();
|
|
39249
39548
|
this.total = 0;
|
|
39250
39549
|
this.actions = [];
|
|
39251
39550
|
/**
|
|
@@ -39382,7 +39681,7 @@ var AsyncActionController = class {
|
|
|
39382
39681
|
};
|
|
39383
39682
|
|
|
39384
39683
|
// src/controller/notification/internal-message.controller.ts
|
|
39385
|
-
import { QXEvent as
|
|
39684
|
+
import { QXEvent as QXEvent10 } from "qx-util";
|
|
39386
39685
|
function isHTML(str) {
|
|
39387
39686
|
if (str === "")
|
|
39388
39687
|
return false;
|
|
@@ -39391,7 +39690,7 @@ function isHTML(str) {
|
|
|
39391
39690
|
}
|
|
39392
39691
|
var InternalMessageController = class {
|
|
39393
39692
|
constructor() {
|
|
39394
|
-
this.evt = new
|
|
39693
|
+
this.evt = new QXEvent10();
|
|
39395
39694
|
this.total = 0;
|
|
39396
39695
|
this.unreadCount = 0;
|
|
39397
39696
|
/**
|
|
@@ -39454,7 +39753,7 @@ var InternalMessageController = class {
|
|
|
39454
39753
|
const fetchParams = {
|
|
39455
39754
|
page: this.page,
|
|
39456
39755
|
size: this.size,
|
|
39457
|
-
sort: "
|
|
39756
|
+
sort: "timestamp,desc"
|
|
39458
39757
|
};
|
|
39459
39758
|
if (this.unreadOnly) {
|
|
39460
39759
|
fetchParams.searchconds = [
|
|
@@ -39551,7 +39850,7 @@ var InternalMessageController = class {
|
|
|
39551
39850
|
// src/controller/notification/notice.controller.ts
|
|
39552
39851
|
var NoticeController = class {
|
|
39553
39852
|
constructor() {
|
|
39554
|
-
this.evt = new
|
|
39853
|
+
this.evt = new QXEvent11();
|
|
39555
39854
|
this.total = 0;
|
|
39556
39855
|
this.asyncAction = new AsyncActionController();
|
|
39557
39856
|
this.internalMessage = new InternalMessageController();
|
|
@@ -39851,7 +40150,14 @@ var AppHub = class {
|
|
|
39851
40150
|
async getAppDataEntity(id, appId2 = ibiz.env.appId) {
|
|
39852
40151
|
if (this.dataEntities.has(appId2)) {
|
|
39853
40152
|
const map = this.dataEntities.get(appId2);
|
|
39854
|
-
if (
|
|
40153
|
+
if (id.indexOf(".") === -1) {
|
|
40154
|
+
const targetEntity = Array.from(map.values()).find(
|
|
40155
|
+
(value) => value.codeName === id
|
|
40156
|
+
);
|
|
40157
|
+
if (targetEntity) {
|
|
40158
|
+
return targetEntity;
|
|
40159
|
+
}
|
|
40160
|
+
} else if (map.has(id)) {
|
|
39855
40161
|
return map.get(id);
|
|
39856
40162
|
}
|
|
39857
40163
|
}
|
|
@@ -40224,11 +40530,18 @@ var ViewEngineBase = class {
|
|
|
40224
40530
|
}
|
|
40225
40531
|
return void 0;
|
|
40226
40532
|
}
|
|
40533
|
+
/**
|
|
40534
|
+
* 快捷方式
|
|
40535
|
+
*
|
|
40536
|
+
* @param {*} args
|
|
40537
|
+
* @return {*} {(Promise<any>)}
|
|
40538
|
+
* @memberof ViewEngineBase
|
|
40539
|
+
*/
|
|
40227
40540
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
40228
40541
|
async onShortCut(args) {
|
|
40229
40542
|
const { data } = args;
|
|
40230
40543
|
const { context, model, params, modal } = this.view;
|
|
40231
|
-
if (
|
|
40544
|
+
if (["EMBED", "POPOVER"].includes(modal.mode)) {
|
|
40232
40545
|
throw new Error(
|
|
40233
40546
|
ibiz.i18n.t("runtime.engine.minimization", { mode: modal.mode })
|
|
40234
40547
|
);
|
|
@@ -40239,16 +40552,20 @@ var ViewEngineBase = class {
|
|
|
40239
40552
|
});
|
|
40240
40553
|
const isExist = ibiz.util.shortCut.isExist(key);
|
|
40241
40554
|
if (!isExist) {
|
|
40555
|
+
const caption = data && data[0].srfmajortext || model.caption;
|
|
40242
40556
|
ibiz.util.shortCut.addShortCut({
|
|
40243
40557
|
key,
|
|
40244
|
-
|
|
40558
|
+
caption,
|
|
40559
|
+
icon: model.sysImage,
|
|
40245
40560
|
appViewId: model.id,
|
|
40246
40561
|
context: IBizContext7.create(context),
|
|
40247
40562
|
params: { ...params },
|
|
40248
|
-
openMode: modal.mode
|
|
40563
|
+
openMode: modal.mode,
|
|
40564
|
+
fullPath: window.location.hash
|
|
40249
40565
|
});
|
|
40250
40566
|
this.view.state.isShortCut = true;
|
|
40251
|
-
|
|
40567
|
+
this.view.closeView();
|
|
40568
|
+
return null;
|
|
40252
40569
|
}
|
|
40253
40570
|
ibiz.util.shortCut.removeShortCut(key);
|
|
40254
40571
|
this.view.state.isShortCut = false;
|
|
@@ -42210,7 +42527,6 @@ export {
|
|
|
42210
42527
|
AppDataEntity,
|
|
42211
42528
|
AppDataUploadViewController,
|
|
42212
42529
|
AppFuncCommand,
|
|
42213
|
-
AppLoginViewController,
|
|
42214
42530
|
AppMenuController,
|
|
42215
42531
|
AppMenuIconViewController,
|
|
42216
42532
|
Application,
|
|
@@ -42387,6 +42703,7 @@ export {
|
|
|
42387
42703
|
StudioViewEvents,
|
|
42388
42704
|
SysUIActionProvider,
|
|
42389
42705
|
SysUIActionTag,
|
|
42706
|
+
TOOLBAR_ITEM_PROVIDER_PREFIX,
|
|
42390
42707
|
TREEGRIDEX_COLUMN_PROVIDER_PREFIX,
|
|
42391
42708
|
TabExpPanelController,
|
|
42392
42709
|
TextUtil,
|
|
@@ -42515,6 +42832,7 @@ export {
|
|
|
42515
42832
|
getPlatformType,
|
|
42516
42833
|
getPortletProvider,
|
|
42517
42834
|
getRootNode,
|
|
42835
|
+
getToolbarItemProvider,
|
|
42518
42836
|
getTreeGridExColumnProvider,
|
|
42519
42837
|
getTreeNode,
|
|
42520
42838
|
getUIActionById,
|
|
@@ -42560,6 +42878,7 @@ export {
|
|
|
42560
42878
|
registerPanelItemProvider,
|
|
42561
42879
|
registerPlatformProvider,
|
|
42562
42880
|
registerPortletProvider,
|
|
42881
|
+
registerToolbarItemProvider,
|
|
42563
42882
|
registerTreeGridExColumnProvider,
|
|
42564
42883
|
registerUIActionProvider,
|
|
42565
42884
|
registerUILogicNodeProvider,
|