@zy-frontend/business 1.1.10 → 1.1.11

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.
Files changed (2) hide show
  1. package/dist/index.es.js +48 -48
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getCurrentInstance as nl, inject as Ne, provide as ot, reactive as mt, defineComponent as M, renderSlot as Ae, ref as _, watch as Te, onBeforeUnmount as Pt, shallowRef as Cl, computed as Q, onMounted as xe, openBlock as u, createElementBlock as k, normalizeStyle as je, normalizeClass as ye, unref as v, createCommentVNode as te, Fragment as G, createElementVNode as I, withModifiers as it, createBlock as D, resolveDynamicComponent as sl, renderList as Z, withCtx as x, createVNode as N, createTextVNode as le, toDisplayString as J, toRefs as ba, withDirectives as Je, withKeys as jt, useModel as he, mergeModels as ce, useAttrs as tt, normalizeProps as Ke, guardReactiveProps as $e, toRaw as nt, mergeProps as Ee, useTemplateRef as Ye, nextTick as Qe, resolveComponent as Ql, useSlots as Yt, createSlots as Lt, h as Sa, vShow as Nt, watchEffect as Aa, onUnmounted as Il } from "vue";
1
+ import { getCurrentInstance as nl, inject as Ne, provide as ot, reactive as mt, defineComponent as M, renderSlot as Ae, ref as _, watch as Ve, onBeforeUnmount as Pt, shallowRef as Cl, computed as Q, onMounted as xe, openBlock as u, createElementBlock as k, normalizeStyle as je, normalizeClass as ye, unref as v, createCommentVNode as te, Fragment as G, createElementVNode as I, withModifiers as it, createBlock as D, resolveDynamicComponent as sl, renderList as Z, withCtx as x, createVNode as N, createTextVNode as le, toDisplayString as J, toRefs as ba, withDirectives as Je, withKeys as jt, useModel as he, mergeModels as ce, useAttrs as tt, normalizeProps as Ke, guardReactiveProps as $e, toRaw as nt, mergeProps as Ee, useTemplateRef as Ye, nextTick as Qe, resolveComponent as Ql, useSlots as Yt, createSlots as Lt, h as Sa, vShow as Nt, watchEffect as Aa, onUnmounted as Il } from "vue";
2
2
  import { ArrowLeft as Ca, ArrowUp as Wl, ArrowRight as ka, ArrowDown as Zl, Minus as Va, Files as Ta, Plus as Ea, More as za, Search as kl, QuestionFilled as vl, FullScreen as Ia, Download as wa, PieChart as Ra, Switch as xa, Memo as Oa, DCaret as Na, Close as Xl, Edit as wl, Loading as Xt, Setting as _a } from "@element-plus/icons-vue";
3
3
  import { ElTooltip as ct, ElButton as fe, ElDropdown as Da, ElIcon as Fe, ElDropdownMenu as La, ElDropdownItem as Ua, ElInput as pt, ElTag as Tt, vLoading as gt, ElAutocomplete as Hl, ElSelect as bt, ElOption as St, ElDatePicker as ft, ElInputNumber as Dt, ElCheckbox as Ut, ElDrawer as fl, ElTableColumn as vt, ElTable as tl, ElPagination as Pa, ElMessageBox as Jl, ElMessage as et, ElPopconfirm as $l, ElDialog as qt, ElRadioGroup as rl, ElRadioButton as hl, ElTreeV2 as Ma, ElLink as ea, ElRadio as Kt, ElTabs as ta, ElTabPane as la, ElCheckboxGroup as Ba } from "element-plus";
4
4
  import { debounce as Vl, throttle as aa, cloneDeep as st, get as Rl } from "lodash-es";
@@ -117,7 +117,7 @@ function Qa(e) {
117
117
  const o = s.getBoundingClientRect();
118
118
  c.value = o.width, t.value = o.height;
119
119
  };
120
- return Te(e, (s) => {
120
+ return Ve(e, (s) => {
121
121
  s ? a(s) : n();
122
122
  }, { immediate: !0, flush: "post" }), Pt(n), { width: c, height: t };
123
123
  }
@@ -174,7 +174,7 @@ function Wa(e) {
174
174
  for (const Ie of ne) ee[Ie] = X;
175
175
  return ee;
176
176
  }
177
- const se = new Array(F).fill(NaN), H = new Array(F).fill(0), ie = new Array(F).fill(Number.POSITIVE_INFINITY), Ve = [];
177
+ const se = new Array(F).fill(NaN), H = new Array(F).fill(0), ie = new Array(F).fill(Number.POSITIVE_INFINITY), Te = [];
178
178
  for (const X of ne) {
179
179
  const Ie = y.value[X], Xe = U(Ie.min), pe = U(Ie.max), we = Number.isFinite(Xe) ? Math.max(0, Xe) : 0, dt = Number.isFinite(pe) ? Math.max(we, pe) : Number.POSITIVE_INFINITY;
180
180
  H[X] = we, ie[X] = dt;
@@ -185,14 +185,14 @@ function Wa(e) {
185
185
  const Zt = U(Ie.size);
186
186
  se[X] = Number.isFinite(Zt) ? Zt : we;
187
187
  } else
188
- Ve.push(X);
188
+ Te.push(X);
189
189
  }
190
- if (Ve.length > 0) {
190
+ if (Te.length > 0) {
191
191
  let X = 0;
192
192
  for (const pe of ne)
193
193
  Number.isNaN(se[pe]) || (X += se[pe]);
194
- const Xe = Math.max(0, K - X) / Ve.length;
195
- for (const pe of Ve) se[pe] = Xe;
194
+ const Xe = Math.max(0, K - X) / Te.length;
195
+ for (const pe of Te) se[pe] = Xe;
196
196
  }
197
197
  for (const X of ne)
198
198
  se[X] = Math.min(ie[X], Math.max(H[X], se[X]));
@@ -246,18 +246,18 @@ function Wa(e) {
246
246
  if (F === 0) return;
247
247
  if (m.value > 0)
248
248
  for (let H = 0; H < F; H++) {
249
- const ie = y.value[H], Ve = A(H), Me = R(H);
250
- Ve > Me && console.warn(
249
+ const ie = y.value[H], Te = A(H), Me = R(H);
250
+ Te > Me && console.warn(
251
251
  `[ZYSplitter] panel ${H}: min(${ie.min}) > max(${ie.max}),已按 max 收紧`
252
252
  );
253
253
  }
254
254
  if (m.value <= 0) {
255
255
  const H = h.value.slice(), ie = [];
256
- for (let Ve = 0; Ve < F; Ve++)
257
- S.value[Ve] ? H[Ve] = 0 : ie.push(Ve);
256
+ for (let Te = 0; Te < F; Te++)
257
+ S.value[Te] ? H[Te] = 0 : ie.push(Te);
258
258
  if (ie.length > 0) {
259
- const Ve = 100 / ie.length;
260
- for (const Me of ie) H[Me] = Ve;
259
+ const Te = 100 / ie.length;
260
+ for (const Me of ie) H[Me] = Te;
261
261
  }
262
262
  h.value = H;
263
263
  return;
@@ -281,7 +281,7 @@ function Wa(e) {
281
281
  }
282
282
  for (let H = 0; H < F; H++) {
283
283
  if (S.value[H]) continue;
284
- const ie = ee[H], Ve = A(H), Me = R(H), _e = Math.min(Ve, Me), Be = Math.max(Ve, Me);
284
+ const ie = ee[H], Te = A(H), Me = R(H), _e = Math.min(Te, Me), Be = Math.max(Te, Me);
285
285
  ie < _e ? ee[H] = _e : ie > Be && (ee[H] = Be);
286
286
  }
287
287
  let se = 0;
@@ -338,9 +338,9 @@ function Wa(e) {
338
338
  const ee = K / m.value * 100;
339
339
  ae(d.value, V, ee);
340
340
  }, ae = (F, K, ee) => {
341
- const ne = h.value.slice(), se = f[F] ?? 0, H = f[K] ?? 0, ie = A(F), Ve = R(F), Me = A(K), _e = R(K);
342
- let Be = Bt(se + ee, ie, Ve), X = H - (Be - se);
343
- X < Me ? (X = Me, Be = Bt(se + (H - Me), ie, Ve)) : X > _e && (X = _e, Be = Bt(se + (H - _e), ie, Ve)), ne[F] = Be, ne[K] = X, h.value = ne, yt(K);
341
+ const ne = h.value.slice(), se = f[F] ?? 0, H = f[K] ?? 0, ie = A(F), Te = R(F), Me = A(K), _e = R(K);
342
+ let Be = Bt(se + ee, ie, Te), X = H - (Be - se);
343
+ X < Me ? (X = Me, Be = Bt(se + (H - Me), ie, Te)) : X > _e && (X = _e, Be = Bt(se + (H - _e), ie, Te)), ne[F] = Be, ne[K] = X, h.value = ne, yt(K);
344
344
  }, Y = () => {
345
345
  if (!g.value) return;
346
346
  const F = d.value;
@@ -352,8 +352,8 @@ function Wa(e) {
352
352
  if (!K) return;
353
353
  const ee = S.value.slice(), ne = !ee[F], se = m.value;
354
354
  if (ne) {
355
- const Ve = Math.round((h.value[F] ?? 0) / 100 * se);
356
- C.set(K.id, Ve), ee[F] = !0, S.value = ee;
355
+ const Te = Math.round((h.value[F] ?? 0) / 100 * se);
356
+ C.set(K.id, Te), ee[F] = !0, S.value = ee;
357
357
  } else
358
358
  ee[F] = !1, S.value = ee, h.value = B(), C.delete(K.id);
359
359
  L();
@@ -416,12 +416,12 @@ function Wa(e) {
416
416
  }
417
417
  return K.join(" ");
418
418
  }), lt = _(!1);
419
- return Te(
419
+ return Ve(
420
420
  m,
421
421
  (F) => {
422
422
  F <= 0 || (lt.value || (lt.value = !0), h.value = B());
423
423
  }
424
- ), Te(
424
+ ), Ve(
425
425
  a,
426
426
  (F) => {
427
427
  if (!F || w) return;
@@ -434,7 +434,7 @@ function Wa(e) {
434
434
  h.value = ee.slice(0, K), L();
435
435
  },
436
436
  { deep: !0 }
437
- ), Te(
437
+ ), Ve(
438
438
  s,
439
439
  (F) => {
440
440
  if (!F || w) return;
@@ -597,7 +597,7 @@ const Xa = M({ name: "ZYSplitter" }), Ha = /* @__PURE__ */ M({
597
597
  }), Pt(() => {
598
598
  var A;
599
599
  l.value !== null && ((A = t.value) == null || A.unregisterPanel(l.value), l.value = null);
600
- }), Te(
600
+ }), Ve(
601
601
  () => [c.size, c.min, c.max, c.collapsible, c.resizable],
602
602
  () => {
603
603
  var A;
@@ -1803,7 +1803,7 @@ const Zo = { class: "zy-anchor-tab" }, Xo = {
1803
1803
  }
1804
1804
  }
1805
1805
  }, 100);
1806
- Te(s, S, { deep: !0 });
1806
+ Ve(s, S, { deep: !0 });
1807
1807
  const C = aa(() => {
1808
1808
  o.value || y();
1809
1809
  }, 500), z = Ye("tabList"), b = (d) => {
@@ -2228,9 +2228,9 @@ const Fl = (e, c, t) => {
2228
2228
  o.value = !1;
2229
2229
  }
2230
2230
  };
2231
- xe(() => {
2231
+ xe(async () => {
2232
2232
  var L, P;
2233
- m.prop = ((L = h.value.defaultSort) == null ? void 0 : L.prop) || "", m.order = ((P = h.value.defaultSort) == null ? void 0 : P.order) || "descending", a.getDataImmediately && p(g);
2233
+ m.prop = ((L = h.value.defaultSort) == null ? void 0 : L.prop) || "", m.order = ((P = h.value.defaultSort) == null ? void 0 : P.order) || "descending", a.getDataImmediately && await p(g), a.requestFn || Ve(s, () => p(g, !0), { deep: !0 });
2234
2234
  });
2235
2235
  const f = _(), V = (L = 10) => {
2236
2236
  var P;
@@ -2241,7 +2241,7 @@ const Fl = (e, c, t) => {
2241
2241
  }, O = async (L = {}, P = !0) => {
2242
2242
  await p(L, P);
2243
2243
  }, E = he(e, "selections");
2244
- Te(E, (L, P) => {
2244
+ Ve(E, (L, P) => {
2245
2245
  var j;
2246
2246
  h.value.rowKey && ((L == null ? void 0 : L.length) > 0 ? (P.forEach((q) => {
2247
2247
  var ve;
@@ -2991,7 +2991,7 @@ const Fl = (e, c, t) => {
2991
2991
  }, o(i.value), a.resize(U);
2992
2992
  }
2993
2993
  };
2994
- return Te(l, () => {
2994
+ return Ve(l, () => {
2995
2995
  a == null || a.dispatchAction({ type: "hideTip" });
2996
2996
  }), (S, C) => (u(), D(v(qt), {
2997
2997
  modelValue: l.value,
@@ -3203,7 +3203,7 @@ const ds = (e, c) => {
3203
3203
  setup(e) {
3204
3204
  const c = e, t = tt(), l = _(null), n = _(null), a = _(!1), s = _(!1);
3205
3205
  return xe(() => {
3206
- Te(
3206
+ Ve(
3207
3207
  () => c.content,
3208
3208
  async () => {
3209
3209
  var i, y;
@@ -3300,10 +3300,10 @@ const ds = (e, c) => {
3300
3300
  Y && (z.value === "auxiliary-chart" ? r == null || r.setOption(Y) : o == null || o.setOption(Y));
3301
3301
  }, C = () => {
3302
3302
  o == null || o.dispose(), o = null, r == null || r.dispose(), r = null;
3303
- }, z = _("chart"), b = _(!1), m = Q(() => z.value === "table"), d = _([]), g = mt({ columns: [], hasPagination: !1 }), p = Te(z, async (Y) => {
3303
+ }, z = _("chart"), b = _(!1), m = Q(() => z.value === "table"), d = _([]), g = mt({ columns: [], hasPagination: !1 }), p = Ve(z, async (Y) => {
3304
3304
  Y === "auxiliary-chart" && !r && (await Qe(), h(), p());
3305
3305
  }), f = _((ae = (T = l.charts) == null ? void 0 : T[0]) == null ? void 0 : ae.statCode), V = _({}), w = _(l.options), O = _(""), E = _(!1), A = _(!1), R = async (Y) => {
3306
- var W, Oe, Ue, Pe, qe, be, Ge, ke, oe, ze, yt, At, Ze, lt, F, K, ee, ne, se, H, ie, Ve, Me;
3306
+ var W, Oe, Ue, Pe, qe, be, Ge, ke, oe, ze, yt, At, Ze, lt, F, K, ee, ne, se, H, ie, Te, Me;
3307
3307
  try {
3308
3308
  E.value = !0;
3309
3309
  const _e = {
@@ -3340,7 +3340,7 @@ const ds = (e, c) => {
3340
3340
  formatter: (we, dt, Mt) => Mt ?? "--"
3341
3341
  })), d.value = Ie || [];
3342
3342
  const Xe = ((se = X == null ? void 0 : X["@data"]) == null ? void 0 : se.total) ?? ((H = X == null ? void 0 : X["@data"]) == null ? void 0 : H.avg) ?? ((ie = X == null ? void 0 : X["@data"]) == null ? void 0 : ie.value) ?? "";
3343
- O.value = Xe ? `${Xe}${((Me = (Ve = w.value) == null ? void 0 : Ve["@data"]) == null ? void 0 : Me.unit) ?? ""}` : "";
3343
+ O.value = Xe ? `${Xe}${((Me = (Te = w.value) == null ? void 0 : Te["@data"]) == null ? void 0 : Me.unit) ?? ""}` : "";
3344
3344
  } catch (_e) {
3345
3345
  A.value = !0, console.error(_e);
3346
3346
  } finally {
@@ -3642,7 +3642,7 @@ const ds = (e, c) => {
3642
3642
  var d;
3643
3643
  return ((d = l.chartListConfig) == null ? void 0 : d.layout) || {};
3644
3644
  }), r = _(0);
3645
- Te(s, () => r.value = 0);
3645
+ Ve(s, () => r.value = 0);
3646
3646
  const i = () => {
3647
3647
  var d;
3648
3648
  r.value++, r.value && r.value === ((d = s.value) == null ? void 0 : d.length) && n("mounted");
@@ -4715,7 +4715,7 @@ const sr = { class: "zy-gcs-score-table" }, rr = { class: "zy-gcs-score-table__h
4715
4715
  n.value = null, l("update:totalScore", 0);
4716
4716
  l("update:modelValue", a.value);
4717
4717
  };
4718
- return Te(
4718
+ return Ve(
4719
4719
  () => t.modelValue,
4720
4720
  (o) => {
4721
4721
  a.value = {
@@ -4982,7 +4982,7 @@ const sr = { class: "zy-gcs-score-table" }, rr = { class: "zy-gcs-score-table__h
4982
4982
  },
4983
4983
  setup(e) {
4984
4984
  const c = e, t = _({ score_31: "", score_12: "", score_13: "" });
4985
- return Te(
4985
+ return Ve(
4986
4986
  () => c.modelValue,
4987
4987
  (l) => {
4988
4988
  t.value = {
@@ -5292,14 +5292,14 @@ const Rr = { class: "zy-gcs-table" }, xr = { class: "zy-gcs-table__dialog-footer
5292
5292
  s.value = !1;
5293
5293
  }
5294
5294
  };
5295
- return Te(o, (B) => {
5295
+ return Ve(o, (B) => {
5296
5296
  var j;
5297
5297
  const [L, P] = B.split(".");
5298
5298
  if (P === "GCS_COUNT" || P === "RTS") {
5299
5299
  const q = P === "GCS_COUNT" ? "GCS" : "RTS", de = (j = l[L][q]) == null ? void 0 : j.selectedCodes;
5300
5300
  de ? C.value[L][q] = { ...de } : C.value[L][q] = { score_11: "", score_12: "", score_13: "" };
5301
5301
  }
5302
- }), Te(
5302
+ }), Ve(
5303
5303
  () => c.tab,
5304
5304
  (B) => {
5305
5305
  B && (o.value = B);
@@ -5824,7 +5824,7 @@ const Nr = { class: "zy-gcs-score-table" }, _r = { class: "zy-gcs-score-table__h
5824
5824
  }
5825
5825
  });
5826
5826
  const { scoreData: i, scaleDataLoaded: y } = Wt();
5827
- Te(
5827
+ Ve(
5828
5828
  () => i.scale_ais.code,
5829
5829
  (p) => {
5830
5830
  var f;
@@ -6527,12 +6527,12 @@ const zu = /* @__PURE__ */ M({
6527
6527
  const a = (r) => [Se.NUMBER, Se.NUMBER_INT].includes(r), s = (r) => [Se.DATE, Se.DATE_TIME].includes(r), o = async () => {
6528
6528
  await Qe(), n("change", t.value);
6529
6529
  };
6530
- return Te(
6530
+ return Ve(
6531
6531
  () => t.value.operator,
6532
6532
  (r) => {
6533
6533
  r === me.RANGE ? t.value.value = Array.isArray(t.value.value) ? t.value.value : [] : r === me.EXISTS || a(l.dataType) ? t.value.value = void 0 : t.value.value = "";
6534
6534
  }
6535
- ), Te(
6535
+ ), Ve(
6536
6536
  () => t.value.value,
6537
6537
  (r) => {
6538
6538
  r === void 0 && (t.value.operator === me.RANGE ? t.value.value = [] : t.value.operator !== me.EXISTS && !a(l.dataType) && (t.value.value = ""));
@@ -6837,12 +6837,12 @@ const Pu = /* @__PURE__ */ _u(Uu), Mu = /* @__PURE__ */ M({
6837
6837
  }
6838
6838
  }
6839
6839
  ] : []);
6840
- return Te(
6840
+ return Ve(
6841
6841
  () => t.value.timeType,
6842
6842
  () => {
6843
6843
  t.value.value = [];
6844
6844
  }
6845
- ), Te(
6845
+ ), Ve(
6846
6846
  () => t.value.value,
6847
6847
  (o) => {
6848
6848
  o || (t.value.value = []);
@@ -7179,12 +7179,12 @@ const Pu = /* @__PURE__ */ _u(Uu), Mu = /* @__PURE__ */ M({
7179
7179
  emits: /* @__PURE__ */ ce(["change"], ["update:modelValue"]),
7180
7180
  setup(e, { emit: c }) {
7181
7181
  const t = he(e, "modelValue"), l = e, n = c, a = tt(), { getDataStructure: s } = wt(), o = _(l.options);
7182
- Te(
7182
+ Ve(
7183
7183
  () => l.options,
7184
7184
  (m) => {
7185
7185
  o.value = m;
7186
7186
  }
7187
- ), Te(
7187
+ ), Ve(
7188
7188
  o,
7189
7189
  (m) => {
7190
7190
  var d;
@@ -7313,7 +7313,7 @@ const Pu = /* @__PURE__ */ _u(Uu), Mu = /* @__PURE__ */ M({
7313
7313
  var o;
7314
7314
  return (o = l.pickerType) == null ? void 0 : o.replace("range", "");
7315
7315
  });
7316
- Te(
7316
+ Ve(
7317
7317
  () => t.value.value,
7318
7318
  (o) => {
7319
7319
  !o && t.value.operator === me.RANGE && (t.value.value = []);
@@ -7655,7 +7655,7 @@ const fi = { class: "zy-search-form__inner" }, mi = M({ name: "ZYSearchForm" }),
7655
7655
  const b = () => {
7656
7656
  z = st(n.defaultFormData ?? s.value);
7657
7657
  };
7658
- Te(
7658
+ Ve(
7659
7659
  C,
7660
7660
  async (re) => {
7661
7661
  re != null && re.length && (!n.items || Object.keys(s.value).length === 0) && (s.value = re.reduce(($, ue) => {
@@ -7727,7 +7727,7 @@ const fi = { class: "zy-search-form__inner" }, mi = M({ name: "ZYSearchForm" }),
7727
7727
  E.value && j.observe(E.value);
7728
7728
  }), Il(() => {
7729
7729
  j.disconnect();
7730
- }), Te(
7730
+ }), Ve(
7731
7731
  C,
7732
7732
  () => {
7733
7733
  P();
@@ -7743,7 +7743,7 @@ const fi = { class: "zy-search-form__inner" }, mi = M({ name: "ZYSearchForm" }),
7743
7743
  (re, $) => !n.showAll || q.value ? $ <= U.value : !0
7744
7744
  )
7745
7745
  );
7746
- Te(
7746
+ Ve(
7747
7747
  () => n.items,
7748
7748
  async (re) => {
7749
7749
  o.value = re ?? [], await Qe(), P();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zy-frontend/business",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",