xyvcard-live 0.0.1

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 (42) hide show
  1. package/README.md +51 -0
  2. package/dist/add-CZ-qxdyj.mjs +784 -0
  3. package/dist/index-BEKuxMN9.mjs +4223 -0
  4. package/dist/index-BnJNPqw0.mjs +3249 -0
  5. package/dist/index-DLHRpKZf.mjs +4 -0
  6. package/dist/index-Jusy_c5g.mjs +1438 -0
  7. package/dist/index-fkh3q-6C.mjs +4 -0
  8. package/dist/index.mjs +6 -0
  9. package/dist/index.vue_vue_type_script_setup_true_lang-B2Da7LnF.mjs +494 -0
  10. package/dist/index.vue_vue_type_script_setup_true_lang-BM5U87cI.mjs +456 -0
  11. package/dist/info-DhG0Tqwk.mjs +404 -0
  12. package/dist/lives copy-Di8sUdq4.mjs +286 -0
  13. package/dist/lives-ftiJP8LL.mjs +70 -0
  14. package/dist/style.css +1 -0
  15. package/dts/src/App.vue.d.ts +2 -0
  16. package/dts/src/api/live/index.d.ts +12 -0
  17. package/dts/src/api/live/zb-live-comment/index.d.ts +22 -0
  18. package/dts/src/api/live/zb-live-comment/types.d.ts +82 -0
  19. package/dts/src/api/live/zb-live-user/index.d.ts +22 -0
  20. package/dts/src/api/live/zb-live-user/types.d.ts +108 -0
  21. package/dts/src/api/live/zb-live-video/index.d.ts +14 -0
  22. package/dts/src/api/live/zb-live-video/types.d.ts +124 -0
  23. package/dts/src/components/VideoUpload/index.vue.d.ts +41 -0
  24. package/dts/src/components/liveList/index.vue.d.ts +73 -0
  25. package/dts/src/constant.d.ts +53 -0
  26. package/dts/src/index.d.ts +7 -0
  27. package/dts/src/lang/index.d.ts +1 -0
  28. package/dts/src/lang/live/en.d.ts +59 -0
  29. package/dts/src/lang/live/zh-cn.d.ts +97 -0
  30. package/dts/src/main.d.ts +5 -0
  31. package/dts/src/permission.d.ts +1 -0
  32. package/dts/src/router/index.d.ts +10 -0
  33. package/dts/src/utils/copy.d.ts +1 -0
  34. package/dts/src/utils/timePlugin.d.ts +5 -0
  35. package/dts/src/views/live/zb-live-comment/index.vue.d.ts +2 -0
  36. package/dts/src/views/live/zb-live-user/index.vue.d.ts +2 -0
  37. package/dts/src/views/live/zb-live-video/add.vue.d.ts +2 -0
  38. package/dts/src/views/live/zb-live-video/index.vue.d.ts +2 -0
  39. package/dts/src/views/live/zb-live-video/info.vue.d.ts +2 -0
  40. package/dts/src/views/live/zb-live-video/lives copy.vue.d.ts +15 -0
  41. package/dts/src/views/live/zb-live-video/lives.vue.d.ts +16 -0
  42. package/package.json +58 -0
@@ -0,0 +1,456 @@
1
+ import { defineComponent as G, getCurrentInstance as J, ref as B, resolveComponent as c, resolveDirective as W, createElementBlock as k, openBlock as w, Fragment as X, createVNode as a, createElementVNode as Y, withCtx as r, withKeys as I, unref as s, createTextVNode as b, toDisplayString as f, withDirectives as V, createBlock as Z, createCommentVNode as q, isRef as D } from "vue";
2
+ import { useUserStore as u, clearEmpty as p, request as m, useTableHooks as ee } from "jmash-core";
3
+ import { useI18n as te } from "vue-i18n";
4
+ import { q as P } from "./index-Jusy_c5g.mjs";
5
+ import { useRoute as le } from "vue-router";
6
+ import { D as g } from "./index-BnJNPqw0.mjs";
7
+ class ne {
8
+ getKey(e) {
9
+ return {
10
+ listenId: e.listenId
11
+ };
12
+ }
13
+ // 查询翻页信息直播听课客户
14
+ findPage(e) {
15
+ const i = u().user.tenant;
16
+ return e && (e.hasOnline = e.online !== void 0, e.hasCompleted = e.hasCompleted !== void 0, e.hasMuted = e.muted !== void 0), p(e), m({
17
+ url: "/v1/live/live_user/page/" + i,
18
+ method: "get",
19
+ params: e
20
+ });
21
+ }
22
+ // 查询列表信息直播听课客户
23
+ findList(e) {
24
+ const i = u().user.tenant;
25
+ return p(e), m({
26
+ url: "/v1/live/live_user/list/" + i,
27
+ method: "get",
28
+ params: e
29
+ });
30
+ }
31
+ // 查询直播听课客户
32
+ findById(e) {
33
+ const i = u().user.tenant;
34
+ return p(e), m({
35
+ url: "/v1/live/live_user/id/" + i + "/" + e.listenId,
36
+ method: "get"
37
+ });
38
+ }
39
+ // 创建实体直播听课客户
40
+ create(e) {
41
+ return e.tenant = u().user.tenant, p(e), m({
42
+ url: "/v1/live/live_user",
43
+ method: "post",
44
+ data: e
45
+ });
46
+ }
47
+ // 修改实体直播听课客户
48
+ update(e) {
49
+ return e.tenant = u().user.tenant, p(e), m({
50
+ url: "/v1/live/live_user",
51
+ method: "patch",
52
+ data: e
53
+ });
54
+ }
55
+ // 拉黑直播听课客户
56
+ block(e) {
57
+ return e.tenant = u().user.tenant, p(e), m({
58
+ url: "/v1/live/live_user/block",
59
+ method: "put",
60
+ data: e
61
+ });
62
+ }
63
+ // 禁言直播听客户
64
+ mute(e) {
65
+ return e.tenant = u().user.tenant, p(e), m({
66
+ url: "/v1/live/live_user/mute",
67
+ method: "put",
68
+ data: e
69
+ });
70
+ }
71
+ // 上移下移
72
+ move(e, i) {
73
+ let o = { ...e };
74
+ return o.tenant = u().user.tenant, o.up = i, p(o), m({
75
+ url: "/v1/live/live_user/move",
76
+ method: "put",
77
+ data: o
78
+ });
79
+ }
80
+ // 启用/禁用
81
+ enable(e, i) {
82
+ let o = { ...e };
83
+ return o.tenant = u().user.tenant, o.enable = i, p(o), m({
84
+ url: "/v1/live/live_user/enable",
85
+ method: "put",
86
+ data: o
87
+ });
88
+ }
89
+ // 删除直播听课客户
90
+ delete(e) {
91
+ return e.tenant = u().user.tenant, p(e), m({
92
+ url: "/v1/live/live_user/id",
93
+ method: "delete",
94
+ params: e
95
+ });
96
+ }
97
+ // 批量删除直播听课客户
98
+ batchDelete(e) {
99
+ const i = e.map((d) => d.listenId), o = {
100
+ tenant: u().user.tenant,
101
+ listenId: i
102
+ };
103
+ return p(o), m({
104
+ url: "/v1/live/live_user/batch",
105
+ method: "put",
106
+ data: o
107
+ });
108
+ }
109
+ // 下载导入模板直播听课客户
110
+ downloadTemplate() {
111
+ const e = u().user.tenant;
112
+ return m({
113
+ url: "/v1/live/live_user/" + e + "/template.xlsx",
114
+ method: "get",
115
+ responseType: "blob",
116
+ params: {
117
+ tenant: u().user.tenant
118
+ }
119
+ });
120
+ }
121
+ // 导入直播听课客户
122
+ importExcel(e) {
123
+ return e.tenant = u().user.tenant, p(e), m({
124
+ url: "/v1/live/live_user/import",
125
+ method: "patch",
126
+ data: e
127
+ });
128
+ }
129
+ // 导出直播听课客户Excel文件
130
+ exportExcel(e) {
131
+ const i = u().user.tenant;
132
+ p(e);
133
+ const o = P.stringify(e, {
134
+ arrayFormat: "brackets",
135
+ allowDots: !0
136
+ });
137
+ return m({
138
+ url: "/v1/live/live_user/" + i + "/live_users.xlsx?" + o,
139
+ method: "get",
140
+ responseType: "blob"
141
+ });
142
+ }
143
+ // 打印直播听课客户PDF文件
144
+ exportPdf(e) {
145
+ const i = u().user.tenant;
146
+ p(e);
147
+ const o = P.stringify(e, {
148
+ arrayFormat: "brackets",
149
+ allowDots: !0
150
+ });
151
+ return m({
152
+ url: "/v1/live/live_user/" + i + "/live_users.pdf?" + o,
153
+ method: "get",
154
+ responseType: "blob"
155
+ });
156
+ }
157
+ }
158
+ const T = new ne(), oe = ["onClick"], re = ["onClick"], ae = ["onClick"], ve = /* @__PURE__ */ G({
159
+ __name: "index",
160
+ setup(j) {
161
+ const { t: e } = te(), i = le(), { proxy: o } = J(), d = B({
162
+ liveId: i.query.liveId
163
+ }), {
164
+ tableHooks: v,
165
+ listLoading: L,
166
+ tableData: N,
167
+ total: U
168
+ } = ee(e, T, d);
169
+ let _ = B([
170
+ {
171
+ label: "liveUser.liveMinutes",
172
+ prop: "liveMinutes",
173
+ width: "150",
174
+ isColumn: !0
175
+ },
176
+ {
177
+ label: "liveUser.replayMinutes",
178
+ prop: "replayMinutes",
179
+ width: "150",
180
+ isColumn: !0
181
+ },
182
+ {
183
+ label: "liveUser.rewardPoints",
184
+ prop: "rewardPoints",
185
+ width: "150",
186
+ isColumn: !0
187
+ },
188
+ {
189
+ label: "liveUser.redpacketAmount",
190
+ prop: "redpacketAmount",
191
+ width: "150",
192
+ isColumn: !0
193
+ },
194
+ {
195
+ label: "liveUser.completed",
196
+ prop: "completed",
197
+ slotName: "completed",
198
+ columnType: "slot",
199
+ width: "150",
200
+ isColumn: !0
201
+ },
202
+ {
203
+ label: "liveUser.online",
204
+ prop: "online",
205
+ slotName: "online",
206
+ columnType: "slot",
207
+ width: "150",
208
+ isColumn: !0
209
+ },
210
+ {
211
+ label: "liveUser.muted",
212
+ prop: "muted",
213
+ slotName: "muted",
214
+ columnType: "slot",
215
+ width: "150",
216
+ isColumn: !0
217
+ },
218
+ {
219
+ label: "common.operate",
220
+ width: "150",
221
+ slotName: "operation",
222
+ columnType: "slot",
223
+ fixed: "right",
224
+ isColumn: !0
225
+ }
226
+ ]);
227
+ function z(n) {
228
+ v.selectionRows.value = n;
229
+ }
230
+ function R(n) {
231
+ v.handleSort(n.prop, n.order);
232
+ }
233
+ const E = async (n) => {
234
+ await o.$confirm(
235
+ e("liveUser.blockConfirmMessage"),
236
+ e("liveUser.blockUser"),
237
+ {
238
+ confirmButtonText: e("common.confirm"),
239
+ cancelButtonText: e("common.cancel"),
240
+ type: "warning"
241
+ }
242
+ ), await T.block({
243
+ userId: n.userId,
244
+ liveId: n.liveId
245
+ }), o.$message.success(e("liveUser.blockSuccess")), v.getList();
246
+ }, K = async (n) => {
247
+ await o.$confirm(e("liveUser.muteConfirmMessage"), e("liveUser.mute"), {
248
+ confirmButtonText: e("common.confirm"),
249
+ cancelButtonText: e("common.cancel"),
250
+ type: "warning"
251
+ }), await T.mute({
252
+ userId: n.userId,
253
+ liveId: n.liveId
254
+ }), o.$message.success(e("liveUser.muteSuccess")), v.getList();
255
+ };
256
+ return v.getList(), (n, l) => {
257
+ const y = c("jmash-select"), C = c("el-form-item"), h = c("el-col"), S = c("el-button"), x = c("el-row"), Q = c("el-form"), A = c("jmash-column-select"), F = c("jmash-table"), O = c("jmash-pagination"), H = c("el-card"), $ = W("hasPerm");
258
+ return w(), k(X, null, [
259
+ a(Q, {
260
+ ref: "queryFormRef",
261
+ model: d.value,
262
+ inline: !0
263
+ }, {
264
+ default: r(() => [
265
+ a(x, null, {
266
+ default: r(() => [
267
+ a(h, { span: 6 }, {
268
+ default: r(() => [
269
+ a(C, {
270
+ label: n.$t("liveUser.online"),
271
+ prop: "online"
272
+ }, {
273
+ default: r(() => [
274
+ a(y, {
275
+ modelValue: d.value.online,
276
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => d.value.online = t),
277
+ placeholder: n.$t("liveUser.online"),
278
+ data: s(g).isOnline.values,
279
+ onKeyup: l[1] || (l[1] = I((t) => s(v).handleQuery(), ["enter"])),
280
+ class: "!w-[203px]"
281
+ }, null, 8, ["modelValue", "placeholder", "data"])
282
+ ]),
283
+ _: 1
284
+ }, 8, ["label"])
285
+ ]),
286
+ _: 1
287
+ }),
288
+ a(h, { span: 6 }, {
289
+ default: r(() => [
290
+ a(C, {
291
+ label: n.$t("liveUser.completed"),
292
+ prop: "completed"
293
+ }, {
294
+ default: r(() => [
295
+ a(y, {
296
+ modelValue: d.value.completed,
297
+ "onUpdate:modelValue": l[2] || (l[2] = (t) => d.value.completed = t),
298
+ data: s(g).isCompleted.values,
299
+ placeholder: n.$t("liveUser.completed"),
300
+ onKeyup: l[3] || (l[3] = I((t) => s(v).handleQuery(), ["enter"])),
301
+ class: "!w-[203px]"
302
+ }, null, 8, ["modelValue", "data", "placeholder"])
303
+ ]),
304
+ _: 1
305
+ }, 8, ["label"])
306
+ ]),
307
+ _: 1
308
+ }),
309
+ a(h, { span: 6 }, {
310
+ default: r(() => [
311
+ a(C, {
312
+ label: n.$t("liveUser.muted"),
313
+ prop: "muted"
314
+ }, {
315
+ default: r(() => [
316
+ a(y, {
317
+ modelValue: d.value.muted,
318
+ "onUpdate:modelValue": l[4] || (l[4] = (t) => d.value.muted = t),
319
+ data: s(g).isMuted.values,
320
+ placeholder: n.$t("liveUser.muted"),
321
+ onKeyup: l[5] || (l[5] = I((t) => s(v).handleQuery(), ["enter"])),
322
+ class: "!w-[203px]"
323
+ }, null, 8, ["modelValue", "data", "placeholder"])
324
+ ]),
325
+ _: 1
326
+ }, 8, ["label"])
327
+ ]),
328
+ _: 1
329
+ }),
330
+ a(h, { span: 6 }, {
331
+ default: r(() => [
332
+ a(C, { class: "search-btn" }, {
333
+ default: r(() => [
334
+ a(S, {
335
+ type: "primary",
336
+ onClick: l[6] || (l[6] = (t) => s(v).handleQuery())
337
+ }, {
338
+ default: r(() => [
339
+ b(f(n.$t("common.search")), 1)
340
+ ]),
341
+ _: 1
342
+ }),
343
+ a(S, {
344
+ onClick: l[7] || (l[7] = (t) => s(v).resetQuery())
345
+ }, {
346
+ default: r(() => [
347
+ b(f(n.$t("common.reset")), 1)
348
+ ]),
349
+ _: 1
350
+ })
351
+ ]),
352
+ _: 1
353
+ })
354
+ ]),
355
+ _: 1
356
+ })
357
+ ]),
358
+ _: 1
359
+ })
360
+ ]),
361
+ _: 1
362
+ }, 8, ["model"]),
363
+ l[13] || (l[13] = Y("div", { class: "clear" }, null, -1)),
364
+ a(H, {
365
+ shadow: "never",
366
+ class: "table-container"
367
+ }, {
368
+ header: r(() => [
369
+ a(x, null, {
370
+ default: r(() => [
371
+ a(h, {
372
+ span: 24,
373
+ class: "container-float"
374
+ }, {
375
+ default: r(() => [
376
+ a(A, {
377
+ modelValue: s(_),
378
+ "onUpdate:modelValue": l[8] || (l[8] = (t) => D(_) ? _.value = t : _ = t),
379
+ "label-name": "live/zb-live-user"
380
+ }, null, 8, ["modelValue"])
381
+ ]),
382
+ _: 1
383
+ })
384
+ ]),
385
+ _: 1
386
+ })
387
+ ]),
388
+ footer: r(() => [
389
+ s(U) > 0 ? (w(), Z(O, {
390
+ key: 0,
391
+ total: s(U),
392
+ "onUpdate:total": l[9] || (l[9] = (t) => D(U) ? U.value = t : null),
393
+ "current-page": d.value.curPage,
394
+ "onUpdate:currentPage": l[10] || (l[10] = (t) => d.value.curPage = t),
395
+ "page-size": d.value.pageSize,
396
+ "onUpdate:pageSize": l[11] || (l[11] = (t) => d.value.pageSize = t),
397
+ onPagination: l[12] || (l[12] = (t) => s(v).getList())
398
+ }, null, 8, ["total", "current-page", "page-size"])) : q("", !0)
399
+ ]),
400
+ default: r(() => [
401
+ a(F, {
402
+ ref: "multipleTableRef",
403
+ "row-key": "listenId",
404
+ "list-loading": s(L),
405
+ data: s(N),
406
+ "table-label": s(_),
407
+ onSelectionChange: z,
408
+ onSortChange: R
409
+ }, {
410
+ online: r((t) => [
411
+ b(f(s(g).isOnline.getValue(t.data.row.online)), 1)
412
+ ]),
413
+ muted: r((t) => [
414
+ b(f(s(g).isMuted.getValue(t.data.row.muted)), 1)
415
+ ]),
416
+ completed: r((t) => [
417
+ b(f(s(g).isCompleted.getValue(t.data.row.completed)), 1)
418
+ ]),
419
+ operation: r((t) => [
420
+ V((w(), k("span", {
421
+ class: "el-button-color",
422
+ onClick: (M) => E(t.data.row)
423
+ }, [
424
+ b(f(n.$t("liveUser.blockUser")), 1)
425
+ ], 8, oe)), [
426
+ [$, ["live:live_comment:block"]]
427
+ ]),
428
+ V((w(), k("span", {
429
+ class: "el-button-color",
430
+ onClick: (M) => K(t.data.row)
431
+ }, [
432
+ b(f(n.$t("liveUser.mute")), 1)
433
+ ], 8, re)), [
434
+ [$, ["live:live_user:mute"]]
435
+ ]),
436
+ V((w(), k("span", {
437
+ class: "el-button-color dropdown-left",
438
+ onClick: (M) => s(v).deleteRecord(t.data.row)
439
+ }, [
440
+ b(f(n.$t("common.delete")), 1)
441
+ ], 8, ae)), [
442
+ [$, ["live:live_user:delete"]]
443
+ ])
444
+ ]),
445
+ _: 1
446
+ }, 8, ["list-loading", "data", "table-label"])
447
+ ]),
448
+ _: 1
449
+ })
450
+ ], 64);
451
+ };
452
+ }
453
+ });
454
+ export {
455
+ ve as _
456
+ };