bm-admin-ui 1.2.26-alpha → 1.2.28-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.
|
@@ -18871,29 +18871,6 @@ const _sfc_main$7 = defineComponent({
|
|
|
18871
18871
|
}
|
|
18872
18872
|
}
|
|
18873
18873
|
}));
|
|
18874
|
-
const countText = computed(() => {
|
|
18875
|
-
const cache = {};
|
|
18876
|
-
props.rule.config.childRules?.forEach((rule) => {
|
|
18877
|
-
if (rule.name === "numInput" && rule.config.count) {
|
|
18878
|
-
cache[rule.field] = { title: rule.title.title, count: 0 };
|
|
18879
|
-
}
|
|
18880
|
-
});
|
|
18881
|
-
data.forEach((row) => {
|
|
18882
|
-
Object.keys(cache).forEach((key) => {
|
|
18883
|
-
if (!isNaN(row[key]))
|
|
18884
|
-
cache[key].count += row[key];
|
|
18885
|
-
});
|
|
18886
|
-
});
|
|
18887
|
-
if (Object.keys(cache).length)
|
|
18888
|
-
return `\uFF08\u5B57\u6BB5\u540D\u603B\u8BA1\uFF1A${Object.values(cache).reduce((pre, cur, index) => {
|
|
18889
|
-
if (index !== 0)
|
|
18890
|
-
pre += "\u3001";
|
|
18891
|
-
pre += `${cur.title}\uFF1A${cur.count}`;
|
|
18892
|
-
return pre;
|
|
18893
|
-
}, "")}\uFF09`;
|
|
18894
|
-
else
|
|
18895
|
-
return "";
|
|
18896
|
-
});
|
|
18897
18874
|
const xGrid = computed(() => bmFloatTableRef.value.xGrid || {});
|
|
18898
18875
|
const inputRef = ref();
|
|
18899
18876
|
const childRulesMap = computed(
|
|
@@ -18922,6 +18899,44 @@ const _sfc_main$7 = defineComponent({
|
|
|
18922
18899
|
"activityApply"
|
|
18923
18900
|
].includes(tableConfig.value.template)
|
|
18924
18901
|
);
|
|
18902
|
+
const countText = computed(() => {
|
|
18903
|
+
let cache = {};
|
|
18904
|
+
props.rule.config.childRules?.forEach((rule) => {
|
|
18905
|
+
if (rule.name === "numInput" && rule.config.count) {
|
|
18906
|
+
cache[rule.field] = { title: rule.title.title, count: 0 };
|
|
18907
|
+
}
|
|
18908
|
+
});
|
|
18909
|
+
data.forEach((row) => {
|
|
18910
|
+
Object.keys(cache).forEach((key) => {
|
|
18911
|
+
if (!isNaN(row[key]))
|
|
18912
|
+
cache[key].count += row[key];
|
|
18913
|
+
});
|
|
18914
|
+
});
|
|
18915
|
+
if (props.rule.config.showTotal) {
|
|
18916
|
+
cache = {
|
|
18917
|
+
_total: { title: "\u884C\u6570", count: data?.length || 0 },
|
|
18918
|
+
...cache
|
|
18919
|
+
};
|
|
18920
|
+
}
|
|
18921
|
+
if (Object.keys(cache).length) {
|
|
18922
|
+
if (isProductCenter.value) {
|
|
18923
|
+
return `\uFF08${Object.values(cache).reduce((pre, cur, index) => {
|
|
18924
|
+
if (index !== 0)
|
|
18925
|
+
pre += "\u3001";
|
|
18926
|
+
pre += `${cur.title}\u603B\u8BA1\uFF1A${cur.count}`;
|
|
18927
|
+
return pre;
|
|
18928
|
+
}, "")}\uFF09`;
|
|
18929
|
+
}
|
|
18930
|
+
return `\uFF08\u5B57\u6BB5\u540D\u603B\u8BA1\uFF1A${Object.values(cache).reduce((pre, cur, index) => {
|
|
18931
|
+
if (index !== 0)
|
|
18932
|
+
pre += "\u3001";
|
|
18933
|
+
pre += `${cur.title}\uFF1A${cur.count}`;
|
|
18934
|
+
return pre;
|
|
18935
|
+
}, "")}\uFF09`;
|
|
18936
|
+
} else {
|
|
18937
|
+
return "";
|
|
18938
|
+
}
|
|
18939
|
+
});
|
|
18925
18940
|
function isShow(key) {
|
|
18926
18941
|
return props.rule.config.tableAdvancedFeatures.includes(key);
|
|
18927
18942
|
}
|
|
@@ -19125,6 +19140,9 @@ const _sfc_main$7 = defineComponent({
|
|
|
19125
19140
|
}
|
|
19126
19141
|
async function handleBatchDelete() {
|
|
19127
19142
|
const selected = xGrid.value.getCheckboxRecords();
|
|
19143
|
+
if (!selected?.length) {
|
|
19144
|
+
return;
|
|
19145
|
+
}
|
|
19128
19146
|
if (isProductCenter.value) {
|
|
19129
19147
|
if (await utils.confirmModal(`\u786E\u5B9A\u8981\u5220\u9664\u6240\u9009\u7684${selected?.length}\u6761\u6570\u636E\u4E48\uFF1F`)) {
|
|
19130
19148
|
selected.forEach((item) => {
|
|
@@ -20832,11 +20850,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
20832
20850
|
}
|
|
20833
20851
|
return false;
|
|
20834
20852
|
});
|
|
20853
|
+
function isProductCenterSuit(rule) {
|
|
20854
|
+
return [
|
|
20855
|
+
"F2CTemplate",
|
|
20856
|
+
"B2CTemplate",
|
|
20857
|
+
"DistributeTemp",
|
|
20858
|
+
"FreshTemplate",
|
|
20859
|
+
"activityApply"
|
|
20860
|
+
].includes(rule.name);
|
|
20861
|
+
}
|
|
20835
20862
|
function isAssociatedFn(rule) {
|
|
20836
|
-
if (rule?.config?.dataFiltering === field.value) {
|
|
20863
|
+
if (rule?.config?.dataFiltering === field.value && !isProductCenterSuit(rule)) {
|
|
20837
20864
|
return true;
|
|
20838
20865
|
}
|
|
20839
|
-
if (rule?.config?.childRules?.length) {
|
|
20866
|
+
if (rule?.config?.childRules?.length && !isProductCenterSuit(rule)) {
|
|
20840
20867
|
for (const cRule of rule.config.childRules) {
|
|
20841
20868
|
if (isAssociatedFn(cRule))
|
|
20842
20869
|
return true;
|
|
@@ -18885,29 +18885,6 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18885
18885
|
}
|
|
18886
18886
|
}
|
|
18887
18887
|
}));
|
|
18888
|
-
const countText = vue.computed(() => {
|
|
18889
|
-
const cache = {};
|
|
18890
|
-
props.rule.config.childRules?.forEach((rule) => {
|
|
18891
|
-
if (rule.name === "numInput" && rule.config.count) {
|
|
18892
|
-
cache[rule.field] = { title: rule.title.title, count: 0 };
|
|
18893
|
-
}
|
|
18894
|
-
});
|
|
18895
|
-
data.forEach((row) => {
|
|
18896
|
-
Object.keys(cache).forEach((key) => {
|
|
18897
|
-
if (!isNaN(row[key]))
|
|
18898
|
-
cache[key].count += row[key];
|
|
18899
|
-
});
|
|
18900
|
-
});
|
|
18901
|
-
if (Object.keys(cache).length)
|
|
18902
|
-
return `\uFF08\u5B57\u6BB5\u540D\u603B\u8BA1\uFF1A${Object.values(cache).reduce((pre, cur, index) => {
|
|
18903
|
-
if (index !== 0)
|
|
18904
|
-
pre += "\u3001";
|
|
18905
|
-
pre += `${cur.title}\uFF1A${cur.count}`;
|
|
18906
|
-
return pre;
|
|
18907
|
-
}, "")}\uFF09`;
|
|
18908
|
-
else
|
|
18909
|
-
return "";
|
|
18910
|
-
});
|
|
18911
18888
|
const xGrid = vue.computed(() => bmFloatTableRef.value.xGrid || {});
|
|
18912
18889
|
const inputRef = vue.ref();
|
|
18913
18890
|
const childRulesMap = vue.computed(
|
|
@@ -18936,6 +18913,44 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
18936
18913
|
"activityApply"
|
|
18937
18914
|
].includes(tableConfig.value.template)
|
|
18938
18915
|
);
|
|
18916
|
+
const countText = vue.computed(() => {
|
|
18917
|
+
let cache = {};
|
|
18918
|
+
props.rule.config.childRules?.forEach((rule) => {
|
|
18919
|
+
if (rule.name === "numInput" && rule.config.count) {
|
|
18920
|
+
cache[rule.field] = { title: rule.title.title, count: 0 };
|
|
18921
|
+
}
|
|
18922
|
+
});
|
|
18923
|
+
data.forEach((row) => {
|
|
18924
|
+
Object.keys(cache).forEach((key) => {
|
|
18925
|
+
if (!isNaN(row[key]))
|
|
18926
|
+
cache[key].count += row[key];
|
|
18927
|
+
});
|
|
18928
|
+
});
|
|
18929
|
+
if (props.rule.config.showTotal) {
|
|
18930
|
+
cache = {
|
|
18931
|
+
_total: { title: "\u884C\u6570", count: data?.length || 0 },
|
|
18932
|
+
...cache
|
|
18933
|
+
};
|
|
18934
|
+
}
|
|
18935
|
+
if (Object.keys(cache).length) {
|
|
18936
|
+
if (isProductCenter.value) {
|
|
18937
|
+
return `\uFF08${Object.values(cache).reduce((pre, cur, index) => {
|
|
18938
|
+
if (index !== 0)
|
|
18939
|
+
pre += "\u3001";
|
|
18940
|
+
pre += `${cur.title}\u603B\u8BA1\uFF1A${cur.count}`;
|
|
18941
|
+
return pre;
|
|
18942
|
+
}, "")}\uFF09`;
|
|
18943
|
+
}
|
|
18944
|
+
return `\uFF08\u5B57\u6BB5\u540D\u603B\u8BA1\uFF1A${Object.values(cache).reduce((pre, cur, index) => {
|
|
18945
|
+
if (index !== 0)
|
|
18946
|
+
pre += "\u3001";
|
|
18947
|
+
pre += `${cur.title}\uFF1A${cur.count}`;
|
|
18948
|
+
return pre;
|
|
18949
|
+
}, "")}\uFF09`;
|
|
18950
|
+
} else {
|
|
18951
|
+
return "";
|
|
18952
|
+
}
|
|
18953
|
+
});
|
|
18939
18954
|
function isShow(key) {
|
|
18940
18955
|
return props.rule.config.tableAdvancedFeatures.includes(key);
|
|
18941
18956
|
}
|
|
@@ -19139,6 +19154,9 @@ const _sfc_main$7 = vue.defineComponent({
|
|
|
19139
19154
|
}
|
|
19140
19155
|
async function handleBatchDelete() {
|
|
19141
19156
|
const selected = xGrid.value.getCheckboxRecords();
|
|
19157
|
+
if (!selected?.length) {
|
|
19158
|
+
return;
|
|
19159
|
+
}
|
|
19142
19160
|
if (isProductCenter.value) {
|
|
19143
19161
|
if (await utils__default["default"].confirmModal(`\u786E\u5B9A\u8981\u5220\u9664\u6240\u9009\u7684${selected?.length}\u6761\u6570\u636E\u4E48\uFF1F`)) {
|
|
19144
19162
|
selected.forEach((item) => {
|
|
@@ -20846,11 +20864,20 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
20846
20864
|
}
|
|
20847
20865
|
return false;
|
|
20848
20866
|
});
|
|
20867
|
+
function isProductCenterSuit(rule) {
|
|
20868
|
+
return [
|
|
20869
|
+
"F2CTemplate",
|
|
20870
|
+
"B2CTemplate",
|
|
20871
|
+
"DistributeTemp",
|
|
20872
|
+
"FreshTemplate",
|
|
20873
|
+
"activityApply"
|
|
20874
|
+
].includes(rule.name);
|
|
20875
|
+
}
|
|
20849
20876
|
function isAssociatedFn(rule) {
|
|
20850
|
-
if (rule?.config?.dataFiltering === field.value) {
|
|
20877
|
+
if (rule?.config?.dataFiltering === field.value && !isProductCenterSuit(rule)) {
|
|
20851
20878
|
return true;
|
|
20852
20879
|
}
|
|
20853
|
-
if (rule?.config?.childRules?.length) {
|
|
20880
|
+
if (rule?.config?.childRules?.length && !isProductCenterSuit(rule)) {
|
|
20854
20881
|
for (const cRule of rule.config.childRules) {
|
|
20855
20882
|
if (isAssociatedFn(cRule))
|
|
20856
20883
|
return true;
|