xyvcard-live 0.0.41 → 0.0.43

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 (44) hide show
  1. package/README.md +51 -51
  2. package/dist/{add-PMbsbYr7.mjs → add-DFGDi0Vg.mjs} +27 -27
  3. package/dist/{index-1d8eRvsu-DbHYko8x-Bz76msZE.mjs → index-1d8eRvsu-CDo45zu5-CsTmnsmt.mjs} +1 -1
  4. package/dist/index-20SqsuLj-D6rbKOdi.mjs +204 -0
  5. package/dist/{index-_oL7mKsC.mjs → index-8KeVC5e8.mjs} +1 -1
  6. package/dist/index-B8HpQzMQ.mjs +8836 -0
  7. package/dist/{index-6f7cLh2u.mjs → index-BkWF0nmT.mjs} +25 -25
  8. package/dist/{index-BQFY_ZxW.mjs → index-C-HV1ZMJ.mjs} +47 -47
  9. package/dist/{index-Df7dbxmA.mjs → index-CES9VMga.mjs} +55 -55
  10. package/dist/{index-CJQ1nVj2-C9QKucbZ.mjs → index-CJQ1nVj2-HyCzS3NN.mjs} +1 -1
  11. package/dist/{index-9vTDJYng.mjs → index-DKtXNGRy.mjs} +2 -2
  12. package/dist/{index-KMVMe9ZJ-DMxRp90C.mjs → index-KMVMe9ZJ-r3RYv7wT.mjs} +1 -1
  13. package/dist/{index-KMVMe9ZJ-CbtOZB8h-CP4sTqMz.mjs → index-KMVMe9ZJ-wLdIEZoL-D7myUa9W.mjs} +22 -22
  14. package/dist/index-U1tRyQaA.mjs +3396 -0
  15. package/dist/{index-CzTYlYAS.mjs → index-X8C0nzWy.mjs} +1 -1
  16. package/dist/{index-BBVak6xM.mjs → index-hvh-AeP1.mjs} +23 -23
  17. package/dist/index.mjs +1 -1
  18. package/dist/{index.vue_vue_type_script_setup_true_lang-dlUf1RQb.mjs → index.vue_vue_type_script_setup_true_lang-CTz0JhjX.mjs} +34 -34
  19. package/dist/{info-ByXTOGCn-B0gzq8-u-CpmHA0D8.mjs → info-ByXTOGCn-CKowqnwe-auS1BWSi.mjs} +18 -18
  20. package/dist/{info-ByXTOGCn-DYazInZ_.mjs → info-ByXTOGCn-M6DeTywG.mjs} +2 -2
  21. package/dist/{info-C_OAyZk9-BHxczpO0-CIGqzbWY.mjs → info-C_OAyZk9-ClYndPiK-CmGmN1Qo.mjs} +5 -5
  22. package/dist/{info-C_OAyZk9-DTwjYo3a.mjs → info-C_OAyZk9-DQYZgS6H.mjs} +2 -2
  23. package/dist/{info-igphSuN3.mjs → info-D5NyAWqo.mjs} +7 -7
  24. package/dist/info-DmaEQ7Rn-BazrtUTe.mjs +4946 -0
  25. package/dist/{info-ZydxPcdx-B0fiHL8E.mjs → info-ZydxPcdx-CFHEqQW8.mjs} +2 -2
  26. package/dist/{info-ZydxPcdx-Cs2desmS-DGhgIWcs.mjs → info-ZydxPcdx-rJDqppUm-BvezwIgX.mjs} +16 -16
  27. package/dist/{lives-CwuqRCgi.mjs → lives-BFFDkXyQ.mjs} +10 -10
  28. package/dist/{region-CBNaSyY1.mjs → region-B-uS64XY.mjs} +1 -1
  29. package/dist/{region.vue_vue_type_script_setup_true_lang-DNxvkQIN.mjs → region.vue_vue_type_script_setup_true_lang-2dvrKvEk.mjs} +6 -6
  30. package/dist/{statistics-njbs29dX.mjs → statistics-CKNzOUxs.mjs} +6 -6
  31. package/dist/style.css +1 -1
  32. package/dist/{transcoding-CbSyHWq6.mjs → transcoding-mFEy10QF.mjs} +15 -15
  33. package/dts/src/views/live/zb-live-video/lives.vue.d.ts +2 -2
  34. package/dts/src/views/live/zb-live-videoList/edit.vue.d.ts +1 -1
  35. package/dts/src/views/live/zb-live-videoList/transcoding.vue.d.ts +1 -1
  36. package/package.json +8 -10
  37. package/dist/index-BkvSVG-J.mjs +0 -49101
  38. package/dist/index-DC5UaXje-BABgUZ7R.mjs +0 -1667
  39. package/dist/index-D_iI0F32.mjs +0 -52693
  40. package/dist/info-DXkBZPqO-36KBSyBP.mjs +0 -6813
  41. package/dts/src/components/VideoUpload/index copy.vue.d.ts +0 -22
  42. package/dts/src/components/videoList/index copy 2.vue.d.ts +0 -6
  43. package/dts/src/components/videoList/index copy.vue.d.ts +0 -6
  44. package/dts/src/views/live/zb-live-video/lives copy.vue.d.ts +0 -15
package/README.md CHANGED
@@ -1,51 +1,51 @@
1
- # pnpm publish --no-git-checks
2
- npm config set registry https://registry.npmjs.org/
3
-
4
- # pnpm install
5
- npm config set registry https://registry.npmmirror.com/
6
-
7
-
8
- This template should help get you started developing with Vue 3 in Vite.
9
-
10
- ## Recommended IDE Setup
11
-
12
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
13
-
14
- ## Type Support for `.vue` Imports in TS
15
-
16
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
17
-
18
- If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
19
-
20
- 1. Disable the built-in TypeScript Extension
21
- 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
22
- 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
23
- 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
24
-
25
- ## Customize configuration
26
-
27
- See [Vite Configuration Reference](https://vitejs.dev/config/).
28
-
29
- ## Project Setup
30
-
31
- ```sh
32
- pnpm install
33
- ```
34
-
35
- ### Compile and Hot-Reload for Development
36
-
37
- ```sh
38
- pnpm dev
39
- ```
40
-
41
- ### Type-Check, Compile and Minify for Production
42
-
43
- ```sh
44
- pnpm build
45
- ```
46
-
47
- ### Lint with [ESLint](https://eslint.org/)
48
-
49
- ```sh
50
- pnpm lint
51
- ```
1
+ # pnpm publish --no-git-checks
2
+ npm config set registry https://registry.npmjs.org/
3
+
4
+ # pnpm install
5
+ npm config set registry https://registry.npmmirror.com/
6
+
7
+
8
+ This template should help get you started developing with Vue 3 in Vite.
9
+
10
+ ## Recommended IDE Setup
11
+
12
+ [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
13
+
14
+ ## Type Support for `.vue` Imports in TS
15
+
16
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
17
+
18
+ If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
19
+
20
+ 1. Disable the built-in TypeScript Extension
21
+ 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
22
+ 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
23
+ 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
24
+
25
+ ## Customize configuration
26
+
27
+ See [Vite Configuration Reference](https://vitejs.dev/config/).
28
+
29
+ ## Project Setup
30
+
31
+ ```sh
32
+ pnpm install
33
+ ```
34
+
35
+ ### Compile and Hot-Reload for Development
36
+
37
+ ```sh
38
+ pnpm dev
39
+ ```
40
+
41
+ ### Type-Check, Compile and Minify for Production
42
+
43
+ ```sh
44
+ pnpm build
45
+ ```
46
+
47
+ ### Lint with [ESLint](https://eslint.org/)
48
+
49
+ ```sh
50
+ pnpm lint
51
+ ```
@@ -1,11 +1,11 @@
1
- import { defineComponent as _e, ref as Y, reactive as oe, watch as X, computed as Ee, onMounted as ge, nextTick as O, resolveComponent as f, createElementBlock as b, openBlock as u, createElementVNode as E, createBlock as y, createCommentVNode as T, createVNode as i, unref as t, withCtx as r, Fragment as Z, renderList as z, createTextVNode as $, toDisplayString as k } from "vue";
1
+ import { defineComponent as _e, ref as Y, reactive as oe, watch as X, computed as Ee, onMounted as ge, nextTick as O, resolveComponent as f, createElementBlock as w, openBlock as u, createElementVNode as E, createBlock as y, createCommentVNode as T, createVNode as i, unref as t, withCtx as r, Fragment as Z, renderList as z, createTextVNode as $, toDisplayString as k } from "vue";
2
2
  import { ElMessage as S } from "element-plus";
3
3
  import { routerUtil as ie } from "jmash-core";
4
- import { useRouter as he, useRoute as be } from "vue-router";
5
- import { a as g, U as we, C as s, l as W, p as G, _ as Se } from "./index-D_iI0F32.mjs";
4
+ import { useRouter as he, useRoute as we } from "vue-router";
5
+ import { a as g, U as be, C as s, l as W, p as G, _ as Se } from "./index-B8HpQzMQ.mjs";
6
6
  import { useI18n as Pe } from "vue-i18n";
7
- import ke from "./lives-CwuqRCgi.mjs";
8
- import { V as Ie } from "./index-Df7dbxmA.mjs";
7
+ import ke from "./lives-BFFDkXyQ.mjs";
8
+ import { V as Ie } from "./index-CES9VMga.mjs";
9
9
  import { s as Q, a as I, t as re } from "./timeConvert-DSKES6ZM.mjs";
10
10
  const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye = {
11
11
  key: 0,
@@ -26,11 +26,11 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
26
26
  __name: "add",
27
27
  setup(Be) {
28
28
  g.liveTypeEnum.useEnumValues(), g.showModeEnum.useEnumValues(), g.replayModeEnum.useEnumValues();
29
- const j = new we({
29
+ const j = new be({
30
30
  roleCode: "streamer"
31
31
  });
32
32
  j.useValues(), console.log(j.values, "=> userListsDict");
33
- const { t: V } = Pe(), x = he(), C = be(), q = Y();
33
+ const { t: V } = Pe(), x = he(), C = we(), q = Y();
34
34
  let e = oe({
35
35
  requestId: Math.random() * 10 + "",
36
36
  updateMask: "",
@@ -69,7 +69,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
69
69
  },
70
70
  { immediate: !0 }
71
71
  );
72
- const c = Y(null), w = Y(null), ee = Ee(() => C.query.copy === "true");
72
+ const c = Y(null), b = Y(null), ee = Ee(() => C.query.copy === "true");
73
73
  ge(async () => {
74
74
  await ne(), !e.liveType && g.liveTypeEnum.values.length && (e.liveType = g.liveTypeEnum.values[0].key), !e.replayMode && g.replayModeEnum.values.length && (e.replayMode = g.replayModeEnum.values[1].key), !e.showMode && g.showModeEnum.values.length && (e.showMode = g.showModeEnum.values[0].key);
75
75
  });
@@ -92,7 +92,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
92
92
  l.data.liveType === s.LIVE_TYPE.fake_live ? c.value = {
93
93
  playUrl: G(l.data.playUrl),
94
94
  totalSeconds: l.data.totalSeconds || 0
95
- } : l.data.liveType === s.LIVE_TYPE.vod && (w.value = {
95
+ } : l.data.liveType === s.LIVE_TYPE.vod && (b.value = {
96
96
  playUrl: G(l.data.playUrl)
97
97
  }), e.liveType = l.data.liveType || "", e.liveName = l.data.liveName || "", e.streamerName = l.data.streamerName || "", e.streamerId = l.data.streamerId || "", e.showMode = l.data.showMode || "", e.preStreamPic = l.data.preStreamPic || "", e.liveStreamPic = l.data.liveStreamPic || "", e.bgPic = l.data.bgPic || "", e.replayMode = l.data.replayMode || "", e.liveDescprition = l.data.liveDescprition || "", e.playUrl = l.data.playUrl || "", e.virtualNum = l.data.virtualNum || 0, e.streamType = l.data.streamType, e.showJoin = l.data.showJoin, e.roomPwd = l.data.roomPwd, e.transCode = l.data.transCode, e.fileId = l.data.fileId, e.fileName = l.data.fileName, e.replayStartTime = Q(l.data.replayStartTime), e.startTime = Q(l.data.startTime), e.endTime = Q(l.data.endTime), e.replayEndTime = Q(l.data.replayEndTime);
98
98
  const n = l.data.totalSeconds || 0;
@@ -211,7 +211,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
211
211
  totalSeconds: v,
212
212
  fileId: n
213
213
  };
214
- e.liveType === s.LIVE_TYPE.fake_live ? c.value = p : e.liveType === s.LIVE_TYPE.vod && (w.value = p), e.playUrl = d, e.totalSeconds = v, e.fileId = n, M.value = I(v), U.value = I(v), e.liveType === s.LIVE_TYPE.fake_live && O(() => {
214
+ e.liveType === s.LIVE_TYPE.fake_live ? c.value = p : e.liveType === s.LIVE_TYPE.vod && (b.value = p), e.playUrl = d, e.totalSeconds = v, e.fileId = n, M.value = I(v), U.value = I(v), e.liveType === s.LIVE_TYPE.fake_live && O(() => {
215
215
  R();
216
216
  }), O(() => {
217
217
  S.success("本地视频上传成功!");
@@ -220,7 +220,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
220
220
  var h, D, H, A, L, B;
221
221
  console.log(a, "=>data ");
222
222
  const l = ((h = a.basicInfo) == null ? void 0 : h.name) || "未命名视频", n = ((D = a.transcodeData) == null ? void 0 : D.width) || 0, v = ((H = a.transcodeData) == null ? void 0 : H.height) || 0;
223
- e.fileName = `${l} (${n}×${v})`, c.value = null, w.value = null;
223
+ e.fileName = `${l} (${n}×${v})`, c.value = null, b.value = null;
224
224
  const d = (A = a.transcodeData) == null ? void 0 : A.url;
225
225
  if (!d) {
226
226
  S.warning("选中的转码视频无有效播放地址");
@@ -241,7 +241,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
241
241
  // 可选:保留转码详细信息
242
242
  }, e.playUrl = p, e.totalSeconds = m, M.value = I(m), U.value = I(m), O(() => {
243
243
  R();
244
- })) : e.liveType === s.LIVE_TYPE.vod && (w.value = {
244
+ })) : e.liveType === s.LIVE_TYPE.vod && (b.value = {
245
245
  playUrl: p,
246
246
  fileId: _,
247
247
  liveName: ((B = a.basicInfo) == null ? void 0 : B.name) || "未命名视频",
@@ -285,14 +285,14 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
285
285
  S.error(V("liveVideo.fakeLiveRequired"));
286
286
  return;
287
287
  }
288
- if (e.liveType === s.LIVE_TYPE.vod && !w.value) {
288
+ if (e.liveType === s.LIVE_TYPE.vod && !b.value) {
289
289
  S.error(V("liveVideo.vodRequired"));
290
290
  return;
291
291
  }
292
292
  if (await ((l = q.value) == null ? void 0 : l.validate()))
293
293
  try {
294
294
  let d = { ...e };
295
- e.liveType === s.LIVE_TYPE.fake_live && ((n = c.value) != null && n.fileId) ? d.fileId = c.value.fileId : e.liveType === s.LIVE_TYPE.vod && ((v = w.value) != null && v.fileId) && (d.fileId = w.value.fileId), d.totalSeconds = re(M.value) || 0, d.completeSeconds = re(U.value) || 0, e.liveType !== s.LIVE_TYPE.live && delete d.streamType;
295
+ e.liveType === s.LIVE_TYPE.fake_live && ((n = c.value) != null && n.fileId) ? d.fileId = c.value.fileId : e.liveType === s.LIVE_TYPE.vod && ((v = b.value) != null && v.fileId) && (d.fileId = b.value.fileId), d.totalSeconds = re(M.value) || 0, d.completeSeconds = re(U.value) || 0, e.liveType !== s.LIVE_TYPE.live && delete d.streamType;
296
296
  let p;
297
297
  if (ee.value) {
298
298
  const _ = { ...d };
@@ -305,7 +305,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
305
305
  };
306
306
  return (a, l) => {
307
307
  const n = f("el-radio"), v = f("el-radio-group"), d = f("el-form-item"), p = f("el-input"), _ = f("jmash-dict-select"), m = f("el-col"), h = f("el-row"), D = f("el-date-picker"), H = f("el-time-picker"), A = f("jmash-select"), L = f("jmash-single-image-upload"), B = f("jmash-editor"), N = f("el-form"), F = f("el-button");
308
- return u(), b("div", Me, [
308
+ return u(), w("div", Me, [
309
309
  E("div", Ue, [
310
310
  i(N, {
311
311
  ref_key: "liveFormRef",
@@ -329,7 +329,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
329
329
  onChange: Te
330
330
  }, {
331
331
  default: r(() => [
332
- (u(!0), b(Z, null, z(t(g).liveTypeEnum.values, (o) => (u(), y(n, {
332
+ (u(!0), w(Z, null, z(t(g).liveTypeEnum.values, (o) => (u(), y(n, {
333
333
  key: o.key,
334
334
  border: !0,
335
335
  value: o.key
@@ -345,7 +345,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
345
345
  ]),
346
346
  _: 1
347
347
  }, 8, ["label"]),
348
- t(e).liveType === t(s).LIVE_TYPE.live ? (u(), b("div", Ye, " 实时直播形式,根据实际画面进行传播,无法快进或回放 ")) : T("", !0),
348
+ t(e).liveType === t(s).LIVE_TYPE.live ? (u(), w("div", Ye, " 实时直播形式,根据实际画面进行传播,无法快进或回放 ")) : T("", !0),
349
349
  t(e).liveType === t(s).LIVE_TYPE.fake_live ? (u(), y(d, {
350
350
  key: 1,
351
351
  label: a.$t("liveVideo.fakeLive")
@@ -363,7 +363,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
363
363
  class: "fakeLive",
364
364
  onClick: ae
365
365
  }, " 从本地上传视频 "),
366
- (o = c.value) != null && o.playUrl ? (u(), b("div", Le, "已设置")) : (u(), b("div", De, " 未设置 "))
366
+ (o = c.value) != null && o.playUrl ? (u(), w("div", Le, "已设置")) : (u(), w("div", De, " 未设置 "))
367
367
  ];
368
368
  }),
369
369
  _: 1
@@ -385,7 +385,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
385
385
  class: "fakeLive",
386
386
  onClick: ae
387
387
  }, " 从本地上传视频 "),
388
- (o = w.value) != null && o.playUrl ? (u(), b("div", $e, "已设置")) : (u(), b("div", Ne, "未设置"))
388
+ (o = b.value) != null && o.playUrl ? (u(), w("div", $e, "已设置")) : (u(), w("div", Ne, "未设置"))
389
389
  ];
390
390
  }),
391
391
  _: 1
@@ -398,7 +398,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
398
398
  var o;
399
399
  return [
400
400
  E("div", Ce, [
401
- (o = c.value) != null && o.playUrl ? (u(), b("video", {
401
+ (o = c.value) != null && o.playUrl ? (u(), w("video", {
402
402
  key: 0,
403
403
  src: c.value.playUrl,
404
404
  controls: "",
@@ -413,7 +413,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
413
413
  }),
414
414
  _: 1
415
415
  })) : T("", !0),
416
- (te = w.value) != null && te.playUrl && t(e).liveType === t(s).LIVE_TYPE.vod ? (u(), y(d, {
416
+ (te = b.value) != null && te.playUrl && t(e).liveType === t(s).LIVE_TYPE.vod ? (u(), y(d, {
417
417
  key: 4,
418
418
  label: "视频预览"
419
419
  }, {
@@ -421,9 +421,9 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
421
421
  var o;
422
422
  return [
423
423
  E("div", Re, [
424
- (o = w.value) != null && o.playUrl ? (u(), b("video", {
424
+ (o = b.value) != null && o.playUrl ? (u(), w("video", {
425
425
  key: 0,
426
- src: w.value.playUrl,
426
+ src: b.value.playUrl,
427
427
  controls: "",
428
428
  width: "400",
429
429
  height: "250",
@@ -679,7 +679,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
679
679
  "onUpdate:modelValue": l[11] || (l[11] = (o) => t(e).showMode = o)
680
680
  }, {
681
681
  default: r(() => [
682
- (u(!0), b(Z, null, z(t(g).showModeEnum.values, (o) => (u(), y(n, {
682
+ (u(!0), w(Z, null, z(t(g).showModeEnum.values, (o) => (u(), y(n, {
683
683
  key: o.key,
684
684
  value: o.key
685
685
  }, {
@@ -778,7 +778,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
778
778
  "onUpdate:modelValue": l[12] || (l[12] = (o) => t(e).replayMode = o)
779
779
  }, {
780
780
  default: r(() => [
781
- (u(!0), b(Z, null, z(t(g).replayModeEnum.values, (o) => (u(), y(n, {
781
+ (u(!0), w(Z, null, z(t(g).replayModeEnum.values, (o) => (u(), y(n, {
782
782
  key: o.key,
783
783
  border: !0,
784
784
  value: o.key
@@ -822,7 +822,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
822
822
  "onUpdate:modelValue": l[14] || (l[14] = (o) => t(e).showJoin = o)
823
823
  }, {
824
824
  default: r(() => [
825
- (u(!0), b(Z, null, z(t(g).isShowEnterLive.values, (o) => (u(), y(n, {
825
+ (u(!0), w(Z, null, z(t(g).isShowEnterLive.values, (o) => (u(), y(n, {
826
826
  key: o.key,
827
827
  value: o.key
828
828
  }, {
@@ -891,7 +891,7 @@ const Me = { class: "app-container" }, Ue = { class: "search-container" }, Ye =
891
891
  ]);
892
892
  };
893
893
  }
894
- }), ll = /* @__PURE__ */ Se(Ae, [["__scopeId", "data-v-8fbe395f"]]);
894
+ }), ll = /* @__PURE__ */ Se(Ae, [["__scopeId", "data-v-3d74223d"]]);
895
895
  export {
896
896
  ll as default
897
897
  };
@@ -2,7 +2,7 @@ import { defineComponent as Y, ref as R, reactive as E, resolveComponent as p, r
2
2
  import { useTableHooks as re, useUserStore as g, request as I, clearEmpty as _ } from "jmash-core";
3
3
  import { useI18n as G } from "vue-i18n";
4
4
  import { ElMessage as X } from "element-plus";
5
- import { i as H, t as ue } from "./index-KMVMe9ZJ-CbtOZB8h-CP4sTqMz.mjs";
5
+ import { i as H, t as ue } from "./index-KMVMe9ZJ-wLdIEZoL-D7myUa9W.mjs";
6
6
  import { useRoute as se } from "vue-router";
7
7
  class pe {
8
8
  getKey(e) {
@@ -0,0 +1,204 @@
1
+ import { useUserStore as l, request as i, clearEmpty as s, qs as I } from "jmash-core";
2
+ import { defineComponent as C, ref as m, watch as V, resolveComponent as w, createBlock as B, openBlock as N, mergeProps as S } from "vue";
3
+ class T {
4
+ getKey(e) {
5
+ return {
6
+ regionId: e.regionId
7
+ };
8
+ }
9
+ // 查询列表信息地区信息
10
+ findList(e) {
11
+ const a = l().user.tenant;
12
+ return e && (e.hasEnable = (e == null ? void 0 : e.enable) !== void 0, e.hasParent = !1, ((e == null ? void 0 : e.enable) === !1 || e != null && e.likeRegionName) && (e.hasParent = !0)), s(e), i({
13
+ url: "/v1/region/dict_region/list/" + a,
14
+ method: "get",
15
+ params: e
16
+ });
17
+ }
18
+ // 根据地区编码查询地区信息
19
+ findByCode(e) {
20
+ const a = l().user.tenant;
21
+ return s(e), i({
22
+ url: `/v1/region/dict_region/code/${a}/${e.regionCode}`,
23
+ method: "get",
24
+ params: e
25
+ });
26
+ }
27
+ // 查询地区信息
28
+ findById(e) {
29
+ const a = l().user.tenant;
30
+ return s(e), i({
31
+ url: "/v1/region/dict_region/id/" + a + "/" + e.regionId,
32
+ method: "get"
33
+ });
34
+ }
35
+ // 创建实体地区信息
36
+ create(e) {
37
+ return e.tenant = l().user.tenant, s(e), i({
38
+ url: "/v1/region/dict_region",
39
+ method: "post",
40
+ data: e
41
+ });
42
+ }
43
+ // 修改实体地区信息
44
+ update(e) {
45
+ return e.tenant = l().user.tenant, s(e), i({
46
+ url: "/v1/region/dict_region",
47
+ method: "patch",
48
+ data: e
49
+ });
50
+ }
51
+ // 上移下移
52
+ move(e, a) {
53
+ const n = { ...e };
54
+ return n.tenant = l().user.tenant, n.up = a, s(n), i({
55
+ url: "/v1/region/dict_region/move",
56
+ method: "put",
57
+ data: n
58
+ });
59
+ }
60
+ // 启用/禁用
61
+ enable(e, a) {
62
+ const n = { ...e };
63
+ return n.tenant = l().user.tenant, n.enable = a, s(n), i({
64
+ url: "/v1/region/dict_region/enable",
65
+ method: "put",
66
+ data: n
67
+ });
68
+ }
69
+ // 删除地区信息
70
+ delete(e) {
71
+ return e.tenant = l().user.tenant, s(e), i({
72
+ url: "/v1/region/dict_region/id",
73
+ method: "delete",
74
+ params: e
75
+ });
76
+ }
77
+ // 下载导入模板地区信息
78
+ downloadTemplate() {
79
+ const e = l().user.tenant;
80
+ return i({
81
+ url: "/v1/region/dict_region/" + e + "/template.xlsx",
82
+ method: "get",
83
+ responseType: "blob",
84
+ params: {
85
+ tenant: l().user.tenant
86
+ }
87
+ });
88
+ }
89
+ // 导入地区信息
90
+ importExcel(e) {
91
+ return e.tenant = l().user.tenant, s(e), i({
92
+ url: "/v1/region/dict_region/import",
93
+ method: "patch",
94
+ data: e
95
+ });
96
+ }
97
+ // 导出地区信息Excel文件
98
+ exportExcel(e) {
99
+ const a = l().user.tenant;
100
+ s(e), e.req.hasParent = !0;
101
+ const n = I.stringify(e, {
102
+ arrayFormat: "brackets",
103
+ allowDots: !0
104
+ });
105
+ return i({
106
+ url: "/v1/region/dict_region/" + a + "/dict_regions.xlsx?" + n,
107
+ method: "get",
108
+ responseType: "blob"
109
+ });
110
+ }
111
+ }
112
+ const v = new T(), P = /* @__PURE__ */ C({
113
+ inheritAttrs: !1,
114
+ __name: "index",
115
+ props: {
116
+ checkStrictly: {
117
+ type: Boolean,
118
+ default: !0
119
+ },
120
+ modelValue: {
121
+ type: String,
122
+ default: ""
123
+ },
124
+ maxDepth: {
125
+ type: Number,
126
+ default: 10
127
+ }
128
+ },
129
+ setup(h, { emit: e }) {
130
+ const a = h, n = e, d = m([]), c = m([]);
131
+ V(
132
+ () => a.modelValue,
133
+ (r) => {
134
+ d.value = k(r);
135
+ },
136
+ { immediate: !0 }
137
+ // 初始化时执行一次
138
+ );
139
+ const g = m(), y = (r) => {
140
+ if (!r) {
141
+ n("update:modelValue", ""), n("change", [""]);
142
+ return;
143
+ }
144
+ if (n("update:modelValue", r[r.length - 1]), g.value.presentText) {
145
+ const t = g.value.presentText.split("/").map((o) => o.trim()).filter((o) => o);
146
+ n("change", t);
147
+ } else
148
+ n("change", [""]);
149
+ }, b = {
150
+ lazy: !0,
151
+ checkStrictly: a.checkStrictly,
152
+ lazyLoad(r, t) {
153
+ var o;
154
+ const u = ((o = r.data) == null ? void 0 : o.regionId) || "";
155
+ v.findList({ parentId: u }).then(({ data: p }) => {
156
+ t(f(p.results));
157
+ }).catch((p) => {
158
+ console.error("懒加载区域数据失败:", p), t([]);
159
+ });
160
+ }
161
+ }, _ = () => {
162
+ d.value = [], n("update:modelValue", ""), n("change", [""]);
163
+ }, x = (r) => r.trim() ? (v.findList({ likeRegionName: r }).then(({ data: t }) => {
164
+ c.value = f(t.results);
165
+ }).catch((t) => {
166
+ console.error("过滤区域数据失败:", t), c.value = [];
167
+ }), !1) : (c.value = [], !1), f = (r) => r.map((t) => ({
168
+ label: t.regionName,
169
+ value: t.regionCode,
170
+ regionId: t.regionId,
171
+ leaf: !t.hasChildren || t.depth >= a.maxDepth
172
+ }));
173
+ function k(r = "", t = [2, 4, 6, 9, 12]) {
174
+ if (typeof r != "string" || r.length === 0)
175
+ return [];
176
+ (!Array.isArray(t) || t.some((u) => !Number.isInteger(u) || u < 1)) && (console.warn("拆分位置必须是正整数数组,已使用默认值"), t = [2, 4, 6, 9, 12]);
177
+ const o = [];
178
+ for (const u of t) {
179
+ if (u > r.length) break;
180
+ o.push(r.substring(0, u));
181
+ }
182
+ return o[o.length - 1] !== r && o.push(r), o;
183
+ }
184
+ return (r, t) => {
185
+ const o = w("el-cascader");
186
+ return N(), B(o, S({
187
+ modelValue: d.value,
188
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => d.value = u),
189
+ props: b,
190
+ options: c.value,
191
+ filterable: "",
192
+ onClear: _,
193
+ "before-filter": x
194
+ }, r.$attrs, {
195
+ onChange: y,
196
+ ref_key: "cascaderRef",
197
+ ref: g
198
+ }), null, 16, ["modelValue", "options"]);
199
+ };
200
+ }
201
+ });
202
+ export {
203
+ P as J
204
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./index.vue_vue_type_script_setup_true_lang-dlUf1RQb.mjs";
1
+ import { _ as f } from "./index.vue_vue_type_script_setup_true_lang-CTz0JhjX.mjs";
2
2
  export {
3
3
  f as default
4
4
  };