@pangu-backend-ui/apputil-core 0.0.3 → 0.0.5

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.
package/index.js CHANGED
@@ -1,95 +1,110 @@
1
- import { defineComponent as W, ref as v, inject as j, resolveComponent as o, openBlock as s, createBlock as p, withCtx as t, createVNode as n, createTextVNode as f, createElementBlock as A, Fragment as B, renderList as $, unref as q, createCommentVNode as E, onBeforeMount as z, resolveDirective as G, withDirectives as K, toDisplayString as w } from "vue";
2
- const Y = [], M = {
1
+ import { defineComponent as Q, ref as b, inject as z, resolveComponent as o, openBlock as s, createBlock as c, withCtx as l, createVNode as e, createTextVNode as v, createElementBlock as O, Fragment as P, renderList as W, unref as B, createCommentVNode as S, nextTick as Z, onBeforeMount as ee, resolveDirective as X, withDirectives as G, toDisplayString as R, computed as le, onMounted as ie, createElementVNode as pe } from "vue";
2
+ import { ElMessage as Y } from "element-plus";
3
+ import { Http as te } from "@pangu-backend-ui/common";
4
+ import { defineStore as de } from "pinia";
5
+ const ce = [], ae = {
3
6
  OPEN_WEB: { name: "打开Web页面" },
4
7
  OPEN_VIEW: { name: "打开内置页面" },
5
8
  API_REQUEST: { name: "请求API" },
6
9
  EXEC_METHOD: { name: "执行方法" },
7
10
  CUSTOM: { name: "自定义" }
8
- }, Z = /* @__PURE__ */ W({
11
+ }, oe = {
12
+ OPEN_WEB: { name: "打开Web页面" },
13
+ OPEN_VIEW: { name: "打开内置页面" },
14
+ API_REQUEST: { name: "请求API" },
15
+ EXEC_METHOD: { name: "执行方法" },
16
+ CUSTOM: { name: "自定义" }
17
+ }, me = /* @__PURE__ */ Q({
9
18
  __name: "BannerDialog",
10
19
  emits: ["success"],
11
- setup(S, { expose: r, emit: d }) {
12
- const m = v(!1), a = v({
20
+ setup($, { expose: d, emit: f }) {
21
+ const g = b(!1), u = b({
13
22
  sceneCode: null,
14
23
  image: null,
15
24
  targetPath: null,
16
25
  clickEventType: "",
17
26
  params: null,
18
27
  shelfTimeArr: []
19
- }), U = v({
28
+ }), V = b({
20
29
  sceneCode: [{ required: !0, message: "请输入场景代码" }],
21
30
  image: [{ required: !0, message: "请上传图片" }],
22
31
  targetPath: [{ required: !0, message: "请输入目标地址" }],
23
32
  clickEventType: [{ required: !0, message: "请选择点击事件类型" }]
24
- }), k = v(!1), b = j("http"), V = v();
25
- function R() {
26
- var y;
27
- (y = V.value) == null || y.validate((e) => {
28
- if (e) {
29
- k.value = !0;
30
- let u = `/api/banner/${C.value ?? ""}/${C.value ? "update" : "create"}`, c = { ...a.value };
31
- a.value.shelfTimeArr.length && (c.shelfTime = a.value.shelfTimeArr[0], c.offShelfTime = a.value.shelfTimeArr[1]), b == null || b.post(u, c).then((h) => {
32
- var g;
33
- d("success"), (g = V.value) == null || g.resetFields(), m.value = !1;
33
+ }), C = b(!1), n = z("http"), N = b();
34
+ function D() {
35
+ var i;
36
+ (i = N.value) == null || i.validate((t) => {
37
+ if (t) {
38
+ C.value = !0;
39
+ let m = `/api/app/banner/${E.value ?? ""}/${E.value ? "update" : "create"}`, y = { ...u.value };
40
+ y.shelfTime = null, y.offShelfTime = null, u.value.shelfTimeArr.length && (y.shelfTime = u.value.shelfTimeArr[0], y.offShelfTime = u.value.shelfTimeArr[1]), n == null || n.post(m, y).then((_) => {
41
+ var w;
42
+ f("success"), (w = N.value) == null || w.resetFields(), g.value = !1;
34
43
  }).finally(() => {
35
- k.value = !1;
44
+ C.value = !1;
36
45
  });
37
46
  }
38
47
  });
39
48
  }
40
- const F = v([]), C = v(null);
41
- function N(y, e) {
42
- var u;
43
- F.value = y, C.value = null, (u = V.value) == null || u.resetFields(), e && (C.value = e.id, Object.assign(a.value, e), a.value.shelfTimeArr = [new Date(e.shelfTime), new Date(e.offShelfTime)]), m.value = !0;
44
- }
45
- return r({
46
- show: N
47
- }), (y, e) => {
48
- const u = o("el-option"), c = o("el-select"), h = o("el-form-item"), g = o("pg-upload"), P = o("el-input"), O = o("el-collapse-transition"), _ = o("el-date-picker"), L = o("el-form"), I = o("el-button"), x = o("el-dialog");
49
- return s(), p(x, {
50
- modelValue: m.value,
51
- "onUpdate:modelValue": e[6] || (e[6] = (i) => m.value = i),
52
- width: "400"
49
+ const U = b([]), E = b(null);
50
+ function x(i, t) {
51
+ U.value = i, E.value = null, g.value = !0, Z(() => {
52
+ t && (E.value = t.id, Object.assign(u.value, t), t.shelfTime && t.offShelfTime && (u.value.shelfTimeArr = [new Date(t.shelfTime), new Date(t.offShelfTime)]));
53
+ });
54
+ }
55
+ function I() {
56
+ var i;
57
+ (i = N.value) == null || i.resetFields();
58
+ }
59
+ return d({
60
+ show: x
61
+ }), (i, t) => {
62
+ const m = o("el-option"), y = o("el-select"), _ = o("el-form-item"), w = o("pg-upload"), H = o("el-input"), r = o("el-collapse-transition"), q = o("el-date-picker"), k = o("el-form"), h = o("el-button"), M = o("el-dialog");
63
+ return s(), c(M, {
64
+ modelValue: g.value,
65
+ "onUpdate:modelValue": t[6] || (t[6] = (p) => g.value = p),
66
+ width: "400",
67
+ onClosed: I
53
68
  }, {
54
- footer: t(() => [
55
- n(I, {
69
+ footer: l(() => [
70
+ e(h, {
56
71
  type: "primary",
57
- disabled: k.value,
58
- loading: k.value,
59
- onClick: R
72
+ disabled: C.value,
73
+ loading: C.value,
74
+ onClick: D
60
75
  }, {
61
- default: t(() => [
62
- f("提交")
76
+ default: l(() => [
77
+ v("提交")
63
78
  ]),
64
79
  _: 1
65
80
  }, 8, ["disabled", "loading"])
66
81
  ]),
67
- default: t(() => [
68
- n(L, {
82
+ default: l(() => [
83
+ e(k, {
69
84
  ref_key: "form",
70
- ref: V,
71
- rules: U.value,
72
- model: a.value,
85
+ ref: N,
86
+ rules: V.value,
87
+ model: u.value,
73
88
  "label-position": "top"
74
89
  }, {
75
- default: t(() => [
76
- n(h, {
90
+ default: l(() => [
91
+ e(_, {
77
92
  label: "场景代码",
78
93
  prop: "sceneCode"
79
94
  }, {
80
- default: t(() => [
81
- n(c, {
82
- modelValue: a.value.sceneCode,
83
- "onUpdate:modelValue": e[0] || (e[0] = (i) => a.value.sceneCode = i),
95
+ default: l(() => [
96
+ e(y, {
97
+ modelValue: u.value.sceneCode,
98
+ "onUpdate:modelValue": t[0] || (t[0] = (p) => u.value.sceneCode = p),
84
99
  placeholder: "请输入/选择场景代码",
85
100
  "allow-create": "",
86
101
  filterable: ""
87
102
  }, {
88
- default: t(() => [
89
- (s(!0), A(B, null, $(F.value, (i) => (s(), p(u, {
90
- key: i,
91
- value: i,
92
- label: i
103
+ default: l(() => [
104
+ (s(!0), O(P, null, W(U.value, (p) => (s(), c(m, {
105
+ key: p,
106
+ value: p,
107
+ label: p
93
108
  }, null, 8, ["value", "label"]))), 128))
94
109
  ]),
95
110
  _: 1
@@ -97,16 +112,16 @@ const Y = [], M = {
97
112
  ]),
98
113
  _: 1
99
114
  }),
100
- n(h, {
115
+ e(_, {
101
116
  label: "图片",
102
117
  prop: "image"
103
118
  }, {
104
- default: t(() => [
105
- (s(), p(g, {
119
+ default: l(() => [
120
+ (s(), c(w, {
106
121
  accept: "jpg,jpeg,png",
107
- modelValue: a.value.image,
108
- "onUpdate:modelValue": e[1] || (e[1] = (i) => a.value.image = i),
109
- key: `img_${C.value}`,
122
+ modelValue: u.value.image,
123
+ "onUpdate:modelValue": t[1] || (t[1] = (p) => u.value.image = p),
124
+ key: `img_${E.value}`,
110
125
  "list-type": "picture-card",
111
126
  "upload-type": "banner",
112
127
  limit: 1
@@ -114,20 +129,20 @@ const Y = [], M = {
114
129
  ]),
115
130
  _: 1
116
131
  }),
117
- n(h, {
132
+ e(_, {
118
133
  label: "点击事件类型",
119
134
  prop: "clickEventType"
120
135
  }, {
121
- default: t(() => [
122
- n(c, {
136
+ default: l(() => [
137
+ e(y, {
123
138
  placeholder: "请选择点击事件类型",
124
- modelValue: a.value.clickEventType,
125
- "onUpdate:modelValue": e[2] || (e[2] = (i) => a.value.clickEventType = i)
139
+ modelValue: u.value.clickEventType,
140
+ "onUpdate:modelValue": t[2] || (t[2] = (p) => u.value.clickEventType = p)
126
141
  }, {
127
- default: t(() => [
128
- (s(!0), A(B, null, $(q(M), (i, D) => (s(), p(u, {
129
- value: D,
130
- label: i.name
142
+ default: l(() => [
143
+ (s(!0), O(P, null, W(B(ae), (p, A) => (s(), c(m, {
144
+ value: A,
145
+ label: p.name
131
146
  }, null, 8, ["value", "label"]))), 256))
132
147
  ]),
133
148
  _: 1
@@ -135,48 +150,48 @@ const Y = [], M = {
135
150
  ]),
136
151
  _: 1
137
152
  }),
138
- n(O, null, {
139
- default: t(() => [
140
- ["OPEN_WEB", "OPEN_VIEW", "API_REQUEST"].indexOf(a.value.clickEventType) >= 0 ? (s(), p(h, {
153
+ e(r, null, {
154
+ default: l(() => [
155
+ ["OPEN_WEB", "OPEN_VIEW", "API_REQUEST"].indexOf(u.value.clickEventType) >= 0 ? (s(), c(_, {
141
156
  key: 0,
142
157
  label: "目标地址",
143
158
  prop: "targetPath"
144
159
  }, {
145
- default: t(() => [
146
- n(P, {
160
+ default: l(() => [
161
+ e(H, {
147
162
  placeholder: "请输入目标地址",
148
- modelValue: a.value.targetPath,
149
- "onUpdate:modelValue": e[3] || (e[3] = (i) => a.value.targetPath = i)
163
+ modelValue: u.value.targetPath,
164
+ "onUpdate:modelValue": t[3] || (t[3] = (p) => u.value.targetPath = p)
150
165
  }, null, 8, ["modelValue"])
151
166
  ]),
152
167
  _: 1
153
- })) : E("", !0)
168
+ })) : S("", !0)
154
169
  ]),
155
170
  _: 1
156
171
  }),
157
- n(h, {
172
+ e(_, {
158
173
  label: "目标地址参数",
159
174
  prop: "params"
160
175
  }, {
161
- default: t(() => [
162
- n(P, {
176
+ default: l(() => [
177
+ e(H, {
163
178
  type: "textarea",
164
- modelValue: a.value.params,
165
- "onUpdate:modelValue": e[4] || (e[4] = (i) => a.value.params = i),
179
+ modelValue: u.value.params,
180
+ "onUpdate:modelValue": t[4] || (t[4] = (p) => u.value.params = p),
166
181
  placeholder: "请输入JSON格式的参数对象"
167
182
  }, null, 8, ["modelValue"])
168
183
  ]),
169
184
  _: 1
170
185
  }),
171
- n(h, {
186
+ e(_, {
172
187
  label: "生效时段",
173
188
  prop: "shelfTimeArr"
174
189
  }, {
175
- default: t(() => [
176
- n(_, {
190
+ default: l(() => [
191
+ e(q, {
177
192
  type: "datetimerange",
178
- modelValue: a.value.shelfTimeArr,
179
- "onUpdate:modelValue": e[5] || (e[5] = (i) => a.value.shelfTimeArr = i),
193
+ modelValue: u.value.shelfTimeArr,
194
+ "onUpdate:modelValue": t[5] || (t[5] = (p) => u.value.shelfTimeArr = p),
180
195
  "start-placeholder": "上架时间",
181
196
  "end-placeholder": "下架时间",
182
197
  "default-time": [new Date(2e3, 1, 1, 0, 0, 0), new Date(2e3, 1, 1, 23, 59, 59)]
@@ -192,110 +207,110 @@ const Y = [], M = {
192
207
  }, 8, ["modelValue"]);
193
208
  };
194
209
  }
195
- }), ee = /* @__PURE__ */ W({
210
+ }), fe = /* @__PURE__ */ Q({
196
211
  __name: "BannerListView",
197
- setup(S) {
198
- const r = j("http"), d = v({
212
+ setup($) {
213
+ const d = z("http"), f = b({
199
214
  sceneCode: null,
200
215
  status: null
201
- }), m = v([]);
202
- function a() {
203
- r == null || r.get("/api/banner/all-scene-code").then((e) => {
204
- m.value = e.data;
216
+ }), g = b([]);
217
+ function u() {
218
+ d == null || d.get("/api/app/banner/all-scene-code").then((i) => {
219
+ g.value = i.data;
205
220
  });
206
221
  }
207
- const U = v(), k = v(!1);
208
- function b() {
209
- k.value = !!d.value.sceneCode, U.value.search();
222
+ const V = b(), C = b(!1);
223
+ function n() {
224
+ C.value = !!f.value.sceneCode, V.value.search();
210
225
  }
211
- function V(e) {
212
- r == null || r.post(`/api/banner/${e}/publish`).then((u) => {
213
- b();
226
+ function N(i) {
227
+ d == null || d.post(`/api/app/banner/${i}/publish`).then((t) => {
228
+ n();
214
229
  });
215
230
  }
216
- function R(e) {
217
- r == null || r.post(`/api/banner/${e}/off-shelf`).then((u) => {
218
- b();
231
+ function D(i) {
232
+ d == null || d.post(`/api/app/banner/${i}/off-shelf`).then((t) => {
233
+ n();
219
234
  });
220
235
  }
221
- function F(e, u) {
222
- r == null || r.post(`/api/banner/${e}/move-up`).then((c) => {
223
- d.value.sceneCode = u, b();
236
+ function U(i, t) {
237
+ d == null || d.post(`/api/app/banner/${i}/move-up`).then((m) => {
238
+ f.value.sceneCode = t, n();
224
239
  });
225
240
  }
226
- function C(e, u) {
227
- r == null || r.post(`/api/banner/${e}/move-down`).then((c) => {
228
- d.value.sceneCode = u, b();
241
+ function E(i, t) {
242
+ d == null || d.post(`/api/app/banner/${i}/move-down`).then((m) => {
243
+ f.value.sceneCode = t, n();
229
244
  });
230
245
  }
231
- z(() => {
232
- a();
246
+ ee(() => {
247
+ u();
233
248
  });
234
- const N = v();
235
- function y(e) {
236
- N.value.show(m.value, e);
237
- }
238
- return (e, u) => {
239
- const c = o("el-option"), h = o("el-select"), g = o("el-button"), P = o("el-space"), O = o("el-card"), _ = o("el-table-column"), L = o("el-image"), I = o("el-descriptions-item"), x = o("el-descriptions"), i = o("el-popover"), D = o("el-tag"), H = o("el-popconfirm"), Q = o("pg-table"), J = G("permission");
240
- return s(), A(B, null, [
241
- n(O, null, {
242
- default: t(() => [
243
- n(P, null, {
244
- default: t(() => [
245
- n(h, {
246
- modelValue: d.value.sceneCode,
247
- "onUpdate:modelValue": u[0] || (u[0] = (l) => d.value.sceneCode = l),
249
+ const x = b();
250
+ function I(i) {
251
+ x.value.show(g.value, i);
252
+ }
253
+ return (i, t) => {
254
+ const m = o("el-option"), y = o("el-select"), _ = o("el-button"), w = o("el-space"), H = o("el-card"), r = o("el-table-column"), q = o("el-image"), k = o("el-descriptions-item"), h = o("el-descriptions"), M = o("el-popover"), p = o("el-tag"), A = o("el-popconfirm"), L = o("pg-table"), J = X("permission");
255
+ return s(), O(P, null, [
256
+ e(H, null, {
257
+ default: l(() => [
258
+ e(w, null, {
259
+ default: l(() => [
260
+ e(y, {
261
+ modelValue: f.value.sceneCode,
262
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => f.value.sceneCode = a),
248
263
  placeholder: "场景代码",
249
264
  clearable: ""
250
265
  }, {
251
- default: t(() => [
252
- (s(!0), A(B, null, $(m.value, (l, T) => (s(), p(c, {
253
- label: l,
254
- value: l,
255
- key: `sc_con_${T}`
266
+ default: l(() => [
267
+ (s(!0), O(P, null, W(g.value, (a, F) => (s(), c(m, {
268
+ label: a,
269
+ value: a,
270
+ key: `sc_con_${F}`
256
271
  }, null, 8, ["label", "value"]))), 128))
257
272
  ]),
258
273
  _: 1
259
274
  }, 8, ["modelValue"]),
260
- n(h, {
261
- modelValue: d.value.status,
262
- "onUpdate:modelValue": u[1] || (u[1] = (l) => d.value.status = l),
275
+ e(y, {
276
+ modelValue: f.value.status,
277
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => f.value.status = a),
263
278
  placeholder: "状态",
264
279
  clearable: "",
265
280
  style: { width: "150px" }
266
281
  }, {
267
- default: t(() => [
268
- n(c, {
282
+ default: l(() => [
283
+ e(m, {
269
284
  label: "草稿",
270
285
  value: "DRAFT"
271
286
  }),
272
- n(c, {
287
+ e(m, {
273
288
  label: "已发布",
274
289
  value: "PUBLISH"
275
290
  }),
276
- n(c, {
291
+ e(m, {
277
292
  label: "已下架",
278
293
  value: "OFF_SHELF"
279
294
  })
280
295
  ]),
281
296
  _: 1
282
297
  }, 8, ["modelValue"]),
283
- n(g, {
298
+ e(_, {
284
299
  type: "primary",
285
300
  icon: "search",
286
- onClick: b
301
+ onClick: n
287
302
  }, {
288
- default: t(() => [
289
- f("搜索")
303
+ default: l(() => [
304
+ v("搜索")
290
305
  ]),
291
306
  _: 1
292
307
  }),
293
- K((s(), p(g, {
308
+ G((s(), c(_, {
294
309
  icon: "plus",
295
- onClick: u[2] || (u[2] = (l) => y())
310
+ onClick: t[2] || (t[2] = (a) => I())
296
311
  }, {
297
- default: t(() => [
298
- f("创建Banner")
312
+ default: l(() => [
313
+ v("创建Banner")
299
314
  ]),
300
315
  _: 1
301
316
  })), [
@@ -307,231 +322,1500 @@ const Y = [], M = {
307
322
  ]),
308
323
  _: 1
309
324
  }),
310
- n(Q, {
325
+ e(L, {
311
326
  ref_key: "table",
312
- ref: U,
313
- "data-url": "/api/banner/page",
314
- onRowDbClick: u[3] || (u[3] = (l) => e.$hasPer("UPDATE_BANNER") ? y(l) : null),
315
- condition: d.value,
327
+ ref: V,
328
+ "data-url": "/api/app/banner/page",
329
+ onRowDbClick: t[3] || (t[3] = (a) => i.$hasPer("UPDATE_BANNER") ? I(a) : null),
330
+ condition: f.value,
316
331
  style: { "margin-top": "10px" }
317
332
  }, {
318
- default: t(() => [
319
- k.value && e.$hasPer("BANNER_SEQ_MOVE_UP_DOWN") ? (s(), p(_, {
333
+ default: l(() => [
334
+ C.value && i.$hasPer("BANNER_SEQ_MOVE_UP_DOWN") ? (s(), c(r, {
320
335
  key: 0,
321
336
  align: "center",
322
337
  width: "80"
323
338
  }, {
324
- default: t(({ row: l }) => [
325
- n(P, { direction: "vertical" }, {
326
- default: t(() => [
327
- n(g, {
339
+ default: l(({ row: a }) => [
340
+ e(w, { direction: "vertical" }, {
341
+ default: l(() => [
342
+ e(_, {
328
343
  icon: "ArrowUpBold",
329
- onClick: (T) => F(l.id, l.sceneCode)
344
+ onClick: (F) => U(a.id, a.sceneCode)
330
345
  }, null, 8, ["onClick"]),
331
- n(g, {
346
+ e(_, {
332
347
  icon: "ArrowDownBold",
333
- onClick: (T) => C(l.id, l.sceneCode)
348
+ onClick: (F) => E(a.id, a.sceneCode)
334
349
  }, null, 8, ["onClick"])
335
350
  ]),
336
351
  _: 2
337
352
  }, 1024)
338
353
  ]),
339
354
  _: 1
340
- })) : E("", !0),
341
- n(_, {
355
+ })) : S("", !0),
356
+ e(r, {
342
357
  label: "场景代码",
343
358
  prop: "sceneCode",
344
359
  width: "150"
345
360
  }),
346
- n(_, {
361
+ e(r, {
347
362
  label: "图片",
348
363
  width: "300",
349
364
  align: "center"
350
365
  }, {
351
- default: t(({ row: l }) => [
352
- n(L, {
353
- src: l.image,
366
+ default: l(({ row: a }) => [
367
+ e(q, {
368
+ src: a.image,
354
369
  style: { "max-width": "300px" },
355
- "preview-src-list": [l.image],
370
+ "preview-src-list": [a.image],
356
371
  "preview-teleported": ""
357
372
  }, null, 8, ["src", "preview-src-list"])
358
373
  ]),
359
374
  _: 1
360
375
  }),
361
- n(_, {
376
+ e(r, {
362
377
  label: "点击事件类型",
363
378
  prop: "clickEventType",
364
379
  width: "120"
365
380
  }, {
366
- default: t(({ row: l }) => [
367
- f(w(l.clickEventType ? q(M)[l.clickEventType].name : ""), 1)
381
+ default: l(({ row: a }) => [
382
+ v(R(a.clickEventType ? B(ae)[a.clickEventType].name : ""), 1)
368
383
  ]),
369
384
  _: 1
370
385
  }),
371
- n(_, {
386
+ e(r, {
372
387
  label: "目标地址",
373
388
  prop: "targetPath",
374
389
  "show-overflow-tooltip": ""
375
390
  }),
376
- n(_, {
391
+ e(r, {
377
392
  label: "目标参数",
378
393
  width: "120",
379
394
  "show-overflow-tooltip": ""
380
395
  }, {
381
- default: t(({ row: l }) => [
382
- l.params ? (s(), p(i, {
396
+ default: l(({ row: a }) => [
397
+ a.params ? (s(), c(M, {
383
398
  key: 0,
384
399
  trigger: "hover",
385
400
  width: "350"
386
401
  }, {
387
- reference: t(() => [
388
- f(w(l.params.substring(0, 100)) + w(l.params.length > 100 ? "..." : ""), 1)
402
+ reference: l(() => [
403
+ v(R(a.params.substring(0, 100)) + R(a.params.length > 100 ? "..." : ""), 1)
389
404
  ]),
390
- default: t(() => [
391
- l.params.startsWith("{") ? (s(), p(x, {
405
+ default: l(() => [
406
+ a.params.startsWith("{") ? (s(), c(h, {
392
407
  key: 0,
393
408
  column: "1",
394
409
  border: ""
395
410
  }, {
396
- default: t(() => [
397
- (s(!0), A(B, null, $(JSON.parse(l.params), (T, X) => (s(), p(I, {
398
- label: X,
411
+ default: l(() => [
412
+ (s(!0), O(P, null, W(JSON.parse(a.params), (F, j) => (s(), c(k, {
413
+ label: j,
399
414
  "min-width": "150"
400
415
  }, {
401
- default: t(() => [
402
- f(w(T), 1)
416
+ default: l(() => [
417
+ v(R(F), 1)
403
418
  ]),
404
419
  _: 2
405
420
  }, 1032, ["label"]))), 256))
406
421
  ]),
407
422
  _: 2
408
- }, 1024)) : (s(), A(B, { key: 1 }, [
409
- f(w(l.params), 1)
423
+ }, 1024)) : (s(), O(P, { key: 1 }, [
424
+ v(R(a.params), 1)
410
425
  ], 64))
411
426
  ]),
412
427
  _: 2
413
- }, 1024)) : E("", !0)
428
+ }, 1024)) : S("", !0)
414
429
  ]),
415
430
  _: 1
416
431
  }),
417
- n(_, {
432
+ e(r, {
418
433
  label: "上架时间",
419
434
  prop: "shelfTime",
420
435
  width: "180",
421
436
  align: "center"
422
437
  }),
423
- n(_, {
438
+ e(r, {
424
439
  label: "下架时间",
425
440
  prop: "offShelfTime",
426
441
  width: "180",
427
442
  align: "center"
428
443
  }),
429
- n(_, {
444
+ e(r, {
430
445
  label: "状态",
431
446
  align: "center",
432
447
  width: "88"
433
448
  }, {
434
- default: t(({ row: l }) => [
435
- l.status == "DRAFT" ? (s(), p(D, {
449
+ default: l(({ row: a }) => [
450
+ a.status == "DRAFT" ? (s(), c(p, {
436
451
  key: 0,
437
452
  type: "danger"
438
453
  }, {
439
- default: t(() => [
440
- f("草稿")
454
+ default: l(() => [
455
+ v("草稿")
441
456
  ]),
442
457
  _: 1
443
- })) : E("", !0),
444
- l.status == "PUBLISH" ? (s(), p(D, {
458
+ })) : S("", !0),
459
+ a.status == "PUBLISH" ? (s(), c(p, {
445
460
  key: 1,
446
461
  type: "success"
447
462
  }, {
448
- default: t(() => [
449
- f("已发布")
463
+ default: l(() => [
464
+ v("已发布")
450
465
  ]),
451
466
  _: 1
452
- })) : E("", !0),
453
- l.status == "OFF_SHELF" ? (s(), p(D, {
467
+ })) : S("", !0),
468
+ a.status == "OFF_SHELF" ? (s(), c(p, {
454
469
  key: 2,
455
470
  type: "warning"
456
471
  }, {
457
- default: t(() => [
458
- f("已下架")
472
+ default: l(() => [
473
+ v("已下架")
459
474
  ]),
460
475
  _: 1
461
- })) : E("", !0)
476
+ })) : S("", !0)
462
477
  ]),
463
478
  _: 1
464
479
  }),
465
- n(_, {
480
+ e(r, {
466
481
  align: "center",
467
482
  width: "90"
468
483
  }, {
469
- default: t(({ row: l }) => [
470
- ["DRAFT", "OFF_SHELF"].indexOf(l.status) >= 0 && e.$hasPer("BANNER_PUBLISH") ? (s(), p(H, {
484
+ default: l(({ row: a }) => [
485
+ ["DRAFT", "OFF_SHELF"].indexOf(a.status) >= 0 && i.$hasPer("BANNER_PUBLISH") ? (s(), c(A, {
471
486
  key: 0,
472
- onConfirm: (T) => V(l.id),
473
- title: `确定要${l.status == "DRAFT" ? "发布" : "上架"}该Banner吗?`
487
+ onConfirm: (F) => N(a.id),
488
+ title: `确定要${a.status == "DRAFT" ? "发布" : "上架"}该Banner吗?`
474
489
  }, {
475
- reference: t(() => [
476
- n(g, { type: "success" }, {
477
- default: t(() => [
478
- f(w(l.status == "DRAFT" ? "发布" : "上架"), 1)
490
+ reference: l(() => [
491
+ e(_, { type: "success" }, {
492
+ default: l(() => [
493
+ v(R(a.status == "DRAFT" ? "发布" : "上架"), 1)
479
494
  ]),
480
495
  _: 2
481
496
  }, 1024)
482
497
  ]),
483
498
  _: 2
484
- }, 1032, ["onConfirm", "title"])) : E("", !0),
485
- l.status == "PUBLISH" && e.$hasPer("BANNER_OFF_SHELF") ? (s(), p(H, {
499
+ }, 1032, ["onConfirm", "title"])) : S("", !0),
500
+ a.status == "PUBLISH" && i.$hasPer("BANNER_OFF_SHELF") ? (s(), c(A, {
486
501
  key: 1,
487
- onConfirm: (T) => R(l.id),
502
+ onConfirm: (F) => D(a.id),
488
503
  title: "确定要[下架]该Banner吗?"
489
504
  }, {
490
- reference: t(() => [
491
- n(g, { type: "warning" }, {
492
- default: t(() => [
493
- f("下架")
505
+ reference: l(() => [
506
+ e(_, { type: "warning" }, {
507
+ default: l(() => [
508
+ v("下架")
494
509
  ]),
495
510
  _: 1
496
511
  })
497
512
  ]),
498
513
  _: 2
499
- }, 1032, ["onConfirm"])) : E("", !0)
514
+ }, 1032, ["onConfirm"])) : S("", !0)
500
515
  ]),
501
516
  _: 1
502
517
  })
503
518
  ]),
504
519
  _: 1
505
520
  }, 8, ["condition"]),
506
- n(Z, {
521
+ e(me, {
507
522
  ref_key: "bannerDialog",
508
- ref: N,
509
- onSuccess: b
523
+ ref: x,
524
+ onSuccess: n
510
525
  }, null, 512)
511
526
  ], 64);
512
527
  };
513
528
  }
514
- }), le = {
515
- install: (S, r) => {
516
- let d = r.router, m = d.getRoutes().find((a) => a.path == "/");
517
- m && m.meta && d.addRoute({
518
- path: "/terminal/banner",
519
- name: "TerminalBanner",
520
- redirect: "/terminal/banner/list",
521
- component: m.meta.commonLayout,
529
+ }), _e = /* @__PURE__ */ Q({
530
+ __name: "EntranceDialog",
531
+ emits: ["success"],
532
+ setup($, { expose: d, emit: f }) {
533
+ const g = b(!1), u = b({
534
+ sceneCode: null,
535
+ name: null,
536
+ iconType: "NAME",
537
+ icon: null,
538
+ targetPath: null,
539
+ clickEventType: "",
540
+ params: null,
541
+ shelfTimeArr: []
542
+ }), V = b({
543
+ sceneCode: [{ required: !0, message: "请输入场景代码" }],
544
+ name: [{ required: !0, message: "请输入入口名称" }],
545
+ iconType: [{ required: !0, message: "请选择图标类型" }],
546
+ icon: [{ required: !0, message: `请${u.value.iconType == "NAME" ? "输入图标名称" : "上传图标图片"}` }],
547
+ targetPath: [{ required: !0, message: "请输入目标地址" }],
548
+ clickEventType: [{ required: !0, message: "请选择点击事件类型" }]
549
+ }), C = b(!1), n = z("http"), N = b();
550
+ function D() {
551
+ var i;
552
+ (i = N.value) == null || i.validate((t) => {
553
+ if (t) {
554
+ C.value = !0;
555
+ let m = `/api/app/entrance/${E.value ?? ""}/${E.value ? "update" : "create"}`, y = { ...u.value };
556
+ y.shelfTime = null, y.offShelfTime = null, u.value.shelfTimeArr.length && (y.shelfTime = u.value.shelfTimeArr[0], y.offShelfTime = u.value.shelfTimeArr[1]), n == null || n.post(m, y).then((_) => {
557
+ var w;
558
+ f("success"), (w = N.value) == null || w.resetFields(), g.value = !1;
559
+ }).finally(() => {
560
+ C.value = !1;
561
+ });
562
+ }
563
+ });
564
+ }
565
+ const U = b([]), E = b(null);
566
+ function x(i, t) {
567
+ U.value = i, E.value = null, g.value = !0, Z(() => {
568
+ t && (E.value = t.id, Object.assign(u.value, t), t.shelfTime && t.offShelfTime && (u.value.shelfTimeArr = [new Date(t.shelfTime), new Date(t.offShelfTime)]));
569
+ });
570
+ }
571
+ function I() {
572
+ var i;
573
+ (i = N.value) == null || i.resetFields();
574
+ }
575
+ return d({
576
+ show: x
577
+ }), (i, t) => {
578
+ const m = o("el-option"), y = o("el-select"), _ = o("el-form-item"), w = o("el-input"), H = o("pg-upload"), r = o("el-collapse-transition"), q = o("el-date-picker"), k = o("el-form"), h = o("el-button"), M = o("el-dialog");
579
+ return s(), c(M, {
580
+ modelValue: g.value,
581
+ "onUpdate:modelValue": t[9] || (t[9] = (p) => g.value = p),
582
+ width: "400",
583
+ onClose: I
584
+ }, {
585
+ footer: l(() => [
586
+ e(h, {
587
+ type: "primary",
588
+ disabled: C.value,
589
+ loading: C.value,
590
+ onClick: D
591
+ }, {
592
+ default: l(() => [
593
+ v("提交")
594
+ ]),
595
+ _: 1
596
+ }, 8, ["disabled", "loading"])
597
+ ]),
598
+ default: l(() => [
599
+ e(k, {
600
+ ref_key: "form",
601
+ ref: N,
602
+ rules: V.value,
603
+ model: u.value,
604
+ "label-position": "top"
605
+ }, {
606
+ default: l(() => [
607
+ e(_, {
608
+ label: "场景代码",
609
+ prop: "sceneCode"
610
+ }, {
611
+ default: l(() => [
612
+ e(y, {
613
+ modelValue: u.value.sceneCode,
614
+ "onUpdate:modelValue": t[0] || (t[0] = (p) => u.value.sceneCode = p),
615
+ placeholder: "请输入/选择场景代码",
616
+ "allow-create": "",
617
+ filterable: ""
618
+ }, {
619
+ default: l(() => [
620
+ (s(!0), O(P, null, W(U.value, (p) => (s(), c(m, {
621
+ key: p,
622
+ value: p,
623
+ label: p
624
+ }, null, 8, ["value", "label"]))), 128))
625
+ ]),
626
+ _: 1
627
+ }, 8, ["modelValue"])
628
+ ]),
629
+ _: 1
630
+ }),
631
+ e(_, {
632
+ label: "入口名称",
633
+ prop: "name"
634
+ }, {
635
+ default: l(() => [
636
+ e(w, {
637
+ placeholder: "请输入入口名称",
638
+ modelValue: u.value.name,
639
+ "onUpdate:modelValue": t[1] || (t[1] = (p) => u.value.name = p)
640
+ }, null, 8, ["modelValue"])
641
+ ]),
642
+ _: 1
643
+ }),
644
+ e(_, {
645
+ label: "图标类型",
646
+ prop: "iconType"
647
+ }, {
648
+ default: l(() => [
649
+ e(y, {
650
+ placeholder: "请选择图标类型",
651
+ modelValue: u.value.iconType,
652
+ "onUpdate:modelValue": t[2] || (t[2] = (p) => u.value.iconType = p)
653
+ }, {
654
+ default: l(() => [
655
+ e(m, {
656
+ value: "NAME",
657
+ label: "图标名称"
658
+ }),
659
+ e(m, {
660
+ value: "URL",
661
+ label: "图标URL"
662
+ })
663
+ ]),
664
+ _: 1
665
+ }, 8, ["modelValue"])
666
+ ]),
667
+ _: 1
668
+ }),
669
+ e(_, {
670
+ label: "图标",
671
+ prop: "icon"
672
+ }, {
673
+ default: l(() => [
674
+ u.value.iconType == "URL" ? (s(), c(H, {
675
+ accept: "jpg,jpeg,png,gif",
676
+ modelValue: u.value.icon,
677
+ "onUpdate:modelValue": t[3] || (t[3] = (p) => u.value.icon = p),
678
+ key: `img_${E.value}`,
679
+ "list-type": "picture-card",
680
+ "upload-type": "entrance",
681
+ limit: 1
682
+ }, null, 8, ["modelValue"])) : (s(), c(w, {
683
+ key: 1,
684
+ modelValue: u.value.icon,
685
+ "onUpdate:modelValue": t[4] || (t[4] = (p) => u.value.icon = p),
686
+ placeholder: "请输入图标名称",
687
+ clearable: ""
688
+ }, null, 8, ["modelValue"]))
689
+ ]),
690
+ _: 1
691
+ }),
692
+ e(_, {
693
+ label: "点击事件类型",
694
+ prop: "clickEventType"
695
+ }, {
696
+ default: l(() => [
697
+ e(y, {
698
+ placeholder: "请选择点击事件类型",
699
+ modelValue: u.value.clickEventType,
700
+ "onUpdate:modelValue": t[5] || (t[5] = (p) => u.value.clickEventType = p)
701
+ }, {
702
+ default: l(() => [
703
+ (s(!0), O(P, null, W(B(oe), (p, A) => (s(), c(m, {
704
+ value: A,
705
+ label: p.name
706
+ }, null, 8, ["value", "label"]))), 256))
707
+ ]),
708
+ _: 1
709
+ }, 8, ["modelValue"])
710
+ ]),
711
+ _: 1
712
+ }),
713
+ e(r, null, {
714
+ default: l(() => [
715
+ ["OPEN_WEB", "OPEN_VIEW", "API_REQUEST"].indexOf(u.value.clickEventType) >= 0 ? (s(), c(_, {
716
+ key: 0,
717
+ label: "目标地址",
718
+ prop: "targetPath"
719
+ }, {
720
+ default: l(() => [
721
+ e(w, {
722
+ placeholder: "请输入目标地址",
723
+ modelValue: u.value.targetPath,
724
+ "onUpdate:modelValue": t[6] || (t[6] = (p) => u.value.targetPath = p)
725
+ }, null, 8, ["modelValue"])
726
+ ]),
727
+ _: 1
728
+ })) : S("", !0)
729
+ ]),
730
+ _: 1
731
+ }),
732
+ e(_, {
733
+ label: "目标地址参数",
734
+ prop: "params"
735
+ }, {
736
+ default: l(() => [
737
+ e(w, {
738
+ type: "textarea",
739
+ modelValue: u.value.params,
740
+ "onUpdate:modelValue": t[7] || (t[7] = (p) => u.value.params = p),
741
+ placeholder: "请输入JSON格式的参数对象"
742
+ }, null, 8, ["modelValue"])
743
+ ]),
744
+ _: 1
745
+ }),
746
+ e(_, {
747
+ label: "生效时段",
748
+ prop: "shelfTimeArr"
749
+ }, {
750
+ default: l(() => [
751
+ e(q, {
752
+ type: "datetimerange",
753
+ modelValue: u.value.shelfTimeArr,
754
+ "onUpdate:modelValue": t[8] || (t[8] = (p) => u.value.shelfTimeArr = p),
755
+ "start-placeholder": "上架时间",
756
+ "end-placeholder": "下架时间",
757
+ "default-time": [new Date(2e3, 1, 1, 0, 0, 0), new Date(2e3, 1, 1, 23, 59, 59)]
758
+ }, null, 8, ["modelValue", "default-time"])
759
+ ]),
760
+ _: 1
761
+ })
762
+ ]),
763
+ _: 1
764
+ }, 8, ["rules", "model"])
765
+ ]),
766
+ _: 1
767
+ }, 8, ["modelValue"]);
768
+ };
769
+ }
770
+ }), ve = /* @__PURE__ */ Q({
771
+ __name: "EntranceListView",
772
+ setup($) {
773
+ const d = z("http"), f = b({
774
+ sceneCode: null,
775
+ status: null
776
+ }), g = b([]);
777
+ function u() {
778
+ d == null || d.get("/api/app/entrance/all-scene-code").then((i) => {
779
+ g.value = i.data;
780
+ });
781
+ }
782
+ const V = b(), C = b(!1);
783
+ function n() {
784
+ C.value = !!f.value.sceneCode, V.value.search();
785
+ }
786
+ function N(i) {
787
+ d == null || d.post(`/api/app/entrance/${i}/publish`).then((t) => {
788
+ n();
789
+ });
790
+ }
791
+ function D(i) {
792
+ d == null || d.post(`/api/app/entrance/${i}/off-shelf`).then((t) => {
793
+ n();
794
+ });
795
+ }
796
+ function U(i, t) {
797
+ d == null || d.post(`/api/app/entrance/${i}/move-up`).then((m) => {
798
+ f.value.sceneCode = t, n();
799
+ });
800
+ }
801
+ function E(i, t) {
802
+ d == null || d.post(`/api/app/entrance/${i}/move-down`).then((m) => {
803
+ f.value.sceneCode = t, n();
804
+ });
805
+ }
806
+ ee(() => {
807
+ u();
808
+ });
809
+ const x = b();
810
+ function I(i) {
811
+ x.value.show(g.value, i);
812
+ }
813
+ return (i, t) => {
814
+ const m = o("el-option"), y = o("el-select"), _ = o("el-button"), w = o("el-space"), H = o("el-card"), r = o("el-table-column"), q = o("el-image"), k = o("el-descriptions-item"), h = o("el-descriptions"), M = o("el-popover"), p = o("el-tag"), A = o("el-popconfirm"), L = o("pg-table"), J = X("permission");
815
+ return s(), O(P, null, [
816
+ e(H, null, {
817
+ default: l(() => [
818
+ e(w, null, {
819
+ default: l(() => [
820
+ e(y, {
821
+ modelValue: f.value.sceneCode,
822
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => f.value.sceneCode = a),
823
+ placeholder: "场景代码",
824
+ clearable: ""
825
+ }, {
826
+ default: l(() => [
827
+ (s(!0), O(P, null, W(g.value, (a, F) => (s(), c(m, {
828
+ label: a,
829
+ value: a,
830
+ key: `sc_con_${F}`
831
+ }, null, 8, ["label", "value"]))), 128))
832
+ ]),
833
+ _: 1
834
+ }, 8, ["modelValue"]),
835
+ e(y, {
836
+ modelValue: f.value.status,
837
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => f.value.status = a),
838
+ placeholder: "状态",
839
+ clearable: "",
840
+ style: { width: "150px" }
841
+ }, {
842
+ default: l(() => [
843
+ e(m, {
844
+ label: "草稿",
845
+ value: "DRAFT"
846
+ }),
847
+ e(m, {
848
+ label: "已发布",
849
+ value: "PUBLISH"
850
+ }),
851
+ e(m, {
852
+ label: "已下架",
853
+ value: "OFF_SHELF"
854
+ })
855
+ ]),
856
+ _: 1
857
+ }, 8, ["modelValue"]),
858
+ e(_, {
859
+ type: "primary",
860
+ icon: "search",
861
+ onClick: n
862
+ }, {
863
+ default: l(() => [
864
+ v("搜索")
865
+ ]),
866
+ _: 1
867
+ }),
868
+ G((s(), c(_, {
869
+ icon: "plus",
870
+ onClick: t[2] || (t[2] = (a) => I())
871
+ }, {
872
+ default: l(() => [
873
+ v("创建入口")
874
+ ]),
875
+ _: 1
876
+ })), [
877
+ [J, "CREATE_ENTRANCE"]
878
+ ])
879
+ ]),
880
+ _: 1
881
+ })
882
+ ]),
883
+ _: 1
884
+ }),
885
+ e(L, {
886
+ ref_key: "table",
887
+ ref: V,
888
+ "data-url": "/api/app/entrance/page",
889
+ onRowDbClick: t[3] || (t[3] = (a) => i.$hasPer("UPDATE_ENTRANCE") ? I(a) : null),
890
+ condition: f.value,
891
+ style: { "margin-top": "10px" }
892
+ }, {
893
+ default: l(() => [
894
+ C.value && i.$hasPer("ENTRANCE_SEQ_MOVE_UP_DOWN") ? (s(), c(r, {
895
+ key: 0,
896
+ align: "center",
897
+ width: "80"
898
+ }, {
899
+ default: l(({ row: a }) => [
900
+ e(w, { direction: "vertical" }, {
901
+ default: l(() => [
902
+ e(_, {
903
+ icon: "ArrowUpBold",
904
+ onClick: (F) => U(a.id, a.sceneCode)
905
+ }, null, 8, ["onClick"]),
906
+ e(_, {
907
+ icon: "ArrowDownBold",
908
+ onClick: (F) => E(a.id, a.sceneCode)
909
+ }, null, 8, ["onClick"])
910
+ ]),
911
+ _: 2
912
+ }, 1024)
913
+ ]),
914
+ _: 1
915
+ })) : S("", !0),
916
+ e(r, {
917
+ label: "场景代码",
918
+ prop: "sceneCode",
919
+ width: "150"
920
+ }),
921
+ e(r, {
922
+ label: "图标",
923
+ width: "200",
924
+ align: "center"
925
+ }, {
926
+ default: l(({ row: a }) => [
927
+ a.iconType == "URL" ? (s(), c(q, {
928
+ key: 0,
929
+ src: a.icon,
930
+ style: { "max-width": "200px" },
931
+ "preview-src-list": [a.icon],
932
+ "preview-teleported": ""
933
+ }, null, 8, ["src", "preview-src-list"])) : (s(), O(P, { key: 1 }, [
934
+ v(R(a.icon), 1)
935
+ ], 64))
936
+ ]),
937
+ _: 1
938
+ }),
939
+ e(r, {
940
+ label: "点击事件类型",
941
+ prop: "clickEventType",
942
+ width: "120"
943
+ }, {
944
+ default: l(({ row: a }) => [
945
+ v(R(a.clickEventType ? B(oe)[a.clickEventType].name : ""), 1)
946
+ ]),
947
+ _: 1
948
+ }),
949
+ e(r, {
950
+ label: "目标地址",
951
+ prop: "targetPath",
952
+ "show-overflow-tooltip": ""
953
+ }),
954
+ e(r, {
955
+ label: "目标参数",
956
+ width: "120",
957
+ "show-overflow-tooltip": ""
958
+ }, {
959
+ default: l(({ row: a }) => [
960
+ a.params ? (s(), c(M, {
961
+ key: 0,
962
+ trigger: "hover",
963
+ width: "350"
964
+ }, {
965
+ reference: l(() => [
966
+ v(R(a.params.substring(0, 100)) + R(a.params.length > 100 ? "..." : ""), 1)
967
+ ]),
968
+ default: l(() => [
969
+ a.params.startsWith("{") ? (s(), c(h, {
970
+ key: 0,
971
+ column: "1",
972
+ border: ""
973
+ }, {
974
+ default: l(() => [
975
+ (s(!0), O(P, null, W(JSON.parse(a.params), (F, j) => (s(), c(k, {
976
+ label: j,
977
+ "min-width": "150"
978
+ }, {
979
+ default: l(() => [
980
+ v(R(F), 1)
981
+ ]),
982
+ _: 2
983
+ }, 1032, ["label"]))), 256))
984
+ ]),
985
+ _: 2
986
+ }, 1024)) : (s(), O(P, { key: 1 }, [
987
+ v(R(a.params), 1)
988
+ ], 64))
989
+ ]),
990
+ _: 2
991
+ }, 1024)) : S("", !0)
992
+ ]),
993
+ _: 1
994
+ }),
995
+ e(r, {
996
+ label: "上架时间",
997
+ prop: "shelfTime",
998
+ width: "180",
999
+ align: "center"
1000
+ }),
1001
+ e(r, {
1002
+ label: "下架时间",
1003
+ prop: "offShelfTime",
1004
+ width: "180",
1005
+ align: "center"
1006
+ }),
1007
+ e(r, {
1008
+ label: "状态",
1009
+ align: "center",
1010
+ width: "88"
1011
+ }, {
1012
+ default: l(({ row: a }) => [
1013
+ a.status == "DRAFT" ? (s(), c(p, {
1014
+ key: 0,
1015
+ type: "danger"
1016
+ }, {
1017
+ default: l(() => [
1018
+ v("草稿")
1019
+ ]),
1020
+ _: 1
1021
+ })) : S("", !0),
1022
+ a.status == "PUBLISH" ? (s(), c(p, {
1023
+ key: 1,
1024
+ type: "success"
1025
+ }, {
1026
+ default: l(() => [
1027
+ v("已发布")
1028
+ ]),
1029
+ _: 1
1030
+ })) : S("", !0),
1031
+ a.status == "OFF_SHELF" ? (s(), c(p, {
1032
+ key: 2,
1033
+ type: "warning"
1034
+ }, {
1035
+ default: l(() => [
1036
+ v("已下架")
1037
+ ]),
1038
+ _: 1
1039
+ })) : S("", !0)
1040
+ ]),
1041
+ _: 1
1042
+ }),
1043
+ e(r, {
1044
+ align: "center",
1045
+ width: "90"
1046
+ }, {
1047
+ default: l(({ row: a }) => [
1048
+ ["DRAFT", "OFF_SHELF"].indexOf(a.status) >= 0 && i.$hasPer("ENTRANCE_PUBLISH") ? (s(), c(A, {
1049
+ key: 0,
1050
+ onConfirm: (F) => N(a.id),
1051
+ title: `确定要${a.status == "DRAFT" ? "发布" : "上架"}该入口吗?`
1052
+ }, {
1053
+ reference: l(() => [
1054
+ e(_, { type: "success" }, {
1055
+ default: l(() => [
1056
+ v(R(a.status == "DRAFT" ? "发布" : "上架"), 1)
1057
+ ]),
1058
+ _: 2
1059
+ }, 1024)
1060
+ ]),
1061
+ _: 2
1062
+ }, 1032, ["onConfirm", "title"])) : S("", !0),
1063
+ a.status == "PUBLISH" && i.$hasPer("ENTRANCE_OFF_SHELF") ? (s(), c(A, {
1064
+ key: 1,
1065
+ onConfirm: (F) => D(a.id),
1066
+ title: "确定要[下架]该入口吗?"
1067
+ }, {
1068
+ reference: l(() => [
1069
+ e(_, { type: "warning" }, {
1070
+ default: l(() => [
1071
+ v("下架")
1072
+ ]),
1073
+ _: 1
1074
+ })
1075
+ ]),
1076
+ _: 2
1077
+ }, 1032, ["onConfirm"])) : S("", !0)
1078
+ ]),
1079
+ _: 1
1080
+ })
1081
+ ]),
1082
+ _: 1
1083
+ }, 8, ["condition"]),
1084
+ e(_e, {
1085
+ ref_key: "entranceDialog",
1086
+ ref: x,
1087
+ onSuccess: n
1088
+ }, null, 512)
1089
+ ], 64);
1090
+ };
1091
+ }
1092
+ }), ne = de("pg-app-util-core-config-store", () => {
1093
+ const $ = [];
1094
+ return {
1095
+ defaultTesterUserIds: le(() => $)
1096
+ };
1097
+ });
1098
+ const ge = ($, d) => {
1099
+ const f = $.__vccOpts || $;
1100
+ for (const [g, u] of d)
1101
+ f[g] = u;
1102
+ return f;
1103
+ }, be = { class: "dialog-footer" }, he = {
1104
+ __name: "VersionDialog",
1105
+ emits: ["success"],
1106
+ setup($, { expose: d, emit: f }) {
1107
+ const g = z < te > "http", u = b("CREATE"), V = le(() => u.value === "EDIT"), C = b(!1), n = b({
1108
+ appCode: null,
1109
+ platform: "ANDROID",
1110
+ versionName: null,
1111
+ versionNumber: null,
1112
+ category: "SELF",
1113
+ isForce: !1,
1114
+ isHot: !0,
1115
+ activationTime: null,
1116
+ pkgUrl: null,
1117
+ wgtUrl: null,
1118
+ description: null,
1119
+ testerIdJsonStr: ""
1120
+ }), N = b(), D = ne();
1121
+ ie(() => {
1122
+ D.defaultTesterUserIds.length && (n.value.testerIdJsonStr = D.defaultTesterUserIds.join(","));
1123
+ });
1124
+ let U = null;
1125
+ const E = b(!1);
1126
+ async function x(k) {
1127
+ C.value = !0, u.value = k ? "EDIT" : "CREATE", U = k, k && (E.value = k.status == "RELEASE", console.log(k.status), Object.assign(n.value, k), k.testerIdJsonStr && (n.value.testerIdJsonStr = JSON.parse(k.testerIdJsonStr).join(",")), N.value = k.isHot ? k.wgtUrl : k.pkgUrl), await q(), k && _(k.appCode);
1128
+ }
1129
+ function I(k) {
1130
+ n.value.isHot ? n.value.wgtUrl = k.fileUrl : n.value.pkgUrl = k.fileUrl;
1131
+ }
1132
+ function i() {
1133
+ n.value = {
1134
+ appCode: null,
1135
+ platform: "ANDROID",
1136
+ versionName: null,
1137
+ category: "SELF",
1138
+ isForce: !1,
1139
+ isHot: !0,
1140
+ activationTime: null,
1141
+ pkgUrl: null,
1142
+ wgtUrl: null,
1143
+ testerIdJsonStr: ""
1144
+ };
1145
+ }
1146
+ function t() {
1147
+ C.value = !C.value;
1148
+ }
1149
+ const m = b();
1150
+ function y() {
1151
+ m.value.validate((k) => {
1152
+ k && (V.value ? g.post(`/api/app/version/${U.id}`, {
1153
+ ...n.value,
1154
+ testerIdJsonStr: n.value.testerIdJsonStr ? JSON.stringify(JSON.parse("[" + n.value.testerIdJsonStr + "]")) : null
1155
+ }).then((h) => {
1156
+ t(), f("success");
1157
+ }) : g.post("/api/app/version", {
1158
+ ...n.value,
1159
+ testerIdJsonStr: n.value.testerIdJsonStr ? JSON.stringify(JSON.parse("[" + n.value.testerIdJsonStr + "]")) : null
1160
+ }).then((h) => {
1161
+ t(), f("success");
1162
+ }));
1163
+ });
1164
+ }
1165
+ function _(k) {
1166
+ r.value.find((M) => M.code === k).platform == "IOS" ? n.value.platform = "IOS" : n.value.platform = "ANDROID";
1167
+ }
1168
+ const w = b();
1169
+ function H() {
1170
+ n.value.wgtUrl = null, n.value.pkgUrl = null, w.value && w.value.clearFileList();
1171
+ }
1172
+ const r = b([]);
1173
+ async function q() {
1174
+ if (r.value.length <= 0) {
1175
+ const k = await g.get("/api/app/all");
1176
+ r.value = k.data;
1177
+ }
1178
+ }
1179
+ return d({
1180
+ show: x
1181
+ }), (k, h) => {
1182
+ const M = o("el-option"), p = o("el-select"), A = o("el-form-item"), L = o("el-col"), J = o("el-row"), a = o("el-input"), F = o("el-date-picker"), j = o("el-checkbox"), ue = o("pg-upload"), se = o("el-form"), K = o("el-button"), re = o("el-dialog");
1183
+ return s(), c(re, {
1184
+ title: B(V) ? "编辑App版本" : "发布App版本",
1185
+ modelValue: C.value,
1186
+ "onUpdate:modelValue": h[10] || (h[10] = (T) => C.value = T),
1187
+ width: "700px",
1188
+ onClosed: i
1189
+ }, {
1190
+ footer: l(() => [
1191
+ pe("div", be, [
1192
+ e(K, { onClick: t }, {
1193
+ default: l(() => [
1194
+ v("取 消")
1195
+ ]),
1196
+ _: 1
1197
+ }),
1198
+ e(K, {
1199
+ type: "primary",
1200
+ onClick: y
1201
+ }, {
1202
+ default: l(() => [
1203
+ v(R(B(V) ? "提 交" : "创 建"), 1)
1204
+ ]),
1205
+ _: 1
1206
+ })
1207
+ ])
1208
+ ]),
1209
+ default: l(() => [
1210
+ e(se, {
1211
+ model: n.value,
1212
+ ref_key: "publishModalForm",
1213
+ ref: m
1214
+ }, {
1215
+ default: l(() => [
1216
+ e(J, null, {
1217
+ default: l(() => [
1218
+ e(L, { span: 24 }, {
1219
+ default: l(() => [
1220
+ e(A, {
1221
+ label: "应用",
1222
+ "label-width": "100px",
1223
+ prop: "appCode",
1224
+ rules: [{ required: !0, message: "请选择应用", trigger: "blur" }]
1225
+ }, {
1226
+ default: l(() => [
1227
+ e(p, {
1228
+ modelValue: n.value.appCode,
1229
+ "onUpdate:modelValue": h[0] || (h[0] = (T) => n.value.appCode = T),
1230
+ disabled: B(V) && E.value,
1231
+ placeholder: "请选择要发布的平台",
1232
+ style: { width: "100%" },
1233
+ onChange: _
1234
+ }, {
1235
+ default: l(() => [
1236
+ (s(!0), O(P, null, W(r.value, (T) => (s(), c(M, {
1237
+ key: T.code,
1238
+ label: T.name,
1239
+ value: T.code
1240
+ }, null, 8, ["label", "value"]))), 128))
1241
+ ]),
1242
+ _: 1
1243
+ }, 8, ["modelValue", "disabled"])
1244
+ ]),
1245
+ _: 1
1246
+ })
1247
+ ]),
1248
+ _: 1
1249
+ })
1250
+ ]),
1251
+ _: 1
1252
+ }),
1253
+ e(J, null, {
1254
+ default: l(() => [
1255
+ e(L, { span: 12 }, {
1256
+ default: l(() => [
1257
+ e(A, {
1258
+ label: "版本名称",
1259
+ "label-width": "100px",
1260
+ prop: "versionName",
1261
+ rules: [{ required: !0, message: "请输入版本名称", trigger: "blur" }]
1262
+ }, {
1263
+ default: l(() => [
1264
+ e(a, {
1265
+ modelValue: n.value.versionName,
1266
+ "onUpdate:modelValue": h[1] || (h[1] = (T) => n.value.versionName = T),
1267
+ disabled: B(V) && E.value,
1268
+ placeholder: "例: 1.1.2"
1269
+ }, null, 8, ["modelValue", "disabled"])
1270
+ ]),
1271
+ _: 1
1272
+ })
1273
+ ]),
1274
+ _: 1
1275
+ }),
1276
+ e(L, { span: 12 }, {
1277
+ default: l(() => [
1278
+ e(A, {
1279
+ label: "版本编号",
1280
+ "label-width": "100px",
1281
+ prop: "versionNumber",
1282
+ rules: [{ required: !0, message: "请输入版本编号", trigger: "blur" }]
1283
+ }, {
1284
+ default: l(() => [
1285
+ e(a, {
1286
+ modelValue: n.value.versionNumber,
1287
+ "onUpdate:modelValue": h[2] || (h[2] = (T) => n.value.versionNumber = T),
1288
+ disabled: B(V) && E.value,
1289
+ type: "number",
1290
+ min: "1",
1291
+ placeholder: "例: 112"
1292
+ }, null, 8, ["modelValue", "disabled"])
1293
+ ]),
1294
+ _: 1
1295
+ })
1296
+ ]),
1297
+ _: 1
1298
+ })
1299
+ ]),
1300
+ _: 1
1301
+ }),
1302
+ e(J, null, {
1303
+ default: l(() => [
1304
+ e(L, { span: 12 }, {
1305
+ default: l(() => [
1306
+ e(A, {
1307
+ label: "启用时间",
1308
+ "label-width": "100px"
1309
+ }, {
1310
+ default: l(() => [
1311
+ e(F, {
1312
+ modelValue: n.value.activationTime,
1313
+ "onUpdate:modelValue": h[3] || (h[3] = (T) => n.value.activationTime = T),
1314
+ type: "datetime",
1315
+ placeholder: "选择启用时间",
1316
+ disabled: B(V) && E.value
1317
+ }, null, 8, ["modelValue", "disabled"])
1318
+ ]),
1319
+ _: 1
1320
+ })
1321
+ ]),
1322
+ _: 1
1323
+ })
1324
+ ]),
1325
+ _: 1
1326
+ }),
1327
+ e(J, null, {
1328
+ default: l(() => [
1329
+ e(L, { span: 12 }, {
1330
+ default: l(() => [
1331
+ e(A, {
1332
+ label: "是否热更新",
1333
+ "label-width": "100px"
1334
+ }, {
1335
+ default: l(() => [
1336
+ e(j, {
1337
+ modelValue: n.value.isHot,
1338
+ "onUpdate:modelValue": h[4] || (h[4] = (T) => n.value.isHot = T),
1339
+ onChange: H,
1340
+ disabled: B(V) && E.value
1341
+ }, null, 8, ["modelValue", "disabled"])
1342
+ ]),
1343
+ _: 1
1344
+ })
1345
+ ]),
1346
+ _: 1
1347
+ }),
1348
+ e(L, { span: 12 }, {
1349
+ default: l(() => [
1350
+ e(A, {
1351
+ label: "是否强制",
1352
+ "label-width": "100px"
1353
+ }, {
1354
+ default: l(() => [
1355
+ e(j, {
1356
+ modelValue: n.value.isForce,
1357
+ "onUpdate:modelValue": h[5] || (h[5] = (T) => n.value.isForce = T),
1358
+ placeholder: "请选择是否强制",
1359
+ disabled: B(V) && E.value
1360
+ }, null, 8, ["modelValue", "disabled"])
1361
+ ]),
1362
+ _: 1
1363
+ })
1364
+ ]),
1365
+ _: 1
1366
+ })
1367
+ ]),
1368
+ _: 1
1369
+ }),
1370
+ n.value.category == "APP_STORE" ? (s(), c(J, { key: 0 }, {
1371
+ default: l(() => [
1372
+ e(L, { span: 24 }, {
1373
+ default: l(() => [
1374
+ e(A, {
1375
+ label: "市场地址",
1376
+ "label-width": "100px",
1377
+ prop: "pkgUrl",
1378
+ rules: [{ required: !0, message: "应用市场地址", trigger: "blur" }]
1379
+ }, {
1380
+ default: l(() => [
1381
+ e(a, {
1382
+ modelValue: n.value.pkgUrl,
1383
+ "onUpdate:modelValue": h[6] || (h[6] = (T) => n.value.pkgUrl = T),
1384
+ placeholder: "应用市场地址"
1385
+ }, null, 8, ["modelValue"])
1386
+ ]),
1387
+ _: 1
1388
+ })
1389
+ ]),
1390
+ _: 1
1391
+ })
1392
+ ]),
1393
+ _: 1
1394
+ })) : S("", !0),
1395
+ e(J, null, {
1396
+ default: l(() => [
1397
+ e(L, { span: 24 }, {
1398
+ default: l(() => [
1399
+ e(A, {
1400
+ label: "版本描述",
1401
+ "label-width": "100px",
1402
+ prop: "description",
1403
+ rules: [{ required: !0, message: "请输入版本描述", trigger: "blur" }]
1404
+ }, {
1405
+ default: l(() => [
1406
+ e(a, {
1407
+ type: "textarea",
1408
+ modelValue: n.value.description,
1409
+ "onUpdate:modelValue": h[7] || (h[7] = (T) => n.value.description = T),
1410
+ autosize: { minRows: 4 },
1411
+ placeholder: "请输入版本描述"
1412
+ }, null, 8, ["modelValue"])
1413
+ ]),
1414
+ _: 1
1415
+ })
1416
+ ]),
1417
+ _: 1
1418
+ })
1419
+ ]),
1420
+ _: 1
1421
+ }),
1422
+ B(V) && E.value ? S("", !0) : (s(), c(J, { key: 1 }, {
1423
+ default: l(() => [
1424
+ e(L, { span: 24 }, {
1425
+ default: l(() => [
1426
+ e(A, {
1427
+ label: "测试用户",
1428
+ "label-width": "100px",
1429
+ prop: "testerIdJsonStr"
1430
+ }, {
1431
+ default: l(() => [
1432
+ e(a, {
1433
+ type: "textarea",
1434
+ modelValue: n.value.testerIdJsonStr,
1435
+ "onUpdate:modelValue": h[8] || (h[8] = (T) => n.value.testerIdJsonStr = T),
1436
+ autosize: { minRows: 4 },
1437
+ placeholder: "请输入测试用户ID。 例子: 10000, 100202, 100203"
1438
+ }, null, 8, ["modelValue"])
1439
+ ]),
1440
+ _: 1
1441
+ })
1442
+ ]),
1443
+ _: 1
1444
+ })
1445
+ ]),
1446
+ _: 1
1447
+ })),
1448
+ n.value.platform == "ANDROID" || n.value.platform == "IOS" && n.value.isHot ? (s(), c(J, { key: 2 }, {
1449
+ default: l(() => [
1450
+ e(L, { span: 24 }, {
1451
+ default: l(() => [
1452
+ e(A, {
1453
+ label: n.value.isHot ? "上传更新包" : "上传安装包",
1454
+ "label-width": "100px",
1455
+ rules: [{ required: !0, message: "请上传更新包", trigger: "blur" }]
1456
+ }, {
1457
+ default: l(() => [
1458
+ e(ue, {
1459
+ ref_key: "appPkgUploader",
1460
+ ref: w,
1461
+ modelValue: N.value,
1462
+ "onUpdate:modelValue": h[9] || (h[9] = (T) => N.value = T),
1463
+ drag: !0,
1464
+ multiple: !1,
1465
+ tips: "热更新下只能上传wgt格式的文件,非热更新下只能上传apk格式的文件",
1466
+ autoUpload: !0,
1467
+ uploadType: "appPkg",
1468
+ accept: n.value.isHot ? ".wgt" : "application/vnd.android.package-archive",
1469
+ disabled: B(V) && E.value,
1470
+ onOnSuccess: I
1471
+ }, null, 8, ["modelValue", "accept", "disabled"])
1472
+ ]),
1473
+ _: 1
1474
+ }, 8, ["label"])
1475
+ ]),
1476
+ _: 1
1477
+ })
1478
+ ]),
1479
+ _: 1
1480
+ })) : S("", !0)
1481
+ ]),
1482
+ _: 1
1483
+ }, 8, ["model"])
1484
+ ]),
1485
+ _: 1
1486
+ }, 8, ["title", "modelValue"]);
1487
+ };
1488
+ }
1489
+ }, ye = /* @__PURE__ */ ge(he, [["__scopeId", "data-v-9e13a1f7"]]), Ee = {
1490
+ __name: "VersionListView",
1491
+ setup($) {
1492
+ const d = b({
1493
+ platform: null,
1494
+ isHot: null,
1495
+ status: null
1496
+ }), f = z < te > "http", g = b();
1497
+ function u() {
1498
+ g.value.search();
1499
+ }
1500
+ const V = b();
1501
+ function C(D) {
1502
+ V.value.show(D);
1503
+ }
1504
+ async function n(D) {
1505
+ await f.post(`/api/app/version/${D}/publish`), u(), Y.success("发布成功");
1506
+ }
1507
+ async function N(D) {
1508
+ await f.post(`/api/app/version/${D}/offline`), u(), Y.success("下架成功");
1509
+ }
1510
+ return (D, U) => {
1511
+ const E = o("el-option"), x = o("el-select"), I = o("el-button"), i = o("el-space"), t = o("el-card"), m = o("el-table-column"), y = o("el-tag"), _ = o("el-popconfirm"), w = o("pg-table"), H = X("permission");
1512
+ return s(), O(P, null, [
1513
+ e(t, null, {
1514
+ default: l(() => [
1515
+ e(i, null, {
1516
+ default: l(() => [
1517
+ e(x, {
1518
+ modelValue: d.value.isHot,
1519
+ "onUpdate:modelValue": U[0] || (U[0] = (r) => d.value.isHot = r),
1520
+ placeholder: "热更新/整包更新",
1521
+ style: { width: "180px" },
1522
+ clearable: ""
1523
+ }, {
1524
+ default: l(() => [
1525
+ e(E, {
1526
+ label: "热更新",
1527
+ value: "true"
1528
+ }),
1529
+ e(E, {
1530
+ label: "整包更新",
1531
+ value: "false"
1532
+ })
1533
+ ]),
1534
+ _: 1
1535
+ }, 8, ["modelValue"]),
1536
+ e(x, {
1537
+ modelValue: d.value.status,
1538
+ "onUpdate:modelValue": U[1] || (U[1] = (r) => d.value.status = r),
1539
+ placeholder: "状态",
1540
+ style: { width: "120px" },
1541
+ clearable: ""
1542
+ }, {
1543
+ default: l(() => [
1544
+ e(E, {
1545
+ label: "测试",
1546
+ value: "TEST"
1547
+ }),
1548
+ e(E, {
1549
+ label: "发布",
1550
+ value: "RELEASE"
1551
+ }),
1552
+ e(E, {
1553
+ label: "下架",
1554
+ value: "OFFLINE"
1555
+ })
1556
+ ]),
1557
+ _: 1
1558
+ }, 8, ["modelValue"]),
1559
+ e(I, {
1560
+ type: "primary",
1561
+ icon: "search",
1562
+ onClick: u
1563
+ }, {
1564
+ default: l(() => [
1565
+ v("搜索")
1566
+ ]),
1567
+ _: 1
1568
+ }),
1569
+ G((s(), c(I, {
1570
+ icon: "plus",
1571
+ onClick: U[2] || (U[2] = (r) => C())
1572
+ }, {
1573
+ default: l(() => [
1574
+ v("新建版本")
1575
+ ]),
1576
+ _: 1
1577
+ })), [
1578
+ [H, "CREATE_BANNER"]
1579
+ ])
1580
+ ]),
1581
+ _: 1
1582
+ })
1583
+ ]),
1584
+ _: 1
1585
+ }),
1586
+ e(w, {
1587
+ ref_key: "table",
1588
+ ref: g,
1589
+ "data-url": "/api/app/version/page-search",
1590
+ onRowDbClick: U[3] || (U[3] = (r) => C(r)),
1591
+ condition: d.value,
1592
+ style: { "margin-top": "10px" }
1593
+ }, {
1594
+ default: l(() => [
1595
+ e(m, {
1596
+ label: "ID",
1597
+ prop: "id",
1598
+ align: "center",
1599
+ width: "60px"
1600
+ }),
1601
+ e(m, {
1602
+ label: "应用",
1603
+ prop: "appName",
1604
+ align: "center",
1605
+ width: "120px",
1606
+ "show-overflow-tooltip": ""
1607
+ }),
1608
+ e(m, {
1609
+ label: "应用平台",
1610
+ prop: "appPlatform",
1611
+ align: "center",
1612
+ width: "100px",
1613
+ "show-overflow-tooltip": ""
1614
+ }),
1615
+ e(m, {
1616
+ label: "版本名称",
1617
+ prop: "versionName",
1618
+ align: "center",
1619
+ width: "90",
1620
+ "show-overflow-tooltip": ""
1621
+ }),
1622
+ e(m, {
1623
+ label: "版本编号",
1624
+ prop: "versionNumber",
1625
+ align: "center",
1626
+ width: "90",
1627
+ "show-overflow-tooltip": ""
1628
+ }),
1629
+ e(m, {
1630
+ label: "强制更新",
1631
+ prop: "isForce",
1632
+ align: "center",
1633
+ width: "90",
1634
+ "show-overflow-tooltip": ""
1635
+ }, {
1636
+ default: l(({ row: r }) => [
1637
+ r.isForce ? (s(), c(y, {
1638
+ key: 0,
1639
+ type: "warning",
1640
+ size: "small"
1641
+ }, {
1642
+ default: l(() => [
1643
+ v("是")
1644
+ ]),
1645
+ _: 1
1646
+ })) : (s(), c(y, {
1647
+ key: 1,
1648
+ type: "primary",
1649
+ size: "small"
1650
+ }, {
1651
+ default: l(() => [
1652
+ v("否")
1653
+ ]),
1654
+ _: 1
1655
+ }))
1656
+ ]),
1657
+ _: 1
1658
+ }),
1659
+ e(m, {
1660
+ label: "整包更新",
1661
+ prop: "isHot",
1662
+ align: "center",
1663
+ width: "90",
1664
+ "show-overflow-tooltip": ""
1665
+ }, {
1666
+ default: l(({ row: r }) => [
1667
+ r.isHot ? (s(), c(y, {
1668
+ key: 0,
1669
+ type: "warning",
1670
+ size: "small"
1671
+ }, {
1672
+ default: l(() => [
1673
+ v("否")
1674
+ ]),
1675
+ _: 1
1676
+ })) : (s(), c(y, {
1677
+ key: 1,
1678
+ type: "primary",
1679
+ size: "small"
1680
+ }, {
1681
+ default: l(() => [
1682
+ v("是")
1683
+ ]),
1684
+ _: 1
1685
+ }))
1686
+ ]),
1687
+ _: 1
1688
+ }),
1689
+ e(m, {
1690
+ label: "启用时间",
1691
+ width: "150px",
1692
+ prop: "activationTime",
1693
+ align: "center",
1694
+ "show-overflow-tooltip": ""
1695
+ }),
1696
+ e(m, {
1697
+ label: "状态",
1698
+ width: "100",
1699
+ align: "center"
1700
+ }, {
1701
+ default: l(({ row: r }) => [
1702
+ e(y, {
1703
+ type: r.status == "RELEASE" ? "success" : r.status == "OFFLINE" ? "danger" : "warning"
1704
+ }, {
1705
+ default: l(() => [
1706
+ v(R(r.status == "RELEASE" ? "发布" : r.status == "OFFLINE" ? "下线" : "测试"), 1)
1707
+ ]),
1708
+ _: 2
1709
+ }, 1032, ["type"])
1710
+ ]),
1711
+ _: 1
1712
+ }),
1713
+ e(m, {
1714
+ label: "安装包/更新包地址",
1715
+ prop: "pkgUrl",
1716
+ align: "center",
1717
+ "show-overflow-tooltip": ""
1718
+ }, {
1719
+ default: l(({ row: r }) => [
1720
+ v(R(r.isHot ? r.wgtUrl : r.pkgUrl), 1)
1721
+ ]),
1722
+ _: 1
1723
+ }),
1724
+ e(m, {
1725
+ label: "操作",
1726
+ align: "center",
1727
+ width: "160px"
1728
+ }, {
1729
+ default: l(({ row: r }) => [
1730
+ r.status == "RELEASE" ? (s(), c(_, {
1731
+ key: 0,
1732
+ title: `确定下架版本[${r.versionName}]吗?`,
1733
+ onConfirm: (q) => N(r.id)
1734
+ }, {
1735
+ reference: l(() => [
1736
+ e(I, { type: "danger" }, {
1737
+ default: l(() => [
1738
+ v("下架")
1739
+ ]),
1740
+ _: 1
1741
+ })
1742
+ ]),
1743
+ _: 2
1744
+ }, 1032, ["title", "onConfirm"])) : S("", !0),
1745
+ r.status == "TEST" || r.status == "OFFLINE" ? (s(), c(_, {
1746
+ key: 1,
1747
+ title: "是否确定发布该版本?",
1748
+ onConfirm: (q) => n(r.id)
1749
+ }, {
1750
+ reference: l(() => [
1751
+ e(I, { type: "success" }, {
1752
+ default: l(() => [
1753
+ v("发布")
1754
+ ]),
1755
+ _: 1
1756
+ })
1757
+ ]),
1758
+ _: 2
1759
+ }, 1032, ["onConfirm"])) : S("", !0)
1760
+ ]),
1761
+ _: 1
1762
+ })
1763
+ ]),
1764
+ _: 1
1765
+ }, 8, ["condition"]),
1766
+ e(ye, {
1767
+ ref_key: "versionDiloag",
1768
+ ref: V,
1769
+ onSuccess: u
1770
+ }, null, 512)
1771
+ ], 64);
1772
+ };
1773
+ }
1774
+ }, ke = {
1775
+ install: ($, d) => {
1776
+ let f = d.router, g = f.getRoutes().find((u) => u.path == "/");
1777
+ g && g.meta && (f.addRoute({
1778
+ path: "/app/banner",
1779
+ name: "AppBanner",
1780
+ redirect: "/app/banner/list",
1781
+ component: g.meta.commonLayout,
522
1782
  children: [{
523
1783
  path: "list",
524
1784
  name: "BannerListView",
525
- component: ee
1785
+ component: fe
526
1786
  }]
527
- });
1787
+ }), f.addRoute({
1788
+ path: "/app/entrance",
1789
+ name: "AppEntrance",
1790
+ redirect: "/app/entrance/list",
1791
+ component: g.meta.commonLayout,
1792
+ children: [{
1793
+ path: "list",
1794
+ name: "EntranceListView",
1795
+ component: ve
1796
+ }]
1797
+ }), f.addRoute({
1798
+ path: "/app/version",
1799
+ name: "AppVersion",
1800
+ redirect: "/app/version/list",
1801
+ component: g.meta.commonLayout,
1802
+ children: [{
1803
+ path: "list",
1804
+ name: "AppVersionListView",
1805
+ component: Ee
1806
+ }]
1807
+ }));
528
1808
  }
529
- }, te = (S, r) => {
530
- Y.forEach((d) => S.use(d)), S.use(le, r);
531
- }, ae = {
532
- install: te
1809
+ }, Te = ($, d) => {
1810
+ ce.forEach((g) => $.use(g)), $.use(ke, d);
1811
+ const f = ne();
1812
+ if (d.defaultTesterUserIds)
1813
+ for (let g of d.defaultTesterUserIds)
1814
+ f.defaultTesterUserIds.push(g);
1815
+ }, Se = {
1816
+ install: Te
533
1817
  };
534
1818
  export {
535
- ae as default,
536
- te as install
1819
+ Se as default,
1820
+ Te as install
537
1821
  };