@ibiz-template/runtime 0.4.2 → 0.4.3-dev.1
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 +30 -7
- package/dist/index.system.min.js +2 -2
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/control/report-panel/generator/user-generator.d.ts.map +1 -1
- package/out/controller/control/report-panel/generator/user-generator.js +5 -3
- package/out/controller/utils/button-state/ui-action-button.state.d.ts +14 -0
- package/out/controller/utils/button-state/ui-action-button.state.d.ts.map +1 -1
- package/out/controller/utils/button-state/ui-action-button.state.js +21 -2
- package/out/utils/nav-params/nav-params.d.ts.map +1 -1
- package/out/utils/nav-params/nav-params.js +5 -3
- package/package.json +4 -4
- package/src/controller/control/report-panel/generator/user-generator.ts +6 -3
- package/src/controller/utils/button-state/ui-action-button.state.ts +22 -2
- package/src/utils/nav-params/nav-params.ts +7 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-generator.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/report-panel/generator/user-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5D;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,wBAAwB;IACpE;;;;;OAKG;IACH,SAAS,CAAC,SAAS,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"user-generator.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/report-panel/generator/user-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5D;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,wBAAwB;IACpE;;;;;OAKG;IACH,SAAS,CAAC,SAAS,IAAI,IAAI;IAoC3B;;;;;;OAMG;IACI,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;CAMzC"}
|
|
@@ -27,18 +27,20 @@ export class UserReportPanelGenerator extends ReportPanelBaseGenerator {
|
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
NODELEGENDCONFIG: {
|
|
30
|
-
valueField: 'source_lables',
|
|
31
|
-
selected: "{{return Object.is(data.source_lables, 'NEO4J_ZT')}}",
|
|
30
|
+
valueField: 'source_lables||target_lables',
|
|
31
|
+
selected: "{{return Object.is(data.source_lables, 'NEO4J_ZT') || Object.is(data.target_lables, 'NEO4J_ZT')}}",
|
|
32
|
+
codeListTag: 'web.nodetype',
|
|
32
33
|
},
|
|
33
34
|
EDGELEGENDCONFIG: {
|
|
34
35
|
valueField: 'relationship_type',
|
|
36
|
+
codeListTag: 'web.relationshiptype',
|
|
35
37
|
},
|
|
36
38
|
PLUGINCONFIG: {
|
|
37
39
|
gridConfig: {},
|
|
38
40
|
miniMapConfig: {},
|
|
39
41
|
},
|
|
40
42
|
HOOKS: {
|
|
41
|
-
nodeDataHook: "{{ data.forEach(node => {Object.assign(node, { label: node.data.name, size: 66,donutAttrs: { prop1: 10000, prop2: 10 },donutColorMap: { prop1:
|
|
43
|
+
nodeDataHook: "{{ data.forEach(node => { const type = node.data.source_lables || node.data.target_lables; Object.assign(node, { label: node.data.name, size: 66, style: { fill: node.color },donutAttrs: { prop1: 10000, prop2: 10 },donutColorMap: { prop1: node.color, prop2: node.color },icon: {show: true,img: type === 'NEO4J_ZT' ? './assets/images/user-avatar.png' : './assets/images/phone.png',width: 40,height: 40}})})}}",
|
|
42
44
|
edgeDataHook: '{{ data.forEach(edge => {Object.assign(edge, { label: edge.name })}) }}',
|
|
43
45
|
},
|
|
44
46
|
};
|
|
@@ -22,8 +22,22 @@ export declare class UIActionButtonState implements IButtonState {
|
|
|
22
22
|
protected noPermissionHidden: boolean;
|
|
23
23
|
/**
|
|
24
24
|
* 有权限时且没数据时,是否禁用
|
|
25
|
+
*
|
|
26
|
+
* @author chitanda
|
|
27
|
+
* @date 2023-11-30 11:11:14
|
|
28
|
+
* @protected
|
|
29
|
+
* @type {boolean}
|
|
25
30
|
*/
|
|
26
31
|
protected noDataDisabled: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 有权限时且没主键时,是否禁用
|
|
34
|
+
*
|
|
35
|
+
* @author chitanda
|
|
36
|
+
* @date 2023-11-30 11:11:03
|
|
37
|
+
* @protected
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
*/
|
|
40
|
+
protected noKeyDisabled: boolean;
|
|
27
41
|
/**
|
|
28
42
|
* 操作标识
|
|
29
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-action-button.state.d.ts","sourceRoot":"","sources":["../../../../src/controller/utils/button-state/ui-action-button.state.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D;;;;;;;GAOG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IACtD,IAAI,EAAE,MAAM,CAAC;IAEb,QAAQ,EAAE,OAAO,CAAS;IAE1B,OAAO,EAAE,OAAO,CAAQ;IAExB,OAAO,EAAE,OAAO,CAAS;IAEzB;;OAEG;IACH,SAAS,CAAC,SAAS,EAAE,OAAO,CAAQ;IAEpC;;OAEG;IACH,SAAS,CAAC,kBAAkB,EAAE,OAAO,CAAQ;IAE7C
|
|
1
|
+
{"version":3,"file":"ui-action-button.state.d.ts","sourceRoot":"","sources":["../../../../src/controller/utils/button-state/ui-action-button.state.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAG7D;;;;;;;GAOG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IACtD,IAAI,EAAE,MAAM,CAAC;IAEb,QAAQ,EAAE,OAAO,CAAS;IAE1B,OAAO,EAAE,OAAO,CAAQ;IAExB,OAAO,EAAE,OAAO,CAAS;IAEzB;;OAEG;IACH,SAAS,CAAC,SAAS,EAAE,OAAO,CAAQ;IAEpC;;OAEG;IACH,SAAS,CAAC,kBAAkB,EAAE,OAAO,CAAQ;IAE7C;;;;;;;OAOG;IACH,SAAS,CAAC,cAAc,EAAE,OAAO,CAAS;IAE1C;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,EAAE,OAAO,CAAS;IAEzC;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAEpC;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,CAAS;gBAEtB,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAM5D;;;;;;OAMG;cACa,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAgDrC;;;;;;;;OAQG;cACa,cAAc,CAC5B,IAAI,CAAC,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;IAkBV,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAiB5D"}
|
|
@@ -22,8 +22,22 @@ export class UIActionButtonState {
|
|
|
22
22
|
this.noPermissionHidden = true;
|
|
23
23
|
/**
|
|
24
24
|
* 有权限时且没数据时,是否禁用
|
|
25
|
+
*
|
|
26
|
+
* @author chitanda
|
|
27
|
+
* @date 2023-11-30 11:11:14
|
|
28
|
+
* @protected
|
|
29
|
+
* @type {boolean}
|
|
25
30
|
*/
|
|
26
31
|
this.noDataDisabled = false;
|
|
32
|
+
/**
|
|
33
|
+
* 有权限时且没主键时,是否禁用
|
|
34
|
+
*
|
|
35
|
+
* @author chitanda
|
|
36
|
+
* @date 2023-11-30 11:11:03
|
|
37
|
+
* @protected
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
*/
|
|
40
|
+
this.noKeyDisabled = false;
|
|
27
41
|
/**
|
|
28
42
|
* 是否初始化
|
|
29
43
|
*/
|
|
@@ -70,6 +84,10 @@ export class UIActionButtonState {
|
|
|
70
84
|
'RemoveAndExit',
|
|
71
85
|
].includes(uiactionTag))) {
|
|
72
86
|
this.noDataDisabled = true;
|
|
87
|
+
// 单项数据主键或者多项数据主键的时候,没主键的时候需要禁用
|
|
88
|
+
if (actionTarget === 'SINGLEKEY' || actionTarget === 'MULTIKEY') {
|
|
89
|
+
this.noKeyDisabled = true;
|
|
90
|
+
}
|
|
73
91
|
}
|
|
74
92
|
this.isInit = true;
|
|
75
93
|
}
|
|
@@ -106,8 +124,9 @@ export class UIActionButtonState {
|
|
|
106
124
|
else {
|
|
107
125
|
// 有权限时显示
|
|
108
126
|
this.visible = true;
|
|
109
|
-
//
|
|
110
|
-
this.disabled =
|
|
127
|
+
// 有权限时没数据有些要禁用,有数据没主见时(单项数据)需要禁用
|
|
128
|
+
this.disabled =
|
|
129
|
+
this.noDataDisabled && (!data || (this.noKeyDisabled && !data.srfkey));
|
|
111
130
|
}
|
|
112
131
|
}
|
|
113
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-params.d.ts","sourceRoot":"","sources":["../../../src/utils/nav-params/nav-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,KAAK,GAAG,cAAc,EAAE,CAmB3E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,cAAc,EAAE,GAAG,KAAK,GAAG,SAAS,GAAG,IAAI,EACtD,GAAG,OAAO,EAAE,KAAK,EAAE,GAClB,KAAK,CAYP;AA8BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,cAAc,EAAE,EAC3B,GAAG,OAAO,EAAE,KAAK,EAAE,GAClB,KAAK,
|
|
1
|
+
{"version":3,"file":"nav-params.d.ts","sourceRoot":"","sources":["../../../src/utils/nav-params/nav-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,KAAK,GAAG,cAAc,EAAE,CAmB3E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,cAAc,EAAE,GAAG,KAAK,GAAG,SAAS,GAAG,IAAI,EACtD,GAAG,OAAO,EAAE,KAAK,EAAE,GAClB,KAAK,CAYP;AA8BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,cAAc,EAAE,EAC3B,GAAG,OAAO,EAAE,KAAK,EAAE,GAClB,KAAK,CAkCP;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,cAAc,EAAE,GAAG,KAAK,GAAG,SAAS,GAAG,IAAI,EACtD,OAAO,EAAE,KAAK,EAAE,GACf,KAAK,CAsBP"}
|
|
@@ -98,7 +98,9 @@ export function convertNavDataByArray(naviDatas, ...origins) {
|
|
|
98
98
|
let valueStr = naviData.value;
|
|
99
99
|
matchArr.forEach(key => {
|
|
100
100
|
// 没有${xxx}
|
|
101
|
-
const { find, value } = getVal(origins,
|
|
101
|
+
const { find, value } = getVal(origins,
|
|
102
|
+
// 去掉${},适配平台模型转小写取值
|
|
103
|
+
key.slice(2, -1).toLowerCase());
|
|
102
104
|
if (find) {
|
|
103
105
|
valueStr = valueStr.replace(key, `${value}`);
|
|
104
106
|
}
|
|
@@ -106,8 +108,8 @@ export function convertNavDataByArray(naviDatas, ...origins) {
|
|
|
106
108
|
result[naviData.key.toLowerCase()] = valueStr;
|
|
107
109
|
}
|
|
108
110
|
else {
|
|
109
|
-
// 没有${xxx}
|
|
110
|
-
const { find, value } = getVal(origins, naviData.value);
|
|
111
|
+
// 没有${xxx},适配平台模型转小写取值
|
|
112
|
+
const { find, value } = getVal(origins, naviData.value.toLowerCase());
|
|
111
113
|
if (find) {
|
|
112
114
|
result[naviData.key.toLowerCase()] = value;
|
|
113
115
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3-dev.1",
|
|
4
4
|
"description": "控制器包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@ibiz-template/core": "^0.4.0",
|
|
33
|
-
"@ibiz/model-core": "^0.0.
|
|
33
|
+
"@ibiz/model-core": "^0.0.22",
|
|
34
34
|
"@types/path-browserify": "^1.0.2",
|
|
35
35
|
"@types/qs": "^6.9.10",
|
|
36
36
|
"@types/systemjs": "^6.13.5",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@ibiz-template/core": "^0.4.0",
|
|
50
|
-
"@ibiz/model-core": "^0.0.
|
|
50
|
+
"@ibiz/model-core": "^0.0.22",
|
|
51
51
|
"async-validator": "^4.2.5",
|
|
52
52
|
"dayjs": "^1.11.7",
|
|
53
53
|
"echarts": "^5.4.3",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"qx-util": "^0.4.8",
|
|
60
60
|
"ramda": "^0.29.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "2a8d1bf53f9d3ac19722a0fc2da1da1cccf634f0"
|
|
63
63
|
}
|
|
@@ -28,11 +28,14 @@ export class UserReportPanelGenerator extends ReportPanelBaseGenerator {
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
NODELEGENDCONFIG: {
|
|
31
|
-
valueField: 'source_lables',
|
|
32
|
-
selected:
|
|
31
|
+
valueField: 'source_lables||target_lables',
|
|
32
|
+
selected:
|
|
33
|
+
"{{return Object.is(data.source_lables, 'NEO4J_ZT') || Object.is(data.target_lables, 'NEO4J_ZT')}}",
|
|
34
|
+
codeListTag: 'web.nodetype',
|
|
33
35
|
},
|
|
34
36
|
EDGELEGENDCONFIG: {
|
|
35
37
|
valueField: 'relationship_type',
|
|
38
|
+
codeListTag: 'web.relationshiptype',
|
|
36
39
|
},
|
|
37
40
|
PLUGINCONFIG: {
|
|
38
41
|
gridConfig: {},
|
|
@@ -40,7 +43,7 @@ export class UserReportPanelGenerator extends ReportPanelBaseGenerator {
|
|
|
40
43
|
},
|
|
41
44
|
HOOKS: {
|
|
42
45
|
nodeDataHook:
|
|
43
|
-
"{{ data.forEach(node => {Object.assign(node, { label: node.data.name, size: 66,donutAttrs: { prop1: 10000, prop2: 10 },donutColorMap: { prop1:
|
|
46
|
+
"{{ data.forEach(node => { const type = node.data.source_lables || node.data.target_lables; Object.assign(node, { label: node.data.name, size: 66, style: { fill: node.color },donutAttrs: { prop1: 10000, prop2: 10 },donutColorMap: { prop1: node.color, prop2: node.color },icon: {show: true,img: type === 'NEO4J_ZT' ? './assets/images/user-avatar.png' : './assets/images/phone.png',width: 40,height: 40}})})}}",
|
|
44
47
|
edgeDataHook:
|
|
45
48
|
'{{ data.forEach(edge => {Object.assign(edge, { label: edge.name })}) }}',
|
|
46
49
|
},
|
|
@@ -32,9 +32,24 @@ export class UIActionButtonState implements IButtonState {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* 有权限时且没数据时,是否禁用
|
|
35
|
+
*
|
|
36
|
+
* @author chitanda
|
|
37
|
+
* @date 2023-11-30 11:11:14
|
|
38
|
+
* @protected
|
|
39
|
+
* @type {boolean}
|
|
35
40
|
*/
|
|
36
41
|
protected noDataDisabled: boolean = false;
|
|
37
42
|
|
|
43
|
+
/**
|
|
44
|
+
* 有权限时且没主键时,是否禁用
|
|
45
|
+
*
|
|
46
|
+
* @author chitanda
|
|
47
|
+
* @date 2023-11-30 11:11:03
|
|
48
|
+
* @protected
|
|
49
|
+
* @type {boolean}
|
|
50
|
+
*/
|
|
51
|
+
protected noKeyDisabled: boolean = false;
|
|
52
|
+
|
|
38
53
|
/**
|
|
39
54
|
* 操作标识
|
|
40
55
|
*/
|
|
@@ -113,6 +128,10 @@ export class UIActionButtonState implements IButtonState {
|
|
|
113
128
|
].includes(uiactionTag!))
|
|
114
129
|
) {
|
|
115
130
|
this.noDataDisabled = true;
|
|
131
|
+
// 单项数据主键或者多项数据主键的时候,没主键的时候需要禁用
|
|
132
|
+
if (actionTarget === 'SINGLEKEY' || actionTarget === 'MULTIKEY') {
|
|
133
|
+
this.noKeyDisabled = true;
|
|
134
|
+
}
|
|
116
135
|
}
|
|
117
136
|
this.isInit = true;
|
|
118
137
|
}
|
|
@@ -159,8 +178,9 @@ export class UIActionButtonState implements IButtonState {
|
|
|
159
178
|
} else {
|
|
160
179
|
// 有权限时显示
|
|
161
180
|
this.visible = true;
|
|
162
|
-
//
|
|
163
|
-
this.disabled =
|
|
181
|
+
// 有权限时没数据有些要禁用,有数据没主见时(单项数据)需要禁用
|
|
182
|
+
this.disabled =
|
|
183
|
+
this.noDataDisabled && (!data || (this.noKeyDisabled && !data.srfkey));
|
|
164
184
|
}
|
|
165
185
|
}
|
|
166
186
|
}
|
|
@@ -116,15 +116,19 @@ export function convertNavDataByArray(
|
|
|
116
116
|
let valueStr = naviData.value!;
|
|
117
117
|
matchArr.forEach(key => {
|
|
118
118
|
// 没有${xxx}
|
|
119
|
-
const { find, value } = getVal(
|
|
119
|
+
const { find, value } = getVal(
|
|
120
|
+
origins,
|
|
121
|
+
// 去掉${},适配平台模型转小写取值
|
|
122
|
+
key.slice(2, -1).toLowerCase(),
|
|
123
|
+
);
|
|
120
124
|
if (find) {
|
|
121
125
|
valueStr = valueStr.replace(key, `${value}`);
|
|
122
126
|
}
|
|
123
127
|
});
|
|
124
128
|
result[naviData.key!.toLowerCase()] = valueStr;
|
|
125
129
|
} else {
|
|
126
|
-
// 没有${xxx}
|
|
127
|
-
const { find, value } = getVal(origins, naviData.value
|
|
130
|
+
// 没有${xxx},适配平台模型转小写取值
|
|
131
|
+
const { find, value } = getVal(origins, naviData.value!.toLowerCase());
|
|
128
132
|
if (find) {
|
|
129
133
|
result[naviData.key!.toLowerCase()] = value;
|
|
130
134
|
}
|