@ibiz-template/runtime 0.1.7 → 0.1.8
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 +208 -67
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/constant/sys-uiaction-tag.d.ts +8 -0
- package/out/constant/sys-uiaction-tag.d.ts.map +1 -1
- package/out/constant/sys-uiaction-tag.js +8 -0
- package/out/controller/common/control/md-control.controller.d.ts +3 -1
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +31 -13
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +10 -4
- package/out/install.js +2 -2
- package/out/interface/controller/common/i-icon/i-icon.d.ts +7 -0
- package/out/interface/controller/common/i-icon/i-icon.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-grid.controller.d.ts +11 -4
- package/out/interface/controller/controller/control/i-grid.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-md-control.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/i-md-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
- package/out/interface/controller/event/argument/index.d.ts +1 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/row-edit-change.event.d.ts +20 -0
- package/out/interface/controller/event/argument/row-edit-change.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/row-edit-change.event.js +1 -0
- package/out/interface/controller/event/control/i-grid.event.d.ts +13 -1
- package/out/interface/controller/event/control/i-grid.event.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-tree.event.d.ts +19 -0
- package/out/interface/controller/event/control/i-tree.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-grid.state.d.ts +8 -0
- package/out/interface/controller/state/control/i-grid.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +16 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/interface/controller/work-flow/wf-link.d.ts +9 -0
- package/out/interface/controller/work-flow/wf-link.d.ts.map +1 -1
- package/out/interface/service/service/i-auth.service.d.ts +29 -0
- package/out/interface/service/service/i-auth.service.d.ts.map +1 -0
- package/out/interface/service/service/i-auth.service.js +1 -0
- package/out/interface/service/service/index.d.ts +5 -4
- package/out/interface/service/service/index.d.ts.map +1 -1
- package/out/interface/service/service/index.js +1 -4
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +9 -0
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
- package/out/register/helper/editor-register.d.ts.map +1 -1
- package/out/register/helper/editor-register.js +12 -1
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +8 -0
- package/out/service/service/auth/v7-auth.service.d.ts +14 -0
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -0
- package/out/service/service/auth/v7-auth.service.js +47 -0
- package/out/service/service/index.d.ts +1 -1
- package/out/service/service/index.d.ts.map +1 -1
- package/out/service/service/index.js +1 -1
- package/out/service/vo/control.vo.d.ts +8 -0
- package/out/service/vo/control.vo.d.ts.map +1 -1
- package/out/service/vo/control.vo.js +16 -1
- package/out/service/vo/tree-node-data/tree-code-list-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-code-list-node-data.js +1 -0
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts +21 -2
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +48 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts +12 -1
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +21 -2
- package/out/service/vo/tree-node-data/tree-static-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-static-node-data.js +1 -0
- package/out/types.d.ts +3 -4
- package/out/types.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +17 -17
- package/out/utils/script/script-function.d.ts.map +1 -1
- package/out/utils/script/script-function.js +4 -1
- package/package.json +3 -3
- package/src/constant/sys-uiaction-tag.ts +8 -0
- package/src/controller/common/control/md-control.controller.ts +37 -14
- package/src/engine/md-view.engine.ts +13 -4
- package/src/install.ts +2 -2
- package/src/interface/controller/common/i-icon/i-icon.ts +8 -0
- package/src/interface/controller/controller/control/i-grid.controller.ts +12 -4
- package/src/interface/controller/controller/control/i-md-control.controller.ts +9 -1
- package/src/interface/controller/controller/control/i-tree.controller.ts +8 -0
- package/src/interface/controller/event/argument/index.ts +1 -0
- package/src/interface/controller/event/argument/row-edit-change.event.ts +20 -0
- package/src/interface/controller/event/control/i-grid.event.ts +14 -1
- package/src/interface/controller/event/control/i-tree.event.ts +14 -0
- package/src/interface/controller/state/control/i-grid.state.ts +9 -0
- package/src/interface/controller/state/control/i-tree.state.ts +19 -1
- package/src/interface/controller/work-flow/wf-link.ts +10 -0
- package/src/interface/service/service/i-auth.service.ts +29 -0
- package/src/interface/service/service/index.ts +5 -4
- package/src/interface/util/i-open-view-util/i-open-view-util.ts +10 -0
- package/src/register/helper/editor-register.ts +17 -1
- package/src/service/dto/method.dto.ts +8 -0
- package/src/service/service/auth/v7-auth.service.ts +49 -0
- package/src/service/service/index.ts +1 -1
- package/src/service/vo/control.vo.ts +17 -1
- package/src/service/vo/tree-node-data/tree-code-list-node-data.ts +2 -0
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +60 -2
- package/src/service/vo/tree-node-data/tree-node-data.ts +27 -3
- package/src/service/vo/tree-node-data/tree-static-node-data.ts +2 -0
- package/src/types.ts +3 -3
- package/src/ui-action/provider/front-ui-action-provider.ts +1 -1
- package/src/utils/open-redirect-view/open-redirect-view.ts +20 -19
- package/src/utils/script/script-function.ts +4 -1
- package/out/service/service/auth/auth.service.d.ts +0 -30
- package/out/service/service/auth/auth.service.d.ts.map +0 -1
- package/out/service/service/auth/auth.service.js +0 -37
- package/src/service/service/auth/auth.service.ts +0 -44
package/dist/index.esm.js
CHANGED
|
@@ -1062,7 +1062,8 @@ async function openDERedirectView(appView, context, params = {}, opts = {}) {
|
|
|
1062
1062
|
const deRdTag = "".concat(entity.name.toUpperCase(), ":").concat(rdTag);
|
|
1063
1063
|
const allRefViews = appView.redirectAppViewRefs;
|
|
1064
1064
|
const refView = allRefViews == null ? void 0 : allRefViews.find((view) => {
|
|
1065
|
-
|
|
1065
|
+
const matchKey = view.name || view.id;
|
|
1066
|
+
return matchKey === deRdTag || matchKey === rdTag || matchKey === wfRdTag;
|
|
1066
1067
|
});
|
|
1067
1068
|
if (refView) {
|
|
1068
1069
|
const viewId = refView.refAppViewId;
|
|
@@ -1098,6 +1099,18 @@ async function openDERedirectView(appView, context, params = {}, opts = {}) {
|
|
|
1098
1099
|
}
|
|
1099
1100
|
async function calcDERdTag(entity, rdView, params, data) {
|
|
1100
1101
|
let rdTag = "";
|
|
1102
|
+
const typeFieldId = rdView.typeAppDEFieldId;
|
|
1103
|
+
if (typeFieldId) {
|
|
1104
|
+
const { codeName } = findFieldById(entity, typeFieldId);
|
|
1105
|
+
const value = data[codeName.toLowerCase()];
|
|
1106
|
+
if (notNilEmpty2(value)) {
|
|
1107
|
+
return "".concat(value);
|
|
1108
|
+
}
|
|
1109
|
+
ibiz.log.warn(
|
|
1110
|
+
"\u91CD\u5B9A\u5411\u89C6\u56FE[".concat(rdView.name, "]\u81EA\u5B9A\u4E49\u7C7B\u522B\u5C5E\u6027[").concat(typeFieldId, "]\u503C\u4E3A\u7A7A"),
|
|
1111
|
+
data
|
|
1112
|
+
);
|
|
1113
|
+
}
|
|
1101
1114
|
const defView = "".concat(ibiz.env.isMob ? "MOB" : "", "EDITVIEW");
|
|
1102
1115
|
const srfWf = params.srfwf;
|
|
1103
1116
|
if (notNilEmpty2(srfWf)) {
|
|
@@ -1107,19 +1120,9 @@ async function calcDERdTag(entity, rdView, params, data) {
|
|
|
1107
1120
|
return "".concat(defView, ":").concat(srfWf.toUpperCase());
|
|
1108
1121
|
}
|
|
1109
1122
|
let typeValue = "";
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
const value = data[codeName.toLowerCase()];
|
|
1114
|
-
if (notNilEmpty2(value)) {
|
|
1115
|
-
typeValue = value;
|
|
1116
|
-
}
|
|
1117
|
-
}
|
|
1118
|
-
if (isNilOrEmpty2(typeValue)) {
|
|
1119
|
-
if (entity.indexTypeAppDEFieldId) {
|
|
1120
|
-
const { codeName } = findFieldById(entity, entity.indexTypeAppDEFieldId);
|
|
1121
|
-
typeValue = data[codeName.toLowerCase()];
|
|
1122
|
-
}
|
|
1123
|
+
if (entity.indexTypeAppDEFieldId) {
|
|
1124
|
+
const { codeName } = findFieldById(entity, entity.indexTypeAppDEFieldId);
|
|
1125
|
+
typeValue = data[codeName.toLowerCase()];
|
|
1123
1126
|
}
|
|
1124
1127
|
if (isNilOrEmpty2(typeValue)) {
|
|
1125
1128
|
if (entity.formTypeAppDEFieldId) {
|
|
@@ -1251,7 +1254,10 @@ var ScriptFunction = class {
|
|
|
1251
1254
|
this.options = options;
|
|
1252
1255
|
const code = this.formatCode(scriptCode, options);
|
|
1253
1256
|
this.calcArgKeys(argKeys, options);
|
|
1254
|
-
|
|
1257
|
+
const fn = new Function(...this.argKeys, code);
|
|
1258
|
+
this.scriptFn = function callBack(...args) {
|
|
1259
|
+
return fn.apply({}, args);
|
|
1260
|
+
};
|
|
1255
1261
|
}
|
|
1256
1262
|
/**
|
|
1257
1263
|
* 格式化脚本
|
|
@@ -2137,6 +2143,8 @@ var SysUIActionTag = /* @__PURE__ */ ((SysUIActionTag2) => {
|
|
|
2137
2143
|
SysUIActionTag2["COPY"] = "Copy";
|
|
2138
2144
|
SysUIActionTag2["VIEW"] = "View";
|
|
2139
2145
|
SysUIActionTag2["TOGGLE_ROW_EDIT"] = "ToggleRowEdit";
|
|
2146
|
+
SysUIActionTag2["REFRESH_ALL"] = "RefreshAll";
|
|
2147
|
+
SysUIActionTag2["REFRESH_PARENT"] = "RefreshParent";
|
|
2140
2148
|
SysUIActionTag2["LOAD_MORE"] = "LoadMore";
|
|
2141
2149
|
return SysUIActionTag2;
|
|
2142
2150
|
})(SysUIActionTag || {});
|
|
@@ -4629,6 +4637,9 @@ var MethodDto = class _MethodDto {
|
|
|
4629
4637
|
break;
|
|
4630
4638
|
}
|
|
4631
4639
|
case "DTOS": {
|
|
4640
|
+
if (!field.refAppDataEntityId) {
|
|
4641
|
+
break;
|
|
4642
|
+
}
|
|
4632
4643
|
const dto = await this.getFieldDto(field);
|
|
4633
4644
|
const service = await this.app.deService.getService(
|
|
4634
4645
|
field.refAppDataEntityId
|
|
@@ -4667,6 +4678,9 @@ var MethodDto = class _MethodDto {
|
|
|
4667
4678
|
return Promise.all(
|
|
4668
4679
|
data.map(async (datum) => {
|
|
4669
4680
|
const all = this.fields.filter((field) => field.type === "DTOS").map(async (field) => {
|
|
4681
|
+
if (!field.refAppDataEntityId) {
|
|
4682
|
+
return;
|
|
4683
|
+
}
|
|
4670
4684
|
const key = field.codeName.toLowerCase();
|
|
4671
4685
|
const dto = await this.getFieldDto(field);
|
|
4672
4686
|
const items = datum[key];
|
|
@@ -6439,7 +6453,7 @@ var DEService = class {
|
|
|
6439
6453
|
};
|
|
6440
6454
|
|
|
6441
6455
|
// src/service/vo/control.vo.ts
|
|
6442
|
-
import { isNil as isNil8 } from "ramda";
|
|
6456
|
+
import { clone as clone10, isNil as isNil8 } from "ramda";
|
|
6443
6457
|
var ControlVO = class _ControlVO {
|
|
6444
6458
|
/**
|
|
6445
6459
|
* 是否是新建数据,0为新建
|
|
@@ -6597,6 +6611,21 @@ var ControlVO = class _ControlVO {
|
|
|
6597
6611
|
setOrigin(data) {
|
|
6598
6612
|
this.$origin = data instanceof _ControlVO ? data.getOrigin() : data;
|
|
6599
6613
|
}
|
|
6614
|
+
/**
|
|
6615
|
+
* 克隆新的vo数据
|
|
6616
|
+
*
|
|
6617
|
+
* @author lxm
|
|
6618
|
+
* @date 2023-08-16 11:08:29
|
|
6619
|
+
* @return {*} {ControlVO}
|
|
6620
|
+
*/
|
|
6621
|
+
clone() {
|
|
6622
|
+
const cloneOrigin = clone10(this.$origin);
|
|
6623
|
+
const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
|
|
6624
|
+
Object.keys(this).forEach((key) => {
|
|
6625
|
+
newVal[key] = this[key];
|
|
6626
|
+
});
|
|
6627
|
+
return newVal;
|
|
6628
|
+
}
|
|
6600
6629
|
};
|
|
6601
6630
|
|
|
6602
6631
|
// src/service/service/control/control.service.ts
|
|
@@ -7030,39 +7059,41 @@ var AuthorityService = class {
|
|
|
7030
7059
|
}
|
|
7031
7060
|
};
|
|
7032
7061
|
|
|
7033
|
-
// src/service/service/auth/auth.service.ts
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
const res = await ibiz.net.post(
|
|
7046
|
-
"/v7/login",
|
|
7047
|
-
{ loginname, password },
|
|
7048
|
-
{},
|
|
7049
|
-
{
|
|
7050
|
-
// sass 模式下,注册在 sassMgr 管理平台的应用中心系统标识
|
|
7051
|
-
// srfdcsystem: ibiz.env.dcSystem,
|
|
7062
|
+
// src/service/service/auth/v7-auth.service.ts
|
|
7063
|
+
import { CoreConst } from "@ibiz-template/core";
|
|
7064
|
+
import { clearCookie, setCookie } from "qx-util";
|
|
7065
|
+
var V7AuthService = class {
|
|
7066
|
+
async login(loginname, password) {
|
|
7067
|
+
try {
|
|
7068
|
+
const res = await ibiz.net.post("/v7/login", { loginname, password });
|
|
7069
|
+
const { data } = res;
|
|
7070
|
+
if (data && data.token) {
|
|
7071
|
+
setCookie(CoreConst.TOKEN, data.token, 0, true);
|
|
7072
|
+
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (data.expirein || 7199) * 1e3;
|
|
7073
|
+
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), 0, true);
|
|
7052
7074
|
}
|
|
7053
|
-
|
|
7054
|
-
|
|
7075
|
+
return true;
|
|
7076
|
+
} catch (err) {
|
|
7077
|
+
ibiz.notification.error({
|
|
7078
|
+
title: "\u767B\u5F55\u5931\u8D25",
|
|
7079
|
+
desc: err.message || ""
|
|
7080
|
+
});
|
|
7081
|
+
}
|
|
7082
|
+
return false;
|
|
7055
7083
|
}
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7084
|
+
async logout() {
|
|
7085
|
+
try {
|
|
7086
|
+
await ibiz.net.get("/v7/logout");
|
|
7087
|
+
clearCookie(CoreConst.TOKEN);
|
|
7088
|
+
clearCookie(CoreConst.TOKEN_EXPIRES);
|
|
7089
|
+
return true;
|
|
7090
|
+
} catch (err) {
|
|
7091
|
+
ibiz.notification.error({
|
|
7092
|
+
title: "\u767B\u51FA\u5931\u8D25",
|
|
7093
|
+
desc: err.message || ""
|
|
7094
|
+
});
|
|
7095
|
+
}
|
|
7096
|
+
return false;
|
|
7066
7097
|
}
|
|
7067
7098
|
};
|
|
7068
7099
|
|
|
@@ -7083,6 +7114,27 @@ var TreeNodeData = class {
|
|
|
7083
7114
|
}
|
|
7084
7115
|
this.nodeId = model.id;
|
|
7085
7116
|
}
|
|
7117
|
+
/**
|
|
7118
|
+
* 计算节点图标
|
|
7119
|
+
* @author lxm
|
|
7120
|
+
* @date 2023-08-15 02:24:55
|
|
7121
|
+
* @protected
|
|
7122
|
+
* @param {IDETreeNode} model
|
|
7123
|
+
* @return {*} {(IIcon | undefined)}
|
|
7124
|
+
*/
|
|
7125
|
+
calcIcon(model) {
|
|
7126
|
+
const { sysImage } = model;
|
|
7127
|
+
const icon = {};
|
|
7128
|
+
if (sysImage) {
|
|
7129
|
+
if (sysImage.cssClass) {
|
|
7130
|
+
icon.cssClass = sysImage.cssClass;
|
|
7131
|
+
}
|
|
7132
|
+
if (sysImage.imagePath) {
|
|
7133
|
+
icon.imagePath = sysImage.imagePath;
|
|
7134
|
+
}
|
|
7135
|
+
}
|
|
7136
|
+
return Object.values(icon).length > 0 ? icon : void 0;
|
|
7137
|
+
}
|
|
7086
7138
|
};
|
|
7087
7139
|
|
|
7088
7140
|
// src/service/vo/tree-node-data/tree-code-list-node-data.ts
|
|
@@ -7103,6 +7155,7 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
7103
7155
|
}
|
|
7104
7156
|
this.srfkey = this.value;
|
|
7105
7157
|
this.srfmajortext = this.text;
|
|
7158
|
+
this.icon = this.calcIcon(model);
|
|
7106
7159
|
}
|
|
7107
7160
|
};
|
|
7108
7161
|
|
|
@@ -7124,6 +7177,56 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
7124
7177
|
}
|
|
7125
7178
|
this.srfkey = this.deData.srfkey;
|
|
7126
7179
|
this.srfmajortext = this.deData.srfmajortext;
|
|
7180
|
+
this.icon = this.calcIcon(model);
|
|
7181
|
+
this.textHtml = this.calcTextHtml(model);
|
|
7182
|
+
}
|
|
7183
|
+
calcIcon(model) {
|
|
7184
|
+
const icon = super.calcIcon(model) || {};
|
|
7185
|
+
const { iconAppDEFieldId, detreeNodeDataItems } = model;
|
|
7186
|
+
if (iconAppDEFieldId && this.deData[iconAppDEFieldId]) {
|
|
7187
|
+
icon.imagePath = this.deData[iconAppDEFieldId];
|
|
7188
|
+
}
|
|
7189
|
+
if (icon) {
|
|
7190
|
+
this.icon = icon;
|
|
7191
|
+
}
|
|
7192
|
+
const iconDataItem = detreeNodeDataItems == null ? void 0 : detreeNodeDataItems.find((item) => item.id === "icon");
|
|
7193
|
+
if (iconDataItem) {
|
|
7194
|
+
icon.htmlStr = this.calcDataItemScript(iconDataItem);
|
|
7195
|
+
}
|
|
7196
|
+
return Object.values(icon).length > 0 ? icon : void 0;
|
|
7197
|
+
}
|
|
7198
|
+
/**
|
|
7199
|
+
* 计算节点数据项的自定义脚本内容
|
|
7200
|
+
* @author lxm
|
|
7201
|
+
* @date 2023-08-15 02:37:29
|
|
7202
|
+
* @protected
|
|
7203
|
+
* @param {IDETreeNodeDataItem} dataItem
|
|
7204
|
+
* @return {*} {(string | undefined)}
|
|
7205
|
+
*/
|
|
7206
|
+
calcDataItemScript(dataItem) {
|
|
7207
|
+
if (dataItem.customCode && dataItem.scriptCode) {
|
|
7208
|
+
return ScriptFactory.execScriptFn(
|
|
7209
|
+
{ data: this.deData },
|
|
7210
|
+
dataItem.scriptCode
|
|
7211
|
+
);
|
|
7212
|
+
}
|
|
7213
|
+
}
|
|
7214
|
+
/**
|
|
7215
|
+
* 计算节点文本html内容
|
|
7216
|
+
* @author lxm
|
|
7217
|
+
* @date 2023-08-15 02:41:31
|
|
7218
|
+
* @protected
|
|
7219
|
+
* @param {IDETreeDataSetNode} model
|
|
7220
|
+
* @return {*} {(string | undefined)}
|
|
7221
|
+
*/
|
|
7222
|
+
calcTextHtml(model) {
|
|
7223
|
+
let html;
|
|
7224
|
+
const { detreeNodeDataItems } = model;
|
|
7225
|
+
const textDataItem = detreeNodeDataItems == null ? void 0 : detreeNodeDataItems.find((item) => item.id === "text");
|
|
7226
|
+
if (textDataItem) {
|
|
7227
|
+
html = this.calcDataItemScript(textDataItem);
|
|
7228
|
+
}
|
|
7229
|
+
return html;
|
|
7127
7230
|
}
|
|
7128
7231
|
};
|
|
7129
7232
|
|
|
@@ -7149,6 +7252,7 @@ var TreeStaticNodeData = class extends TreeNodeData {
|
|
|
7149
7252
|
}
|
|
7150
7253
|
this.srfkey = ((_a = this.deData) == null ? void 0 : _a.srfkey) || this.value;
|
|
7151
7254
|
this.srfmajortext = ((_b = this.deData) == null ? void 0 : _b.srfmajortext) || this.text;
|
|
7255
|
+
this.icon = this.calcIcon(model);
|
|
7152
7256
|
}
|
|
7153
7257
|
};
|
|
7154
7258
|
|
|
@@ -8199,11 +8303,11 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
8199
8303
|
return null;
|
|
8200
8304
|
}
|
|
8201
8305
|
if (key === "Edit" /* EDIT */ || key === "View" /* VIEW */) {
|
|
8202
|
-
this.openData(args);
|
|
8306
|
+
await this.openData(args);
|
|
8203
8307
|
return null;
|
|
8204
8308
|
}
|
|
8205
8309
|
if (key === "New" /* NEW */) {
|
|
8206
|
-
this.newData(args);
|
|
8310
|
+
await this.newData(args);
|
|
8207
8311
|
return null;
|
|
8208
8312
|
}
|
|
8209
8313
|
if (key === "Remove" /* REMOVE */) {
|
|
@@ -8333,9 +8437,18 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
8333
8437
|
const params = {};
|
|
8334
8438
|
if (this.searchForm) {
|
|
8335
8439
|
const addParams = this.searchForm.getData()[0];
|
|
8336
|
-
Object.
|
|
8440
|
+
const filteredParams = Object.entries(addParams).reduce(
|
|
8441
|
+
(result, [key, value]) => {
|
|
8442
|
+
if (value !== null && value !== void 0 && value !== "") {
|
|
8443
|
+
result[key] = value;
|
|
8444
|
+
}
|
|
8445
|
+
return result;
|
|
8446
|
+
},
|
|
8447
|
+
{}
|
|
8448
|
+
);
|
|
8449
|
+
Object.assign(params, filteredParams);
|
|
8337
8450
|
}
|
|
8338
|
-
if (this.searchBar) {
|
|
8451
|
+
if (this.searchBar && this.searchBar.state.query) {
|
|
8339
8452
|
const addParams = {
|
|
8340
8453
|
query: this.searchBar.state.query
|
|
8341
8454
|
};
|
|
@@ -8457,7 +8570,7 @@ function getProvider2(key) {
|
|
|
8457
8570
|
}
|
|
8458
8571
|
async function getEditorProvider(model) {
|
|
8459
8572
|
let provider;
|
|
8460
|
-
const { editorType, editorStyle } = model;
|
|
8573
|
+
const { editorType, editorStyle, predefinedType } = model;
|
|
8461
8574
|
if (editorStyle && editorStyle !== "DEFAULT") {
|
|
8462
8575
|
const key = "".concat(editorType, "_").concat(editorStyle);
|
|
8463
8576
|
provider = getProvider2(key);
|
|
@@ -8468,6 +8581,19 @@ async function getEditorProvider(model) {
|
|
|
8468
8581
|
);
|
|
8469
8582
|
}
|
|
8470
8583
|
}
|
|
8584
|
+
if (predefinedType) {
|
|
8585
|
+
let key = "".concat(predefinedType, "_").concat(editorType);
|
|
8586
|
+
if (editorStyle && editorStyle !== "DEFAULT") {
|
|
8587
|
+
key += "_".concat(editorStyle);
|
|
8588
|
+
}
|
|
8589
|
+
provider = getProvider2(key);
|
|
8590
|
+
if (!provider) {
|
|
8591
|
+
ibiz.log.error(
|
|
8592
|
+
"\u627E\u4E0D\u5230\u7F16\u8F91\u5668\u7C7B\u578B\uFF1A[".concat(editorType, "]\u7684\u9884\u7F6E\u7C7B\u578B\uFF1A[").concat(predefinedType, "]\u5BF9\u5E94\u7684\u9002\u914D\u5668"),
|
|
8593
|
+
model
|
|
8594
|
+
);
|
|
8595
|
+
}
|
|
8596
|
+
}
|
|
8471
8597
|
if (!provider) {
|
|
8472
8598
|
provider = getProvider2(editorType);
|
|
8473
8599
|
}
|
|
@@ -9086,7 +9212,7 @@ import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
|
9086
9212
|
|
|
9087
9213
|
// src/ui-logic/utils/handle-src-val.ts
|
|
9088
9214
|
import { ModelError as ModelError19 } from "@ibiz-template/core";
|
|
9089
|
-
import { clone as
|
|
9215
|
+
import { clone as clone11 } from "ramda";
|
|
9090
9216
|
function handleSrcVal2(ctx, srcValParams) {
|
|
9091
9217
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
9092
9218
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -9108,7 +9234,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
9108
9234
|
value = ctx.context;
|
|
9109
9235
|
break;
|
|
9110
9236
|
case "ENVPARAM":
|
|
9111
|
-
value =
|
|
9237
|
+
value = clone11(ibiz.env);
|
|
9112
9238
|
break;
|
|
9113
9239
|
default:
|
|
9114
9240
|
throw new ModelError19(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -10739,7 +10865,7 @@ function install() {
|
|
|
10739
10865
|
ibiz2.hub = new AppHub();
|
|
10740
10866
|
ibiz2.register = new RegisterCenter();
|
|
10741
10867
|
ibiz2.config = new GlobalConfig();
|
|
10742
|
-
ibiz2.auth = new
|
|
10868
|
+
ibiz2.auth = new V7AuthService();
|
|
10743
10869
|
ibiz2.engine = new EngineFactory();
|
|
10744
10870
|
installCommand();
|
|
10745
10871
|
presetUIActionProvider();
|
|
@@ -12299,8 +12425,13 @@ var MDControlController = class extends ControlController {
|
|
|
12299
12425
|
this.state.mdctrlActiveMode = 0;
|
|
12300
12426
|
this.state.groups = [];
|
|
12301
12427
|
}
|
|
12428
|
+
async onCreated() {
|
|
12429
|
+
await super.onCreated();
|
|
12430
|
+
this.setSort();
|
|
12431
|
+
}
|
|
12302
12432
|
/**
|
|
12303
12433
|
* 设置排序
|
|
12434
|
+
* 无参数时设置的是默认排序。
|
|
12304
12435
|
*
|
|
12305
12436
|
* @author lxm
|
|
12306
12437
|
* @date 2022-09-28 13:09:44
|
|
@@ -12308,7 +12439,9 @@ var MDControlController = class extends ControlController {
|
|
|
12308
12439
|
* @param {string} order 排序顺序
|
|
12309
12440
|
*/
|
|
12310
12441
|
setSort(key, order) {
|
|
12311
|
-
|
|
12442
|
+
if (key && order) {
|
|
12443
|
+
this.state.sortQuery = "".concat(key, ",").concat(order);
|
|
12444
|
+
}
|
|
12312
12445
|
}
|
|
12313
12446
|
/**
|
|
12314
12447
|
* 获取请求过滤参数(整合了视图参数,各种过滤条件,排序,分页)
|
|
@@ -12407,14 +12540,17 @@ var MDControlController = class extends ControlController {
|
|
|
12407
12540
|
if (!(data == null ? void 0 : data.length)) {
|
|
12408
12541
|
throw new RuntimeError31("\u672A\u9009\u4E2D\u6570\u636E");
|
|
12409
12542
|
}
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12543
|
+
if ((args == null ? void 0 : args.silent) !== true) {
|
|
12544
|
+
const del = await ibiz.confirm.error({
|
|
12545
|
+
title: "\u6570\u636E\u5220\u9664",
|
|
12546
|
+
desc: "\u786E\u8BA4\u5220\u9664\u6570\u636E\uFF1F"
|
|
12547
|
+
});
|
|
12548
|
+
if (!del) {
|
|
12549
|
+
return;
|
|
12550
|
+
}
|
|
12416
12551
|
}
|
|
12417
12552
|
await this.startLoading();
|
|
12553
|
+
let needRefresh = false;
|
|
12418
12554
|
try {
|
|
12419
12555
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
12420
12556
|
await Promise.allSettled(
|
|
@@ -12423,14 +12559,19 @@ var MDControlController = class extends ControlController {
|
|
|
12423
12559
|
const tempContext = context.clone();
|
|
12424
12560
|
tempContext[deName] = item.srfkey;
|
|
12425
12561
|
await this.service.remove(tempContext, params);
|
|
12562
|
+
needRefresh = true;
|
|
12426
12563
|
}
|
|
12427
12564
|
this.afterRemove(data);
|
|
12428
12565
|
})
|
|
12429
12566
|
);
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12567
|
+
if ((args == null ? void 0 : args.silent) !== true) {
|
|
12568
|
+
ibiz.notification.success({
|
|
12569
|
+
desc: "\u6570\u636E[".concat(data.map((item) => item.srfmajortext).join("\u3001"), "]\u5220\u9664\u6210\u529F!")
|
|
12570
|
+
});
|
|
12571
|
+
}
|
|
12572
|
+
if (needRefresh) {
|
|
12573
|
+
this.refresh();
|
|
12574
|
+
}
|
|
12434
12575
|
} finally {
|
|
12435
12576
|
await this.endLoading();
|
|
12436
12577
|
}
|
|
@@ -12532,7 +12673,6 @@ export {
|
|
|
12532
12673
|
AppDataEntity,
|
|
12533
12674
|
AppFuncCommand,
|
|
12534
12675
|
Application,
|
|
12535
|
-
AuthService,
|
|
12536
12676
|
AuthorityService,
|
|
12537
12677
|
BackendUIActionProvider,
|
|
12538
12678
|
BaseController,
|
|
@@ -12598,6 +12738,7 @@ export {
|
|
|
12598
12738
|
UIActionButtonState,
|
|
12599
12739
|
UIActionUtil,
|
|
12600
12740
|
UIMapField,
|
|
12741
|
+
V7AuthService,
|
|
12601
12742
|
VIEW_PROVIDER_PREFIX,
|
|
12602
12743
|
ViewController,
|
|
12603
12744
|
ViewEngineBase,
|