bm-admin-ui 1.0.44-alpha → 1.0.46-alpha
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/es/components/editor/__test__/index.test.d.ts +1 -0
- package/es/components/float-table/index.d.ts +1 -1
- package/es/components/float-table/index.js +22 -11
- package/es/components/float-table/src/float-table.vue.d.ts +1 -1
- package/es/components/form-create/index.js +97 -84
- package/es/components/form-designer/index.js +59 -67
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -0
- package/es/components/videoView/__test__/index.test.d.ts +1 -0
- package/es/components/videoView/index.d.ts +37 -0
- package/es/components/videoView/index.js +100 -0
- package/es/components/videoView/src/videoView.vue.d.ts +36 -0
- package/lib/components/editor/__test__/index.test.d.ts +1 -0
- package/lib/components/float-table/index.d.ts +1 -1
- package/lib/components/float-table/index.js +22 -11
- package/lib/components/float-table/src/float-table.vue.d.ts +1 -1
- package/lib/components/form-create/index.js +97 -85
- package/lib/components/form-designer/index.js +59 -67
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +7 -0
- package/lib/components/videoView/__test__/index.test.d.ts +1 -0
- package/lib/components/videoView/index.d.ts +37 -0
- package/lib/components/videoView/index.js +105 -0
- package/lib/components/videoView/src/videoView.vue.d.ts +36 -0
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/videoView.css +1 -0
- package/types/components/editor/__test__/index.test.d.ts +1 -0
- package/types/components/float-table/index.d.ts +1 -1
- package/types/components/float-table/src/float-table.vue.d.ts +1 -1
- package/types/components/index.d.ts +1 -0
- package/types/components/videoView/__test__/index.test.d.ts +1 -0
- package/types/components/videoView/index.d.ts +37 -0
- package/types/components/videoView/src/videoView.vue.d.ts +36 -0
- package/index.esm.js +0 -150073
- package/index.js +0 -150107
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -58,7 +58,7 @@ declare const BmFloatTable: import("bm-admin-ui/es/utils/with-install").SFCWithI
|
|
|
58
58
|
}>;
|
|
59
59
|
trNodes: import("vue").Ref<any>;
|
|
60
60
|
isInScroll: import("vue").Ref<boolean>;
|
|
61
|
-
|
|
61
|
+
inMaxScrollX: import("vue").Ref<boolean>;
|
|
62
62
|
floatRow: import("vue").Ref<{}>;
|
|
63
63
|
floatRowIndex: import("vue").Ref<undefined>;
|
|
64
64
|
floatHandleDomCol: import("vue").Ref<any>;
|
|
@@ -45,6 +45,7 @@ const _sfc_main = {
|
|
|
45
45
|
"radioChange",
|
|
46
46
|
"checkboxChange",
|
|
47
47
|
"checkboxChangeAll",
|
|
48
|
+
"cellClick",
|
|
48
49
|
"pageChange",
|
|
49
50
|
"pageSizeChange"
|
|
50
51
|
],
|
|
@@ -76,7 +77,7 @@ const _sfc_main = {
|
|
|
76
77
|
reserve: false,
|
|
77
78
|
highlight: computed(function() {
|
|
78
79
|
return props.config.columns.some(function(item) {
|
|
79
|
-
return item.type === "checkbox"
|
|
80
|
+
return item.type === "checkbox";
|
|
80
81
|
});
|
|
81
82
|
}),
|
|
82
83
|
trigger: "row"
|
|
@@ -96,6 +97,16 @@ const _sfc_main = {
|
|
|
96
97
|
},
|
|
97
98
|
checkboxAll(val) {
|
|
98
99
|
emit("checkboxChangeAll", val);
|
|
100
|
+
},
|
|
101
|
+
cellClick(data) {
|
|
102
|
+
let { row, column } = data;
|
|
103
|
+
if (column.type === "checkbox" || column.type === "radio" || column.field === "action" || column.slots?.default === "floatHandle")
|
|
104
|
+
return;
|
|
105
|
+
else {
|
|
106
|
+
xGrid.value.clearCheckboxRow();
|
|
107
|
+
xGrid.value.setCheckboxRow(row, true);
|
|
108
|
+
emit("cellClick", data);
|
|
109
|
+
}
|
|
99
110
|
}
|
|
100
111
|
},
|
|
101
112
|
atVisible: false,
|
|
@@ -106,7 +117,7 @@ const _sfc_main = {
|
|
|
106
117
|
},
|
|
107
118
|
trNodes: [],
|
|
108
119
|
isInScroll: false,
|
|
109
|
-
|
|
120
|
+
inMaxScrollX: false,
|
|
110
121
|
floatRow: {},
|
|
111
122
|
floatRowIndex: void 0,
|
|
112
123
|
floatHandleDomCol: null
|
|
@@ -117,7 +128,7 @@ const _sfc_main = {
|
|
|
117
128
|
"bm-table",
|
|
118
129
|
`table-${props.size}`,
|
|
119
130
|
{
|
|
120
|
-
floatHandleTable: props.isNeedFloatHandle && (!state.atVisible || state.
|
|
131
|
+
floatHandleTable: props.isNeedFloatHandle && (!state.atVisible || state.inMaxScrollX) && state.floatHandleDomCol
|
|
121
132
|
}
|
|
122
133
|
];
|
|
123
134
|
});
|
|
@@ -131,14 +142,14 @@ const _sfc_main = {
|
|
|
131
142
|
const gridEvents = computed(() => {
|
|
132
143
|
let extraFn = {};
|
|
133
144
|
if (props.isNeedFloatHandle) {
|
|
134
|
-
let
|
|
145
|
+
let propsCellMouseenter = props.events.cellMouseenter;
|
|
135
146
|
extraFn.cellMouseenter = (e) => {
|
|
136
147
|
if (props.isNeedFloatHandle) {
|
|
137
148
|
if (state.isInScroll) {
|
|
138
149
|
state.isShowFloatHandle = false;
|
|
139
150
|
return;
|
|
140
151
|
}
|
|
141
|
-
if (state.
|
|
152
|
+
if (state.inMaxScrollX) {
|
|
142
153
|
state.isShowFloatHandle = false;
|
|
143
154
|
}
|
|
144
155
|
let rowid = e.rowid;
|
|
@@ -167,7 +178,7 @@ const _sfc_main = {
|
|
|
167
178
|
top,
|
|
168
179
|
height: clientHeight
|
|
169
180
|
};
|
|
170
|
-
if (!state.atVisible && !state.
|
|
181
|
+
if (!state.atVisible && !state.inMaxScrollX) {
|
|
171
182
|
state.isShowFloatHandle = true;
|
|
172
183
|
}
|
|
173
184
|
nextTick(() => {
|
|
@@ -178,23 +189,23 @@ const _sfc_main = {
|
|
|
178
189
|
});
|
|
179
190
|
}, 200);
|
|
180
191
|
}
|
|
181
|
-
|
|
192
|
+
propsCellMouseenter && propsCellMouseenter(e);
|
|
182
193
|
};
|
|
183
194
|
extraFn.scroll = (e) => {
|
|
184
|
-
let
|
|
195
|
+
let propsScroll = props.events.scroll;
|
|
185
196
|
if (e.isY && props.isNeedFloatHandle) {
|
|
186
197
|
methods.scrollNotShowFloat();
|
|
187
198
|
}
|
|
188
199
|
if (e.isX && props.isNeedFloatHandle && state.floatHandleDomCol && gridOptions.value.data && gridOptions.value.data.length > 0) {
|
|
189
200
|
if (e.scrollLeft + e.$event.target.clientWidth >= e.$event.target.scrollWidth - state.floatHandleDomCol.clientWidth) {
|
|
190
|
-
state.
|
|
201
|
+
state.inMaxScrollX = true;
|
|
191
202
|
state.isShowFloatHandle = false;
|
|
192
203
|
} else {
|
|
193
|
-
state.
|
|
204
|
+
state.inMaxScrollX = false;
|
|
194
205
|
state.isShowFloatHandle = true;
|
|
195
206
|
}
|
|
196
207
|
}
|
|
197
|
-
|
|
208
|
+
propsScroll && propsScroll(e);
|
|
198
209
|
};
|
|
199
210
|
extraFn.cellMouseleave = (e) => {
|
|
200
211
|
let propsCellMouseLeave = props.events.cellMouseleave;
|
|
@@ -58,7 +58,7 @@ declare const _default: {
|
|
|
58
58
|
}>;
|
|
59
59
|
trNodes: import("vue").Ref<any>;
|
|
60
60
|
isInScroll: import("vue").Ref<boolean>;
|
|
61
|
-
|
|
61
|
+
inMaxScrollX: import("vue").Ref<boolean>;
|
|
62
62
|
floatRow: import("vue").Ref<{}>;
|
|
63
63
|
floatRowIndex: import("vue").Ref<undefined>;
|
|
64
64
|
floatHandleDomCol: import("vue").Ref<any>;
|
|
@@ -7,7 +7,6 @@ import BmStaffsSelector from 'bm-admin-ui/es/components/staffs-selector';
|
|
|
7
7
|
import { BmTagsDisplay, BmFloatTable } from 'bm-admin-ui/es/components';
|
|
8
8
|
import { SearchOutlined, CheckCircleFilled, PlusOutlined } from '@ant-design/icons-vue';
|
|
9
9
|
import { cloneDeep, debounce, merge } from 'lodash-es';
|
|
10
|
-
import FC from '@form-create/ant-design-vue';
|
|
11
10
|
|
|
12
11
|
const fieldRatioMap = {
|
|
13
12
|
'25%': 6,
|
|
@@ -774,15 +773,27 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
774
773
|
"placeholder",
|
|
775
774
|
"defaultSelected",
|
|
776
775
|
"load",
|
|
777
|
-
"disabled"
|
|
776
|
+
"disabled",
|
|
777
|
+
"fieldNames"
|
|
778
778
|
],
|
|
779
779
|
emits: ["change"],
|
|
780
780
|
setup(__props, { emit: emits }) {
|
|
781
781
|
const props = __props;
|
|
782
|
+
const fieldNames = props.fieldNames || {
|
|
783
|
+
label: "name",
|
|
784
|
+
value: "code"
|
|
785
|
+
};
|
|
782
786
|
const selected = ref([]);
|
|
783
787
|
const visible = ref(false);
|
|
784
788
|
function selectedChange(val) {
|
|
785
|
-
emits(
|
|
789
|
+
emits(
|
|
790
|
+
"change",
|
|
791
|
+
val.map((item) => ({
|
|
792
|
+
[fieldNames.value]: item.key,
|
|
793
|
+
[fieldNames.label]: item.title,
|
|
794
|
+
...item
|
|
795
|
+
}))
|
|
796
|
+
);
|
|
786
797
|
}
|
|
787
798
|
function handleAdd() {
|
|
788
799
|
visible.value = true;
|
|
@@ -827,6 +838,7 @@ var StaffSelector = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "staff-
|
|
|
827
838
|
var people = {
|
|
828
839
|
name: 'people',
|
|
829
840
|
rule(data, extraConfig) {
|
|
841
|
+
var _a;
|
|
830
842
|
return {
|
|
831
843
|
type: 'StaffSelector',
|
|
832
844
|
component: StaffSelector,
|
|
@@ -842,6 +854,7 @@ var people = {
|
|
|
842
854
|
return yield extraConfig.people.fetch(params);
|
|
843
855
|
});
|
|
844
856
|
},
|
|
857
|
+
fieldNames: (_a = extraConfig.people) === null || _a === void 0 ? void 0 : _a.fieldNames,
|
|
845
858
|
},
|
|
846
859
|
effect: {
|
|
847
860
|
required: data.effect.required && '请选择',
|
|
@@ -866,6 +879,7 @@ var people = {
|
|
|
866
879
|
};
|
|
867
880
|
},
|
|
868
881
|
rowRule(data, extraConfig) {
|
|
882
|
+
var _a;
|
|
869
883
|
return {
|
|
870
884
|
type: 'StaffSelector',
|
|
871
885
|
component: StaffSelector,
|
|
@@ -881,6 +895,7 @@ var people = {
|
|
|
881
895
|
return yield extraConfig.people.fetch(params);
|
|
882
896
|
});
|
|
883
897
|
},
|
|
898
|
+
fieldNames: (_a = extraConfig.people) === null || _a === void 0 ? void 0 : _a.fieldNames,
|
|
884
899
|
},
|
|
885
900
|
effect: {
|
|
886
901
|
required: data.effect.required && '请选择',
|
|
@@ -2217,11 +2232,21 @@ var product = {
|
|
|
2217
2232
|
|
|
2218
2233
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
2219
2234
|
__name: "shop-widget",
|
|
2220
|
-
props: [
|
|
2235
|
+
props: [
|
|
2236
|
+
"value",
|
|
2237
|
+
"extraConfig",
|
|
2238
|
+
"rule",
|
|
2239
|
+
"disabled",
|
|
2240
|
+
"formCreateInject"
|
|
2241
|
+
],
|
|
2221
2242
|
emits: ["change"],
|
|
2222
2243
|
setup(__props, { emit: emits }) {
|
|
2223
2244
|
const props = __props;
|
|
2224
|
-
const
|
|
2245
|
+
const fieldNames = props.extraConfig.fieldNames || {
|
|
2246
|
+
label: "name",
|
|
2247
|
+
value: "code"
|
|
2248
|
+
};
|
|
2249
|
+
const value = ref(props.value?.[fieldNames.value]);
|
|
2225
2250
|
const options = ref([]);
|
|
2226
2251
|
const keyword = ref("");
|
|
2227
2252
|
const debounceFetch = debounce((value2) => {
|
|
@@ -2239,8 +2264,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2239
2264
|
options.value = data;
|
|
2240
2265
|
});
|
|
2241
2266
|
}
|
|
2242
|
-
function handleChange(
|
|
2243
|
-
|
|
2267
|
+
function handleChange(val, option) {
|
|
2268
|
+
value.value = val;
|
|
2269
|
+
emits("change", {
|
|
2270
|
+
[fieldNames.value]: option.value,
|
|
2271
|
+
[fieldNames.label]: option.label
|
|
2272
|
+
});
|
|
2244
2273
|
}
|
|
2245
2274
|
function handleSearch(value2) {
|
|
2246
2275
|
keyword.value = value2;
|
|
@@ -2250,7 +2279,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2250
2279
|
return (_ctx, _cache) => {
|
|
2251
2280
|
return openBlock(), createBlock(unref(Select), {
|
|
2252
2281
|
value: value.value,
|
|
2253
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
2254
2282
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
2255
2283
|
"show-search": "",
|
|
2256
2284
|
"show-arrow": false,
|
|
@@ -2290,6 +2318,7 @@ var shop = {
|
|
|
2290
2318
|
change(inject, value) {
|
|
2291
2319
|
const rule = inject.self;
|
|
2292
2320
|
rule.value = value;
|
|
2321
|
+
rule.props.value = value;
|
|
2293
2322
|
nextTick(() => {
|
|
2294
2323
|
setTimeout(() => {
|
|
2295
2324
|
inject.api.validateField(rule.field);
|
|
@@ -2320,6 +2349,7 @@ var shop = {
|
|
|
2320
2349
|
change(inject, value) {
|
|
2321
2350
|
const rule = inject.self;
|
|
2322
2351
|
rule.value = value;
|
|
2352
|
+
rule.props.value = value;
|
|
2323
2353
|
nextTick(() => {
|
|
2324
2354
|
setTimeout(() => {
|
|
2325
2355
|
inject.api.validateField(rule.field);
|
|
@@ -2358,7 +2388,7 @@ var shop = {
|
|
|
2358
2388
|
};
|
|
2359
2389
|
|
|
2360
2390
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2361
|
-
__name: "material-type
|
|
2391
|
+
__name: "material-type",
|
|
2362
2392
|
props: ["config", "multiple", "format", "value"],
|
|
2363
2393
|
emits: ["change"],
|
|
2364
2394
|
setup(__props, { emit: emits }) {
|
|
@@ -2383,58 +2413,65 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2383
2413
|
result.forEach((item) => {
|
|
2384
2414
|
item.isLeaf = props.format === optionLength + 1;
|
|
2385
2415
|
});
|
|
2386
|
-
|
|
2416
|
+
if (result.length) {
|
|
2417
|
+
targetOption.children = result;
|
|
2418
|
+
} else {
|
|
2419
|
+
targetOption.isLeaf = true;
|
|
2420
|
+
}
|
|
2387
2421
|
}).finally(() => {
|
|
2388
2422
|
targetOption.loading = false;
|
|
2389
2423
|
});
|
|
2390
2424
|
}
|
|
2391
|
-
function handleChange(
|
|
2392
|
-
|
|
2425
|
+
function handleChange(value, selectedOptions) {
|
|
2426
|
+
const result = cloneDeep(selectedOptions);
|
|
2427
|
+
processValue(result);
|
|
2428
|
+
emits("change", result);
|
|
2429
|
+
}
|
|
2430
|
+
function processValue(selectedOptions) {
|
|
2431
|
+
selectedOptions.forEach((item) => {
|
|
2432
|
+
if (Array.isArray(item))
|
|
2433
|
+
processValue(item);
|
|
2434
|
+
else {
|
|
2435
|
+
delete item.disabled;
|
|
2436
|
+
delete item.children;
|
|
2437
|
+
delete item.isLeaf;
|
|
2438
|
+
delete item.loading;
|
|
2439
|
+
}
|
|
2440
|
+
});
|
|
2441
|
+
}
|
|
2442
|
+
function formatValue(value) {
|
|
2443
|
+
value = value || [];
|
|
2444
|
+
return value.reduce((pre, cur) => {
|
|
2445
|
+
if (Array.isArray(cur)) {
|
|
2446
|
+
pre.push(cur.map((c) => c.value));
|
|
2447
|
+
} else {
|
|
2448
|
+
pre.push(cur.value);
|
|
2449
|
+
}
|
|
2450
|
+
return pre;
|
|
2451
|
+
}, []);
|
|
2393
2452
|
}
|
|
2394
2453
|
initOptions();
|
|
2395
2454
|
return (_ctx, _cache) => {
|
|
2396
2455
|
return openBlock(), createBlock(unref(Cascader), {
|
|
2397
|
-
value: __props.value,
|
|
2456
|
+
value: formatValue(__props.value),
|
|
2398
2457
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
2399
2458
|
multiple: __props.multiple,
|
|
2400
2459
|
options: options.value,
|
|
2401
2460
|
"load-data": loadData,
|
|
2402
2461
|
"get-popup-container": unref(getContainer),
|
|
2403
|
-
|
|
2462
|
+
onChange: handleChange
|
|
2404
2463
|
}, null, 8, ["value", "multiple", "options", "get-popup-container"]);
|
|
2405
2464
|
};
|
|
2406
2465
|
}
|
|
2407
2466
|
});
|
|
2408
|
-
var
|
|
2467
|
+
var materialType$1 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "material-type.vue"]]);
|
|
2409
2468
|
|
|
2410
|
-
FC.register({
|
|
2411
|
-
name: 'materialTypesOption',
|
|
2412
|
-
init({ value }, rule) {
|
|
2413
|
-
getOption(value, { level: 1, relationCode: '' }).then((data) => {
|
|
2414
|
-
data = isLeaf(data, rule.config.format === 1);
|
|
2415
|
-
if (rule.props) {
|
|
2416
|
-
rule.props.options = data;
|
|
2417
|
-
}
|
|
2418
|
-
else {
|
|
2419
|
-
(rule.props = {}).options = data;
|
|
2420
|
-
}
|
|
2421
|
-
});
|
|
2422
|
-
},
|
|
2423
|
-
});
|
|
2424
|
-
function getOption(config, data) {
|
|
2425
|
-
return config.fetch(data);
|
|
2426
|
-
}
|
|
2427
|
-
function isLeaf(data, value) {
|
|
2428
|
-
data.forEach((item) => {
|
|
2429
|
-
item.isLeaf = value;
|
|
2430
|
-
});
|
|
2431
|
-
return data;
|
|
2432
|
-
}
|
|
2433
2469
|
var materialType = {
|
|
2434
2470
|
name: 'materialType',
|
|
2435
2471
|
rule(data, extraConfig) {
|
|
2436
2472
|
return {
|
|
2437
|
-
type: '
|
|
2473
|
+
type: 'materialType',
|
|
2474
|
+
component: materialType$1,
|
|
2438
2475
|
field: data.field,
|
|
2439
2476
|
title: '素材类型',
|
|
2440
2477
|
validate: [
|
|
@@ -2446,38 +2483,22 @@ var materialType = {
|
|
|
2446
2483
|
},
|
|
2447
2484
|
],
|
|
2448
2485
|
props: {
|
|
2449
|
-
|
|
2486
|
+
value: data.value,
|
|
2450
2487
|
multiple: data.props.multiple,
|
|
2451
|
-
loadData(inject, selectedOptions) {
|
|
2452
|
-
const optionLength = selectedOptions.length;
|
|
2453
|
-
const targetOption = selectedOptions[optionLength - 1];
|
|
2454
|
-
targetOption.loading = true;
|
|
2455
|
-
getOption(extraConfig.materialType, {
|
|
2456
|
-
level: optionLength + 1,
|
|
2457
|
-
relationCode: targetOption.value,
|
|
2458
|
-
})
|
|
2459
|
-
.then((result) => {
|
|
2460
|
-
result = isLeaf(result, inject.self.config.format === optionLength + 1);
|
|
2461
|
-
targetOption.children = result;
|
|
2462
|
-
})
|
|
2463
|
-
.finally(() => {
|
|
2464
|
-
targetOption.loading = false;
|
|
2465
|
-
});
|
|
2466
|
-
},
|
|
2467
|
-
},
|
|
2468
|
-
config: {
|
|
2469
2488
|
format: data.config.format,
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
materialTypesOption: extraConfig.materialType,
|
|
2489
|
+
config: extraConfig.materialType,
|
|
2490
|
+
disabled: data.disabled,
|
|
2473
2491
|
},
|
|
2474
2492
|
inject: true,
|
|
2475
2493
|
on: {
|
|
2476
2494
|
change(inject, list) {
|
|
2477
2495
|
const rule = inject.self;
|
|
2478
2496
|
rule.value = list;
|
|
2497
|
+
rule.props.value = list;
|
|
2479
2498
|
nextTick(() => {
|
|
2480
|
-
|
|
2499
|
+
setTimeout(() => {
|
|
2500
|
+
inject.api.validateField(rule.field);
|
|
2501
|
+
});
|
|
2481
2502
|
});
|
|
2482
2503
|
},
|
|
2483
2504
|
},
|
|
@@ -2486,7 +2507,8 @@ var materialType = {
|
|
|
2486
2507
|
},
|
|
2487
2508
|
rowRule(data, extraConfig) {
|
|
2488
2509
|
return {
|
|
2489
|
-
type: '
|
|
2510
|
+
type: 'materialType',
|
|
2511
|
+
component: materialType$1,
|
|
2490
2512
|
field: data.field,
|
|
2491
2513
|
title: '素材类型',
|
|
2492
2514
|
validate: [
|
|
@@ -2498,35 +2520,22 @@ var materialType = {
|
|
|
2498
2520
|
},
|
|
2499
2521
|
],
|
|
2500
2522
|
props: {
|
|
2501
|
-
|
|
2523
|
+
value: data.value,
|
|
2502
2524
|
multiple: data.props.multiple,
|
|
2503
|
-
loadData(inject, selectedOptions) {
|
|
2504
|
-
const optionLength = selectedOptions.length;
|
|
2505
|
-
const targetOption = selectedOptions[optionLength - 1];
|
|
2506
|
-
targetOption.loading = true;
|
|
2507
|
-
getOption(extraConfig.materialType, optionLength + 1)
|
|
2508
|
-
.then((result) => {
|
|
2509
|
-
result = isLeaf(result, inject.self.config.format === optionLength + 1);
|
|
2510
|
-
targetOption.children = result;
|
|
2511
|
-
})
|
|
2512
|
-
.finally(() => {
|
|
2513
|
-
targetOption.loading = false;
|
|
2514
|
-
});
|
|
2515
|
-
},
|
|
2516
|
-
},
|
|
2517
|
-
config: {
|
|
2518
2525
|
format: data.config.format,
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
materialTypesOption: extraConfig.materialType,
|
|
2526
|
+
config: extraConfig.materialType,
|
|
2527
|
+
disabled: data.disabled,
|
|
2522
2528
|
},
|
|
2523
2529
|
inject: true,
|
|
2524
2530
|
on: {
|
|
2525
2531
|
change(inject, list) {
|
|
2526
2532
|
const rule = inject.self;
|
|
2527
2533
|
rule.value = list;
|
|
2534
|
+
rule.props.value = list;
|
|
2528
2535
|
nextTick(() => {
|
|
2529
|
-
|
|
2536
|
+
setTimeout(() => {
|
|
2537
|
+
inject.api.validateField(rule.field);
|
|
2538
|
+
});
|
|
2530
2539
|
});
|
|
2531
2540
|
},
|
|
2532
2541
|
},
|
|
@@ -2545,7 +2554,7 @@ var materialType = {
|
|
|
2545
2554
|
minWidth: '138px',
|
|
2546
2555
|
slots: {
|
|
2547
2556
|
default({ row }) {
|
|
2548
|
-
return h(
|
|
2557
|
+
return h(materialType$1, {
|
|
2549
2558
|
multiple: data.props.multiple,
|
|
2550
2559
|
format: data.config.format,
|
|
2551
2560
|
config: extraConfig.materialType,
|
|
@@ -2595,6 +2604,7 @@ var row = {
|
|
|
2595
2604
|
var department = {
|
|
2596
2605
|
name: 'department',
|
|
2597
2606
|
rule(data, extraConfig) {
|
|
2607
|
+
var _a;
|
|
2598
2608
|
return {
|
|
2599
2609
|
type: 'StaffSelector',
|
|
2600
2610
|
component: StaffSelector,
|
|
@@ -2612,6 +2622,7 @@ var department = {
|
|
|
2612
2622
|
return yield extraConfig.department.fetch();
|
|
2613
2623
|
});
|
|
2614
2624
|
},
|
|
2625
|
+
fieldNames: (_a = extraConfig.people) === null || _a === void 0 ? void 0 : _a.fieldNames,
|
|
2615
2626
|
},
|
|
2616
2627
|
effect: {
|
|
2617
2628
|
required: data.effect.required && '请选择',
|
|
@@ -2636,6 +2647,7 @@ var department = {
|
|
|
2636
2647
|
};
|
|
2637
2648
|
},
|
|
2638
2649
|
rowRule(data, extraConfig) {
|
|
2650
|
+
var _a;
|
|
2639
2651
|
return {
|
|
2640
2652
|
type: 'StaffSelector',
|
|
2641
2653
|
component: StaffSelector,
|
|
@@ -2653,6 +2665,7 @@ var department = {
|
|
|
2653
2665
|
return yield extraConfig.department.fetch();
|
|
2654
2666
|
});
|
|
2655
2667
|
},
|
|
2668
|
+
fieldNames: (_a = extraConfig.people) === null || _a === void 0 ? void 0 : _a.fieldNames,
|
|
2656
2669
|
},
|
|
2657
2670
|
effect: {
|
|
2658
2671
|
required: data.effect.required && '请选择',
|