g-ui-web 1.0.20 → 1.0.22

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/lib/g-ui-web.js CHANGED
@@ -115167,140 +115167,157 @@ const b6t = { class: "g-datatable" }, _6t = H({
115167
115167
  }
115168
115168
  ]
115169
115169
  };
115170
- const h = B({}), v = o.dbOptions.columns.find((w) => w.field === o.dbOptions.dataField), g = async (w) => {
115171
- if (ya(w)) {
115170
+ const h = (C) => {
115171
+ const x = [];
115172
+ return C.forEach((S) => {
115173
+ let E = x.find(
115174
+ (A) => A[o.dbOptions.axisField] === S[o.dbOptions.axisField]
115175
+ );
115176
+ E || (E = {
115177
+ [o.dbOptions.axisField]: S[o.dbOptions.axisField],
115178
+ [o.dbOptions.dataField]: S[o.dbOptions.dataField],
115179
+ children: []
115180
+ }, x.push(E));
115181
+ const T = {
115182
+ [o.dbOptions.cDataField]: S[o.dbOptions.cDataField],
115183
+ [o.dbOptions.cAxisField]: S[o.dbOptions.cAxisField]
115184
+ };
115185
+ E.children.push(T);
115186
+ }), x;
115187
+ }, v = B({}), g = o.dbOptions.columns.find((C) => C.field === o.dbOptions.dataField), m = async (C) => {
115188
+ if (C = h(C), ya(C)) {
115172
115189
  s.value = !0;
115173
115190
  return;
115174
115191
  } else
115175
115192
  s.value = !1;
115176
115193
  p = {
115177
115194
  series: [{}]
115178
- }, f = [], d.value = w, d.value && o.dbOptions && (d.value.map((C) => {
115179
- let x = {
115180
- name: C[o.dbOptions.axisField],
115181
- value: C[o.dbOptions.dataField],
115182
- children: C.children.map((S) => ({
115183
- name: S[o.dbOptions.cAxisField],
115184
- value: S[o.dbOptions.cDataField]
115195
+ }, f = [], d.value = C, d.value && o.dbOptions && (d.value.map((x) => {
115196
+ let S = {
115197
+ name: x[o.dbOptions.axisField],
115198
+ value: x[o.dbOptions.dataField],
115199
+ children: x.children.map((E) => ({
115200
+ name: E[o.dbOptions.cAxisField],
115201
+ value: E[o.dbOptions.cDataField]
115185
115202
  }))
115186
115203
  };
115187
- f.push(x);
115204
+ f.push(S);
115188
115205
  }), o.options ? o.options.series ? o.options.series[0].data = f : o.options.series = [{ data: f }] : p.series[0].data = f), o.options ? c.value = CW(o.options, {
115189
115206
  type: o.type,
115190
115207
  size: o.size,
115191
115208
  isMarkLine: o.isMarkLine,
115192
115209
  markLineData: o.markLineData,
115193
- title: v.title,
115194
- unit: v.unit
115210
+ title: g.title,
115211
+ unit: g.unit
115195
115212
  }) : c.value = CW(p, {
115196
115213
  type: o.type,
115197
115214
  size: o.size,
115198
115215
  isMarkLine: o.isMarkLine,
115199
115216
  markLineData: o.markLineData,
115200
- title: v.title,
115201
- unit: v.unit
115202
- }), y(1);
115217
+ title: g.title,
115218
+ unit: g.unit
115219
+ }), _(1);
115203
115220
  };
115204
- let m = B(null);
115205
- const y = (w) => {
115221
+ let y = B(null);
115222
+ const _ = (C) => {
115206
115223
  xe(() => {
115207
115224
  if (!u.value) return;
115208
- const C = u.value.myChart;
115209
- w ? (m.value = w, c.value = q8(
115225
+ const x = u.value.myChart;
115226
+ C ? (y.value = C, c.value = q8(
115210
115227
  c.value,
115211
115228
  {
115212
115229
  type: o.type,
115213
115230
  size: o.size,
115214
115231
  isMarkLine: o.isMarkLine,
115215
115232
  markLineData: o.markLineData,
115216
- title: v.title,
115217
- unit: v.unit
115233
+ title: g.title,
115234
+ unit: g.unit
115218
115235
  },
115219
- m.value
115220
- ), C.on("finished", function() {
115221
- m.value !== null && C.dispatchAction({
115236
+ y.value
115237
+ ), x.on("finished", function() {
115238
+ y.value !== null && x.dispatchAction({
115222
115239
  type: "highlight",
115223
115240
  seriesIndex: 0,
115224
- dataIndex: m.value
115241
+ dataIndex: y.value
115225
115242
  });
115226
- })) : (C.on("click", (x) => {
115227
- c.value && x.seriesIndex === 0 && (m.value === x.dataIndex ? (m.value = null, c.value = q8(c.value, {
115243
+ })) : (x.on("click", (S) => {
115244
+ c.value && S.seriesIndex === 0 && (y.value === S.dataIndex ? (y.value = null, c.value = q8(c.value, {
115228
115245
  type: o.type,
115229
115246
  size: o.size,
115230
115247
  isMarkLine: o.isMarkLine,
115231
115248
  markLineData: o.markLineData,
115232
- title: v.title,
115233
- unit: v == null ? void 0 : v.unit
115234
- })) : (m.value = x.dataIndex, c.value = q8(
115249
+ title: g.title,
115250
+ unit: g == null ? void 0 : g.unit
115251
+ })) : (y.value = S.dataIndex, c.value = q8(
115235
115252
  c.value,
115236
115253
  {
115237
115254
  type: o.type,
115238
115255
  size: o.size,
115239
115256
  isMarkLine: o.isMarkLine,
115240
115257
  markLineData: o.markLineData,
115241
- title: v.title,
115242
- unit: v == null ? void 0 : v.unit
115258
+ title: g.title,
115259
+ unit: g == null ? void 0 : g.unit
115243
115260
  },
115244
- x.dataIndex
115261
+ S.dataIndex
115245
115262
  )));
115246
- }), C.on("finished", function() {
115247
- m.value !== null && C.dispatchAction({
115263
+ }), x.on("finished", function() {
115264
+ y.value !== null && x.dispatchAction({
115248
115265
  type: "highlight",
115249
115266
  seriesIndex: 0,
115250
- dataIndex: m.value
115267
+ dataIndex: y.value
115251
115268
  });
115252
115269
  }));
115253
115270
  });
115254
115271
  };
115255
115272
  qt(async () => {
115256
- await y();
115273
+ await _();
115257
115274
  }), ke(
115258
115275
  () => o.dbOptions.data,
115259
- (w) => {
115260
- h.value = jt(w);
115261
- const C = ["http://", "https://", void 0];
115262
- !w.path && !w.dsKey && !h.value.dataUrl && !(typeof w == "string" && C.some((x) => w.includes(x))) && h.value.loadStaticData(w), (typeof w == "string" || w.path) && h.value.reload(w.data);
115276
+ (C) => {
115277
+ v.value = jt(C);
115278
+ const x = ["http://", "https://", void 0];
115279
+ !C.path && !C.dsKey && !v.value.dataUrl && !(typeof C == "string" && x.some((S) => C.includes(S))) && v.value.loadStaticData(C), (typeof C == "string" || C.path) && v.value.reload(C.data);
115263
115280
  },
115264
115281
  {
115265
115282
  deep: !0
115266
115283
  }
115267
115284
  ), ke(
115268
115285
  () => n["gui-theme"],
115269
- async (w) => {
115270
- h.value = null, xe(async () => {
115271
- i++, h.value = jt(o.dbOptions.data), g(h.value.data), h.value.on("load", (C) => {
115272
- g(C);
115286
+ async (C) => {
115287
+ v.value = null, xe(async () => {
115288
+ i++, v.value = jt(o.dbOptions.data), m(v.value.data), v.value.on("load", (x) => {
115289
+ m(x);
115273
115290
  });
115274
115291
  });
115275
115292
  },
115276
115293
  { deep: !0 }
115277
115294
  ), xe(async () => {
115278
- h.value = jt(o.dbOptions.data), h.value.on("load", (w) => {
115279
- g(w);
115295
+ v.value = jt(o.dbOptions.data), v.value.on("load", (C) => {
115296
+ m(C);
115280
115297
  });
115281
115298
  }), t({
115282
115299
  props: o
115283
115300
  });
115284
- const _ = (w) => {
115285
- a("chart-click", w);
115301
+ const w = (C) => {
115302
+ a("chart-click", C);
115286
115303
  };
115287
- return (w, C) => {
115288
- const x = vt("g-chart");
115304
+ return (C, x) => {
115305
+ const S = vt("g-chart");
115289
115306
  return D(), V("div", {
115290
115307
  class: K(["g-pie-level", l.value])
115291
115308
  }, [
115292
- (D(), Te(x, Pt({ options: c.value }, w.$attrs, {
115309
+ (D(), Te(S, Pt({ options: c.value }, C.$attrs, {
115293
115310
  ref_key: "pieChartRef",
115294
115311
  ref: u,
115295
115312
  isEmpty: s.value,
115296
115313
  description: e.description,
115297
- onClick: _,
115314
+ onClick: w,
115298
115315
  key: b(i)
115299
115316
  }), null, 16, ["options", "isEmpty", "description"]))
115300
115317
  ], 2);
115301
115318
  };
115302
115319
  }
115303
- }), M8t = /* @__PURE__ */ Qn(A8t, [["__scopeId", "data-v-dad75516"]]), k8t = tr(M8t), D8t = { class: "g-calendar" }, O8t = { class: "g-calendar-header" }, I8t = { class: "switch-box" }, L8t = { class: "switch-box1" }, R8t = { class: "switch-box2" }, P8t = {
115320
+ }), M8t = /* @__PURE__ */ Qn(A8t, [["__scopeId", "data-v-5b1d7bcd"]]), k8t = tr(M8t), D8t = { class: "g-calendar" }, O8t = { class: "g-calendar-header" }, I8t = { class: "switch-box" }, L8t = { class: "switch-box1" }, R8t = { class: "switch-box2" }, P8t = {
115304
115321
  key: 0,
115305
115322
  class: "todoList"
115306
115323
  }, N8t = { class: "popover-inbox" }, $8t = ["onClick"], V8t = {
Binary file