@gct-paas/core-web 0.1.6-dev.6 → 0.1.6-dev.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/ColorPicker-DFKXqgaG.js +1 -0
- package/dist/_plugin-vue_export-helper-CGzGcWFX.js +1 -0
- package/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +1 -1
- package/dist/{monaco-editor-BTqXEIZI.js → monaco-editor-CQJ9TMzD.js} +1 -1
- package/dist/{template-1ZQd8Z1w.js → template-CXn8oAg5.js} +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +2 -0
- package/es/components/paas-bpmn-log/components/approval-node.vue.mjs +2 -2
- package/es/components/paas-bpmn-log/components/approval-node.vue_vue_type_script_setup_true_lang.mjs +1 -2
- package/es/components/paas-bpmn-log/components/{approval-node.vue_vue_type_style_index_0_scoped_a88d7ef9_lang.css → approval-node.vue_vue_type_style_index_0_scoped_a8065b24_lang.css} +9 -9
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue.mjs +2 -2
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue_vue_type_script_setup_true_lang.mjs +1 -2
- package/es/components/paas-bpmn-log/{paas-bpmn-log.vue_vue_type_style_index_0_scoped_c85122b0_lang.css → paas-bpmn-log.vue_vue_type_style_index_0_scoped_eb574523_lang.css} +9 -9
- package/es/components/select-user-modal/deptUser.vue.d.ts +9 -0
- package/es/components/select-user-modal/deptUser.vue.mjs +7 -0
- package/es/components/select-user-modal/deptUser.vue_vue_type_script_setup_true_name_deptUser_lang.mjs +296 -0
- package/es/components/select-user-modal/deptUser.vue_vue_type_style_index_0_scoped_02dff7bf_lang.css +40 -0
- package/es/components/select-user-modal/index.d.ts +2 -0
- package/es/components/select-user-modal/index.mjs +1 -0
- package/es/components/select-user-modal/range-role.vue.d.ts +9 -0
- package/es/components/select-user-modal/range-role.vue.mjs +7 -0
- package/es/components/select-user-modal/range-role.vue_vue_type_script_setup_true_name_role_lang.mjs +137 -0
- package/es/components/select-user-modal/range-role.vue_vue_type_style_index_0_scoped_1241bcdf_lang.css +34 -0
- package/es/components/select-user-modal/select-user-modal.vue.d.ts +12 -0
- package/es/components/select-user-modal/select-user-modal.vue.mjs +7 -0
- package/es/components/select-user-modal/select-user-modal.vue_vue_type_script_setup_true_name_select-user-modal_lang.mjs +123 -0
- package/es/components/select-user-modal/select-user-modal.vue_vue_type_style_index_0_scoped_2c0f184c_lang.css +14 -0
- package/es/components/select-user-modal/userGroup.vue.d.ts +9 -0
- package/es/components/select-user-modal/userGroup.vue.mjs +7 -0
- package/es/components/select-user-modal/userGroup.vue_vue_type_script_setup_true_name_userGroup_lang.mjs +149 -0
- package/es/components/select-user-modal/userGroup.vue_vue_type_style_index_0_scoped_47d1cbaa_lang.css +19 -0
- package/es/create-app-vue.d.ts +2 -2
- package/es/create-app-vue.mjs +3 -3
- package/es/index.d.ts +1 -0
- package/es/index.mjs +5 -1
- package/es/modules/data-rules-container/index.d.ts +3 -0
- package/es/modules/data-rules-container/index.mjs +2 -0
- package/es/modules/data-rules-container/src/components/header-action.vue.d.ts +10 -0
- package/es/modules/data-rules-container/src/components/header-action.vue.mjs +7 -0
- package/es/modules/data-rules-container/src/components/header-action.vue_vue_type_script_setup_true_name_header-action_lang.mjs +36 -0
- package/es/modules/data-rules-container/src/components/header-action.vue_vue_type_style_index_0_scoped_4e281013_lang.css +32 -0
- package/es/modules/data-rules-container/src/components/ndo-select-cmp.vue.d.ts +8 -0
- package/es/modules/data-rules-container/src/components/ndo-select-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/ndo-select-cmp.vue_vue_type_script_setup_true_lang.mjs +266 -0
- package/es/modules/data-rules-container/src/components/perm-action-node.vue.d.ts +22 -0
- package/es/modules/data-rules-container/src/components/perm-action-node.vue.mjs +7 -0
- package/es/modules/data-rules-container/src/components/perm-action-node.vue_vue_type_script_setup_true_name_perm-action-node_lang.mjs +384 -0
- package/es/modules/data-rules-container/src/components/perm-action-node.vue_vue_type_style_index_0_scoped_417c660f_lang.css +73 -0
- package/es/modules/data-rules-container/src/components/perm-root-node.vue.d.ts +3 -0
- package/es/modules/data-rules-container/src/components/perm-root-node.vue.mjs +7 -0
- package/es/modules/data-rules-container/src/components/perm-root-node.vue_vue_type_script_setup_true_name_perm-root-node_lang.mjs +61 -0
- package/es/modules/data-rules-container/src/components/perm-root-node.vue_vue_type_style_index_0_scoped_ca5c9d20_lang.css +74 -0
- package/es/modules/data-rules-container/src/components/rdo-select-cmp.vue.d.ts +11 -0
- package/es/modules/data-rules-container/src/components/rdo-select-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/rdo-select-cmp.vue_vue_type_script_setup_true_lang.mjs +93 -0
- package/es/modules/data-rules-container/src/components/request-select-cmp.vue.d.ts +9 -0
- package/es/modules/data-rules-container/src/components/request-select-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/request-select-cmp.vue_vue_type_script_setup_true_name_request-select-cmp_lang.mjs +117 -0
- package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue.d.ts +3 -0
- package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue.mjs +6 -0
- package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue_vue_type_script_name_gct-select_setup_true_lang.mjs +100 -0
- package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue_vue_type_style_index_0_lang.css +21 -0
- package/es/modules/data-rules-container/src/components/select-modal-cmp.vue.d.ts +32 -0
- package/es/modules/data-rules-container/src/components/select-modal-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/select-modal-cmp.vue_vue_type_script_setup_true_name_select-modal-cmp_lang.mjs +268 -0
- package/es/modules/data-rules-container/src/components/select-more.vue.d.ts +8 -0
- package/es/modules/data-rules-container/src/components/select-more.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/select-more.vue_vue_type_script_setup_true_lang.mjs +26 -0
- package/es/modules/data-rules-container/src/components/select-userdep-cmp.vue.d.ts +12 -0
- package/es/modules/data-rules-container/src/components/select-userdep-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/select-userdep-cmp.vue_vue_type_script_setup_true_name_select-userdep-cmp_lang.mjs +103 -0
- package/es/modules/data-rules-container/src/components/tree-action-node.vue.d.ts +25 -0
- package/es/modules/data-rules-container/src/components/tree-action-node.vue.mjs +7 -0
- package/es/modules/data-rules-container/src/components/tree-action-node.vue_vue_type_script_setup_true_name_tree-action-node_lang.mjs +544 -0
- package/es/modules/data-rules-container/src/components/tree-action-node.vue_vue_type_style_index_0_scoped_46368089_lang.css +67 -0
- package/es/modules/data-rules-container/src/components/tree-root-node.vue.d.ts +3 -0
- package/es/modules/data-rules-container/src/components/tree-root-node.vue.mjs +7 -0
- package/es/modules/data-rules-container/src/components/tree-root-node.vue_vue_type_script_setup_true_name_tree-root-node_lang.mjs +105 -0
- package/es/modules/data-rules-container/src/components/tree-root-node.vue_vue_type_style_index_0_scoped_37e323fb_lang.css +29 -0
- package/es/modules/data-rules-container/src/components/tree-select-cmp.vue.d.ts +3 -0
- package/es/modules/data-rules-container/src/components/tree-select-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/tree-select-cmp.vue_vue_type_script_name_gct-select_setup_true_lang.mjs +89 -0
- package/es/modules/data-rules-container/src/constant/config.d.ts +146 -0
- package/es/modules/data-rules-container/src/constant/config.mjs +548 -0
- package/es/modules/data-rules-container/src/constant/interface.d.ts +85 -0
- package/es/modules/data-rules-container/src/constant/interface.mjs +36 -0
- package/es/modules/data-rules-container/src/data-rules-container.vue.d.ts +45 -0
- package/es/modules/data-rules-container/src/data-rules-container.vue.mjs +6 -0
- package/es/modules/data-rules-container/src/data-rules-container.vue_vue_type_script_setup_true_name_data-rules-container_lang.mjs +234 -0
- package/es/modules/data-rules-container/src/data-rules-container.vue_vue_type_style_index_0_lang.css +149 -0
- package/es/modules/data-rules-container/src/field-role-container.vue.d.ts +14 -0
- package/es/modules/data-rules-container/src/field-role-container.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/field-role-container.vue_vue_type_script_setup_true_name_field-role-container_lang.mjs +73 -0
- package/es/modules/data-rules-container/src/hooks/useDataRulesTree.d.ts +30 -0
- package/es/modules/data-rules-container/src/hooks/useDataRulesTree.mjs +317 -0
- package/es/modules/data-rules-container/src/hooks/useEmitter.d.ts +10 -0
- package/es/modules/data-rules-container/src/hooks/useRdoHooks.d.ts +37 -0
- package/es/modules/data-rules-container/src/hooks/useRdoHooks.mjs +144 -0
- package/es/modules/data-rules-container/src/hooks/useRole.d.ts +8 -0
- package/es/modules/data-rules-container/src/typing.d.ts +40 -0
- package/package.json +9 -9
- package/dist/ColorPicker-DGQQb8I7.js +0 -1
- package/dist/_plugin-vue_export-helper-C9hXqKoS.js +0 -1
- package/es/components/paas-bpmn-log/hooks/useObserver.mjs +0 -46
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
import { cloneDeep, has, isEmpty, merge, omit, pick } from "lodash-es";
|
|
2
|
+
import { FIELD_TYPE, SEARCH_SERVICE, t } from "@gct-paas/core";
|
|
3
|
+
//#region src/modules/data-rules-container/src/constant/config.ts
|
|
4
|
+
var Ch_FieldTypeName = {
|
|
5
|
+
[FIELD_TYPE.DATE]: t("sys.webRender.date"),
|
|
6
|
+
[FIELD_TYPE.TIME]: t("sys.webRender.time"),
|
|
7
|
+
[FIELD_TYPE.DATE_TIME]: t("sys.webRender.dateTime"),
|
|
8
|
+
[FIELD_TYPE.ORG]: "",
|
|
9
|
+
[FIELD_TYPE.ORG_MULTI]: "",
|
|
10
|
+
[FIELD_TYPE.USER]: t("sys.webRender.user"),
|
|
11
|
+
[FIELD_TYPE.USER_MULTI]: t("sys.webRender.user")
|
|
12
|
+
};
|
|
13
|
+
/** 【人员、部门】系统变量 */
|
|
14
|
+
var UserSystemEnum = /* @__PURE__ */ function(UserSystemEnum) {
|
|
15
|
+
/** 当前登录用户 */
|
|
16
|
+
UserSystemEnum["CUR_USER"] = "__CUR_USER__";
|
|
17
|
+
/** 当前登录用户所在部门人员 */
|
|
18
|
+
UserSystemEnum["CUR_USER_ORG"] = "__CUR_USER_ORG__";
|
|
19
|
+
/** 当前登录用户所在主部门人员 */
|
|
20
|
+
UserSystemEnum["CUR_USER_MASTER_ORG"] = "__CUR_USER_MASTER_ORG__";
|
|
21
|
+
/** 当前登录用户所负责部门人员 */
|
|
22
|
+
UserSystemEnum["CUR_USER_PRINCIPAL_ORG"] = "__CUR_USER_PRINCIPAL_ORG__";
|
|
23
|
+
/** 当前登录用户直属下属 */
|
|
24
|
+
UserSystemEnum["CUR_USER_DIRECT_SUBORDINATE"] = "__CUR_USER_DIRECT_SUBORDINATE__";
|
|
25
|
+
return UserSystemEnum;
|
|
26
|
+
}({});
|
|
27
|
+
/** 【日期、日期时间、时间】系统变量 */
|
|
28
|
+
var DateSystemEnum = /* @__PURE__ */ function(DateSystemEnum) {
|
|
29
|
+
/** 系统当前【日期|日期时间|时间 】 */
|
|
30
|
+
DateSystemEnum["NOW"] = "__NOW__";
|
|
31
|
+
/** 当天 */
|
|
32
|
+
DateSystemEnum["CUR_DAY"] = "__CUR_DAY__";
|
|
33
|
+
/** 本周 */
|
|
34
|
+
DateSystemEnum["CUR_WEEK"] = "__CUR_WEEK__";
|
|
35
|
+
/** 本月 */
|
|
36
|
+
DateSystemEnum["CUR_MONTH"] = "__CUR_MONTH__";
|
|
37
|
+
/** 本年 */
|
|
38
|
+
DateSystemEnum["CUR_YEAR"] = "__CUR_YEAR__";
|
|
39
|
+
return DateSystemEnum;
|
|
40
|
+
}({});
|
|
41
|
+
var UserSystemKeys = [
|
|
42
|
+
UserSystemEnum.CUR_USER,
|
|
43
|
+
UserSystemEnum.CUR_USER_ORG,
|
|
44
|
+
UserSystemEnum.CUR_USER_MASTER_ORG,
|
|
45
|
+
UserSystemEnum.CUR_USER_PRINCIPAL_ORG,
|
|
46
|
+
UserSystemEnum.CUR_USER_DIRECT_SUBORDINATE
|
|
47
|
+
];
|
|
48
|
+
var DateSystemKeys = [
|
|
49
|
+
DateSystemEnum.NOW,
|
|
50
|
+
DateSystemEnum.CUR_DAY,
|
|
51
|
+
DateSystemEnum.CUR_WEEK,
|
|
52
|
+
DateSystemEnum.CUR_MONTH,
|
|
53
|
+
DateSystemEnum.CUR_YEAR
|
|
54
|
+
];
|
|
55
|
+
/** 系统变量对应中文翻译 */
|
|
56
|
+
var Ch_SystemVars = {
|
|
57
|
+
[DateSystemEnum.NOW]: (text) => t("sys.webRender.sysNow", { text: t(text) }),
|
|
58
|
+
[DateSystemEnum.CUR_DAY]: () => t("sys.webRender.curDay"),
|
|
59
|
+
[DateSystemEnum.CUR_WEEK]: () => t("sys.webRender.curWeek"),
|
|
60
|
+
[DateSystemEnum.CUR_MONTH]: () => t("sys.webRender.curMonth"),
|
|
61
|
+
[DateSystemEnum.CUR_YEAR]: () => t("sys.webRender.curYear"),
|
|
62
|
+
[UserSystemEnum.CUR_USER]: () => t("sys.webRender.curUser"),
|
|
63
|
+
[UserSystemEnum.CUR_USER_ORG]: (text) => t("sys.webRender.curUserOrg", { text }),
|
|
64
|
+
[UserSystemEnum.CUR_USER_MASTER_ORG]: (text) => t("sys.webRender.curUserMasterOrg", { text }),
|
|
65
|
+
[UserSystemEnum.CUR_USER_PRINCIPAL_ORG]: (text) => t("sys.webRender.curUserPrincipalOrg", { text }),
|
|
66
|
+
[UserSystemEnum.CUR_USER_DIRECT_SUBORDINATE]: t("sys.webRender.curUserDirectSubordinate")
|
|
67
|
+
};
|
|
68
|
+
/** 数据类型 */
|
|
69
|
+
var ValueTypeEnum = /* @__PURE__ */ function(ValueTypeEnum) {
|
|
70
|
+
/** 固定值 */
|
|
71
|
+
ValueTypeEnum["FIXED"] = "FIXED";
|
|
72
|
+
/** 系统变量 */
|
|
73
|
+
ValueTypeEnum["SYS"] = "SYS";
|
|
74
|
+
/** 字段*/
|
|
75
|
+
ValueTypeEnum["FIELD"] = "FIELD";
|
|
76
|
+
/** 变量*/
|
|
77
|
+
ValueTypeEnum["VAR"] = "VAR";
|
|
78
|
+
/** 组件传参 */
|
|
79
|
+
ValueTypeEnum["COMP_PARAMS"] = "COMP_PARAMS";
|
|
80
|
+
/** 内置参数 */
|
|
81
|
+
ValueTypeEnum["BUILT_PARAMS"] = "BUILT_PARAMS";
|
|
82
|
+
return ValueTypeEnum;
|
|
83
|
+
}({});
|
|
84
|
+
/** 数据类型对应中文翻译 */
|
|
85
|
+
var Ch_ValueType = {
|
|
86
|
+
[ValueTypeEnum.FIXED]: {
|
|
87
|
+
name: t("sys.webRender.fixed"),
|
|
88
|
+
abbr: t("sys.webRender.fixedAbbr")
|
|
89
|
+
},
|
|
90
|
+
[ValueTypeEnum.SYS]: {
|
|
91
|
+
name: t("sys.webRender.system"),
|
|
92
|
+
abbr: t("sys.webRender.systemAbbr")
|
|
93
|
+
},
|
|
94
|
+
[ValueTypeEnum.FIELD]: {
|
|
95
|
+
name: t("sys.webRender.field"),
|
|
96
|
+
abbr: t("sys.webRender.fieldAbbr")
|
|
97
|
+
},
|
|
98
|
+
[ValueTypeEnum.VAR]: {
|
|
99
|
+
name: t("sys.webRender.var"),
|
|
100
|
+
abbr: t("sys.webRender.varAbbr")
|
|
101
|
+
},
|
|
102
|
+
[ValueTypeEnum.COMP_PARAMS]: {
|
|
103
|
+
name: "组件传参",
|
|
104
|
+
abbr: "组"
|
|
105
|
+
},
|
|
106
|
+
[ValueTypeEnum.BUILT_PARAMS]: {
|
|
107
|
+
name: "内置传参",
|
|
108
|
+
abbr: "内"
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
/** 组件类型 */
|
|
112
|
+
var ComponentTypeEnum = /* @__PURE__ */ function(ComponentTypeEnum) {
|
|
113
|
+
/** 输入框 */
|
|
114
|
+
ComponentTypeEnum["INPUT"] = "input";
|
|
115
|
+
/** 下拉列表框 */
|
|
116
|
+
ComponentTypeEnum["SELECT"] = "select";
|
|
117
|
+
/** 有接口请求的下拉列表框 */
|
|
118
|
+
ComponentTypeEnum["REQUEST_SELECT"] = "request_select";
|
|
119
|
+
/** 日期选择器 */
|
|
120
|
+
ComponentTypeEnum["DATEPICKER"] = "datePicker";
|
|
121
|
+
/** 自定义 */
|
|
122
|
+
ComponentTypeEnum["CUSTOM"] = "custom";
|
|
123
|
+
/** 树形下拉选择框 */
|
|
124
|
+
ComponentTypeEnum["REQUEST_TREE_SELECT"] = "request_tree_select";
|
|
125
|
+
/** ndo下拉选择框 */
|
|
126
|
+
ComponentTypeEnum["NDO_SELECT"] = "NdoSelect";
|
|
127
|
+
/** rdo下拉选择框 */
|
|
128
|
+
ComponentTypeEnum["RDO_SELECT"] = "RdoSelect";
|
|
129
|
+
/** tree下拉选择框 */
|
|
130
|
+
ComponentTypeEnum["TREE_SELECT"] = "TreeSelect";
|
|
131
|
+
/** 选择我内置参数弹框 */
|
|
132
|
+
ComponentTypeEnum["SELECT_BUILTIN_PARAMS"] = "select_builtin_params";
|
|
133
|
+
/** 弹窗选择框 */
|
|
134
|
+
ComponentTypeEnum["MODAL_SELECT"] = "modal_select";
|
|
135
|
+
return ComponentTypeEnum;
|
|
136
|
+
}({});
|
|
137
|
+
/** 组件闭合类型 */
|
|
138
|
+
var RangTypeEnum = /* @__PURE__ */ function(RangTypeEnum) {
|
|
139
|
+
/** 单个 */
|
|
140
|
+
RangTypeEnum["Single"] = "single";
|
|
141
|
+
/** 组合 */
|
|
142
|
+
RangTypeEnum["Comb"] = "comb";
|
|
143
|
+
/** 隐藏 */
|
|
144
|
+
RangTypeEnum["Hidden"] = "hidden";
|
|
145
|
+
return RangTypeEnum;
|
|
146
|
+
}({});
|
|
147
|
+
var BoolOptions = [{
|
|
148
|
+
label: t("sys.webRender.booleanTrue"),
|
|
149
|
+
value: "true"
|
|
150
|
+
}, {
|
|
151
|
+
label: t("sys.webRender.booleanFalse"),
|
|
152
|
+
value: "false"
|
|
153
|
+
}];
|
|
154
|
+
var MultiOperatorTypes = [
|
|
155
|
+
SEARCH_SERVICE.CONTAINANY,
|
|
156
|
+
SEARCH_SERVICE.CONTAINALL,
|
|
157
|
+
SEARCH_SERVICE.IN,
|
|
158
|
+
SEARCH_SERVICE.NOTIN,
|
|
159
|
+
SEARCH_SERVICE.VERSIONIN,
|
|
160
|
+
SEARCH_SERVICE.VERSIONNOTIN
|
|
161
|
+
];
|
|
162
|
+
var getCmpDisplayStatus = (rangType) => {
|
|
163
|
+
if ([SEARCH_SERVICE.ISNOTNULL, SEARCH_SERVICE.ISNULL].includes(rangType)) return RangTypeEnum.Hidden;
|
|
164
|
+
if ([
|
|
165
|
+
SEARCH_SERVICE.RANGE,
|
|
166
|
+
SEARCH_SERVICE.ORANGE,
|
|
167
|
+
SEARCH_SERVICE.RORANGE,
|
|
168
|
+
SEARCH_SERVICE.LORANGE
|
|
169
|
+
].includes(rangType)) return RangTypeEnum.Comb;
|
|
170
|
+
return RangTypeEnum.Single;
|
|
171
|
+
};
|
|
172
|
+
var getBasicModelApi = (fieldType) => {
|
|
173
|
+
if (fieldType === FIELD_TYPE.TRANSACTION) return _api.apaas.designerCommon.getTableEntityModelList;
|
|
174
|
+
if (fieldType === FIELD_TYPE.MESSAGE_TMPL) return _api.apaas.messageTmpl.getList;
|
|
175
|
+
if (fieldType === FIELD_TYPE.PRINTER) return _api.apaas.print.getPrintDropdownList;
|
|
176
|
+
if (fieldType === FIELD_TYPE.RDO_REF) return _api.apaas.bizService.postModelKeyBsKey;
|
|
177
|
+
return _api.apaas.modelData.postQueryRefData;
|
|
178
|
+
};
|
|
179
|
+
var getBasicModelApiParams = ({ fieldType, bindInfo, modelKey, fieldKey, refModelType }) => {
|
|
180
|
+
if (fieldType === FIELD_TYPE.RDO_REF) return {
|
|
181
|
+
bsKey: "rdoListAll",
|
|
182
|
+
modelKey: bindInfo
|
|
183
|
+
};
|
|
184
|
+
if ([FIELD_TYPE.PRINTER].includes(fieldType)) return { fieldType };
|
|
185
|
+
if ([FIELD_TYPE.TRANSACTION].includes(fieldType)) return { type: "TRANSACTION" };
|
|
186
|
+
if ([FIELD_TYPE.MESSAGE_TMPL].includes(fieldType)) return {};
|
|
187
|
+
return {
|
|
188
|
+
modelKey,
|
|
189
|
+
fieldKey,
|
|
190
|
+
bindModelKey: bindInfo,
|
|
191
|
+
...refModelType !== "TREE" && {
|
|
192
|
+
pageNo: 1,
|
|
193
|
+
pageSize: 30
|
|
194
|
+
},
|
|
195
|
+
...refModelType === "TREE" && { searchType: "ALL" }
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
var getCompAttrs = ({ fieldType, operatorType, modelKey, fieldKey, bindInfo, refModelType }) => {
|
|
199
|
+
const attrs = {};
|
|
200
|
+
if ([
|
|
201
|
+
"NDO",
|
|
202
|
+
"RDO",
|
|
203
|
+
"TREE",
|
|
204
|
+
"BASE"
|
|
205
|
+
].includes(fieldType)) {
|
|
206
|
+
Object.assign(attrs, { apiParams: { modelKey: fieldKey } });
|
|
207
|
+
return attrs;
|
|
208
|
+
}
|
|
209
|
+
if (fieldType === FIELD_TYPE.DATE) Object.assign(attrs, { picker: "date" });
|
|
210
|
+
else if (fieldType === FIELD_TYPE.TIME) Object.assign(attrs, { picker: "time" });
|
|
211
|
+
else if (fieldType === FIELD_TYPE.DATE_TIME) Object.assign(attrs, { showTime: true });
|
|
212
|
+
else if ([
|
|
213
|
+
FIELD_TYPE.USER,
|
|
214
|
+
FIELD_TYPE.USER_MULTI,
|
|
215
|
+
FIELD_TYPE.ORG,
|
|
216
|
+
FIELD_TYPE.ORG_MULTI
|
|
217
|
+
].includes(fieldType)) Object.assign(attrs, {
|
|
218
|
+
supportModalType: [FIELD_TYPE.ORG_MULTI, FIELD_TYPE.ORG].includes(fieldType) ? "org" : [
|
|
219
|
+
SEARCH_SERVICE.CONTAINALL,
|
|
220
|
+
SEARCH_SERVICE.EQ,
|
|
221
|
+
SEARCH_SERVICE.NE,
|
|
222
|
+
SEARCH_SERVICE.IN,
|
|
223
|
+
SEARCH_SERVICE.NOTIN
|
|
224
|
+
].includes(operatorType) ? "user" : "user&org",
|
|
225
|
+
mode: MultiOperatorTypes.includes(operatorType) ? "multiple" : "",
|
|
226
|
+
pickerCompParams: {
|
|
227
|
+
modelKey,
|
|
228
|
+
fieldKey,
|
|
229
|
+
multiple: MultiOperatorTypes.includes(operatorType)
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
else if ([FIELD_TYPE.OPTION, FIELD_TYPE.OPTION_MULTI].includes(fieldType)) console.log("OPTION", fieldType);
|
|
233
|
+
else if ([FIELD_TYPE.RANGE_USER, FIELD_TYPE.LABEL_TEMPLATE_REF].includes(fieldType)) Object.assign(attrs, {
|
|
234
|
+
supportModalType: fieldType === FIELD_TYPE.RANGE_USER ? "range_user" : "label_template_ref",
|
|
235
|
+
mode: MultiOperatorTypes.includes(operatorType) ? "multiple" : "",
|
|
236
|
+
pickerCompParams: {
|
|
237
|
+
modelKey,
|
|
238
|
+
fieldKey,
|
|
239
|
+
multiple: MultiOperatorTypes.includes(operatorType)
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
else if ([
|
|
243
|
+
FIELD_TYPE.ENUM,
|
|
244
|
+
FIELD_TYPE.ENUM_MULTI,
|
|
245
|
+
FIELD_TYPE.REF,
|
|
246
|
+
FIELD_TYPE.REF_MULTI,
|
|
247
|
+
FIELD_TYPE.RDO_REF,
|
|
248
|
+
FIELD_TYPE.PRIMARY_KEY,
|
|
249
|
+
FIELD_TYPE.TRANSACTION,
|
|
250
|
+
FIELD_TYPE.MESSAGE_TMPL,
|
|
251
|
+
FIELD_TYPE.PRINTER
|
|
252
|
+
].includes(fieldType)) {
|
|
253
|
+
const isSupportMultiple = ![SEARCH_SERVICE.EQ, SEARCH_SERVICE.NE].includes(operatorType);
|
|
254
|
+
Object.assign(attrs, { mode: isSupportMultiple ? "multiple" : "" });
|
|
255
|
+
if ([
|
|
256
|
+
FIELD_TYPE.REF,
|
|
257
|
+
FIELD_TYPE.REF_MULTI,
|
|
258
|
+
FIELD_TYPE.RDO_REF,
|
|
259
|
+
FIELD_TYPE.PRIMARY_KEY,
|
|
260
|
+
FIELD_TYPE.TRANSACTION,
|
|
261
|
+
FIELD_TYPE.MESSAGE_TMPL,
|
|
262
|
+
FIELD_TYPE.PRINTER
|
|
263
|
+
].includes(fieldType)) Object.assign(attrs, {
|
|
264
|
+
showSearch: true,
|
|
265
|
+
multiple: isSupportMultiple,
|
|
266
|
+
api: getBasicModelApi(fieldType),
|
|
267
|
+
apiParams: getBasicModelApiParams({
|
|
268
|
+
fieldType,
|
|
269
|
+
bindInfo,
|
|
270
|
+
modelKey,
|
|
271
|
+
fieldKey,
|
|
272
|
+
refModelType
|
|
273
|
+
})
|
|
274
|
+
});
|
|
275
|
+
else Object.assign(attrs, {
|
|
276
|
+
api: _api.apaas.enumModelField.getPageList,
|
|
277
|
+
apiParams: {
|
|
278
|
+
pageSize: 9999,
|
|
279
|
+
enumModelKey: bindInfo
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
return attrs;
|
|
284
|
+
};
|
|
285
|
+
var getUserDepFilter = ({ operatorType, fieldType }) => {
|
|
286
|
+
const isSingle = [FIELD_TYPE.USER, FIELD_TYPE.ORG].includes(fieldType) && [SEARCH_SERVICE.EQ, SEARCH_SERVICE.NE].includes(operatorType);
|
|
287
|
+
return {
|
|
288
|
+
type: operatorType === SEARCH_SERVICE.CONTAINALL || isSingle ? "contain" : "exclude",
|
|
289
|
+
list: operatorType === SEARCH_SERVICE.CONTAINALL || isSingle ? [[FIELD_TYPE.ORG_MULTI, FIELD_TYPE.ORG].includes(fieldType) ? UserSystemEnum.CUR_USER_MASTER_ORG : UserSystemEnum.CUR_USER] : [FIELD_TYPE.ORG_MULTI, FIELD_TYPE.ORG].includes(fieldType) ? [UserSystemEnum.CUR_USER, UserSystemEnum.CUR_USER_DIRECT_SUBORDINATE] : []
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
var getModelComp = ({ refModelType, fieldType }) => {
|
|
293
|
+
if (refModelType === "TREE" || fieldType === FIELD_TYPE.PRINTER) return ComponentTypeEnum.REQUEST_TREE_SELECT;
|
|
294
|
+
return ComponentTypeEnum.REQUEST_SELECT;
|
|
295
|
+
};
|
|
296
|
+
var CmpConfig = {
|
|
297
|
+
basicText: {
|
|
298
|
+
isDefault: true,
|
|
299
|
+
comps: ComponentTypeEnum.INPUT
|
|
300
|
+
},
|
|
301
|
+
[FIELD_TYPE.BOOLEAN]: {
|
|
302
|
+
isDefault: true,
|
|
303
|
+
comps: ComponentTypeEnum.SELECT,
|
|
304
|
+
compAttrs: { options: BoolOptions }
|
|
305
|
+
},
|
|
306
|
+
basicDate: {
|
|
307
|
+
comps: [ComponentTypeEnum.DATEPICKER, ComponentTypeEnum.SELECT],
|
|
308
|
+
compAttrs: [getCompAttrs, {
|
|
309
|
+
optionsKeys: [...DateSystemKeys],
|
|
310
|
+
filter: {
|
|
311
|
+
type: "contain",
|
|
312
|
+
list: [DateSystemEnum.NOW]
|
|
313
|
+
}
|
|
314
|
+
}]
|
|
315
|
+
},
|
|
316
|
+
basicUserDep: {
|
|
317
|
+
typeKeys: [ValueTypeEnum.FIXED, ValueTypeEnum.SYS],
|
|
318
|
+
default: ValueTypeEnum.FIXED,
|
|
319
|
+
comps: [ComponentTypeEnum.CUSTOM, ComponentTypeEnum.SELECT],
|
|
320
|
+
compAttrs: [getCompAttrs, {
|
|
321
|
+
optionsKeys: [...UserSystemKeys],
|
|
322
|
+
filter: getUserDepFilter
|
|
323
|
+
}]
|
|
324
|
+
},
|
|
325
|
+
basicModalSel: {
|
|
326
|
+
isDefault: true,
|
|
327
|
+
comps: ComponentTypeEnum.MODAL_SELECT,
|
|
328
|
+
compAttrs: getCompAttrs
|
|
329
|
+
},
|
|
330
|
+
basicEnum: {
|
|
331
|
+
isDefault: true,
|
|
332
|
+
comps: ComponentTypeEnum.REQUEST_SELECT,
|
|
333
|
+
compAttrs: getCompAttrs
|
|
334
|
+
},
|
|
335
|
+
basicModel: {
|
|
336
|
+
isDefault: true,
|
|
337
|
+
comps: getModelComp,
|
|
338
|
+
compAttrs: getCompAttrs
|
|
339
|
+
},
|
|
340
|
+
NDO: {
|
|
341
|
+
isDefault: true,
|
|
342
|
+
comps: ComponentTypeEnum.NDO_SELECT,
|
|
343
|
+
compAttrs: getCompAttrs
|
|
344
|
+
},
|
|
345
|
+
RDO: {
|
|
346
|
+
isDefault: true,
|
|
347
|
+
comps: ComponentTypeEnum.RDO_SELECT,
|
|
348
|
+
compAttrs: getCompAttrs
|
|
349
|
+
},
|
|
350
|
+
TREE: {
|
|
351
|
+
isDefault: true,
|
|
352
|
+
comps: ComponentTypeEnum.TREE_SELECT,
|
|
353
|
+
compAttrs: getCompAttrs
|
|
354
|
+
},
|
|
355
|
+
BASE: {
|
|
356
|
+
isDefault: true,
|
|
357
|
+
comps: ComponentTypeEnum.NDO_SELECT,
|
|
358
|
+
compAttrs: getCompAttrs
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
var filterOperatorTypes = [
|
|
362
|
+
SEARCH_SERVICE.RANGE,
|
|
363
|
+
SEARCH_SERVICE.ORANGE,
|
|
364
|
+
SEARCH_SERVICE.RORANGE,
|
|
365
|
+
SEARCH_SERVICE.LORANGE,
|
|
366
|
+
SEARCH_SERVICE.IN,
|
|
367
|
+
SEARCH_SERVICE.NOTIN,
|
|
368
|
+
SEARCH_SERVICE.CONTAINANY,
|
|
369
|
+
SEARCH_SERVICE.CONTAINALL,
|
|
370
|
+
SEARCH_SERVICE.VERSIONIN,
|
|
371
|
+
SEARCH_SERVICE.VERSIONNOTIN
|
|
372
|
+
];
|
|
373
|
+
var getCmpConfig = ({ fieldType, operatorType, modelKey, fieldKey, bindInfo, valueType, refModelType, fieldOptions, mainModelKey, isPageDesigner, isOnlineFormDesigner, varOptions }) => {
|
|
374
|
+
let actionKey = "";
|
|
375
|
+
if (!operatorType) return [];
|
|
376
|
+
switch (fieldType) {
|
|
377
|
+
case FIELD_TYPE.TEXT:
|
|
378
|
+
case FIELD_TYPE.LONG_TEXT:
|
|
379
|
+
case FIELD_TYPE.SERIAL:
|
|
380
|
+
case FIELD_TYPE.INTEGER:
|
|
381
|
+
case FIELD_TYPE.LONG:
|
|
382
|
+
case FIELD_TYPE.DOUBLE:
|
|
383
|
+
case FIELD_TYPE.DECIMAL:
|
|
384
|
+
case FIELD_TYPE.OPTION:
|
|
385
|
+
case FIELD_TYPE.OPTION_MULTI:
|
|
386
|
+
actionKey = "basicText";
|
|
387
|
+
break;
|
|
388
|
+
case FIELD_TYPE.DATE:
|
|
389
|
+
case FIELD_TYPE.TIME:
|
|
390
|
+
case FIELD_TYPE.DATE_TIME:
|
|
391
|
+
actionKey = "basicDate";
|
|
392
|
+
break;
|
|
393
|
+
case FIELD_TYPE.USER:
|
|
394
|
+
case FIELD_TYPE.ORG:
|
|
395
|
+
case FIELD_TYPE.USER_MULTI:
|
|
396
|
+
case FIELD_TYPE.ORG_MULTI:
|
|
397
|
+
actionKey = "basicUserDep";
|
|
398
|
+
break;
|
|
399
|
+
case FIELD_TYPE.ENUM:
|
|
400
|
+
case FIELD_TYPE.ENUM_MULTI:
|
|
401
|
+
actionKey = "basicEnum";
|
|
402
|
+
break;
|
|
403
|
+
case FIELD_TYPE.REF:
|
|
404
|
+
case FIELD_TYPE.REF_MULTI:
|
|
405
|
+
case FIELD_TYPE.RDO_REF:
|
|
406
|
+
case FIELD_TYPE.PRIMARY_KEY:
|
|
407
|
+
case FIELD_TYPE.TRANSACTION:
|
|
408
|
+
case FIELD_TYPE.MESSAGE_TMPL:
|
|
409
|
+
case FIELD_TYPE.PRINTER:
|
|
410
|
+
actionKey = "basicModel";
|
|
411
|
+
break;
|
|
412
|
+
case FIELD_TYPE.LABEL_TEMPLATE_REF:
|
|
413
|
+
case FIELD_TYPE.RANGE_USER:
|
|
414
|
+
actionKey = "basicModalSel";
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
const cmpRangType = getCmpDisplayStatus(operatorType);
|
|
418
|
+
if (cmpRangType === RangTypeEnum.Hidden) return [{ isHide: true }];
|
|
419
|
+
let reference = [];
|
|
420
|
+
const config = cloneDeep(CmpConfig[actionKey || fieldType]);
|
|
421
|
+
const resConfig = (cmpRangType === RangTypeEnum.Comb ? [config, cloneDeep(config)] : [config]).map((conf, confIndex) => {
|
|
422
|
+
const obj = {};
|
|
423
|
+
if (conf?.isDefault || isOnlineFormDesigner) merge(obj, {
|
|
424
|
+
typeKeys: [ValueTypeEnum.FIXED],
|
|
425
|
+
default: ValueTypeEnum.FIXED
|
|
426
|
+
});
|
|
427
|
+
else if (has(conf, "default") && has(conf, "typeKeys")) merge(obj, pick(conf, ["typeKeys", "default"]));
|
|
428
|
+
else if (actionKey === "basicDate") {
|
|
429
|
+
if (cmpRangType === RangTypeEnum.Single) merge(obj, {
|
|
430
|
+
typeKeys: [ValueTypeEnum.FIXED, ValueTypeEnum.SYS],
|
|
431
|
+
default: ValueTypeEnum.FIXED
|
|
432
|
+
});
|
|
433
|
+
else if (cmpRangType === RangTypeEnum.Comb) {
|
|
434
|
+
merge(obj, {
|
|
435
|
+
typeKeys: confIndex === 0 && operatorType !== SEARCH_SERVICE.RANGE ? [ValueTypeEnum.FIXED] : [ValueTypeEnum.FIXED, ValueTypeEnum.SYS],
|
|
436
|
+
default: confIndex === 0 && operatorType !== SEARCH_SERVICE.RANGE ? ValueTypeEnum.FIXED : ValueTypeEnum.FIXED
|
|
437
|
+
});
|
|
438
|
+
if (operatorType === SEARCH_SERVICE.RANGE && confIndex === 0) {
|
|
439
|
+
if (fieldType === FIELD_TYPE.TIME) Object.assign(obj, {
|
|
440
|
+
typeKeys: [ValueTypeEnum.FIXED],
|
|
441
|
+
default: ValueTypeEnum.FIXED
|
|
442
|
+
});
|
|
443
|
+
conf.compAttrs[1].filter = {
|
|
444
|
+
type: "exclude",
|
|
445
|
+
list: [DateSystemEnum.NOW]
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
if (!filterOperatorTypes.includes(operatorType) && ![FIELD_TYPE.OPTION, FIELD_TYPE.OPTION_MULTI].includes(fieldType)) obj.typeKeys?.push(ValueTypeEnum.FIELD);
|
|
451
|
+
if (isPageDesigner) obj.typeKeys?.push(ValueTypeEnum.VAR);
|
|
452
|
+
if (isOnlineFormDesigner) obj.typeKeys?.push(...[ValueTypeEnum.COMP_PARAMS, ValueTypeEnum.BUILT_PARAMS]);
|
|
453
|
+
merge(obj, { valueTypeOptions: obj.typeKeys?.map((key) => {
|
|
454
|
+
return {
|
|
455
|
+
label: t(Ch_ValueType[key].name),
|
|
456
|
+
value: key,
|
|
457
|
+
abbr: t(Ch_ValueType[key].abbr)
|
|
458
|
+
};
|
|
459
|
+
}) });
|
|
460
|
+
const _comps = typeof conf?.comps === "function" ? conf?.comps({
|
|
461
|
+
refModelType,
|
|
462
|
+
fieldType
|
|
463
|
+
}) : conf?.comps;
|
|
464
|
+
const complist = Array.isArray(_comps) ? _comps : [_comps];
|
|
465
|
+
reference = complist.length == 1 ? [ValueTypeEnum.FIXED] : [ValueTypeEnum.FIXED, ValueTypeEnum.SYS];
|
|
466
|
+
if (!filterOperatorTypes.includes(operatorType) && ![FIELD_TYPE.OPTION, FIELD_TYPE.OPTION_MULTI].includes(fieldType)) {
|
|
467
|
+
complist.push(ComponentTypeEnum.SELECT);
|
|
468
|
+
reference.push(ValueTypeEnum.FIELD);
|
|
469
|
+
}
|
|
470
|
+
if (isPageDesigner) {
|
|
471
|
+
complist.push(ComponentTypeEnum.SELECT);
|
|
472
|
+
reference.push(ValueTypeEnum.VAR);
|
|
473
|
+
}
|
|
474
|
+
if (isOnlineFormDesigner) {
|
|
475
|
+
complist.push(...[ComponentTypeEnum.INPUT, ComponentTypeEnum.SELECT_BUILTIN_PARAMS]);
|
|
476
|
+
reference.push(...[ValueTypeEnum.COMP_PARAMS, ValueTypeEnum.BUILT_PARAMS]);
|
|
477
|
+
}
|
|
478
|
+
complist.forEach((comp, index) => {
|
|
479
|
+
merge(obj, { [reference[index]]: { cmp: comp } });
|
|
480
|
+
});
|
|
481
|
+
if (has(conf, "compAttrs")) {
|
|
482
|
+
const _compAttrs = typeof conf.compAttrs === "function" ? conf.compAttrs({
|
|
483
|
+
fieldType,
|
|
484
|
+
operatorType,
|
|
485
|
+
modelKey,
|
|
486
|
+
fieldKey,
|
|
487
|
+
bindInfo,
|
|
488
|
+
refModelType
|
|
489
|
+
}) : conf.compAttrs;
|
|
490
|
+
(Array.isArray(_compAttrs) ? _compAttrs : [_compAttrs]).forEach((compAttr, index) => {
|
|
491
|
+
const filters = {};
|
|
492
|
+
const __compAttr__ = typeof compAttr === "function" ? compAttr({
|
|
493
|
+
fieldType,
|
|
494
|
+
operatorType,
|
|
495
|
+
modelKey,
|
|
496
|
+
fieldKey,
|
|
497
|
+
bindInfo
|
|
498
|
+
}) : compAttr;
|
|
499
|
+
if (has(__compAttr__, "filter")) Object.assign(filters, { filter: typeof __compAttr__.filter === "function" ? __compAttr__.filter({
|
|
500
|
+
operatorType,
|
|
501
|
+
fieldType
|
|
502
|
+
}) : __compAttr__.filter });
|
|
503
|
+
const _compAttrs = {};
|
|
504
|
+
if (__compAttr__?.optionsKeys) Object.assign(_compAttrs, { options: __compAttr__?.optionsKeys?.filter((kk) => {
|
|
505
|
+
if (!isEmpty(filters?.filter)) {
|
|
506
|
+
const _filter = filters?.filter;
|
|
507
|
+
if (_filter.type === "contain") return _filter.list.includes(kk);
|
|
508
|
+
else if (_filter.type === "exclude") return !_filter.list.includes(kk);
|
|
509
|
+
return true;
|
|
510
|
+
}
|
|
511
|
+
return true;
|
|
512
|
+
}).map((k) => {
|
|
513
|
+
return {
|
|
514
|
+
label: typeof Ch_SystemVars[k] === "function" ? Ch_SystemVars[k](Ch_FieldTypeName[fieldType]) : Ch_SystemVars[k],
|
|
515
|
+
value: k
|
|
516
|
+
};
|
|
517
|
+
}) });
|
|
518
|
+
merge(obj, { [reference[index]]: {
|
|
519
|
+
...obj[reference[index]],
|
|
520
|
+
attrs: {
|
|
521
|
+
...omit(__compAttr__, "filter"),
|
|
522
|
+
..._compAttrs
|
|
523
|
+
},
|
|
524
|
+
...filters
|
|
525
|
+
} });
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
if (mainModelKey || isOnlineFormDesigner) obj[ValueTypeEnum.FIELD] = {
|
|
529
|
+
...obj[ValueTypeEnum.FIELD],
|
|
530
|
+
attrs: { options: fieldOptions }
|
|
531
|
+
};
|
|
532
|
+
if (isPageDesigner) {
|
|
533
|
+
obj[ValueTypeEnum.FIELD] = {
|
|
534
|
+
...obj[ValueTypeEnum.FIELD],
|
|
535
|
+
attrs: { options: fieldOptions }
|
|
536
|
+
};
|
|
537
|
+
obj[ValueTypeEnum.VAR] = {
|
|
538
|
+
...obj[ValueTypeEnum.VAR],
|
|
539
|
+
attrs: { options: varOptions }
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
return obj;
|
|
543
|
+
});
|
|
544
|
+
if ([FIELD_TYPE.DATE, FIELD_TYPE.DATE_TIME].includes(fieldType) && operatorType === SEARCH_SERVICE.RANGE && valueType === ValueTypeEnum.SYS) return resConfig.slice(0, 1);
|
|
545
|
+
return resConfig;
|
|
546
|
+
};
|
|
547
|
+
//#endregion
|
|
548
|
+
export { ComponentTypeEnum, ValueTypeEnum, getCmpConfig };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 搜索类型
|
|
3
|
+
* @alias USER_GROUP 用户组
|
|
4
|
+
* @alias MEMBER 成员
|
|
5
|
+
* @alias ROLE 角色
|
|
6
|
+
* @alias MODEL 模型
|
|
7
|
+
*/
|
|
8
|
+
export declare enum SearchTypeEnum {
|
|
9
|
+
/** 用户组 */
|
|
10
|
+
USER_GROUP = "USER_GROUP",
|
|
11
|
+
/** 成员 */
|
|
12
|
+
MEMBER = "MEMBER",
|
|
13
|
+
/** 角色 */
|
|
14
|
+
ROLE = "ROLE",
|
|
15
|
+
/** 模型 */
|
|
16
|
+
MODEL = "MODEL"
|
|
17
|
+
}
|
|
18
|
+
export declare enum ModalTypeEnum {
|
|
19
|
+
/** 新建 */
|
|
20
|
+
Create = "create",
|
|
21
|
+
/** 编辑 */
|
|
22
|
+
Edit = "edit",
|
|
23
|
+
/** 删除 */
|
|
24
|
+
Delete = "delete"
|
|
25
|
+
}
|
|
26
|
+
/** 用户组关联关系 */
|
|
27
|
+
export declare enum RelationTypeEnum {
|
|
28
|
+
/** 部门 */
|
|
29
|
+
ORG = "ORG",
|
|
30
|
+
/** 人员 */
|
|
31
|
+
USER = "USER",
|
|
32
|
+
/** 角色 */
|
|
33
|
+
ROLE = "ROLE",
|
|
34
|
+
/** 实体数据模型 */
|
|
35
|
+
ENTITY_MODEL_DATA = "ENTITY_MODEL_DATA",
|
|
36
|
+
/** 内置条件模型 */
|
|
37
|
+
BUILT_CONDITION_MODEL = "BUILT_CONDITION_MODEL",
|
|
38
|
+
/** 权限作用域 */
|
|
39
|
+
PERMISSION_SCOPE = "PERMISSION_SCOPE"
|
|
40
|
+
}
|
|
41
|
+
export declare const DataTypeOptions: {
|
|
42
|
+
label: string;
|
|
43
|
+
value: RelationTypeEnum;
|
|
44
|
+
}[];
|
|
45
|
+
/**
|
|
46
|
+
* 数据权限设置模态框tab枚举
|
|
47
|
+
* @alias TAB_DATA_RULES 数据规则
|
|
48
|
+
* @alias TAB_FIELD_ROLE 字段权限
|
|
49
|
+
* @alias TAB_BUILT_PREM 内置权限
|
|
50
|
+
* @alias TAB_PERM_SCOPE 权限作用域
|
|
51
|
+
*/
|
|
52
|
+
export declare enum DataRoleSetTabsEnum {
|
|
53
|
+
/** 数据规则 */
|
|
54
|
+
TAB_DATA_RULES = "tab_data_rules",
|
|
55
|
+
/** 字段权限 */
|
|
56
|
+
TAB_FIELD_ROLE = "tab_field_role",
|
|
57
|
+
/** 内置权限 */
|
|
58
|
+
TAB_BUILT_PREM = "tab_built_prem",
|
|
59
|
+
/** */
|
|
60
|
+
TAB_PERM_SCOPE = "tab_perm_scope"
|
|
61
|
+
}
|
|
62
|
+
export declare enum OperatorTypeEnum {
|
|
63
|
+
/** 与 */
|
|
64
|
+
AND = "AND",
|
|
65
|
+
/** 或 */
|
|
66
|
+
OR = "OR"
|
|
67
|
+
}
|
|
68
|
+
export declare const Ch_Operator: {
|
|
69
|
+
AND: string;
|
|
70
|
+
OR: string;
|
|
71
|
+
};
|
|
72
|
+
export declare const Ch_Perm_Operator: {
|
|
73
|
+
AND: string;
|
|
74
|
+
OR: string;
|
|
75
|
+
};
|
|
76
|
+
/** 获取tree层级 */
|
|
77
|
+
export declare const calcTreeChildLevel: (nodeData: IObject[]) => number;
|
|
78
|
+
/** 递归查找是否存在树结构中的值 */
|
|
79
|
+
export declare const findTreePathById: (leafId: string, nodes: IObject[]) => IObject | null;
|
|
80
|
+
export declare const dropNode: (info: IObject, treeList: IObject[]) => {
|
|
81
|
+
id: any;
|
|
82
|
+
} | {
|
|
83
|
+
type: string;
|
|
84
|
+
msg: string;
|
|
85
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { t } from "@gct-paas/core";
|
|
2
|
+
//#region src/modules/data-rules-container/src/constant/interface.ts
|
|
3
|
+
/** 用户组关联关系 */
|
|
4
|
+
var RelationTypeEnum = /* @__PURE__ */ function(RelationTypeEnum) {
|
|
5
|
+
/** 部门 */
|
|
6
|
+
RelationTypeEnum["ORG"] = "ORG";
|
|
7
|
+
/** 人员 */
|
|
8
|
+
RelationTypeEnum["USER"] = "USER";
|
|
9
|
+
/** 角色 */
|
|
10
|
+
RelationTypeEnum["ROLE"] = "ROLE";
|
|
11
|
+
/** 实体数据模型 */
|
|
12
|
+
RelationTypeEnum["ENTITY_MODEL_DATA"] = "ENTITY_MODEL_DATA";
|
|
13
|
+
/** 内置条件模型 */
|
|
14
|
+
RelationTypeEnum["BUILT_CONDITION_MODEL"] = "BUILT_CONDITION_MODEL";
|
|
15
|
+
/** 权限作用域 */
|
|
16
|
+
RelationTypeEnum["PERMISSION_SCOPE"] = "PERMISSION_SCOPE";
|
|
17
|
+
return RelationTypeEnum;
|
|
18
|
+
}({});
|
|
19
|
+
t("sys.appDesigner.physicalBusinessModel"), RelationTypeEnum.ENTITY_MODEL_DATA, t("sys.appDesigner.builtinConditionalModel"), RelationTypeEnum.BUILT_CONDITION_MODEL, t("sys.appDesigner.permissionScope"), RelationTypeEnum.PERMISSION_SCOPE;
|
|
20
|
+
var OperatorTypeEnum = /* @__PURE__ */ function(OperatorTypeEnum) {
|
|
21
|
+
/** 与 */
|
|
22
|
+
OperatorTypeEnum["AND"] = "AND";
|
|
23
|
+
/** 或 */
|
|
24
|
+
OperatorTypeEnum["OR"] = "OR";
|
|
25
|
+
return OperatorTypeEnum;
|
|
26
|
+
}({});
|
|
27
|
+
var Ch_Operator = {
|
|
28
|
+
[OperatorTypeEnum.AND]: t("sys.webRender.and"),
|
|
29
|
+
[OperatorTypeEnum.OR]: t("sys.webRender.or")
|
|
30
|
+
};
|
|
31
|
+
var Ch_Perm_Operator = {
|
|
32
|
+
[OperatorTypeEnum.AND]: t("sys.webRender.allCondition"),
|
|
33
|
+
[OperatorTypeEnum.OR]: t("sys.webRender.anyCondition")
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Ch_Operator, Ch_Perm_Operator, OperatorTypeEnum };
|