bm-admin-ui 1.0.91-alpha → 1.0.92-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/cascader/__tests__/index.test.d.ts +1 -0
- package/es/components/cascader/_util/KeyCode.d.ts +110 -0
- package/es/components/cascader/index.d.ts +30 -0
- package/es/components/cascader/index.js +211 -0
- package/es/components/cascader/src/cascader.vue.d.ts +29 -0
- package/es/components/edit-form/index.js +1 -1
- package/es/components/feedback/index.d.ts +1 -1
- package/es/components/feedback/src/bmModal.vue.d.ts +1 -1
- package/es/components/float-table/index.js +62 -54
- package/es/components/flow-designer/index.js +1 -1
- package/es/components/form-create/index.js +98 -389
- package/es/components/form-designer/index.js +122 -180
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -0
- package/es/components/search-filter/index.d.ts +0 -28
- package/es/components/search-filter/index.js +17 -70
- package/es/components/search-filter/src/form-select-all.vue.d.ts +0 -15
- package/es/components/search-filter/src/search-filter.d.ts +0 -16
- package/es/components/search-filter/src/search-filter.vue.d.ts +0 -28
- package/es/components/search-filter/src/search-reset-btn.vue.d.ts +0 -26
- package/es/components/select-all/index.d.ts +0 -2
- package/es/components/select-all/index.js +15 -33
- package/es/components/select-all/src/selectAll.vue.d.ts +0 -2
- package/es/components/staffs-selector/index.d.ts +2 -2
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +2 -2
- package/es/utils/uniqueId.js +2 -2
- package/lib/components/cascader/__tests__/index.test.d.ts +1 -0
- package/lib/components/cascader/_util/KeyCode.d.ts +110 -0
- package/lib/components/cascader/index.d.ts +30 -0
- package/lib/components/cascader/index.js +216 -0
- package/lib/components/cascader/src/cascader.vue.d.ts +29 -0
- package/lib/components/edit-form/index.js +1 -1
- package/lib/components/feedback/index.d.ts +1 -1
- package/lib/components/feedback/src/bmModal.vue.d.ts +1 -1
- package/lib/components/float-table/index.js +62 -54
- package/lib/components/flow-designer/index.js +1 -1
- package/lib/components/form-create/index.js +98 -389
- package/lib/components/form-designer/index.js +116 -174
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +7 -0
- package/lib/components/search-filter/index.d.ts +0 -28
- package/lib/components/search-filter/index.js +17 -71
- package/lib/components/search-filter/src/form-select-all.vue.d.ts +0 -15
- package/lib/components/search-filter/src/search-filter.d.ts +0 -16
- package/lib/components/search-filter/src/search-filter.vue.d.ts +0 -28
- package/lib/components/search-filter/src/search-reset-btn.vue.d.ts +0 -26
- package/lib/components/select-all/index.d.ts +0 -2
- package/lib/components/select-all/index.js +14 -32
- package/lib/components/select-all/src/selectAll.vue.d.ts +0 -2
- package/lib/components/staffs-selector/index.d.ts +2 -2
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +2 -2
- package/lib/utils/uniqueId.js +2 -2
- package/package.json +34 -34
- package/theme-chalk/cascader.css +1 -0
- package/theme-chalk/form-designer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/select-all.css +1 -1
- package/types/components/cascader/__tests__/index.test.d.ts +1 -0
- package/types/components/cascader/_util/KeyCode.d.ts +110 -0
- package/types/components/cascader/index.d.ts +30 -0
- package/types/components/cascader/src/cascader.vue.d.ts +29 -0
- package/types/components/feedback/index.d.ts +1 -1
- package/types/components/feedback/src/bmModal.vue.d.ts +1 -1
- package/types/components/index.d.ts +1 -0
- package/types/components/search-filter/index.d.ts +0 -28
- package/types/components/search-filter/src/form-select-all.vue.d.ts +0 -15
- package/types/components/search-filter/src/search-filter.d.ts +0 -16
- package/types/components/search-filter/src/search-filter.vue.d.ts +0 -28
- package/types/components/search-filter/src/search-reset-btn.vue.d.ts +0 -26
- package/types/components/select-all/index.d.ts +0 -2
- package/types/components/select-all/src/selectAll.vue.d.ts +0 -2
- package/types/components/staffs-selector/index.d.ts +2 -2
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +2 -2
|
@@ -163,36 +163,50 @@ var textarea = {
|
|
|
163
163
|
},
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
-
function generateRowRule(data) {
|
|
167
|
-
return {
|
|
168
|
-
type: 'inputNumber',
|
|
169
|
-
field: data.field,
|
|
170
|
-
title: data.title.title,
|
|
171
|
-
props: {
|
|
172
|
-
type: 'number',
|
|
173
|
-
placeholder: data.props.placeholder,
|
|
174
|
-
},
|
|
175
|
-
value: data.value,
|
|
176
|
-
effect: {
|
|
177
|
-
required: data.effect.required && '请输入',
|
|
178
|
-
},
|
|
179
|
-
wrap: {
|
|
180
|
-
wrapperCol: {
|
|
181
|
-
span: fieldRatioMap[data.config.fieldRatio],
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
style: {
|
|
185
|
-
width: '100%',
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
166
|
var numInput = {
|
|
190
167
|
name: 'numInput',
|
|
191
168
|
rule(data) {
|
|
192
|
-
return
|
|
169
|
+
return {
|
|
170
|
+
type: 'inputNumber',
|
|
171
|
+
field: data.field,
|
|
172
|
+
title: data.title.title,
|
|
173
|
+
props: {
|
|
174
|
+
type: 'number',
|
|
175
|
+
placeholder: data.props.placeholder,
|
|
176
|
+
},
|
|
177
|
+
value: data.value,
|
|
178
|
+
effect: {
|
|
179
|
+
required: data.effect.required && '请输入',
|
|
180
|
+
},
|
|
181
|
+
wrap: {
|
|
182
|
+
wrapperCol: {
|
|
183
|
+
span: fieldRatioMap[data.config.fieldRatio],
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
style: {
|
|
187
|
+
width: '100%',
|
|
188
|
+
},
|
|
189
|
+
};
|
|
193
190
|
},
|
|
194
191
|
rowRule(data) {
|
|
195
|
-
return
|
|
192
|
+
return {
|
|
193
|
+
type: 'inputNumber',
|
|
194
|
+
field: data.field,
|
|
195
|
+
title: data.title.title,
|
|
196
|
+
props: {
|
|
197
|
+
placeholder: data.props.placeholder,
|
|
198
|
+
},
|
|
199
|
+
value: data.value,
|
|
200
|
+
effect: {
|
|
201
|
+
required: data.effect.required && '请输入',
|
|
202
|
+
},
|
|
203
|
+
col: {
|
|
204
|
+
span: fieldRatioMap[data.config.fieldRatio],
|
|
205
|
+
},
|
|
206
|
+
style: {
|
|
207
|
+
width: '100%',
|
|
208
|
+
},
|
|
209
|
+
};
|
|
196
210
|
},
|
|
197
211
|
tableRule(data) {
|
|
198
212
|
const field = data.field;
|
|
@@ -230,7 +244,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
230
244
|
return target;
|
|
231
245
|
};
|
|
232
246
|
|
|
233
|
-
const _sfc_main$
|
|
247
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
234
248
|
__name: "radio-widget",
|
|
235
249
|
props: ["formCreateInject"],
|
|
236
250
|
emits: ["change"],
|
|
@@ -269,7 +283,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
269
283
|
};
|
|
270
284
|
}
|
|
271
285
|
});
|
|
272
|
-
var RadioWidget = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
286
|
+
var RadioWidget = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "radio-widget.vue"]]);
|
|
273
287
|
|
|
274
288
|
function handleRadioRule(rule) {
|
|
275
289
|
if (rule.type === 'radio') {
|
|
@@ -829,7 +843,7 @@ var file = {
|
|
|
829
843
|
},
|
|
830
844
|
};
|
|
831
845
|
|
|
832
|
-
const _sfc_main$
|
|
846
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
833
847
|
__name: "staff-selector",
|
|
834
848
|
props: [
|
|
835
849
|
"title",
|
|
@@ -895,7 +909,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
895
909
|
};
|
|
896
910
|
}
|
|
897
911
|
});
|
|
898
|
-
var StaffSelector = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
912
|
+
var StaffSelector = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "staff-selector.vue"]]);
|
|
899
913
|
|
|
900
914
|
var people = {
|
|
901
915
|
name: 'people',
|
|
@@ -1013,10 +1027,10 @@ var people = {
|
|
|
1013
1027
|
},
|
|
1014
1028
|
};
|
|
1015
1029
|
|
|
1016
|
-
const _hoisted_1$
|
|
1030
|
+
const _hoisted_1$6 = ["onClick"];
|
|
1017
1031
|
const _hoisted_2$6 = ["onClick"];
|
|
1018
1032
|
const _hoisted_3$5 = { class: "box" };
|
|
1019
|
-
const _sfc_main$
|
|
1033
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
1020
1034
|
__name: "temp-content",
|
|
1021
1035
|
props: ["content", "preview"],
|
|
1022
1036
|
setup(__props) {
|
|
@@ -1061,7 +1075,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1061
1075
|
createVNode(unref(EyeOutlined)),
|
|
1062
1076
|
createTextVNode("\xA0\u9884\u89C8")
|
|
1063
1077
|
])
|
|
1064
|
-
], 8, _hoisted_1$
|
|
1078
|
+
], 8, _hoisted_1$6)) : createCommentVNode("v-if", true),
|
|
1065
1079
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(layers), (layer) => {
|
|
1066
1080
|
return openBlock(), createElementBlock("div", {
|
|
1067
1081
|
key: layer.uuid,
|
|
@@ -1095,9 +1109,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1095
1109
|
};
|
|
1096
1110
|
}
|
|
1097
1111
|
});
|
|
1098
|
-
var TempContent = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1112
|
+
var TempContent = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "temp-content.vue"]]);
|
|
1099
1113
|
|
|
1100
|
-
const _hoisted_1$
|
|
1114
|
+
const _hoisted_1$5 = { class: "bm-fc-select-material-temp__content__item-info" };
|
|
1101
1115
|
const _hoisted_2$5 = { class: "bm-fc-select-material-temp__content__item-info__cover" };
|
|
1102
1116
|
const _hoisted_3$4 = ["src"];
|
|
1103
1117
|
const _hoisted_4$4 = ["onClick"];
|
|
@@ -1107,7 +1121,7 @@ const _hoisted_5$4 = {
|
|
|
1107
1121
|
};
|
|
1108
1122
|
const _hoisted_6$3 = ["title"];
|
|
1109
1123
|
const _hoisted_7$3 = { class: "bm-fc-select-material-temp__content__item-time" };
|
|
1110
|
-
const _sfc_main$
|
|
1124
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
1111
1125
|
__name: "select-material-temp",
|
|
1112
1126
|
props: [
|
|
1113
1127
|
"visible",
|
|
@@ -1298,7 +1312,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1298
1312
|
span: 6
|
|
1299
1313
|
}, {
|
|
1300
1314
|
default: withCtx(() => [
|
|
1301
|
-
createElementVNode("div", _hoisted_1$
|
|
1315
|
+
createElementVNode("div", _hoisted_1$5, [
|
|
1302
1316
|
createElementVNode("div", _hoisted_2$5, [
|
|
1303
1317
|
item.coverPlanUrl ? (openBlock(), createElementBlock("img", {
|
|
1304
1318
|
key: 0,
|
|
@@ -1353,7 +1367,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1353
1367
|
};
|
|
1354
1368
|
}
|
|
1355
1369
|
});
|
|
1356
|
-
var SelectMaterialTemp = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1370
|
+
var SelectMaterialTemp = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "select-material-temp.vue"]]);
|
|
1357
1371
|
|
|
1358
1372
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
1359
1373
|
|
|
@@ -18558,7 +18572,7 @@ var lodash = {exports: {}};
|
|
|
18558
18572
|
}.call(commonjsGlobal));
|
|
18559
18573
|
}(lodash, lodash.exports));
|
|
18560
18574
|
|
|
18561
|
-
const _sfc_main$
|
|
18575
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
18562
18576
|
__name: "product-input-in-table",
|
|
18563
18577
|
props: ["value", "disabled", "shopValue"],
|
|
18564
18578
|
emits: ["change"],
|
|
@@ -18595,127 +18609,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
18595
18609
|
};
|
|
18596
18610
|
}
|
|
18597
18611
|
});
|
|
18598
|
-
var ProductInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18599
|
-
|
|
18600
|
-
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
18601
|
-
__name: "customer-input-in-table",
|
|
18602
|
-
props: ["value", "disabled", "shopValue"],
|
|
18603
|
-
emits: ["change"],
|
|
18604
|
-
setup(__props, { emit: emits }) {
|
|
18605
|
-
const props = __props;
|
|
18606
|
-
const debounceFn = lodash.exports.debounce(emitChange, 500);
|
|
18607
|
-
const inputValue = ref();
|
|
18608
|
-
function emitChange(val) {
|
|
18609
|
-
emits("change", val);
|
|
18610
|
-
}
|
|
18611
|
-
watch(
|
|
18612
|
-
() => props.value,
|
|
18613
|
-
(val) => {
|
|
18614
|
-
inputValue.value = val;
|
|
18615
|
-
},
|
|
18616
|
-
{
|
|
18617
|
-
immediate: true
|
|
18618
|
-
}
|
|
18619
|
-
);
|
|
18620
|
-
watch(
|
|
18621
|
-
() => props.shopValue,
|
|
18622
|
-
() => {
|
|
18623
|
-
emitChange("");
|
|
18624
|
-
}
|
|
18625
|
-
);
|
|
18626
|
-
return (_ctx, _cache) => {
|
|
18627
|
-
return openBlock(), createBlock(unref(Input), {
|
|
18628
|
-
value: inputValue.value,
|
|
18629
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
18630
|
-
placeholder: "\u8BF7\u8F93\u5165",
|
|
18631
|
-
disabled: __props.disabled,
|
|
18632
|
-
onChange: _cache[1] || (_cache[1] = ($event) => unref(debounceFn)($event.target.value))
|
|
18633
|
-
}, null, 8, ["value", "disabled"]);
|
|
18634
|
-
};
|
|
18635
|
-
}
|
|
18636
|
-
});
|
|
18637
|
-
var CustomerInput = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "customer-input-in-table.vue"]]);
|
|
18638
|
-
|
|
18639
|
-
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
18640
|
-
__name: "shop-input-in-table",
|
|
18641
|
-
props: ["value", "disabled", "fetch", "dataFiltering"],
|
|
18642
|
-
emits: ["change"],
|
|
18643
|
-
setup(__props, { emit: emits }) {
|
|
18644
|
-
const props = __props;
|
|
18645
|
-
const keyword = ref("");
|
|
18646
|
-
const debounceFetch = lodash.exports.debounce((value) => {
|
|
18647
|
-
props.fetch.fetch(
|
|
18648
|
-
{
|
|
18649
|
-
keyword: keyword.value,
|
|
18650
|
-
filterByUser: props.dataFiltering
|
|
18651
|
-
}
|
|
18652
|
-
).then((data) => {
|
|
18653
|
-
if (value === keyword.value)
|
|
18654
|
-
options.value = data;
|
|
18655
|
-
});
|
|
18656
|
-
}, 300);
|
|
18657
|
-
const options = ref([]);
|
|
18658
|
-
const fieldNames = {
|
|
18659
|
-
label: "name",
|
|
18660
|
-
value: "code",
|
|
18661
|
-
channelName: "channelName",
|
|
18662
|
-
platformName: "platformName",
|
|
18663
|
-
channelTypeName: "channelTypeName"
|
|
18664
|
-
};
|
|
18665
|
-
const inputValue = ref();
|
|
18666
|
-
function handleSearch(value) {
|
|
18667
|
-
keyword.value = value;
|
|
18668
|
-
debounceFetch(value);
|
|
18669
|
-
}
|
|
18670
|
-
function handleChangeConfirm(val, option) {
|
|
18671
|
-
handleChange(val, option);
|
|
18672
|
-
}
|
|
18673
|
-
function handleChange(val, option) {
|
|
18674
|
-
console.log("emit\u6570\u636E", option);
|
|
18675
|
-
emits(
|
|
18676
|
-
"change",
|
|
18677
|
-
option ? {
|
|
18678
|
-
[fieldNames.value]: option.value,
|
|
18679
|
-
[fieldNames.label]: option.label,
|
|
18680
|
-
...option
|
|
18681
|
-
} : void 0
|
|
18682
|
-
);
|
|
18683
|
-
}
|
|
18684
|
-
watch(
|
|
18685
|
-
() => props.value,
|
|
18686
|
-
(val) => {
|
|
18687
|
-
inputValue.value = val;
|
|
18688
|
-
},
|
|
18689
|
-
{
|
|
18690
|
-
immediate: true
|
|
18691
|
-
}
|
|
18692
|
-
);
|
|
18693
|
-
debounceFetch("");
|
|
18694
|
-
return (_ctx, _cache) => {
|
|
18695
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
18696
|
-
createCommentVNode(' <Input\n v-model:value="inputValue"\n placeholder="\u8BF7\u8F93\u5165"\n :disabled="disabled"\n @change="debounceFn($event.target.value)"\n ></Input> '),
|
|
18697
|
-
createVNode(unref(Select), {
|
|
18698
|
-
value: __props.value,
|
|
18699
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
18700
|
-
"show-search": "",
|
|
18701
|
-
"show-arrow": false,
|
|
18702
|
-
"default-active-first-option": false,
|
|
18703
|
-
"filter-option": false,
|
|
18704
|
-
"not-found-content": null,
|
|
18705
|
-
options: options.value,
|
|
18706
|
-
"get-popup-container": unref(getContainer),
|
|
18707
|
-
disabled: __props.disabled,
|
|
18708
|
-
"allow-clear": "",
|
|
18709
|
-
onChange: handleChangeConfirm,
|
|
18710
|
-
onSearch: handleSearch
|
|
18711
|
-
}, null, 8, ["value", "options", "get-popup-container", "disabled"])
|
|
18712
|
-
], 2112);
|
|
18713
|
-
};
|
|
18714
|
-
}
|
|
18715
|
-
});
|
|
18716
|
-
var ShopInput = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "shop-input-in-table.vue"]]);
|
|
18612
|
+
var ProductInput = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "product-input-in-table.vue"]]);
|
|
18717
18613
|
|
|
18718
|
-
const _hoisted_1$
|
|
18614
|
+
const _hoisted_1$4 = { class: "bm-dc-table-widget" };
|
|
18719
18615
|
const _hoisted_2$4 = { class: "bm-dc-table-widget__title" };
|
|
18720
18616
|
const _hoisted_3$3 = { class: "bm-dc-table-widget__title-samll" };
|
|
18721
18617
|
const _hoisted_4$3 = { class: "bm-dc-table-widget__top-bar" };
|
|
@@ -18734,32 +18630,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
18734
18630
|
setup(__props, { emit: emits }) {
|
|
18735
18631
|
const props = __props;
|
|
18736
18632
|
dayjs.extend(customParseFormat);
|
|
18737
|
-
const
|
|
18633
|
+
const productInfoKeyMap = {
|
|
18738
18634
|
\u5546\u54C1\u540D\u79F0: "productName",
|
|
18739
18635
|
\u5546\u54C1\u7B80\u79F0: "productShortName",
|
|
18740
18636
|
\u5546\u54C1\u56FE\u7247: "picUrl",
|
|
18741
18637
|
\u5EFA\u8BAE\u96F6\u552E\u4EF7: "retailPrice",
|
|
18742
18638
|
\u5546\u54C1\u7BB1\u89C4: "carton",
|
|
18743
|
-
\u5546\u54C1\u5355\u4F4D: "unit"
|
|
18744
|
-
\u5E97\u94FA\u6240\u5C5E\u5E73\u53F0: "platformName",
|
|
18745
|
-
\u6E20\u9053: "channelName",
|
|
18746
|
-
\u6E20\u9053\u7C7B\u522B: "channelTypeName",
|
|
18747
|
-
\u5BA2\u6237\u7B80\u79F0: "",
|
|
18748
|
-
\u5BA2\u6237\u7C7B\u578B: "",
|
|
18749
|
-
\u5BA2\u6237\u7B49\u7EA7: "",
|
|
18750
|
-
\u6240\u5C5E\u5E97\u94FA: "",
|
|
18751
|
-
\u5E97\u94FA\u7F16\u53F7: "",
|
|
18752
|
-
SAP\u5BA2\u6237\u7F16\u53F7: ""
|
|
18753
|
-
};
|
|
18754
|
-
let indexMap = {
|
|
18755
|
-
product: 0,
|
|
18756
|
-
shop: 0,
|
|
18757
|
-
customer: 0
|
|
18639
|
+
\u5546\u54C1\u5355\u4F4D: "unit"
|
|
18758
18640
|
};
|
|
18641
|
+
let productIndex = 0;
|
|
18759
18642
|
const oper = "oper";
|
|
18760
18643
|
const bmFloatTableRef = ref();
|
|
18761
18644
|
const importFeature = computed(() => isShow("import"));
|
|
18762
|
-
const exportFeature = computed(() => isShow("export"));
|
|
18763
18645
|
const deleteFeature = computed(() => isShow("delete"));
|
|
18764
18646
|
const copyFeature = computed(() => isShow("copy"));
|
|
18765
18647
|
const columns = reactive([]);
|
|
@@ -18809,8 +18691,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
18809
18691
|
}, {}) || {}
|
|
18810
18692
|
);
|
|
18811
18693
|
const productInputSlots = reactive([]);
|
|
18812
|
-
const shopInputSlots = reactive([]);
|
|
18813
|
-
const customerInputSlots = reactive([]);
|
|
18814
18694
|
const formData = computed(
|
|
18815
18695
|
() => props.formData || props.formCreateInject.api.bind()
|
|
18816
18696
|
);
|
|
@@ -18821,8 +18701,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
18821
18701
|
columns.splice(0, columns.length);
|
|
18822
18702
|
data.splice(0, data.length);
|
|
18823
18703
|
productInputSlots.splice(0, productInputSlots.length);
|
|
18824
|
-
shopInputSlots.splice(0, shopInputSlots.length);
|
|
18825
|
-
customerInputSlots.splice(0, customerInputSlots.length);
|
|
18826
18704
|
const childRules = cloneDeep(props.rule.config.childRules);
|
|
18827
18705
|
const value = props.rule.value;
|
|
18828
18706
|
if (deleteFeature.value && !props.hidden) {
|
|
@@ -18837,8 +18715,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
18837
18715
|
return pre;
|
|
18838
18716
|
}
|
|
18839
18717
|
const name = cur.name;
|
|
18840
|
-
if (
|
|
18841
|
-
pre.push(...
|
|
18718
|
+
if (name === "product") {
|
|
18719
|
+
pre.push(...getProductColumn(cur));
|
|
18842
18720
|
} else {
|
|
18843
18721
|
pre.push(ruleList[name].tableRule(cur, props.extraConfig));
|
|
18844
18722
|
}
|
|
@@ -18870,26 +18748,15 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
18870
18748
|
function productPicName(value, field) {
|
|
18871
18749
|
return `${value}-${field}`;
|
|
18872
18750
|
}
|
|
18873
|
-
function
|
|
18874
|
-
const
|
|
18875
|
-
shop: {
|
|
18876
|
-
prefix: "\u5E97\u94FA",
|
|
18877
|
-
slots: shopInputSlots
|
|
18878
|
-
},
|
|
18879
|
-
product: { prefix: "\u5546\u54C1", slots: productInputSlots },
|
|
18880
|
-
customer: { prefix: "\u5BA2\u6237", slots: customerInputSlots }
|
|
18881
|
-
}[rule.name];
|
|
18882
|
-
const mainName = `${configObj.prefix}${String(++indexMap[rule.name]).padStart(
|
|
18883
|
-
2,
|
|
18884
|
-
"0"
|
|
18885
|
-
)}`;
|
|
18751
|
+
function getProductColumn(rule) {
|
|
18752
|
+
const productName = `\u5546\u54C1${String(++productIndex).padStart(2, "0")}`;
|
|
18886
18753
|
const field = rule.field;
|
|
18887
18754
|
const associatedFields = rule.config.associatedFields;
|
|
18888
|
-
|
|
18755
|
+
productInputSlots.push(rule);
|
|
18889
18756
|
const columns2 = [
|
|
18890
18757
|
{
|
|
18891
18758
|
field,
|
|
18892
|
-
title:
|
|
18759
|
+
title: `\u5546\u54C1\u7F16\u7801-${productName}`,
|
|
18893
18760
|
headerClassName: rule.effect.required ? "is-required" : "",
|
|
18894
18761
|
minWidth: "138px",
|
|
18895
18762
|
slots: {
|
|
@@ -18902,7 +18769,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
18902
18769
|
const childField = productPicName(item.value, field);
|
|
18903
18770
|
columns2.push({
|
|
18904
18771
|
field: childField,
|
|
18905
|
-
title: `${item.label}-${
|
|
18772
|
+
title: `${item.label}-${productName}`,
|
|
18906
18773
|
minWidth: "138px",
|
|
18907
18774
|
slots: {
|
|
18908
18775
|
default({ row }) {
|
|
@@ -18966,14 +18833,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
18966
18833
|
inputRef.value.click();
|
|
18967
18834
|
}
|
|
18968
18835
|
}
|
|
18969
|
-
function handleExport() {
|
|
18970
|
-
xGrid.value.exportData({
|
|
18971
|
-
mode: "all",
|
|
18972
|
-
columnFilterMethod({ column }) {
|
|
18973
|
-
return isValidColumn(column);
|
|
18974
|
-
}
|
|
18975
|
-
});
|
|
18976
|
-
}
|
|
18977
18836
|
function emitChange() {
|
|
18978
18837
|
emits("change", data);
|
|
18979
18838
|
}
|
|
@@ -19002,7 +18861,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
19002
18861
|
function processAssociatedFields(field, associatedFields, row, result) {
|
|
19003
18862
|
if (associatedFields.length)
|
|
19004
18863
|
associatedFields.forEach((item) => {
|
|
19005
|
-
row[productPicName(item.value, field)] = result ? result[
|
|
18864
|
+
row[productPicName(item.value, field)] = result ? result[productInfoKeyMap[item.value]] : void 0;
|
|
19006
18865
|
});
|
|
19007
18866
|
}
|
|
19008
18867
|
function handleChange(e) {
|
|
@@ -19055,12 +18914,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
19055
18914
|
const validColumns = columns.filter((c) => isValidColumn(c));
|
|
19056
18915
|
for (const row of rowData) {
|
|
19057
18916
|
for (const { field } of validColumns) {
|
|
19058
|
-
const rule = childRulesMap.value[
|
|
18917
|
+
const rule = childRulesMap.value[field];
|
|
19059
18918
|
const title = rule?.title?.title;
|
|
19060
18919
|
if (!rule)
|
|
19061
18920
|
continue;
|
|
19062
18921
|
const fieldNames = props.extraConfig[rule.name]?.fieldNames;
|
|
19063
|
-
let value = row[
|
|
18922
|
+
let value = row[field] || "";
|
|
19064
18923
|
const txtFormatFn = rule.config?.txtFormatFn;
|
|
19065
18924
|
if (!value) {
|
|
19066
18925
|
if (rule.effect.required && rule.name !== "materialType") {
|
|
@@ -19213,7 +19072,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
19213
19072
|
break;
|
|
19214
19073
|
}
|
|
19215
19074
|
}
|
|
19216
|
-
row[
|
|
19075
|
+
row[field] = value;
|
|
19217
19076
|
}
|
|
19218
19077
|
if (error)
|
|
19219
19078
|
break;
|
|
@@ -19236,15 +19095,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
19236
19095
|
row[rule.field] = value;
|
|
19237
19096
|
queryProductInfo(rule, row);
|
|
19238
19097
|
}
|
|
19239
|
-
function handleShopOption(value, rule, row) {
|
|
19240
|
-
row[rule?.field] = value;
|
|
19241
|
-
processAssociatedFields(
|
|
19242
|
-
rule?.field,
|
|
19243
|
-
rule?.config?.associatedFields,
|
|
19244
|
-
row,
|
|
19245
|
-
value
|
|
19246
|
-
);
|
|
19247
|
-
}
|
|
19248
19098
|
function importDisabled() {
|
|
19249
19099
|
return productInputSlots.filter((item) => item.config?.dataFiltering).some((item) => !formData.value[item.config.dataFiltering]);
|
|
19250
19100
|
}
|
|
@@ -19267,23 +19117,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
19267
19117
|
}
|
|
19268
19118
|
);
|
|
19269
19119
|
return (_ctx, _cache) => {
|
|
19270
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
19120
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
19271
19121
|
createElementVNode("div", _hoisted_2$4, [
|
|
19272
19122
|
createTextVNode(toDisplayString(__props.rule.title.title) + " ", 1),
|
|
19273
19123
|
createElementVNode("span", _hoisted_3$3, toDisplayString(unref(countText)), 1),
|
|
19274
19124
|
createElementVNode("div", _hoisted_4$3, [
|
|
19275
|
-
unref(
|
|
19276
|
-
key: 0,
|
|
19277
|
-
disabled: __props.disabled,
|
|
19278
|
-
onClick: handleExport
|
|
19279
|
-
}, {
|
|
19280
|
-
default: withCtx(() => [
|
|
19281
|
-
createTextVNode("\u5BFC\u51FA")
|
|
19282
|
-
]),
|
|
19283
|
-
_: 1
|
|
19284
|
-
}, 8, ["disabled"])) : createCommentVNode("v-if", true),
|
|
19285
|
-
createTextVNode("\xA0 "),
|
|
19286
|
-
unref(importFeature) && !__props.hidden ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
19125
|
+
unref(importFeature) && !__props.hidden ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
19287
19126
|
createElementVNode("input", {
|
|
19288
19127
|
ref_key: "inputRef",
|
|
19289
19128
|
ref: inputRef,
|
|
@@ -19313,7 +19152,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
19313
19152
|
}, 8, ["disabled"])
|
|
19314
19153
|
], 64)) : createCommentVNode("v-if", true),
|
|
19315
19154
|
unref(deleteFeature) && !__props.hidden ? (openBlock(), createBlock(unref(Button), {
|
|
19316
|
-
key:
|
|
19155
|
+
key: 1,
|
|
19317
19156
|
disabled: __props.disabled,
|
|
19318
19157
|
onClick: handleBatchDelete
|
|
19319
19158
|
}, {
|
|
@@ -19323,7 +19162,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
19323
19162
|
_: 1
|
|
19324
19163
|
}, 8, ["disabled"])) : createCommentVNode("v-if", true),
|
|
19325
19164
|
!__props.hidden ? (openBlock(), createBlock(unref(Button), {
|
|
19326
|
-
key:
|
|
19165
|
+
key: 2,
|
|
19327
19166
|
type: "primary",
|
|
19328
19167
|
disabled: __props.disabled,
|
|
19329
19168
|
onClick: handleAdd
|
|
@@ -19385,33 +19224,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
19385
19224
|
}, null, 8, ["value", "disabled", "shop-value", "onChange"])
|
|
19386
19225
|
])
|
|
19387
19226
|
};
|
|
19388
|
-
}),
|
|
19389
|
-
renderList(shopInputSlots, (item) => {
|
|
19390
|
-
return {
|
|
19391
|
-
name: item.field,
|
|
19392
|
-
fn: withCtx(({ row }) => [
|
|
19393
|
-
createCommentVNode(" {{ item }} "),
|
|
19394
|
-
createVNode(ShopInput, {
|
|
19395
|
-
value: row[item.field],
|
|
19396
|
-
fetch: __props.extraConfig?.shop,
|
|
19397
|
-
"data-filtering": item?.config?.dataFiltering,
|
|
19398
|
-
onChange: ($event) => handleShopOption($event, item, row)
|
|
19399
|
-
}, null, 8, ["value", "fetch", "data-filtering", "onChange"])
|
|
19400
|
-
])
|
|
19401
|
-
};
|
|
19402
|
-
}),
|
|
19403
|
-
renderList(customerInputSlots, (item) => {
|
|
19404
|
-
return {
|
|
19405
|
-
name: item.field,
|
|
19406
|
-
fn: withCtx(({ row }) => [
|
|
19407
|
-
createVNode(CustomerInput, {
|
|
19408
|
-
value: row[item.field],
|
|
19409
|
-
disabled: item.disabled || pruductInputDisabled(item.config?.dataFiltering),
|
|
19410
|
-
"shop-value": unref(formData)[item.config.dataFiltering],
|
|
19411
|
-
onChange: ($event) => handlePressEnter($event, item, row)
|
|
19412
|
-
}, null, 8, ["value", "disabled", "shop-value", "onChange"])
|
|
19413
|
-
])
|
|
19414
|
-
};
|
|
19415
19227
|
})
|
|
19416
19228
|
]), 1032, ["config"])
|
|
19417
19229
|
]),
|
|
@@ -19424,7 +19236,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
19424
19236
|
});
|
|
19425
19237
|
var TableWidget = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "table-widget.vue"]]);
|
|
19426
19238
|
|
|
19427
|
-
const _hoisted_1$
|
|
19239
|
+
const _hoisted_1$3 = /* @__PURE__ */ createElementVNode("span", { class: "bm-fc-form-item-label is-required" }, "\u7D20\u6750\u6A21\u677F\uFF1A", -1);
|
|
19428
19240
|
const _hoisted_2$3 = { key: 0 };
|
|
19429
19241
|
const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("span", { class: "bm-fc-form-item-label" }, "\u7D20\u6750\u7C7B\u578B\uFF1A", -1);
|
|
19430
19242
|
const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("span", { class: "bm-fc-form-item-label" }, "\u5C3A\u5BF8\uFF1A", -1);
|
|
@@ -19760,7 +19572,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
19760
19572
|
default: withCtx(() => [
|
|
19761
19573
|
createVNode(unref(Col), null, {
|
|
19762
19574
|
default: withCtx(() => [
|
|
19763
|
-
_hoisted_1$
|
|
19575
|
+
_hoisted_1$3
|
|
19764
19576
|
]),
|
|
19765
19577
|
_: 1
|
|
19766
19578
|
}),
|
|
@@ -20052,7 +19864,7 @@ var materialTemp = {
|
|
|
20052
19864
|
},
|
|
20053
19865
|
};
|
|
20054
19866
|
|
|
20055
|
-
const _hoisted_1$
|
|
19867
|
+
const _hoisted_1$2 = { class: "bm-fc-form-item-label" };
|
|
20056
19868
|
const _hoisted_2$2 = ["src"];
|
|
20057
19869
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
20058
19870
|
__name: "product-info",
|
|
@@ -20184,7 +19996,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20184
19996
|
default: withCtx(() => [
|
|
20185
19997
|
createVNode(unref(Col), null, {
|
|
20186
19998
|
default: withCtx(() => [
|
|
20187
|
-
createElementVNode("span", _hoisted_1$
|
|
19999
|
+
createElementVNode("span", _hoisted_1$2, toDisplayString(field.label) + "\uFF1A", 1)
|
|
20188
20000
|
]),
|
|
20189
20001
|
_: 2
|
|
20190
20002
|
}, 1024),
|
|
@@ -20286,7 +20098,6 @@ var product = {
|
|
|
20286
20098
|
},
|
|
20287
20099
|
};
|
|
20288
20100
|
|
|
20289
|
-
const _hoisted_1$2 = { class: "bm-fc-form-item-label" };
|
|
20290
20101
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
20291
20102
|
__name: "shop-widget",
|
|
20292
20103
|
props: [
|
|
@@ -20295,20 +20106,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
20295
20106
|
"dataFiltering",
|
|
20296
20107
|
"disabled",
|
|
20297
20108
|
"formCreateInject",
|
|
20298
|
-
"fdRule"
|
|
20299
|
-
"required",
|
|
20300
|
-
"title",
|
|
20301
|
-
"associatedFields"
|
|
20109
|
+
"fdRule"
|
|
20302
20110
|
],
|
|
20303
20111
|
emits: ["change"],
|
|
20304
20112
|
setup(__props, { emit: emits }) {
|
|
20305
20113
|
const props = __props;
|
|
20306
20114
|
const fieldNames = props.extraConfig.fieldNames || {
|
|
20307
20115
|
label: "name",
|
|
20308
|
-
value: "code"
|
|
20309
|
-
channelName: "channelName",
|
|
20310
|
-
platformName: "platformName",
|
|
20311
|
-
channelTypeName: "channelTypeName"
|
|
20116
|
+
value: "code"
|
|
20312
20117
|
};
|
|
20313
20118
|
const options = ref([]);
|
|
20314
20119
|
const keyword = ref("");
|
|
@@ -20374,99 +20179,23 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
20374
20179
|
keyword.value = value;
|
|
20375
20180
|
debounceFetch(value);
|
|
20376
20181
|
}
|
|
20377
|
-
const shopInfoKeyMap = {
|
|
20378
|
-
\u5E97\u94FA\u6240\u5C5E\u5E73\u53F0: "platformName",
|
|
20379
|
-
\u6E20\u9053: "channelName",
|
|
20380
|
-
\u6E20\u9053\u7C7B\u522B: "channelTypeName"
|
|
20381
|
-
};
|
|
20382
|
-
function getValue(value) {
|
|
20383
|
-
const parse = shopInfoKeyMap[value];
|
|
20384
|
-
return props.formCreateInject?.rule?.value?.[parse];
|
|
20385
|
-
}
|
|
20386
20182
|
initOptions();
|
|
20387
20183
|
return (_ctx, _cache) => {
|
|
20388
|
-
return openBlock(), createBlock(unref(
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
|
|
20395
|
-
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
|
|
20400
|
-
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
}, toDisplayString(__props.title) + "\uFF1A", 3)
|
|
20404
|
-
]),
|
|
20405
|
-
_: 1
|
|
20406
|
-
}),
|
|
20407
|
-
createVNode(unref(Col), { flex: 1 }, {
|
|
20408
|
-
default: withCtx(() => [
|
|
20409
|
-
createVNode(unref(Select), {
|
|
20410
|
-
value: __props.formCreateInject?.rule?.value?.value || __props.value?.value,
|
|
20411
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
20412
|
-
"show-search": "",
|
|
20413
|
-
"show-arrow": false,
|
|
20414
|
-
"default-active-first-option": false,
|
|
20415
|
-
"filter-option": false,
|
|
20416
|
-
"not-found-content": null,
|
|
20417
|
-
options: options.value,
|
|
20418
|
-
"get-popup-container": unref(getContainer),
|
|
20419
|
-
disabled: __props.disabled,
|
|
20420
|
-
"allow-clear": "",
|
|
20421
|
-
onChange: handleChangeConfirm,
|
|
20422
|
-
onSearch: handleSearch
|
|
20423
|
-
}, null, 8, ["value", "options", "get-popup-container", "disabled"])
|
|
20424
|
-
]),
|
|
20425
|
-
_: 1
|
|
20426
|
-
})
|
|
20427
|
-
]),
|
|
20428
|
-
_: 1
|
|
20429
|
-
})
|
|
20430
|
-
]),
|
|
20431
|
-
_: 1
|
|
20432
|
-
}, 8, ["span"]),
|
|
20433
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.associatedFields, (field2) => {
|
|
20434
|
-
return openBlock(), createBlock(unref(Col), {
|
|
20435
|
-
key: field2.value,
|
|
20436
|
-
span: 8
|
|
20437
|
-
}, {
|
|
20438
|
-
default: withCtx(() => [
|
|
20439
|
-
createVNode(unref(Row), null, {
|
|
20440
|
-
default: withCtx(() => [
|
|
20441
|
-
createVNode(unref(Col), null, {
|
|
20442
|
-
default: withCtx(() => [
|
|
20443
|
-
createElementVNode("span", _hoisted_1$2, toDisplayString(field2.label) + "\uFF1A", 1)
|
|
20444
|
-
]),
|
|
20445
|
-
_: 2
|
|
20446
|
-
}, 1024),
|
|
20447
|
-
createVNode(unref(Col), {
|
|
20448
|
-
class: "bm-fc-form-item",
|
|
20449
|
-
flex: 1
|
|
20450
|
-
}, {
|
|
20451
|
-
default: withCtx(() => [
|
|
20452
|
-
getValue(field2.value) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
20453
|
-
createTextVNode(toDisplayString(getValue(field2.value)), 1)
|
|
20454
|
-
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
20455
|
-
createTextVNode("\u7CFB\u7EDF\u81EA\u52A8\u5E26\u51FA")
|
|
20456
|
-
], 64))
|
|
20457
|
-
]),
|
|
20458
|
-
_: 2
|
|
20459
|
-
}, 1024)
|
|
20460
|
-
]),
|
|
20461
|
-
_: 2
|
|
20462
|
-
}, 1024)
|
|
20463
|
-
]),
|
|
20464
|
-
_: 2
|
|
20465
|
-
}, 1024);
|
|
20466
|
-
}), 128))
|
|
20467
|
-
]),
|
|
20468
|
-
_: 1
|
|
20469
|
-
});
|
|
20184
|
+
return openBlock(), createBlock(unref(Select), {
|
|
20185
|
+
value: __props.formCreateInject?.rule?.value?.value || __props.value?.value,
|
|
20186
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
20187
|
+
"show-search": "",
|
|
20188
|
+
"show-arrow": false,
|
|
20189
|
+
"default-active-first-option": false,
|
|
20190
|
+
"filter-option": false,
|
|
20191
|
+
"not-found-content": null,
|
|
20192
|
+
options: options.value,
|
|
20193
|
+
"get-popup-container": unref(getContainer),
|
|
20194
|
+
disabled: __props.disabled,
|
|
20195
|
+
"allow-clear": "",
|
|
20196
|
+
onChange: handleChangeConfirm,
|
|
20197
|
+
onSearch: handleSearch
|
|
20198
|
+
}, null, 8, ["value", "options", "get-popup-container", "disabled"]);
|
|
20470
20199
|
};
|
|
20471
20200
|
}
|
|
20472
20201
|
});
|
|
@@ -20480,16 +20209,14 @@ var shop = {
|
|
|
20480
20209
|
return {
|
|
20481
20210
|
type: 'ShopWidget',
|
|
20482
20211
|
component: ShopWidget,
|
|
20212
|
+
title: `${data.title.title}${data.config.isMain ? '(主控件)' : ''}`,
|
|
20483
20213
|
field: data.field,
|
|
20484
20214
|
effect: {
|
|
20485
20215
|
required: data.effect.required && '请选择店铺',
|
|
20486
20216
|
},
|
|
20487
20217
|
props: {
|
|
20488
20218
|
dataFiltering: (_a = data.config) === null || _a === void 0 ? void 0 : _a.dataFiltering,
|
|
20489
|
-
associatedFields: data.config.associatedFields,
|
|
20490
20219
|
extraConfig: shopExtraConfig,
|
|
20491
|
-
required: data.effect.required,
|
|
20492
|
-
title: `${data.title.title}${data.config.isMain ? '(主控件)' : ''}`,
|
|
20493
20220
|
},
|
|
20494
20221
|
inject: true,
|
|
20495
20222
|
on: {
|
|
@@ -21139,22 +20866,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21139
20866
|
"extraConfig",
|
|
21140
20867
|
"value",
|
|
21141
20868
|
"info",
|
|
21142
|
-
"formPermissions"
|
|
21143
|
-
"resolveRulesConfig"
|
|
20869
|
+
"formPermissions"
|
|
21144
20870
|
],
|
|
21145
20871
|
emits: ["update:value"],
|
|
21146
20872
|
setup(__props, { expose, emit: emits }) {
|
|
21147
20873
|
const props = __props;
|
|
21148
|
-
const formRuleList = computed(() => {
|
|
21149
|
-
if (typeof props.resolveRulesConfig === "function") {
|
|
21150
|
-
const rules = props.resolveRulesConfig(ruleList);
|
|
21151
|
-
if (!rules) {
|
|
21152
|
-
throw new Error("resolveRulesConfig\u9700\u8FD4\u56DErules\u89E3\u6790\u5BF9\u8C61");
|
|
21153
|
-
}
|
|
21154
|
-
return props.resolveRulesConfig(ruleList) || {};
|
|
21155
|
-
}
|
|
21156
|
-
return ruleList;
|
|
21157
|
-
});
|
|
21158
20874
|
const option = computed(() => ({
|
|
21159
20875
|
wrap: {
|
|
21160
20876
|
labelCol: {
|
|
@@ -21193,19 +20909,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21193
20909
|
function makeRule(fdRule) {
|
|
21194
20910
|
return fdRule.map((data) => {
|
|
21195
20911
|
const childRules = data?.config?.childRules;
|
|
21196
|
-
const rule2 =
|
|
21197
|
-
if (!rule2) {
|
|
21198
|
-
console.error(`\u672A\u914D\u7F6Erule \u3010${data.name}\u3011\u89E3\u6790\u5BF9\u8C61`);
|
|
21199
|
-
return null;
|
|
21200
|
-
}
|
|
20912
|
+
const rule2 = ruleList[data.name].rule(data, props.extraConfig);
|
|
21201
20913
|
if (data.name === "row" && childRules?.length) {
|
|
21202
20914
|
const rowRule = rule2.children.find((item) => item.type === "row");
|
|
21203
20915
|
childRules.forEach((ruleItem) => {
|
|
21204
20916
|
rowRule.children.push(
|
|
21205
|
-
|
|
21206
|
-
ruleItem,
|
|
21207
|
-
props.extraConfig
|
|
21208
|
-
)
|
|
20917
|
+
ruleList[ruleItem.name].rowRule(ruleItem, props.extraConfig)
|
|
21209
20918
|
);
|
|
21210
20919
|
});
|
|
21211
20920
|
}
|
|
@@ -21269,7 +20978,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21269
20978
|
}
|
|
21270
20979
|
}
|
|
21271
20980
|
function getFormFeildRule(rule2) {
|
|
21272
|
-
if (rule2
|
|
20981
|
+
if (rule2.native) {
|
|
21273
20982
|
return rule2.children.find((item) => item.field);
|
|
21274
20983
|
} else
|
|
21275
20984
|
return rule2;
|