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

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