bm-admin-ui 1.2.36-alpha → 1.2.38-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/attachment/index.d.ts +3 -3
- package/es/components/attachment/src/attachment.vue.d.ts +3 -3
- package/es/components/breadcrumb/index.d.ts +7 -7
- package/es/components/breadcrumb/src/breadcrumb.vue.d.ts +7 -7
- package/es/components/button/index.d.ts +6 -6
- package/es/components/button/src/button.vue.d.ts +6 -6
- package/es/components/edit-form/index.d.ts +4 -4
- package/es/components/edit-form/src/edit-form.vue.d.ts +4 -4
- package/es/components/feedback/index.d.ts +12 -12
- package/es/components/feedback/src/bmAlert.vue.d.ts +6 -6
- package/es/components/feedback/src/bmModal.vue.d.ts +6 -6
- package/es/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +8 -8
- package/es/components/form-create/index.js +144 -60
- package/es/components/form-designer/index.js +2 -20
- package/es/components/input-tags-display/index.js +10 -5
- package/es/components/search-filter/src/form-select-all.vue.d.ts +6 -6
- package/es/components/search-filter/src/search-reset-btn.vue.d.ts +3 -3
- package/es/components/select-all/index.d.ts +6 -6
- package/es/components/select-all/src/selectAll.vue.d.ts +6 -6
- package/es/components/staffs-selector/index.d.ts +8 -8
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +8 -8
- package/es/components/videoView/index.d.ts +1 -1
- package/es/components/videoView/src/videoView.vue.d.ts +1 -1
- package/lib/components/attachment/index.d.ts +3 -3
- package/lib/components/attachment/src/attachment.vue.d.ts +3 -3
- package/lib/components/breadcrumb/index.d.ts +7 -7
- package/lib/components/breadcrumb/src/breadcrumb.vue.d.ts +7 -7
- package/lib/components/button/index.d.ts +6 -6
- package/lib/components/button/src/button.vue.d.ts +6 -6
- package/lib/components/edit-form/index.d.ts +4 -4
- package/lib/components/edit-form/src/edit-form.vue.d.ts +4 -4
- package/lib/components/feedback/index.d.ts +12 -12
- package/lib/components/feedback/src/bmAlert.vue.d.ts +6 -6
- package/lib/components/feedback/src/bmModal.vue.d.ts +6 -6
- package/lib/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +8 -8
- package/lib/components/form-create/index.js +141 -57
- package/lib/components/form-designer/index.js +2 -20
- package/lib/components/input-tags-display/index.js +9 -4
- package/lib/components/search-filter/src/form-select-all.vue.d.ts +6 -6
- package/lib/components/search-filter/src/search-reset-btn.vue.d.ts +3 -3
- package/lib/components/select-all/index.d.ts +6 -6
- package/lib/components/select-all/src/selectAll.vue.d.ts +6 -6
- package/lib/components/staffs-selector/index.d.ts +8 -8
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +8 -8
- package/lib/components/videoView/index.d.ts +1 -1
- package/lib/components/videoView/src/videoView.vue.d.ts +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/input-tags-display.css +1 -1
- package/types/components/attachment/index.d.ts +3 -3
- package/types/components/attachment/src/attachment.vue.d.ts +3 -3
- package/types/components/breadcrumb/index.d.ts +7 -7
- package/types/components/breadcrumb/src/breadcrumb.vue.d.ts +7 -7
- package/types/components/button/index.d.ts +6 -6
- package/types/components/button/src/button.vue.d.ts +6 -6
- package/types/components/edit-form/index.d.ts +4 -4
- package/types/components/edit-form/src/edit-form.vue.d.ts +4 -4
- package/types/components/feedback/index.d.ts +12 -12
- package/types/components/feedback/src/bmAlert.vue.d.ts +6 -6
- package/types/components/feedback/src/bmModal.vue.d.ts +6 -6
- package/types/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +8 -8
- package/types/components/search-filter/src/form-select-all.vue.d.ts +6 -6
- package/types/components/search-filter/src/search-reset-btn.vue.d.ts +3 -3
- package/types/components/select-all/index.d.ts +6 -6
- package/types/components/select-all/src/selectAll.vue.d.ts +6 -6
- package/types/components/staffs-selector/index.d.ts +8 -8
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +8 -8
- package/types/components/videoView/index.d.ts +1 -1
- package/types/components/videoView/src/videoView.vue.d.ts +1 -1
- package/es/components/staffs-selector/src/autoTooltip.vue.d.ts +0 -26
- package/es/components/staffs-selector/src/virtualScroll.vue.d.ts +0 -69
- package/lib/components/staffs-selector/src/autoTooltip.vue.d.ts +0 -26
- package/lib/components/staffs-selector/src/virtualScroll.vue.d.ts +0 -69
- package/types/components/staffs-selector/src/autoTooltip.vue.d.ts +0 -26
- package/types/components/staffs-selector/src/virtualScroll.vue.d.ts +0 -69
|
@@ -4,14 +4,14 @@ import { Input, InputNumber, RadioGroup, Radio, Select, DatePicker, RangePicker,
|
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import Picture from 'bm-admin-ui/es/components/upload';
|
|
6
6
|
import BmStaffsSelector from 'bm-admin-ui/es/components/staffs-selector';
|
|
7
|
-
import { BmTagsDisplay, BmFloatTable } from 'bm-admin-ui/es/components';
|
|
7
|
+
import { BmTagsDisplay, BmFloatTable, BmOverTooltips } from 'bm-admin-ui/es/components';
|
|
8
8
|
import { EyeOutlined, SearchOutlined, CheckCircleFilled, PlusOutlined } from '@ant-design/icons-vue';
|
|
9
9
|
import { cloneDeep, floor, debounce } from 'lodash-es';
|
|
10
10
|
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
11
11
|
import utils from 'bm-admin-ui/es/utils/index';
|
|
12
12
|
import { isNull } from 'bm-admin-ui/es/utils/isNull';
|
|
13
13
|
import FC from '@form-create/ant-design-vue';
|
|
14
|
-
import BmOverTooltips from 'bm-admin-ui/es/components/over-tooltips';
|
|
14
|
+
import BmOverTooltips$1 from 'bm-admin-ui/es/components/over-tooltips';
|
|
15
15
|
|
|
16
16
|
const fieldRatioMap = {
|
|
17
17
|
'25%': 6,
|
|
@@ -75,7 +75,7 @@ var input = {
|
|
|
75
75
|
field,
|
|
76
76
|
title: data.title.title,
|
|
77
77
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
78
|
-
|
|
78
|
+
width: data.config.fieldRatio,
|
|
79
79
|
slots: {
|
|
80
80
|
default({ row }) {
|
|
81
81
|
return h(Input, {
|
|
@@ -151,7 +151,7 @@ var textarea = {
|
|
|
151
151
|
field,
|
|
152
152
|
title: data.title.title,
|
|
153
153
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
154
|
-
|
|
154
|
+
width: data.config.fieldRatio,
|
|
155
155
|
slots: {
|
|
156
156
|
default({ row }) {
|
|
157
157
|
return h(Input, {
|
|
@@ -216,7 +216,7 @@ var numInput = {
|
|
|
216
216
|
field,
|
|
217
217
|
title: data.title.title,
|
|
218
218
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
219
|
-
|
|
219
|
+
width: data.config.fieldRatio,
|
|
220
220
|
slots: {
|
|
221
221
|
default({ row }) {
|
|
222
222
|
return h(InputNumber, {
|
|
@@ -353,7 +353,7 @@ var radio = {
|
|
|
353
353
|
field,
|
|
354
354
|
title: data.title.title,
|
|
355
355
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
356
|
-
|
|
356
|
+
width: data.config.fieldRatio,
|
|
357
357
|
slots: {
|
|
358
358
|
default({ row }) {
|
|
359
359
|
return h(Select, {
|
|
@@ -382,7 +382,7 @@ var checkbox = {
|
|
|
382
382
|
type: data.type,
|
|
383
383
|
field: data.field,
|
|
384
384
|
title: data.title.title,
|
|
385
|
-
props: Object.assign({ placeholder: data.props.placeholder, allowClear: true, maxTagCount: data.props.maxTagCount, maxTagPlaceholder: data.props.maxTagPlaceholder }, extraProps),
|
|
385
|
+
props: Object.assign({ placeholder: data.props.placeholder, allowClear: true, showArrow: true, maxTagCount: data.props.maxTagCount, maxTagPlaceholder: data.props.maxTagPlaceholder }, extraProps),
|
|
386
386
|
options: data.options,
|
|
387
387
|
effect: {
|
|
388
388
|
required: data.effect.required && (((_a = data.effect) === null || _a === void 0 ? void 0 : _a.requiredTip) || '请选择'),
|
|
@@ -402,7 +402,7 @@ var checkbox = {
|
|
|
402
402
|
type: data.type,
|
|
403
403
|
field: data.field,
|
|
404
404
|
title: data.title.title,
|
|
405
|
-
props: Object.assign({ placeholder: data.props.placeholder, allowClear: true, maxTagCount: data.props.maxTagCount, maxTagPlaceholder: data.props.maxTagPlaceholder }, extraProps),
|
|
405
|
+
props: Object.assign({ placeholder: data.props.placeholder, allowClear: true, showArrow: true, maxTagCount: data.props.maxTagCount, maxTagPlaceholder: data.props.maxTagPlaceholder }, extraProps),
|
|
406
406
|
options: data.options,
|
|
407
407
|
effect: {
|
|
408
408
|
required: data.effect.required && (((_a = data.effect) === null || _a === void 0 ? void 0 : _a.requiredTip) || '请选择'),
|
|
@@ -419,7 +419,7 @@ var checkbox = {
|
|
|
419
419
|
field,
|
|
420
420
|
title: data.title.title,
|
|
421
421
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
422
|
-
|
|
422
|
+
width: data.config.fieldRatio,
|
|
423
423
|
slots: {
|
|
424
424
|
default({ row }) {
|
|
425
425
|
return h(Select, {
|
|
@@ -428,6 +428,7 @@ var checkbox = {
|
|
|
428
428
|
options: data.options,
|
|
429
429
|
mode: 'multiple',
|
|
430
430
|
allowClear: true,
|
|
431
|
+
showArrow: true,
|
|
431
432
|
maxTagCount: data.props.maxTagCount,
|
|
432
433
|
maxTagPlaceholder: data.props.maxTagPlaceholder,
|
|
433
434
|
getPopupContainer: getContainer,
|
|
@@ -507,7 +508,7 @@ var date = {
|
|
|
507
508
|
field,
|
|
508
509
|
title: data.title.title,
|
|
509
510
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
510
|
-
|
|
511
|
+
width: data.config.fieldRatio,
|
|
511
512
|
slots: {
|
|
512
513
|
default({ row }) {
|
|
513
514
|
return h(DatePicker, {
|
|
@@ -592,7 +593,7 @@ var dateRange = {
|
|
|
592
593
|
field,
|
|
593
594
|
title: data.title.title,
|
|
594
595
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
595
|
-
|
|
596
|
+
width: data.config.fieldRatio,
|
|
596
597
|
slots: {
|
|
597
598
|
default({ row }) {
|
|
598
599
|
return h(RangePicker, {
|
|
@@ -783,6 +784,8 @@ var file = {
|
|
|
783
784
|
extraProps: {
|
|
784
785
|
maxSize: 20,
|
|
785
786
|
tips: '单个附件大小需≤20M',
|
|
787
|
+
maxCount: 1,
|
|
788
|
+
hideDisabledBtn: false,
|
|
786
789
|
},
|
|
787
790
|
defaultList: data.value,
|
|
788
791
|
uploadRequest(inject, file) {
|
|
@@ -795,14 +798,8 @@ var file = {
|
|
|
795
798
|
{
|
|
796
799
|
required: data.effect.required,
|
|
797
800
|
type: 'array',
|
|
798
|
-
min: data.effect.required ? 1 : 0,
|
|
799
801
|
message: ((_a = data.effect) === null || _a === void 0 ? void 0 : _a.requiredTip) || '请上传附件',
|
|
800
802
|
},
|
|
801
|
-
{
|
|
802
|
-
type: 'array',
|
|
803
|
-
len: 1,
|
|
804
|
-
message: '附件数量不能超过1个',
|
|
805
|
-
},
|
|
806
803
|
],
|
|
807
804
|
inject: true,
|
|
808
805
|
on: {
|
|
@@ -830,6 +827,8 @@ var file = {
|
|
|
830
827
|
extraProps: {
|
|
831
828
|
maxSize: 20,
|
|
832
829
|
tips: '单个附件大小需≤20M',
|
|
830
|
+
maxCount: 1,
|
|
831
|
+
hideDisabledBtn: false,
|
|
833
832
|
},
|
|
834
833
|
defaultList: data.value,
|
|
835
834
|
uploadRequest(inject, file) {
|
|
@@ -842,14 +841,8 @@ var file = {
|
|
|
842
841
|
{
|
|
843
842
|
required: data.effect.required,
|
|
844
843
|
type: 'array',
|
|
845
|
-
min: data.effect.required ? 1 : 0,
|
|
846
844
|
message: ((_a = data.effect) === null || _a === void 0 ? void 0 : _a.requiredTip) || '请上传附件',
|
|
847
845
|
},
|
|
848
|
-
{
|
|
849
|
-
type: 'array',
|
|
850
|
-
len: 1,
|
|
851
|
-
message: '附件数量不能超过1个',
|
|
852
|
-
},
|
|
853
846
|
],
|
|
854
847
|
inject: true,
|
|
855
848
|
on: {
|
|
@@ -1035,7 +1028,7 @@ var people = {
|
|
|
1035
1028
|
field,
|
|
1036
1029
|
title: data.title.title,
|
|
1037
1030
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
1038
|
-
|
|
1031
|
+
width: data.config.fieldRatio,
|
|
1039
1032
|
slots: {
|
|
1040
1033
|
default({ row }) {
|
|
1041
1034
|
var _a;
|
|
@@ -1063,7 +1056,7 @@ var people = {
|
|
|
1063
1056
|
|
|
1064
1057
|
const _hoisted_1$7 = ["onClick"];
|
|
1065
1058
|
const _hoisted_2$7 = ["onClick"];
|
|
1066
|
-
const _hoisted_3$
|
|
1059
|
+
const _hoisted_3$5 = { class: "box" };
|
|
1067
1060
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
1068
1061
|
__name: "temp-content",
|
|
1069
1062
|
props: ["content", "preview"],
|
|
@@ -1122,7 +1115,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1122
1115
|
class: "bm-fc-rect-wrapper",
|
|
1123
1116
|
onClick: withModifiers(triggerPreview, ["self"])
|
|
1124
1117
|
}, [
|
|
1125
|
-
createElementVNode("div", _hoisted_3$
|
|
1118
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
1126
1119
|
createElementVNode("div", {
|
|
1127
1120
|
class: "bm-fc-rect-outer",
|
|
1128
1121
|
style: normalizeStyle(
|
|
@@ -1147,7 +1140,7 @@ var TempContent = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "temp-con
|
|
|
1147
1140
|
|
|
1148
1141
|
const _hoisted_1$6 = { class: "bm-fc-select-material-temp__content__item-info" };
|
|
1149
1142
|
const _hoisted_2$6 = { class: "bm-fc-select-material-temp__content__item-info__cover" };
|
|
1150
|
-
const _hoisted_3$
|
|
1143
|
+
const _hoisted_3$4 = ["src"];
|
|
1151
1144
|
const _hoisted_4$4 = ["onClick"];
|
|
1152
1145
|
const _hoisted_5$4 = {
|
|
1153
1146
|
key: 1,
|
|
@@ -1353,7 +1346,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1353
1346
|
class: "bm-fc-select-material-temp__content__item-info__cover__img",
|
|
1354
1347
|
src: item.coverPlanUrl,
|
|
1355
1348
|
alt: ""
|
|
1356
|
-
}, null, 8, _hoisted_3$
|
|
1349
|
+
}, null, 8, _hoisted_3$4)) : (openBlock(), createBlock(TempContent, {
|
|
1357
1350
|
key: 1,
|
|
1358
1351
|
content: item.htmlContent
|
|
1359
1352
|
}, null, 8, ["content"]))
|
|
@@ -18797,7 +18790,7 @@ var ShopInput = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "shop-input
|
|
|
18797
18790
|
|
|
18798
18791
|
const _hoisted_1$5 = { class: "bm-dc-table-widget" };
|
|
18799
18792
|
const _hoisted_2$5 = { class: "bm-dc-table-widget__title" };
|
|
18800
|
-
const _hoisted_3$
|
|
18793
|
+
const _hoisted_3$3 = { class: "bm-dc-table-widget__title-samll" };
|
|
18801
18794
|
const _hoisted_4$3 = {
|
|
18802
18795
|
key: 0,
|
|
18803
18796
|
class: "bm-dc-table-widget__top-bar"
|
|
@@ -18909,10 +18902,17 @@ const _sfc_main$7 = defineComponent({
|
|
|
18909
18902
|
});
|
|
18910
18903
|
data.forEach((row) => {
|
|
18911
18904
|
Object.keys(cache).forEach((key) => {
|
|
18912
|
-
|
|
18913
|
-
|
|
18905
|
+
let tempValue = row[key];
|
|
18906
|
+
if (![null, void 0, ""].includes(tempValue)) {
|
|
18907
|
+
tempValue = Number(tempValue);
|
|
18908
|
+
if (!isNaN(tempValue))
|
|
18909
|
+
cache[key].count += tempValue;
|
|
18910
|
+
}
|
|
18914
18911
|
});
|
|
18915
18912
|
});
|
|
18913
|
+
Object.keys(cache).forEach((key) => {
|
|
18914
|
+
cache[key].count = Number(cache[key].count.toFixed(4));
|
|
18915
|
+
});
|
|
18916
18916
|
if (props.rule.config.showTotal) {
|
|
18917
18917
|
cache = {
|
|
18918
18918
|
_total: { title: "\u884C\u6570", count: data?.length || 0 },
|
|
@@ -18982,7 +18982,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
18982
18982
|
pre.push({
|
|
18983
18983
|
field: childField,
|
|
18984
18984
|
title,
|
|
18985
|
-
|
|
18985
|
+
width: "140px",
|
|
18986
18986
|
slots: {
|
|
18987
18987
|
default({ row }) {
|
|
18988
18988
|
if (row?.[childField]) {
|
|
@@ -19029,11 +19029,19 @@ const _sfc_main$7 = defineComponent({
|
|
|
19029
19029
|
return pre;
|
|
19030
19030
|
}, [])
|
|
19031
19031
|
);
|
|
19032
|
+
columns.push({
|
|
19033
|
+
field: "_empty",
|
|
19034
|
+
title: " ",
|
|
19035
|
+
showOverflow: false,
|
|
19036
|
+
showHeaderOverflow: false,
|
|
19037
|
+
minWidth: 1,
|
|
19038
|
+
resizable: false
|
|
19039
|
+
});
|
|
19032
19040
|
if (!props.hidden)
|
|
19033
19041
|
columns.push({
|
|
19034
19042
|
field: oper,
|
|
19035
19043
|
title: "\u64CD\u4F5C",
|
|
19036
|
-
|
|
19044
|
+
width: isProductCenter.value ? "110px" : "140px",
|
|
19037
19045
|
fixed: "right",
|
|
19038
19046
|
slots: {
|
|
19039
19047
|
default: "floatHandle"
|
|
@@ -19076,6 +19084,9 @@ const _sfc_main$7 = defineComponent({
|
|
|
19076
19084
|
let baseTitle = mainName;
|
|
19077
19085
|
if (rule.name === "product") {
|
|
19078
19086
|
baseTitle = `\u5546\u54C1\u7F16\u7801-${mainName}`;
|
|
19087
|
+
if (isProductCenter.value) {
|
|
19088
|
+
baseTitle = `\u5546\u54C1\u7F16\u53F7-${mainName}`;
|
|
19089
|
+
}
|
|
19079
19090
|
if (isProductCenterSuit.value && rule.field === "productCode") {
|
|
19080
19091
|
baseTitle = "\u5546\u54C1\u7F16\u53F7";
|
|
19081
19092
|
}
|
|
@@ -19092,7 +19103,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19092
19103
|
field,
|
|
19093
19104
|
title: getBaseTitle(),
|
|
19094
19105
|
headerClassName: rule.effect.required ? "is-required" : "",
|
|
19095
|
-
|
|
19106
|
+
width: "140px",
|
|
19096
19107
|
slots: {
|
|
19097
19108
|
default: rule.field
|
|
19098
19109
|
}
|
|
@@ -19104,7 +19115,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19104
19115
|
columns2.push({
|
|
19105
19116
|
field: childField,
|
|
19106
19117
|
title: `${item.label}-${mainName}`,
|
|
19107
|
-
|
|
19118
|
+
width: "140px",
|
|
19108
19119
|
slots: {
|
|
19109
19120
|
default({ row }) {
|
|
19110
19121
|
if (item.value === "\u5546\u54C1\u56FE\u7247" && row[childField]) {
|
|
@@ -19130,6 +19141,9 @@ const _sfc_main$7 = defineComponent({
|
|
|
19130
19141
|
]
|
|
19131
19142
|
);
|
|
19132
19143
|
}
|
|
19144
|
+
if (row[childField]) {
|
|
19145
|
+
return h(BmOverTooltips, { title: row[childField] }, []);
|
|
19146
|
+
}
|
|
19133
19147
|
return h(
|
|
19134
19148
|
"div",
|
|
19135
19149
|
{
|
|
@@ -19137,10 +19151,10 @@ const _sfc_main$7 = defineComponent({
|
|
|
19137
19151
|
color: "#9393A3"
|
|
19138
19152
|
},
|
|
19139
19153
|
class: {
|
|
19140
|
-
"bm-fc-placeholder":
|
|
19154
|
+
"bm-fc-placeholder": true
|
|
19141
19155
|
}
|
|
19142
19156
|
},
|
|
19143
|
-
[
|
|
19157
|
+
["\u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6"]
|
|
19144
19158
|
);
|
|
19145
19159
|
}
|
|
19146
19160
|
}
|
|
@@ -19229,11 +19243,45 @@ const _sfc_main$7 = defineComponent({
|
|
|
19229
19243
|
}
|
|
19230
19244
|
}
|
|
19231
19245
|
function handleExport() {
|
|
19246
|
+
let data2 = xGrid.value.data;
|
|
19247
|
+
let res = [];
|
|
19248
|
+
data2?.forEach((row, i) => {
|
|
19249
|
+
const obj = {};
|
|
19250
|
+
for (let item of Object.entries(row)) {
|
|
19251
|
+
if (Object.prototype.toString.call(item[1]) === "[object Array]") {
|
|
19252
|
+
let temp = item[1]?.map((x) => x.name || x.categoryName || x)?.filter((x) => x)?.join(",");
|
|
19253
|
+
obj[item?.[0]] = temp;
|
|
19254
|
+
} else if (Object.prototype.toString.call(item[1]) === "[object Object]") {
|
|
19255
|
+
obj[item[0]] = item[1]?.name;
|
|
19256
|
+
} else {
|
|
19257
|
+
obj[item[0]] = item[1];
|
|
19258
|
+
}
|
|
19259
|
+
}
|
|
19260
|
+
res[i] = { ...res[i], ...obj };
|
|
19261
|
+
});
|
|
19262
|
+
buttonLoading.value.export = true;
|
|
19232
19263
|
xGrid.value.exportData({
|
|
19233
19264
|
mode: "all",
|
|
19234
19265
|
columnFilterMethod({ column }) {
|
|
19235
19266
|
return isValidColumn(column);
|
|
19236
|
-
}
|
|
19267
|
+
},
|
|
19268
|
+
beforeExportMethod({ options }) {
|
|
19269
|
+
const headRow = {};
|
|
19270
|
+
const col = options?.columns?.map((col2) => ({
|
|
19271
|
+
[col2.field]: col2.title
|
|
19272
|
+
}));
|
|
19273
|
+
col.forEach((x) => {
|
|
19274
|
+
Object.assign(headRow, x);
|
|
19275
|
+
});
|
|
19276
|
+
res.unshift(headRow);
|
|
19277
|
+
console.log("data", res);
|
|
19278
|
+
},
|
|
19279
|
+
original: true,
|
|
19280
|
+
isHeader: false,
|
|
19281
|
+
data: res,
|
|
19282
|
+
filename: `${dayjs().format("YYYYMMDD")}`
|
|
19283
|
+
}).finally(() => {
|
|
19284
|
+
buttonLoading.value.export = false;
|
|
19237
19285
|
});
|
|
19238
19286
|
}
|
|
19239
19287
|
function emitChange() {
|
|
@@ -19318,8 +19366,13 @@ const _sfc_main$7 = defineComponent({
|
|
|
19318
19366
|
});
|
|
19319
19367
|
result.length && validate(result).then((result2) => {
|
|
19320
19368
|
data.splice(0, data.length, ...result2);
|
|
19369
|
+
message.success("\u5BFC\u5165\u6210\u529F");
|
|
19321
19370
|
}).catch((error) => {
|
|
19322
|
-
|
|
19371
|
+
if (typeof error === "string") {
|
|
19372
|
+
message.error("\u5B58\u5728\u9519\u8BEF\u6570\u636E\uFF0C\u5BFC\u5165\u5931\u8D25\uFF1A" + error);
|
|
19373
|
+
} else {
|
|
19374
|
+
message.error("\u5B58\u5728\u9519\u8BEF\u6570\u636E\uFF0C\u5BFC\u5165\u5931\u8D25");
|
|
19375
|
+
}
|
|
19323
19376
|
console.log("---------------");
|
|
19324
19377
|
console.log(error);
|
|
19325
19378
|
console.log("---------------");
|
|
@@ -19329,7 +19382,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19329
19382
|
file && reader.readAsText(file, "GB2312");
|
|
19330
19383
|
}
|
|
19331
19384
|
function isValidColumn(c) {
|
|
19332
|
-
return c.type !== "checkbox" && c.type !== "seq" && c.field !== oper;
|
|
19385
|
+
return c.type !== "checkbox" && c.type !== "seq" && c.field !== oper && c.field !== "_empty";
|
|
19333
19386
|
}
|
|
19334
19387
|
function parseCsv(result) {
|
|
19335
19388
|
let data2 = [];
|
|
@@ -19340,22 +19393,34 @@ const _sfc_main$7 = defineComponent({
|
|
|
19340
19393
|
if (columnArr.length !== columns.filter((c) => isValidColumn(c)).length) {
|
|
19341
19394
|
message.error("\u5BFC\u5165\u7684\u6A21\u677F\u51FA\u9519");
|
|
19342
19395
|
} else {
|
|
19343
|
-
data2 = rows.slice(1).filter((item) => item).map(
|
|
19344
|
-
|
|
19345
|
-
|
|
19396
|
+
data2 = rows.slice(1).filter((item) => item).map((item) => {
|
|
19397
|
+
let sonList = item.includes(" ") ? item.split(" ") : item.split(",");
|
|
19398
|
+
sonList = (sonList || []).map((sonItem) => {
|
|
19399
|
+
return sonItem === "" ? void 0 : sonItem;
|
|
19400
|
+
});
|
|
19401
|
+
return sonList;
|
|
19402
|
+
});
|
|
19346
19403
|
}
|
|
19347
19404
|
}
|
|
19348
19405
|
return data2;
|
|
19349
19406
|
}
|
|
19407
|
+
const parseMap = {
|
|
19408
|
+
product: "\u5546\u54C1\u7F16\u53F7",
|
|
19409
|
+
customer: "\u5BA2\u6237\u7F16\u53F7",
|
|
19410
|
+
shop: "\u5E97\u94FA\u7F16\u53F7",
|
|
19411
|
+
materialTemp: "\u7D20\u6750\u6A21\u677F",
|
|
19412
|
+
materialType: "\u7D20\u6750\u7C7B\u578B"
|
|
19413
|
+
};
|
|
19350
19414
|
async function validate(rowData) {
|
|
19351
19415
|
let error = "";
|
|
19352
19416
|
const validColumns2 = columns.filter((c) => isValidColumn(c));
|
|
19353
19417
|
for (const row of rowData) {
|
|
19354
|
-
for (const
|
|
19418
|
+
for (const curColumn of validColumns2) {
|
|
19419
|
+
const field = curColumn.field;
|
|
19355
19420
|
const rule = childRulesMap.value[`${field}`];
|
|
19356
|
-
const title = rule?.title?.title;
|
|
19357
19421
|
if (!rule)
|
|
19358
19422
|
continue;
|
|
19423
|
+
const title = rule?.title?.title || curColumn.title || parseMap[rule.name] || "";
|
|
19359
19424
|
const fieldNames = props.extraConfig[rule.name]?.fieldNames;
|
|
19360
19425
|
let value = row[`${field}`] || "";
|
|
19361
19426
|
const txtFormatFn = rule.config?.txtFormatFn;
|
|
@@ -19513,6 +19578,9 @@ const _sfc_main$7 = defineComponent({
|
|
|
19513
19578
|
[fieldNames.value]: shopInfo.shopCode,
|
|
19514
19579
|
[fieldNames.label]: shopInfo.shopName
|
|
19515
19580
|
};
|
|
19581
|
+
if (isProductCenter.value) {
|
|
19582
|
+
handleShopOption(shopInfo, rule, row);
|
|
19583
|
+
}
|
|
19516
19584
|
} else {
|
|
19517
19585
|
error = `${title}\u67E5\u8BE2\u7684\u5E97\u94FA\u4E0D\u5B58\u5728`;
|
|
19518
19586
|
break;
|
|
@@ -19595,6 +19663,9 @@ const _sfc_main$7 = defineComponent({
|
|
|
19595
19663
|
deep: true
|
|
19596
19664
|
}
|
|
19597
19665
|
);
|
|
19666
|
+
const buttonLoading = ref({
|
|
19667
|
+
export: false
|
|
19668
|
+
});
|
|
19598
19669
|
const buttonLoadingForProductCenter = ref({
|
|
19599
19670
|
export: false,
|
|
19600
19671
|
download: false,
|
|
@@ -19728,7 +19799,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
19728
19799
|
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
19729
19800
|
createElementVNode("div", _hoisted_2$5, [
|
|
19730
19801
|
createTextVNode(toDisplayString(__props.rule.title.title) + " ", 1),
|
|
19731
|
-
createElementVNode("span", _hoisted_3$
|
|
19802
|
+
createElementVNode("span", _hoisted_3$3, toDisplayString(unref(countText)), 1),
|
|
19732
19803
|
createCommentVNode(" \u5546\u54C1\u4E2D\u5FC3\u5B9A\u5236 \u6309\u94AE "),
|
|
19733
19804
|
unref(isProductCenter) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
19734
19805
|
!__props.hidden ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -19803,13 +19874,14 @@ const _sfc_main$7 = defineComponent({
|
|
|
19803
19874
|
unref(exportFeature) ? (openBlock(), createBlock(unref(Button), {
|
|
19804
19875
|
key: 0,
|
|
19805
19876
|
disabled: __props.disabled,
|
|
19877
|
+
loading: buttonLoading.value.export,
|
|
19806
19878
|
onClick: handleExport
|
|
19807
19879
|
}, {
|
|
19808
19880
|
default: withCtx(() => [
|
|
19809
19881
|
createTextVNode("\u5BFC\u51FA")
|
|
19810
19882
|
]),
|
|
19811
19883
|
_: 1
|
|
19812
|
-
}, 8, ["disabled"])) : createCommentVNode("v-if", true),
|
|
19884
|
+
}, 8, ["disabled", "loading"])) : createCommentVNode("v-if", true),
|
|
19813
19885
|
createTextVNode("\xA0 "),
|
|
19814
19886
|
unref(importFeature) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
19815
19887
|
createElementVNode("input", {
|
|
@@ -19861,6 +19933,18 @@ const _sfc_main$7 = defineComponent({
|
|
|
19861
19933
|
]),
|
|
19862
19934
|
_: 1
|
|
19863
19935
|
}, 8, ["disabled"])
|
|
19936
|
+
], 64)) : unref(tableConfig).isActivityCheckFlag ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
19937
|
+
createCommentVNode(" \u6D3B\u52A8\u5BA1\u6838\u9875 \u53EA\u5C55\u793A\u5BFC\u51FA\u6309\u94AE "),
|
|
19938
|
+
unref(exportFeature) ? (openBlock(), createBlock(unref(Button), {
|
|
19939
|
+
key: 0,
|
|
19940
|
+
loading: buttonLoading.value.export,
|
|
19941
|
+
onClick: handleExport
|
|
19942
|
+
}, {
|
|
19943
|
+
default: withCtx(() => [
|
|
19944
|
+
createTextVNode("\u5BFC\u51FA")
|
|
19945
|
+
]),
|
|
19946
|
+
_: 1
|
|
19947
|
+
}, 8, ["loading"])) : createCommentVNode("v-if", true)
|
|
19864
19948
|
], 64)) : createCommentVNode("v-if", true)
|
|
19865
19949
|
]))
|
|
19866
19950
|
]),
|
|
@@ -19927,8 +20011,9 @@ const _sfc_main$7 = defineComponent({
|
|
|
19927
20011
|
value: row[item.field],
|
|
19928
20012
|
fetch: __props.extraConfig?.shop,
|
|
19929
20013
|
"data-filtering": item?.config?.dataFiltering,
|
|
20014
|
+
disabled: item.disabled,
|
|
19930
20015
|
onChange: ($event) => handleShopOption($event, item, row)
|
|
19931
|
-
}, null, 8, ["value", "fetch", "data-filtering", "onChange"])
|
|
20016
|
+
}, null, 8, ["value", "fetch", "data-filtering", "disabled", "onChange"])
|
|
19932
20017
|
])
|
|
19933
20018
|
};
|
|
19934
20019
|
}),
|
|
@@ -19960,7 +20045,7 @@ var TableWidget = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "table-wi
|
|
|
19960
20045
|
|
|
19961
20046
|
const _hoisted_1$4 = /* @__PURE__ */ createElementVNode("span", { class: "bm-fc-form-item-label is-required" }, "\u7D20\u6750\u6A21\u677F\uFF1A", -1);
|
|
19962
20047
|
const _hoisted_2$4 = { key: 0 };
|
|
19963
|
-
const _hoisted_3$
|
|
20048
|
+
const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("span", { class: "bm-fc-form-item-label" }, "\u7D20\u6750\u7C7B\u578B\uFF1A", -1);
|
|
19964
20049
|
const _hoisted_4$2 = {
|
|
19965
20050
|
key: 1,
|
|
19966
20051
|
class: "bm-fc-placeholder"
|
|
@@ -20352,7 +20437,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
20352
20437
|
default: withCtx(() => [
|
|
20353
20438
|
createVNode(unref(Col), null, {
|
|
20354
20439
|
default: withCtx(() => [
|
|
20355
|
-
_hoisted_3$
|
|
20440
|
+
_hoisted_3$2
|
|
20356
20441
|
]),
|
|
20357
20442
|
_: 1
|
|
20358
20443
|
}),
|
|
@@ -20613,8 +20698,7 @@ var materialTemp = {
|
|
|
20613
20698
|
};
|
|
20614
20699
|
|
|
20615
20700
|
const _hoisted_1$3 = { class: "bm-fc-form-item-label" };
|
|
20616
|
-
const _hoisted_2$3 =
|
|
20617
|
-
const _hoisted_3$2 = {
|
|
20701
|
+
const _hoisted_2$3 = {
|
|
20618
20702
|
key: 1,
|
|
20619
20703
|
class: "bm-fc-placeholder"
|
|
20620
20704
|
};
|
|
@@ -20788,16 +20872,16 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
20788
20872
|
}, {
|
|
20789
20873
|
default: withCtx(() => [
|
|
20790
20874
|
getValue(field.value) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
20791
|
-
field.value === "\u5546\u54C1\u56FE\u7247" ? (openBlock(),
|
|
20875
|
+
field.value === "\u5546\u54C1\u56FE\u7247" ? (openBlock(), createBlock(unref(Image), {
|
|
20792
20876
|
key: 0,
|
|
20793
20877
|
class: "bm-fc-form-item__img",
|
|
20794
20878
|
src: __props.extraConfig.common.previewImg(getValue(field.value))
|
|
20795
|
-
}, null, 8,
|
|
20879
|
+
}, null, 8, ["src"])) : field.value === "\u5546\u54C1\u5355\u4F4D" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
20796
20880
|
createTextVNode(toDisplayString(unitMap[getValue(field.value)] || getValue(field.value)), 1)
|
|
20797
20881
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
20798
20882
|
createTextVNode(toDisplayString(getValue(field.value)), 1)
|
|
20799
20883
|
], 64))
|
|
20800
|
-
], 64)) : (openBlock(), createElementBlock("span",
|
|
20884
|
+
], 64)) : (openBlock(), createElementBlock("span", _hoisted_2$3, "\u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6"))
|
|
20801
20885
|
]),
|
|
20802
20886
|
_: 2
|
|
20803
20887
|
}, 1024)
|
|
@@ -21043,7 +21127,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
21043
21127
|
value: __props.formCreateInject?.rule?.value?.value || __props.value?.value || null,
|
|
21044
21128
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
21045
21129
|
"show-search": "",
|
|
21046
|
-
"show-arrow":
|
|
21130
|
+
"show-arrow": true,
|
|
21047
21131
|
"default-active-first-option": false,
|
|
21048
21132
|
"filter-option": false,
|
|
21049
21133
|
"not-found-content": null,
|
|
@@ -21177,7 +21261,7 @@ var shop = {
|
|
|
21177
21261
|
field,
|
|
21178
21262
|
title: data.title.title,
|
|
21179
21263
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
21180
|
-
|
|
21264
|
+
width: '138px',
|
|
21181
21265
|
slots: {
|
|
21182
21266
|
default({ row }) {
|
|
21183
21267
|
var _a;
|
|
@@ -21355,7 +21439,7 @@ var materialType = {
|
|
|
21355
21439
|
field,
|
|
21356
21440
|
title: '素材类型',
|
|
21357
21441
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
21358
|
-
|
|
21442
|
+
width: '138px',
|
|
21359
21443
|
slots: {
|
|
21360
21444
|
default({ row }) {
|
|
21361
21445
|
return h(materialType$1, {
|
|
@@ -21507,7 +21591,7 @@ var department = {
|
|
|
21507
21591
|
field,
|
|
21508
21592
|
title: data.title.title,
|
|
21509
21593
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
21510
|
-
|
|
21594
|
+
width: data.config.fieldRatio,
|
|
21511
21595
|
slots: {
|
|
21512
21596
|
default({ row }) {
|
|
21513
21597
|
var _a;
|
|
@@ -21783,7 +21867,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21783
21867
|
emits: ["update:value", "change"],
|
|
21784
21868
|
setup(__props, { expose, emit: emits }) {
|
|
21785
21869
|
const props = __props;
|
|
21786
|
-
FC.component("BmLabelTooltip", BmOverTooltips);
|
|
21870
|
+
FC.component("BmLabelTooltip", BmOverTooltips$1);
|
|
21787
21871
|
const formRuleList = computed(() => {
|
|
21788
21872
|
if (typeof props.resolveRulesConfig === "function") {
|
|
21789
21873
|
const rules = props.resolveRulesConfig(ruleList);
|
|
@@ -3272,20 +3272,7 @@ var shop = {
|
|
|
3272
3272
|
label: '店铺名称',
|
|
3273
3273
|
},
|
|
3274
3274
|
],
|
|
3275
|
-
options: [
|
|
3276
|
-
{
|
|
3277
|
-
value: '店铺所属平台',
|
|
3278
|
-
label: '店铺所属平台',
|
|
3279
|
-
},
|
|
3280
|
-
{
|
|
3281
|
-
value: '渠道',
|
|
3282
|
-
label: '渠道',
|
|
3283
|
-
},
|
|
3284
|
-
{
|
|
3285
|
-
value: '渠道类别',
|
|
3286
|
-
label: '渠道类别',
|
|
3287
|
-
},
|
|
3288
|
-
],
|
|
3275
|
+
options: [],
|
|
3289
3276
|
},
|
|
3290
3277
|
effect: {
|
|
3291
3278
|
required: true,
|
|
@@ -3715,11 +3702,6 @@ function pushTableWidgets(key, config) {
|
|
|
3715
3702
|
function pushRowWidgets(key) {
|
|
3716
3703
|
widgetNamesRowAccept.push(key);
|
|
3717
3704
|
}
|
|
3718
|
-
function removeTableWidgets(key) {
|
|
3719
|
-
console.warn('be cautious to use removeTableWidgets,avoid error');
|
|
3720
|
-
if (tableWidgetsProxy[key])
|
|
3721
|
-
delete tableWidgetsProxy[key];
|
|
3722
|
-
}
|
|
3723
3705
|
const rules = {
|
|
3724
3706
|
[row.name]: row,
|
|
3725
3707
|
[input.name]: input,
|
|
@@ -3988,7 +3970,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3988
3970
|
}
|
|
3989
3971
|
});
|
|
3990
3972
|
})();
|
|
3991
|
-
typeof props.addWidgetFunc === "function" && props.addWidgetFunc(pushRuleWidgets, pushRowWidgets, pushTableWidgets
|
|
3973
|
+
typeof props.addWidgetFunc === "function" && props.addWidgetFunc(pushRuleWidgets, pushRowWidgets, pushTableWidgets);
|
|
3992
3974
|
const activeKey = ref("controlLibrary");
|
|
3993
3975
|
const widgetFormRules = reactive([]);
|
|
3994
3976
|
const activeRule = ref({});
|
|
@@ -3,7 +3,7 @@ import { defineComponent, ref, watch, resolveComponent, openBlock, createElement
|
|
|
3
3
|
import ToolTip from 'ant-design-vue/lib/tooltip';
|
|
4
4
|
import Button from 'ant-design-vue/lib/button';
|
|
5
5
|
import Tag from 'ant-design-vue/lib/tag';
|
|
6
|
-
import { CloseCircleFilled } from '@ant-design/icons-vue';
|
|
6
|
+
import { CloseCircleFilled, DownOutlined } from '@ant-design/icons-vue';
|
|
7
7
|
|
|
8
8
|
var _export_sfc = (sfc, props) => {
|
|
9
9
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -14,7 +14,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const _sfc_main = defineComponent({
|
|
17
|
-
components: { ToolTip, CloseCircleFilled, Button, Tag },
|
|
17
|
+
components: { ToolTip, CloseCircleFilled, DownOutlined, Button, Tag },
|
|
18
18
|
props: {
|
|
19
19
|
disabled: {
|
|
20
20
|
type: Boolean,
|
|
@@ -130,12 +130,14 @@ const _hoisted_3 = { class: "pop-seleted" };
|
|
|
130
130
|
const _hoisted_4 = { class: "pop-seleted-title" };
|
|
131
131
|
const _hoisted_5 = { key: 1 };
|
|
132
132
|
const _hoisted_6 = { key: 2 };
|
|
133
|
-
const _hoisted_7 =
|
|
133
|
+
const _hoisted_7 = { class: "selector-input-arrow" };
|
|
134
|
+
const _hoisted_8 = /* @__PURE__ */ createElementVNode("div", null, null, -1);
|
|
134
135
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
135
136
|
const _component_Tag = resolveComponent("Tag");
|
|
136
137
|
const _component_CloseCircleFilled = resolveComponent("CloseCircleFilled");
|
|
137
138
|
const _component_ToolTip = resolveComponent("ToolTip");
|
|
138
139
|
const _component_Button = resolveComponent("Button");
|
|
140
|
+
const _component_DownOutlined = resolveComponent("DownOutlined");
|
|
139
141
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
140
142
|
_ctx.list && _ctx.list.length ? (openBlock(), createElementBlock("div", {
|
|
141
143
|
key: 0,
|
|
@@ -214,9 +216,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
214
216
|
createElementVNode("div", {
|
|
215
217
|
class: normalizeClass(["selector-empty-input", { "empty-disabled": _ctx.disabled }]),
|
|
216
218
|
onClick: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.toAddTags && _ctx.toAddTags(...args), ["stop"]))
|
|
217
|
-
}, " \xA0\xA0" + toDisplayString(_ctx.placeholder), 3)
|
|
219
|
+
}, " \xA0\xA0" + toDisplayString(_ctx.placeholder), 3),
|
|
220
|
+
createElementVNode("div", _hoisted_7, [
|
|
221
|
+
createVNode(_component_DownOutlined)
|
|
222
|
+
])
|
|
218
223
|
])) : createCommentVNode("v-if", true),
|
|
219
|
-
|
|
224
|
+
_hoisted_8
|
|
220
225
|
]);
|
|
221
226
|
}
|
|
222
227
|
var InputTagsDisplay = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "input-tags-display.vue"]]);
|