@yxhl/specter-pui-vtk 1.0.21 → 1.0.23

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.
@@ -32,7 +32,7 @@ const me = Nt("message", {
32
32
  title: "",
33
33
  text: "",
34
34
  color: "",
35
- width: 500,
35
+ width: 400,
36
36
  cancelText: "取消",
37
37
  confirmText: "确定"
38
38
  }
@@ -86,7 +86,7 @@ const me = Nt("message", {
86
86
  });
87
87
  }
88
88
  }
89
- }), H = {
89
+ }), G = {
90
90
  // 显示 alert
91
91
  alert(e) {
92
92
  me().show("alert", e);
@@ -130,14 +130,20 @@ const me = Nt("message", {
130
130
  });
131
131
  ke.interceptors.request.use(
132
132
  (e) => (se.get("token") && (e.headers["X-Token"] = "1b0679be72ad976ad5d491ad57a5eec0", e.headers.Authorization = "Bearer " + se.get("token")), e),
133
- (e) => (H.toast(e.message || "请求错误"), Promise.reject(e))
133
+ (e) => (G.toast(e.message || "请求错误"), Promise.reject(e))
134
134
  );
135
135
  ke.interceptors.response.use(
136
136
  (e) => {
137
137
  let t = e.data, n = e.headers["content-disposition"];
138
- return n != null && n.split(";")[0] == "attachment" && (t = e), console.log("-----"), e.status !== 200 ? (H.toast(t.message || "请求失败"), Promise.reject(new Error(t.message || "请求失败"))) : (console.log("res", t), console.log("res.meta.message", t.meta.message), console.log("Message", H), console.log("Message.confirm", H.confirm), !(t.meta && !t.meta.success && t.meta.message == "specter_authorize_exception") || H.confirm("对不起,您的登录信息过期!", () => window.open("about:blank", "_self").close()), Promise.resolve(t));
138
+ return n != null && n.split(";")[0] == "attachment" && (t = e), e.status !== 200 ? (G.toast(t.message || "请求失败", { color: "error" }), Promise.reject(new Error(t.message || "请求失败"))) : (t.meta && !t.meta.success && t.meta.message === "specter_authorize_exception" && G.confirm({
139
+ title: "提示",
140
+ text: "对不起,您的登录信息过期!",
141
+ onConfirm: () => {
142
+ window.open("about:blank", "_self").close();
143
+ }
144
+ }), Promise.resolve(t));
139
145
  },
140
- (e) => (console.log("err" + e), H.toast(e.message || "网络错误"), Promise.reject(e))
146
+ (e) => (console.log("err" + e), G.toast(e.message || "网络错误", { color: "error" }), Promise.reject(e))
141
147
  );
142
148
  const Y = {};
143
149
  Y.http = (e, t = {}, n = "GET", l = { "content-type": "application/x-www-form-urlencoded" }, i = null) => l["content-type"] === "application/x-www-form-urlencoded" ? ke({ url: e, params: t, method: n, headers: l, responseType: i }) : ke({ url: e, data: t, method: n, headers: l, responseType: i });
@@ -803,15 +809,15 @@ const Z = (e, t) => {
803
809
  return h(), I("div", Wt, [
804
810
  a(q, {
805
811
  modelValue: d.value,
806
- "onUpdate:modelValue": x[3] || (x[3] = (Q) => d.value = Q),
812
+ "onUpdate:modelValue": x[3] || (x[3] = (H) => d.value = H),
807
813
  "close-on-content-click": !1,
808
814
  transition: "scale-transition",
809
815
  "offset-y": "",
810
816
  "min-width": "auto",
811
817
  eager: ""
812
818
  }, {
813
- activator: o(({ props: Q }) => [
814
- a(N, ne({ ...Q, ...g.value }, {
819
+ activator: o(({ props: H }) => [
820
+ a(N, ne({ ...H, ...g.value }, {
815
821
  modelValue: k.value,
816
822
  "onUpdate:modelValue": x[0] || (x[0] = (ue) => k.value = ue),
817
823
  placeholder: e.placeholder,
@@ -842,7 +848,7 @@ const Z = (e, t) => {
842
848
  a(M, {
843
849
  modelValue: C.value,
844
850
  "onUpdate:modelValue": [
845
- x[1] || (x[1] = (Q) => C.value = Q),
851
+ x[1] || (x[1] = (H) => C.value = H),
846
852
  $
847
853
  ],
848
854
  "hide-header": "",
@@ -854,7 +860,7 @@ const Z = (e, t) => {
854
860
  a(M, {
855
861
  modelValue: w.value,
856
862
  "onUpdate:modelValue": [
857
- x[2] || (x[2] = (Q) => w.value = Q),
863
+ x[2] || (x[2] = (H) => w.value = H),
858
864
  O
859
865
  ],
860
866
  "hide-header": "",
@@ -1614,7 +1620,7 @@ const Z = (e, t) => {
1614
1620
  return Oe(() => {
1615
1621
  w = null;
1616
1622
  }), (b, p) => {
1617
- const f = c("VIcon"), x = c("VCardTitle"), P = c("v-card-subtitle"), N = c("VCard"), M = c("VBtn"), j = c("v-toolbar-title"), D = c("VSpacer"), R = c("v-toolbar-items"), L = c("v-toolbar"), F = c("VCol"), J = c("VSlider"), q = c("VRow"), Q = c("v-progress-circular"), ue = c("VDialog");
1623
+ const f = c("VIcon"), x = c("VCardTitle"), P = c("v-card-subtitle"), N = c("VCard"), M = c("VBtn"), j = c("v-toolbar-title"), D = c("VSpacer"), R = c("v-toolbar-items"), L = c("v-toolbar"), F = c("VCol"), J = c("VSlider"), q = c("VRow"), H = c("v-progress-circular"), ue = c("VDialog");
1618
1624
  return h(), I("div", ya, [
1619
1625
  a(N, {
1620
1626
  class: K(["vtk-pdf-card", { "vtk-pdf-card--preview": e.preview }]),
@@ -1798,7 +1804,7 @@ const Z = (e, t) => {
1798
1804
  })
1799
1805
  ])) : z("", !0),
1800
1806
  l.value ? (h(), I("div", wa, [
1801
- a(Q, {
1807
+ a(H, {
1802
1808
  indeterminate: "",
1803
1809
  color: "red"
1804
1810
  }),
@@ -1830,13 +1836,13 @@ function Sa(e = {}) {
1830
1836
  }, u = () => {
1831
1837
  var R, L;
1832
1838
  if (!v.list) {
1833
- H.toast("请先设置url.list属性", { color: "warning" });
1839
+ G.toast("请先设置url.list属性", { color: "warning" });
1834
1840
  return;
1835
1841
  }
1836
1842
  const D = r();
1837
1843
  l.value = !0, (L = (R = window.$vtk) == null ? void 0 : R.message) != null && L.loading && window.$vtk.message.loading.show(), Y.postJson(v.list, D).then((F) => {
1838
- var J, q, Q;
1839
- (q = (J = window.$vtk) == null ? void 0 : J.message) != null && q.loading && window.$vtk.message.loading.hide(), (F.meta.success || F.data) && (n.value = ((Q = F.data) == null ? void 0 : Q.rows) || [], m.value = F.data, C.value = F.data.sumup ? F.data.sumup : {}, w.value = F.data), l.value = !1;
1844
+ var J, q, H;
1845
+ (q = (J = window.$vtk) == null ? void 0 : J.message) != null && q.loading && window.$vtk.message.loading.hide(), (F.meta.success || F.data) && (n.value = ((H = F.data) == null ? void 0 : H.rows) || [], m.value = F.data, C.value = F.data.sumup ? F.data.sumup : {}, w.value = F.data), l.value = !1;
1840
1846
  }).catch((F) => {
1841
1847
  var J, q;
1842
1848
  console.error("加载页面数据失败:", F), l.value = !1, (q = (J = window.$vtk) == null ? void 0 : J.message) != null && q.loading && window.$vtk.message.loading.hide();
@@ -1866,32 +1872,32 @@ function Sa(e = {}) {
1866
1872
  },
1867
1873
  deleteItem: (D, R) => {
1868
1874
  if (!v.delete) {
1869
- H.toast("请设置url.delete属性!", { color: "warning" });
1875
+ G.toast("请设置url.delete属性!", { color: "warning" });
1870
1876
  return;
1871
1877
  }
1872
- H.confirm(
1878
+ G.confirm(
1873
1879
  { title: "确认删除", text: R || "是否删除?" },
1874
1880
  (L) => {
1875
1881
  L && Y.getForm(v.delete, { id: D }).then((F) => {
1876
- F.meta.success ? (H.toast("删除成功", { color: "success" }), u()) : H.toast("删除失败", { color: "warning" });
1882
+ F.meta.success ? (G.toast("删除成功", { color: "success" }), u()) : G.toast("删除失败", { color: "warning" });
1877
1883
  }).catch((F) => {
1878
- console.error("删除失败:", F), H.toast("删除失败", { color: "warning" });
1884
+ console.error("删除失败:", F), G.toast("删除失败", { color: "warning" });
1879
1885
  });
1880
1886
  }
1881
1887
  );
1882
1888
  },
1883
1889
  copyItem: (D, R) => {
1884
1890
  if (!v.copy) {
1885
- H.toast("请设置url.copy!", { color: "warning" });
1891
+ G.toast("请设置url.copy!", { color: "warning" });
1886
1892
  return;
1887
1893
  }
1888
- H.confirm(
1894
+ G.confirm(
1889
1895
  { title: "拷贝", text: R || "是否确认拷贝当前数据?" },
1890
1896
  (L) => {
1891
1897
  L && Y.getForm(v.copy, { id: D }).then((F) => {
1892
- F.meta.success ? (H.toast("拷贝成功", { color: "success" }), u()) : H.toast("拷贝失败", { color: "warning" });
1898
+ F.meta.success ? (G.toast("拷贝成功", { color: "success" }), u()) : G.toast("拷贝失败", { color: "warning" });
1893
1899
  }).catch((F) => {
1894
- console.error("拷贝失败:", F), H.toast("拷贝失败", { color: "warning" });
1900
+ console.error("拷贝失败:", F), G.toast("拷贝失败", { color: "warning" });
1895
1901
  });
1896
1902
  }
1897
1903
  );
@@ -1912,10 +1918,10 @@ function Sa(e = {}) {
1912
1918
  Y.exp(v.exp, D).then((F) => {
1913
1919
  var J, q;
1914
1920
  if ((q = (J = window.$vtk) == null ? void 0 : J.message) != null && q.loading && window.$vtk.message.loading.hide(), F) {
1915
- const Q = F.headers["content-disposition"], ue = decodeURI(
1916
- Q.substring(
1917
- Q.indexOf("filename=") + 9,
1918
- Q.length
1921
+ const H = F.headers["content-disposition"], ue = decodeURI(
1922
+ H.substring(
1923
+ H.indexOf("filename=") + 9,
1924
+ H.length
1919
1925
  )
1920
1926
  ), oe = new Blob([F.data], {
1921
1927
  type: "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@@ -1998,10 +2004,10 @@ const $a = { key: 0 }, Ca = {
1998
2004
  P.value = T ? j.value : [];
1999
2005
  }, q = () => {
2000
2006
  var T;
2001
- b.value = "", p.value = !1, v.value = Q(), $.value = [], (T = v.value.permits) == null || T.forEach((s) => {
2007
+ b.value = "", p.value = !1, v.value = H(), $.value = [], (T = v.value.permits) == null || T.forEach((s) => {
2002
2008
  s.permNkey.includes("biz_type") ? ($.value.push(s), b.value = b.value + s.permNkey.slice(9) + ",") : s.permNkey == "btn_expo" && (p.value = !0);
2003
2009
  }), g.bizType = b.value, ue();
2004
- }, Q = () => {
2010
+ }, H = () => {
2005
2011
  var T, s;
2006
2012
  try {
2007
2013
  return ((s = (T = window.$vtk) == null ? void 0 : T.storage) == null ? void 0 : s.get("user")) || {};
@@ -2243,7 +2249,7 @@ const $a = { key: 0 }, Ca = {
2243
2249
  a(Te, {
2244
2250
  "onUpdate:modelValue": [
2245
2251
  J,
2246
- s[2] || (s[2] = (G) => M.value = G)
2252
+ s[2] || (s[2] = (X) => M.value = X)
2247
2253
  ],
2248
2254
  modelValue: M.value,
2249
2255
  class: "mt-n1",
@@ -2269,12 +2275,12 @@ const $a = { key: 0 }, Ca = {
2269
2275
  _: 1
2270
2276
  }),
2271
2277
  ((_ = N.value) == null ? void 0 : _.length) > 0 ? (h(), I("p", Ca, [
2272
- (h(!0), I(de, null, ce(N.value, (G, je) => (h(), E(Te, {
2278
+ (h(!0), I(de, null, ce(N.value, (X, je) => (h(), E(Te, {
2273
2279
  key: je,
2274
2280
  modelValue: P.value,
2275
2281
  "onUpdate:modelValue": s[3] || (s[3] = (Ct) => P.value = Ct),
2276
- label: G.label,
2277
- value: { name: G.name, valu: `${G.label}${G.valu && G.valu.includes("/") && G.valu.includes(":") ? `(${G.valu})` : ""}` },
2282
+ label: X.label,
2283
+ value: { name: X.name, valu: `${X.label}${X.valu && X.valu.includes("/") && X.valu.includes(":") ? `(${X.valu})` : ""}` },
2278
2284
  class: "mt-2",
2279
2285
  multiple: "",
2280
2286
  "hide-details": ""
@@ -2412,7 +2418,7 @@ const $a = { key: 0 }, Ca = {
2412
2418
  activator: o(({ props: _ }) => [
2413
2419
  a($e, ne({
2414
2420
  modelValue: B(g).servFtime0,
2415
- "onUpdate:modelValue": s[8] || (s[8] = (G) => B(g).servFtime0 = G),
2421
+ "onUpdate:modelValue": s[8] || (s[8] = (X) => B(g).servFtime0 = X),
2416
2422
  placeholder: "开始时间",
2417
2423
  "persistent-hint": "",
2418
2424
  "append-icon": "mdi-calendar",
@@ -2450,7 +2456,7 @@ const $a = { key: 0 }, Ca = {
2450
2456
  activator: o(({ props: _ }) => [
2451
2457
  a($e, ne({
2452
2458
  modelValue: B(g).servFtime1,
2453
- "onUpdate:modelValue": s[12] || (s[12] = (G) => B(g).servFtime1 = G),
2459
+ "onUpdate:modelValue": s[12] || (s[12] = (X) => B(g).servFtime1 = X),
2454
2460
  placeholder: "结束时间",
2455
2461
  "persistent-hint": "",
2456
2462
  "append-icon": "mdi-calendar",
@@ -2509,7 +2515,7 @@ const $a = { key: 0 }, Ca = {
2509
2515
  "item.objsName": o(({ item: _ }) => [
2510
2516
  V("div", {
2511
2517
  class: "py-3",
2512
- onClick: (G) => ie(_)
2518
+ onClick: (X) => ie(_)
2513
2519
  }, [
2514
2520
  V("p", ja, [
2515
2521
  y(U(_.objsName), 1),
@@ -2595,9 +2601,9 @@ const $a = { key: 0 }, Ca = {
2595
2601
  ], 8, Da)
2596
2602
  ]),
2597
2603
  "item.actions": o(({ item: _ }) => {
2598
- var G;
2604
+ var X;
2599
2605
  return [
2600
- _.state != 0 && ((G = v.value.areacode) == null ? void 0 : G.length) == 6 && _.servState == "1" ? (h(), I("a", {
2606
+ _.state != 0 && ((X = v.value.areacode) == null ? void 0 : X.length) == 6 && _.servState == "1" ? (h(), I("a", {
2601
2607
  key: 0,
2602
2608
  onClick: (je) => ot(_),
2603
2609
  class: "text-error",
@@ -3153,7 +3159,7 @@ const nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3153
3159
  lighten4: "#ffecb3",
3154
3160
  darken1: "#ffb300",
3155
3161
  accent2: "#ffd740"
3156
- }, X = {
3162
+ }, Q = {
3157
3163
  red: ol,
3158
3164
  pink: sl,
3159
3165
  purple: rl,
@@ -3165,60 +3171,60 @@ const nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3165
3171
  name: "Blue-light",
3166
3172
  scheme: "md-blue-500-scheme",
3167
3173
  dark: !0,
3168
- primary: X.blue.base,
3169
- secondary: X.blue.lighten4,
3174
+ primary: Q.blue.base,
3175
+ secondary: Q.blue.lighten4,
3170
3176
  // #FFCDD2
3171
- accent: X.blue.accent2
3177
+ accent: Q.blue.accent2
3172
3178
  // #3F51B5
3173
3179
  },
3174
3180
  {
3175
3181
  name: "Yellow-light",
3176
3182
  scheme: "md-amber-a700-scheme",
3177
3183
  dark: !0,
3178
- primary: X.amber.darken1,
3179
- secondary: X.amber.lighten4,
3184
+ primary: Q.amber.darken1,
3185
+ secondary: Q.amber.lighten4,
3180
3186
  // #FFCDD2
3181
- accent: X.amber.accent2
3187
+ accent: Q.amber.accent2
3182
3188
  // #3F51B5
3183
3189
  },
3184
3190
  {
3185
3191
  name: "Red-light",
3186
3192
  scheme: "md-red-a400-scheme",
3187
3193
  dark: !0,
3188
- primary: X.red.accent3,
3189
- secondary: X.red.lighten4,
3194
+ primary: Q.red.accent3,
3195
+ secondary: Q.red.lighten4,
3190
3196
  // #FFCDD2
3191
- accent: X.red.accent2
3197
+ accent: Q.red.accent2
3192
3198
  // #3F51B5
3193
3199
  },
3194
3200
  {
3195
3201
  name: "Pink-light",
3196
3202
  dark: !1,
3197
3203
  scheme: "md-pink-a100-scheme",
3198
- primary: X.pink.accent1,
3199
- secondary: X.pink.lighten4,
3204
+ primary: Q.pink.accent1,
3205
+ secondary: Q.pink.lighten4,
3200
3206
  // #FFCDD2
3201
- accent: X.pink.accent2
3207
+ accent: Q.pink.accent2
3202
3208
  // #3F51B5
3203
3209
  },
3204
3210
  {
3205
3211
  name: "Purple-light",
3206
3212
  dark: !1,
3207
3213
  scheme: "md-purple-a700-scheme",
3208
- primary: X.purple.accent4,
3209
- secondary: X.purple.lighten4,
3214
+ primary: Q.purple.accent4,
3215
+ secondary: Q.purple.lighten4,
3210
3216
  // #FFCDD2
3211
- accent: X.purple.accent2
3217
+ accent: Q.purple.accent2
3212
3218
  // #3F51B5
3213
3219
  },
3214
3220
  {
3215
3221
  name: "DeepPurple-light",
3216
3222
  dark: !1,
3217
3223
  scheme: "md-deep-purple-a700-scheme",
3218
- primary: X.deepPurple.base,
3219
- secondary: X.deepPurple.lighten4,
3224
+ primary: Q.deepPurple.base,
3225
+ secondary: Q.deepPurple.lighten4,
3220
3226
  // #FFCDD2
3221
- accent: X.deepPurple.accent2
3227
+ accent: Q.deepPurple.accent2
3222
3228
  // #3F51B5
3223
3229
  }
3224
3230
  ], ml = [
@@ -3391,7 +3397,7 @@ function fl(e, t = {}) {
3391
3397
  return Object.keys(n).forEach((l) => {
3392
3398
  e.component(l, n[l]);
3393
3399
  }), e.config.globalProperties.$vtk = {
3394
- message: H,
3400
+ message: G,
3395
3401
  request: Y,
3396
3402
  storage: se,
3397
3403
  themes: et,
@@ -3430,7 +3436,7 @@ const yl = {
3430
3436
  request: Y,
3431
3437
  storage: se,
3432
3438
  themes: et,
3433
- vtkMessage: H
3439
+ vtkMessage: G
3434
3440
  };
3435
3441
  export {
3436
3442
  Me as VtkArea,
@@ -3464,6 +3470,6 @@ export {
3464
3470
  et as themes,
3465
3471
  Za as txt,
3466
3472
  Sa as useMixins,
3467
- H as vtkMessage
3473
+ G as vtkMessage
3468
3474
  };
3469
3475
  //# sourceMappingURL=specter-pui.es.js.map