@pangu-backend-ui/apputil-core 0.0.4 → 0.0.6

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