@pangu-backend-ui/apputil-core 0.0.3 → 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 +806 -221
- package/index.umd.cjs +1 -1
- package/package.json +1 -1
- package/types/Constant.d.ts +17 -0
- package/types/views/BannerListView.vue.d.ts +1 -0
- package/types/views/EntranceListView.vue.d.ts +420 -0
- package/types/views/components/BannerDialog.vue.d.ts +3 -1
- package/types/views/components/EntranceDialog.vue.d.ts +386 -0
package/index.js
CHANGED
|
@@ -1,95 +1,107 @@
|
|
|
1
|
-
import { defineComponent as W, ref as
|
|
2
|
-
const
|
|
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
3
|
OPEN_WEB: { name: "打开Web页面" },
|
|
4
4
|
OPEN_VIEW: { name: "打开内置页面" },
|
|
5
5
|
API_REQUEST: { name: "请求API" },
|
|
6
6
|
EXEC_METHOD: { name: "执行方法" },
|
|
7
7
|
CUSTOM: { name: "自定义" }
|
|
8
|
-
}, Z =
|
|
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({
|
|
9
15
|
__name: "BannerDialog",
|
|
10
16
|
emits: ["success"],
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
17
|
+
setup(O, { expose: r, emit: c }) {
|
|
18
|
+
const b = g(!1), n = g({
|
|
13
19
|
sceneCode: null,
|
|
14
20
|
image: null,
|
|
15
21
|
targetPath: null,
|
|
16
22
|
clickEventType: "",
|
|
17
23
|
params: null,
|
|
18
24
|
shelfTimeArr: []
|
|
19
|
-
}),
|
|
25
|
+
}), w = g({
|
|
20
26
|
sceneCode: [{ required: !0, message: "请输入场景代码" }],
|
|
21
27
|
image: [{ required: !0, message: "请上传图片" }],
|
|
22
28
|
targetPath: [{ required: !0, message: "请输入目标地址" }],
|
|
23
29
|
clickEventType: [{ required: !0, message: "请选择点击事件类型" }]
|
|
24
|
-
}),
|
|
25
|
-
function
|
|
26
|
-
var
|
|
27
|
-
(
|
|
30
|
+
}), T = g(!1), h = q("http"), V = g();
|
|
31
|
+
function B() {
|
|
32
|
+
var u;
|
|
33
|
+
(u = V.value) == null || u.validate((e) => {
|
|
28
34
|
if (e) {
|
|
29
|
-
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
var
|
|
33
|
-
|
|
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;
|
|
34
40
|
}).finally(() => {
|
|
35
|
-
|
|
41
|
+
T.value = !1;
|
|
36
42
|
});
|
|
37
43
|
}
|
|
38
44
|
});
|
|
39
45
|
}
|
|
40
|
-
const
|
|
41
|
-
function
|
|
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() {
|
|
42
53
|
var u;
|
|
43
|
-
|
|
54
|
+
(u = V.value) == null || u.resetFields();
|
|
44
55
|
}
|
|
45
56
|
return r({
|
|
46
|
-
show:
|
|
47
|
-
}), (
|
|
48
|
-
const
|
|
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");
|
|
49
60
|
return s(), p(x, {
|
|
50
|
-
modelValue:
|
|
51
|
-
"onUpdate:modelValue": e[6] || (e[6] = (
|
|
52
|
-
width: "400"
|
|
61
|
+
modelValue: b.value,
|
|
62
|
+
"onUpdate:modelValue": e[6] || (e[6] = (o) => b.value = o),
|
|
63
|
+
width: "400",
|
|
64
|
+
onClosed: F
|
|
53
65
|
}, {
|
|
54
|
-
footer:
|
|
55
|
-
|
|
66
|
+
footer: a(() => [
|
|
67
|
+
l(H, {
|
|
56
68
|
type: "primary",
|
|
57
|
-
disabled:
|
|
58
|
-
loading:
|
|
59
|
-
onClick:
|
|
69
|
+
disabled: T.value,
|
|
70
|
+
loading: T.value,
|
|
71
|
+
onClick: B
|
|
60
72
|
}, {
|
|
61
|
-
default:
|
|
62
|
-
|
|
73
|
+
default: a(() => [
|
|
74
|
+
_("提交")
|
|
63
75
|
]),
|
|
64
76
|
_: 1
|
|
65
77
|
}, 8, ["disabled", "loading"])
|
|
66
78
|
]),
|
|
67
|
-
default:
|
|
68
|
-
|
|
79
|
+
default: a(() => [
|
|
80
|
+
l(I, {
|
|
69
81
|
ref_key: "form",
|
|
70
82
|
ref: V,
|
|
71
|
-
rules:
|
|
72
|
-
model:
|
|
83
|
+
rules: w.value,
|
|
84
|
+
model: n.value,
|
|
73
85
|
"label-position": "top"
|
|
74
86
|
}, {
|
|
75
|
-
default:
|
|
76
|
-
|
|
87
|
+
default: a(() => [
|
|
88
|
+
l(d, {
|
|
77
89
|
label: "场景代码",
|
|
78
90
|
prop: "sceneCode"
|
|
79
91
|
}, {
|
|
80
|
-
default:
|
|
81
|
-
|
|
82
|
-
modelValue:
|
|
83
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
92
|
+
default: a(() => [
|
|
93
|
+
l(v, {
|
|
94
|
+
modelValue: n.value.sceneCode,
|
|
95
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => n.value.sceneCode = o),
|
|
84
96
|
placeholder: "请输入/选择场景代码",
|
|
85
97
|
"allow-create": "",
|
|
86
98
|
filterable: ""
|
|
87
99
|
}, {
|
|
88
|
-
default:
|
|
89
|
-
(s(!0),
|
|
90
|
-
key:
|
|
91
|
-
value:
|
|
92
|
-
label:
|
|
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
|
|
93
105
|
}, null, 8, ["value", "label"]))), 128))
|
|
94
106
|
]),
|
|
95
107
|
_: 1
|
|
@@ -97,16 +109,16 @@ const Y = [], M = {
|
|
|
97
109
|
]),
|
|
98
110
|
_: 1
|
|
99
111
|
}),
|
|
100
|
-
|
|
112
|
+
l(d, {
|
|
101
113
|
label: "图片",
|
|
102
114
|
prop: "image"
|
|
103
115
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
(s(), p(
|
|
116
|
+
default: a(() => [
|
|
117
|
+
(s(), p(y, {
|
|
106
118
|
accept: "jpg,jpeg,png",
|
|
107
|
-
modelValue:
|
|
108
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
109
|
-
key: `img_${
|
|
119
|
+
modelValue: n.value.image,
|
|
120
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => n.value.image = o),
|
|
121
|
+
key: `img_${k.value}`,
|
|
110
122
|
"list-type": "picture-card",
|
|
111
123
|
"upload-type": "banner",
|
|
112
124
|
limit: 1
|
|
@@ -114,20 +126,20 @@ const Y = [], M = {
|
|
|
114
126
|
]),
|
|
115
127
|
_: 1
|
|
116
128
|
}),
|
|
117
|
-
|
|
129
|
+
l(d, {
|
|
118
130
|
label: "点击事件类型",
|
|
119
131
|
prop: "clickEventType"
|
|
120
132
|
}, {
|
|
121
|
-
default:
|
|
122
|
-
|
|
133
|
+
default: a(() => [
|
|
134
|
+
l(v, {
|
|
123
135
|
placeholder: "请选择点击事件类型",
|
|
124
|
-
modelValue:
|
|
125
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
136
|
+
modelValue: n.value.clickEventType,
|
|
137
|
+
"onUpdate:modelValue": e[2] || (e[2] = (o) => n.value.clickEventType = o)
|
|
126
138
|
}, {
|
|
127
|
-
default:
|
|
128
|
-
(s(!0),
|
|
129
|
-
value:
|
|
130
|
-
label:
|
|
139
|
+
default: a(() => [
|
|
140
|
+
(s(!0), S(U, null, R(M(Y), (o, N) => (s(), p(m, {
|
|
141
|
+
value: N,
|
|
142
|
+
label: o.name
|
|
131
143
|
}, null, 8, ["value", "label"]))), 256))
|
|
132
144
|
]),
|
|
133
145
|
_: 1
|
|
@@ -135,18 +147,18 @@ const Y = [], M = {
|
|
|
135
147
|
]),
|
|
136
148
|
_: 1
|
|
137
149
|
}),
|
|
138
|
-
|
|
139
|
-
default:
|
|
140
|
-
["OPEN_WEB", "OPEN_VIEW", "API_REQUEST"].indexOf(
|
|
150
|
+
l(f, null, {
|
|
151
|
+
default: a(() => [
|
|
152
|
+
["OPEN_WEB", "OPEN_VIEW", "API_REQUEST"].indexOf(n.value.clickEventType) >= 0 ? (s(), p(d, {
|
|
141
153
|
key: 0,
|
|
142
154
|
label: "目标地址",
|
|
143
155
|
prop: "targetPath"
|
|
144
156
|
}, {
|
|
145
|
-
default:
|
|
146
|
-
|
|
157
|
+
default: a(() => [
|
|
158
|
+
l($, {
|
|
147
159
|
placeholder: "请输入目标地址",
|
|
148
|
-
modelValue:
|
|
149
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
160
|
+
modelValue: n.value.targetPath,
|
|
161
|
+
"onUpdate:modelValue": e[3] || (e[3] = (o) => n.value.targetPath = o)
|
|
150
162
|
}, null, 8, ["modelValue"])
|
|
151
163
|
]),
|
|
152
164
|
_: 1
|
|
@@ -154,29 +166,29 @@ const Y = [], M = {
|
|
|
154
166
|
]),
|
|
155
167
|
_: 1
|
|
156
168
|
}),
|
|
157
|
-
|
|
169
|
+
l(d, {
|
|
158
170
|
label: "目标地址参数",
|
|
159
171
|
prop: "params"
|
|
160
172
|
}, {
|
|
161
|
-
default:
|
|
162
|
-
|
|
173
|
+
default: a(() => [
|
|
174
|
+
l($, {
|
|
163
175
|
type: "textarea",
|
|
164
|
-
modelValue:
|
|
165
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
176
|
+
modelValue: n.value.params,
|
|
177
|
+
"onUpdate:modelValue": e[4] || (e[4] = (o) => n.value.params = o),
|
|
166
178
|
placeholder: "请输入JSON格式的参数对象"
|
|
167
179
|
}, null, 8, ["modelValue"])
|
|
168
180
|
]),
|
|
169
181
|
_: 1
|
|
170
182
|
}),
|
|
171
|
-
|
|
183
|
+
l(d, {
|
|
172
184
|
label: "生效时段",
|
|
173
185
|
prop: "shelfTimeArr"
|
|
174
186
|
}, {
|
|
175
|
-
default:
|
|
176
|
-
|
|
187
|
+
default: a(() => [
|
|
188
|
+
l(L, {
|
|
177
189
|
type: "datetimerange",
|
|
178
|
-
modelValue:
|
|
179
|
-
"onUpdate:modelValue": e[5] || (e[5] = (
|
|
190
|
+
modelValue: n.value.shelfTimeArr,
|
|
191
|
+
"onUpdate:modelValue": e[5] || (e[5] = (o) => n.value.shelfTimeArr = o),
|
|
180
192
|
"start-placeholder": "上架时间",
|
|
181
193
|
"end-placeholder": "下架时间",
|
|
182
194
|
"default-time": [new Date(2e3, 1, 1, 0, 0, 0), new Date(2e3, 1, 1, 23, 59, 59)]
|
|
@@ -192,114 +204,114 @@ const Y = [], M = {
|
|
|
192
204
|
}, 8, ["modelValue"]);
|
|
193
205
|
};
|
|
194
206
|
}
|
|
195
|
-
}),
|
|
207
|
+
}), te = /* @__PURE__ */ W({
|
|
196
208
|
__name: "BannerListView",
|
|
197
|
-
setup(
|
|
198
|
-
const r =
|
|
209
|
+
setup(O) {
|
|
210
|
+
const r = q("http"), c = g({
|
|
199
211
|
sceneCode: null,
|
|
200
212
|
status: null
|
|
201
|
-
}),
|
|
202
|
-
function
|
|
203
|
-
r == null || r.get("/api/banner/all-scene-code").then((
|
|
204
|
-
|
|
213
|
+
}), b = g([]);
|
|
214
|
+
function n() {
|
|
215
|
+
r == null || r.get("/api/app/banner/all-scene-code").then((u) => {
|
|
216
|
+
b.value = u.data;
|
|
205
217
|
});
|
|
206
218
|
}
|
|
207
|
-
const
|
|
208
|
-
function
|
|
209
|
-
|
|
219
|
+
const w = g(), T = g(!1);
|
|
220
|
+
function h() {
|
|
221
|
+
T.value = !!c.value.sceneCode, w.value.search();
|
|
210
222
|
}
|
|
211
|
-
function V(
|
|
212
|
-
r == null || r.post(`/api/banner/${
|
|
213
|
-
|
|
223
|
+
function V(u) {
|
|
224
|
+
r == null || r.post(`/api/app/banner/${u}/publish`).then((e) => {
|
|
225
|
+
h();
|
|
214
226
|
});
|
|
215
227
|
}
|
|
216
|
-
function
|
|
217
|
-
r == null || r.post(`/api/banner/${
|
|
218
|
-
|
|
228
|
+
function B(u) {
|
|
229
|
+
r == null || r.post(`/api/app/banner/${u}/off-shelf`).then((e) => {
|
|
230
|
+
h();
|
|
219
231
|
});
|
|
220
232
|
}
|
|
221
|
-
function
|
|
222
|
-
r == null || r.post(`/api/banner/${
|
|
223
|
-
|
|
233
|
+
function P(u, e) {
|
|
234
|
+
r == null || r.post(`/api/app/banner/${u}/move-up`).then((m) => {
|
|
235
|
+
c.value.sceneCode = e, h();
|
|
224
236
|
});
|
|
225
237
|
}
|
|
226
|
-
function
|
|
227
|
-
r == null || r.post(`/api/banner/${
|
|
228
|
-
|
|
238
|
+
function k(u, e) {
|
|
239
|
+
r == null || r.post(`/api/app/banner/${u}/move-down`).then((m) => {
|
|
240
|
+
c.value.sceneCode = e, h();
|
|
229
241
|
});
|
|
230
242
|
}
|
|
231
243
|
z(() => {
|
|
232
|
-
|
|
244
|
+
n();
|
|
233
245
|
});
|
|
234
|
-
const
|
|
235
|
-
function
|
|
236
|
-
|
|
246
|
+
const D = g();
|
|
247
|
+
function F(u) {
|
|
248
|
+
D.value.show(b.value, u);
|
|
237
249
|
}
|
|
238
|
-
return (
|
|
239
|
-
const
|
|
240
|
-
return s(),
|
|
241
|
-
|
|
242
|
-
default:
|
|
243
|
-
|
|
244
|
-
default:
|
|
245
|
-
|
|
246
|
-
modelValue:
|
|
247
|
-
"onUpdate:modelValue":
|
|
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),
|
|
248
260
|
placeholder: "场景代码",
|
|
249
261
|
clearable: ""
|
|
250
262
|
}, {
|
|
251
|
-
default:
|
|
252
|
-
(s(!0),
|
|
253
|
-
label:
|
|
254
|
-
value:
|
|
255
|
-
key: `sc_con_${
|
|
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}`
|
|
256
268
|
}, null, 8, ["label", "value"]))), 128))
|
|
257
269
|
]),
|
|
258
270
|
_: 1
|
|
259
271
|
}, 8, ["modelValue"]),
|
|
260
|
-
|
|
261
|
-
modelValue:
|
|
262
|
-
"onUpdate:modelValue":
|
|
272
|
+
l(v, {
|
|
273
|
+
modelValue: c.value.status,
|
|
274
|
+
"onUpdate:modelValue": e[1] || (e[1] = (t) => c.value.status = t),
|
|
263
275
|
placeholder: "状态",
|
|
264
276
|
clearable: "",
|
|
265
277
|
style: { width: "150px" }
|
|
266
278
|
}, {
|
|
267
|
-
default:
|
|
268
|
-
|
|
279
|
+
default: a(() => [
|
|
280
|
+
l(m, {
|
|
269
281
|
label: "草稿",
|
|
270
282
|
value: "DRAFT"
|
|
271
283
|
}),
|
|
272
|
-
|
|
284
|
+
l(m, {
|
|
273
285
|
label: "已发布",
|
|
274
286
|
value: "PUBLISH"
|
|
275
287
|
}),
|
|
276
|
-
|
|
288
|
+
l(m, {
|
|
277
289
|
label: "已下架",
|
|
278
290
|
value: "OFF_SHELF"
|
|
279
291
|
})
|
|
280
292
|
]),
|
|
281
293
|
_: 1
|
|
282
294
|
}, 8, ["modelValue"]),
|
|
283
|
-
|
|
295
|
+
l(d, {
|
|
284
296
|
type: "primary",
|
|
285
297
|
icon: "search",
|
|
286
|
-
onClick:
|
|
298
|
+
onClick: h
|
|
287
299
|
}, {
|
|
288
|
-
default:
|
|
289
|
-
|
|
300
|
+
default: a(() => [
|
|
301
|
+
_("搜索")
|
|
290
302
|
]),
|
|
291
303
|
_: 1
|
|
292
304
|
}),
|
|
293
|
-
K((s(), p(
|
|
305
|
+
K((s(), p(d, {
|
|
294
306
|
icon: "plus",
|
|
295
|
-
onClick:
|
|
307
|
+
onClick: e[2] || (e[2] = (t) => F())
|
|
296
308
|
}, {
|
|
297
|
-
default:
|
|
298
|
-
|
|
309
|
+
default: a(() => [
|
|
310
|
+
_("创建Banner")
|
|
299
311
|
]),
|
|
300
312
|
_: 1
|
|
301
313
|
})), [
|
|
302
|
-
[
|
|
314
|
+
[Q, "CREATE_BANNER"]
|
|
303
315
|
])
|
|
304
316
|
]),
|
|
305
317
|
_: 1
|
|
@@ -307,30 +319,30 @@ const Y = [], M = {
|
|
|
307
319
|
]),
|
|
308
320
|
_: 1
|
|
309
321
|
}),
|
|
310
|
-
|
|
322
|
+
l(j, {
|
|
311
323
|
ref_key: "table",
|
|
312
|
-
ref:
|
|
313
|
-
"data-url": "/api/banner/page",
|
|
314
|
-
onRowDbClick:
|
|
315
|
-
condition:
|
|
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,
|
|
316
328
|
style: { "margin-top": "10px" }
|
|
317
329
|
}, {
|
|
318
|
-
default:
|
|
319
|
-
|
|
330
|
+
default: a(() => [
|
|
331
|
+
T.value && u.$hasPer("BANNER_SEQ_MOVE_UP_DOWN") ? (s(), p(f, {
|
|
320
332
|
key: 0,
|
|
321
333
|
align: "center",
|
|
322
334
|
width: "80"
|
|
323
335
|
}, {
|
|
324
|
-
default:
|
|
325
|
-
|
|
326
|
-
default:
|
|
327
|
-
|
|
336
|
+
default: a(({ row: t }) => [
|
|
337
|
+
l(y, { direction: "vertical" }, {
|
|
338
|
+
default: a(() => [
|
|
339
|
+
l(d, {
|
|
328
340
|
icon: "ArrowUpBold",
|
|
329
|
-
onClick: (
|
|
341
|
+
onClick: (C) => P(t.id, t.sceneCode)
|
|
330
342
|
}, null, 8, ["onClick"]),
|
|
331
|
-
|
|
343
|
+
l(d, {
|
|
332
344
|
icon: "ArrowDownBold",
|
|
333
|
-
onClick: (
|
|
345
|
+
onClick: (C) => k(t.id, t.sceneCode)
|
|
334
346
|
}, null, 8, ["onClick"])
|
|
335
347
|
]),
|
|
336
348
|
_: 2
|
|
@@ -338,75 +350,75 @@ const Y = [], M = {
|
|
|
338
350
|
]),
|
|
339
351
|
_: 1
|
|
340
352
|
})) : E("", !0),
|
|
341
|
-
|
|
353
|
+
l(f, {
|
|
342
354
|
label: "场景代码",
|
|
343
355
|
prop: "sceneCode",
|
|
344
356
|
width: "150"
|
|
345
357
|
}),
|
|
346
|
-
|
|
358
|
+
l(f, {
|
|
347
359
|
label: "图片",
|
|
348
360
|
width: "300",
|
|
349
361
|
align: "center"
|
|
350
362
|
}, {
|
|
351
|
-
default:
|
|
352
|
-
|
|
353
|
-
src:
|
|
363
|
+
default: a(({ row: t }) => [
|
|
364
|
+
l(L, {
|
|
365
|
+
src: t.image,
|
|
354
366
|
style: { "max-width": "300px" },
|
|
355
|
-
"preview-src-list": [
|
|
367
|
+
"preview-src-list": [t.image],
|
|
356
368
|
"preview-teleported": ""
|
|
357
369
|
}, null, 8, ["src", "preview-src-list"])
|
|
358
370
|
]),
|
|
359
371
|
_: 1
|
|
360
372
|
}),
|
|
361
|
-
|
|
373
|
+
l(f, {
|
|
362
374
|
label: "点击事件类型",
|
|
363
375
|
prop: "clickEventType",
|
|
364
376
|
width: "120"
|
|
365
377
|
}, {
|
|
366
|
-
default:
|
|
367
|
-
|
|
378
|
+
default: a(({ row: t }) => [
|
|
379
|
+
_(A(t.clickEventType ? M(Y)[t.clickEventType].name : ""), 1)
|
|
368
380
|
]),
|
|
369
381
|
_: 1
|
|
370
382
|
}),
|
|
371
|
-
|
|
383
|
+
l(f, {
|
|
372
384
|
label: "目标地址",
|
|
373
385
|
prop: "targetPath",
|
|
374
386
|
"show-overflow-tooltip": ""
|
|
375
387
|
}),
|
|
376
|
-
|
|
388
|
+
l(f, {
|
|
377
389
|
label: "目标参数",
|
|
378
390
|
width: "120",
|
|
379
391
|
"show-overflow-tooltip": ""
|
|
380
392
|
}, {
|
|
381
|
-
default:
|
|
382
|
-
|
|
393
|
+
default: a(({ row: t }) => [
|
|
394
|
+
t.params ? (s(), p(x, {
|
|
383
395
|
key: 0,
|
|
384
396
|
trigger: "hover",
|
|
385
397
|
width: "350"
|
|
386
398
|
}, {
|
|
387
|
-
reference:
|
|
388
|
-
|
|
399
|
+
reference: a(() => [
|
|
400
|
+
_(A(t.params.substring(0, 100)) + A(t.params.length > 100 ? "..." : ""), 1)
|
|
389
401
|
]),
|
|
390
|
-
default:
|
|
391
|
-
|
|
402
|
+
default: a(() => [
|
|
403
|
+
t.params.startsWith("{") ? (s(), p(H, {
|
|
392
404
|
key: 0,
|
|
393
405
|
column: "1",
|
|
394
406
|
border: ""
|
|
395
407
|
}, {
|
|
396
|
-
default:
|
|
397
|
-
(s(!0),
|
|
398
|
-
label:
|
|
408
|
+
default: a(() => [
|
|
409
|
+
(s(!0), S(U, null, R(JSON.parse(t.params), (C, J) => (s(), p(I, {
|
|
410
|
+
label: J,
|
|
399
411
|
"min-width": "150"
|
|
400
412
|
}, {
|
|
401
|
-
default:
|
|
402
|
-
|
|
413
|
+
default: a(() => [
|
|
414
|
+
_(A(C), 1)
|
|
403
415
|
]),
|
|
404
416
|
_: 2
|
|
405
417
|
}, 1032, ["label"]))), 256))
|
|
406
418
|
]),
|
|
407
419
|
_: 2
|
|
408
|
-
}, 1024)) : (s(),
|
|
409
|
-
|
|
420
|
+
}, 1024)) : (s(), S(U, { key: 1 }, [
|
|
421
|
+
_(A(t.params), 1)
|
|
410
422
|
], 64))
|
|
411
423
|
]),
|
|
412
424
|
_: 2
|
|
@@ -414,83 +426,83 @@ const Y = [], M = {
|
|
|
414
426
|
]),
|
|
415
427
|
_: 1
|
|
416
428
|
}),
|
|
417
|
-
|
|
429
|
+
l(f, {
|
|
418
430
|
label: "上架时间",
|
|
419
431
|
prop: "shelfTime",
|
|
420
432
|
width: "180",
|
|
421
433
|
align: "center"
|
|
422
434
|
}),
|
|
423
|
-
|
|
435
|
+
l(f, {
|
|
424
436
|
label: "下架时间",
|
|
425
437
|
prop: "offShelfTime",
|
|
426
438
|
width: "180",
|
|
427
439
|
align: "center"
|
|
428
440
|
}),
|
|
429
|
-
|
|
441
|
+
l(f, {
|
|
430
442
|
label: "状态",
|
|
431
443
|
align: "center",
|
|
432
444
|
width: "88"
|
|
433
445
|
}, {
|
|
434
|
-
default:
|
|
435
|
-
|
|
446
|
+
default: a(({ row: t }) => [
|
|
447
|
+
t.status == "DRAFT" ? (s(), p(o, {
|
|
436
448
|
key: 0,
|
|
437
449
|
type: "danger"
|
|
438
450
|
}, {
|
|
439
|
-
default:
|
|
440
|
-
|
|
451
|
+
default: a(() => [
|
|
452
|
+
_("草稿")
|
|
441
453
|
]),
|
|
442
454
|
_: 1
|
|
443
455
|
})) : E("", !0),
|
|
444
|
-
|
|
456
|
+
t.status == "PUBLISH" ? (s(), p(o, {
|
|
445
457
|
key: 1,
|
|
446
458
|
type: "success"
|
|
447
459
|
}, {
|
|
448
|
-
default:
|
|
449
|
-
|
|
460
|
+
default: a(() => [
|
|
461
|
+
_("已发布")
|
|
450
462
|
]),
|
|
451
463
|
_: 1
|
|
452
464
|
})) : E("", !0),
|
|
453
|
-
|
|
465
|
+
t.status == "OFF_SHELF" ? (s(), p(o, {
|
|
454
466
|
key: 2,
|
|
455
467
|
type: "warning"
|
|
456
468
|
}, {
|
|
457
|
-
default:
|
|
458
|
-
|
|
469
|
+
default: a(() => [
|
|
470
|
+
_("已下架")
|
|
459
471
|
]),
|
|
460
472
|
_: 1
|
|
461
473
|
})) : E("", !0)
|
|
462
474
|
]),
|
|
463
475
|
_: 1
|
|
464
476
|
}),
|
|
465
|
-
|
|
477
|
+
l(f, {
|
|
466
478
|
align: "center",
|
|
467
479
|
width: "90"
|
|
468
480
|
}, {
|
|
469
|
-
default:
|
|
470
|
-
["DRAFT", "OFF_SHELF"].indexOf(
|
|
481
|
+
default: a(({ row: t }) => [
|
|
482
|
+
["DRAFT", "OFF_SHELF"].indexOf(t.status) >= 0 && u.$hasPer("BANNER_PUBLISH") ? (s(), p(N, {
|
|
471
483
|
key: 0,
|
|
472
|
-
onConfirm: (
|
|
473
|
-
title: `确定要${
|
|
484
|
+
onConfirm: (C) => V(t.id),
|
|
485
|
+
title: `确定要${t.status == "DRAFT" ? "发布" : "上架"}该Banner吗?`
|
|
474
486
|
}, {
|
|
475
|
-
reference:
|
|
476
|
-
|
|
477
|
-
default:
|
|
478
|
-
|
|
487
|
+
reference: a(() => [
|
|
488
|
+
l(d, { type: "success" }, {
|
|
489
|
+
default: a(() => [
|
|
490
|
+
_(A(t.status == "DRAFT" ? "发布" : "上架"), 1)
|
|
479
491
|
]),
|
|
480
492
|
_: 2
|
|
481
493
|
}, 1024)
|
|
482
494
|
]),
|
|
483
495
|
_: 2
|
|
484
496
|
}, 1032, ["onConfirm", "title"])) : E("", !0),
|
|
485
|
-
|
|
497
|
+
t.status == "PUBLISH" && u.$hasPer("BANNER_OFF_SHELF") ? (s(), p(N, {
|
|
486
498
|
key: 1,
|
|
487
|
-
onConfirm: (
|
|
499
|
+
onConfirm: (C) => B(t.id),
|
|
488
500
|
title: "确定要[下架]该Banner吗?"
|
|
489
501
|
}, {
|
|
490
|
-
reference:
|
|
491
|
-
|
|
492
|
-
default:
|
|
493
|
-
|
|
502
|
+
reference: a(() => [
|
|
503
|
+
l(d, { type: "warning" }, {
|
|
504
|
+
default: a(() => [
|
|
505
|
+
_("下架")
|
|
494
506
|
]),
|
|
495
507
|
_: 1
|
|
496
508
|
})
|
|
@@ -503,35 +515,608 @@ const Y = [], M = {
|
|
|
503
515
|
]),
|
|
504
516
|
_: 1
|
|
505
517
|
}, 8, ["condition"]),
|
|
506
|
-
|
|
518
|
+
l(le, {
|
|
507
519
|
ref_key: "bannerDialog",
|
|
508
|
-
ref:
|
|
509
|
-
onSuccess:
|
|
520
|
+
ref: D,
|
|
521
|
+
onSuccess: h
|
|
522
|
+
}, null, 512)
|
|
523
|
+
], 64);
|
|
524
|
+
};
|
|
525
|
+
}
|
|
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
|
|
510
1085
|
}, null, 512)
|
|
511
1086
|
], 64);
|
|
512
1087
|
};
|
|
513
1088
|
}
|
|
514
|
-
}),
|
|
515
|
-
install: (
|
|
516
|
-
let
|
|
517
|
-
|
|
518
|
-
path: "/
|
|
519
|
-
name: "
|
|
520
|
-
redirect: "/
|
|
521
|
-
component:
|
|
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,
|
|
522
1097
|
children: [{
|
|
523
1098
|
path: "list",
|
|
524
1099
|
name: "BannerListView",
|
|
525
|
-
component:
|
|
1100
|
+
component: te
|
|
526
1101
|
}]
|
|
527
|
-
})
|
|
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
|
+
}));
|
|
528
1113
|
}
|
|
529
|
-
},
|
|
530
|
-
|
|
531
|
-
},
|
|
532
|
-
install:
|
|
1114
|
+
}, ue = (O, r) => {
|
|
1115
|
+
ee.forEach((c) => O.use(c)), O.use(oe, r);
|
|
1116
|
+
}, ie = {
|
|
1117
|
+
install: ue
|
|
533
1118
|
};
|
|
534
1119
|
export {
|
|
535
|
-
|
|
536
|
-
|
|
1120
|
+
ie as default,
|
|
1121
|
+
ue as install
|
|
537
1122
|
};
|