@byteluck-fe/model-driven-controls 2.5.0-alpha.6 → 2.5.0-alpha.9
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/esm/api-doc-index.js +1 -0
- package/dist/esm/baseControls/ListSelectButton/property.js +8 -1
- package/dist/esm/formControls/OrganizationSelection/designer.js +247 -0
- package/dist/esm/formControls/OrganizationSelection/index.js +11 -0
- package/dist/esm/formControls/OrganizationSelection/property.js +240 -0
- package/dist/esm/formControls/OrganizationSelection/runtime.js +126 -0
- package/dist/esm/formControls/OrganizationSelection/types.js +0 -0
- package/dist/esm/formControls/SelectRelation/property.js +8 -1
- package/dist/esm/formControls/Tree/property.js +1 -1
- package/dist/esm/formControls/index.js +1 -0
- package/dist/esm/listControls/GridTable/property.js +2 -2
- package/dist/index.umd.js +1 -1
- package/dist/types/api-doc-index.d.ts +1 -0
- package/dist/types/baseControls/ListSelectButton/property.d.ts +3 -1
- package/dist/types/formControls/OrganizationSelection/designer.d.ts +20 -0
- package/dist/types/formControls/OrganizationSelection/index.d.ts +12 -0
- package/dist/types/formControls/OrganizationSelection/property.d.ts +68 -0
- package/dist/types/formControls/OrganizationSelection/runtime.d.ts +12 -0
- package/dist/types/formControls/OrganizationSelection/types.d.ts +0 -0
- package/dist/types/formControls/SelectRelation/property.d.ts +3 -1
- package/dist/types/formControls/index.d.ts +1 -0
- package/dist/types/type.d.ts +2 -1
- package/package.json +5 -5
|
@@ -65,6 +65,7 @@ export { default as Employee2 } from "./formControls/Employee2/property";
|
|
|
65
65
|
export { default as ElectronicSignature } from "./formControls/ElectronicSignature/property";
|
|
66
66
|
export { default as WPS } from "./formControls/WPS/property";
|
|
67
67
|
export { default as Department2 } from "./formControls/Department2/property";
|
|
68
|
+
export { default as OrganizationSelection } from "./formControls/OrganizationSelection/property";
|
|
68
69
|
export { default as Grid } from "./layoutControls/Grid/property";
|
|
69
70
|
export { default as Col } from "./layoutControls/Col/property";
|
|
70
71
|
export { default as Row } from "./layoutControls/Row/property";
|
|
@@ -99,7 +99,7 @@ function _createSuper(Derived) {
|
|
|
99
99
|
}
|
|
100
100
|
import { ButtonProperty } from "../Button";
|
|
101
101
|
import ListSelectButtonControl from "./designer";
|
|
102
|
-
import { PropertyRules, FillBackBind, FillPayloadBind, ListBind } from "@byteluck-fe/model-driven-core";
|
|
102
|
+
import { PropertyRules, FillBackBind, FillPayloadBind, SelectedContentConfig, ListBind } from "@byteluck-fe/model-driven-core";
|
|
103
103
|
import { RulesMessage } from "@byteluck-fe/model-driven-shared";
|
|
104
104
|
import { createFillBindRules } from "../utils";
|
|
105
105
|
var ListSelectButtonPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
@@ -166,6 +166,10 @@ var ListSelectButtonPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
166
166
|
* 回填配置
|
|
167
167
|
* @public
|
|
168
168
|
*/ _defineProperty(_assertThisInitialized(_this), "fillBack", void 0);
|
|
169
|
+
// 展示已选明细
|
|
170
|
+
_defineProperty(_assertThisInitialized(_this), "showSelectedDetail", void 0);
|
|
171
|
+
// 展示已选内容配置字段
|
|
172
|
+
_defineProperty(_assertThisInitialized(_this), "selectedContentConfig", void 0);
|
|
169
173
|
var _props_content;
|
|
170
174
|
_this.content = (_props_content = props === null || props === void 0 ? void 0 : props.content) !== null && _props_content !== void 0 ? _props_content : ListSelectButtonControl.controlName;
|
|
171
175
|
var _props_icon;
|
|
@@ -173,6 +177,9 @@ var ListSelectButtonPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
173
177
|
_this.fillPayload = new FillPayloadBind(props === null || props === void 0 ? void 0 : props.fillPayload);
|
|
174
178
|
_this.listPageBind = new ListBind(props === null || props === void 0 ? void 0 : props.listPageBind);
|
|
175
179
|
_this.fillBack = new FillBackBind(props === null || props === void 0 ? void 0 : props.fillBack);
|
|
180
|
+
var _props_showSelectedDetail;
|
|
181
|
+
_this.showSelectedDetail = (_props_showSelectedDetail = props === null || props === void 0 ? void 0 : props.showSelectedDetail) !== null && _props_showSelectedDetail !== void 0 ? _props_showSelectedDetail : false;
|
|
182
|
+
_this.selectedContentConfig = new SelectedContentConfig(props === null || props === void 0 ? void 0 : props.selectedContentConfig);
|
|
176
183
|
return _this;
|
|
177
184
|
}
|
|
178
185
|
return ListSelectButtonProperty;
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
function _assertThisInitialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _classCallCheck(instance, Constructor) {
|
|
8
|
+
if (!(instance instanceof Constructor)) {
|
|
9
|
+
throw new TypeError("Cannot call a class as a function");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function _defineProperties(target, props) {
|
|
13
|
+
for(var i = 0; i < props.length; i++){
|
|
14
|
+
var descriptor = props[i];
|
|
15
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
16
|
+
descriptor.configurable = true;
|
|
17
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
18
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
22
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
23
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
24
|
+
return Constructor;
|
|
25
|
+
}
|
|
26
|
+
function _defineProperty(obj, key, value) {
|
|
27
|
+
if (key in obj) {
|
|
28
|
+
Object.defineProperty(obj, key, {
|
|
29
|
+
value: value,
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
obj[key] = value;
|
|
36
|
+
}
|
|
37
|
+
return obj;
|
|
38
|
+
}
|
|
39
|
+
function _get(target, property, receiver) {
|
|
40
|
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
41
|
+
_get = Reflect.get;
|
|
42
|
+
} else {
|
|
43
|
+
_get = function _get(target, property, receiver) {
|
|
44
|
+
var base = _superPropBase(target, property);
|
|
45
|
+
if (!base) return;
|
|
46
|
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
47
|
+
if (desc.get) {
|
|
48
|
+
return desc.get.call(receiver);
|
|
49
|
+
}
|
|
50
|
+
return desc.value;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return _get(target, property, receiver || target);
|
|
54
|
+
}
|
|
55
|
+
function _getPrototypeOf(o) {
|
|
56
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
57
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
58
|
+
};
|
|
59
|
+
return _getPrototypeOf(o);
|
|
60
|
+
}
|
|
61
|
+
function _inherits(subClass, superClass) {
|
|
62
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
63
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
64
|
+
}
|
|
65
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
66
|
+
constructor: {
|
|
67
|
+
value: subClass,
|
|
68
|
+
writable: true,
|
|
69
|
+
configurable: true
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
73
|
+
}
|
|
74
|
+
function _possibleConstructorReturn(self, call) {
|
|
75
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
76
|
+
return call;
|
|
77
|
+
}
|
|
78
|
+
return _assertThisInitialized(self);
|
|
79
|
+
}
|
|
80
|
+
function _setPrototypeOf(o, p) {
|
|
81
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
82
|
+
o.__proto__ = p;
|
|
83
|
+
return o;
|
|
84
|
+
};
|
|
85
|
+
return _setPrototypeOf(o, p);
|
|
86
|
+
}
|
|
87
|
+
function _superPropBase(object, property) {
|
|
88
|
+
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
89
|
+
object = _getPrototypeOf(object);
|
|
90
|
+
if (object === null) break;
|
|
91
|
+
}
|
|
92
|
+
return object;
|
|
93
|
+
}
|
|
94
|
+
var _typeof = function(obj) {
|
|
95
|
+
"@swc/helpers - typeof";
|
|
96
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
97
|
+
};
|
|
98
|
+
function _isNativeReflectConstruct() {
|
|
99
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
100
|
+
if (Reflect.construct.sham) return false;
|
|
101
|
+
if (typeof Proxy === "function") return true;
|
|
102
|
+
try {
|
|
103
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
104
|
+
return true;
|
|
105
|
+
} catch (e) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function _createSuper(Derived) {
|
|
110
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
111
|
+
return function _createSuperInternal() {
|
|
112
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
113
|
+
if (hasNativeReflectConstruct) {
|
|
114
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
115
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
116
|
+
} else {
|
|
117
|
+
result = Super.apply(this, arguments);
|
|
118
|
+
}
|
|
119
|
+
return _possibleConstructorReturn(this, result);
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
import { DesignerFormControl, COMMON_SETTING_TYPE } from "@byteluck-fe/model-driven-core";
|
|
123
|
+
import { FieldTypes } from "@byteluck-fe/model-driven-shared";
|
|
124
|
+
import OrganizationSelectionProperty from "./property";
|
|
125
|
+
var OrganizationSelectionControl = /*#__PURE__*/ function(DesignerFormControl) {
|
|
126
|
+
"use strict";
|
|
127
|
+
_inherits(OrganizationSelectionControl, DesignerFormControl);
|
|
128
|
+
var _super = _createSuper(OrganizationSelectionControl);
|
|
129
|
+
function OrganizationSelectionControl(props) {
|
|
130
|
+
_classCallCheck(this, OrganizationSelectionControl);
|
|
131
|
+
var _this;
|
|
132
|
+
_this = _super.call(this, props);
|
|
133
|
+
_defineProperty(_assertThisInitialized(_this), "props", void 0);
|
|
134
|
+
_this.props = new OrganizationSelectionProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
135
|
+
return _this;
|
|
136
|
+
}
|
|
137
|
+
_createClass(OrganizationSelectionControl, [
|
|
138
|
+
{
|
|
139
|
+
key: "toDataBindModel",
|
|
140
|
+
value: function toDataBindModel(parentId) {
|
|
141
|
+
var dataBindModel = _get(_getPrototypeOf(OrganizationSelectionControl.prototype), "toDataBindModel", this).call(this, parentId);
|
|
142
|
+
if (dataBindModel && !Array.isArray(dataBindModel)) {
|
|
143
|
+
var _this_props = this.props, displayLevel = _this_props.displayLevel, showSubDept = _this_props.showSubDept;
|
|
144
|
+
dataBindModel.props.displayLevel = displayLevel;
|
|
145
|
+
dataBindModel.props.showSubDept = showSubDept;
|
|
146
|
+
}
|
|
147
|
+
return dataBindModel;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
], [
|
|
151
|
+
{
|
|
152
|
+
key: "controlName",
|
|
153
|
+
get: function get() {
|
|
154
|
+
return "组织";
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
key: "controlIcon",
|
|
159
|
+
get: function get() {
|
|
160
|
+
return "icondepartment_new";
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
key: "controlType",
|
|
165
|
+
get: function get() {
|
|
166
|
+
return "organizationSelection";
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
key: "controlCustomAttributes",
|
|
171
|
+
get: function get() {
|
|
172
|
+
return [
|
|
173
|
+
{
|
|
174
|
+
key: "displayBoList",
|
|
175
|
+
name: "显示值",
|
|
176
|
+
required: true
|
|
177
|
+
}
|
|
178
|
+
];
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
]);
|
|
182
|
+
return OrganizationSelectionControl;
|
|
183
|
+
}(DesignerFormControl);
|
|
184
|
+
_defineProperty(OrganizationSelectionControl, "controlFieldType", FieldTypes.DEPARTMENTS);
|
|
185
|
+
_defineProperty(OrganizationSelectionControl, "setting", [
|
|
186
|
+
{
|
|
187
|
+
key: "data-bind",
|
|
188
|
+
visible: true
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
key: "caption",
|
|
192
|
+
showItems: [
|
|
193
|
+
COMMON_SETTING_TYPE.CAPTION,
|
|
194
|
+
COMMON_SETTING_TYPE.IS_HIDE_CAPTION
|
|
195
|
+
],
|
|
196
|
+
visible: true
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
key: "label-position",
|
|
200
|
+
visible: true
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
key: "default-state",
|
|
204
|
+
visible: true
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
key: "placeholder",
|
|
208
|
+
visible: true
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
key: "common-setting",
|
|
212
|
+
visible: true,
|
|
213
|
+
showItems: [
|
|
214
|
+
COMMON_SETTING_TYPE.REQUIRED,
|
|
215
|
+
COMMON_SETTING_TYPE.IS_HIDE,
|
|
216
|
+
COMMON_SETTING_TYPE.IS_HIDE_CAPTION,
|
|
217
|
+
COMMON_SETTING_TYPE.MULTIPLE,
|
|
218
|
+
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
key: "department-datasource-setting",
|
|
223
|
+
visible: true
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
key: "department-defaultval",
|
|
227
|
+
visible: true
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
key: "department-level",
|
|
231
|
+
visible: true
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
key: "show-tree",
|
|
235
|
+
visible: true
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
key: "department-contain-sub",
|
|
239
|
+
visible: true
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
key: "super-setting",
|
|
243
|
+
visible: true
|
|
244
|
+
}
|
|
245
|
+
]);
|
|
246
|
+
export default OrganizationSelectionControl;
|
|
247
|
+
export { OrganizationSelectionControl as DesignerOrganizationSelectionControl };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Designer from "./designer";
|
|
2
|
+
import Runtime from "./runtime";
|
|
3
|
+
import Property from "./property";
|
|
4
|
+
export default {
|
|
5
|
+
Designer: Designer,
|
|
6
|
+
Runtime: Runtime,
|
|
7
|
+
Property: Property
|
|
8
|
+
};
|
|
9
|
+
export * from "./designer";
|
|
10
|
+
export * from "./runtime";
|
|
11
|
+
export * from "./property";
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
function _assertThisInitialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _classCallCheck(instance, Constructor) {
|
|
8
|
+
if (!(instance instanceof Constructor)) {
|
|
9
|
+
throw new TypeError("Cannot call a class as a function");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function _defineProperty(obj, key, value) {
|
|
13
|
+
if (key in obj) {
|
|
14
|
+
Object.defineProperty(obj, key, {
|
|
15
|
+
value: value,
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
obj[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
function _getPrototypeOf(o) {
|
|
26
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
27
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
28
|
+
};
|
|
29
|
+
return _getPrototypeOf(o);
|
|
30
|
+
}
|
|
31
|
+
function _inherits(subClass, superClass) {
|
|
32
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
33
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
34
|
+
}
|
|
35
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
36
|
+
constructor: {
|
|
37
|
+
value: subClass,
|
|
38
|
+
writable: true,
|
|
39
|
+
configurable: true
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
43
|
+
}
|
|
44
|
+
function _possibleConstructorReturn(self, call) {
|
|
45
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
46
|
+
return call;
|
|
47
|
+
}
|
|
48
|
+
return _assertThisInitialized(self);
|
|
49
|
+
}
|
|
50
|
+
function _setPrototypeOf(o, p) {
|
|
51
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
52
|
+
o.__proto__ = p;
|
|
53
|
+
return o;
|
|
54
|
+
};
|
|
55
|
+
return _setPrototypeOf(o, p);
|
|
56
|
+
}
|
|
57
|
+
var _typeof = function(obj) {
|
|
58
|
+
"@swc/helpers - typeof";
|
|
59
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
60
|
+
};
|
|
61
|
+
function _isNativeReflectConstruct() {
|
|
62
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
63
|
+
if (Reflect.construct.sham) return false;
|
|
64
|
+
if (typeof Proxy === "function") return true;
|
|
65
|
+
try {
|
|
66
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
67
|
+
return true;
|
|
68
|
+
} catch (e) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function _createSuper(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
74
|
+
return function _createSuperInternal() {
|
|
75
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
76
|
+
if (hasNativeReflectConstruct) {
|
|
77
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
78
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
79
|
+
} else {
|
|
80
|
+
result = Super.apply(this, arguments);
|
|
81
|
+
}
|
|
82
|
+
return _possibleConstructorReturn(this, result);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
import OrganizationSelectionControl from "./designer";
|
|
86
|
+
import { BaseControlProperty, BaseControlPropertyRules, BaseControlPropertyRuntimeRules, initSuperDataSourceRules, MultistageFillingItem, SelectedContentConfig, SuperDataSourceBind } from "@byteluck-fe/model-driven-core";
|
|
87
|
+
import { RulesMessage } from "@byteluck-fe/model-driven-shared";
|
|
88
|
+
import { DepartmentType, AssignType } from "../../framework";
|
|
89
|
+
var OrganizationSelectionPropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
|
|
90
|
+
"use strict";
|
|
91
|
+
_inherits(OrganizationSelectionPropertyRules, BaseControlPropertyRules);
|
|
92
|
+
var _super = _createSuper(OrganizationSelectionPropertyRules);
|
|
93
|
+
function OrganizationSelectionPropertyRules(props) {
|
|
94
|
+
_classCallCheck(this, OrganizationSelectionPropertyRules);
|
|
95
|
+
var _this;
|
|
96
|
+
_this = _super.call(this, props);
|
|
97
|
+
_defineProperty(_assertThisInitialized(_this), "datasourceBind", [
|
|
98
|
+
{
|
|
99
|
+
type: "object",
|
|
100
|
+
message: RulesMessage.getMessage("isNotObject")
|
|
101
|
+
}
|
|
102
|
+
]);
|
|
103
|
+
_defineProperty(_assertThisInitialized(_this), "businessScope", {
|
|
104
|
+
type: "any"
|
|
105
|
+
});
|
|
106
|
+
initSuperDataSourceRules.call(_assertThisInitialized(_this), props, OrganizationSelectionControl.controlCustomAttributes);
|
|
107
|
+
if (props.businessType === AssignType.ASSIGN) {
|
|
108
|
+
_this.businessScope = {
|
|
109
|
+
type: "array",
|
|
110
|
+
required: true,
|
|
111
|
+
message: RulesMessage.getMessage("pleaseAssignBusiness")
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return _this;
|
|
115
|
+
}
|
|
116
|
+
return OrganizationSelectionPropertyRules;
|
|
117
|
+
}(BaseControlPropertyRules);
|
|
118
|
+
var OrganizationSelectionPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRuntimeRules) {
|
|
119
|
+
"use strict";
|
|
120
|
+
_inherits(OrganizationSelectionPropertyRuntimeRules, BaseControlPropertyRuntimeRules);
|
|
121
|
+
var _super = _createSuper(OrganizationSelectionPropertyRuntimeRules);
|
|
122
|
+
function OrganizationSelectionPropertyRuntimeRules(props) {
|
|
123
|
+
_classCallCheck(this, OrganizationSelectionPropertyRuntimeRules);
|
|
124
|
+
var _this;
|
|
125
|
+
_this = _super.call(this, props);
|
|
126
|
+
_this[0].type = "array";
|
|
127
|
+
return _this;
|
|
128
|
+
}
|
|
129
|
+
return OrganizationSelectionPropertyRuntimeRules;
|
|
130
|
+
}(BaseControlPropertyRuntimeRules);
|
|
131
|
+
var OrganizationSelectionProperty = /*#__PURE__*/ function(BaseControlProperty) {
|
|
132
|
+
"use strict";
|
|
133
|
+
_inherits(OrganizationSelectionProperty, BaseControlProperty);
|
|
134
|
+
var _super = _createSuper(OrganizationSelectionProperty);
|
|
135
|
+
function OrganizationSelectionProperty(props) {
|
|
136
|
+
_classCallCheck(this, OrganizationSelectionProperty);
|
|
137
|
+
var _this;
|
|
138
|
+
_this = _super.call(this, props);
|
|
139
|
+
/**
|
|
140
|
+
* 展示类型: 默认形式 / 树状部门
|
|
141
|
+
* */ _defineProperty(_assertThisInitialized(_this), "showType", void 0);
|
|
142
|
+
/**
|
|
143
|
+
* 部门范围: 所有部门 / 指定部门
|
|
144
|
+
* */ _defineProperty(_assertThisInitialized(_this), "range", void 0);
|
|
145
|
+
/**
|
|
146
|
+
* 默认值类型:发起人部门/ 指定部门 /无
|
|
147
|
+
*/ _defineProperty(_assertThisInitialized(_this), "defaultValueType", void 0);
|
|
148
|
+
/**
|
|
149
|
+
* 部门多选
|
|
150
|
+
* */ _defineProperty(_assertThisInitialized(_this), "multiple", void 0);
|
|
151
|
+
/**
|
|
152
|
+
* 指定部门范围
|
|
153
|
+
* */ _defineProperty(_assertThisInitialized(_this), "rangeOptions", void 0);
|
|
154
|
+
/**
|
|
155
|
+
* 默认值
|
|
156
|
+
* */ _defineProperty(_assertThisInitialized(_this), "defaultValue", void 0);
|
|
157
|
+
/**
|
|
158
|
+
* 部门显示层级
|
|
159
|
+
* */ _defineProperty(_assertThisInitialized(_this), "displayLevel", void 0);
|
|
160
|
+
/**
|
|
161
|
+
* 是否展示子部门
|
|
162
|
+
* */ _defineProperty(_assertThisInitialized(_this), "showSubDept", void 0);
|
|
163
|
+
/**
|
|
164
|
+
* 多级填充
|
|
165
|
+
* */ _defineProperty(_assertThisInitialized(_this), "multistageFilling", void 0);
|
|
166
|
+
/**
|
|
167
|
+
* 数据设置
|
|
168
|
+
* */ _defineProperty(_assertThisInitialized(_this), "datasourceBind", void 0);
|
|
169
|
+
/**
|
|
170
|
+
* 数据类型 行政 or 业务
|
|
171
|
+
* */ _defineProperty(_assertThisInitialized(_this), "datasourceType", void 0 //数据类型 行政 'administration'| 业务 'business'
|
|
172
|
+
);
|
|
173
|
+
_defineProperty(_assertThisInitialized(_this), "businessType", void 0 //业务部门类型 'all' | 'assign'
|
|
174
|
+
);
|
|
175
|
+
_defineProperty(_assertThisInitialized(_this), "businessScope", void 0 //业务部门范围
|
|
176
|
+
);
|
|
177
|
+
_defineProperty(_assertThisInitialized(_this), "organizingFunction", void 0 // 组织职能
|
|
178
|
+
);
|
|
179
|
+
_defineProperty(_assertThisInitialized(_this), "organizationView", void 0 // 组织视图
|
|
180
|
+
);
|
|
181
|
+
_defineProperty(_assertThisInitialized(_this), "openMultistageFilling", void 0 //是否开启填充
|
|
182
|
+
);
|
|
183
|
+
// 展示已选明细
|
|
184
|
+
_defineProperty(_assertThisInitialized(_this), "showSelectedDetail", void 0);
|
|
185
|
+
// 展示已选内容配置字段
|
|
186
|
+
_defineProperty(_assertThisInitialized(_this), "selectedContentConfig", void 0);
|
|
187
|
+
var _props_showType;
|
|
188
|
+
_this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType : "default";
|
|
189
|
+
var _props_multiple;
|
|
190
|
+
_this.multiple = (_props_multiple = props === null || props === void 0 ? void 0 : props.multiple) !== null && _props_multiple !== void 0 ? _props_multiple : false;
|
|
191
|
+
var _props_range;
|
|
192
|
+
_this.range = (_props_range = props === null || props === void 0 ? void 0 : props.range) !== null && _props_range !== void 0 ? _props_range : "all";
|
|
193
|
+
var _props_defaultValueType;
|
|
194
|
+
_this.defaultValueType = (_props_defaultValueType = props === null || props === void 0 ? void 0 : props.defaultValueType) !== null && _props_defaultValueType !== void 0 ? _props_defaultValueType : "none";
|
|
195
|
+
var _props_rangeOptions;
|
|
196
|
+
_this.rangeOptions = (_props_rangeOptions = props === null || props === void 0 ? void 0 : props.rangeOptions) !== null && _props_rangeOptions !== void 0 ? _props_rangeOptions : [];
|
|
197
|
+
var _props_defaultValue;
|
|
198
|
+
_this.defaultValue = (_props_defaultValue = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : [];
|
|
199
|
+
var _props_displayLevel;
|
|
200
|
+
_this.displayLevel = (_props_displayLevel = props === null || props === void 0 ? void 0 : props.displayLevel) !== null && _props_displayLevel !== void 0 ? _props_displayLevel : 1;
|
|
201
|
+
var _props_showSubDept;
|
|
202
|
+
_this.showSubDept = (_props_showSubDept = props === null || props === void 0 ? void 0 : props.showSubDept) !== null && _props_showSubDept !== void 0 ? _props_showSubDept : true;
|
|
203
|
+
var _props_caption;
|
|
204
|
+
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : OrganizationSelectionControl.controlName;
|
|
205
|
+
var _props_placeholder;
|
|
206
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "请选择组织";
|
|
207
|
+
var _props_datasourceBind;
|
|
208
|
+
_this.datasourceBind = new SuperDataSourceBind((_props_datasourceBind = props === null || props === void 0 ? void 0 : props.datasourceBind) !== null && _props_datasourceBind !== void 0 ? _props_datasourceBind : {
|
|
209
|
+
attributes: OrganizationSelectionControl.controlCustomAttributes
|
|
210
|
+
});
|
|
211
|
+
var _props_datasourceType;
|
|
212
|
+
_this.datasourceType = (_props_datasourceType = props === null || props === void 0 ? void 0 : props.datasourceType) !== null && _props_datasourceType !== void 0 ? _props_datasourceType : DepartmentType.INTERNAL;
|
|
213
|
+
var _props_businessScope;
|
|
214
|
+
_this.businessScope = (_props_businessScope = props === null || props === void 0 ? void 0 : props.businessScope) !== null && _props_businessScope !== void 0 ? _props_businessScope : [];
|
|
215
|
+
var _props_businessType;
|
|
216
|
+
_this.businessType = (_props_businessType = props === null || props === void 0 ? void 0 : props.businessType) !== null && _props_businessType !== void 0 ? _props_businessType : AssignType.ALL;
|
|
217
|
+
var _props_organizingFunction;
|
|
218
|
+
_this.organizingFunction = (_props_organizingFunction = props === null || props === void 0 ? void 0 : props.organizingFunction) !== null && _props_organizingFunction !== void 0 ? _props_organizingFunction : "";
|
|
219
|
+
var _props_organizationView;
|
|
220
|
+
_this.organizationView = (_props_organizationView = props === null || props === void 0 ? void 0 : props.organizationView) !== null && _props_organizationView !== void 0 ? _props_organizationView : "";
|
|
221
|
+
var _props_showSelectedDetail;
|
|
222
|
+
_this.showSelectedDetail = (_props_showSelectedDetail = props === null || props === void 0 ? void 0 : props.showSelectedDetail) !== null && _props_showSelectedDetail !== void 0 ? _props_showSelectedDetail : false;
|
|
223
|
+
_this.selectedContentConfig = new SelectedContentConfig(props === null || props === void 0 ? void 0 : props.selectedContentConfig);
|
|
224
|
+
var _props_openMultistageFilling;
|
|
225
|
+
_this.openMultistageFilling = (_props_openMultistageFilling = props === null || props === void 0 ? void 0 : props.openMultistageFilling) !== null && _props_openMultistageFilling !== void 0 ? _props_openMultistageFilling : false;
|
|
226
|
+
_this.multistageFilling = [];
|
|
227
|
+
if (Array.isArray(props === null || props === void 0 ? void 0 : props.multistageFilling)) {
|
|
228
|
+
props === null || props === void 0 ? void 0 : props.multistageFilling.map(function(item) {
|
|
229
|
+
var _this_multistageFilling;
|
|
230
|
+
(_this_multistageFilling = _this.multistageFilling) === null || _this_multistageFilling === void 0 ? void 0 : _this_multistageFilling.push(new MultistageFillingItem(item));
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return _this;
|
|
234
|
+
}
|
|
235
|
+
return OrganizationSelectionProperty;
|
|
236
|
+
}(BaseControlProperty);
|
|
237
|
+
_defineProperty(OrganizationSelectionProperty, "Rules", OrganizationSelectionPropertyRules);
|
|
238
|
+
_defineProperty(OrganizationSelectionProperty, "RuntimeRules", OrganizationSelectionPropertyRuntimeRules);
|
|
239
|
+
export default OrganizationSelectionProperty;
|
|
240
|
+
export { OrganizationSelectionProperty, OrganizationSelectionPropertyRuntimeRules, };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
function _assertThisInitialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _classCallCheck(instance, Constructor) {
|
|
8
|
+
if (!(instance instanceof Constructor)) {
|
|
9
|
+
throw new TypeError("Cannot call a class as a function");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function _defineProperties(target, props) {
|
|
13
|
+
for(var i = 0; i < props.length; i++){
|
|
14
|
+
var descriptor = props[i];
|
|
15
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
16
|
+
descriptor.configurable = true;
|
|
17
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
18
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
22
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
23
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
24
|
+
return Constructor;
|
|
25
|
+
}
|
|
26
|
+
function _defineProperty(obj, key, value) {
|
|
27
|
+
if (key in obj) {
|
|
28
|
+
Object.defineProperty(obj, key, {
|
|
29
|
+
value: value,
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
obj[key] = value;
|
|
36
|
+
}
|
|
37
|
+
return obj;
|
|
38
|
+
}
|
|
39
|
+
function _getPrototypeOf(o) {
|
|
40
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
41
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
42
|
+
};
|
|
43
|
+
return _getPrototypeOf(o);
|
|
44
|
+
}
|
|
45
|
+
function _inherits(subClass, superClass) {
|
|
46
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
47
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
48
|
+
}
|
|
49
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
50
|
+
constructor: {
|
|
51
|
+
value: subClass,
|
|
52
|
+
writable: true,
|
|
53
|
+
configurable: true
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
57
|
+
}
|
|
58
|
+
function _possibleConstructorReturn(self, call) {
|
|
59
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
60
|
+
return call;
|
|
61
|
+
}
|
|
62
|
+
return _assertThisInitialized(self);
|
|
63
|
+
}
|
|
64
|
+
function _setPrototypeOf(o, p) {
|
|
65
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
66
|
+
o.__proto__ = p;
|
|
67
|
+
return o;
|
|
68
|
+
};
|
|
69
|
+
return _setPrototypeOf(o, p);
|
|
70
|
+
}
|
|
71
|
+
var _typeof = function(obj) {
|
|
72
|
+
"@swc/helpers - typeof";
|
|
73
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
74
|
+
};
|
|
75
|
+
function _isNativeReflectConstruct() {
|
|
76
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
77
|
+
if (Reflect.construct.sham) return false;
|
|
78
|
+
if (typeof Proxy === "function") return true;
|
|
79
|
+
try {
|
|
80
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
81
|
+
return true;
|
|
82
|
+
} catch (e) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function _createSuper(Derived) {
|
|
87
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
88
|
+
return function _createSuperInternal() {
|
|
89
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
90
|
+
if (hasNativeReflectConstruct) {
|
|
91
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
92
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
93
|
+
} else {
|
|
94
|
+
result = Super.apply(this, arguments);
|
|
95
|
+
}
|
|
96
|
+
return _possibleConstructorReturn(this, result);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
import { RuntimeFormControl } from "@byteluck-fe/model-driven-core";
|
|
100
|
+
import { FieldTypes } from "@byteluck-fe/model-driven-shared";
|
|
101
|
+
import OrganizationSelectionProperty from "./property";
|
|
102
|
+
var OrganizationSelectionControl = /*#__PURE__*/ function(RuntimeFormControl) {
|
|
103
|
+
"use strict";
|
|
104
|
+
_inherits(OrganizationSelectionControl, RuntimeFormControl);
|
|
105
|
+
var _super = _createSuper(OrganizationSelectionControl);
|
|
106
|
+
function OrganizationSelectionControl(props) {
|
|
107
|
+
_classCallCheck(this, OrganizationSelectionControl);
|
|
108
|
+
var _this;
|
|
109
|
+
_this = _super.call(this, props);
|
|
110
|
+
_defineProperty(_assertThisInitialized(_this), "props", void 0);
|
|
111
|
+
_this.props = new OrganizationSelectionProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
112
|
+
return _this;
|
|
113
|
+
}
|
|
114
|
+
_createClass(OrganizationSelectionControl, null, [
|
|
115
|
+
{
|
|
116
|
+
key: "controlType",
|
|
117
|
+
get: function get() {
|
|
118
|
+
return "organizationSelection";
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
]);
|
|
122
|
+
return OrganizationSelectionControl;
|
|
123
|
+
}(RuntimeFormControl);
|
|
124
|
+
_defineProperty(OrganizationSelectionControl, "controlFieldType", FieldTypes.DEPARTMENTS);
|
|
125
|
+
export default OrganizationSelectionControl;
|
|
126
|
+
export { OrganizationSelectionControl as RuntimeOrganizationSelectionControl };
|
|
File without changes
|