@ibiz-template/runtime 0.5.7-alpha.3 → 0.5.7-alpha.4
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 +551 -207
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts +2 -0
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +2 -0
- package/out/application.js +1 -1
- package/out/controller/control/exp-bar/exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/exp-bar.controller.js +7 -0
- package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts +5 -0
- package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/tree-exp-bar.controller.js +16 -0
- package/out/controller/notification/async-action.controller.d.ts +64 -0
- package/out/controller/notification/async-action.controller.d.ts.map +1 -0
- package/out/controller/notification/async-action.controller.js +141 -0
- package/out/controller/notification/index.d.ts +2 -0
- package/out/controller/notification/index.d.ts.map +1 -0
- package/out/controller/notification/index.js +1 -0
- package/out/controller/notification/internal-message.controller.d.ts +23 -0
- package/out/controller/notification/internal-message.controller.d.ts.map +1 -0
- package/out/controller/notification/internal-message.controller.js +50 -0
- package/out/controller/notification/notice.controller.d.ts +10 -0
- package/out/controller/notification/notice.controller.d.ts.map +1 -0
- package/out/controller/notification/notice.controller.js +13 -0
- package/out/global/global-util/global-util.d.ts +9 -1
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +9 -1
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +8 -1
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/common/i-popover-options/i-popover-options.d.ts +9 -1
- package/out/interface/common/i-popover-options/i-popover-options.d.ts.map +1 -1
- package/out/interface/controller/controller/index.d.ts +1 -0
- package/out/interface/controller/controller/index.d.ts.map +1 -1
- package/out/interface/controller/controller/index.js +1 -0
- package/out/interface/controller/controller/notice/i-async-action.controller.d.ts +49 -0
- package/out/interface/controller/controller/notice/i-async-action.controller.d.ts.map +1 -0
- package/out/interface/controller/controller/notice/i-async-action.controller.js +1 -0
- package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts +68 -0
- package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts.map +1 -0
- package/out/interface/controller/controller/notice/i-internal-message.controller.js +1 -0
- package/out/interface/controller/controller/notice/i-notice.controller.d.ts +33 -0
- package/out/interface/controller/controller/notice/i-notice.controller.d.ts.map +1 -0
- package/out/interface/controller/controller/notice/i-notice.controller.js +1 -0
- package/out/interface/controller/controller/notice/index.d.ts +4 -0
- package/out/interface/controller/controller/notice/index.d.ts.map +1 -0
- package/out/interface/controller/controller/notice/index.js +1 -0
- package/out/interface/provider/i-async-action.provider.d.ts +11 -3
- package/out/interface/provider/i-async-action.provider.d.ts.map +1 -1
- package/out/interface/provider/i-internal-message.provider.d.ts +10 -2
- package/out/interface/provider/i-internal-message.provider.d.ts.map +1 -1
- package/out/interface/util/i-notice-util/i-notice-util.d.ts +34 -0
- package/out/interface/util/i-notice-util/i-notice-util.d.ts.map +1 -0
- package/out/interface/util/i-notice-util/i-notice-util.js +1 -0
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +2 -2
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
- package/out/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/register/helper/async-action-register.d.ts +2 -1
- package/out/register/helper/async-action-register.d.ts.map +1 -1
- package/out/register/helper/async-action-register.js +3 -3
- package/out/register/helper/internal-message-register.js +2 -2
- package/out/service/service/internal-message/internal-message.service.d.ts +1 -1
- package/out/service/service/internal-message/internal-message.service.d.ts.map +1 -1
- package/out/service/service/internal-message/internal-message.service.js +7 -16
- package/out/types.d.ts +8 -1
- package/out/types.d.ts.map +1 -1
- package/out/utils/file-util/file-util.d.ts +57 -0
- package/out/utils/file-util/file-util.d.ts.map +1 -0
- package/out/utils/file-util/file-util.js +113 -0
- package/out/utils/file-util/index.d.ts +2 -0
- package/out/utils/file-util/index.d.ts.map +1 -0
- package/out/utils/file-util/index.js +1 -0
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/package.json +3 -3
- package/src/app-hub.ts +3 -0
- package/src/application.ts +1 -1
- package/src/controller/control/exp-bar/exp-bar.controller.ts +6 -0
- package/src/controller/control/exp-bar/tree-exp-bar.controller.ts +17 -0
- package/src/controller/notification/async-action.controller.ts +163 -0
- package/src/controller/notification/index.ts +1 -0
- package/src/controller/notification/internal-message.controller.ts +64 -0
- package/src/controller/notification/notice.controller.ts +16 -0
- package/src/global/global-util/global-util.ts +10 -0
- package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +9 -1
- package/src/interface/common/i-popover-options/i-popover-options.ts +10 -1
- package/src/interface/controller/controller/index.ts +1 -0
- package/src/interface/controller/controller/notice/i-async-action.controller.ts +52 -0
- package/src/interface/controller/controller/notice/i-internal-message.controller.ts +74 -0
- package/src/interface/controller/controller/notice/i-notice.controller.ts +36 -0
- package/src/interface/controller/controller/notice/index.ts +9 -0
- package/src/interface/provider/i-async-action.provider.ts +14 -3
- package/src/interface/provider/i-internal-message.provider.ts +10 -2
- package/src/interface/util/i-notice-util/i-notice-util.ts +34 -0
- package/src/interface/util/i-open-view-util/i-open-view-util.ts +2 -1
- package/src/interface/util/index.ts +1 -0
- package/src/register/helper/async-action-register.ts +4 -4
- package/src/register/helper/internal-message-register.ts +2 -2
- package/src/service/service/internal-message/internal-message.service.ts +12 -18
- package/src/types.ts +9 -0
- package/src/utils/file-util/file-util.ts +141 -0
- package/src/utils/file-util/index.ts +1 -0
- package/src/utils/index.ts +1 -0
package/dist/index.esm.js
CHANGED
|
@@ -76,7 +76,7 @@ var RegisterCenter = class {
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
// src/command/app/app-func/app-func.ts
|
|
79
|
-
import { ModelError as ModelError16, RuntimeError as
|
|
79
|
+
import { ModelError as ModelError16, RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
80
80
|
|
|
81
81
|
// src/utils/error-handler/default-error-handler.ts
|
|
82
82
|
import {
|
|
@@ -3247,8 +3247,8 @@ var baseStyle = {
|
|
|
3247
3247
|
position: "fixed",
|
|
3248
3248
|
zIndex: "10000"
|
|
3249
3249
|
};
|
|
3250
|
-
function cloneElement(
|
|
3251
|
-
const element = getAnimationElement(
|
|
3250
|
+
function cloneElement(clone32, teleport = document.body, isRemoveChild = true) {
|
|
3251
|
+
const element = getAnimationElement(clone32);
|
|
3252
3252
|
if (element == null) {
|
|
3253
3253
|
throw new Error("Cannot clone a null or undefined element.");
|
|
3254
3254
|
}
|
|
@@ -3667,11 +3667,11 @@ function arrayContains(arr, val) {
|
|
|
3667
3667
|
});
|
|
3668
3668
|
}
|
|
3669
3669
|
function cloneObject(o) {
|
|
3670
|
-
var
|
|
3670
|
+
var clone32 = {};
|
|
3671
3671
|
for (var p in o) {
|
|
3672
|
-
|
|
3672
|
+
clone32[p] = o[p];
|
|
3673
3673
|
}
|
|
3674
|
-
return
|
|
3674
|
+
return clone32;
|
|
3675
3675
|
}
|
|
3676
3676
|
function replaceObjectProps(o1, o2) {
|
|
3677
3677
|
var o = cloneObject(o1);
|
|
@@ -4844,8 +4844,124 @@ var AnimeUtil = class {
|
|
|
4844
4844
|
}
|
|
4845
4845
|
};
|
|
4846
4846
|
|
|
4847
|
+
// src/utils/file-util/file-util.ts
|
|
4848
|
+
import { RuntimeError as RuntimeError5, downloadFileFromBlob } from "@ibiz-template/core";
|
|
4849
|
+
import qs2 from "qs";
|
|
4850
|
+
var FileUtil = class {
|
|
4851
|
+
/**
|
|
4852
|
+
* 计算OSSCat参数
|
|
4853
|
+
*
|
|
4854
|
+
* @author zk
|
|
4855
|
+
* @date 2024-01-26 02:01:52
|
|
4856
|
+
* @param {string} url
|
|
4857
|
+
* @param {IContext} context
|
|
4858
|
+
* @return {*} {string}
|
|
4859
|
+
* @memberof FileUtil
|
|
4860
|
+
*/
|
|
4861
|
+
calcOSSCatUrl(url, context, OSSCatName) {
|
|
4862
|
+
var _a;
|
|
4863
|
+
let uploadUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(url);
|
|
4864
|
+
const app = ibiz.hub.getApp(context.srfappid);
|
|
4865
|
+
const OSSCat = OSSCatName || app.model.defaultOSSCat || ((_a = app.model.userParam) == null ? void 0 : _a.DefaultOSSCat);
|
|
4866
|
+
uploadUrl = uploadUrl.replace("/{cat}", OSSCat ? "/".concat(OSSCat) : "");
|
|
4867
|
+
return uploadUrl;
|
|
4868
|
+
}
|
|
4869
|
+
/**
|
|
4870
|
+
* 计算文件的上传路径和下载路径
|
|
4871
|
+
* 下载路径文件id用%fileId%占位,替换即可
|
|
4872
|
+
* 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
4873
|
+
*
|
|
4874
|
+
* @author zk
|
|
4875
|
+
* @date 2024-01-26 02:01:15
|
|
4876
|
+
* @param {IData} data
|
|
4877
|
+
* @param {IContext} context
|
|
4878
|
+
* @param {IParams} params
|
|
4879
|
+
* @param {IParams} uploadParams
|
|
4880
|
+
* @param {IParams} exportParams
|
|
4881
|
+
* @return {*} {{
|
|
4882
|
+
* uploadUrl: string;
|
|
4883
|
+
* downloadUrl: string;
|
|
4884
|
+
* }}
|
|
4885
|
+
* @memberof FileUtil
|
|
4886
|
+
*/
|
|
4887
|
+
calcFileUpDownUrl(context, params, data = {}, extraParams = {}) {
|
|
4888
|
+
const { uploadParams, exportParams, osscat: OSSCatName } = extraParams;
|
|
4889
|
+
let uploadUrl = this.calcOSSCatUrl(
|
|
4890
|
+
ibiz.env.uploadFileUrl,
|
|
4891
|
+
context,
|
|
4892
|
+
OSSCatName
|
|
4893
|
+
);
|
|
4894
|
+
let downloadUrl = this.calcOSSCatUrl(
|
|
4895
|
+
"".concat(ibiz.env.downloadFileUrl, "/%fileId%"),
|
|
4896
|
+
context,
|
|
4897
|
+
OSSCatName
|
|
4898
|
+
);
|
|
4899
|
+
let _uploadParams = {};
|
|
4900
|
+
let _exportParams = {};
|
|
4901
|
+
if (uploadParams) {
|
|
4902
|
+
_uploadParams = convertNavData(uploadParams, data, params, context);
|
|
4903
|
+
}
|
|
4904
|
+
if (exportParams) {
|
|
4905
|
+
_exportParams = convertNavData(exportParams, data, params, context);
|
|
4906
|
+
}
|
|
4907
|
+
uploadUrl += qs2.stringify(_uploadParams, { addQueryPrefix: true });
|
|
4908
|
+
downloadUrl += qs2.stringify(_exportParams, { addQueryPrefix: true });
|
|
4909
|
+
return { uploadUrl, downloadUrl };
|
|
4910
|
+
}
|
|
4911
|
+
/**
|
|
4912
|
+
* 请求url获取文件流,并用JS触发文件下载
|
|
4913
|
+
*
|
|
4914
|
+
* @author zk
|
|
4915
|
+
* @date 2024-01-26 02:01:29
|
|
4916
|
+
* @param {{ url: string; name: string }} file
|
|
4917
|
+
* @memberof FileUtil
|
|
4918
|
+
*/
|
|
4919
|
+
async fileDownload(url, name) {
|
|
4920
|
+
const response = await ibiz.net.request(url, {
|
|
4921
|
+
method: "get",
|
|
4922
|
+
responseType: "blob",
|
|
4923
|
+
baseURL: ""
|
|
4924
|
+
// 已经有baseURL了,这里无需再写
|
|
4925
|
+
});
|
|
4926
|
+
if (response.status !== 200) {
|
|
4927
|
+
throw new RuntimeError5("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
|
|
4928
|
+
}
|
|
4929
|
+
if (!response.data) {
|
|
4930
|
+
throw new RuntimeError5("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
|
|
4931
|
+
} else {
|
|
4932
|
+
const fileName = name;
|
|
4933
|
+
downloadFileFromBlob(response.data, fileName);
|
|
4934
|
+
}
|
|
4935
|
+
}
|
|
4936
|
+
/**
|
|
4937
|
+
* 文件上传
|
|
4938
|
+
*
|
|
4939
|
+
* @author zk
|
|
4940
|
+
* @date 2024-01-26 05:01:35
|
|
4941
|
+
* @param {string} uploadUrl
|
|
4942
|
+
* @param {Blob} file
|
|
4943
|
+
* @param {IData} headers
|
|
4944
|
+
* @return {*} {Promise<IData>}
|
|
4945
|
+
* @memberof FileUtil
|
|
4946
|
+
*/
|
|
4947
|
+
async fileUpload(uploadUrl, file, headers) {
|
|
4948
|
+
const formData = new FormData();
|
|
4949
|
+
formData.append("file", file);
|
|
4950
|
+
const res = await ibiz.net.axios({
|
|
4951
|
+
url: uploadUrl,
|
|
4952
|
+
method: "post",
|
|
4953
|
+
headers,
|
|
4954
|
+
data: formData
|
|
4955
|
+
});
|
|
4956
|
+
if (res.status !== 200) {
|
|
4957
|
+
throw new RuntimeError5("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25");
|
|
4958
|
+
}
|
|
4959
|
+
return res.data;
|
|
4960
|
+
}
|
|
4961
|
+
};
|
|
4962
|
+
|
|
4847
4963
|
// src/command/app/open-app-view/open-app-view.ts
|
|
4848
|
-
import { ModelError as ModelError15, RuntimeError as
|
|
4964
|
+
import { ModelError as ModelError15, RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
4849
4965
|
import { clone as clone17 } from "ramda";
|
|
4850
4966
|
|
|
4851
4967
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
@@ -4952,7 +5068,7 @@ var PSModelCondEngineBase = class {
|
|
|
4952
5068
|
};
|
|
4953
5069
|
|
|
4954
5070
|
// src/service/utils/de-dq-cond/ps-model-group-cond-base.ts
|
|
4955
|
-
import { RuntimeError as
|
|
5071
|
+
import { RuntimeError as RuntimeError6 } from "@ibiz-template/core";
|
|
4956
5072
|
|
|
4957
5073
|
// src/service/utils/de-dq-cond/ps-model-cond-base.ts
|
|
4958
5074
|
var PSModelCondBase = class {
|
|
@@ -5105,7 +5221,7 @@ var PSModelGroupCondBase = class _PSModelGroupCondBase extends PSModelCondBase {
|
|
|
5105
5221
|
}
|
|
5106
5222
|
});
|
|
5107
5223
|
} else {
|
|
5108
|
-
throw new
|
|
5224
|
+
throw new RuntimeError6("\u503C\u5FC5\u987B\u4E3A\u6570\u7EC4");
|
|
5109
5225
|
}
|
|
5110
5226
|
}
|
|
5111
5227
|
}
|
|
@@ -5227,7 +5343,7 @@ _PSDEDQCondEngine.PARAMTYPE_WEBCONTEXT = "WEBCONTEXT";
|
|
|
5227
5343
|
var PSDEDQCondEngine = _PSDEDQCondEngine;
|
|
5228
5344
|
|
|
5229
5345
|
// src/register/helper/app-counter-register.ts
|
|
5230
|
-
import { RuntimeError as
|
|
5346
|
+
import { RuntimeError as RuntimeError7 } from "@ibiz-template/core";
|
|
5231
5347
|
|
|
5232
5348
|
// src/register/helper/common-register.ts
|
|
5233
5349
|
async function getPluginRegisterKey(pluginId, appId2) {
|
|
@@ -5271,14 +5387,14 @@ async function getAppCounterProvider(model) {
|
|
|
5271
5387
|
if (counterType === "CUSTOM") {
|
|
5272
5388
|
provider = getProvider(codeName);
|
|
5273
5389
|
if (!provider) {
|
|
5274
|
-
throw new
|
|
5390
|
+
throw new RuntimeError7("\u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u7CFB\u7EDF\u8BA1\u6570\u5668".concat(codeName, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
5275
5391
|
} else {
|
|
5276
5392
|
return provider;
|
|
5277
5393
|
}
|
|
5278
5394
|
}
|
|
5279
5395
|
provider = getProvider(counterType);
|
|
5280
5396
|
if (!provider) {
|
|
5281
|
-
throw new
|
|
5397
|
+
throw new RuntimeError7("\u627E\u4E0D\u7CFB\u7EDF\u8BA1\u6570\u5668\u7C7B\u578B".concat(counterType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
5282
5398
|
} else {
|
|
5283
5399
|
return provider;
|
|
5284
5400
|
}
|
|
@@ -5564,7 +5680,7 @@ async function getPortletProvider(model) {
|
|
|
5564
5680
|
}
|
|
5565
5681
|
|
|
5566
5682
|
// src/register/helper/ui-action-register.ts
|
|
5567
|
-
import { RuntimeError as
|
|
5683
|
+
import { RuntimeError as RuntimeError8 } from "@ibiz-template/core";
|
|
5568
5684
|
var UIACTION_PROVIDER_PREFIX = "UIACTION";
|
|
5569
5685
|
function registerUIActionProvider(key, callback) {
|
|
5570
5686
|
ibiz.register.register("".concat(UIACTION_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
@@ -5594,14 +5710,14 @@ async function getUIActionProvider(model) {
|
|
|
5594
5710
|
}
|
|
5595
5711
|
provider = getProvider8(uiactionMode);
|
|
5596
5712
|
if (!provider) {
|
|
5597
|
-
throw new
|
|
5713
|
+
throw new RuntimeError8("\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F".concat(uiactionMode, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
5598
5714
|
} else {
|
|
5599
5715
|
return provider;
|
|
5600
5716
|
}
|
|
5601
5717
|
}
|
|
5602
5718
|
|
|
5603
5719
|
// src/register/helper/ui-logic-node-register.ts
|
|
5604
|
-
import { RuntimeError as
|
|
5720
|
+
import { RuntimeError as RuntimeError9 } from "@ibiz-template/core";
|
|
5605
5721
|
var UILOGINNODE_PROVIDER_PREFIX = "UI_LOGIN_NODE";
|
|
5606
5722
|
function registerUILogicNodeProvider(key, callback) {
|
|
5607
5723
|
ibiz.register.register("".concat(UILOGINNODE_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
@@ -5617,7 +5733,7 @@ async function getUILogicNodeProvider(model) {
|
|
|
5617
5733
|
if (provider) {
|
|
5618
5734
|
return provider;
|
|
5619
5735
|
}
|
|
5620
|
-
throw new
|
|
5736
|
+
throw new RuntimeError9(
|
|
5621
5737
|
"\u627E\u4E0D\u5230\u754C\u9762\u903B\u8F91\u524D\u7AEF\u63D2\u4EF6\u8282\u70B9\uFF0C\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668")
|
|
5622
5738
|
);
|
|
5623
5739
|
}
|
|
@@ -5667,7 +5783,7 @@ async function getViewProvider(model) {
|
|
|
5667
5783
|
}
|
|
5668
5784
|
|
|
5669
5785
|
// src/register/helper/async-action-register.ts
|
|
5670
|
-
import { RuntimeError as
|
|
5786
|
+
import { RuntimeError as RuntimeError10 } from "@ibiz-template/core";
|
|
5671
5787
|
var ASYNC_ACTION_PROVIDER_PREFIX = "ASYNC_ACTION";
|
|
5672
5788
|
function registerAsyncActionProvider(key, callback) {
|
|
5673
5789
|
ibiz.register.register("".concat(ASYNC_ACTION_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
@@ -5677,19 +5793,19 @@ function getProvider10(key) {
|
|
|
5677
5793
|
"".concat(ASYNC_ACTION_PROVIDER_PREFIX, "_").concat(key)
|
|
5678
5794
|
);
|
|
5679
5795
|
}
|
|
5680
|
-
function getAsyncActionProvider(
|
|
5796
|
+
function getAsyncActionProvider(action) {
|
|
5681
5797
|
const provider = getProvider10(
|
|
5682
|
-
actiontype || "DEFAULT"
|
|
5798
|
+
action.actiontype || "DEFAULT"
|
|
5683
5799
|
);
|
|
5684
5800
|
if (!provider) {
|
|
5685
|
-
throw new
|
|
5801
|
+
throw new RuntimeError10("\u627E\u4E0D\u5F02\u6B65\u64CD\u4F5C\u7C7B\u578B".concat(action.actiontype, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
5686
5802
|
} else {
|
|
5687
5803
|
return provider;
|
|
5688
5804
|
}
|
|
5689
5805
|
}
|
|
5690
5806
|
|
|
5691
5807
|
// src/platform/provider/platform-provider-base.ts
|
|
5692
|
-
import { downloadFileFromBlob, RuntimeError as
|
|
5808
|
+
import { downloadFileFromBlob as downloadFileFromBlob2, RuntimeError as RuntimeError11 } from "@ibiz-template/core";
|
|
5693
5809
|
var PlatformProviderBase = class {
|
|
5694
5810
|
back() {
|
|
5695
5811
|
throw new Error("Method not implemented.");
|
|
@@ -5707,13 +5823,13 @@ var PlatformProviderBase = class {
|
|
|
5707
5823
|
baseURL: ""
|
|
5708
5824
|
});
|
|
5709
5825
|
if (response.status !== 200) {
|
|
5710
|
-
throw new
|
|
5826
|
+
throw new RuntimeError11("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25");
|
|
5711
5827
|
}
|
|
5712
5828
|
if (!response.data) {
|
|
5713
|
-
throw new
|
|
5829
|
+
throw new RuntimeError11("\u6587\u4EF6\u6D41\u6570\u636E\u4E0D\u5B58\u5728");
|
|
5714
5830
|
} else {
|
|
5715
5831
|
const fileName = name;
|
|
5716
|
-
|
|
5832
|
+
downloadFileFromBlob2(response.data, fileName);
|
|
5717
5833
|
return Promise.resolve(true);
|
|
5718
5834
|
}
|
|
5719
5835
|
}
|
|
@@ -5785,7 +5901,7 @@ function getPlatformProvider() {
|
|
|
5785
5901
|
}
|
|
5786
5902
|
|
|
5787
5903
|
// src/register/helper/de-method-register.ts
|
|
5788
|
-
import { RuntimeError as
|
|
5904
|
+
import { RuntimeError as RuntimeError12 } from "@ibiz-template/core";
|
|
5789
5905
|
var DEMETHOD_PROVIDER_PREFIX = "DEMETHOD";
|
|
5790
5906
|
function registerDEMethodProvider(key, callback) {
|
|
5791
5907
|
ibiz.register.register("".concat(DEMETHOD_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
@@ -5811,7 +5927,7 @@ async function getDEMethodProvider(model) {
|
|
|
5811
5927
|
}
|
|
5812
5928
|
provider = getProvider12(methodType);
|
|
5813
5929
|
if (!provider) {
|
|
5814
|
-
throw new
|
|
5930
|
+
throw new RuntimeError12("\u627E\u4E0D\u5B9E\u4F53\u884C\u4E3A\u65B9\u6CD5\u7C7B\u578B\u4E3A".concat(methodType, "\u7684\u9002\u914D\u5668"));
|
|
5815
5931
|
} else {
|
|
5816
5932
|
return provider;
|
|
5817
5933
|
}
|
|
@@ -5881,7 +5997,7 @@ async function getAppMenuItemProvider(model) {
|
|
|
5881
5997
|
}
|
|
5882
5998
|
|
|
5883
5999
|
// src/register/helper/internal-message-register.ts
|
|
5884
|
-
import { RuntimeError as
|
|
6000
|
+
import { RuntimeError as RuntimeError13 } from "@ibiz-template/core";
|
|
5885
6001
|
var INTERNAL_MESSAGE_PROVIDER_PREFIX = "INTERNAL_MESSAGE";
|
|
5886
6002
|
function registerInternalMessageProvider(key, callback) {
|
|
5887
6003
|
ibiz.register.register(
|
|
@@ -5896,17 +6012,17 @@ function getProvider15(key) {
|
|
|
5896
6012
|
}
|
|
5897
6013
|
function getInternalMessageProvider(msg) {
|
|
5898
6014
|
const provider = getProvider15(
|
|
5899
|
-
msg.
|
|
6015
|
+
msg.content_type || "DEFAULT"
|
|
5900
6016
|
);
|
|
5901
6017
|
if (!provider) {
|
|
5902
|
-
throw new
|
|
6018
|
+
throw new RuntimeError13("\u627E\u4E0D\u7AD9\u5185\u4FE1\u7C7B\u578B".concat(msg.content_type, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
5903
6019
|
} else {
|
|
5904
6020
|
return provider;
|
|
5905
6021
|
}
|
|
5906
6022
|
}
|
|
5907
6023
|
|
|
5908
6024
|
// src/service/utils/app-counter/app-counter.ts
|
|
5909
|
-
import { IBizContext, RuntimeError as
|
|
6025
|
+
import { IBizContext, RuntimeError as RuntimeError14 } from "@ibiz-template/core";
|
|
5910
6026
|
import { notNilEmpty as notNilEmpty5, QXEvent as QXEvent2 } from "qx-util";
|
|
5911
6027
|
import { clone as clone3 } from "ramda";
|
|
5912
6028
|
var AppCounter = class {
|
|
@@ -6011,7 +6127,7 @@ var AppCounter = class {
|
|
|
6011
6127
|
* @return {*} {Promise<IData>}
|
|
6012
6128
|
*/
|
|
6013
6129
|
async load() {
|
|
6014
|
-
throw new
|
|
6130
|
+
throw new RuntimeError14("\u672A\u5B9E\u73B0\u8BA1\u6570\u5668\u52A0\u8F7D\u65B9\u6CD5");
|
|
6015
6131
|
}
|
|
6016
6132
|
/**
|
|
6017
6133
|
* 计数器刷新
|
|
@@ -6471,10 +6587,10 @@ var DynamicCodeListCache = class {
|
|
|
6471
6587
|
// src/service/utils/de-cache/de-cache.ts
|
|
6472
6588
|
import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
|
|
6473
6589
|
import { createUUID as createUUID2 } from "qx-util";
|
|
6474
|
-
import { RuntimeError as
|
|
6590
|
+
import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
6475
6591
|
|
|
6476
6592
|
// src/service/utils/service-exist-util/service-exist-util.ts
|
|
6477
|
-
import { RuntimeError as
|
|
6593
|
+
import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
|
|
6478
6594
|
import { isEmpty as isEmpty4, isNil as isNil4 } from "ramda";
|
|
6479
6595
|
function isExistSrfKey(funcName, entity) {
|
|
6480
6596
|
if (entity != null) {
|
|
@@ -6483,14 +6599,14 @@ function isExistSrfKey(funcName, entity) {
|
|
|
6483
6599
|
return true;
|
|
6484
6600
|
}
|
|
6485
6601
|
}
|
|
6486
|
-
throw new
|
|
6602
|
+
throw new RuntimeError15("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfkey\u300D\u65E0\u6CD5\u5904\u7406"));
|
|
6487
6603
|
}
|
|
6488
6604
|
function isExistSessionId(funcName, context) {
|
|
6489
6605
|
const { srfsessionid } = context;
|
|
6490
6606
|
if (!isNil4(srfsessionid) && !isEmpty4(srfsessionid)) {
|
|
6491
6607
|
return true;
|
|
6492
6608
|
}
|
|
6493
|
-
throw new
|
|
6609
|
+
throw new RuntimeError15("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfsessionid\u300D\u65E0\u6CD5\u5904\u7406"));
|
|
6494
6610
|
}
|
|
6495
6611
|
|
|
6496
6612
|
// src/service/utils/de-cache/de-cache.ts
|
|
@@ -6576,7 +6692,7 @@ var DECache = class {
|
|
|
6576
6692
|
if (this.isUnionKey) {
|
|
6577
6693
|
this.calcUnionKey(entity);
|
|
6578
6694
|
if (this.checkData(context, entity.srfkey)) {
|
|
6579
|
-
throw new
|
|
6695
|
+
throw new RuntimeError16(
|
|
6580
6696
|
"\u65B0\u5EFA\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
6581
6697
|
);
|
|
6582
6698
|
}
|
|
@@ -6637,7 +6753,7 @@ var DECache = class {
|
|
|
6637
6753
|
if (this.isUnionKey) {
|
|
6638
6754
|
this.calcUnionKey(entity);
|
|
6639
6755
|
if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
|
|
6640
|
-
throw new
|
|
6756
|
+
throw new RuntimeError16(
|
|
6641
6757
|
"\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
6642
6758
|
);
|
|
6643
6759
|
}
|
|
@@ -6773,7 +6889,7 @@ var DECache = class {
|
|
|
6773
6889
|
if (this.isUnionKey) {
|
|
6774
6890
|
this.calcUnionKey(entity);
|
|
6775
6891
|
if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
|
|
6776
|
-
throw new
|
|
6892
|
+
throw new RuntimeError16(
|
|
6777
6893
|
"\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
6778
6894
|
);
|
|
6779
6895
|
}
|
|
@@ -7115,7 +7231,7 @@ async function calcDynaSysParams(appDataEntityId, context, opts = {}) {
|
|
|
7115
7231
|
}
|
|
7116
7232
|
|
|
7117
7233
|
// src/service/service/code-list/code-list.service.ts
|
|
7118
|
-
import { RuntimeError as
|
|
7234
|
+
import { RuntimeError as RuntimeError17 } from "@ibiz-template/core";
|
|
7119
7235
|
var CodeListService = class {
|
|
7120
7236
|
constructor(appModel) {
|
|
7121
7237
|
this.appModel = appModel;
|
|
@@ -7262,7 +7378,7 @@ var CodeListService = class {
|
|
|
7262
7378
|
async get(tag, context, params) {
|
|
7263
7379
|
const codeList = this.allCodeLists.get(tag);
|
|
7264
7380
|
if (!codeList) {
|
|
7265
|
-
throw new
|
|
7381
|
+
throw new RuntimeError17("\u627E\u4E0D\u5230".concat(tag, "\u4EE3\u7801\u8868"));
|
|
7266
7382
|
}
|
|
7267
7383
|
if (codeList.codeListType === "STATIC") {
|
|
7268
7384
|
return this.getStatic(codeList);
|
|
@@ -7384,12 +7500,12 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
|
|
|
7384
7500
|
// src/service/service/entity/de.service.ts
|
|
7385
7501
|
import {
|
|
7386
7502
|
ModelError as ModelError7,
|
|
7387
|
-
RuntimeError as
|
|
7503
|
+
RuntimeError as RuntimeError19,
|
|
7388
7504
|
RuntimeModelError as RuntimeModelError10
|
|
7389
7505
|
} from "@ibiz-template/core";
|
|
7390
7506
|
|
|
7391
7507
|
// src/service/service/work-flow/work-flow.service.ts
|
|
7392
|
-
import { RuntimeError as
|
|
7508
|
+
import { RuntimeError as RuntimeError18 } from "@ibiz-template/core";
|
|
7393
7509
|
var WorkFlowService = class {
|
|
7394
7510
|
/**
|
|
7395
7511
|
* Creates an instance of WorkFlowService.
|
|
@@ -7711,7 +7827,7 @@ var WorkFlowService = class {
|
|
|
7711
7827
|
case "sendcopy":
|
|
7712
7828
|
return this.wfSendCopy(context, params, data);
|
|
7713
7829
|
default: {
|
|
7714
|
-
throw new
|
|
7830
|
+
throw new RuntimeError18("\u300C".concat(methodName, "\u300D\u672A\u5B9E\u73B0"));
|
|
7715
7831
|
}
|
|
7716
7832
|
}
|
|
7717
7833
|
}
|
|
@@ -8291,7 +8407,7 @@ var DEService = class {
|
|
|
8291
8407
|
if (method) {
|
|
8292
8408
|
return method.exec(context, params, params2);
|
|
8293
8409
|
}
|
|
8294
|
-
throw new
|
|
8410
|
+
throw new RuntimeError19("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
8295
8411
|
}
|
|
8296
8412
|
getDraft(context, params, params2) {
|
|
8297
8413
|
return this.exec("GetDraft", context, params, params2);
|
|
@@ -8345,7 +8461,7 @@ var DEService = class {
|
|
|
8345
8461
|
if (method) {
|
|
8346
8462
|
return method.exec(context, params, params2);
|
|
8347
8463
|
}
|
|
8348
|
-
throw new
|
|
8464
|
+
throw new RuntimeError19("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
8349
8465
|
}
|
|
8350
8466
|
/**
|
|
8351
8467
|
* 实体级别 AI 聊天会话
|
|
@@ -8738,7 +8854,7 @@ var ControlService = class {
|
|
|
8738
8854
|
};
|
|
8739
8855
|
|
|
8740
8856
|
// src/service/service/control/md-control.service.ts
|
|
8741
|
-
import { RuntimeError as
|
|
8857
|
+
import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
8742
8858
|
import { isArray as isArray3 } from "qx-util";
|
|
8743
8859
|
var MDControlService = class extends ControlService {
|
|
8744
8860
|
/**
|
|
@@ -8867,7 +8983,7 @@ var MDControlService = class extends ControlService {
|
|
|
8867
8983
|
* @returns {*} {Promise<IHttpResponse>}
|
|
8868
8984
|
*/
|
|
8869
8985
|
async exportData(_dataExport, _context, _params = {}) {
|
|
8870
|
-
throw new
|
|
8986
|
+
throw new RuntimeError20("\u672A\u5B9E\u73B0");
|
|
8871
8987
|
}
|
|
8872
8988
|
/**
|
|
8873
8989
|
* 处理响应
|
|
@@ -8902,7 +9018,7 @@ var MDControlService = class extends ControlService {
|
|
|
8902
9018
|
};
|
|
8903
9019
|
|
|
8904
9020
|
// src/service/service/authority/authority.service.ts
|
|
8905
|
-
import { RuntimeError as
|
|
9021
|
+
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
8906
9022
|
|
|
8907
9023
|
// src/service/service/authority/de-authority.service.ts
|
|
8908
9024
|
var DeAuthorityService = class {
|
|
@@ -9038,7 +9154,7 @@ var AuthorityService = class {
|
|
|
9038
9154
|
this.appModel.appId
|
|
9039
9155
|
);
|
|
9040
9156
|
if (!entityModel) {
|
|
9041
|
-
throw new
|
|
9157
|
+
throw new RuntimeError21("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
9042
9158
|
}
|
|
9043
9159
|
const constructor = this.constructorCache.get(id);
|
|
9044
9160
|
let service;
|
|
@@ -9272,7 +9388,7 @@ var AsyncActionService = class {
|
|
|
9272
9388
|
import {
|
|
9273
9389
|
HttpError as HttpError5,
|
|
9274
9390
|
HttpResponse as HttpResponse3,
|
|
9275
|
-
RuntimeError as
|
|
9391
|
+
RuntimeError as RuntimeError23,
|
|
9276
9392
|
RuntimeModelError as RuntimeModelError22
|
|
9277
9393
|
} from "@ibiz-template/core";
|
|
9278
9394
|
import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
|
|
@@ -9503,7 +9619,7 @@ var Method = class {
|
|
|
9503
9619
|
};
|
|
9504
9620
|
|
|
9505
9621
|
// src/de-logic/index.ts
|
|
9506
|
-
import { HttpError as HttpError4, HttpResponse as HttpResponse2, RuntimeError as
|
|
9622
|
+
import { HttpError as HttpError4, HttpResponse as HttpResponse2, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
9507
9623
|
import { isArray as isArray5 } from "lodash-es";
|
|
9508
9624
|
import { clone as clone13 } from "ramda";
|
|
9509
9625
|
|
|
@@ -10565,7 +10681,7 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
|
|
|
10565
10681
|
context.srfappid
|
|
10566
10682
|
);
|
|
10567
10683
|
if (!deLogic) {
|
|
10568
|
-
throw new
|
|
10684
|
+
throw new RuntimeError22("".concat(dataEntityId, "\u627E\u4E0D\u5230\u5B9E\u4F53\u903B\u8F91").concat(deDELogicId));
|
|
10569
10685
|
}
|
|
10570
10686
|
return execDELogic(deLogic, context, data, params);
|
|
10571
10687
|
}
|
|
@@ -10710,7 +10826,7 @@ var DEActionMethod = class extends Method {
|
|
|
10710
10826
|
*/
|
|
10711
10827
|
async create(context, data, params) {
|
|
10712
10828
|
if (!data) {
|
|
10713
|
-
throw new
|
|
10829
|
+
throw new RuntimeError23("create\u884C\u4E3A\u6CA1\u6709\u4F20data");
|
|
10714
10830
|
}
|
|
10715
10831
|
if (this.isLocalMode) {
|
|
10716
10832
|
return this.createTemp(context, this.createEntity(data));
|
|
@@ -10752,7 +10868,7 @@ var DEActionMethod = class extends Method {
|
|
|
10752
10868
|
*/
|
|
10753
10869
|
async update(context, data, params) {
|
|
10754
10870
|
if (!data) {
|
|
10755
|
-
throw new
|
|
10871
|
+
throw new RuntimeError23("update\u884C\u4E3A\u6CA1\u6709\u4F20data");
|
|
10756
10872
|
}
|
|
10757
10873
|
if (this.isLocalMode) {
|
|
10758
10874
|
return this.updateTemp(context, this.createEntity(data));
|
|
@@ -11261,9 +11377,16 @@ var InternalMessageService = class {
|
|
|
11261
11377
|
* @return {*} {Promise<IHttpResponse<IInternalMessage[]>>}
|
|
11262
11378
|
*/
|
|
11263
11379
|
async fetch(params = {}) {
|
|
11264
|
-
const
|
|
11265
|
-
|
|
11380
|
+
const fetchParams = {
|
|
11381
|
+
page: 0,
|
|
11382
|
+
size: 20,
|
|
11383
|
+
sort: "update_time,desc"
|
|
11266
11384
|
};
|
|
11385
|
+
Object.assign(fetchParams, params);
|
|
11386
|
+
const res = await ibiz.net.post(
|
|
11387
|
+
"".concat(this.baseUrl, "/fetch_cur_receiver"),
|
|
11388
|
+
fetchParams
|
|
11389
|
+
);
|
|
11267
11390
|
if (res.headers) {
|
|
11268
11391
|
if (res.headers["x-page"]) {
|
|
11269
11392
|
res.page = Number(res.headers["x-page"]);
|
|
@@ -11278,16 +11401,6 @@ var InternalMessageService = class {
|
|
|
11278
11401
|
if (isNil12(res.data)) {
|
|
11279
11402
|
res.data = [];
|
|
11280
11403
|
}
|
|
11281
|
-
res.page = params.page;
|
|
11282
|
-
res.total = 34;
|
|
11283
|
-
res.data = Array.from({ length: params.size }, (_, i) => ({
|
|
11284
|
-
id: i + 1,
|
|
11285
|
-
status: "RECEIVED",
|
|
11286
|
-
title: "\u6807\u9898".concat(i + 1),
|
|
11287
|
-
content: "\u5185\u5BB9".concat(i + 1, "\u957F\u5185\u5BB9"),
|
|
11288
|
-
short_content: "\u5185\u5BB9".concat(i + 1, "\u77ED\u5185\u5BB9"),
|
|
11289
|
-
create_time: (/* @__PURE__ */ new Date()).toISOString()
|
|
11290
|
-
}));
|
|
11291
11404
|
return res;
|
|
11292
11405
|
}
|
|
11293
11406
|
/**
|
|
@@ -12154,7 +12267,7 @@ var MqttService = class {
|
|
|
12154
12267
|
};
|
|
12155
12268
|
|
|
12156
12269
|
// src/service/de-service-util.ts
|
|
12157
|
-
import { RuntimeError as
|
|
12270
|
+
import { RuntimeError as RuntimeError24 } from "@ibiz-template/core";
|
|
12158
12271
|
var _DEServiceUtil = class _DEServiceUtil {
|
|
12159
12272
|
/**
|
|
12160
12273
|
* Creates an instance of DEServiceUtil.
|
|
@@ -12207,7 +12320,7 @@ var _DEServiceUtil = class _DEServiceUtil {
|
|
|
12207
12320
|
this.appModel.appId
|
|
12208
12321
|
);
|
|
12209
12322
|
if (!entityModel) {
|
|
12210
|
-
throw new
|
|
12323
|
+
throw new RuntimeError24("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
12211
12324
|
}
|
|
12212
12325
|
const constructor = _DEServiceUtil.constructorCache.get(id.toUpperCase());
|
|
12213
12326
|
let service;
|
|
@@ -12339,7 +12452,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
12339
12452
|
const context = clone17(_context);
|
|
12340
12453
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
12341
12454
|
if (!appView) {
|
|
12342
|
-
throw new
|
|
12455
|
+
throw new RuntimeError25("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
12343
12456
|
}
|
|
12344
12457
|
if ((context.srfkey || params.srfuf === 0 /* CREATE */) && appView.appDataEntityId) {
|
|
12345
12458
|
const deName = calcDeCodeNameById(appView.appDataEntityId);
|
|
@@ -12451,7 +12564,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
12451
12564
|
*/
|
|
12452
12565
|
async openPopover(appView, event, context, params = {}) {
|
|
12453
12566
|
if (!event) {
|
|
12454
|
-
throw new
|
|
12567
|
+
throw new RuntimeError25("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
|
|
12455
12568
|
}
|
|
12456
12569
|
return ibiz.openView.popover(appView.id, event, context, params);
|
|
12457
12570
|
}
|
|
@@ -12507,7 +12620,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
12507
12620
|
const app = await ibiz.hub.getAppAsync(context.srfappid);
|
|
12508
12621
|
const appFunc = app.getAppFunc(appFuncId);
|
|
12509
12622
|
if (!appFunc) {
|
|
12510
|
-
throw new
|
|
12623
|
+
throw new RuntimeError26("\u627E\u4E0D\u5230\u53EB".concat(appFuncId, "\u7684\u5E94\u7528\u529F\u80FD"));
|
|
12511
12624
|
}
|
|
12512
12625
|
const { navigateContexts, navigateParams, appFuncType } = appFunc;
|
|
12513
12626
|
const _context = context.clone();
|
|
@@ -12541,7 +12654,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
12541
12654
|
*/
|
|
12542
12655
|
async openAppView(appFunc, context, params, opts) {
|
|
12543
12656
|
if (!appFunc.appViewId) {
|
|
12544
|
-
throw new
|
|
12657
|
+
throw new RuntimeError26("\u5E94\u7528\u89C6\u56FE[".concat(appFunc.appViewId, "]\u4E0D\u5B58\u5728"));
|
|
12545
12658
|
}
|
|
12546
12659
|
return ibiz.commands.execute(
|
|
12547
12660
|
OpenAppViewCommand.TAG,
|
|
@@ -12575,7 +12688,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
12575
12688
|
*/
|
|
12576
12689
|
openPdAppFunc(appFunc, context, params) {
|
|
12577
12690
|
ibiz.log.warn("openPdAppFunc", appFunc, context, params);
|
|
12578
|
-
throw new
|
|
12691
|
+
throw new RuntimeError26("\u672A\u5B9E\u73B0");
|
|
12579
12692
|
}
|
|
12580
12693
|
/**
|
|
12581
12694
|
* 执行 JavaScript 脚本
|
|
@@ -12589,7 +12702,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
12589
12702
|
*/
|
|
12590
12703
|
executeJavaScript(appFunc, context, params) {
|
|
12591
12704
|
ibiz.log.warn("executeJavaScript", appFunc, context, params);
|
|
12592
|
-
throw new
|
|
12705
|
+
throw new RuntimeError26("\u672A\u5B9E\u73B0");
|
|
12593
12706
|
}
|
|
12594
12707
|
/**
|
|
12595
12708
|
* 自定义应用功能
|
|
@@ -12603,7 +12716,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
12603
12716
|
*/
|
|
12604
12717
|
custom(appFunc, context, params) {
|
|
12605
12718
|
ibiz.log.warn("custom", appFunc, context, params);
|
|
12606
|
-
throw new
|
|
12719
|
+
throw new RuntimeError26("\u672A\u5B9E\u73B0");
|
|
12607
12720
|
}
|
|
12608
12721
|
};
|
|
12609
12722
|
/**
|
|
@@ -12624,7 +12737,7 @@ function installCommand() {
|
|
|
12624
12737
|
}
|
|
12625
12738
|
|
|
12626
12739
|
// src/app-hub.ts
|
|
12627
|
-
import { RuntimeError as
|
|
12740
|
+
import { RuntimeError as RuntimeError65 } from "@ibiz-template/core";
|
|
12628
12741
|
|
|
12629
12742
|
// src/application.ts
|
|
12630
12743
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -12792,7 +12905,7 @@ var Application = class {
|
|
|
12792
12905
|
this.model.appId
|
|
12793
12906
|
);
|
|
12794
12907
|
this.mqtt.evt.on("message", (message) => {
|
|
12795
|
-
ibiz.mc.command.
|
|
12908
|
+
ibiz.mc.command.next(message);
|
|
12796
12909
|
});
|
|
12797
12910
|
await this.mqtt.connect();
|
|
12798
12911
|
}
|
|
@@ -12828,7 +12941,7 @@ var Convert = class {
|
|
|
12828
12941
|
};
|
|
12829
12942
|
|
|
12830
12943
|
// src/hub/config/app-view-config-service.ts
|
|
12831
|
-
import { RuntimeError as
|
|
12944
|
+
import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
12832
12945
|
var AppViewConfigService = class {
|
|
12833
12946
|
constructor() {
|
|
12834
12947
|
/**
|
|
@@ -12870,7 +12983,7 @@ var AppViewConfigService = class {
|
|
|
12870
12983
|
if (!this.viewConfigs.has(id)) {
|
|
12871
12984
|
const model = await ibiz.hub.getAppView(id);
|
|
12872
12985
|
if (!model) {
|
|
12873
|
-
throw new
|
|
12986
|
+
throw new RuntimeError27("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
12874
12987
|
}
|
|
12875
12988
|
this.set(model.id, {
|
|
12876
12989
|
id: model.id,
|
|
@@ -12934,14 +13047,14 @@ var TreeGridExNotifyState = /* @__PURE__ */ ((TreeGridExNotifyState2) => {
|
|
|
12934
13047
|
|
|
12935
13048
|
// src/controller/common/view/view.controller.ts
|
|
12936
13049
|
import { notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
12937
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
13050
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError34 } from "@ibiz-template/core";
|
|
12938
13051
|
import { isEmpty as isEmpty8, isNil as isNil20, isNotNil as isNotNil2 } from "ramda";
|
|
12939
13052
|
|
|
12940
13053
|
// src/controller/utils/loading/loading.state.ts
|
|
12941
13054
|
import { NOOP } from "@ibiz-template/core";
|
|
12942
13055
|
|
|
12943
13056
|
// src/controller/utils/counter/counter.ts
|
|
12944
|
-
import { RuntimeError as
|
|
13057
|
+
import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
12945
13058
|
var Counter = class {
|
|
12946
13059
|
/**
|
|
12947
13060
|
* Creates an instance of Counter.
|
|
@@ -13003,7 +13116,7 @@ var Counter = class {
|
|
|
13003
13116
|
return;
|
|
13004
13117
|
}
|
|
13005
13118
|
if (this.count === 0) {
|
|
13006
|
-
throw new
|
|
13119
|
+
throw new RuntimeError28("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
|
|
13007
13120
|
}
|
|
13008
13121
|
this.count -= 1;
|
|
13009
13122
|
if (this.count === 0) {
|
|
@@ -13583,7 +13696,7 @@ function getOriginData(data) {
|
|
|
13583
13696
|
}
|
|
13584
13697
|
|
|
13585
13698
|
// src/controller/utils/value-rule/value-rule.ts
|
|
13586
|
-
import { RuntimeError as
|
|
13699
|
+
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
13587
13700
|
import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
|
|
13588
13701
|
import { isNil as isNil16 } from "ramda";
|
|
13589
13702
|
function generateRules(itemVRs, name, valueItemName) {
|
|
@@ -13633,7 +13746,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
13633
13746
|
deRule.groupCond
|
|
13634
13747
|
);
|
|
13635
13748
|
if (!isPast) {
|
|
13636
|
-
callback(new
|
|
13749
|
+
callback(new RuntimeError29(infoMessage || deRule.ruleInfo));
|
|
13637
13750
|
}
|
|
13638
13751
|
return true;
|
|
13639
13752
|
},
|
|
@@ -13703,7 +13816,7 @@ function generateEditorRules(editor) {
|
|
|
13703
13816
|
}
|
|
13704
13817
|
|
|
13705
13818
|
// src/controller/utils/value-ex/value-ex.ts
|
|
13706
|
-
import { RuntimeError as
|
|
13819
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
13707
13820
|
import { isNil as isNil17, mergeLeft } from "ramda";
|
|
13708
13821
|
var ValueExUtil = class {
|
|
13709
13822
|
/**
|
|
@@ -13735,7 +13848,7 @@ var ValueExUtil = class {
|
|
|
13735
13848
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
13736
13849
|
if (["OBJECTS", "OBJECT"].includes(valueType)) {
|
|
13737
13850
|
if (!objectNameField) {
|
|
13738
|
-
throw new
|
|
13851
|
+
throw new RuntimeError30("\u7F3A\u5C11objectNameField");
|
|
13739
13852
|
}
|
|
13740
13853
|
const textKey = objectNameField.toLowerCase();
|
|
13741
13854
|
if (valueType === "OBJECTS") {
|
|
@@ -13751,7 +13864,7 @@ var ValueExUtil = class {
|
|
|
13751
13864
|
};
|
|
13752
13865
|
|
|
13753
13866
|
// src/controller/utils/value-default/value-default.ts
|
|
13754
|
-
import { RuntimeError as
|
|
13867
|
+
import { RuntimeError as RuntimeError31, ModelError as ModelError17 } from "@ibiz-template/core";
|
|
13755
13868
|
import dayjs from "dayjs";
|
|
13756
13869
|
import { createUUID as createUUID8 } from "qx-util";
|
|
13757
13870
|
import { isNil as isNil18, isNotNil } from "ramda";
|
|
@@ -13792,7 +13905,7 @@ function getDefaultValue(opts, origins) {
|
|
|
13792
13905
|
case "SESSION":
|
|
13793
13906
|
case "APPLICATION":
|
|
13794
13907
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
13795
|
-
throw new
|
|
13908
|
+
throw new RuntimeError31("appdata.context\u4E0D\u5B58\u5728");
|
|
13796
13909
|
}
|
|
13797
13910
|
return ibiz.appData.context[defaultValue];
|
|
13798
13911
|
case "CONTEXT":
|
|
@@ -13806,7 +13919,7 @@ function getDefaultValue(opts, origins) {
|
|
|
13806
13919
|
|
|
13807
13920
|
// src/controller/utils/data-file-util/data-file-util.ts
|
|
13808
13921
|
import {
|
|
13809
|
-
RuntimeError as
|
|
13922
|
+
RuntimeError as RuntimeError32
|
|
13810
13923
|
} from "@ibiz-template/core";
|
|
13811
13924
|
var asyncImportUrl = "asyncimportdata2";
|
|
13812
13925
|
var importUrl = "importdata2";
|
|
@@ -13860,11 +13973,11 @@ async function importData(file, appDataEntity, dataImport) {
|
|
|
13860
13973
|
}
|
|
13861
13974
|
async function exportData(header, data, fileName) {
|
|
13862
13975
|
if (!ibiz.util.getExcelUtil) {
|
|
13863
|
-
throw new
|
|
13976
|
+
throw new RuntimeError32("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
13864
13977
|
}
|
|
13865
13978
|
const exportExcel = await ibiz.util.getExcelUtil();
|
|
13866
13979
|
if (!exportExcel) {
|
|
13867
|
-
throw new
|
|
13980
|
+
throw new RuntimeError32("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
13868
13981
|
}
|
|
13869
13982
|
try {
|
|
13870
13983
|
exportExcel.exportJsonToExcel({
|
|
@@ -14112,7 +14225,7 @@ var BaseController = class {
|
|
|
14112
14225
|
};
|
|
14113
14226
|
|
|
14114
14227
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
14115
|
-
import { RuntimeError as
|
|
14228
|
+
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
14116
14229
|
import { isNil as isNil19, mergeRight as mergeRight2 } from "ramda";
|
|
14117
14230
|
var ViewMsgController = class _ViewMsgController {
|
|
14118
14231
|
constructor(msgGroupId) {
|
|
@@ -14138,7 +14251,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
14138
14251
|
(item) => item.id === this.msgGroupId
|
|
14139
14252
|
);
|
|
14140
14253
|
if (!msgGroup) {
|
|
14141
|
-
throw new
|
|
14254
|
+
throw new RuntimeError33("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
|
|
14142
14255
|
}
|
|
14143
14256
|
this.msgGroup = msgGroup;
|
|
14144
14257
|
const msgDetailsViewMsgIds = msgGroup.appViewMsgGroupDetails.map(
|
|
@@ -14152,7 +14265,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
14152
14265
|
}
|
|
14153
14266
|
});
|
|
14154
14267
|
if (msgDetailsViewMsgIds.length) {
|
|
14155
|
-
throw new
|
|
14268
|
+
throw new RuntimeError33(
|
|
14156
14269
|
"\u6CA1\u6709\u627E\u5230".concat(msgDetailsViewMsgIds.join(","), "\u89C6\u56FE\u6D88\u606F\u6A21\u578B")
|
|
14157
14270
|
);
|
|
14158
14271
|
}
|
|
@@ -14582,7 +14695,7 @@ var ViewController = class extends BaseController {
|
|
|
14582
14695
|
async callUIAction(key, args) {
|
|
14583
14696
|
const result = this.call(key, args);
|
|
14584
14697
|
if (result === void 0) {
|
|
14585
|
-
throw new
|
|
14698
|
+
throw new RuntimeError34("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
14586
14699
|
}
|
|
14587
14700
|
return result;
|
|
14588
14701
|
}
|
|
@@ -15265,7 +15378,7 @@ var ControlController = class extends BaseController {
|
|
|
15265
15378
|
};
|
|
15266
15379
|
|
|
15267
15380
|
// src/controller/common/control/md-control.controller.ts
|
|
15268
|
-
import { isElementSame, RuntimeError as
|
|
15381
|
+
import { isElementSame, RuntimeError as RuntimeError35 } from "@ibiz-template/core";
|
|
15269
15382
|
import { debounce } from "lodash-es";
|
|
15270
15383
|
var MDControlController = class extends ControlController {
|
|
15271
15384
|
constructor() {
|
|
@@ -15548,7 +15661,7 @@ var MDControlController = class extends ControlController {
|
|
|
15548
15661
|
async remove(args) {
|
|
15549
15662
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
15550
15663
|
if (!(data == null ? void 0 : data.length)) {
|
|
15551
|
-
throw new
|
|
15664
|
+
throw new RuntimeError35("\u672A\u9009\u4E2D\u6570\u636E");
|
|
15552
15665
|
}
|
|
15553
15666
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
15554
15667
|
const del = await ibiz.confirm.error({
|
|
@@ -15697,7 +15810,7 @@ var MDControlController = class extends ControlController {
|
|
|
15697
15810
|
(importItem) => importItem.id === dedataImportId
|
|
15698
15811
|
);
|
|
15699
15812
|
if (!dataImport) {
|
|
15700
|
-
throw new
|
|
15813
|
+
throw new RuntimeError35("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
|
|
15701
15814
|
}
|
|
15702
15815
|
let importName = "DataImport";
|
|
15703
15816
|
if (dataImport.enableCustomized) {
|
|
@@ -15731,7 +15844,7 @@ var MDControlController = class extends ControlController {
|
|
|
15731
15844
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
15732
15845
|
import {
|
|
15733
15846
|
findRecursiveChild,
|
|
15734
|
-
RuntimeError as
|
|
15847
|
+
RuntimeError as RuntimeError36,
|
|
15735
15848
|
RuntimeModelError as RuntimeModelError26
|
|
15736
15849
|
} from "@ibiz-template/core";
|
|
15737
15850
|
var AppMenuController = class extends ControlController {
|
|
@@ -15800,7 +15913,7 @@ var AppMenuController = class extends ControlController {
|
|
|
15800
15913
|
childrenFields: ["appMenuItems"]
|
|
15801
15914
|
});
|
|
15802
15915
|
if (!menuItem) {
|
|
15803
|
-
throw new
|
|
15916
|
+
throw new RuntimeError36("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
15804
15917
|
}
|
|
15805
15918
|
this.evt.emit("onClick", {
|
|
15806
15919
|
eventArg: id,
|
|
@@ -15929,7 +16042,7 @@ var AppMenuController = class extends ControlController {
|
|
|
15929
16042
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
15930
16043
|
import {
|
|
15931
16044
|
findRecursiveChild as findRecursiveChild2,
|
|
15932
|
-
RuntimeError as
|
|
16045
|
+
RuntimeError as RuntimeError37,
|
|
15933
16046
|
RuntimeModelError as RuntimeModelError27
|
|
15934
16047
|
} from "@ibiz-template/core";
|
|
15935
16048
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
@@ -15939,7 +16052,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
15939
16052
|
childrenFields: ["appMenuItems"]
|
|
15940
16053
|
});
|
|
15941
16054
|
if (!menuItem) {
|
|
15942
|
-
throw new
|
|
16055
|
+
throw new RuntimeError37("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
15943
16056
|
}
|
|
15944
16057
|
this.evt.emit("onClick", {
|
|
15945
16058
|
eventArg: id,
|
|
@@ -15967,7 +16080,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
15967
16080
|
import dayjs3 from "dayjs";
|
|
15968
16081
|
|
|
15969
16082
|
// src/controller/control/calendar/calendar.service.ts
|
|
15970
|
-
import { RuntimeError as
|
|
16083
|
+
import { RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
15971
16084
|
var CalendarService = class extends MDControlService {
|
|
15972
16085
|
/**
|
|
15973
16086
|
* 执行查询多条数据的方法
|
|
@@ -16017,11 +16130,11 @@ var CalendarService = class extends MDControlService {
|
|
|
16017
16130
|
setCalendarConfigData(items, index) {
|
|
16018
16131
|
const { sysCalendarItems } = this.model;
|
|
16019
16132
|
if (!sysCalendarItems) {
|
|
16020
|
-
throw new
|
|
16133
|
+
throw new RuntimeError38("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
16021
16134
|
}
|
|
16022
16135
|
const calendarItem = sysCalendarItems[index];
|
|
16023
16136
|
if (!calendarItem) {
|
|
16024
|
-
throw new
|
|
16137
|
+
throw new RuntimeError38("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
16025
16138
|
}
|
|
16026
16139
|
return items.map((item) => {
|
|
16027
16140
|
return new CalendarItemData(calendarItem, item);
|
|
@@ -16235,11 +16348,11 @@ var CalendarController = class extends MDControlController {
|
|
|
16235
16348
|
};
|
|
16236
16349
|
|
|
16237
16350
|
// src/controller/control/chart/chart.controller.ts
|
|
16238
|
-
import { RuntimeError as
|
|
16351
|
+
import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
|
|
16239
16352
|
|
|
16240
16353
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
16241
16354
|
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
16242
|
-
import { RuntimeError as
|
|
16355
|
+
import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
|
|
16243
16356
|
|
|
16244
16357
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
16245
16358
|
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
@@ -17248,7 +17361,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
17248
17361
|
getChartDataByParams(params) {
|
|
17249
17362
|
const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
|
|
17250
17363
|
if (!generator) {
|
|
17251
|
-
throw new
|
|
17364
|
+
throw new RuntimeError39("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
|
|
17252
17365
|
}
|
|
17253
17366
|
return generator.getChartDataByParams(params);
|
|
17254
17367
|
}
|
|
@@ -17361,10 +17474,10 @@ var ChartController = class extends MDControlController {
|
|
|
17361
17474
|
*/
|
|
17362
17475
|
updateChart() {
|
|
17363
17476
|
if (!this.chart) {
|
|
17364
|
-
throw new
|
|
17477
|
+
throw new RuntimeError40("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
|
|
17365
17478
|
}
|
|
17366
17479
|
if (!this.options) {
|
|
17367
|
-
throw new
|
|
17480
|
+
throw new RuntimeError40("options\u8FD8\u6CA1\u8BA1\u7B97");
|
|
17368
17481
|
}
|
|
17369
17482
|
this.chart.setOption(this.options, { notMerge: true });
|
|
17370
17483
|
this.resizeChart();
|
|
@@ -17402,7 +17515,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
17402
17515
|
};
|
|
17403
17516
|
|
|
17404
17517
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
17405
|
-
import { recursiveIterate as recursiveIterate2, RuntimeError as
|
|
17518
|
+
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
17406
17519
|
|
|
17407
17520
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
17408
17521
|
import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
@@ -17412,7 +17525,7 @@ import { isArray as isArray8 } from "qx-util";
|
|
|
17412
17525
|
import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
17413
17526
|
|
|
17414
17527
|
// src/ui-logic/index.ts
|
|
17415
|
-
import { RuntimeError as
|
|
17528
|
+
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
17416
17529
|
|
|
17417
17530
|
// src/ui-logic/ui-logic.ts
|
|
17418
17531
|
import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
@@ -17963,7 +18076,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
17963
18076
|
};
|
|
17964
18077
|
|
|
17965
18078
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
17966
|
-
import { ModelError as ModelError22, RuntimeError as
|
|
18079
|
+
import { ModelError as ModelError22, RuntimeError as RuntimeError41 } from "@ibiz-template/core";
|
|
17967
18080
|
import { clone as clone21 } from "ramda";
|
|
17968
18081
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
17969
18082
|
async exec(ctx) {
|
|
@@ -18013,7 +18126,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18013
18126
|
setParamValue(nodeParam, ctx) {
|
|
18014
18127
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
18015
18128
|
if (!dstDEUILogicParamId) {
|
|
18016
|
-
throw new
|
|
18129
|
+
throw new RuntimeError41("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
|
|
18017
18130
|
}
|
|
18018
18131
|
let dstField = dstFieldName;
|
|
18019
18132
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
@@ -18130,7 +18243,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18130
18243
|
};
|
|
18131
18244
|
|
|
18132
18245
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
18133
|
-
import { RuntimeError as
|
|
18246
|
+
import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
18134
18247
|
import { isFunction } from "lodash-es";
|
|
18135
18248
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
18136
18249
|
async exec(ctx) {
|
|
@@ -18147,14 +18260,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
18147
18260
|
}
|
|
18148
18261
|
const invokeParam = ctx.params[invokeParamId];
|
|
18149
18262
|
if (!invokeParam) {
|
|
18150
|
-
throw new
|
|
18263
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
18151
18264
|
}
|
|
18152
18265
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
18153
18266
|
if (!invokeCtrl) {
|
|
18154
|
-
throw new
|
|
18267
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
18155
18268
|
}
|
|
18156
18269
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
18157
|
-
throw new
|
|
18270
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
18158
18271
|
}
|
|
18159
18272
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
18160
18273
|
}
|
|
@@ -18380,16 +18493,16 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
18380
18493
|
};
|
|
18381
18494
|
|
|
18382
18495
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
18383
|
-
import { RuntimeError as
|
|
18496
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
18384
18497
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
18385
18498
|
async exec(_ctx) {
|
|
18386
18499
|
const { errorInfo } = this.model;
|
|
18387
|
-
throw new
|
|
18500
|
+
throw new RuntimeError43(errorInfo);
|
|
18388
18501
|
}
|
|
18389
18502
|
};
|
|
18390
18503
|
|
|
18391
18504
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
18392
|
-
import { RuntimeError as
|
|
18505
|
+
import { RuntimeError as RuntimeError44, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
18393
18506
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
18394
18507
|
async exec(ctx) {
|
|
18395
18508
|
ctx.isEndNode = true;
|
|
@@ -18405,18 +18518,18 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
18405
18518
|
}
|
|
18406
18519
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
18407
18520
|
if (!invokeCtrl) {
|
|
18408
|
-
throw new
|
|
18521
|
+
throw new RuntimeError44("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
18409
18522
|
}
|
|
18410
18523
|
const eventParam = ctx.params[eventParamId];
|
|
18411
18524
|
if (!eventParam) {
|
|
18412
|
-
throw new
|
|
18525
|
+
throw new RuntimeError44("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
18413
18526
|
}
|
|
18414
18527
|
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
18415
18528
|
}
|
|
18416
18529
|
};
|
|
18417
18530
|
|
|
18418
18531
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
18419
|
-
import { RuntimeError as
|
|
18532
|
+
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
18420
18533
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
18421
18534
|
async exec(ctx) {
|
|
18422
18535
|
const {
|
|
@@ -18436,7 +18549,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
18436
18549
|
}
|
|
18437
18550
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
18438
18551
|
if (!dstParam) {
|
|
18439
|
-
throw new
|
|
18552
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
18440
18553
|
}
|
|
18441
18554
|
const result = await execDELogicById(
|
|
18442
18555
|
dstAppDELogicId,
|
|
@@ -18759,7 +18872,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18759
18872
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
18760
18873
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
18761
18874
|
if (!deUILogic) {
|
|
18762
|
-
throw new
|
|
18875
|
+
throw new RuntimeError46(
|
|
18763
18876
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
18764
18877
|
);
|
|
18765
18878
|
}
|
|
@@ -18772,7 +18885,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
18772
18885
|
}
|
|
18773
18886
|
|
|
18774
18887
|
// src/ui-action/uiaction-util.ts
|
|
18775
|
-
import { RuntimeError as
|
|
18888
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
18776
18889
|
var UIActionUtil = class {
|
|
18777
18890
|
/**
|
|
18778
18891
|
* 执行界面行为
|
|
@@ -18787,7 +18900,7 @@ var UIActionUtil = class {
|
|
|
18787
18900
|
static async exec(actionId, params, appId2) {
|
|
18788
18901
|
const action = await getUIActionById(actionId, appId2);
|
|
18789
18902
|
if (!action) {
|
|
18790
|
-
throw new
|
|
18903
|
+
throw new RuntimeError47("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
18791
18904
|
}
|
|
18792
18905
|
if (action.actionTarget === "SINGLEDATA") {
|
|
18793
18906
|
const validateResult = await params.view.call("Validate" /* VALIDATE */);
|
|
@@ -19252,7 +19365,7 @@ import {
|
|
|
19252
19365
|
StringUtil,
|
|
19253
19366
|
RuntimeModelError as RuntimeModelError51,
|
|
19254
19367
|
ModelError as ModelError26,
|
|
19255
|
-
RuntimeError as
|
|
19368
|
+
RuntimeError as RuntimeError48
|
|
19256
19369
|
} from "@ibiz-template/core";
|
|
19257
19370
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
19258
19371
|
async execAction(action, args) {
|
|
@@ -19362,7 +19475,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19362
19475
|
if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
|
|
19363
19476
|
requestUrl += "/".concat((_b = appDataEntity.codeName2) == null ? void 0 : _b.toLowerCase(), "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
|
|
19364
19477
|
} else {
|
|
19365
|
-
throw new
|
|
19478
|
+
throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
|
|
19366
19479
|
}
|
|
19367
19480
|
const res = await ibiz.net.request(requestUrl, {
|
|
19368
19481
|
method: "get",
|
|
@@ -19389,10 +19502,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19389
19502
|
window.open(link, "_blank");
|
|
19390
19503
|
}
|
|
19391
19504
|
} else {
|
|
19392
|
-
throw new
|
|
19505
|
+
throw new RuntimeError48("\u6253\u5370\u5931\u8D25");
|
|
19393
19506
|
}
|
|
19394
19507
|
} else {
|
|
19395
|
-
throw new
|
|
19508
|
+
throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
|
|
19396
19509
|
}
|
|
19397
19510
|
}
|
|
19398
19511
|
/**
|
|
@@ -19443,7 +19556,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19443
19556
|
refreshMode: 1
|
|
19444
19557
|
};
|
|
19445
19558
|
}
|
|
19446
|
-
throw new
|
|
19559
|
+
throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
|
|
19447
19560
|
}
|
|
19448
19561
|
/**
|
|
19449
19562
|
* 执行导出行为
|
|
@@ -19494,10 +19607,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19494
19607
|
URL.revokeObjectURL(elink.href);
|
|
19495
19608
|
document.body.removeChild(elink);
|
|
19496
19609
|
} else {
|
|
19497
|
-
throw new
|
|
19610
|
+
throw new RuntimeError48("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
|
|
19498
19611
|
}
|
|
19499
19612
|
} else {
|
|
19500
|
-
throw new
|
|
19613
|
+
throw new RuntimeError48("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
|
|
19501
19614
|
}
|
|
19502
19615
|
}
|
|
19503
19616
|
};
|
|
@@ -19584,7 +19697,7 @@ var ToolbarController = class extends ControlController {
|
|
|
19584
19697
|
const actionId = item.uiactionId;
|
|
19585
19698
|
const uiAction = await getUIActionById(actionId, item.appId);
|
|
19586
19699
|
if (!uiAction) {
|
|
19587
|
-
throw new
|
|
19700
|
+
throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
19588
19701
|
}
|
|
19589
19702
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
19590
19703
|
if (enableLoading) {
|
|
@@ -20644,7 +20757,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20644
20757
|
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
20645
20758
|
|
|
20646
20759
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
20647
|
-
import { RuntimeError as
|
|
20760
|
+
import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
20648
20761
|
var ExpBarControlController = class extends ControlController {
|
|
20649
20762
|
constructor() {
|
|
20650
20763
|
super(...arguments);
|
|
@@ -20842,6 +20955,11 @@ var ExpBarControlController = class extends ControlController {
|
|
|
20842
20955
|
} else {
|
|
20843
20956
|
this.navByFirstItem();
|
|
20844
20957
|
}
|
|
20958
|
+
} else {
|
|
20959
|
+
const data = this.xDataController.state.selectedData;
|
|
20960
|
+
if (data[0]) {
|
|
20961
|
+
this.xDataController.setActive(data[0]);
|
|
20962
|
+
}
|
|
20845
20963
|
}
|
|
20846
20964
|
}
|
|
20847
20965
|
/**
|
|
@@ -20970,7 +21088,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
20970
21088
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
20971
21089
|
return this.XDataModel.navAppViewId;
|
|
20972
21090
|
}
|
|
20973
|
-
throw new
|
|
21091
|
+
throw new RuntimeError50("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
20974
21092
|
}
|
|
20975
21093
|
/**
|
|
20976
21094
|
* 获取导航视图
|
|
@@ -21113,7 +21231,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21113
21231
|
};
|
|
21114
21232
|
|
|
21115
21233
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
21116
|
-
import { RuntimeError as
|
|
21234
|
+
import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
21117
21235
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
21118
21236
|
constructor() {
|
|
21119
21237
|
super(...arguments);
|
|
@@ -21143,6 +21261,21 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21143
21261
|
}
|
|
21144
21262
|
return controller;
|
|
21145
21263
|
}
|
|
21264
|
+
/**
|
|
21265
|
+
* 组件挂载
|
|
21266
|
+
*
|
|
21267
|
+
*/
|
|
21268
|
+
async onMounted() {
|
|
21269
|
+
super.onMounted();
|
|
21270
|
+
if (this.xDataController) {
|
|
21271
|
+
this.xDataController.evt.on("onAfterRefreshParent", (_event) => {
|
|
21272
|
+
const data = this.xDataController.state.selectedData;
|
|
21273
|
+
if (data[0]) {
|
|
21274
|
+
this.xDataController.setActive(data[0]);
|
|
21275
|
+
}
|
|
21276
|
+
});
|
|
21277
|
+
}
|
|
21278
|
+
}
|
|
21146
21279
|
/**
|
|
21147
21280
|
* 获取指定节点模型
|
|
21148
21281
|
*
|
|
@@ -21187,7 +21320,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21187
21320
|
const deData = node._deData || node;
|
|
21188
21321
|
const nodeModel = this.getNodeModel(node._nodeId);
|
|
21189
21322
|
if (!nodeModel) {
|
|
21190
|
-
throw new
|
|
21323
|
+
throw new RuntimeError51("\u627E\u4E0D\u5230".concat(node._nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
21191
21324
|
}
|
|
21192
21325
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
21193
21326
|
result.context.currentSrfNav = nodeId;
|
|
@@ -21378,7 +21511,7 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
21378
21511
|
};
|
|
21379
21512
|
|
|
21380
21513
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
21381
|
-
import { RuntimeError as
|
|
21514
|
+
import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
21382
21515
|
|
|
21383
21516
|
// src/controller/control/form/form/form.controller.ts
|
|
21384
21517
|
import {
|
|
@@ -21949,7 +22082,7 @@ var SearchFormController = class extends FormController {
|
|
|
21949
22082
|
applyStoredFilter(index) {
|
|
21950
22083
|
const filter = this.state.storedFilters[index];
|
|
21951
22084
|
if (!filter) {
|
|
21952
|
-
throw new
|
|
22085
|
+
throw new RuntimeError52("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
|
|
21953
22086
|
}
|
|
21954
22087
|
if (filter.data) {
|
|
21955
22088
|
Object.assign(this.data, filter.data);
|
|
@@ -21965,7 +22098,7 @@ var SearchFormController = class extends FormController {
|
|
|
21965
22098
|
async removeStoredFilter(index) {
|
|
21966
22099
|
const filter = this.state.storedFilters[index];
|
|
21967
22100
|
if (!filter) {
|
|
21968
|
-
throw new
|
|
22101
|
+
throw new RuntimeError52("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
|
|
21969
22102
|
}
|
|
21970
22103
|
this.state.storedFilters.splice(index, 1);
|
|
21971
22104
|
await this.saveConfig();
|
|
@@ -23254,7 +23387,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
23254
23387
|
};
|
|
23255
23388
|
|
|
23256
23389
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
23257
|
-
import { RuntimeError as
|
|
23390
|
+
import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
|
|
23258
23391
|
import { createUUID as createUUID11 } from "qx-util";
|
|
23259
23392
|
|
|
23260
23393
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -23371,7 +23504,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
23371
23504
|
async remove(id) {
|
|
23372
23505
|
const controller = this.formMap.get(id);
|
|
23373
23506
|
if (!controller) {
|
|
23374
|
-
throw new
|
|
23507
|
+
throw new RuntimeError53("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
23375
23508
|
}
|
|
23376
23509
|
await controller.remove();
|
|
23377
23510
|
const index = this.state.items.findIndex((item) => item.id === id);
|
|
@@ -23673,7 +23806,7 @@ var FormTabPanelController = class extends FormDetailController {
|
|
|
23673
23806
|
import {
|
|
23674
23807
|
awaitTimeout,
|
|
23675
23808
|
mergeInLeft as mergeInLeft2,
|
|
23676
|
-
RuntimeError as
|
|
23809
|
+
RuntimeError as RuntimeError54
|
|
23677
23810
|
} from "@ibiz-template/core";
|
|
23678
23811
|
import { debounce as debounce2 } from "lodash-es";
|
|
23679
23812
|
import { createUUID as createUUID12 } from "qx-util";
|
|
@@ -24138,7 +24271,7 @@ var EditFormController = class extends FormController {
|
|
|
24138
24271
|
}
|
|
24139
24272
|
const isValid = await this.validate();
|
|
24140
24273
|
if (!isValid) {
|
|
24141
|
-
throw new
|
|
24274
|
+
throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
24142
24275
|
}
|
|
24143
24276
|
if (!silent) {
|
|
24144
24277
|
await this.startLoading();
|
|
@@ -24261,7 +24394,7 @@ var EditFormController = class extends FormController {
|
|
|
24261
24394
|
(item) => item.id === formItemUpdateId
|
|
24262
24395
|
);
|
|
24263
24396
|
if (!formItemUpdate) {
|
|
24264
|
-
throw new
|
|
24397
|
+
throw new RuntimeError54("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
24265
24398
|
}
|
|
24266
24399
|
const {
|
|
24267
24400
|
appDEMethodId,
|
|
@@ -24320,7 +24453,7 @@ var EditFormController = class extends FormController {
|
|
|
24320
24453
|
async wfStart(args) {
|
|
24321
24454
|
const isValid = await this.validate();
|
|
24322
24455
|
if (!isValid) {
|
|
24323
|
-
throw new
|
|
24456
|
+
throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
24324
24457
|
}
|
|
24325
24458
|
await this.startLoading();
|
|
24326
24459
|
const { context, params } = this.handlerAbilityParams(args);
|
|
@@ -24349,7 +24482,7 @@ var EditFormController = class extends FormController {
|
|
|
24349
24482
|
async wfSubmit(args) {
|
|
24350
24483
|
const isValid = await this.validate();
|
|
24351
24484
|
if (!isValid) {
|
|
24352
|
-
throw new
|
|
24485
|
+
throw new RuntimeError54("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
24353
24486
|
}
|
|
24354
24487
|
await this.startLoading();
|
|
24355
24488
|
const { context, params } = this.handlerAbilityParams(args);
|
|
@@ -24665,7 +24798,7 @@ import {
|
|
|
24665
24798
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
24666
24799
|
mergeDefaultInLeft,
|
|
24667
24800
|
recursiveIterate as recursiveIterate7,
|
|
24668
|
-
RuntimeError as
|
|
24801
|
+
RuntimeError as RuntimeError55,
|
|
24669
24802
|
RuntimeModelError as RuntimeModelError61
|
|
24670
24803
|
} from "@ibiz-template/core";
|
|
24671
24804
|
import { clone as clone25 } from "ramda";
|
|
@@ -25191,7 +25324,7 @@ var GridController = class extends MDControlController {
|
|
|
25191
25324
|
if (editShowMode === "row") {
|
|
25192
25325
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
25193
25326
|
if (editingRow) {
|
|
25194
|
-
throw new
|
|
25327
|
+
throw new RuntimeError55("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
25195
25328
|
}
|
|
25196
25329
|
}
|
|
25197
25330
|
const queryParams = { ...this.params };
|
|
@@ -25232,7 +25365,7 @@ var GridController = class extends MDControlController {
|
|
|
25232
25365
|
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
25233
25366
|
const rowState = this.findRowState(data);
|
|
25234
25367
|
if (!rowState) {
|
|
25235
|
-
throw new
|
|
25368
|
+
throw new RuntimeError55("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
25236
25369
|
}
|
|
25237
25370
|
if (!rowState.modified) {
|
|
25238
25371
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -25244,7 +25377,7 @@ var GridController = class extends MDControlController {
|
|
|
25244
25377
|
}
|
|
25245
25378
|
const isValid = await this.validate(rowState);
|
|
25246
25379
|
if (!isValid) {
|
|
25247
|
-
throw new
|
|
25380
|
+
throw new RuntimeError55("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
25248
25381
|
}
|
|
25249
25382
|
let res;
|
|
25250
25383
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
@@ -25457,7 +25590,7 @@ var GridController = class extends MDControlController {
|
|
|
25457
25590
|
}
|
|
25458
25591
|
async toggleRowEdit() {
|
|
25459
25592
|
if (!this.model.enableRowNew) {
|
|
25460
|
-
throw new
|
|
25593
|
+
throw new RuntimeError55("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
25461
25594
|
}
|
|
25462
25595
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
25463
25596
|
}
|
|
@@ -25490,7 +25623,7 @@ var GridController = class extends MDControlController {
|
|
|
25490
25623
|
} else {
|
|
25491
25624
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
25492
25625
|
if (editingRow) {
|
|
25493
|
-
throw new
|
|
25626
|
+
throw new RuntimeError55("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
25494
25627
|
}
|
|
25495
25628
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
25496
25629
|
row.cacheData = clone25(row.data);
|
|
@@ -25545,7 +25678,7 @@ var GridController = class extends MDControlController {
|
|
|
25545
25678
|
(item) => item.id === updateId
|
|
25546
25679
|
);
|
|
25547
25680
|
if (!findUpdate) {
|
|
25548
|
-
throw new
|
|
25681
|
+
throw new RuntimeError55("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
25549
25682
|
}
|
|
25550
25683
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
25551
25684
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -25701,7 +25834,7 @@ var GridController = class extends MDControlController {
|
|
|
25701
25834
|
data2 = this.getData();
|
|
25702
25835
|
}
|
|
25703
25836
|
if (data2.length === 0) {
|
|
25704
|
-
throw new
|
|
25837
|
+
throw new RuntimeError55("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
25705
25838
|
}
|
|
25706
25839
|
return formatExcelData(data2);
|
|
25707
25840
|
};
|
|
@@ -26267,7 +26400,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
26267
26400
|
};
|
|
26268
26401
|
|
|
26269
26402
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
26270
|
-
import { RuntimeError as
|
|
26403
|
+
import { RuntimeError as RuntimeError56 } from "@ibiz-template/core";
|
|
26271
26404
|
import Schema2 from "async-validator";
|
|
26272
26405
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
26273
26406
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -26407,7 +26540,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
26407
26540
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
26408
26541
|
const result = await this.validate(row);
|
|
26409
26542
|
if (!result) {
|
|
26410
|
-
throw new
|
|
26543
|
+
throw new RuntimeError56(
|
|
26411
26544
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
26412
26545
|
);
|
|
26413
26546
|
}
|
|
@@ -26705,7 +26838,7 @@ var ListController = class extends MDControlController {
|
|
|
26705
26838
|
};
|
|
26706
26839
|
|
|
26707
26840
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
26708
|
-
import { recursiveIterate as recursiveIterate8, RuntimeError as
|
|
26841
|
+
import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError57 } from "@ibiz-template/core";
|
|
26709
26842
|
var PanelController = class extends ControlController {
|
|
26710
26843
|
constructor(model, context, params, ctx, container) {
|
|
26711
26844
|
super(model, context, params, ctx);
|
|
@@ -26829,7 +26962,7 @@ var PanelController = class extends ControlController {
|
|
|
26829
26962
|
var _a, _b;
|
|
26830
26963
|
const data = await this.prepareData();
|
|
26831
26964
|
if (!data) {
|
|
26832
|
-
throw new
|
|
26965
|
+
throw new RuntimeError57("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
26833
26966
|
}
|
|
26834
26967
|
const panelData = this.convertData(data);
|
|
26835
26968
|
(_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
|
|
@@ -27425,7 +27558,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
27425
27558
|
|
|
27426
27559
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
27427
27560
|
import {
|
|
27428
|
-
RuntimeError as
|
|
27561
|
+
RuntimeError as RuntimeError58,
|
|
27429
27562
|
mergeInLeft as mergeInLeft3,
|
|
27430
27563
|
recursiveIterate as recursiveIterate9
|
|
27431
27564
|
} from "@ibiz-template/core";
|
|
@@ -28146,7 +28279,7 @@ var SearchBarController = class extends ControlController {
|
|
|
28146
28279
|
value: data.value || null
|
|
28147
28280
|
};
|
|
28148
28281
|
}
|
|
28149
|
-
throw new
|
|
28282
|
+
throw new RuntimeError58("\u65E0\u6548\u7684condtype:".concat(data.condtype));
|
|
28150
28283
|
}
|
|
28151
28284
|
/**
|
|
28152
28285
|
* 获取初始过滤项树节点数据集合
|
|
@@ -28575,7 +28708,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
28575
28708
|
|
|
28576
28709
|
// src/controller/control/tree/tree.controller.ts
|
|
28577
28710
|
import {
|
|
28578
|
-
RuntimeError as
|
|
28711
|
+
RuntimeError as RuntimeError59,
|
|
28579
28712
|
RuntimeModelError as RuntimeModelError64,
|
|
28580
28713
|
recursiveIterate as recursiveIterate10
|
|
28581
28714
|
} from "@ibiz-template/core";
|
|
@@ -29569,7 +29702,7 @@ var TreeController = class extends MDControlController {
|
|
|
29569
29702
|
throw new RuntimeModelError64(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
|
|
29570
29703
|
}
|
|
29571
29704
|
if (nodeData._nodeType !== "DE") {
|
|
29572
|
-
throw new
|
|
29705
|
+
throw new RuntimeError59("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
|
|
29573
29706
|
}
|
|
29574
29707
|
nodeData._text = text;
|
|
29575
29708
|
await this.updateDeNodeData([nodeData]);
|
|
@@ -29577,7 +29710,7 @@ var TreeController = class extends MDControlController {
|
|
|
29577
29710
|
};
|
|
29578
29711
|
|
|
29579
29712
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
29580
|
-
import { RuntimeError as
|
|
29713
|
+
import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
|
|
29581
29714
|
|
|
29582
29715
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
29583
29716
|
var WizardPanelService = class extends ControlService {
|
|
@@ -29743,7 +29876,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
29743
29876
|
const { activeFormTag } = this.state;
|
|
29744
29877
|
const controller = this.formControllers.get(activeFormTag);
|
|
29745
29878
|
if (!controller) {
|
|
29746
|
-
throw new
|
|
29879
|
+
throw new RuntimeError60("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
29747
29880
|
}
|
|
29748
29881
|
return controller;
|
|
29749
29882
|
}
|
|
@@ -29785,7 +29918,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
29785
29918
|
getWizardFormByTag(tag) {
|
|
29786
29919
|
var _a;
|
|
29787
29920
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
29788
|
-
throw new
|
|
29921
|
+
throw new RuntimeError60("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
|
|
29789
29922
|
return;
|
|
29790
29923
|
}
|
|
29791
29924
|
const wizardForm = this.model.dewizard.dewizardForms.find(
|
|
@@ -29794,7 +29927,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
29794
29927
|
}
|
|
29795
29928
|
);
|
|
29796
29929
|
if (!wizardForm) {
|
|
29797
|
-
throw new
|
|
29930
|
+
throw new RuntimeError60("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
29798
29931
|
}
|
|
29799
29932
|
return wizardForm;
|
|
29800
29933
|
}
|
|
@@ -29865,7 +29998,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
29865
29998
|
prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
29866
29999
|
}
|
|
29867
30000
|
if (!prevTag) {
|
|
29868
|
-
throw new
|
|
30001
|
+
throw new RuntimeError60("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
29869
30002
|
}
|
|
29870
30003
|
this.state.activeFormTag = prevTag;
|
|
29871
30004
|
}
|
|
@@ -29901,7 +30034,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
29901
30034
|
});
|
|
29902
30035
|
const nextWizardStep = wizardSteps[index + 1];
|
|
29903
30036
|
if (!nextWizardStep) {
|
|
29904
|
-
throw new
|
|
30037
|
+
throw new RuntimeError60("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
29905
30038
|
}
|
|
29906
30039
|
const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
|
|
29907
30040
|
if (nextWizardForm && nextWizardForm.formTag) {
|
|
@@ -29910,7 +30043,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
29910
30043
|
}
|
|
29911
30044
|
}
|
|
29912
30045
|
if (!nextTag) {
|
|
29913
|
-
throw new
|
|
30046
|
+
throw new RuntimeError60("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
29914
30047
|
}
|
|
29915
30048
|
this.state.activeFormTag = nextTag;
|
|
29916
30049
|
this.tagHistory.push(nextTag);
|
|
@@ -30233,7 +30366,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
30233
30366
|
};
|
|
30234
30367
|
|
|
30235
30368
|
// src/controller/control/kanban/kanban.controller.ts
|
|
30236
|
-
import { RuntimeError as
|
|
30369
|
+
import { RuntimeError as RuntimeError61, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
30237
30370
|
import { isNil as isNil27 } from "ramda";
|
|
30238
30371
|
|
|
30239
30372
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -30324,7 +30457,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30324
30457
|
} else {
|
|
30325
30458
|
const toNum = Number(sortValue);
|
|
30326
30459
|
if (Number.isNaN(toNum)) {
|
|
30327
|
-
throw new
|
|
30460
|
+
throw new RuntimeError61(
|
|
30328
30461
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
30329
30462
|
);
|
|
30330
30463
|
}
|
|
@@ -30410,7 +30543,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30410
30543
|
}
|
|
30411
30544
|
handleDataGroup() {
|
|
30412
30545
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
30413
|
-
throw new
|
|
30546
|
+
throw new RuntimeError61("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
30414
30547
|
}
|
|
30415
30548
|
return super.handleDataGroup();
|
|
30416
30549
|
}
|
|
@@ -30753,7 +30886,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
30753
30886
|
|
|
30754
30887
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
30755
30888
|
import {
|
|
30756
|
-
RuntimeError as
|
|
30889
|
+
RuntimeError as RuntimeError62,
|
|
30757
30890
|
RuntimeModelError as RuntimeModelError67,
|
|
30758
30891
|
awaitTimeout as awaitTimeout3,
|
|
30759
30892
|
recursiveIterate as recursiveIterate11
|
|
@@ -31013,11 +31146,11 @@ var TreeGridExController = class extends TreeController {
|
|
|
31013
31146
|
return;
|
|
31014
31147
|
}
|
|
31015
31148
|
if (nodeData._nodeType !== "DE") {
|
|
31016
|
-
throw new
|
|
31149
|
+
throw new RuntimeError62("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
|
|
31017
31150
|
}
|
|
31018
31151
|
const rowState = this.state.rows[nodeData._uuid];
|
|
31019
31152
|
if (!rowState) {
|
|
31020
|
-
throw new
|
|
31153
|
+
throw new RuntimeError62("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
31021
31154
|
}
|
|
31022
31155
|
if (!rowState.modified) {
|
|
31023
31156
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -31031,7 +31164,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
31031
31164
|
const { appDataEntityId, updateAppDEActionId } = nodeModel;
|
|
31032
31165
|
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
31033
31166
|
if (isCreate) {
|
|
31034
|
-
throw new
|
|
31167
|
+
throw new RuntimeError62("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
|
|
31035
31168
|
}
|
|
31036
31169
|
if (!updateAppDEActionId) {
|
|
31037
31170
|
throw new RuntimeModelError67(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
|
|
@@ -31191,7 +31324,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
31191
31324
|
(item) => item.showRowEdit
|
|
31192
31325
|
);
|
|
31193
31326
|
if (editingRow) {
|
|
31194
|
-
throw new
|
|
31327
|
+
throw new RuntimeError62("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
31195
31328
|
}
|
|
31196
31329
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
31197
31330
|
row.cacheData = clone28(row.data);
|
|
@@ -31304,7 +31437,7 @@ var TreeGridExColumnController = class {
|
|
|
31304
31437
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
|
|
31305
31438
|
import {
|
|
31306
31439
|
DataTypes as DataTypes5,
|
|
31307
|
-
RuntimeError as
|
|
31440
|
+
RuntimeError as RuntimeError63,
|
|
31308
31441
|
RuntimeModelError as RuntimeModelError68
|
|
31309
31442
|
} from "@ibiz-template/core";
|
|
31310
31443
|
import { clone as clone29 } from "ramda";
|
|
@@ -31505,7 +31638,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
31505
31638
|
const valueItem = this.nodeColumn.linkValueItem || "srfkey";
|
|
31506
31639
|
const value = row.data[valueItem];
|
|
31507
31640
|
if (value == null) {
|
|
31508
|
-
throw new
|
|
31641
|
+
throw new RuntimeError63("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
|
|
31509
31642
|
}
|
|
31510
31643
|
const { linkAppViewId } = this.nodeColumn;
|
|
31511
31644
|
if (!linkAppViewId) {
|
|
@@ -31938,7 +32071,7 @@ var TreeGridService = class extends GridService {
|
|
|
31938
32071
|
};
|
|
31939
32072
|
|
|
31940
32073
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
31941
|
-
import { RuntimeError as
|
|
32074
|
+
import { RuntimeError as RuntimeError64 } from "@ibiz-template/core";
|
|
31942
32075
|
import { createUUID as createUUID13 } from "qx-util";
|
|
31943
32076
|
|
|
31944
32077
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -32154,7 +32287,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
32154
32287
|
(item) => item.id === id
|
|
32155
32288
|
);
|
|
32156
32289
|
if (panelUiItemIndex < 0) {
|
|
32157
|
-
throw new
|
|
32290
|
+
throw new RuntimeError64("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
32158
32291
|
}
|
|
32159
32292
|
const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
|
|
32160
32293
|
if (tempUiItem.id.startsWith("mockId:")) {
|
|
@@ -33034,6 +33167,207 @@ var HubController = class {
|
|
|
33034
33167
|
}
|
|
33035
33168
|
};
|
|
33036
33169
|
|
|
33170
|
+
// src/controller/notification/async-action.controller.ts
|
|
33171
|
+
import { QXEvent as QXEvent7 } from "qx-util";
|
|
33172
|
+
import { clone as clone30 } from "ramda";
|
|
33173
|
+
import { isNil as isNil28, isNumber as isNumber2 } from "lodash-es";
|
|
33174
|
+
import dayjs7 from "dayjs";
|
|
33175
|
+
var AsyncActionController = class {
|
|
33176
|
+
constructor() {
|
|
33177
|
+
this.evt = new QXEvent7();
|
|
33178
|
+
this.total = 0;
|
|
33179
|
+
this.actions = [];
|
|
33180
|
+
/**
|
|
33181
|
+
* 正在处理中的数量
|
|
33182
|
+
* @author lxm
|
|
33183
|
+
* @date 2024-01-25 04:51:18
|
|
33184
|
+
* @type {number}
|
|
33185
|
+
*/
|
|
33186
|
+
this.doingNum = 0;
|
|
33187
|
+
/**
|
|
33188
|
+
* 结束的状态值集合
|
|
33189
|
+
* @author lxm
|
|
33190
|
+
* @date 2024-01-25 05:08:26
|
|
33191
|
+
* @protected
|
|
33192
|
+
*/
|
|
33193
|
+
this.finishedStates = [30, 40];
|
|
33194
|
+
/**
|
|
33195
|
+
* 请求服务
|
|
33196
|
+
* @author lxm
|
|
33197
|
+
* @date 2024-01-25 04:50:12
|
|
33198
|
+
* @protected
|
|
33199
|
+
*/
|
|
33200
|
+
this.service = new AsyncActionService();
|
|
33201
|
+
}
|
|
33202
|
+
async init() {
|
|
33203
|
+
this.listenMessage();
|
|
33204
|
+
}
|
|
33205
|
+
/**
|
|
33206
|
+
* 监听全局的实时消息
|
|
33207
|
+
* @author lxm
|
|
33208
|
+
* @date 2024-01-25 04:47:36
|
|
33209
|
+
*/
|
|
33210
|
+
listenMessage() {
|
|
33211
|
+
ibiz.mc.command.asyncAction.on(async (msg) => {
|
|
33212
|
+
if (!msg.data || msg.subtype !== "ASYNCACTION") {
|
|
33213
|
+
return;
|
|
33214
|
+
}
|
|
33215
|
+
const asyncAction = this.formatAsyncAction(
|
|
33216
|
+
msg.data
|
|
33217
|
+
);
|
|
33218
|
+
const findIndex2 = this.actions.findIndex(
|
|
33219
|
+
(item) => item.asyncacitonid === asyncAction.asyncacitonid
|
|
33220
|
+
);
|
|
33221
|
+
if (findIndex2 === -1) {
|
|
33222
|
+
this.add(asyncAction);
|
|
33223
|
+
} else {
|
|
33224
|
+
this.update(asyncAction);
|
|
33225
|
+
}
|
|
33226
|
+
});
|
|
33227
|
+
}
|
|
33228
|
+
/**
|
|
33229
|
+
* 格式化数据
|
|
33230
|
+
* @author lxm
|
|
33231
|
+
* @date 2024-01-25 05:03:47
|
|
33232
|
+
* @protected
|
|
33233
|
+
* @param {IPortalAsyncAction} data
|
|
33234
|
+
* @return {*} {IPortalAsyncAction}
|
|
33235
|
+
*/
|
|
33236
|
+
formatAsyncAction(data) {
|
|
33237
|
+
const dateFields = [
|
|
33238
|
+
"begintime",
|
|
33239
|
+
"endtime",
|
|
33240
|
+
"createdate",
|
|
33241
|
+
"updatedate"
|
|
33242
|
+
];
|
|
33243
|
+
dateFields.forEach((key) => {
|
|
33244
|
+
if (isNumber2(data[key])) {
|
|
33245
|
+
data[key] = dayjs7(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
33246
|
+
}
|
|
33247
|
+
});
|
|
33248
|
+
if (!isNil28(data.actionresult)) {
|
|
33249
|
+
try {
|
|
33250
|
+
const json = JSON.parse(data.actionresult);
|
|
33251
|
+
data.actionresult = json;
|
|
33252
|
+
} catch (error) {
|
|
33253
|
+
}
|
|
33254
|
+
}
|
|
33255
|
+
if (!isNil28(data.completionrate)) {
|
|
33256
|
+
const num = Number(data.completionrate);
|
|
33257
|
+
if (Number.isNaN(num)) {
|
|
33258
|
+
data.completionrate = void 0;
|
|
33259
|
+
} else {
|
|
33260
|
+
data.completionrate = num;
|
|
33261
|
+
}
|
|
33262
|
+
}
|
|
33263
|
+
return data;
|
|
33264
|
+
}
|
|
33265
|
+
/**
|
|
33266
|
+
* 添加一条新消息
|
|
33267
|
+
* @author lxm
|
|
33268
|
+
* @date 2024-01-25 04:58:37
|
|
33269
|
+
* @protected
|
|
33270
|
+
* @param {IPortalAsyncAction} action
|
|
33271
|
+
*/
|
|
33272
|
+
add(action) {
|
|
33273
|
+
this.actions.unshift(action);
|
|
33274
|
+
if (!this.finishedStates.includes(action.actionstate)) {
|
|
33275
|
+
this.doingNum += 1;
|
|
33276
|
+
ibiz.notice.showDoingNotice({ num: this.doingNum });
|
|
33277
|
+
} else {
|
|
33278
|
+
this.noticeResult(action);
|
|
33279
|
+
}
|
|
33280
|
+
this.evt.emit("add", clone30(action));
|
|
33281
|
+
this.evt.emit("dataChange");
|
|
33282
|
+
}
|
|
33283
|
+
/**
|
|
33284
|
+
* 添加一条新消息
|
|
33285
|
+
* @author lxm
|
|
33286
|
+
* @date 2024-01-25 04:58:37
|
|
33287
|
+
* @protected
|
|
33288
|
+
* @param {IPortalAsyncAction} action
|
|
33289
|
+
*/
|
|
33290
|
+
update(action) {
|
|
33291
|
+
const index = this.actions.findIndex(
|
|
33292
|
+
(item) => item.asyncacitonid === action.asyncacitonid
|
|
33293
|
+
);
|
|
33294
|
+
this.actions.splice(index, 1, action);
|
|
33295
|
+
if (this.finishedStates.includes(action.actionstate)) {
|
|
33296
|
+
this.doingNum -= 1;
|
|
33297
|
+
if (this.doingNum <= 0) {
|
|
33298
|
+
ibiz.notice.closeDoingNotice();
|
|
33299
|
+
}
|
|
33300
|
+
this.noticeResult(action);
|
|
33301
|
+
}
|
|
33302
|
+
this.evt.emit("change", clone30(action));
|
|
33303
|
+
this.evt.emit("dataChange");
|
|
33304
|
+
}
|
|
33305
|
+
noticeResult(action) {
|
|
33306
|
+
ibiz.notice.showAsyncAction(action);
|
|
33307
|
+
}
|
|
33308
|
+
};
|
|
33309
|
+
|
|
33310
|
+
// src/controller/notification/internal-message.controller.ts
|
|
33311
|
+
import { QXEvent as QXEvent8 } from "qx-util";
|
|
33312
|
+
var InternalMessageController = class {
|
|
33313
|
+
constructor() {
|
|
33314
|
+
this.evt = new QXEvent8();
|
|
33315
|
+
this.total = 0;
|
|
33316
|
+
/**
|
|
33317
|
+
* 当前分页
|
|
33318
|
+
* @author lxm
|
|
33319
|
+
* @date 2024-01-26 10:06:28
|
|
33320
|
+
* @type {number}
|
|
33321
|
+
*/
|
|
33322
|
+
this.page = 0;
|
|
33323
|
+
this.size = 20;
|
|
33324
|
+
this.messages = [];
|
|
33325
|
+
this.service = new InternalMessageService();
|
|
33326
|
+
}
|
|
33327
|
+
async init() {
|
|
33328
|
+
this.load();
|
|
33329
|
+
}
|
|
33330
|
+
async load() {
|
|
33331
|
+
await this.fetch(false);
|
|
33332
|
+
}
|
|
33333
|
+
async loadMore() {
|
|
33334
|
+
await this.fetch(true);
|
|
33335
|
+
}
|
|
33336
|
+
async fetch(loadMore = false) {
|
|
33337
|
+
if (loadMore === false) {
|
|
33338
|
+
this.page = 0;
|
|
33339
|
+
} else {
|
|
33340
|
+
this.page += 1;
|
|
33341
|
+
}
|
|
33342
|
+
const fetchParams = {
|
|
33343
|
+
page: this.page,
|
|
33344
|
+
size: this.size,
|
|
33345
|
+
sort: "update_time,desc"
|
|
33346
|
+
};
|
|
33347
|
+
const res = await this.service.fetch(fetchParams);
|
|
33348
|
+
this.total = res.total;
|
|
33349
|
+
if (loadMore) {
|
|
33350
|
+
this.messages.push(...res.data);
|
|
33351
|
+
} else {
|
|
33352
|
+
this.messages = res.data;
|
|
33353
|
+
}
|
|
33354
|
+
this.evt.emit("dataChange");
|
|
33355
|
+
}
|
|
33356
|
+
};
|
|
33357
|
+
|
|
33358
|
+
// src/controller/notification/notice.controller.ts
|
|
33359
|
+
var NoticeController = class {
|
|
33360
|
+
constructor() {
|
|
33361
|
+
this.total = 0;
|
|
33362
|
+
this.asyncAction = new AsyncActionController();
|
|
33363
|
+
this.internalMessage = new InternalMessageController();
|
|
33364
|
+
}
|
|
33365
|
+
async init() {
|
|
33366
|
+
await this.internalMessage.init();
|
|
33367
|
+
await this.asyncAction.init();
|
|
33368
|
+
}
|
|
33369
|
+
};
|
|
33370
|
+
|
|
33037
33371
|
// src/app-hub.ts
|
|
33038
33372
|
var AppHub = class {
|
|
33039
33373
|
constructor() {
|
|
@@ -33103,6 +33437,7 @@ var AppHub = class {
|
|
|
33103
33437
|
* @date 2023-07-03 07:12:05
|
|
33104
33438
|
*/
|
|
33105
33439
|
this.config = new AppConfigService();
|
|
33440
|
+
this.notice = new NoticeController();
|
|
33106
33441
|
/**
|
|
33107
33442
|
* 默认首页视图名称
|
|
33108
33443
|
*
|
|
@@ -33236,7 +33571,7 @@ var AppHub = class {
|
|
|
33236
33571
|
this.registerAppView(appView);
|
|
33237
33572
|
return appView;
|
|
33238
33573
|
}
|
|
33239
|
-
throw new
|
|
33574
|
+
throw new RuntimeError65("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
33240
33575
|
}
|
|
33241
33576
|
/**
|
|
33242
33577
|
* 根据视图模型路径,加参数重新计算视图模型
|
|
@@ -33257,7 +33592,7 @@ var AppHub = class {
|
|
|
33257
33592
|
);
|
|
33258
33593
|
return model;
|
|
33259
33594
|
}
|
|
33260
|
-
throw new
|
|
33595
|
+
throw new RuntimeError65("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
|
|
33261
33596
|
}
|
|
33262
33597
|
/**
|
|
33263
33598
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -33288,7 +33623,7 @@ var AppHub = class {
|
|
|
33288
33623
|
this.registerAppDataEntity(entity, appId2);
|
|
33289
33624
|
return entity;
|
|
33290
33625
|
}
|
|
33291
|
-
throw new
|
|
33626
|
+
throw new RuntimeError65("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
33292
33627
|
}
|
|
33293
33628
|
/**
|
|
33294
33629
|
* 新建 hub 应用
|
|
@@ -33303,7 +33638,7 @@ var AppHub = class {
|
|
|
33303
33638
|
return this.appMap.get(id);
|
|
33304
33639
|
}
|
|
33305
33640
|
if (!this.modelLoaderProvider) {
|
|
33306
|
-
throw new
|
|
33641
|
+
throw new RuntimeError65("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
|
|
33307
33642
|
}
|
|
33308
33643
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
33309
33644
|
const app = new Application(appModel);
|
|
@@ -33434,7 +33769,7 @@ var EngineFactory = class {
|
|
|
33434
33769
|
};
|
|
33435
33770
|
|
|
33436
33771
|
// src/engine/view-base.engine.ts
|
|
33437
|
-
import { RuntimeError as
|
|
33772
|
+
import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
|
|
33438
33773
|
var ViewEngineBase = class {
|
|
33439
33774
|
/**
|
|
33440
33775
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -33622,7 +33957,7 @@ var ViewEngineBase = class {
|
|
|
33622
33957
|
const { appDataEntityId } = this.view.model;
|
|
33623
33958
|
const { evt, context, params } = this.view;
|
|
33624
33959
|
if (!appDataEntityId) {
|
|
33625
|
-
throw new
|
|
33960
|
+
throw new RuntimeError66("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
33626
33961
|
}
|
|
33627
33962
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
33628
33963
|
const res = await app.deService.exec(
|
|
@@ -33644,7 +33979,7 @@ var ViewEngineBase = class {
|
|
|
33644
33979
|
|
|
33645
33980
|
// src/engine/md-view.engine.ts
|
|
33646
33981
|
import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
|
|
33647
|
-
import { clone as
|
|
33982
|
+
import { clone as clone31 } from "ramda";
|
|
33648
33983
|
var MDViewEngine = class extends ViewEngineBase {
|
|
33649
33984
|
/**
|
|
33650
33985
|
* 多数据部件名称
|
|
@@ -33856,7 +34191,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
33856
34191
|
if (!openAppViewLogic) {
|
|
33857
34192
|
throw new RuntimeModelError70(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
33858
34193
|
}
|
|
33859
|
-
const params =
|
|
34194
|
+
const params = clone31(this.view.params);
|
|
33860
34195
|
if (copyMode) {
|
|
33861
34196
|
params.srfcopymode = copyMode;
|
|
33862
34197
|
}
|
|
@@ -34051,6 +34386,14 @@ var GlobalUtil = class {
|
|
|
34051
34386
|
* @memberof GlobalUtil
|
|
34052
34387
|
*/
|
|
34053
34388
|
this.anime = new AnimeUtil();
|
|
34389
|
+
/**
|
|
34390
|
+
* 文件工具类
|
|
34391
|
+
*
|
|
34392
|
+
* @author zk
|
|
34393
|
+
* @date 2024-01-26 04:01:24
|
|
34394
|
+
* @memberof GlobalUtil
|
|
34395
|
+
*/
|
|
34396
|
+
this.file = new FileUtil();
|
|
34054
34397
|
this.error.register(new DefaultErrorHandler());
|
|
34055
34398
|
}
|
|
34056
34399
|
/**
|
|
@@ -34082,7 +34425,7 @@ var GlobalUtil = class {
|
|
|
34082
34425
|
};
|
|
34083
34426
|
|
|
34084
34427
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
34085
|
-
import { RuntimeError as
|
|
34428
|
+
import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
|
|
34086
34429
|
var LogicExecutor = class {
|
|
34087
34430
|
/**
|
|
34088
34431
|
* @author lxm
|
|
@@ -34103,7 +34446,7 @@ var LogicExecutor = class {
|
|
|
34103
34446
|
*/
|
|
34104
34447
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34105
34448
|
execute(_executeParams) {
|
|
34106
|
-
throw new
|
|
34449
|
+
throw new RuntimeError67("Method not implemented.");
|
|
34107
34450
|
}
|
|
34108
34451
|
/**
|
|
34109
34452
|
* 销毁方法
|
|
@@ -34540,7 +34883,7 @@ var LogicSchedulerCenter = class {
|
|
|
34540
34883
|
};
|
|
34541
34884
|
|
|
34542
34885
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
34543
|
-
import { RuntimeError as
|
|
34886
|
+
import { RuntimeError as RuntimeError68 } from "@ibiz-template/core";
|
|
34544
34887
|
var LogicTrigger = class {
|
|
34545
34888
|
/**
|
|
34546
34889
|
* @author lxm
|
|
@@ -34600,7 +34943,7 @@ var LogicTrigger = class {
|
|
|
34600
34943
|
if (this.executor) {
|
|
34601
34944
|
return this.executor.execute(executeParams);
|
|
34602
34945
|
}
|
|
34603
|
-
throw new
|
|
34946
|
+
throw new RuntimeError68("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
34604
34947
|
}
|
|
34605
34948
|
/**
|
|
34606
34949
|
* 销毁方法
|
|
@@ -34617,12 +34960,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
34617
34960
|
};
|
|
34618
34961
|
|
|
34619
34962
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
34620
|
-
import { RuntimeError as
|
|
34963
|
+
import { RuntimeError as RuntimeError69 } from "@ibiz-template/core";
|
|
34621
34964
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
34622
34965
|
bindExecutor(executor) {
|
|
34623
34966
|
super.bindExecutor(executor);
|
|
34624
34967
|
if (this.executor.type !== "SCRIPT") {
|
|
34625
|
-
throw new
|
|
34968
|
+
throw new RuntimeError69(
|
|
34626
34969
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
34627
34970
|
);
|
|
34628
34971
|
}
|
|
@@ -34658,7 +35001,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
34658
35001
|
};
|
|
34659
35002
|
|
|
34660
35003
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
34661
|
-
import { RuntimeError as
|
|
35004
|
+
import { RuntimeError as RuntimeError70, RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
34662
35005
|
var TimerTrigger = class extends LogicTrigger {
|
|
34663
35006
|
constructor() {
|
|
34664
35007
|
super(...arguments);
|
|
@@ -34670,7 +35013,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
34670
35013
|
}
|
|
34671
35014
|
this.timer = setInterval(() => {
|
|
34672
35015
|
if (!this.scheduler.defaultParamsCb) {
|
|
34673
|
-
throw new
|
|
35016
|
+
throw new RuntimeError70("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
34674
35017
|
}
|
|
34675
35018
|
const params = this.scheduler.defaultParamsCb();
|
|
34676
35019
|
this.executor.execute(params);
|
|
@@ -34687,7 +35030,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
34687
35030
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
34688
35031
|
import {
|
|
34689
35032
|
ModelError as ModelError34,
|
|
34690
|
-
RuntimeError as
|
|
35033
|
+
RuntimeError as RuntimeError71,
|
|
34691
35034
|
RuntimeModelError as RuntimeModelError73
|
|
34692
35035
|
} from "@ibiz-template/core";
|
|
34693
35036
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
@@ -34725,7 +35068,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
34725
35068
|
const { context, params, ...rest } = parameters;
|
|
34726
35069
|
const { data } = parameters;
|
|
34727
35070
|
if (!(data == null ? void 0 : data[0])) {
|
|
34728
|
-
throw new
|
|
35071
|
+
throw new RuntimeError71("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
34729
35072
|
}
|
|
34730
35073
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
34731
35074
|
let openViewRef;
|
|
@@ -34785,7 +35128,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
34785
35128
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
34786
35129
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
34787
35130
|
if (!findView) {
|
|
34788
|
-
throw new
|
|
35131
|
+
throw new RuntimeError71(
|
|
34789
35132
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
34790
35133
|
);
|
|
34791
35134
|
}
|
|
@@ -34910,7 +35253,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
34910
35253
|
}
|
|
34911
35254
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
34912
35255
|
if (!selectData) {
|
|
34913
|
-
throw new
|
|
35256
|
+
throw new RuntimeError71("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
34914
35257
|
}
|
|
34915
35258
|
const indexType = selectData.srfkey;
|
|
34916
35259
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
|
|
@@ -34920,7 +35263,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
34920
35263
|
}
|
|
34921
35264
|
);
|
|
34922
35265
|
if (!findView) {
|
|
34923
|
-
throw new
|
|
35266
|
+
throw new RuntimeError71(
|
|
34924
35267
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
34925
35268
|
);
|
|
34926
35269
|
}
|
|
@@ -34957,7 +35300,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
34957
35300
|
}
|
|
34958
35301
|
});
|
|
34959
35302
|
if (pickParentFieldName === void 0) {
|
|
34960
|
-
throw new
|
|
35303
|
+
throw new RuntimeError71(
|
|
34961
35304
|
"\u6CA1\u6709\u627E\u5230".concat(pickParentDeName, "\u5728\u5F53\u524D\u5B9E\u4F53\u7684\u5916\u952E\u5C5E\u6027")
|
|
34962
35305
|
);
|
|
34963
35306
|
}
|
|
@@ -35289,6 +35632,7 @@ export {
|
|
|
35289
35632
|
ExpBarControlController,
|
|
35290
35633
|
FORMDETAIL_PROVIDER_PREFIX,
|
|
35291
35634
|
FetchMethod,
|
|
35635
|
+
FileUtil,
|
|
35292
35636
|
FormButtonController,
|
|
35293
35637
|
FormButtonState,
|
|
35294
35638
|
FormController,
|