@ecan-bi/datav 1.0.54 → 1.0.55

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/dist/index.umd.js CHANGED
@@ -3218,11 +3218,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3218
3218
  strokeTextWidth: "100%",
3219
3219
  lineHeight: "26px",
3220
3220
  decimalFormat: false,
3221
- textDefaultValue: ""
3221
+ variableDefaultValue: ""
3222
3222
  });
3223
3223
  const proportionComponentProps = transformToComponentProps(proportionProps);
3224
3224
  const proportionEvents = ["refreshData", "click"];
3225
- var Proportion_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".ecan-proportion[data-v-f029c988] {\n overflow: hidden;\n}\n.progress[data-v-f029c988] {\n width: 100%;\n height: 100%;\n}\n.format[data-v-f029c988] {\n margin: 0 auto;\n}\n")();
3225
+ var Proportion_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".ecan-proportion[data-v-4a25add6] {\n overflow: hidden;\n}\n.progress[data-v-4a25add6] {\n width: 100%;\n height: 100%;\n}\n.format[data-v-4a25add6] {\n margin: 0 auto;\n}\n")();
3226
3226
  const _sfc_main$h = vue.defineComponent({
3227
3227
  name: "EcanProportion",
3228
3228
  components: {
@@ -3263,23 +3263,21 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3263
3263
  const text = vue.computed(() => {
3264
3264
  let text2 = props2.text;
3265
3265
  const data = vue.unref(myData);
3266
- console.log(data);
3267
- const variables = text2.match(/\{.*\}/g) || [];
3266
+ const variables = text2.match(/\{.+\}/g) || [];
3268
3267
  if (text2 === "")
3269
3268
  return vue.unref(value) + "%";
3270
- for (let i = 0; i < variables.length; i++) {
3269
+ for (let i = 0; i < (variables == null ? void 0 : variables.length); i++) {
3271
3270
  const variable = variables[i];
3272
3271
  let statement = variable.slice(1, variable.length - 1);
3273
3272
  const textVariables = statement.match(/[a-zA-Z]\w*/g);
3274
- for (let j = 0; j < textVariables.length; j++) {
3273
+ for (let j = 0; j < (textVariables == null ? void 0 : textVariables.length); j++) {
3275
3274
  const textVariable = textVariables[i];
3276
3275
  if (data[textVariable] != null) {
3277
3276
  statement = statement.replace(textVariable, data[textVariable]);
3278
3277
  } else {
3279
- statement = statement.replace(textVariable, props2.textDefaultValue);
3278
+ statement = statement.replace(textVariable, props2.variableDefaultValue);
3280
3279
  }
3281
3280
  }
3282
- console.log("statement", statement);
3283
3281
  let usedVariable = statement;
3284
3282
  try {
3285
3283
  if (/[+\-*/%]+/g.test(statement)) {
@@ -3292,10 +3290,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3292
3290
  if (props2.decimalFormat) {
3293
3291
  usedVariable = usedVariable == null ? void 0 : usedVariable.toFixed(2);
3294
3292
  }
3295
- console.log("usedVariable", usedVariable);
3296
3293
  text2 = text2.replace(variable, usedVariable + "");
3297
3294
  }
3298
- console.log("text", text2);
3299
3295
  return text2;
3300
3296
  });
3301
3297
  const requestData = useRequestData(props2);
@@ -3376,7 +3372,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3376
3372
  }, 8, ["percent", "width", "type", "strokeColor", "strokeLinecap", "trailColor", "strokeWidth", "gapDegree", "onClick"])
3377
3373
  ], 4);
3378
3374
  }
3379
- var Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-f029c988"]]);
3375
+ var Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-4a25add6"]]);
3380
3376
  const EcanProportion = withInstall(Proportion);
3381
3377
  const inputProps = __spreadProps(__spreadValues({}, props), {
3382
3378
  width: "200px",
@@ -3670,7 +3666,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3670
3666
  danger: false,
3671
3667
  shape: "default",
3672
3668
  href: "",
3673
- target: "_self",
3669
+ target: "self",
3674
3670
  fontSize: "14px",
3675
3671
  fontWeight: 400
3676
3672
  });
@@ -3687,20 +3683,43 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3687
3683
  const style2 = usePickComponentStyle(props2);
3688
3684
  const events = props2.events;
3689
3685
  const emitEvent = useEmitEvent(events);
3690
- const click = emitEvent("click");
3686
+ const click = emitEvent("click", () => {
3687
+ if (props2.target === "event") {
3688
+ console.log("message");
3689
+ window.parent.postMessage({
3690
+ type: "openPage",
3691
+ url: props2.href
3692
+ }, "*");
3693
+ }
3694
+ });
3691
3695
  const myText = vue.computed(() => useVariablesInText(props2.text));
3692
3696
  const myHref = vue.computed(() => {
3697
+ if (props2.target === "event")
3698
+ return void 0;
3693
3699
  const href = props2.href;
3694
3700
  if (href) {
3695
3701
  return useVariablesInText(href);
3696
3702
  }
3697
3703
  return void 0;
3698
3704
  });
3705
+ const myTarget = vue.computed(() => {
3706
+ const target = props2.target;
3707
+ if (target === "event") {
3708
+ return void 0;
3709
+ } else {
3710
+ const map = {
3711
+ self: "_self",
3712
+ blank: "_blank"
3713
+ };
3714
+ return map[target];
3715
+ }
3716
+ });
3699
3717
  return {
3700
3718
  style: style2,
3701
3719
  click,
3702
3720
  myText,
3703
- myHref
3721
+ myHref,
3722
+ myTarget
3704
3723
  };
3705
3724
  }
3706
3725
  });
@@ -3717,7 +3736,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3717
3736
  danger: _ctx.danger,
3718
3737
  shape: _ctx.shape,
3719
3738
  href: _ctx.myHref,
3720
- target: _ctx.target
3739
+ target: _ctx.myTarget
3721
3740
  }, {
3722
3741
  default: vue.withCtx(() => [
3723
3742
  vue.createElementVNode("span", {
@@ -4499,7 +4518,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
4499
4518
  valueTypeDataFieldNames: { name: "name", value: "value", type: "type" },
4500
4519
  keyTypeDataFieldNames: { name: "name", types: [] },
4501
4520
  dataFieldConfigType: "value",
4502
- barWidth: "0%",
4521
+ barWidth: "40%",
4503
4522
  gridContainLabel: true,
4504
4523
  gridTop: "10%",
4505
4524
  gridBottom: "10%",
@@ -6094,7 +6113,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6094
6113
  target: "",
6095
6114
  color: ""
6096
6115
  }],
6097
- actionColumnWidth: 50,
6116
+ actionColumnWidth: 100,
6098
6117
  columns: [
6099
6118
  {
6100
6119
  title: "\u59D3\u540D",
@@ -6129,16 +6148,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6129
6148
  });
6130
6149
  const tableComponentProps = transformToComponentProps(tableProps);
6131
6150
  const tableEvents = ["click", "refreshData"];
6132
- var Table_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => `.table[data-v-a84f3122] {
6151
+ var Table_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => `.table[data-v-e3b6ea7c] {
6133
6152
  width: 100%;
6134
6153
  }
6135
- .goUp[data-v-a84f3122] {
6154
+ .goUp[data-v-e3b6ea7c] {
6136
6155
  color: #FF512E;
6137
6156
  display: flex;
6138
6157
  align-items: center;
6139
6158
  justify-content: center;
6140
6159
  }
6141
- .goUp[data-v-a84f3122]:before {
6160
+ .goUp[data-v-e3b6ea7c]:before {
6142
6161
  content: '';
6143
6162
  display: block;
6144
6163
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD/WzT/WjP/WDD/WzT/WzP/WzT/WzT/WzT/WjT/WzT/WDT/YED/WzT/WzT/WjT/YED/WzT/WzT/WzT/XDT/WzT/WjX/WjP/XDT/XDT/WTL/Tif/WzReH8z5AAAAHHRSTlMA8RgS9W9YHbePZyME5sVjCP7bzcCxgndOQC4GFJJgKwAAAIJJREFUKM+Nkd0OgyAMRjvqcLA53fzXvv9zaokmxq8mnsue5ACFDjiy+XyjLZ7yyK35OxN5mSFZKa2QojEIKRhrZKM0QnsMQxirmJ0kBubTIZvAtUyiFAT4JFoUIYmIotZ5xjDPfyoCAV16nMPdFir8xZ16nM//tePtXw2ODOJY0V0WqQwM2rgKrU0AAAAASUVORK5CYII=");
@@ -6148,13 +6167,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6148
6167
  background-size: cover;
6149
6168
  margin-right: 2px;
6150
6169
  }
6151
- .goDown[data-v-a84f3122] {
6170
+ .goDown[data-v-e3b6ea7c] {
6152
6171
  color: #00F7B4;
6153
6172
  display: flex;
6154
6173
  align-items: center;
6155
6174
  justify-content: center;
6156
6175
  }
6157
- .goDown[data-v-a84f3122]:before {
6176
+ .goDown[data-v-e3b6ea7c]:before {
6158
6177
  content: '';
6159
6178
  display: block;
6160
6179
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAaVBMVEUAAAAA+b0A+LwA+L0A/6AA+LwA+L0A+L0A+b0A+LwA/78A+LwA+L0A+LwA+LwA+b0A+LsA970A+LwA+r0A9boA/7YA+LwA+LwA+LwA+L0A97wA+bwA970A970A+bwA+bwA+LsA9rkA+LzcCa+5AAAAInRSTlMAd/uVAvjYxCsiDvPp37F7aWBMNBgK7s/NvKidh4NXUEcdp9A1SAAAAI5JREFUKM+l0UcOwzAMRFGqWZbcW3rl/Q8ZhUGKMN7lLedD4EKUi/3BEIrGsQu432pmPuF+1WnfRNjLipMz7HbHT3cIF9n3BLYSerzAooSgZNcWQiuhIdBI8JQblNISCqXU/BNG/mqzJ+az13MWluIdRspNmgV+Rvc6vkCwPu1uIhQq5o7WDOwtrToG+ssDeh4QPgfT2X0AAAAASUVORK5CYII=");
@@ -6164,11 +6183,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6164
6183
  background-size: cover;
6165
6184
  margin-right: 2px;
6166
6185
  }
6167
- .action-list[data-v-a84f3122] {
6186
+ .action-list[data-v-e3b6ea7c] {
6168
6187
  display: flex;
6169
6188
  width: 100%;
6170
6189
  }
6171
- .action[data-v-a84f3122] {
6190
+ .action[data-v-e3b6ea7c] {
6172
6191
  flex: 1;
6173
6192
  }
6174
6193
  `)();
@@ -6423,6 +6442,32 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6423
6442
  expose({
6424
6443
  refreshData
6425
6444
  });
6445
+ const handleHref = (target, href = "", data) => {
6446
+ if (target === "event") {
6447
+ return void 0;
6448
+ } else {
6449
+ useVariablesInText(href, data);
6450
+ }
6451
+ };
6452
+ const handleHrefTarget = (target) => {
6453
+ if (target === "event") {
6454
+ return void 0;
6455
+ } else {
6456
+ const map = {
6457
+ self: "_self",
6458
+ blank: "_blank"
6459
+ };
6460
+ return map[target];
6461
+ }
6462
+ };
6463
+ const onTouchHrefEvent = (target, href = "") => {
6464
+ if (target === "event") {
6465
+ window.parent.postMessage({
6466
+ type: "openPage",
6467
+ url: href
6468
+ }, "*");
6469
+ }
6470
+ };
6426
6471
  return {
6427
6472
  x,
6428
6473
  y,
@@ -6437,7 +6482,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6437
6482
  dataSource,
6438
6483
  summaryList,
6439
6484
  loading,
6440
- useVariablesInText
6485
+ onTouchHrefEvent,
6486
+ handleHref,
6487
+ handleHrefTarget
6441
6488
  };
6442
6489
  }
6443
6490
  });
@@ -6445,7 +6492,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6445
6492
  key: 1,
6446
6493
  class: "action-list"
6447
6494
  };
6448
- const _hoisted_2 = ["href", "target"];
6495
+ const _hoisted_2 = ["href", "target", "onClick"];
6449
6496
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6450
6497
  const _component_a_table_summary_cell = vue.resolveComponent("a-table-summary-cell");
6451
6498
  const _component_a_table_summary_row = vue.resolveComponent("a-table-summary-row");
@@ -6486,13 +6533,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6486
6533
  key: index22
6487
6534
  }, [
6488
6535
  vue.createElementVNode("a", {
6489
- href: _ctx.useVariablesInText(action.href, record),
6490
- target: action.target,
6536
+ href: _ctx.handleHref(action.target, action.href, record),
6537
+ target: _ctx.handleHrefTarget(action.target),
6491
6538
  style: vue.normalizeStyle({
6492
6539
  color: action.color,
6493
6540
  fontSize: _ctx.fontSize,
6494
6541
  fontWeight: _ctx.fontWeight
6495
- })
6542
+ }),
6543
+ onClick: ($event) => _ctx.onTouchHrefEvent(action.target, action.href)
6496
6544
  }, vue.toDisplayString(action.title), 13, _hoisted_2)
6497
6545
  ]);
6498
6546
  }), 128))
@@ -6543,7 +6591,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6543
6591
  }, 8, ["loading"])
6544
6592
  ], 4);
6545
6593
  }
6546
- var Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-a84f3122"]]);
6594
+ var Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-e3b6ea7c"]]);
6547
6595
  const EcanTable = withInstall(Table);
6548
6596
  const mapProps = __spreadProps(__spreadValues({}, props), {
6549
6597
  mapJson: null,