ling-yun-custom-components 0.0.40 → 0.0.41

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.
@@ -0,0 +1,536 @@
1
+ import { w as V } from "./chunks/index.bCzIhWFw.js";
2
+ import { createElementBlock as o, openBlock as a, createElementVNode as c, toDisplayString as f, renderSlot as A, computed as F, ref as L, resolveDirective as R, createCommentVNode as i, createVNode as h, Fragment as b, renderList as k, unref as e, withCtx as p, createBlock as m, withDirectives as M, createTextVNode as T, watch as q } from "vue";
3
+ import { ElIcon as P, ElLink as O, ElTimeline as U, ElTimelineItem as j, ElCard as z, ElTag as D, ElTabs as B, ElTabPane as x } from "element-plus";
4
+ import { IconLook as J } from "color-message-lingyun-vue";
5
+ import { C as H } from "./chunks/layout.DXw3haOP.js";
6
+ import { _ as E } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
7
+ import { createRequest as W, pageParams as K, apiPrefix as Q } from "ling-yun-methods";
8
+ import './assets/AppIntro.css';const X = { class: "flex w-full mg-b-10" }, Y = { class: "config-item__label text-right inline-block" }, Z = {
9
+ class: "flex-1 flex justify-start items-flex-start flex-wrap flex-gap-row-wrap-8 fz-14",
10
+ style: { color: "#303133" }
11
+ }, ee = /* @__PURE__ */ Object.assign({
12
+ name: "ConfigItem"
13
+ }, {
14
+ __name: "ConfigItem",
15
+ props: {
16
+ title: {
17
+ type: String,
18
+ required: !0
19
+ }
20
+ },
21
+ setup(s) {
22
+ return (d, v) => (a(), o("div", X, [
23
+ c("div", Y, [
24
+ c("span", null, f(s.title), 1)
25
+ ]),
26
+ c("div", Z, [
27
+ A(d.$slots, "default", {}, void 0, !0)
28
+ ])
29
+ ]));
30
+ }
31
+ }), $ = /* @__PURE__ */ E(ee, [["__scopeId", "data-v-410e68d5"]]), n = {
32
+ LISTING: 1,
33
+ // 上架申请
34
+ DELISTING: 2,
35
+ // 下架申请
36
+ ONLINE: 3,
37
+ // 上线应用
38
+ OFFLINE: 4
39
+ // 下线应用
40
+ }, S = {
41
+ PENDING: 0,
42
+ // 待审核
43
+ APPROVED: 1,
44
+ // 已通过
45
+ REJECTED: 2
46
+ // 已驳回
47
+ }, C = {
48
+ IMAGE: 1,
49
+ // 图片
50
+ VIDEO: 2
51
+ // 视频
52
+ }, je = {
53
+ INTRO: "intro",
54
+ // 应用介绍
55
+ TIMELINE: "timeline"
56
+ // 迭代时间轴
57
+ }, te = {
58
+ [n.LISTING]: "上架申请",
59
+ [n.DELISTING]: "下架申请",
60
+ [n.ONLINE]: "上线应用",
61
+ [n.OFFLINE]: "下线应用"
62
+ }, ae = { class: "app-intro-content overflow-hidden h-full" }, se = {
63
+ key: 0,
64
+ class: "media-section w-full pd-b-12"
65
+ }, le = { class: "media-content relative w-full" }, ne = {
66
+ key: 0,
67
+ class: "media-video relative w-full"
68
+ }, oe = ["src"], re = {
69
+ key: 1,
70
+ class: "media-image relative w-full"
71
+ }, ie = ["src"], ue = ["onClick"], ce = { class: "info-section" }, pe = { class: "text-item" }, de = { class: "text-item" }, fe = { class: "file-list" }, ye = {
72
+ key: 0,
73
+ class: "preview-content"
74
+ }, me = ["src"], ge = {
75
+ key: 1,
76
+ class: "preview-content"
77
+ }, he = ["src"], ve = /* @__PURE__ */ Object.assign({
78
+ name: "AppIntroContent"
79
+ }, {
80
+ __name: "AppIntroContent",
81
+ props: {
82
+ pics: {
83
+ type: Array,
84
+ default: () => []
85
+ },
86
+ appCreatorName: {
87
+ type: String,
88
+ default: ""
89
+ },
90
+ appCreatorOrg: {
91
+ type: String,
92
+ default: ""
93
+ },
94
+ appDesc: {
95
+ type: String,
96
+ default: ""
97
+ },
98
+ accessSystem: {
99
+ type: String,
100
+ default: ""
101
+ },
102
+ businessBackground: {
103
+ type: String,
104
+ default: ""
105
+ },
106
+ businessTarget: {
107
+ type: String,
108
+ default: ""
109
+ },
110
+ resultData: {
111
+ type: String,
112
+ default: ""
113
+ },
114
+ attachements: {
115
+ type: Array,
116
+ default: () => []
117
+ }
118
+ },
119
+ setup(s) {
120
+ const d = s, v = F(() => [
121
+ { title: "申请人:", value: d.appCreatorName },
122
+ { title: "应用省份:", value: d.appCreatorOrg },
123
+ { title: "应用说明:", value: d.appDesc },
124
+ { title: "接入系统:", value: d.accessSystem },
125
+ { title: "业务背景:", value: d.businessBackground },
126
+ { title: "业务目标:", value: d.businessTarget },
127
+ { title: "成效数据:", value: d.resultData }
128
+ ]), I = L(!1), y = L(null), N = (u) => {
129
+ y.value = u, I.value = !0;
130
+ }, g = () => {
131
+ I.value = !1, y.value = null;
132
+ }, _ = (u) => {
133
+ try {
134
+ const l = document.createElement("a");
135
+ l.href = u.attachementUrl, l.download = u.attachementName, l.style.display = "none", l.target = "_blank", document.body.appendChild(l), l.click(), document.body.removeChild(l);
136
+ } catch (l) {
137
+ console.error(l);
138
+ }
139
+ };
140
+ return (u, l) => {
141
+ const t = R("loading");
142
+ return a(), o("div", ae, [
143
+ s.pics.length > 0 ? (a(), o("div", se, [
144
+ c("div", le, [
145
+ (a(!0), o(b, null, k(s.pics, (r, w) => (a(), o("div", {
146
+ key: w,
147
+ class: "media-item w-full"
148
+ }, [
149
+ r.type === e(C).VIDEO ? (a(), o("div", ne, [
150
+ c("video", {
151
+ class: "w-full",
152
+ src: r.url,
153
+ controls: ""
154
+ }, null, 8, oe)
155
+ ])) : i("", !0),
156
+ r.type === e(C).IMAGE ? (a(), o("div", re, [
157
+ c("img", {
158
+ class: "w-full",
159
+ src: r.url,
160
+ alt: ""
161
+ }, null, 8, ie)
162
+ ])) : i("", !0),
163
+ c("div", {
164
+ class: "hover-overlay absolute top-0 left-0 w-full h-full flex justify-center items-center",
165
+ onClick: (G) => N(r)
166
+ }, [
167
+ h(e(P), {
168
+ size: 24,
169
+ class: "view-icon"
170
+ }, {
171
+ default: p(() => [
172
+ h(e(J))
173
+ ]),
174
+ _: 1
175
+ })
176
+ ], 8, ue)
177
+ ]))), 128))
178
+ ])
179
+ ])) : i("", !0),
180
+ c("div", ce, [
181
+ (a(!0), o(b, null, k(v.value, (r) => (a(), m($, {
182
+ key: r.title,
183
+ title: r.title
184
+ }, {
185
+ default: p(() => [
186
+ c("div", pe, f(r.value ?? "--"), 1)
187
+ ]),
188
+ _: 2
189
+ }, 1032, ["title"]))), 128)),
190
+ h($, { title: "附件:" }, {
191
+ default: p(() => [
192
+ c("div", de, [
193
+ c("div", fe, [
194
+ (a(!0), o(b, null, k(s.attachements, (r, w) => (a(), o("div", {
195
+ key: w,
196
+ class: "file-item"
197
+ }, [
198
+ M((a(), o("div", null, [
199
+ T(f(r.attachementName) + " ", 1),
200
+ r.attachementUrl ? (a(), m(e(O), {
201
+ key: 0,
202
+ type: "primary",
203
+ underline: !1,
204
+ onClick: (G) => _(r)
205
+ }, {
206
+ default: p(() => [...l[1] || (l[1] = [
207
+ T(" 点击查看 ", -1)
208
+ ])]),
209
+ _: 1
210
+ }, 8, ["onClick"])) : i("", !0)
211
+ ])), [
212
+ [t, !r.attachementUrl]
213
+ ])
214
+ ]))), 128))
215
+ ])
216
+ ])
217
+ ]),
218
+ _: 1
219
+ })
220
+ ]),
221
+ h(H, {
222
+ modelValue: I.value,
223
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => I.value = r),
224
+ width: "60%",
225
+ "show-close": !0,
226
+ onClose: g,
227
+ buttons: {
228
+ showCancel: !1,
229
+ showConfirm: !1
230
+ }
231
+ }, {
232
+ default: p(() => [
233
+ y.value?.type === e(C).IMAGE ? (a(), o("div", ye, [
234
+ c("img", {
235
+ class: "preview-media w-full",
236
+ src: y.value.url,
237
+ alt: ""
238
+ }, null, 8, me)
239
+ ])) : (a(), o("div", ge, [
240
+ c("video", {
241
+ class: "preview-media w-full",
242
+ src: y.value?.url,
243
+ controls: ""
244
+ }, null, 8, he)
245
+ ]))
246
+ ]),
247
+ _: 1
248
+ }, 8, ["modelValue"])
249
+ ]);
250
+ };
251
+ }
252
+ }), Ie = /* @__PURE__ */ E(ve, [["__scopeId", "data-v-4137d33a"]]), Te = { class: "flex items-center flex-gap-row-nowrap-8 mg-b-12" }, _e = {
253
+ class: "fz-14 weight-500",
254
+ style: { color: "#1d2129" }
255
+ }, Ne = {
256
+ class: "fz-14",
257
+ style: { color: "#4e5969" }
258
+ }, be = {
259
+ key: 0,
260
+ class: "mg-t-8 mg-b-8",
261
+ style: { "line-height": "1.5" }
262
+ }, ke = {
263
+ key: 1,
264
+ class: "mg-t-8 mg-b-8",
265
+ style: { "line-height": "1.5" }
266
+ }, Ee = {
267
+ key: 2,
268
+ class: "mg-t-8 mg-b-8",
269
+ style: { "line-height": "1.5" }
270
+ }, we = {
271
+ key: 3,
272
+ class: "mg-t-8 mg-b-8",
273
+ style: { "line-height": "1.5" }
274
+ }, De = {
275
+ key: 4,
276
+ class: "mg-t-8 mg-b-8",
277
+ style: { "line-height": "1.5" }
278
+ }, Se = {
279
+ key: 5,
280
+ class: "mg-t-8 mg-b-8",
281
+ style: { "line-height": "1.5" }
282
+ }, Ce = {
283
+ key: 6,
284
+ class: "mg-t-8 mg-b-8",
285
+ style: { "line-height": "1.5" }
286
+ }, Le = {
287
+ key: 7,
288
+ class: "mg-t-8 mg-b-8",
289
+ style: { "line-height": "1.5" }
290
+ }, Oe = {
291
+ key: 8,
292
+ class: "mg-t-8 mg-b-8",
293
+ style: { "line-height": "1.5" }
294
+ }, xe = /* @__PURE__ */ Object.assign({
295
+ name: "AppTimeline"
296
+ }, {
297
+ __name: "AppTimeline",
298
+ props: {
299
+ appId: {
300
+ type: String,
301
+ default: ""
302
+ },
303
+ square: {
304
+ type: Boolean,
305
+ default: !1
306
+ },
307
+ vueRouter: {
308
+ type: Object,
309
+ default: () => ({})
310
+ },
311
+ prefixUrl: {
312
+ type: String,
313
+ default: ""
314
+ }
315
+ },
316
+ setup(s) {
317
+ const d = s, v = async (u) => {
318
+ d.vueRouter.push({
319
+ path: "/promptTestDetail",
320
+ query: {
321
+ id: u.id,
322
+ type: u.auditStatus,
323
+ sourceFlag: "1",
324
+ operationType: u.operationType,
325
+ sourceHistory: "1"
326
+ }
327
+ });
328
+ }, I = (u) => [n.LISTING, n.DELISTING].includes(u), y = W(d.prefixUrl), N = () => y.post({
329
+ url: `${Q.cslmManagerAgent}/microApp/appOperationList`,
330
+ data: {
331
+ appId: d.appId,
332
+ operationType: [
333
+ n.LISTING,
334
+ n.DELISTING,
335
+ n.ONLINE,
336
+ n.OFFLINE
337
+ ].join(","),
338
+ pageNum: K.pageNum,
339
+ pageSize: 1e6
340
+ }
341
+ }), g = ref([]), _ = async () => {
342
+ await N().then(({ data: u }) => {
343
+ g.value = u.list;
344
+ });
345
+ };
346
+ return onMounted(() => {
347
+ _();
348
+ }), (u, l) => (a(), m(e(U), { class: "overflow-y-auto h-full pd-l-12" }, {
349
+ default: p(() => [
350
+ (a(!0), o(b, null, k(e(g), (t) => (a(), m(e(j), {
351
+ key: t.id,
352
+ timestamp: t.createTime,
353
+ placement: "top",
354
+ color: "#165dff"
355
+ }, {
356
+ default: p(() => [
357
+ h(e(z), { shadow: "hover" }, {
358
+ default: p(() => [
359
+ c("div", Te, [
360
+ c("span", _e, f(e(te)[t.operationType] || "--"), 1),
361
+ I(t.operationType) ? (a(), o(b, { key: 0 }, [
362
+ t.auditStatus === e(S).PENDING ? (a(), m(e(D), {
363
+ key: 0,
364
+ type: "warning",
365
+ size: "small",
366
+ class: "weight-500"
367
+ }, {
368
+ default: p(() => [...l[0] || (l[0] = [
369
+ T(" 待审核 ", -1)
370
+ ])]),
371
+ _: 1
372
+ })) : t.auditStatus === e(S).APPROVED ? (a(), m(e(D), {
373
+ key: 1,
374
+ type: "primary",
375
+ size: "small",
376
+ class: "weight-500"
377
+ }, {
378
+ default: p(() => [...l[1] || (l[1] = [
379
+ T(" 已通过 ", -1)
380
+ ])]),
381
+ _: 1
382
+ })) : t.auditStatus === e(S).REJECTED ? (a(), m(e(D), {
383
+ key: 2,
384
+ type: "danger",
385
+ size: "small",
386
+ class: "weight-500"
387
+ }, {
388
+ default: p(() => [...l[2] || (l[2] = [
389
+ T(" 已驳回 ", -1)
390
+ ])]),
391
+ _: 1
392
+ })) : i("", !0)
393
+ ], 64)) : i("", !0)
394
+ ]),
395
+ c("div", Ne, [
396
+ t.operationType === e(n).LISTING || t.operationType === e(n).DELISTING ? (a(), o("p", be, " 申请人:" + f(t.creatorName ?? "--"), 1)) : i("", !0),
397
+ t.operationType === e(n).ONLINE || t.operationType === e(n).OFFLINE ? (a(), o("p", ke, " 操作人:" + f(t.creatorName ?? "--"), 1)) : i("", !0),
398
+ t.operationType === e(n).DELISTING ? (a(), o("p", Ee, " 下架原因:" + f(t.delistingReason ?? "--"), 1)) : i("", !0),
399
+ t.operationType === e(n).LISTING ? (a(), o("p", we, " 成效数据:" + f(t.resultData ?? "--"), 1)) : i("", !0),
400
+ t.operationType === e(n).LISTING ? (a(), o("p", De, " 推荐理由:" + f(t.recommendReason ?? "--"), 1)) : i("", !0),
401
+ t.operationType === e(n).ONLINE || t.operationType === e(n).OFFLINE ? (a(), o("p", Se, " 版本号:" + f(t.appVersionNum ? "V" + t.appVersionNum : "--"), 1)) : i("", !0),
402
+ t.operationType === e(n).ONLINE ? (a(), o("p", Ce, " 配置摘要:" + f(t.configSummary ?? "--"), 1)) : i("", !0),
403
+ t.operationType === e(n).ONLINE || t.operationType === e(n).OFFLINE ? (a(), o("p", Le, " 版本说明:" + f(t.publishRemark ?? "--"), 1)) : i("", !0),
404
+ t.operationType === e(n).OFFLINE ? (a(), o("p", Oe, " 下线原因:" + f(t.offlineReason ?? "--"), 1)) : i("", !0),
405
+ t.operationType === e(n).LISTING && !s.square ? (a(), m(e(O), {
406
+ key: 9,
407
+ type: "primary",
408
+ underline: !1,
409
+ class: "mg-t-8",
410
+ onClick: (r) => v(t)
411
+ }, {
412
+ default: p(() => [...l[3] || (l[3] = [
413
+ T(" 查看上架申请 ", -1)
414
+ ])]),
415
+ _: 1
416
+ }, 8, ["onClick"])) : i("", !0),
417
+ t.operationType === e(n).DELISTING && !s.square ? (a(), m(e(O), {
418
+ key: 10,
419
+ type: "primary",
420
+ underline: !1,
421
+ class: "mg-t-8",
422
+ onClick: (r) => v(t)
423
+ }, {
424
+ default: p(() => [...l[4] || (l[4] = [
425
+ T(" 查看下架申请 ", -1)
426
+ ])]),
427
+ _: 1
428
+ }, 8, ["onClick"])) : i("", !0)
429
+ ])
430
+ ]),
431
+ _: 2
432
+ }, 1024)
433
+ ]),
434
+ _: 2
435
+ }, 1032, ["timestamp"]))), 128))
436
+ ]),
437
+ _: 1
438
+ }));
439
+ }
440
+ }), $e = /* @__PURE__ */ E(xe, [["__scopeId", "data-v-4e41255e"]]), Ge = /* @__PURE__ */ Object.assign({
441
+ name: "AppIntro"
442
+ }, {
443
+ __name: "layout",
444
+ props: {
445
+ introData: {
446
+ type: Object,
447
+ default: () => ({})
448
+ },
449
+ square: {
450
+ type: Boolean,
451
+ default: !1
452
+ },
453
+ defaultTab: {
454
+ type: String,
455
+ default: "intro",
456
+ validator: (s) => ["intro", "timeline"].includes(s)
457
+ },
458
+ prefixUrl: {
459
+ type: String,
460
+ default: ""
461
+ },
462
+ vueRouter: {
463
+ type: Object,
464
+ default: () => ({})
465
+ },
466
+ appId: {
467
+ type: String,
468
+ default: ""
469
+ }
470
+ },
471
+ emits: ["tab-change"],
472
+ setup(s, { emit: d }) {
473
+ const v = s, I = d, y = L(v.defaultTab);
474
+ q(
475
+ () => v.defaultTab,
476
+ (g) => {
477
+ y.value = g;
478
+ }
479
+ );
480
+ const N = (g) => {
481
+ I("tab-change", g);
482
+ };
483
+ return (g, _) => (a(), m(e(B), {
484
+ class: "overflow-hidden h-full",
485
+ modelValue: y.value,
486
+ "onUpdate:modelValue": _[0] || (_[0] = (u) => y.value = u),
487
+ onTabChange: N
488
+ }, {
489
+ default: p(() => [
490
+ h(e(x), {
491
+ label: "应用介绍",
492
+ name: "intro"
493
+ }, {
494
+ default: p(() => [
495
+ h(Ie, {
496
+ pics: s.introData?.pics,
497
+ "app-creator-name": s.introData?.appCreatorName,
498
+ "app-creator-org": s.introData?.appCreatorOrg,
499
+ "app-desc": s.introData?.appDesc,
500
+ "access-system": s.introData?.accessSystem,
501
+ "business-background": s.introData?.businessBackground,
502
+ "business-target": s.introData?.businessTarget,
503
+ "result-data": s.introData?.resultData,
504
+ attachements: s.introData?.attachements
505
+ }, null, 8, ["pics", "app-creator-name", "app-creator-org", "app-desc", "access-system", "business-background", "business-target", "result-data", "attachements"])
506
+ ]),
507
+ _: 1
508
+ }),
509
+ h(e(x), {
510
+ label: "迭代时间轴",
511
+ name: "timeline"
512
+ }, {
513
+ default: p(() => [
514
+ h($e, {
515
+ prefixUrl: s.prefixUrl,
516
+ square: s.square,
517
+ "vue-router": s.vueRouter,
518
+ "app-id": s.appId
519
+ }, null, 8, ["prefixUrl", "square", "vue-router", "app-id"])
520
+ ]),
521
+ _: 1
522
+ })
523
+ ]),
524
+ _: 1
525
+ }, 8, ["modelValue"]));
526
+ }
527
+ }), Ve = /* @__PURE__ */ E(Ge, [["__scopeId", "data-v-0ffdf013"]]), ze = V(Ve);
528
+ export {
529
+ ze as AppIntro,
530
+ S as auditStatusMap,
531
+ ze as default,
532
+ C as mediaTypeMap,
533
+ n as operationTypeMap,
534
+ te as operationTypeToTextMap,
535
+ je as tabTypeMap
536
+ };
@@ -1,7 +1,8 @@
1
1
  import { w as be } from "./chunks/index.bCzIhWFw.js";
2
2
  import { useSlots as Ce, computed as g, ref as v, watch as te, onMounted as xe, nextTick as Te, createElementBlock as B, openBlock as m, createElementVNode as y, createCommentVNode as R, unref as c, renderSlot as E, Fragment as we, createBlock as le, withCtx as I, createTextVNode as ae, toDisplayString as ke, createVNode as M, createSlots as Be, renderList as Re, normalizeProps as ze, guardReactiveProps as Ne, h as W } from "vue";
3
3
  import { ElButton as ne, ElAutoResizer as Pe, ElTableV2 as Ae, ElCheckbox as Ee } from "element-plus";
4
- import { emitsMap as ue, paginationConfig as Ie, calculateScale as _e } from "ling-yun-methods";
4
+ import { emitsMap as ue, paginationConfig as Ie } from "ling-yun-methods";
5
+ import { calculateScale as _e } from "color-star-custom-methods";
5
6
  import { _ as je } from "./chunks/layout.BzQrppiO.js";
6
7
  import { _ as Oe } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
7
8
  import './assets/PaginationTable.css';const De = { class: "flex h-full flex-col" }, qe = {
@@ -416,8 +417,8 @@ import './assets/PaginationTable.css';const De = { class: "flex h-full flex-col"
416
417
  ])
417
418
  ]));
418
419
  }
419
- }), Ge = /* @__PURE__ */ Oe(He, [["__scopeId", "data-v-7d5408b1"]]), tt = be(Ge);
420
+ }), Ge = /* @__PURE__ */ Oe(He, [["__scopeId", "data-v-639533d7"]]), lt = be(Ge);
420
421
  export {
421
- tt as PaginationTable,
422
- tt as default
422
+ lt as PaginationTable,
423
+ lt as default
423
424
  };
@@ -0,0 +1 @@
1
+ .config-item__label[data-v-410e68d5]{width:80px;height:auto}.config-item__label span[data-v-410e68d5]{line-height:20px;color:#5d6c89}.hover-overlay[data-v-4137d33a]{background-color:#00000080}[data-v-4e41255e] .el-timeline-item__timestamp{color:#86909c}[data-v-4e41255e] .el-card{background:#f7f8fa}.el-tab-pane[data-v-0ffdf013]{height:100%;overflow:hidden}
File without changes
@@ -1 +1 @@
1
- [data-v-7d5408b1] .el-table-v2__header-cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
1
+ [data-v-639533d7] .el-table-v2__header-cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}