@pangu-backend-ui/apputil-core 0.0.4 → 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,107 +1,110 @@
1
- import { defineComponent as W, ref as g, inject as q, resolveComponent as i, openBlock as s, createBlock as p, withCtx as a, createVNode as l, createTextVNode as _, createElementBlock as S, Fragment as U, renderList as R, unref as M, createCommentVNode as E, nextTick as X, onBeforeMount as z, resolveDirective as G, withDirectives as K, toDisplayString as A } from "vue";
2
- const ee = [], Y = {
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 = {
11
+ }, oe = {
9
12
  OPEN_WEB: { name: "打开Web页面" },
10
13
  OPEN_VIEW: { name: "打开内置页面" },
11
14
  API_REQUEST: { name: "请求API" },
12
15
  EXEC_METHOD: { name: "执行方法" },
13
16
  CUSTOM: { name: "自定义" }
14
- }, le = /* @__PURE__ */ W({
17
+ }, me = /* @__PURE__ */ Q({
15
18
  __name: "BannerDialog",
16
19
  emits: ["success"],
17
- setup(O, { expose: r, emit: c }) {
18
- const b = g(!1), n = g({
20
+ setup($, { expose: d, emit: f }) {
21
+ const g = b(!1), u = b({
19
22
  sceneCode: null,
20
23
  image: null,
21
24
  targetPath: null,
22
25
  clickEventType: "",
23
26
  params: null,
24
27
  shelfTimeArr: []
25
- }), w = g({
28
+ }), V = b({
26
29
  sceneCode: [{ required: !0, message: "请输入场景代码" }],
27
30
  image: [{ required: !0, message: "请上传图片" }],
28
31
  targetPath: [{ required: !0, message: "请输入目标地址" }],
29
32
  clickEventType: [{ required: !0, message: "请选择点击事件类型" }]
30
- }), T = g(!1), h = q("http"), V = g();
31
- function B() {
32
- var u;
33
- (u = V.value) == null || u.validate((e) => {
34
- if (e) {
35
- T.value = !0;
36
- let m = `/api/app/banner/${k.value ?? ""}/${k.value ? "update" : "create"}`, v = { ...n.value };
37
- v.shelfTime = null, v.offShelfTime = null, n.value.shelfTimeArr.length && (v.shelfTime = n.value.shelfTimeArr[0], v.offShelfTime = n.value.shelfTimeArr[1]), h == null || h.post(m, v).then((d) => {
38
- var y;
39
- c("success"), (y = V.value) == null || y.resetFields(), b.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;
40
43
  }).finally(() => {
41
- T.value = !1;
44
+ C.value = !1;
42
45
  });
43
46
  }
44
47
  });
45
48
  }
46
- const P = g([]), k = g(null);
47
- function D(u, e) {
48
- P.value = u, k.value = null, b.value = !0, X(() => {
49
- e && (k.value = e.id, Object.assign(n.value, e), e.shelfTime && e.offShelfTime && (n.value.shelfTimeArr = [new Date(e.shelfTime), new Date(e.offShelfTime)]));
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)]));
50
53
  });
51
54
  }
52
- function F() {
53
- var u;
54
- (u = V.value) == null || u.resetFields();
55
+ function I() {
56
+ var i;
57
+ (i = N.value) == null || i.resetFields();
55
58
  }
56
- return r({
57
- show: D
58
- }), (u, e) => {
59
- const m = i("el-option"), v = i("el-select"), d = i("el-form-item"), y = i("pg-upload"), $ = i("el-input"), f = i("el-collapse-transition"), L = i("el-date-picker"), I = i("el-form"), H = i("el-button"), x = i("el-dialog");
60
- return s(), p(x, {
61
- modelValue: b.value,
62
- "onUpdate:modelValue": e[6] || (e[6] = (o) => b.value = o),
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),
63
66
  width: "400",
64
- onClosed: F
67
+ onClosed: I
65
68
  }, {
66
- footer: a(() => [
67
- l(H, {
69
+ footer: l(() => [
70
+ e(h, {
68
71
  type: "primary",
69
- disabled: T.value,
70
- loading: T.value,
71
- onClick: B
72
+ disabled: C.value,
73
+ loading: C.value,
74
+ onClick: D
72
75
  }, {
73
- default: a(() => [
74
- _("提交")
76
+ default: l(() => [
77
+ v("提交")
75
78
  ]),
76
79
  _: 1
77
80
  }, 8, ["disabled", "loading"])
78
81
  ]),
79
- default: a(() => [
80
- l(I, {
82
+ default: l(() => [
83
+ e(k, {
81
84
  ref_key: "form",
82
- ref: V,
83
- rules: w.value,
84
- model: n.value,
85
+ ref: N,
86
+ rules: V.value,
87
+ model: u.value,
85
88
  "label-position": "top"
86
89
  }, {
87
- default: a(() => [
88
- l(d, {
90
+ default: l(() => [
91
+ e(_, {
89
92
  label: "场景代码",
90
93
  prop: "sceneCode"
91
94
  }, {
92
- default: a(() => [
93
- l(v, {
94
- modelValue: n.value.sceneCode,
95
- "onUpdate:modelValue": e[0] || (e[0] = (o) => n.value.sceneCode = o),
95
+ default: l(() => [
96
+ e(y, {
97
+ modelValue: u.value.sceneCode,
98
+ "onUpdate:modelValue": t[0] || (t[0] = (p) => u.value.sceneCode = p),
96
99
  placeholder: "请输入/选择场景代码",
97
100
  "allow-create": "",
98
101
  filterable: ""
99
102
  }, {
100
- default: a(() => [
101
- (s(!0), S(U, null, R(P.value, (o) => (s(), p(m, {
102
- key: o,
103
- value: o,
104
- label: o
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
105
108
  }, null, 8, ["value", "label"]))), 128))
106
109
  ]),
107
110
  _: 1
@@ -109,16 +112,16 @@ const ee = [], Y = {
109
112
  ]),
110
113
  _: 1
111
114
  }),
112
- l(d, {
115
+ e(_, {
113
116
  label: "图片",
114
117
  prop: "image"
115
118
  }, {
116
- default: a(() => [
117
- (s(), p(y, {
119
+ default: l(() => [
120
+ (s(), c(w, {
118
121
  accept: "jpg,jpeg,png",
119
- modelValue: n.value.image,
120
- "onUpdate:modelValue": e[1] || (e[1] = (o) => n.value.image = o),
121
- key: `img_${k.value}`,
122
+ modelValue: u.value.image,
123
+ "onUpdate:modelValue": t[1] || (t[1] = (p) => u.value.image = p),
124
+ key: `img_${E.value}`,
122
125
  "list-type": "picture-card",
123
126
  "upload-type": "banner",
124
127
  limit: 1
@@ -126,20 +129,20 @@ const ee = [], Y = {
126
129
  ]),
127
130
  _: 1
128
131
  }),
129
- l(d, {
132
+ e(_, {
130
133
  label: "点击事件类型",
131
134
  prop: "clickEventType"
132
135
  }, {
133
- default: a(() => [
134
- l(v, {
136
+ default: l(() => [
137
+ e(y, {
135
138
  placeholder: "请选择点击事件类型",
136
- modelValue: n.value.clickEventType,
137
- "onUpdate:modelValue": e[2] || (e[2] = (o) => n.value.clickEventType = o)
139
+ modelValue: u.value.clickEventType,
140
+ "onUpdate:modelValue": t[2] || (t[2] = (p) => u.value.clickEventType = p)
138
141
  }, {
139
- default: a(() => [
140
- (s(!0), S(U, null, R(M(Y), (o, N) => (s(), p(m, {
141
- value: N,
142
- label: o.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
143
146
  }, null, 8, ["value", "label"]))), 256))
144
147
  ]),
145
148
  _: 1
@@ -147,48 +150,48 @@ const ee = [], Y = {
147
150
  ]),
148
151
  _: 1
149
152
  }),
150
- l(f, null, {
151
- default: a(() => [
152
- ["OPEN_WEB", "OPEN_VIEW", "API_REQUEST"].indexOf(n.value.clickEventType) >= 0 ? (s(), p(d, {
153
+ e(r, null, {
154
+ default: l(() => [
155
+ ["OPEN_WEB", "OPEN_VIEW", "API_REQUEST"].indexOf(u.value.clickEventType) >= 0 ? (s(), c(_, {
153
156
  key: 0,
154
157
  label: "目标地址",
155
158
  prop: "targetPath"
156
159
  }, {
157
- default: a(() => [
158
- l($, {
160
+ default: l(() => [
161
+ e(H, {
159
162
  placeholder: "请输入目标地址",
160
- modelValue: n.value.targetPath,
161
- "onUpdate:modelValue": e[3] || (e[3] = (o) => n.value.targetPath = o)
163
+ modelValue: u.value.targetPath,
164
+ "onUpdate:modelValue": t[3] || (t[3] = (p) => u.value.targetPath = p)
162
165
  }, null, 8, ["modelValue"])
163
166
  ]),
164
167
  _: 1
165
- })) : E("", !0)
168
+ })) : S("", !0)
166
169
  ]),
167
170
  _: 1
168
171
  }),
169
- l(d, {
172
+ e(_, {
170
173
  label: "目标地址参数",
171
174
  prop: "params"
172
175
  }, {
173
- default: a(() => [
174
- l($, {
176
+ default: l(() => [
177
+ e(H, {
175
178
  type: "textarea",
176
- modelValue: n.value.params,
177
- "onUpdate:modelValue": e[4] || (e[4] = (o) => n.value.params = o),
179
+ modelValue: u.value.params,
180
+ "onUpdate:modelValue": t[4] || (t[4] = (p) => u.value.params = p),
178
181
  placeholder: "请输入JSON格式的参数对象"
179
182
  }, null, 8, ["modelValue"])
180
183
  ]),
181
184
  _: 1
182
185
  }),
183
- l(d, {
186
+ e(_, {
184
187
  label: "生效时段",
185
188
  prop: "shelfTimeArr"
186
189
  }, {
187
- default: a(() => [
188
- l(L, {
190
+ default: l(() => [
191
+ e(q, {
189
192
  type: "datetimerange",
190
- modelValue: n.value.shelfTimeArr,
191
- "onUpdate:modelValue": e[5] || (e[5] = (o) => n.value.shelfTimeArr = o),
193
+ modelValue: u.value.shelfTimeArr,
194
+ "onUpdate:modelValue": t[5] || (t[5] = (p) => u.value.shelfTimeArr = p),
192
195
  "start-placeholder": "上架时间",
193
196
  "end-placeholder": "下架时间",
194
197
  "default-time": [new Date(2e3, 1, 1, 0, 0, 0), new Date(2e3, 1, 1, 23, 59, 59)]
@@ -204,114 +207,114 @@ const ee = [], Y = {
204
207
  }, 8, ["modelValue"]);
205
208
  };
206
209
  }
207
- }), te = /* @__PURE__ */ W({
210
+ }), fe = /* @__PURE__ */ Q({
208
211
  __name: "BannerListView",
209
- setup(O) {
210
- const r = q("http"), c = g({
212
+ setup($) {
213
+ const d = z("http"), f = b({
211
214
  sceneCode: null,
212
215
  status: null
213
- }), b = g([]);
214
- function n() {
215
- r == null || r.get("/api/app/banner/all-scene-code").then((u) => {
216
- b.value = u.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;
217
220
  });
218
221
  }
219
- const w = g(), T = g(!1);
220
- function h() {
221
- T.value = !!c.value.sceneCode, w.value.search();
222
+ const V = b(), C = b(!1);
223
+ function n() {
224
+ C.value = !!f.value.sceneCode, V.value.search();
222
225
  }
223
- function V(u) {
224
- r == null || r.post(`/api/app/banner/${u}/publish`).then((e) => {
225
- h();
226
+ function N(i) {
227
+ d == null || d.post(`/api/app/banner/${i}/publish`).then((t) => {
228
+ n();
226
229
  });
227
230
  }
228
- function B(u) {
229
- r == null || r.post(`/api/app/banner/${u}/off-shelf`).then((e) => {
230
- h();
231
+ function D(i) {
232
+ d == null || d.post(`/api/app/banner/${i}/off-shelf`).then((t) => {
233
+ n();
231
234
  });
232
235
  }
233
- function P(u, e) {
234
- r == null || r.post(`/api/app/banner/${u}/move-up`).then((m) => {
235
- c.value.sceneCode = e, h();
236
+ function U(i, t) {
237
+ d == null || d.post(`/api/app/banner/${i}/move-up`).then((m) => {
238
+ f.value.sceneCode = t, n();
236
239
  });
237
240
  }
238
- function k(u, e) {
239
- r == null || r.post(`/api/app/banner/${u}/move-down`).then((m) => {
240
- c.value.sceneCode = e, h();
241
+ function E(i, t) {
242
+ d == null || d.post(`/api/app/banner/${i}/move-down`).then((m) => {
243
+ f.value.sceneCode = t, n();
241
244
  });
242
245
  }
243
- z(() => {
244
- n();
246
+ ee(() => {
247
+ u();
245
248
  });
246
- const D = g();
247
- function F(u) {
248
- D.value.show(b.value, u);
249
+ const x = b();
250
+ function I(i) {
251
+ x.value.show(g.value, i);
249
252
  }
250
- return (u, e) => {
251
- const m = i("el-option"), v = i("el-select"), d = i("el-button"), y = i("el-space"), $ = i("el-card"), f = i("el-table-column"), L = i("el-image"), I = i("el-descriptions-item"), H = i("el-descriptions"), x = i("el-popover"), o = i("el-tag"), N = i("el-popconfirm"), j = i("pg-table"), Q = G("permission");
252
- return s(), S(U, null, [
253
- l($, null, {
254
- default: a(() => [
255
- l(y, null, {
256
- default: a(() => [
257
- l(v, {
258
- modelValue: c.value.sceneCode,
259
- "onUpdate:modelValue": e[0] || (e[0] = (t) => c.value.sceneCode = t),
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),
260
263
  placeholder: "场景代码",
261
264
  clearable: ""
262
265
  }, {
263
- default: a(() => [
264
- (s(!0), S(U, null, R(b.value, (t, C) => (s(), p(m, {
265
- label: t,
266
- value: t,
267
- key: `sc_con_${C}`
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}`
268
271
  }, null, 8, ["label", "value"]))), 128))
269
272
  ]),
270
273
  _: 1
271
274
  }, 8, ["modelValue"]),
272
- l(v, {
273
- modelValue: c.value.status,
274
- "onUpdate:modelValue": e[1] || (e[1] = (t) => c.value.status = t),
275
+ e(y, {
276
+ modelValue: f.value.status,
277
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => f.value.status = a),
275
278
  placeholder: "状态",
276
279
  clearable: "",
277
280
  style: { width: "150px" }
278
281
  }, {
279
- default: a(() => [
280
- l(m, {
282
+ default: l(() => [
283
+ e(m, {
281
284
  label: "草稿",
282
285
  value: "DRAFT"
283
286
  }),
284
- l(m, {
287
+ e(m, {
285
288
  label: "已发布",
286
289
  value: "PUBLISH"
287
290
  }),
288
- l(m, {
291
+ e(m, {
289
292
  label: "已下架",
290
293
  value: "OFF_SHELF"
291
294
  })
292
295
  ]),
293
296
  _: 1
294
297
  }, 8, ["modelValue"]),
295
- l(d, {
298
+ e(_, {
296
299
  type: "primary",
297
300
  icon: "search",
298
- onClick: h
301
+ onClick: n
299
302
  }, {
300
- default: a(() => [
301
- _("搜索")
303
+ default: l(() => [
304
+ v("搜索")
302
305
  ]),
303
306
  _: 1
304
307
  }),
305
- K((s(), p(d, {
308
+ G((s(), c(_, {
306
309
  icon: "plus",
307
- onClick: e[2] || (e[2] = (t) => F())
310
+ onClick: t[2] || (t[2] = (a) => I())
308
311
  }, {
309
- default: a(() => [
310
- _("创建Banner")
312
+ default: l(() => [
313
+ v("创建Banner")
311
314
  ]),
312
315
  _: 1
313
316
  })), [
314
- [Q, "CREATE_BANNER"]
317
+ [J, "CREATE_BANNER"]
315
318
  ])
316
319
  ]),
317
320
  _: 1
@@ -319,215 +322,215 @@ const ee = [], Y = {
319
322
  ]),
320
323
  _: 1
321
324
  }),
322
- l(j, {
325
+ e(L, {
323
326
  ref_key: "table",
324
- ref: w,
327
+ ref: V,
325
328
  "data-url": "/api/app/banner/page",
326
- onRowDbClick: e[3] || (e[3] = (t) => u.$hasPer("UPDATE_BANNER") ? F(t) : null),
327
- condition: c.value,
329
+ onRowDbClick: t[3] || (t[3] = (a) => i.$hasPer("UPDATE_BANNER") ? I(a) : null),
330
+ condition: f.value,
328
331
  style: { "margin-top": "10px" }
329
332
  }, {
330
- default: a(() => [
331
- T.value && u.$hasPer("BANNER_SEQ_MOVE_UP_DOWN") ? (s(), p(f, {
333
+ default: l(() => [
334
+ C.value && i.$hasPer("BANNER_SEQ_MOVE_UP_DOWN") ? (s(), c(r, {
332
335
  key: 0,
333
336
  align: "center",
334
337
  width: "80"
335
338
  }, {
336
- default: a(({ row: t }) => [
337
- l(y, { direction: "vertical" }, {
338
- default: a(() => [
339
- l(d, {
339
+ default: l(({ row: a }) => [
340
+ e(w, { direction: "vertical" }, {
341
+ default: l(() => [
342
+ e(_, {
340
343
  icon: "ArrowUpBold",
341
- onClick: (C) => P(t.id, t.sceneCode)
344
+ onClick: (F) => U(a.id, a.sceneCode)
342
345
  }, null, 8, ["onClick"]),
343
- l(d, {
346
+ e(_, {
344
347
  icon: "ArrowDownBold",
345
- onClick: (C) => k(t.id, t.sceneCode)
348
+ onClick: (F) => E(a.id, a.sceneCode)
346
349
  }, null, 8, ["onClick"])
347
350
  ]),
348
351
  _: 2
349
352
  }, 1024)
350
353
  ]),
351
354
  _: 1
352
- })) : E("", !0),
353
- l(f, {
355
+ })) : S("", !0),
356
+ e(r, {
354
357
  label: "场景代码",
355
358
  prop: "sceneCode",
356
359
  width: "150"
357
360
  }),
358
- l(f, {
361
+ e(r, {
359
362
  label: "图片",
360
363
  width: "300",
361
364
  align: "center"
362
365
  }, {
363
- default: a(({ row: t }) => [
364
- l(L, {
365
- src: t.image,
366
+ default: l(({ row: a }) => [
367
+ e(q, {
368
+ src: a.image,
366
369
  style: { "max-width": "300px" },
367
- "preview-src-list": [t.image],
370
+ "preview-src-list": [a.image],
368
371
  "preview-teleported": ""
369
372
  }, null, 8, ["src", "preview-src-list"])
370
373
  ]),
371
374
  _: 1
372
375
  }),
373
- l(f, {
376
+ e(r, {
374
377
  label: "点击事件类型",
375
378
  prop: "clickEventType",
376
379
  width: "120"
377
380
  }, {
378
- default: a(({ row: t }) => [
379
- _(A(t.clickEventType ? M(Y)[t.clickEventType].name : ""), 1)
381
+ default: l(({ row: a }) => [
382
+ v(R(a.clickEventType ? B(ae)[a.clickEventType].name : ""), 1)
380
383
  ]),
381
384
  _: 1
382
385
  }),
383
- l(f, {
386
+ e(r, {
384
387
  label: "目标地址",
385
388
  prop: "targetPath",
386
389
  "show-overflow-tooltip": ""
387
390
  }),
388
- l(f, {
391
+ e(r, {
389
392
  label: "目标参数",
390
393
  width: "120",
391
394
  "show-overflow-tooltip": ""
392
395
  }, {
393
- default: a(({ row: t }) => [
394
- t.params ? (s(), p(x, {
396
+ default: l(({ row: a }) => [
397
+ a.params ? (s(), c(M, {
395
398
  key: 0,
396
399
  trigger: "hover",
397
400
  width: "350"
398
401
  }, {
399
- reference: a(() => [
400
- _(A(t.params.substring(0, 100)) + A(t.params.length > 100 ? "..." : ""), 1)
402
+ reference: l(() => [
403
+ v(R(a.params.substring(0, 100)) + R(a.params.length > 100 ? "..." : ""), 1)
401
404
  ]),
402
- default: a(() => [
403
- t.params.startsWith("{") ? (s(), p(H, {
405
+ default: l(() => [
406
+ a.params.startsWith("{") ? (s(), c(h, {
404
407
  key: 0,
405
408
  column: "1",
406
409
  border: ""
407
410
  }, {
408
- default: a(() => [
409
- (s(!0), S(U, null, R(JSON.parse(t.params), (C, J) => (s(), p(I, {
410
- label: J,
411
+ default: l(() => [
412
+ (s(!0), O(P, null, W(JSON.parse(a.params), (F, j) => (s(), c(k, {
413
+ label: j,
411
414
  "min-width": "150"
412
415
  }, {
413
- default: a(() => [
414
- _(A(C), 1)
416
+ default: l(() => [
417
+ v(R(F), 1)
415
418
  ]),
416
419
  _: 2
417
420
  }, 1032, ["label"]))), 256))
418
421
  ]),
419
422
  _: 2
420
- }, 1024)) : (s(), S(U, { key: 1 }, [
421
- _(A(t.params), 1)
423
+ }, 1024)) : (s(), O(P, { key: 1 }, [
424
+ v(R(a.params), 1)
422
425
  ], 64))
423
426
  ]),
424
427
  _: 2
425
- }, 1024)) : E("", !0)
428
+ }, 1024)) : S("", !0)
426
429
  ]),
427
430
  _: 1
428
431
  }),
429
- l(f, {
432
+ e(r, {
430
433
  label: "上架时间",
431
434
  prop: "shelfTime",
432
435
  width: "180",
433
436
  align: "center"
434
437
  }),
435
- l(f, {
438
+ e(r, {
436
439
  label: "下架时间",
437
440
  prop: "offShelfTime",
438
441
  width: "180",
439
442
  align: "center"
440
443
  }),
441
- l(f, {
444
+ e(r, {
442
445
  label: "状态",
443
446
  align: "center",
444
447
  width: "88"
445
448
  }, {
446
- default: a(({ row: t }) => [
447
- t.status == "DRAFT" ? (s(), p(o, {
449
+ default: l(({ row: a }) => [
450
+ a.status == "DRAFT" ? (s(), c(p, {
448
451
  key: 0,
449
452
  type: "danger"
450
453
  }, {
451
- default: a(() => [
452
- _("草稿")
454
+ default: l(() => [
455
+ v("草稿")
453
456
  ]),
454
457
  _: 1
455
- })) : E("", !0),
456
- t.status == "PUBLISH" ? (s(), p(o, {
458
+ })) : S("", !0),
459
+ a.status == "PUBLISH" ? (s(), c(p, {
457
460
  key: 1,
458
461
  type: "success"
459
462
  }, {
460
- default: a(() => [
461
- _("已发布")
463
+ default: l(() => [
464
+ v("已发布")
462
465
  ]),
463
466
  _: 1
464
- })) : E("", !0),
465
- t.status == "OFF_SHELF" ? (s(), p(o, {
467
+ })) : S("", !0),
468
+ a.status == "OFF_SHELF" ? (s(), c(p, {
466
469
  key: 2,
467
470
  type: "warning"
468
471
  }, {
469
- default: a(() => [
470
- _("已下架")
472
+ default: l(() => [
473
+ v("已下架")
471
474
  ]),
472
475
  _: 1
473
- })) : E("", !0)
476
+ })) : S("", !0)
474
477
  ]),
475
478
  _: 1
476
479
  }),
477
- l(f, {
480
+ e(r, {
478
481
  align: "center",
479
482
  width: "90"
480
483
  }, {
481
- default: a(({ row: t }) => [
482
- ["DRAFT", "OFF_SHELF"].indexOf(t.status) >= 0 && u.$hasPer("BANNER_PUBLISH") ? (s(), p(N, {
484
+ default: l(({ row: a }) => [
485
+ ["DRAFT", "OFF_SHELF"].indexOf(a.status) >= 0 && i.$hasPer("BANNER_PUBLISH") ? (s(), c(A, {
483
486
  key: 0,
484
- onConfirm: (C) => V(t.id),
485
- title: `确定要${t.status == "DRAFT" ? "发布" : "上架"}该Banner吗?`
487
+ onConfirm: (F) => N(a.id),
488
+ title: `确定要${a.status == "DRAFT" ? "发布" : "上架"}该Banner吗?`
486
489
  }, {
487
- reference: a(() => [
488
- l(d, { type: "success" }, {
489
- default: a(() => [
490
- _(A(t.status == "DRAFT" ? "发布" : "上架"), 1)
490
+ reference: l(() => [
491
+ e(_, { type: "success" }, {
492
+ default: l(() => [
493
+ v(R(a.status == "DRAFT" ? "发布" : "上架"), 1)
491
494
  ]),
492
495
  _: 2
493
496
  }, 1024)
494
497
  ]),
495
498
  _: 2
496
- }, 1032, ["onConfirm", "title"])) : E("", !0),
497
- t.status == "PUBLISH" && u.$hasPer("BANNER_OFF_SHELF") ? (s(), p(N, {
499
+ }, 1032, ["onConfirm", "title"])) : S("", !0),
500
+ a.status == "PUBLISH" && i.$hasPer("BANNER_OFF_SHELF") ? (s(), c(A, {
498
501
  key: 1,
499
- onConfirm: (C) => B(t.id),
502
+ onConfirm: (F) => D(a.id),
500
503
  title: "确定要[下架]该Banner吗?"
501
504
  }, {
502
- reference: a(() => [
503
- l(d, { type: "warning" }, {
504
- default: a(() => [
505
- _("下架")
505
+ reference: l(() => [
506
+ e(_, { type: "warning" }, {
507
+ default: l(() => [
508
+ v("下架")
506
509
  ]),
507
510
  _: 1
508
511
  })
509
512
  ]),
510
513
  _: 2
511
- }, 1032, ["onConfirm"])) : E("", !0)
514
+ }, 1032, ["onConfirm"])) : S("", !0)
512
515
  ]),
513
516
  _: 1
514
517
  })
515
518
  ]),
516
519
  _: 1
517
520
  }, 8, ["condition"]),
518
- l(le, {
521
+ e(me, {
519
522
  ref_key: "bannerDialog",
520
- ref: D,
521
- onSuccess: h
523
+ ref: x,
524
+ onSuccess: n
522
525
  }, null, 512)
523
526
  ], 64);
524
527
  };
525
528
  }
526
- }), ae = /* @__PURE__ */ W({
529
+ }), _e = /* @__PURE__ */ Q({
527
530
  __name: "EntranceDialog",
528
531
  emits: ["success"],
529
- setup(O, { expose: r, emit: c }) {
530
- const b = g(!1), n = g({
532
+ setup($, { expose: d, emit: f }) {
533
+ const g = b(!1), u = b({
531
534
  sceneCode: null,
532
535
  name: null,
533
536
  iconType: "NAME",
@@ -536,88 +539,88 @@ const ee = [], Y = {
536
539
  clickEventType: "",
537
540
  params: null,
538
541
  shelfTimeArr: []
539
- }), w = g({
542
+ }), V = b({
540
543
  sceneCode: [{ required: !0, message: "请输入场景代码" }],
541
544
  name: [{ required: !0, message: "请输入入口名称" }],
542
545
  iconType: [{ required: !0, message: "请选择图标类型" }],
543
- icon: [{ required: !0, message: `请${n.value.iconType == "NAME" ? "输入图标名称" : "上传图标图片"}` }],
546
+ icon: [{ required: !0, message: `请${u.value.iconType == "NAME" ? "输入图标名称" : "上传图标图片"}` }],
544
547
  targetPath: [{ required: !0, message: "请输入目标地址" }],
545
548
  clickEventType: [{ required: !0, message: "请选择点击事件类型" }]
546
- }), T = g(!1), h = q("http"), V = g();
547
- function B() {
548
- var u;
549
- (u = V.value) == null || u.validate((e) => {
550
- if (e) {
551
- T.value = !0;
552
- let m = `/api/app/entrance/${k.value ?? ""}/${k.value ? "update" : "create"}`, v = { ...n.value };
553
- v.shelfTime = null, v.offShelfTime = null, n.value.shelfTimeArr.length && (v.shelfTime = n.value.shelfTimeArr[0], v.offShelfTime = n.value.shelfTimeArr[1]), h == null || h.post(m, v).then((d) => {
554
- var y;
555
- c("success"), (y = V.value) == null || y.resetFields(), b.value = !1;
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;
556
559
  }).finally(() => {
557
- T.value = !1;
560
+ C.value = !1;
558
561
  });
559
562
  }
560
563
  });
561
564
  }
562
- const P = g([]), k = g(null);
563
- function D(u, e) {
564
- P.value = u, k.value = null, b.value = !0, X(() => {
565
- e && (k.value = e.id, Object.assign(n.value, e), e.shelfTime && e.offShelfTime && (n.value.shelfTimeArr = [new Date(e.shelfTime), new Date(e.offShelfTime)]));
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)]));
566
569
  });
567
570
  }
568
- function F() {
569
- var u;
570
- (u = V.value) == null || u.resetFields();
571
+ function I() {
572
+ var i;
573
+ (i = N.value) == null || i.resetFields();
571
574
  }
572
- return r({
573
- show: D
574
- }), (u, e) => {
575
- const m = i("el-option"), v = i("el-select"), d = i("el-form-item"), y = i("el-input"), $ = i("pg-upload"), f = i("el-collapse-transition"), L = i("el-date-picker"), I = i("el-form"), H = i("el-button"), x = i("el-dialog");
576
- return s(), p(x, {
577
- modelValue: b.value,
578
- "onUpdate:modelValue": e[9] || (e[9] = (o) => b.value = o),
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),
579
582
  width: "400",
580
- onClose: F
583
+ onClose: I
581
584
  }, {
582
- footer: a(() => [
583
- l(H, {
585
+ footer: l(() => [
586
+ e(h, {
584
587
  type: "primary",
585
- disabled: T.value,
586
- loading: T.value,
587
- onClick: B
588
+ disabled: C.value,
589
+ loading: C.value,
590
+ onClick: D
588
591
  }, {
589
- default: a(() => [
590
- _("提交")
592
+ default: l(() => [
593
+ v("提交")
591
594
  ]),
592
595
  _: 1
593
596
  }, 8, ["disabled", "loading"])
594
597
  ]),
595
- default: a(() => [
596
- l(I, {
598
+ default: l(() => [
599
+ e(k, {
597
600
  ref_key: "form",
598
- ref: V,
599
- rules: w.value,
600
- model: n.value,
601
+ ref: N,
602
+ rules: V.value,
603
+ model: u.value,
601
604
  "label-position": "top"
602
605
  }, {
603
- default: a(() => [
604
- l(d, {
606
+ default: l(() => [
607
+ e(_, {
605
608
  label: "场景代码",
606
609
  prop: "sceneCode"
607
610
  }, {
608
- default: a(() => [
609
- l(v, {
610
- modelValue: n.value.sceneCode,
611
- "onUpdate:modelValue": e[0] || (e[0] = (o) => n.value.sceneCode = o),
611
+ default: l(() => [
612
+ e(y, {
613
+ modelValue: u.value.sceneCode,
614
+ "onUpdate:modelValue": t[0] || (t[0] = (p) => u.value.sceneCode = p),
612
615
  placeholder: "请输入/选择场景代码",
613
616
  "allow-create": "",
614
617
  filterable: ""
615
618
  }, {
616
- default: a(() => [
617
- (s(!0), S(U, null, R(P.value, (o) => (s(), p(m, {
618
- key: o,
619
- value: o,
620
- label: o
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
621
624
  }, null, 8, ["value", "label"]))), 128))
622
625
  ]),
623
626
  _: 1
@@ -625,35 +628,35 @@ const ee = [], Y = {
625
628
  ]),
626
629
  _: 1
627
630
  }),
628
- l(d, {
631
+ e(_, {
629
632
  label: "入口名称",
630
633
  prop: "name"
631
634
  }, {
632
- default: a(() => [
633
- l(y, {
635
+ default: l(() => [
636
+ e(w, {
634
637
  placeholder: "请输入入口名称",
635
- modelValue: n.value.name,
636
- "onUpdate:modelValue": e[1] || (e[1] = (o) => n.value.name = o)
638
+ modelValue: u.value.name,
639
+ "onUpdate:modelValue": t[1] || (t[1] = (p) => u.value.name = p)
637
640
  }, null, 8, ["modelValue"])
638
641
  ]),
639
642
  _: 1
640
643
  }),
641
- l(d, {
644
+ e(_, {
642
645
  label: "图标类型",
643
646
  prop: "iconType"
644
647
  }, {
645
- default: a(() => [
646
- l(v, {
648
+ default: l(() => [
649
+ e(y, {
647
650
  placeholder: "请选择图标类型",
648
- modelValue: n.value.iconType,
649
- "onUpdate:modelValue": e[2] || (e[2] = (o) => n.value.iconType = o)
651
+ modelValue: u.value.iconType,
652
+ "onUpdate:modelValue": t[2] || (t[2] = (p) => u.value.iconType = p)
650
653
  }, {
651
- default: a(() => [
652
- l(m, {
654
+ default: l(() => [
655
+ e(m, {
653
656
  value: "NAME",
654
657
  label: "图标名称"
655
658
  }),
656
- l(m, {
659
+ e(m, {
657
660
  value: "URL",
658
661
  label: "图标URL"
659
662
  })
@@ -663,43 +666,43 @@ const ee = [], Y = {
663
666
  ]),
664
667
  _: 1
665
668
  }),
666
- l(d, {
669
+ e(_, {
667
670
  label: "图标",
668
671
  prop: "icon"
669
672
  }, {
670
- default: a(() => [
671
- n.value.iconType == "URL" ? (s(), p($, {
673
+ default: l(() => [
674
+ u.value.iconType == "URL" ? (s(), c(H, {
672
675
  accept: "jpg,jpeg,png,gif",
673
- modelValue: n.value.icon,
674
- "onUpdate:modelValue": e[3] || (e[3] = (o) => n.value.icon = o),
675
- key: `img_${k.value}`,
676
+ modelValue: u.value.icon,
677
+ "onUpdate:modelValue": t[3] || (t[3] = (p) => u.value.icon = p),
678
+ key: `img_${E.value}`,
676
679
  "list-type": "picture-card",
677
680
  "upload-type": "entrance",
678
681
  limit: 1
679
- }, null, 8, ["modelValue"])) : (s(), p(y, {
682
+ }, null, 8, ["modelValue"])) : (s(), c(w, {
680
683
  key: 1,
681
- modelValue: n.value.icon,
682
- "onUpdate:modelValue": e[4] || (e[4] = (o) => n.value.icon = o),
684
+ modelValue: u.value.icon,
685
+ "onUpdate:modelValue": t[4] || (t[4] = (p) => u.value.icon = p),
683
686
  placeholder: "请输入图标名称",
684
687
  clearable: ""
685
688
  }, null, 8, ["modelValue"]))
686
689
  ]),
687
690
  _: 1
688
691
  }),
689
- l(d, {
692
+ e(_, {
690
693
  label: "点击事件类型",
691
694
  prop: "clickEventType"
692
695
  }, {
693
- default: a(() => [
694
- l(v, {
696
+ default: l(() => [
697
+ e(y, {
695
698
  placeholder: "请选择点击事件类型",
696
- modelValue: n.value.clickEventType,
697
- "onUpdate:modelValue": e[5] || (e[5] = (o) => n.value.clickEventType = o)
699
+ modelValue: u.value.clickEventType,
700
+ "onUpdate:modelValue": t[5] || (t[5] = (p) => u.value.clickEventType = p)
698
701
  }, {
699
- default: a(() => [
700
- (s(!0), S(U, null, R(M(Z), (o, N) => (s(), p(m, {
701
- value: N,
702
- label: o.name
702
+ default: l(() => [
703
+ (s(!0), O(P, null, W(B(oe), (p, A) => (s(), c(m, {
704
+ value: A,
705
+ label: p.name
703
706
  }, null, 8, ["value", "label"]))), 256))
704
707
  ]),
705
708
  _: 1
@@ -707,48 +710,48 @@ const ee = [], Y = {
707
710
  ]),
708
711
  _: 1
709
712
  }),
710
- l(f, null, {
711
- default: a(() => [
712
- ["OPEN_WEB", "OPEN_VIEW", "API_REQUEST"].indexOf(n.value.clickEventType) >= 0 ? (s(), p(d, {
713
+ e(r, null, {
714
+ default: l(() => [
715
+ ["OPEN_WEB", "OPEN_VIEW", "API_REQUEST"].indexOf(u.value.clickEventType) >= 0 ? (s(), c(_, {
713
716
  key: 0,
714
717
  label: "目标地址",
715
718
  prop: "targetPath"
716
719
  }, {
717
- default: a(() => [
718
- l(y, {
720
+ default: l(() => [
721
+ e(w, {
719
722
  placeholder: "请输入目标地址",
720
- modelValue: n.value.targetPath,
721
- "onUpdate:modelValue": e[6] || (e[6] = (o) => n.value.targetPath = o)
723
+ modelValue: u.value.targetPath,
724
+ "onUpdate:modelValue": t[6] || (t[6] = (p) => u.value.targetPath = p)
722
725
  }, null, 8, ["modelValue"])
723
726
  ]),
724
727
  _: 1
725
- })) : E("", !0)
728
+ })) : S("", !0)
726
729
  ]),
727
730
  _: 1
728
731
  }),
729
- l(d, {
732
+ e(_, {
730
733
  label: "目标地址参数",
731
734
  prop: "params"
732
735
  }, {
733
- default: a(() => [
734
- l(y, {
736
+ default: l(() => [
737
+ e(w, {
735
738
  type: "textarea",
736
- modelValue: n.value.params,
737
- "onUpdate:modelValue": e[7] || (e[7] = (o) => n.value.params = o),
739
+ modelValue: u.value.params,
740
+ "onUpdate:modelValue": t[7] || (t[7] = (p) => u.value.params = p),
738
741
  placeholder: "请输入JSON格式的参数对象"
739
742
  }, null, 8, ["modelValue"])
740
743
  ]),
741
744
  _: 1
742
745
  }),
743
- l(d, {
746
+ e(_, {
744
747
  label: "生效时段",
745
748
  prop: "shelfTimeArr"
746
749
  }, {
747
- default: a(() => [
748
- l(L, {
750
+ default: l(() => [
751
+ e(q, {
749
752
  type: "datetimerange",
750
- modelValue: n.value.shelfTimeArr,
751
- "onUpdate:modelValue": e[8] || (e[8] = (o) => n.value.shelfTimeArr = o),
753
+ modelValue: u.value.shelfTimeArr,
754
+ "onUpdate:modelValue": t[8] || (t[8] = (p) => u.value.shelfTimeArr = p),
752
755
  "start-placeholder": "上架时间",
753
756
  "end-placeholder": "下架时间",
754
757
  "default-time": [new Date(2e3, 1, 1, 0, 0, 0), new Date(2e3, 1, 1, 23, 59, 59)]
@@ -764,114 +767,114 @@ const ee = [], Y = {
764
767
  }, 8, ["modelValue"]);
765
768
  };
766
769
  }
767
- }), ne = /* @__PURE__ */ W({
770
+ }), ve = /* @__PURE__ */ Q({
768
771
  __name: "EntranceListView",
769
- setup(O) {
770
- const r = q("http"), c = g({
772
+ setup($) {
773
+ const d = z("http"), f = b({
771
774
  sceneCode: null,
772
775
  status: null
773
- }), b = g([]);
774
- function n() {
775
- r == null || r.get("/api/app/entrance/all-scene-code").then((u) => {
776
- b.value = u.data;
776
+ }), g = b([]);
777
+ function u() {
778
+ d == null || d.get("/api/app/entrance/all-scene-code").then((i) => {
779
+ g.value = i.data;
777
780
  });
778
781
  }
779
- const w = g(), T = g(!1);
780
- function h() {
781
- T.value = !!c.value.sceneCode, w.value.search();
782
+ const V = b(), C = b(!1);
783
+ function n() {
784
+ C.value = !!f.value.sceneCode, V.value.search();
782
785
  }
783
- function V(u) {
784
- r == null || r.post(`/api/app/entrance/${u}/publish`).then((e) => {
785
- h();
786
+ function N(i) {
787
+ d == null || d.post(`/api/app/entrance/${i}/publish`).then((t) => {
788
+ n();
786
789
  });
787
790
  }
788
- function B(u) {
789
- r == null || r.post(`/api/app/entrance/${u}/off-shelf`).then((e) => {
790
- h();
791
+ function D(i) {
792
+ d == null || d.post(`/api/app/entrance/${i}/off-shelf`).then((t) => {
793
+ n();
791
794
  });
792
795
  }
793
- function P(u, e) {
794
- r == null || r.post(`/api/app/entrance/${u}/move-up`).then((m) => {
795
- c.value.sceneCode = e, h();
796
+ function U(i, t) {
797
+ d == null || d.post(`/api/app/entrance/${i}/move-up`).then((m) => {
798
+ f.value.sceneCode = t, n();
796
799
  });
797
800
  }
798
- function k(u, e) {
799
- r == null || r.post(`/api/app/entrance/${u}/move-down`).then((m) => {
800
- c.value.sceneCode = e, h();
801
+ function E(i, t) {
802
+ d == null || d.post(`/api/app/entrance/${i}/move-down`).then((m) => {
803
+ f.value.sceneCode = t, n();
801
804
  });
802
805
  }
803
- z(() => {
804
- n();
806
+ ee(() => {
807
+ u();
805
808
  });
806
- const D = g();
807
- function F(u) {
808
- D.value.show(b.value, u);
809
+ const x = b();
810
+ function I(i) {
811
+ x.value.show(g.value, i);
809
812
  }
810
- return (u, e) => {
811
- const m = i("el-option"), v = i("el-select"), d = i("el-button"), y = i("el-space"), $ = i("el-card"), f = i("el-table-column"), L = i("el-image"), I = i("el-descriptions-item"), H = i("el-descriptions"), x = i("el-popover"), o = i("el-tag"), N = i("el-popconfirm"), j = i("pg-table"), Q = G("permission");
812
- return s(), S(U, null, [
813
- l($, null, {
814
- default: a(() => [
815
- l(y, null, {
816
- default: a(() => [
817
- l(v, {
818
- modelValue: c.value.sceneCode,
819
- "onUpdate:modelValue": e[0] || (e[0] = (t) => c.value.sceneCode = t),
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),
820
823
  placeholder: "场景代码",
821
824
  clearable: ""
822
825
  }, {
823
- default: a(() => [
824
- (s(!0), S(U, null, R(b.value, (t, C) => (s(), p(m, {
825
- label: t,
826
- value: t,
827
- key: `sc_con_${C}`
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}`
828
831
  }, null, 8, ["label", "value"]))), 128))
829
832
  ]),
830
833
  _: 1
831
834
  }, 8, ["modelValue"]),
832
- l(v, {
833
- modelValue: c.value.status,
834
- "onUpdate:modelValue": e[1] || (e[1] = (t) => c.value.status = t),
835
+ e(y, {
836
+ modelValue: f.value.status,
837
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => f.value.status = a),
835
838
  placeholder: "状态",
836
839
  clearable: "",
837
840
  style: { width: "150px" }
838
841
  }, {
839
- default: a(() => [
840
- l(m, {
842
+ default: l(() => [
843
+ e(m, {
841
844
  label: "草稿",
842
845
  value: "DRAFT"
843
846
  }),
844
- l(m, {
847
+ e(m, {
845
848
  label: "已发布",
846
849
  value: "PUBLISH"
847
850
  }),
848
- l(m, {
851
+ e(m, {
849
852
  label: "已下架",
850
853
  value: "OFF_SHELF"
851
854
  })
852
855
  ]),
853
856
  _: 1
854
857
  }, 8, ["modelValue"]),
855
- l(d, {
858
+ e(_, {
856
859
  type: "primary",
857
860
  icon: "search",
858
- onClick: h
861
+ onClick: n
859
862
  }, {
860
- default: a(() => [
861
- _("搜索")
863
+ default: l(() => [
864
+ v("搜索")
862
865
  ]),
863
866
  _: 1
864
867
  }),
865
- K((s(), p(d, {
868
+ G((s(), c(_, {
866
869
  icon: "plus",
867
- onClick: e[2] || (e[2] = (t) => F())
870
+ onClick: t[2] || (t[2] = (a) => I())
868
871
  }, {
869
- default: a(() => [
870
- _("创建入口")
872
+ default: l(() => [
873
+ v("创建入口")
871
874
  ]),
872
875
  _: 1
873
876
  })), [
874
- [Q, "CREATE_ENTRANCE"]
877
+ [J, "CREATE_ENTRANCE"]
875
878
  ])
876
879
  ]),
877
880
  _: 1
@@ -879,244 +882,940 @@ const ee = [], Y = {
879
882
  ]),
880
883
  _: 1
881
884
  }),
882
- l(j, {
885
+ e(L, {
883
886
  ref_key: "table",
884
- ref: w,
887
+ ref: V,
885
888
  "data-url": "/api/app/entrance/page",
886
- onRowDbClick: e[3] || (e[3] = (t) => u.$hasPer("UPDATE_ENTRANCE") ? F(t) : null),
887
- condition: c.value,
889
+ onRowDbClick: t[3] || (t[3] = (a) => i.$hasPer("UPDATE_ENTRANCE") ? I(a) : null),
890
+ condition: f.value,
888
891
  style: { "margin-top": "10px" }
889
892
  }, {
890
- default: a(() => [
891
- T.value && u.$hasPer("ENTRANCE_SEQ_MOVE_UP_DOWN") ? (s(), p(f, {
893
+ default: l(() => [
894
+ C.value && i.$hasPer("ENTRANCE_SEQ_MOVE_UP_DOWN") ? (s(), c(r, {
892
895
  key: 0,
893
896
  align: "center",
894
897
  width: "80"
895
898
  }, {
896
- default: a(({ row: t }) => [
897
- l(y, { direction: "vertical" }, {
898
- default: a(() => [
899
- l(d, {
899
+ default: l(({ row: a }) => [
900
+ e(w, { direction: "vertical" }, {
901
+ default: l(() => [
902
+ e(_, {
900
903
  icon: "ArrowUpBold",
901
- onClick: (C) => P(t.id, t.sceneCode)
904
+ onClick: (F) => U(a.id, a.sceneCode)
902
905
  }, null, 8, ["onClick"]),
903
- l(d, {
906
+ e(_, {
904
907
  icon: "ArrowDownBold",
905
- onClick: (C) => k(t.id, t.sceneCode)
908
+ onClick: (F) => E(a.id, a.sceneCode)
906
909
  }, null, 8, ["onClick"])
907
910
  ]),
908
911
  _: 2
909
912
  }, 1024)
910
913
  ]),
911
914
  _: 1
912
- })) : E("", !0),
913
- l(f, {
915
+ })) : S("", !0),
916
+ e(r, {
914
917
  label: "场景代码",
915
918
  prop: "sceneCode",
916
919
  width: "150"
917
920
  }),
918
- l(f, {
921
+ e(r, {
919
922
  label: "图标",
920
923
  width: "200",
921
924
  align: "center"
922
925
  }, {
923
- default: a(({ row: t }) => [
924
- t.iconType == "URL" ? (s(), p(L, {
926
+ default: l(({ row: a }) => [
927
+ a.iconType == "URL" ? (s(), c(q, {
925
928
  key: 0,
926
- src: t.icon,
929
+ src: a.icon,
927
930
  style: { "max-width": "200px" },
928
- "preview-src-list": [t.icon],
931
+ "preview-src-list": [a.icon],
929
932
  "preview-teleported": ""
930
- }, null, 8, ["src", "preview-src-list"])) : (s(), S(U, { key: 1 }, [
931
- _(A(t.icon), 1)
933
+ }, null, 8, ["src", "preview-src-list"])) : (s(), O(P, { key: 1 }, [
934
+ v(R(a.icon), 1)
932
935
  ], 64))
933
936
  ]),
934
937
  _: 1
935
938
  }),
936
- l(f, {
939
+ e(r, {
937
940
  label: "点击事件类型",
938
941
  prop: "clickEventType",
939
942
  width: "120"
940
943
  }, {
941
- default: a(({ row: t }) => [
942
- _(A(t.clickEventType ? M(Z)[t.clickEventType].name : ""), 1)
944
+ default: l(({ row: a }) => [
945
+ v(R(a.clickEventType ? B(oe)[a.clickEventType].name : ""), 1)
943
946
  ]),
944
947
  _: 1
945
948
  }),
946
- l(f, {
949
+ e(r, {
947
950
  label: "目标地址",
948
951
  prop: "targetPath",
949
952
  "show-overflow-tooltip": ""
950
953
  }),
951
- l(f, {
954
+ e(r, {
952
955
  label: "目标参数",
953
956
  width: "120",
954
957
  "show-overflow-tooltip": ""
955
958
  }, {
956
- default: a(({ row: t }) => [
957
- t.params ? (s(), p(x, {
959
+ default: l(({ row: a }) => [
960
+ a.params ? (s(), c(M, {
958
961
  key: 0,
959
962
  trigger: "hover",
960
963
  width: "350"
961
964
  }, {
962
- reference: a(() => [
963
- _(A(t.params.substring(0, 100)) + A(t.params.length > 100 ? "..." : ""), 1)
965
+ reference: l(() => [
966
+ v(R(a.params.substring(0, 100)) + R(a.params.length > 100 ? "..." : ""), 1)
964
967
  ]),
965
- default: a(() => [
966
- t.params.startsWith("{") ? (s(), p(H, {
968
+ default: l(() => [
969
+ a.params.startsWith("{") ? (s(), c(h, {
967
970
  key: 0,
968
971
  column: "1",
969
972
  border: ""
970
973
  }, {
971
- default: a(() => [
972
- (s(!0), S(U, null, R(JSON.parse(t.params), (C, J) => (s(), p(I, {
973
- label: J,
974
+ default: l(() => [
975
+ (s(!0), O(P, null, W(JSON.parse(a.params), (F, j) => (s(), c(k, {
976
+ label: j,
974
977
  "min-width": "150"
975
978
  }, {
976
- default: a(() => [
977
- _(A(C), 1)
979
+ default: l(() => [
980
+ v(R(F), 1)
978
981
  ]),
979
982
  _: 2
980
983
  }, 1032, ["label"]))), 256))
981
984
  ]),
982
985
  _: 2
983
- }, 1024)) : (s(), S(U, { key: 1 }, [
984
- _(A(t.params), 1)
986
+ }, 1024)) : (s(), O(P, { key: 1 }, [
987
+ v(R(a.params), 1)
985
988
  ], 64))
986
989
  ]),
987
990
  _: 2
988
- }, 1024)) : E("", !0)
991
+ }, 1024)) : S("", !0)
989
992
  ]),
990
993
  _: 1
991
994
  }),
992
- l(f, {
995
+ e(r, {
993
996
  label: "上架时间",
994
997
  prop: "shelfTime",
995
998
  width: "180",
996
999
  align: "center"
997
1000
  }),
998
- l(f, {
1001
+ e(r, {
999
1002
  label: "下架时间",
1000
1003
  prop: "offShelfTime",
1001
1004
  width: "180",
1002
1005
  align: "center"
1003
1006
  }),
1004
- l(f, {
1007
+ e(r, {
1005
1008
  label: "状态",
1006
1009
  align: "center",
1007
1010
  width: "88"
1008
1011
  }, {
1009
- default: a(({ row: t }) => [
1010
- t.status == "DRAFT" ? (s(), p(o, {
1012
+ default: l(({ row: a }) => [
1013
+ a.status == "DRAFT" ? (s(), c(p, {
1011
1014
  key: 0,
1012
1015
  type: "danger"
1013
1016
  }, {
1014
- default: a(() => [
1015
- _("草稿")
1017
+ default: l(() => [
1018
+ v("草稿")
1016
1019
  ]),
1017
1020
  _: 1
1018
- })) : E("", !0),
1019
- t.status == "PUBLISH" ? (s(), p(o, {
1021
+ })) : S("", !0),
1022
+ a.status == "PUBLISH" ? (s(), c(p, {
1020
1023
  key: 1,
1021
1024
  type: "success"
1022
1025
  }, {
1023
- default: a(() => [
1024
- _("已发布")
1026
+ default: l(() => [
1027
+ v("已发布")
1025
1028
  ]),
1026
1029
  _: 1
1027
- })) : E("", !0),
1028
- t.status == "OFF_SHELF" ? (s(), p(o, {
1030
+ })) : S("", !0),
1031
+ a.status == "OFF_SHELF" ? (s(), c(p, {
1029
1032
  key: 2,
1030
1033
  type: "warning"
1031
1034
  }, {
1032
- default: a(() => [
1033
- _("已下架")
1035
+ default: l(() => [
1036
+ v("已下架")
1034
1037
  ]),
1035
1038
  _: 1
1036
- })) : E("", !0)
1039
+ })) : S("", !0)
1037
1040
  ]),
1038
1041
  _: 1
1039
1042
  }),
1040
- l(f, {
1043
+ e(r, {
1041
1044
  align: "center",
1042
1045
  width: "90"
1043
1046
  }, {
1044
- default: a(({ row: t }) => [
1045
- ["DRAFT", "OFF_SHELF"].indexOf(t.status) >= 0 && u.$hasPer("ENTRANCE_PUBLISH") ? (s(), p(N, {
1047
+ default: l(({ row: a }) => [
1048
+ ["DRAFT", "OFF_SHELF"].indexOf(a.status) >= 0 && i.$hasPer("ENTRANCE_PUBLISH") ? (s(), c(A, {
1046
1049
  key: 0,
1047
- onConfirm: (C) => V(t.id),
1048
- title: `确定要${t.status == "DRAFT" ? "发布" : "上架"}该入口吗?`
1050
+ onConfirm: (F) => N(a.id),
1051
+ title: `确定要${a.status == "DRAFT" ? "发布" : "上架"}该入口吗?`
1049
1052
  }, {
1050
- reference: a(() => [
1051
- l(d, { type: "success" }, {
1052
- default: a(() => [
1053
- _(A(t.status == "DRAFT" ? "发布" : "上架"), 1)
1053
+ reference: l(() => [
1054
+ e(_, { type: "success" }, {
1055
+ default: l(() => [
1056
+ v(R(a.status == "DRAFT" ? "发布" : "上架"), 1)
1054
1057
  ]),
1055
1058
  _: 2
1056
1059
  }, 1024)
1057
1060
  ]),
1058
1061
  _: 2
1059
- }, 1032, ["onConfirm", "title"])) : E("", !0),
1060
- t.status == "PUBLISH" && u.$hasPer("ENTRANCE_OFF_SHELF") ? (s(), p(N, {
1062
+ }, 1032, ["onConfirm", "title"])) : S("", !0),
1063
+ a.status == "PUBLISH" && i.$hasPer("ENTRANCE_OFF_SHELF") ? (s(), c(A, {
1061
1064
  key: 1,
1062
- onConfirm: (C) => B(t.id),
1065
+ onConfirm: (F) => D(a.id),
1063
1066
  title: "确定要[下架]该入口吗?"
1064
1067
  }, {
1065
- reference: a(() => [
1066
- l(d, { type: "warning" }, {
1067
- default: a(() => [
1068
- _("下架")
1068
+ reference: l(() => [
1069
+ e(_, { type: "warning" }, {
1070
+ default: l(() => [
1071
+ v("下架")
1069
1072
  ]),
1070
1073
  _: 1
1071
1074
  })
1072
1075
  ]),
1073
1076
  _: 2
1074
- }, 1032, ["onConfirm"])) : E("", !0)
1077
+ }, 1032, ["onConfirm"])) : S("", !0)
1075
1078
  ]),
1076
1079
  _: 1
1077
1080
  })
1078
1081
  ]),
1079
1082
  _: 1
1080
1083
  }, 8, ["condition"]),
1081
- l(ae, {
1084
+ e(_e, {
1082
1085
  ref_key: "entranceDialog",
1083
- ref: D,
1084
- onSuccess: h
1086
+ ref: x,
1087
+ onSuccess: n
1085
1088
  }, null, 512)
1086
1089
  ], 64);
1087
1090
  };
1088
1091
  }
1089
- }), oe = {
1090
- install: (O, r) => {
1091
- let c = r.router, b = c.getRoutes().find((n) => n.path == "/");
1092
- b && b.meta && (c.addRoute({
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({
1093
1778
  path: "/app/banner",
1094
1779
  name: "AppBanner",
1095
1780
  redirect: "/app/banner/list",
1096
- component: b.meta.commonLayout,
1781
+ component: g.meta.commonLayout,
1097
1782
  children: [{
1098
1783
  path: "list",
1099
1784
  name: "BannerListView",
1100
- component: te
1785
+ component: fe
1101
1786
  }]
1102
- }), c.addRoute({
1787
+ }), f.addRoute({
1103
1788
  path: "/app/entrance",
1104
1789
  name: "AppEntrance",
1105
1790
  redirect: "/app/entrance/list",
1106
- component: b.meta.commonLayout,
1791
+ component: g.meta.commonLayout,
1107
1792
  children: [{
1108
1793
  path: "list",
1109
1794
  name: "EntranceListView",
1110
- component: ne
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
1111
1806
  }]
1112
1807
  }));
1113
1808
  }
1114
- }, ue = (O, r) => {
1115
- ee.forEach((c) => O.use(c)), O.use(oe, r);
1116
- }, ie = {
1117
- install: ue
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
1118
1817
  };
1119
1818
  export {
1120
- ie as default,
1121
- ue as install
1819
+ Se as default,
1820
+ Te as install
1122
1821
  };