@ibiz-template/runtime 0.6.2-dev.0 → 0.6.2
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 +425 -186
- package/dist/index.system.min.js +1 -1
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +20 -15
- package/out/controller/common/control/md-control.controller.d.ts +3 -4
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +14 -13
- package/out/controller/control/calendar/calendar.controller.d.ts +31 -1
- package/out/controller/control/calendar/calendar.controller.d.ts.map +1 -1
- package/out/controller/control/calendar/calendar.controller.js +67 -0
- package/out/controller/control/chart/chart.controller.d.ts.map +1 -1
- package/out/controller/control/chart/chart.controller.js +1 -0
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +2 -1
- package/out/controller/control/gantt/gantt.controller.d.ts +48 -1
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +90 -7
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +6 -2
- package/out/controller/control/tree/tree.controller.d.ts +3 -4
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +19 -8
- package/out/controller/control/tree/tree.service.d.ts +22 -0
- package/out/controller/control/tree/tree.service.d.ts.map +1 -1
- package/out/controller/control/tree/tree.service.js +30 -0
- package/out/controller/notification/internal-message.controller.d.ts.map +1 -1
- package/out/controller/notification/internal-message.controller.js +11 -2
- package/out/interface/util/i-notification-util/i-notification-util.d.ts +14 -0
- package/out/interface/util/i-notification-util/i-notification-util.d.ts.map +1 -1
- package/package.json +4 -3
|
@@ -5,7 +5,7 @@ import { MDControlController } from '../../common';
|
|
|
5
5
|
import { ContextMenuController } from '../context-menu';
|
|
6
6
|
import { TreeService } from './tree.service';
|
|
7
7
|
import { calcDeCodeNameById, getChildNodeRSs } from '../../../model';
|
|
8
|
-
import { CounterService } from '../../../service';
|
|
8
|
+
import { CounterService, Srfuf } from '../../../service';
|
|
9
9
|
/**
|
|
10
10
|
* 树部件控制器
|
|
11
11
|
* @author lxm
|
|
@@ -738,17 +738,28 @@ export class TreeController extends MDControlController {
|
|
|
738
738
|
await this.updateDeNodeData([nodeData]);
|
|
739
739
|
}
|
|
740
740
|
/**
|
|
741
|
-
*
|
|
742
|
-
* @param {IData} item
|
|
741
|
+
* 删除每一项
|
|
743
742
|
* @return {*}
|
|
744
743
|
* @author: zhujiamin
|
|
745
|
-
* @Date: 2024-02-
|
|
744
|
+
* @Date: 2024-02-27 09:47:52
|
|
746
745
|
*/
|
|
747
|
-
|
|
746
|
+
async handleItemRemove(item, context, params) {
|
|
747
|
+
let needRefresh = false;
|
|
748
748
|
const treeNode = this.getNodeModel(item._nodeId);
|
|
749
|
-
if (treeNode) {
|
|
750
|
-
|
|
749
|
+
if (!treeNode) {
|
|
750
|
+
throw new RuntimeError('未找到树节点');
|
|
751
|
+
}
|
|
752
|
+
const nodeAppDataEntityId = treeNode.appDataEntityId;
|
|
753
|
+
if (nodeAppDataEntityId) {
|
|
754
|
+
const deName = calcDeCodeNameById(nodeAppDataEntityId);
|
|
755
|
+
if (item.srfuf !== Srfuf.CREATE) {
|
|
756
|
+
const tempContext = context.clone();
|
|
757
|
+
tempContext[deName] = item.srfkey;
|
|
758
|
+
// 删除后台的数据
|
|
759
|
+
await this.service.removeItem(nodeAppDataEntityId, tempContext, params);
|
|
760
|
+
needRefresh = true;
|
|
761
|
+
}
|
|
751
762
|
}
|
|
752
|
-
return
|
|
763
|
+
return needRefresh;
|
|
753
764
|
}
|
|
754
765
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IHttpResponse } from '@ibiz-template/core';
|
|
1
2
|
import { IDETree, IDETreeCodeListNode, IDETreeDataSetNode, IDETreeNode, IDETreeNodeRS } from '@ibiz/model-core';
|
|
2
3
|
import { ITreeNodeData } from '../../../interface';
|
|
3
4
|
import { MDControlService, TreeDataSetNodeData, TreeCodeListNodeData } from '../../../service';
|
|
@@ -111,5 +112,26 @@ export declare class TreeService<T extends IDETree = IDETree> extends MDControlS
|
|
|
111
112
|
* @memberof TreeService
|
|
112
113
|
*/
|
|
113
114
|
protected getCodeListNodeDatas(nodeModel: IDETreeCodeListNode, nodeRS: IDETreeNodeRS | undefined, parentNodeData: ITreeNodeData | undefined, opts: TreeFetchOpts): Promise<TreeCodeListNodeData[]>;
|
|
115
|
+
/**
|
|
116
|
+
* 删除单条数据
|
|
117
|
+
*
|
|
118
|
+
* @author lxm
|
|
119
|
+
* @date 2022-09-07 19:09:48
|
|
120
|
+
* @param {IContext} context 上下文
|
|
121
|
+
* @param {IParams} [params={}] 视图参数
|
|
122
|
+
* @returns {*}
|
|
123
|
+
*/
|
|
124
|
+
removeItem(appDataEntityId: string, context: IContext, params?: IParams): Promise<IHttpResponse>;
|
|
125
|
+
/**
|
|
126
|
+
* 执行服务方法(带实体id)
|
|
127
|
+
*
|
|
128
|
+
* @author lxm
|
|
129
|
+
* @date 2022-08-31 17:08:41
|
|
130
|
+
* @param {string} methodName 方法名
|
|
131
|
+
* @param {IContext} context 上下文
|
|
132
|
+
* @param {IParams} [params={}] 视图参数或数据
|
|
133
|
+
* @returns {*} {Promise<IHttpResponse>}
|
|
134
|
+
*/
|
|
135
|
+
execWithEntityId(appDataEntityId: string, methodName: string, context: IContext, data?: IData, params?: IParams): Promise<IHttpResponse>;
|
|
114
136
|
}
|
|
115
137
|
//# sourceMappingURL=tree.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.service.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/tree/tree.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tree.service.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/tree/tree.service.ts"],"names":[],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G;IACH,qBAAqB,CACnB,MAAM,EAAE,aAAa,EACrB,cAAc,EAAE,aAAa,GAAG,SAAS,EACzC,IAAI,EAAE,aAAa,GAClB;QACD,OAAO,EAAE,QAAQ,CAAC;QAClB,MAAM,EAAE,OAAO,CAAC;QAChB,UAAU,EAAE,OAAO,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;KACpB;IA+DD;;;;;;;;OAQG;cACa,cAAc,CAC5B,SAAS,EAAE,kBAAkB,EAC7B,MAAM,EAAE,aAAa,GAAG,SAAS,EACjC,cAAc,EAAE,aAAa,GAAG,SAAS,EACzC,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,mBAAmB,EAAE,CAAC;IA6CjC;;;;;;;OAOG;cACa,oBAAoB,CAClC,SAAS,EAAE,mBAAmB,EAC9B,MAAM,EAAE,aAAa,GAAG,SAAS,EACjC,cAAc,EAAE,aAAa,GAAG,SAAS,EACzC,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,oBAAoB,EAAE,CAAC;IA+BlC;;;;;;;;OAQG;IACG,UAAU,CACd,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC;IAazB;;;;;;;;;OASG;IACG,gBAAgB,CACpB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,QAAQ,EACjB,IAAI,CAAC,EAAE,KAAK,EACZ,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,aAAa,CAAC;CAY1B"}
|
|
@@ -248,4 +248,34 @@ export class TreeService extends MDControlService {
|
|
|
248
248
|
}
|
|
249
249
|
return [];
|
|
250
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* 删除单条数据
|
|
253
|
+
*
|
|
254
|
+
* @author lxm
|
|
255
|
+
* @date 2022-09-07 19:09:48
|
|
256
|
+
* @param {IContext} context 上下文
|
|
257
|
+
* @param {IParams} [params={}] 视图参数
|
|
258
|
+
* @returns {*}
|
|
259
|
+
*/
|
|
260
|
+
async removeItem(appDataEntityId, context, params = {}) {
|
|
261
|
+
var _a;
|
|
262
|
+
const removeAction = ((_a = this.model.removeControlAction) === null || _a === void 0 ? void 0 : _a.appDEMethodId) || 'remove';
|
|
263
|
+
const res = await this.execWithEntityId(appDataEntityId, removeAction, context, undefined, params);
|
|
264
|
+
return res;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* 执行服务方法(带实体id)
|
|
268
|
+
*
|
|
269
|
+
* @author lxm
|
|
270
|
+
* @date 2022-08-31 17:08:41
|
|
271
|
+
* @param {string} methodName 方法名
|
|
272
|
+
* @param {IContext} context 上下文
|
|
273
|
+
* @param {IParams} [params={}] 视图参数或数据
|
|
274
|
+
* @returns {*} {Promise<IHttpResponse>}
|
|
275
|
+
*/
|
|
276
|
+
async execWithEntityId(appDataEntityId, methodName, context, data, params) {
|
|
277
|
+
const header = this.handleCustomRequestHeader();
|
|
278
|
+
const res = await this.app.deService.exec(appDataEntityId, methodName, context, data, params, header);
|
|
279
|
+
return res;
|
|
280
|
+
}
|
|
251
281
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-message.controller.d.ts","sourceRoot":"","sources":["../../../src/controller/notification/internal-message.controller.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"internal-message.controller.d.ts","sourceRoot":"","sources":["../../../src/controller/notification/internal-message.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAEjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAUvD,qBAAa,yBAA0B,YAAW,0BAA0B;IAC1E,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAiB;IAE7D,KAAK,EAAE,MAAM,CAAK;IAElB,WAAW,EAAE,MAAM,CAAK;IAExB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAK;IAEjB,IAAI,EAAE,MAAM,CAAM;IAElB,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAElC,UAAU,UAAS;IAEnB,SAAS,CAAC,OAAO,yBAAgC;IAE3C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAQrB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IASzC;;;;;OAKG;IACH,gBAAgB,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI;cAUrB,KAAK,CAAC,QAAQ,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IA6C/D;;;;;OAKG;IACH,SAAS,CAAC,UAAU,IAAI,IAAI;IAiCtB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAcxD;;;;;OAKG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAOpC;;;;;;OAMG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAIjD"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { IBizContext, } from '@ibiz-template/core';
|
|
1
2
|
import { QXEvent } from 'qx-util';
|
|
2
3
|
import { InternalMessageService } from '../../service';
|
|
4
|
+
import { parseViewProtocol } from '../../utils';
|
|
5
|
+
import { OpenAppViewCommand } from '../../command';
|
|
3
6
|
function isHTML(str) {
|
|
4
7
|
if (str === '')
|
|
5
8
|
return false;
|
|
@@ -24,7 +27,6 @@ export class InternalMessageController {
|
|
|
24
27
|
this.service = new InternalMessageService();
|
|
25
28
|
}
|
|
26
29
|
async init() {
|
|
27
|
-
await this.load();
|
|
28
30
|
this.listenMqtt();
|
|
29
31
|
await this.refreshUnreadCount();
|
|
30
32
|
}
|
|
@@ -118,10 +120,17 @@ export class InternalMessageController {
|
|
|
118
120
|
}
|
|
119
121
|
// todo 目前会有一种情况,不带data,弹右下角消息提示
|
|
120
122
|
if (msg.content) {
|
|
121
|
-
ibiz.notification.
|
|
123
|
+
ibiz.notification.default({
|
|
122
124
|
isHtmlDesc: isHTML(msg.content),
|
|
123
125
|
desc: msg.content,
|
|
124
126
|
position: 'bottom-right',
|
|
127
|
+
onClick: () => {
|
|
128
|
+
const redirectUrl = ibiz.env.isMob ? msg.mobileurl : msg.url;
|
|
129
|
+
if (redirectUrl) {
|
|
130
|
+
const { viewId, context, params } = parseViewProtocol(redirectUrl);
|
|
131
|
+
ibiz.commands.execute(OpenAppViewCommand.TAG, viewId, IBizContext.create(context), params);
|
|
132
|
+
}
|
|
133
|
+
},
|
|
125
134
|
});
|
|
126
135
|
}
|
|
127
136
|
this.refreshUnreadCount();
|
|
@@ -46,6 +46,12 @@ export interface NotificationParams {
|
|
|
46
46
|
* @type {('top-right' | 'top-left' | 'bottom-right' | 'bottom-left')}
|
|
47
47
|
*/
|
|
48
48
|
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
49
|
+
/**
|
|
50
|
+
* 点击事件回调
|
|
51
|
+
* @author lxm
|
|
52
|
+
* @date 2024-02-27 05:24:10
|
|
53
|
+
*/
|
|
54
|
+
onClick?: () => void;
|
|
49
55
|
}
|
|
50
56
|
/**
|
|
51
57
|
* 在界面右上角显示可关闭的全局通知
|
|
@@ -57,6 +63,14 @@ export interface NotificationParams {
|
|
|
57
63
|
* @interface INotificationUtil
|
|
58
64
|
*/
|
|
59
65
|
export interface INotificationUtil {
|
|
66
|
+
/**
|
|
67
|
+
* 默认通知
|
|
68
|
+
*
|
|
69
|
+
* @author chitanda
|
|
70
|
+
* @date 2022-08-17 15:08:22
|
|
71
|
+
* @param {NotificationParams} params
|
|
72
|
+
*/
|
|
73
|
+
default(params: NotificationParams): void;
|
|
60
74
|
/**
|
|
61
75
|
* 普通通知
|
|
62
76
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-notification-util.d.ts","sourceRoot":"","sources":["../../../../src/interface/util/i-notification-util/i-notification-util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"i-notification-util.d.ts","sourceRoot":"","sources":["../../../../src/interface/util/i-notification-util/i-notification-util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,CAAC;IAErE;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1C;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACvC;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1C;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1C;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACzC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.6.2
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "控制器包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"animejs": "^3.2.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@ibiz-template/core": "^0.6.2
|
|
38
|
+
"@ibiz-template/core": "^0.6.2",
|
|
39
39
|
"@ibiz/model-core": "^0.1.14",
|
|
40
40
|
"@types/animejs": "^3.1.12",
|
|
41
41
|
"@types/path-browserify": "^1.0.2",
|
|
@@ -65,5 +65,6 @@
|
|
|
65
65
|
"qs": "^6.11.0",
|
|
66
66
|
"qx-util": "^0.4.8",
|
|
67
67
|
"ramda": "^0.29.0"
|
|
68
|
-
}
|
|
68
|
+
},
|
|
69
|
+
"gitHead": "edf5b925447f63e6a51c9bf5449241bea5ed9a41"
|
|
69
70
|
}
|