bm-admin-ui 1.2.37-alpha → 1.2.39-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.
@@ -75,7 +75,7 @@ var input = {
75
75
  field,
76
76
  title: data.title.title,
77
77
  headerClassName: data.effect.required ? 'is-required' : '',
78
- minWidth: data.config.fieldRatio,
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
- minWidth: data.config.fieldRatio,
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
- minWidth: data.config.fieldRatio,
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
- minWidth: data.config.fieldRatio,
356
+ width: data.config.fieldRatio,
357
357
  slots: {
358
358
  default({ row }) {
359
359
  return h(Select, {
@@ -419,7 +419,7 @@ var checkbox = {
419
419
  field,
420
420
  title: data.title.title,
421
421
  headerClassName: data.effect.required ? 'is-required' : '',
422
- minWidth: data.config.fieldRatio,
422
+ width: data.config.fieldRatio,
423
423
  slots: {
424
424
  default({ row }) {
425
425
  return h(Select, {
@@ -508,7 +508,7 @@ var date = {
508
508
  field,
509
509
  title: data.title.title,
510
510
  headerClassName: data.effect.required ? 'is-required' : '',
511
- minWidth: data.config.fieldRatio,
511
+ width: data.config.fieldRatio,
512
512
  slots: {
513
513
  default({ row }) {
514
514
  return h(DatePicker, {
@@ -593,7 +593,7 @@ var dateRange = {
593
593
  field,
594
594
  title: data.title.title,
595
595
  headerClassName: data.effect.required ? 'is-required' : '',
596
- minWidth: data.config.fieldRatio,
596
+ width: data.config.fieldRatio,
597
597
  slots: {
598
598
  default({ row }) {
599
599
  return h(RangePicker, {
@@ -1028,7 +1028,7 @@ var people = {
1028
1028
  field,
1029
1029
  title: data.title.title,
1030
1030
  headerClassName: data.effect.required ? 'is-required' : '',
1031
- minWidth: data.config.fieldRatio,
1031
+ width: data.config.fieldRatio,
1032
1032
  slots: {
1033
1033
  default({ row }) {
1034
1034
  var _a;
@@ -1056,7 +1056,7 @@ var people = {
1056
1056
 
1057
1057
  const _hoisted_1$7 = ["onClick"];
1058
1058
  const _hoisted_2$7 = ["onClick"];
1059
- const _hoisted_3$6 = { class: "box" };
1059
+ const _hoisted_3$5 = { class: "box" };
1060
1060
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
1061
1061
  __name: "temp-content",
1062
1062
  props: ["content", "preview"],
@@ -1115,7 +1115,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1115
1115
  class: "bm-fc-rect-wrapper",
1116
1116
  onClick: withModifiers(triggerPreview, ["self"])
1117
1117
  }, [
1118
- createElementVNode("div", _hoisted_3$6, [
1118
+ createElementVNode("div", _hoisted_3$5, [
1119
1119
  createElementVNode("div", {
1120
1120
  class: "bm-fc-rect-outer",
1121
1121
  style: normalizeStyle(
@@ -1140,7 +1140,7 @@ var TempContent = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "temp-con
1140
1140
 
1141
1141
  const _hoisted_1$6 = { class: "bm-fc-select-material-temp__content__item-info" };
1142
1142
  const _hoisted_2$6 = { class: "bm-fc-select-material-temp__content__item-info__cover" };
1143
- const _hoisted_3$5 = ["src"];
1143
+ const _hoisted_3$4 = ["src"];
1144
1144
  const _hoisted_4$4 = ["onClick"];
1145
1145
  const _hoisted_5$4 = {
1146
1146
  key: 1,
@@ -1346,7 +1346,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1346
1346
  class: "bm-fc-select-material-temp__content__item-info__cover__img",
1347
1347
  src: item.coverPlanUrl,
1348
1348
  alt: ""
1349
- }, null, 8, _hoisted_3$5)) : (openBlock(), createBlock(TempContent, {
1349
+ }, null, 8, _hoisted_3$4)) : (openBlock(), createBlock(TempContent, {
1350
1350
  key: 1,
1351
1351
  content: item.htmlContent
1352
1352
  }, null, 8, ["content"]))
@@ -18790,7 +18790,7 @@ var ShopInput = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "shop-input
18790
18790
 
18791
18791
  const _hoisted_1$5 = { class: "bm-dc-table-widget" };
18792
18792
  const _hoisted_2$5 = { class: "bm-dc-table-widget__title" };
18793
- const _hoisted_3$4 = { class: "bm-dc-table-widget__title-samll" };
18793
+ const _hoisted_3$3 = { class: "bm-dc-table-widget__title-samll" };
18794
18794
  const _hoisted_4$3 = {
18795
18795
  key: 0,
18796
18796
  class: "bm-dc-table-widget__top-bar"
@@ -18902,10 +18902,17 @@ const _sfc_main$7 = defineComponent({
18902
18902
  });
18903
18903
  data.forEach((row) => {
18904
18904
  Object.keys(cache).forEach((key) => {
18905
- if (!isNaN(row[key]))
18906
- cache[key].count += row[key];
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
+ }
18907
18911
  });
18908
18912
  });
18913
+ Object.keys(cache).forEach((key) => {
18914
+ cache[key].count = Number(cache[key].count.toFixed(4));
18915
+ });
18909
18916
  if (props.rule.config.showTotal) {
18910
18917
  cache = {
18911
18918
  _total: { title: "\u884C\u6570", count: data?.length || 0 },
@@ -18975,7 +18982,7 @@ const _sfc_main$7 = defineComponent({
18975
18982
  pre.push({
18976
18983
  field: childField,
18977
18984
  title,
18978
- minWidth: "140px",
18985
+ width: "140px",
18979
18986
  slots: {
18980
18987
  default({ row }) {
18981
18988
  if (row?.[childField]) {
@@ -19022,11 +19029,19 @@ const _sfc_main$7 = defineComponent({
19022
19029
  return pre;
19023
19030
  }, [])
19024
19031
  );
19032
+ columns.push({
19033
+ field: "_empty",
19034
+ title: " ",
19035
+ showOverflow: false,
19036
+ showHeaderOverflow: false,
19037
+ minWidth: 1,
19038
+ resizable: false
19039
+ });
19025
19040
  if (!props.hidden)
19026
19041
  columns.push({
19027
19042
  field: oper,
19028
19043
  title: "\u64CD\u4F5C",
19029
- minWidth: isProductCenter.value ? "110px" : "140px",
19044
+ width: isProductCenter.value ? "110px" : "140px",
19030
19045
  fixed: "right",
19031
19046
  slots: {
19032
19047
  default: "floatHandle"
@@ -19088,7 +19103,7 @@ const _sfc_main$7 = defineComponent({
19088
19103
  field,
19089
19104
  title: getBaseTitle(),
19090
19105
  headerClassName: rule.effect.required ? "is-required" : "",
19091
- minWidth: "140px",
19106
+ width: "140px",
19092
19107
  slots: {
19093
19108
  default: rule.field
19094
19109
  }
@@ -19100,7 +19115,7 @@ const _sfc_main$7 = defineComponent({
19100
19115
  columns2.push({
19101
19116
  field: childField,
19102
19117
  title: `${item.label}-${mainName}`,
19103
- minWidth: "140px",
19118
+ width: "140px",
19104
19119
  slots: {
19105
19120
  default({ row }) {
19106
19121
  if (item.value === "\u5546\u54C1\u56FE\u7247" && row[childField]) {
@@ -19228,11 +19243,45 @@ const _sfc_main$7 = defineComponent({
19228
19243
  }
19229
19244
  }
19230
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;
19231
19263
  xGrid.value.exportData({
19232
19264
  mode: "all",
19233
19265
  columnFilterMethod({ column }) {
19234
19266
  return isValidColumn(column);
19235
- }
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;
19236
19285
  });
19237
19286
  }
19238
19287
  function emitChange() {
@@ -19333,7 +19382,7 @@ const _sfc_main$7 = defineComponent({
19333
19382
  file && reader.readAsText(file, "GB2312");
19334
19383
  }
19335
19384
  function isValidColumn(c) {
19336
- return c.type !== "checkbox" && c.type !== "seq" && c.field !== oper;
19385
+ return c.type !== "checkbox" && c.type !== "seq" && c.field !== oper && c.field !== "_empty";
19337
19386
  }
19338
19387
  function parseCsv(result) {
19339
19388
  let data2 = [];
@@ -19614,6 +19663,9 @@ const _sfc_main$7 = defineComponent({
19614
19663
  deep: true
19615
19664
  }
19616
19665
  );
19666
+ const buttonLoading = ref({
19667
+ export: false
19668
+ });
19617
19669
  const buttonLoadingForProductCenter = ref({
19618
19670
  export: false,
19619
19671
  download: false,
@@ -19747,7 +19799,7 @@ const _sfc_main$7 = defineComponent({
19747
19799
  return openBlock(), createElementBlock("div", _hoisted_1$5, [
19748
19800
  createElementVNode("div", _hoisted_2$5, [
19749
19801
  createTextVNode(toDisplayString(__props.rule.title.title) + " ", 1),
19750
- createElementVNode("span", _hoisted_3$4, toDisplayString(unref(countText)), 1),
19802
+ createElementVNode("span", _hoisted_3$3, toDisplayString(unref(countText)), 1),
19751
19803
  createCommentVNode(" \u5546\u54C1\u4E2D\u5FC3\u5B9A\u5236 \u6309\u94AE "),
19752
19804
  unref(isProductCenter) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
19753
19805
  !__props.hidden ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
@@ -19822,13 +19874,14 @@ const _sfc_main$7 = defineComponent({
19822
19874
  unref(exportFeature) ? (openBlock(), createBlock(unref(Button), {
19823
19875
  key: 0,
19824
19876
  disabled: __props.disabled,
19877
+ loading: buttonLoading.value.export,
19825
19878
  onClick: handleExport
19826
19879
  }, {
19827
19880
  default: withCtx(() => [
19828
19881
  createTextVNode("\u5BFC\u51FA")
19829
19882
  ]),
19830
19883
  _: 1
19831
- }, 8, ["disabled"])) : createCommentVNode("v-if", true),
19884
+ }, 8, ["disabled", "loading"])) : createCommentVNode("v-if", true),
19832
19885
  createTextVNode("\xA0 "),
19833
19886
  unref(importFeature) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
19834
19887
  createElementVNode("input", {
@@ -19880,6 +19933,18 @@ const _sfc_main$7 = defineComponent({
19880
19933
  ]),
19881
19934
  _: 1
19882
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)
19883
19948
  ], 64)) : createCommentVNode("v-if", true)
19884
19949
  ]))
19885
19950
  ]),
@@ -19980,7 +20045,7 @@ var TableWidget = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "table-wi
19980
20045
 
19981
20046
  const _hoisted_1$4 = /* @__PURE__ */ createElementVNode("span", { class: "bm-fc-form-item-label is-required" }, "\u7D20\u6750\u6A21\u677F\uFF1A", -1);
19982
20047
  const _hoisted_2$4 = { key: 0 };
19983
- const _hoisted_3$3 = /* @__PURE__ */ createElementVNode("span", { class: "bm-fc-form-item-label" }, "\u7D20\u6750\u7C7B\u578B\uFF1A", -1);
20048
+ const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("span", { class: "bm-fc-form-item-label" }, "\u7D20\u6750\u7C7B\u578B\uFF1A", -1);
19984
20049
  const _hoisted_4$2 = {
19985
20050
  key: 1,
19986
20051
  class: "bm-fc-placeholder"
@@ -20372,7 +20437,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
20372
20437
  default: withCtx(() => [
20373
20438
  createVNode(unref(Col), null, {
20374
20439
  default: withCtx(() => [
20375
- _hoisted_3$3
20440
+ _hoisted_3$2
20376
20441
  ]),
20377
20442
  _: 1
20378
20443
  }),
@@ -20633,8 +20698,7 @@ var materialTemp = {
20633
20698
  };
20634
20699
 
20635
20700
  const _hoisted_1$3 = { class: "bm-fc-form-item-label" };
20636
- const _hoisted_2$3 = ["src"];
20637
- const _hoisted_3$2 = {
20701
+ const _hoisted_2$3 = {
20638
20702
  key: 1,
20639
20703
  class: "bm-fc-placeholder"
20640
20704
  };
@@ -20808,16 +20872,16 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
20808
20872
  }, {
20809
20873
  default: withCtx(() => [
20810
20874
  getValue(field.value) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
20811
- field.value === "\u5546\u54C1\u56FE\u7247" ? (openBlock(), createElementBlock("img", {
20875
+ field.value === "\u5546\u54C1\u56FE\u7247" ? (openBlock(), createBlock(unref(Image), {
20812
20876
  key: 0,
20813
20877
  class: "bm-fc-form-item__img",
20814
20878
  src: __props.extraConfig.common.previewImg(getValue(field.value))
20815
- }, null, 8, _hoisted_2$3)) : field.value === "\u5546\u54C1\u5355\u4F4D" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
20879
+ }, null, 8, ["src"])) : field.value === "\u5546\u54C1\u5355\u4F4D" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
20816
20880
  createTextVNode(toDisplayString(unitMap[getValue(field.value)] || getValue(field.value)), 1)
20817
20881
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
20818
20882
  createTextVNode(toDisplayString(getValue(field.value)), 1)
20819
20883
  ], 64))
20820
- ], 64)) : (openBlock(), createElementBlock("span", _hoisted_3$2, "\u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6"))
20884
+ ], 64)) : (openBlock(), createElementBlock("span", _hoisted_2$3, "\u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6"))
20821
20885
  ]),
20822
20886
  _: 2
20823
20887
  }, 1024)
@@ -21063,7 +21127,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
21063
21127
  value: __props.formCreateInject?.rule?.value?.value || __props.value?.value || null,
21064
21128
  placeholder: "\u8BF7\u9009\u62E9",
21065
21129
  "show-search": "",
21066
- "show-arrow": false,
21130
+ "show-arrow": true,
21067
21131
  "default-active-first-option": false,
21068
21132
  "filter-option": false,
21069
21133
  "not-found-content": null,
@@ -21197,7 +21261,7 @@ var shop = {
21197
21261
  field,
21198
21262
  title: data.title.title,
21199
21263
  headerClassName: data.effect.required ? 'is-required' : '',
21200
- minWidth: '138px',
21264
+ width: '138px',
21201
21265
  slots: {
21202
21266
  default({ row }) {
21203
21267
  var _a;
@@ -21375,7 +21439,7 @@ var materialType = {
21375
21439
  field,
21376
21440
  title: '素材类型',
21377
21441
  headerClassName: data.effect.required ? 'is-required' : '',
21378
- minWidth: '138px',
21442
+ width: '138px',
21379
21443
  slots: {
21380
21444
  default({ row }) {
21381
21445
  return h(materialType$1, {
@@ -21527,7 +21591,7 @@ var department = {
21527
21591
  field,
21528
21592
  title: data.title.title,
21529
21593
  headerClassName: data.effect.required ? 'is-required' : '',
21530
- minWidth: data.config.fieldRatio,
21594
+ width: data.config.fieldRatio,
21531
21595
  slots: {
21532
21596
  default({ row }) {
21533
21597
  var _a;
@@ -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 = /* @__PURE__ */ createElementVNode("div", null, null, -1);
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
- _hoisted_7
224
+ _hoisted_8
220
225
  ]);
221
226
  }
222
227
  var InputTagsDisplay = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "input-tags-display.vue"]]);