@pangu-backend-ui/apputil-core 0.0.5 → 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 +39 -40
- package/index.umd.cjs +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/views/VersionListView.vue.d.ts +2 -4
- package/types/views/components/VersionDialog.vue.d.ts +1 -2
package/index.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
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
|
|
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
2
|
import { ElMessage as Y } from "element-plus";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const ce = [], ae = {
|
|
3
|
+
import { defineStore as pe } from "pinia";
|
|
4
|
+
const de = [], te = {
|
|
6
5
|
OPEN_WEB: { name: "打开Web页面" },
|
|
7
6
|
OPEN_VIEW: { name: "打开内置页面" },
|
|
8
7
|
API_REQUEST: { name: "请求API" },
|
|
9
8
|
EXEC_METHOD: { name: "执行方法" },
|
|
10
9
|
CUSTOM: { name: "自定义" }
|
|
11
|
-
},
|
|
10
|
+
}, ae = {
|
|
12
11
|
OPEN_WEB: { name: "打开Web页面" },
|
|
13
12
|
OPEN_VIEW: { name: "打开内置页面" },
|
|
14
13
|
API_REQUEST: { name: "请求API" },
|
|
15
14
|
EXEC_METHOD: { name: "执行方法" },
|
|
16
15
|
CUSTOM: { name: "自定义" }
|
|
17
|
-
},
|
|
16
|
+
}, ce = /* @__PURE__ */ Q({
|
|
18
17
|
__name: "BannerDialog",
|
|
19
18
|
emits: ["success"],
|
|
20
19
|
setup($, { expose: d, emit: f }) {
|
|
@@ -140,7 +139,7 @@ const ce = [], ae = {
|
|
|
140
139
|
"onUpdate:modelValue": t[2] || (t[2] = (p) => u.value.clickEventType = p)
|
|
141
140
|
}, {
|
|
142
141
|
default: l(() => [
|
|
143
|
-
(s(!0), O(P, null, W(B(
|
|
142
|
+
(s(!0), O(P, null, W(B(te), (p, A) => (s(), c(m, {
|
|
144
143
|
value: A,
|
|
145
144
|
label: p.name
|
|
146
145
|
}, null, 8, ["value", "label"]))), 256))
|
|
@@ -207,7 +206,7 @@ const ce = [], ae = {
|
|
|
207
206
|
}, 8, ["modelValue"]);
|
|
208
207
|
};
|
|
209
208
|
}
|
|
210
|
-
}),
|
|
209
|
+
}), me = /* @__PURE__ */ Q({
|
|
211
210
|
__name: "BannerListView",
|
|
212
211
|
setup($) {
|
|
213
212
|
const d = z("http"), f = b({
|
|
@@ -379,7 +378,7 @@ const ce = [], ae = {
|
|
|
379
378
|
width: "120"
|
|
380
379
|
}, {
|
|
381
380
|
default: l(({ row: a }) => [
|
|
382
|
-
v(R(a.clickEventType ? B(
|
|
381
|
+
v(R(a.clickEventType ? B(te)[a.clickEventType].name : ""), 1)
|
|
383
382
|
]),
|
|
384
383
|
_: 1
|
|
385
384
|
}),
|
|
@@ -518,7 +517,7 @@ const ce = [], ae = {
|
|
|
518
517
|
]),
|
|
519
518
|
_: 1
|
|
520
519
|
}, 8, ["condition"]),
|
|
521
|
-
e(
|
|
520
|
+
e(ce, {
|
|
522
521
|
ref_key: "bannerDialog",
|
|
523
522
|
ref: x,
|
|
524
523
|
onSuccess: n
|
|
@@ -526,7 +525,7 @@ const ce = [], ae = {
|
|
|
526
525
|
], 64);
|
|
527
526
|
};
|
|
528
527
|
}
|
|
529
|
-
}),
|
|
528
|
+
}), fe = /* @__PURE__ */ Q({
|
|
530
529
|
__name: "EntranceDialog",
|
|
531
530
|
emits: ["success"],
|
|
532
531
|
setup($, { expose: d, emit: f }) {
|
|
@@ -700,7 +699,7 @@ const ce = [], ae = {
|
|
|
700
699
|
"onUpdate:modelValue": t[5] || (t[5] = (p) => u.value.clickEventType = p)
|
|
701
700
|
}, {
|
|
702
701
|
default: l(() => [
|
|
703
|
-
(s(!0), O(P, null, W(B(
|
|
702
|
+
(s(!0), O(P, null, W(B(ae), (p, A) => (s(), c(m, {
|
|
704
703
|
value: A,
|
|
705
704
|
label: p.name
|
|
706
705
|
}, null, 8, ["value", "label"]))), 256))
|
|
@@ -767,7 +766,7 @@ const ce = [], ae = {
|
|
|
767
766
|
}, 8, ["modelValue"]);
|
|
768
767
|
};
|
|
769
768
|
}
|
|
770
|
-
}),
|
|
769
|
+
}), _e = /* @__PURE__ */ Q({
|
|
771
770
|
__name: "EntranceListView",
|
|
772
771
|
setup($) {
|
|
773
772
|
const d = z("http"), f = b({
|
|
@@ -942,7 +941,7 @@ const ce = [], ae = {
|
|
|
942
941
|
width: "120"
|
|
943
942
|
}, {
|
|
944
943
|
default: l(({ row: a }) => [
|
|
945
|
-
v(R(a.clickEventType ? B(
|
|
944
|
+
v(R(a.clickEventType ? B(ae)[a.clickEventType].name : ""), 1)
|
|
946
945
|
]),
|
|
947
946
|
_: 1
|
|
948
947
|
}),
|
|
@@ -1081,7 +1080,7 @@ const ce = [], ae = {
|
|
|
1081
1080
|
]),
|
|
1082
1081
|
_: 1
|
|
1083
1082
|
}, 8, ["condition"]),
|
|
1084
|
-
e(
|
|
1083
|
+
e(fe, {
|
|
1085
1084
|
ref_key: "entranceDialog",
|
|
1086
1085
|
ref: x,
|
|
1087
1086
|
onSuccess: n
|
|
@@ -1089,22 +1088,22 @@ const ce = [], ae = {
|
|
|
1089
1088
|
], 64);
|
|
1090
1089
|
};
|
|
1091
1090
|
}
|
|
1092
|
-
}),
|
|
1091
|
+
}), oe = pe("pg-app-util-core-config-store", () => {
|
|
1093
1092
|
const $ = [];
|
|
1094
1093
|
return {
|
|
1095
1094
|
defaultTesterUserIds: le(() => $)
|
|
1096
1095
|
};
|
|
1097
1096
|
});
|
|
1098
|
-
const
|
|
1097
|
+
const ve = ($, d) => {
|
|
1099
1098
|
const f = $.__vccOpts || $;
|
|
1100
1099
|
for (const [g, u] of d)
|
|
1101
1100
|
f[g] = u;
|
|
1102
1101
|
return f;
|
|
1103
|
-
},
|
|
1102
|
+
}, ge = { class: "dialog-footer" }, be = {
|
|
1104
1103
|
__name: "VersionDialog",
|
|
1105
1104
|
emits: ["success"],
|
|
1106
1105
|
setup($, { expose: d, emit: f }) {
|
|
1107
|
-
const g = z
|
|
1106
|
+
const g = z("http"), u = b("CREATE"), V = le(() => u.value === "EDIT"), C = b(!1), n = b({
|
|
1108
1107
|
appCode: null,
|
|
1109
1108
|
platform: "ANDROID",
|
|
1110
1109
|
versionName: null,
|
|
@@ -1117,8 +1116,8 @@ const ge = ($, d) => {
|
|
|
1117
1116
|
wgtUrl: null,
|
|
1118
1117
|
description: null,
|
|
1119
1118
|
testerIdJsonStr: ""
|
|
1120
|
-
}), N = b(), D =
|
|
1121
|
-
|
|
1119
|
+
}), N = b(), D = oe();
|
|
1120
|
+
re(() => {
|
|
1122
1121
|
D.defaultTesterUserIds.length && (n.value.testerIdJsonStr = D.defaultTesterUserIds.join(","));
|
|
1123
1122
|
});
|
|
1124
1123
|
let U = null;
|
|
@@ -1179,8 +1178,8 @@ const ge = ($, d) => {
|
|
|
1179
1178
|
return d({
|
|
1180
1179
|
show: x
|
|
1181
1180
|
}), (k, h) => {
|
|
1182
|
-
const M = o("el-option"), p = o("el-select"), A = o("el-form-item"), L = o("el-col"), J = o("el-row"), a = o("el-input"), F = o("el-date-picker"), j = o("el-checkbox"),
|
|
1183
|
-
return s(), c(
|
|
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, {
|
|
1184
1183
|
title: B(V) ? "编辑App版本" : "发布App版本",
|
|
1185
1184
|
modelValue: C.value,
|
|
1186
1185
|
"onUpdate:modelValue": h[10] || (h[10] = (T) => C.value = T),
|
|
@@ -1188,7 +1187,7 @@ const ge = ($, d) => {
|
|
|
1188
1187
|
onClosed: i
|
|
1189
1188
|
}, {
|
|
1190
1189
|
footer: l(() => [
|
|
1191
|
-
|
|
1190
|
+
ie("div", ge, [
|
|
1192
1191
|
e(K, { onClick: t }, {
|
|
1193
1192
|
default: l(() => [
|
|
1194
1193
|
v("取 消")
|
|
@@ -1207,7 +1206,7 @@ const ge = ($, d) => {
|
|
|
1207
1206
|
])
|
|
1208
1207
|
]),
|
|
1209
1208
|
default: l(() => [
|
|
1210
|
-
e(
|
|
1209
|
+
e(ue, {
|
|
1211
1210
|
model: n.value,
|
|
1212
1211
|
ref_key: "publishModalForm",
|
|
1213
1212
|
ref: m
|
|
@@ -1455,7 +1454,7 @@ const ge = ($, d) => {
|
|
|
1455
1454
|
rules: [{ required: !0, message: "请上传更新包", trigger: "blur" }]
|
|
1456
1455
|
}, {
|
|
1457
1456
|
default: l(() => [
|
|
1458
|
-
e(
|
|
1457
|
+
e(ne, {
|
|
1459
1458
|
ref_key: "appPkgUploader",
|
|
1460
1459
|
ref: w,
|
|
1461
1460
|
modelValue: N.value,
|
|
@@ -1486,14 +1485,14 @@ const ge = ($, d) => {
|
|
|
1486
1485
|
}, 8, ["title", "modelValue"]);
|
|
1487
1486
|
};
|
|
1488
1487
|
}
|
|
1489
|
-
},
|
|
1488
|
+
}, he = /* @__PURE__ */ ve(be, [["__scopeId", "data-v-02170750"]]), ye = {
|
|
1490
1489
|
__name: "VersionListView",
|
|
1491
1490
|
setup($) {
|
|
1492
1491
|
const d = b({
|
|
1493
1492
|
platform: null,
|
|
1494
1493
|
isHot: null,
|
|
1495
1494
|
status: null
|
|
1496
|
-
}), f = z
|
|
1495
|
+
}), f = z("http"), g = b();
|
|
1497
1496
|
function u() {
|
|
1498
1497
|
g.value.search();
|
|
1499
1498
|
}
|
|
@@ -1763,7 +1762,7 @@ const ge = ($, d) => {
|
|
|
1763
1762
|
]),
|
|
1764
1763
|
_: 1
|
|
1765
1764
|
}, 8, ["condition"]),
|
|
1766
|
-
e(
|
|
1765
|
+
e(he, {
|
|
1767
1766
|
ref_key: "versionDiloag",
|
|
1768
1767
|
ref: V,
|
|
1769
1768
|
onSuccess: u
|
|
@@ -1771,7 +1770,7 @@ const ge = ($, d) => {
|
|
|
1771
1770
|
], 64);
|
|
1772
1771
|
};
|
|
1773
1772
|
}
|
|
1774
|
-
},
|
|
1773
|
+
}, Ee = {
|
|
1775
1774
|
install: ($, d) => {
|
|
1776
1775
|
let f = d.router, g = f.getRoutes().find((u) => u.path == "/");
|
|
1777
1776
|
g && g.meta && (f.addRoute({
|
|
@@ -1782,7 +1781,7 @@ const ge = ($, d) => {
|
|
|
1782
1781
|
children: [{
|
|
1783
1782
|
path: "list",
|
|
1784
1783
|
name: "BannerListView",
|
|
1785
|
-
component:
|
|
1784
|
+
component: me
|
|
1786
1785
|
}]
|
|
1787
1786
|
}), f.addRoute({
|
|
1788
1787
|
path: "/app/entrance",
|
|
@@ -1792,7 +1791,7 @@ const ge = ($, d) => {
|
|
|
1792
1791
|
children: [{
|
|
1793
1792
|
path: "list",
|
|
1794
1793
|
name: "EntranceListView",
|
|
1795
|
-
component:
|
|
1794
|
+
component: _e
|
|
1796
1795
|
}]
|
|
1797
1796
|
}), f.addRoute({
|
|
1798
1797
|
path: "/app/version",
|
|
@@ -1802,20 +1801,20 @@ const ge = ($, d) => {
|
|
|
1802
1801
|
children: [{
|
|
1803
1802
|
path: "list",
|
|
1804
1803
|
name: "AppVersionListView",
|
|
1805
|
-
component:
|
|
1804
|
+
component: ye
|
|
1806
1805
|
}]
|
|
1807
1806
|
}));
|
|
1808
1807
|
}
|
|
1809
|
-
},
|
|
1810
|
-
|
|
1811
|
-
const f =
|
|
1808
|
+
}, ke = ($, d) => {
|
|
1809
|
+
de.forEach((g) => $.use(g)), $.use(Ee, d);
|
|
1810
|
+
const f = oe();
|
|
1812
1811
|
if (d.defaultTesterUserIds)
|
|
1813
1812
|
for (let g of d.defaultTesterUserIds)
|
|
1814
1813
|
f.defaultTesterUserIds.push(g);
|
|
1815
|
-
},
|
|
1816
|
-
install:
|
|
1814
|
+
}, we = {
|
|
1815
|
+
install: ke
|
|
1817
1816
|
};
|
|
1818
1817
|
export {
|
|
1819
|
-
|
|
1820
|
-
|
|
1818
|
+
we as default,
|
|
1819
|
+
ke as install
|
|
1821
1820
|
};
|
package/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(A,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("@pangu-backend-ui/common"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","@pangu-backend-ui/common","pinia"],e):(A=typeof globalThis<"u"?globalThis:A||self,e(A["pg-user-core"]={},A.Vue,A["element-plus"],A.common,A.pinia))})(this,function(A,e,R,P,M){"use strict";const j=[],L={OPEN_WEB:{name:"打开Web页面"},OPEN_VIEW:{name:"打开内置页面"},API_REQUEST:{name:"请求API"},EXEC_METHOD:{name:"执行方法"},CUSTOM:{name:"自定义"}},$={OPEN_WEB:{name:"打开Web页面"},OPEN_VIEW:{name:"打开内置页面"},API_REQUEST:{name:"请求API"},EXEC_METHOD:{name:"执行方法"},CUSTOM:{name:"自定义"}},W=e.defineComponent({__name:"BannerDialog",emits:["success"],setup(B,{expose:s,emit:d}){const m=e.ref(!1),a=e.ref({sceneCode:null,image:null,targetPath:null,clickEventType:"",params:null,shelfTimeArr:[]}),N=e.ref({sceneCode:[{required:!0,message:"请输入场景代码"}],image:[{required:!0,message:"请上传图片"}],targetPath:[{required:!0,message:"请输入目标地址"}],clickEventType:[{required:!0,message:"请选择点击事件类型"}]}),u=e.ref(!1),o=e.inject("http"),x=e.ref();function b(){var r;(r=x.value)==null||r.validate(t=>{if(t){u.value=!0;let c=`/api/app/banner/${C.value??""}/${C.value?"update":"create"}`,_={...a.value};_.shelfTime=null,_.offShelfTime=null,a.value.shelfTimeArr.length&&(_.shelfTime=a.value.shelfTimeArr[0],_.offShelfTime=a.value.shelfTimeArr[1]),o==null||o.post(c,_).then(p=>{var g;d("success"),(g=x.value)==null||g.resetFields(),m.value=!1}).finally(()=>{u.value=!1})}})}const k=e.ref([]),C=e.ref(null);function E(r,t){k.value=r,C.value=null,m.value=!0,e.nextTick(()=>{t&&(C.value=t.id,Object.assign(a.value,t),t.shelfTime&&t.offShelfTime&&(a.value.shelfTimeArr=[new Date(t.shelfTime),new Date(t.offShelfTime)]))})}function T(){var r;(r=x.value)==null||r.resetFields()}return s({show:E}),(r,t)=>{const c=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),p=e.resolveComponent("el-form-item"),g=e.resolveComponent("pg-upload"),U=e.resolveComponent("el-input"),n=e.resolveComponent("el-collapse-transition"),F=e.resolveComponent("el-date-picker"),V=e.resolveComponent("el-form"),f=e.resolveComponent("el-button"),I=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(I,{modelValue:m.value,"onUpdate:modelValue":t[6]||(t[6]=i=>m.value=i),width:"400",onClosed:T},{footer:e.withCtx(()=>[e.createVNode(f,{type:"primary",disabled:u.value,loading:u.value,onClick:b},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1},8,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:x,rules:N.value,model:a.value,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(p,{label:"场景代码",prop:"sceneCode"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:a.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=i=>a.value.sceneCode=i),placeholder:"请输入/选择场景代码","allow-create":"",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,i=>(e.openBlock(),e.createBlock(c,{key:i,value:i,label:i},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(p,{label:"图片",prop:"image"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(g,{accept:"jpg,jpeg,png",modelValue:a.value.image,"onUpdate:modelValue":t[1]||(t[1]=i=>a.value.image=i),key:`img_${C.value}`,"list-type":"picture-card","upload-type":"banner",limit:1},null,8,["modelValue"]))]),_:1}),e.createVNode(p,{label:"点击事件类型",prop:"clickEventType"},{default:e.withCtx(()=>[e.createVNode(_,{placeholder:"请选择点击事件类型",modelValue:a.value.clickEventType,"onUpdate:modelValue":t[2]||(t[2]=i=>a.value.clickEventType=i)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L),(i,w)=>(e.openBlock(),e.createBlock(c,{value:w,label:i.name},null,8,["value","label"]))),256))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(n,null,{default:e.withCtx(()=>[["OPEN_WEB","OPEN_VIEW","API_REQUEST"].indexOf(a.value.clickEventType)>=0?(e.openBlock(),e.createBlock(p,{key:0,label:"目标地址",prop:"targetPath"},{default:e.withCtx(()=>[e.createVNode(U,{placeholder:"请输入目标地址",modelValue:a.value.targetPath,"onUpdate:modelValue":t[3]||(t[3]=i=>a.value.targetPath=i)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(p,{label:"目标地址参数",prop:"params"},{default:e.withCtx(()=>[e.createVNode(U,{type:"textarea",modelValue:a.value.params,"onUpdate:modelValue":t[4]||(t[4]=i=>a.value.params=i),placeholder:"请输入JSON格式的参数对象"},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"生效时段",prop:"shelfTimeArr"},{default:e.withCtx(()=>[e.createVNode(F,{type:"datetimerange",modelValue:a.value.shelfTimeArr,"onUpdate:modelValue":t[5]||(t[5]=i=>a.value.shelfTimeArr=i),"start-placeholder":"上架时间","end-placeholder":"下架时间","default-time":[new Date(2e3,1,1,0,0,0),new Date(2e3,1,1,23,59,59)]},null,8,["modelValue","default-time"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["modelValue"])}}}),z=e.defineComponent({__name:"BannerListView",setup(B){const s=e.inject("http"),d=e.ref({sceneCode:null,status:null}),m=e.ref([]);function a(){s==null||s.get("/api/app/banner/all-scene-code").then(r=>{m.value=r.data})}const N=e.ref(),u=e.ref(!1);function o(){u.value=!!d.value.sceneCode,N.value.search()}function x(r){s==null||s.post(`/api/app/banner/${r}/publish`).then(t=>{o()})}function b(r){s==null||s.post(`/api/app/banner/${r}/off-shelf`).then(t=>{o()})}function k(r,t){s==null||s.post(`/api/app/banner/${r}/move-up`).then(c=>{d.value.sceneCode=t,o()})}function C(r,t){s==null||s.post(`/api/app/banner/${r}/move-down`).then(c=>{d.value.sceneCode=t,o()})}e.onBeforeMount(()=>{a()});const E=e.ref();function T(r){E.value.show(m.value,r)}return(r,t)=>{const c=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),p=e.resolveComponent("el-button"),g=e.resolveComponent("el-space"),U=e.resolveComponent("el-card"),n=e.resolveComponent("el-table-column"),F=e.resolveComponent("el-image"),V=e.resolveComponent("el-descriptions-item"),f=e.resolveComponent("el-descriptions"),I=e.resolveComponent("el-popover"),i=e.resolveComponent("el-tag"),w=e.resolveComponent("el-popconfirm"),S=e.resolveComponent("pg-table"),D=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:d.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=l=>d.value.sceneCode=l),placeholder:"场景代码",clearable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,y)=>(e.openBlock(),e.createBlock(c,{label:l,value:l,key:`sc_con_${y}`},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(_,{modelValue:d.value.status,"onUpdate:modelValue":t[1]||(t[1]=l=>d.value.status=l),placeholder:"状态",clearable:"",style:{width:"150px"}},{default:e.withCtx(()=>[e.createVNode(c,{label:"草稿",value:"DRAFT"}),e.createVNode(c,{label:"已发布",value:"PUBLISH"}),e.createVNode(c,{label:"已下架",value:"OFF_SHELF"})]),_:1},8,["modelValue"]),e.createVNode(p,{type:"primary",icon:"search",onClick:o},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(p,{icon:"plus",onClick:t[2]||(t[2]=l=>T())},{default:e.withCtx(()=>[e.createTextVNode("创建Banner")]),_:1})),[[D,"CREATE_BANNER"]])]),_:1})]),_:1}),e.createVNode(S,{ref_key:"table",ref:N,"data-url":"/api/app/banner/page",onRowDbClick:t[3]||(t[3]=l=>r.$hasPer("UPDATE_BANNER")?T(l):null),condition:d.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[u.value&&r.$hasPer("BANNER_SEQ_MOVE_UP_DOWN")?(e.openBlock(),e.createBlock(n,{key:0,align:"center",width:"80"},{default:e.withCtx(({row:l})=>[e.createVNode(g,{direction:"vertical"},{default:e.withCtx(()=>[e.createVNode(p,{icon:"ArrowUpBold",onClick:y=>k(l.id,l.sceneCode)},null,8,["onClick"]),e.createVNode(p,{icon:"ArrowDownBold",onClick:y=>C(l.id,l.sceneCode)},null,8,["onClick"])]),_:2},1024)]),_:1})):e.createCommentVNode("",!0),e.createVNode(n,{label:"场景代码",prop:"sceneCode",width:"150"}),e.createVNode(n,{label:"图片",width:"300",align:"center"},{default:e.withCtx(({row:l})=>[e.createVNode(F,{src:l.image,style:{"max-width":"300px"},"preview-src-list":[l.image],"preview-teleported":""},null,8,["src","preview-src-list"])]),_:1}),e.createVNode(n,{label:"点击事件类型",prop:"clickEventType",width:"120"},{default:e.withCtx(({row:l})=>[e.createTextVNode(e.toDisplayString(l.clickEventType?e.unref(L)[l.clickEventType].name:""),1)]),_:1}),e.createVNode(n,{label:"目标地址",prop:"targetPath","show-overflow-tooltip":""}),e.createVNode(n,{label:"目标参数",width:"120","show-overflow-tooltip":""},{default:e.withCtx(({row:l})=>[l.params?(e.openBlock(),e.createBlock(I,{key:0,trigger:"hover",width:"350"},{reference:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.params.substring(0,100))+e.toDisplayString(l.params.length>100?"...":""),1)]),default:e.withCtx(()=>[l.params.startsWith("{")?(e.openBlock(),e.createBlock(f,{key:0,column:"1",border:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(JSON.parse(l.params),(y,O)=>(e.openBlock(),e.createBlock(V,{label:O,"min-width":"150"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y),1)]),_:2},1032,["label"]))),256))]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.params),1)],64))]),_:2},1024)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{label:"上架时间",prop:"shelfTime",width:"180",align:"center"}),e.createVNode(n,{label:"下架时间",prop:"offShelfTime",width:"180",align:"center"}),e.createVNode(n,{label:"状态",align:"center",width:"88"},{default:e.withCtx(({row:l})=>[l.status=="DRAFT"?(e.openBlock(),e.createBlock(i,{key:0,type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("草稿")]),_:1})):e.createCommentVNode("",!0),l.status=="PUBLISH"?(e.openBlock(),e.createBlock(i,{key:1,type:"success"},{default:e.withCtx(()=>[e.createTextVNode("已发布")]),_:1})):e.createCommentVNode("",!0),l.status=="OFF_SHELF"?(e.openBlock(),e.createBlock(i,{key:2,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("已下架")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{align:"center",width:"90"},{default:e.withCtx(({row:l})=>[["DRAFT","OFF_SHELF"].indexOf(l.status)>=0&&r.$hasPer("BANNER_PUBLISH")?(e.openBlock(),e.createBlock(w,{key:0,onConfirm:y=>x(l.id),title:`确定要${l.status=="DRAFT"?"发布":"上架"}该Banner吗?`},{reference:e.withCtx(()=>[e.createVNode(p,{type:"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.status=="DRAFT"?"发布":"上架"),1)]),_:2},1024)]),_:2},1032,["onConfirm","title"])):e.createCommentVNode("",!0),l.status=="PUBLISH"&&r.$hasPer("BANNER_OFF_SHELF")?(e.openBlock(),e.createBlock(w,{key:1,onConfirm:y=>b(l.id),title:"确定要[下架]该Banner吗?"},{reference:e.withCtx(()=>[e.createVNode(p,{type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("下架")]),_:1})]),_:2},1032,["onConfirm"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["condition"]),e.createVNode(W,{ref_key:"bannerDialog",ref:E,onSuccess:o},null,512)],64)}}}),Q=e.defineComponent({__name:"EntranceDialog",emits:["success"],setup(B,{expose:s,emit:d}){const m=e.ref(!1),a=e.ref({sceneCode:null,name:null,iconType:"NAME",icon:null,targetPath:null,clickEventType:"",params:null,shelfTimeArr:[]}),N=e.ref({sceneCode:[{required:!0,message:"请输入场景代码"}],name:[{required:!0,message:"请输入入口名称"}],iconType:[{required:!0,message:"请选择图标类型"}],icon:[{required:!0,message:`请${a.value.iconType=="NAME"?"输入图标名称":"上传图标图片"}`}],targetPath:[{required:!0,message:"请输入目标地址"}],clickEventType:[{required:!0,message:"请选择点击事件类型"}]}),u=e.ref(!1),o=e.inject("http"),x=e.ref();function b(){var r;(r=x.value)==null||r.validate(t=>{if(t){u.value=!0;let c=`/api/app/entrance/${C.value??""}/${C.value?"update":"create"}`,_={...a.value};_.shelfTime=null,_.offShelfTime=null,a.value.shelfTimeArr.length&&(_.shelfTime=a.value.shelfTimeArr[0],_.offShelfTime=a.value.shelfTimeArr[1]),o==null||o.post(c,_).then(p=>{var g;d("success"),(g=x.value)==null||g.resetFields(),m.value=!1}).finally(()=>{u.value=!1})}})}const k=e.ref([]),C=e.ref(null);function E(r,t){k.value=r,C.value=null,m.value=!0,e.nextTick(()=>{t&&(C.value=t.id,Object.assign(a.value,t),t.shelfTime&&t.offShelfTime&&(a.value.shelfTimeArr=[new Date(t.shelfTime),new Date(t.offShelfTime)]))})}function T(){var r;(r=x.value)==null||r.resetFields()}return s({show:E}),(r,t)=>{const c=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),p=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-input"),U=e.resolveComponent("pg-upload"),n=e.resolveComponent("el-collapse-transition"),F=e.resolveComponent("el-date-picker"),V=e.resolveComponent("el-form"),f=e.resolveComponent("el-button"),I=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(I,{modelValue:m.value,"onUpdate:modelValue":t[9]||(t[9]=i=>m.value=i),width:"400",onClose:T},{footer:e.withCtx(()=>[e.createVNode(f,{type:"primary",disabled:u.value,loading:u.value,onClick:b},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1},8,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:x,rules:N.value,model:a.value,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(p,{label:"场景代码",prop:"sceneCode"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:a.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=i=>a.value.sceneCode=i),placeholder:"请输入/选择场景代码","allow-create":"",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,i=>(e.openBlock(),e.createBlock(c,{key:i,value:i,label:i},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(p,{label:"入口名称",prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{placeholder:"请输入入口名称",modelValue:a.value.name,"onUpdate:modelValue":t[1]||(t[1]=i=>a.value.name=i)},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"图标类型",prop:"iconType"},{default:e.withCtx(()=>[e.createVNode(_,{placeholder:"请选择图标类型",modelValue:a.value.iconType,"onUpdate:modelValue":t[2]||(t[2]=i=>a.value.iconType=i)},{default:e.withCtx(()=>[e.createVNode(c,{value:"NAME",label:"图标名称"}),e.createVNode(c,{value:"URL",label:"图标URL"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(p,{label:"图标",prop:"icon"},{default:e.withCtx(()=>[a.value.iconType=="URL"?(e.openBlock(),e.createBlock(U,{accept:"jpg,jpeg,png,gif",modelValue:a.value.icon,"onUpdate:modelValue":t[3]||(t[3]=i=>a.value.icon=i),key:`img_${C.value}`,"list-type":"picture-card","upload-type":"entrance",limit:1},null,8,["modelValue"])):(e.openBlock(),e.createBlock(g,{key:1,modelValue:a.value.icon,"onUpdate:modelValue":t[4]||(t[4]=i=>a.value.icon=i),placeholder:"请输入图标名称",clearable:""},null,8,["modelValue"]))]),_:1}),e.createVNode(p,{label:"点击事件类型",prop:"clickEventType"},{default:e.withCtx(()=>[e.createVNode(_,{placeholder:"请选择点击事件类型",modelValue:a.value.clickEventType,"onUpdate:modelValue":t[5]||(t[5]=i=>a.value.clickEventType=i)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref($),(i,w)=>(e.openBlock(),e.createBlock(c,{value:w,label:i.name},null,8,["value","label"]))),256))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(n,null,{default:e.withCtx(()=>[["OPEN_WEB","OPEN_VIEW","API_REQUEST"].indexOf(a.value.clickEventType)>=0?(e.openBlock(),e.createBlock(p,{key:0,label:"目标地址",prop:"targetPath"},{default:e.withCtx(()=>[e.createVNode(g,{placeholder:"请输入目标地址",modelValue:a.value.targetPath,"onUpdate:modelValue":t[6]||(t[6]=i=>a.value.targetPath=i)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(p,{label:"目标地址参数",prop:"params"},{default:e.withCtx(()=>[e.createVNode(g,{type:"textarea",modelValue:a.value.params,"onUpdate:modelValue":t[7]||(t[7]=i=>a.value.params=i),placeholder:"请输入JSON格式的参数对象"},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"生效时段",prop:"shelfTimeArr"},{default:e.withCtx(()=>[e.createVNode(F,{type:"datetimerange",modelValue:a.value.shelfTimeArr,"onUpdate:modelValue":t[8]||(t[8]=i=>a.value.shelfTimeArr=i),"start-placeholder":"上架时间","end-placeholder":"下架时间","default-time":[new Date(2e3,1,1,0,0,0),new Date(2e3,1,1,23,59,59)]},null,8,["modelValue","default-time"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["modelValue"])}}}),X=e.defineComponent({__name:"EntranceListView",setup(B){const s=e.inject("http"),d=e.ref({sceneCode:null,status:null}),m=e.ref([]);function a(){s==null||s.get("/api/app/entrance/all-scene-code").then(r=>{m.value=r.data})}const N=e.ref(),u=e.ref(!1);function o(){u.value=!!d.value.sceneCode,N.value.search()}function x(r){s==null||s.post(`/api/app/entrance/${r}/publish`).then(t=>{o()})}function b(r){s==null||s.post(`/api/app/entrance/${r}/off-shelf`).then(t=>{o()})}function k(r,t){s==null||s.post(`/api/app/entrance/${r}/move-up`).then(c=>{d.value.sceneCode=t,o()})}function C(r,t){s==null||s.post(`/api/app/entrance/${r}/move-down`).then(c=>{d.value.sceneCode=t,o()})}e.onBeforeMount(()=>{a()});const E=e.ref();function T(r){E.value.show(m.value,r)}return(r,t)=>{const c=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),p=e.resolveComponent("el-button"),g=e.resolveComponent("el-space"),U=e.resolveComponent("el-card"),n=e.resolveComponent("el-table-column"),F=e.resolveComponent("el-image"),V=e.resolveComponent("el-descriptions-item"),f=e.resolveComponent("el-descriptions"),I=e.resolveComponent("el-popover"),i=e.resolveComponent("el-tag"),w=e.resolveComponent("el-popconfirm"),S=e.resolveComponent("pg-table"),D=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:d.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=l=>d.value.sceneCode=l),placeholder:"场景代码",clearable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,y)=>(e.openBlock(),e.createBlock(c,{label:l,value:l,key:`sc_con_${y}`},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(_,{modelValue:d.value.status,"onUpdate:modelValue":t[1]||(t[1]=l=>d.value.status=l),placeholder:"状态",clearable:"",style:{width:"150px"}},{default:e.withCtx(()=>[e.createVNode(c,{label:"草稿",value:"DRAFT"}),e.createVNode(c,{label:"已发布",value:"PUBLISH"}),e.createVNode(c,{label:"已下架",value:"OFF_SHELF"})]),_:1},8,["modelValue"]),e.createVNode(p,{type:"primary",icon:"search",onClick:o},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(p,{icon:"plus",onClick:t[2]||(t[2]=l=>T())},{default:e.withCtx(()=>[e.createTextVNode("创建入口")]),_:1})),[[D,"CREATE_ENTRANCE"]])]),_:1})]),_:1}),e.createVNode(S,{ref_key:"table",ref:N,"data-url":"/api/app/entrance/page",onRowDbClick:t[3]||(t[3]=l=>r.$hasPer("UPDATE_ENTRANCE")?T(l):null),condition:d.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[u.value&&r.$hasPer("ENTRANCE_SEQ_MOVE_UP_DOWN")?(e.openBlock(),e.createBlock(n,{key:0,align:"center",width:"80"},{default:e.withCtx(({row:l})=>[e.createVNode(g,{direction:"vertical"},{default:e.withCtx(()=>[e.createVNode(p,{icon:"ArrowUpBold",onClick:y=>k(l.id,l.sceneCode)},null,8,["onClick"]),e.createVNode(p,{icon:"ArrowDownBold",onClick:y=>C(l.id,l.sceneCode)},null,8,["onClick"])]),_:2},1024)]),_:1})):e.createCommentVNode("",!0),e.createVNode(n,{label:"场景代码",prop:"sceneCode",width:"150"}),e.createVNode(n,{label:"图标",width:"200",align:"center"},{default:e.withCtx(({row:l})=>[l.iconType=="URL"?(e.openBlock(),e.createBlock(F,{key:0,src:l.icon,style:{"max-width":"200px"},"preview-src-list":[l.icon],"preview-teleported":""},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.icon),1)],64))]),_:1}),e.createVNode(n,{label:"点击事件类型",prop:"clickEventType",width:"120"},{default:e.withCtx(({row:l})=>[e.createTextVNode(e.toDisplayString(l.clickEventType?e.unref($)[l.clickEventType].name:""),1)]),_:1}),e.createVNode(n,{label:"目标地址",prop:"targetPath","show-overflow-tooltip":""}),e.createVNode(n,{label:"目标参数",width:"120","show-overflow-tooltip":""},{default:e.withCtx(({row:l})=>[l.params?(e.openBlock(),e.createBlock(I,{key:0,trigger:"hover",width:"350"},{reference:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.params.substring(0,100))+e.toDisplayString(l.params.length>100?"...":""),1)]),default:e.withCtx(()=>[l.params.startsWith("{")?(e.openBlock(),e.createBlock(f,{key:0,column:"1",border:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(JSON.parse(l.params),(y,O)=>(e.openBlock(),e.createBlock(V,{label:O,"min-width":"150"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y),1)]),_:2},1032,["label"]))),256))]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.params),1)],64))]),_:2},1024)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{label:"上架时间",prop:"shelfTime",width:"180",align:"center"}),e.createVNode(n,{label:"下架时间",prop:"offShelfTime",width:"180",align:"center"}),e.createVNode(n,{label:"状态",align:"center",width:"88"},{default:e.withCtx(({row:l})=>[l.status=="DRAFT"?(e.openBlock(),e.createBlock(i,{key:0,type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("草稿")]),_:1})):e.createCommentVNode("",!0),l.status=="PUBLISH"?(e.openBlock(),e.createBlock(i,{key:1,type:"success"},{default:e.withCtx(()=>[e.createTextVNode("已发布")]),_:1})):e.createCommentVNode("",!0),l.status=="OFF_SHELF"?(e.openBlock(),e.createBlock(i,{key:2,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("已下架")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{align:"center",width:"90"},{default:e.withCtx(({row:l})=>[["DRAFT","OFF_SHELF"].indexOf(l.status)>=0&&r.$hasPer("ENTRANCE_PUBLISH")?(e.openBlock(),e.createBlock(w,{key:0,onConfirm:y=>x(l.id),title:`确定要${l.status=="DRAFT"?"发布":"上架"}该入口吗?`},{reference:e.withCtx(()=>[e.createVNode(p,{type:"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.status=="DRAFT"?"发布":"上架"),1)]),_:2},1024)]),_:2},1032,["onConfirm","title"])):e.createCommentVNode("",!0),l.status=="PUBLISH"&&r.$hasPer("ENTRANCE_OFF_SHELF")?(e.openBlock(),e.createBlock(w,{key:1,onConfirm:y=>b(l.id),title:"确定要[下架]该入口吗?"},{reference:e.withCtx(()=>[e.createVNode(p,{type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("下架")]),_:1})]),_:2},1032,["onConfirm"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["condition"]),e.createVNode(Q,{ref_key:"entranceDialog",ref:E,onSuccess:o},null,512)],64)}}}),H=M.defineStore("pg-app-util-core-config-store",()=>{const B=[];return{defaultTesterUserIds:e.computed(()=>B)}}),ae="",G=(B,s)=>{const d=B.__vccOpts||B;for(const[m,a]of s)d[m]=a;return d},K={class:"dialog-footer"},Y=G({__name:"VersionDialog",emits:["success"],setup(B,{expose:s,emit:d}){const m=e.inject<P.Http>"http",a=e.ref("CREATE"),N=e.computed(()=>a.value==="EDIT"),u=e.ref(!1),o=e.ref({appCode:null,platform:"ANDROID",versionName:null,versionNumber:null,category:"SELF",isForce:!1,isHot:!0,activationTime:null,pkgUrl:null,wgtUrl:null,description:null,testerIdJsonStr:""}),x=e.ref(),b=H();e.onMounted(()=>{b.defaultTesterUserIds.length&&(o.value.testerIdJsonStr=b.defaultTesterUserIds.join(","))});let k=null;const C=e.ref(!1);async function E(V){u.value=!0,a.value=V?"EDIT":"CREATE",k=V,V&&(C.value=V.status=="RELEASE",console.log(V.status),Object.assign(o.value,V),V.testerIdJsonStr&&(o.value.testerIdJsonStr=JSON.parse(V.testerIdJsonStr).join(",")),x.value=V.isHot?V.wgtUrl:V.pkgUrl),await F(),V&&p(V.appCode)}function T(V){o.value.isHot?o.value.wgtUrl=V.fileUrl:o.value.pkgUrl=V.fileUrl}function r(){o.value={appCode:null,platform:"ANDROID",versionName:null,category:"SELF",isForce:!1,isHot:!0,activationTime:null,pkgUrl:null,wgtUrl:null,testerIdJsonStr:""}}function t(){u.value=!u.value}const c=e.ref();function _(){c.value.validate(V=>{V&&(N.value?m.post(`/api/app/version/${k.id}`,{...o.value,testerIdJsonStr:o.value.testerIdJsonStr?JSON.stringify(JSON.parse("["+o.value.testerIdJsonStr+"]")):null}).then(f=>{t(),d("success")}):m.post("/api/app/version",{...o.value,testerIdJsonStr:o.value.testerIdJsonStr?JSON.stringify(JSON.parse("["+o.value.testerIdJsonStr+"]")):null}).then(f=>{t(),d("success")}))})}function p(V){n.value.find(I=>I.code===V).platform=="IOS"?o.value.platform="IOS":o.value.platform="ANDROID"}const g=e.ref();function U(){o.value.wgtUrl=null,o.value.pkgUrl=null,g.value&&g.value.clearFileList()}const n=e.ref([]);async function F(){if(n.value.length<=0){const V=await m.get("/api/app/all");n.value=V.data}}return s({show:E}),(V,f)=>{const I=e.resolveComponent("el-option"),i=e.resolveComponent("el-select"),w=e.resolveComponent("el-form-item"),S=e.resolveComponent("el-col"),D=e.resolveComponent("el-row"),l=e.resolveComponent("el-input"),y=e.resolveComponent("el-date-picker"),O=e.resolveComponent("el-checkbox"),te=e.resolveComponent("pg-upload"),le=e.resolveComponent("el-form"),q=e.resolveComponent("el-button"),oe=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(oe,{title:e.unref(N)?"编辑App版本":"发布App版本",modelValue:u.value,"onUpdate:modelValue":f[10]||(f[10]=h=>u.value=h),width:"700px",onClosed:r},{footer:e.withCtx(()=>[e.createElementVNode("div",K,[e.createVNode(q,{onClick:t},{default:e.withCtx(()=>[e.createTextVNode("取 消")]),_:1}),e.createVNode(q,{type:"primary",onClick:_},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(N)?"提 交":"创 建"),1)]),_:1})])]),default:e.withCtx(()=>[e.createVNode(le,{model:o.value,ref_key:"publishModalForm",ref:c},{default:e.withCtx(()=>[e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(S,{span:24},{default:e.withCtx(()=>[e.createVNode(w,{label:"应用","label-width":"100px",prop:"appCode",rules:[{required:!0,message:"请选择应用",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:o.value.appCode,"onUpdate:modelValue":f[0]||(f[0]=h=>o.value.appCode=h),disabled:e.unref(N)&&C.value,placeholder:"请选择要发布的平台",style:{width:"100%"},onChange:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,h=>(e.openBlock(),e.createBlock(I,{key:h.code,label:h.name,value:h.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(S,{span:12},{default:e.withCtx(()=>[e.createVNode(w,{label:"版本名称","label-width":"100px",prop:"versionName",rules:[{required:!0,message:"请输入版本名称",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:o.value.versionName,"onUpdate:modelValue":f[1]||(f[1]=h=>o.value.versionName=h),disabled:e.unref(N)&&C.value,placeholder:"例: 1.1.2"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e.createVNode(S,{span:12},{default:e.withCtx(()=>[e.createVNode(w,{label:"版本编号","label-width":"100px",prop:"versionNumber",rules:[{required:!0,message:"请输入版本编号",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:o.value.versionNumber,"onUpdate:modelValue":f[2]||(f[2]=h=>o.value.versionNumber=h),disabled:e.unref(N)&&C.value,type:"number",min:"1",placeholder:"例: 112"},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(S,{span:12},{default:e.withCtx(()=>[e.createVNode(w,{label:"启用时间","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:o.value.activationTime,"onUpdate:modelValue":f[3]||(f[3]=h=>o.value.activationTime=h),type:"datetime",placeholder:"选择启用时间",disabled:e.unref(N)&&C.value},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(S,{span:12},{default:e.withCtx(()=>[e.createVNode(w,{label:"是否热更新","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(O,{modelValue:o.value.isHot,"onUpdate:modelValue":f[4]||(f[4]=h=>o.value.isHot=h),onChange:U,disabled:e.unref(N)&&C.value},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e.createVNode(S,{span:12},{default:e.withCtx(()=>[e.createVNode(w,{label:"是否强制","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(O,{modelValue:o.value.isForce,"onUpdate:modelValue":f[5]||(f[5]=h=>o.value.isForce=h),placeholder:"请选择是否强制",disabled:e.unref(N)&&C.value},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),o.value.category=="APP_STORE"?(e.openBlock(),e.createBlock(D,{key:0},{default:e.withCtx(()=>[e.createVNode(S,{span:24},{default:e.withCtx(()=>[e.createVNode(w,{label:"市场地址","label-width":"100px",prop:"pkgUrl",rules:[{required:!0,message:"应用市场地址",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:o.value.pkgUrl,"onUpdate:modelValue":f[6]||(f[6]=h=>o.value.pkgUrl=h),placeholder:"应用市场地址"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(S,{span:24},{default:e.withCtx(()=>[e.createVNode(w,{label:"版本描述","label-width":"100px",prop:"description",rules:[{required:!0,message:"请输入版本描述",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{type:"textarea",modelValue:o.value.description,"onUpdate:modelValue":f[7]||(f[7]=h=>o.value.description=h),autosize:{minRows:4},placeholder:"请输入版本描述"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.unref(N)&&C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D,{key:1},{default:e.withCtx(()=>[e.createVNode(S,{span:24},{default:e.withCtx(()=>[e.createVNode(w,{label:"测试用户","label-width":"100px",prop:"testerIdJsonStr"},{default:e.withCtx(()=>[e.createVNode(l,{type:"textarea",modelValue:o.value.testerIdJsonStr,"onUpdate:modelValue":f[8]||(f[8]=h=>o.value.testerIdJsonStr=h),autosize:{minRows:4},placeholder:"请输入测试用户ID。 例子: 10000, 100202, 100203"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})),o.value.platform=="ANDROID"||o.value.platform=="IOS"&&o.value.isHot?(e.openBlock(),e.createBlock(D,{key:2},{default:e.withCtx(()=>[e.createVNode(S,{span:24},{default:e.withCtx(()=>[e.createVNode(w,{label:o.value.isHot?"上传更新包":"上传安装包","label-width":"100px",rules:[{required:!0,message:"请上传更新包",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(te,{ref_key:"appPkgUploader",ref:g,modelValue:x.value,"onUpdate:modelValue":f[9]||(f[9]=h=>x.value=h),drag:!0,multiple:!1,tips:"热更新下只能上传wgt格式的文件,非热更新下只能上传apk格式的文件",autoUpload:!0,uploadType:"appPkg",accept:o.value.isHot?".wgt":"application/vnd.android.package-archive",disabled:e.unref(N)&&C.value,onOnSuccess:T},null,8,["modelValue","accept","disabled"])]),_:1},8,["label"])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["title","modelValue"])}}},[["__scopeId","data-v-9e13a1f7"]]),Z={__name:"VersionListView",setup(B){const s=e.ref({platform:null,isHot:null,status:null}),d=e.inject<P.Http>"http",m=e.ref();function a(){m.value.search()}const N=e.ref();function u(b){N.value.show(b)}async function o(b){await d.post(`/api/app/version/${b}/publish`),a(),R.ElMessage.success("发布成功")}async function x(b){await d.post(`/api/app/version/${b}/offline`),a(),R.ElMessage.success("下架成功")}return(b,k)=>{const C=e.resolveComponent("el-option"),E=e.resolveComponent("el-select"),T=e.resolveComponent("el-button"),r=e.resolveComponent("el-space"),t=e.resolveComponent("el-card"),c=e.resolveComponent("el-table-column"),_=e.resolveComponent("el-tag"),p=e.resolveComponent("el-popconfirm"),g=e.resolveComponent("pg-table"),U=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(t,null,{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createVNode(E,{modelValue:s.value.isHot,"onUpdate:modelValue":k[0]||(k[0]=n=>s.value.isHot=n),placeholder:"热更新/整包更新",style:{width:"180px"},clearable:""},{default:e.withCtx(()=>[e.createVNode(C,{label:"热更新",value:"true"}),e.createVNode(C,{label:"整包更新",value:"false"})]),_:1},8,["modelValue"]),e.createVNode(E,{modelValue:s.value.status,"onUpdate:modelValue":k[1]||(k[1]=n=>s.value.status=n),placeholder:"状态",style:{width:"120px"},clearable:""},{default:e.withCtx(()=>[e.createVNode(C,{label:"测试",value:"TEST"}),e.createVNode(C,{label:"发布",value:"RELEASE"}),e.createVNode(C,{label:"下架",value:"OFFLINE"})]),_:1},8,["modelValue"]),e.createVNode(T,{type:"primary",icon:"search",onClick:a},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(T,{icon:"plus",onClick:k[2]||(k[2]=n=>u())},{default:e.withCtx(()=>[e.createTextVNode("新建版本")]),_:1})),[[U,"CREATE_BANNER"]])]),_:1})]),_:1}),e.createVNode(g,{ref_key:"table",ref:m,"data-url":"/api/app/version/page-search",onRowDbClick:k[3]||(k[3]=n=>u(n)),condition:s.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[e.createVNode(c,{label:"ID",prop:"id",align:"center",width:"60px"}),e.createVNode(c,{label:"应用",prop:"appName",align:"center",width:"120px","show-overflow-tooltip":""}),e.createVNode(c,{label:"应用平台",prop:"appPlatform",align:"center",width:"100px","show-overflow-tooltip":""}),e.createVNode(c,{label:"版本名称",prop:"versionName",align:"center",width:"90","show-overflow-tooltip":""}),e.createVNode(c,{label:"版本编号",prop:"versionNumber",align:"center",width:"90","show-overflow-tooltip":""}),e.createVNode(c,{label:"强制更新",prop:"isForce",align:"center",width:"90","show-overflow-tooltip":""},{default:e.withCtx(({row:n})=>[n.isForce?(e.openBlock(),e.createBlock(_,{key:0,type:"warning",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("是")]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("否")]),_:1}))]),_:1}),e.createVNode(c,{label:"整包更新",prop:"isHot",align:"center",width:"90","show-overflow-tooltip":""},{default:e.withCtx(({row:n})=>[n.isHot?(e.openBlock(),e.createBlock(_,{key:0,type:"warning",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("否")]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("是")]),_:1}))]),_:1}),e.createVNode(c,{label:"启用时间",width:"150px",prop:"activationTime",align:"center","show-overflow-tooltip":""}),e.createVNode(c,{label:"状态",width:"100",align:"center"},{default:e.withCtx(({row:n})=>[e.createVNode(_,{type:n.status=="RELEASE"?"success":n.status=="OFFLINE"?"danger":"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.status=="RELEASE"?"发布":n.status=="OFFLINE"?"下线":"测试"),1)]),_:2},1032,["type"])]),_:1}),e.createVNode(c,{label:"安装包/更新包地址",prop:"pkgUrl",align:"center","show-overflow-tooltip":""},{default:e.withCtx(({row:n})=>[e.createTextVNode(e.toDisplayString(n.isHot?n.wgtUrl:n.pkgUrl),1)]),_:1}),e.createVNode(c,{label:"操作",align:"center",width:"160px"},{default:e.withCtx(({row:n})=>[n.status=="RELEASE"?(e.openBlock(),e.createBlock(p,{key:0,title:`确定下架版本[${n.versionName}]吗?`,onConfirm:F=>x(n.id)},{reference:e.withCtx(()=>[e.createVNode(T,{type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("下架")]),_:1})]),_:2},1032,["title","onConfirm"])):e.createCommentVNode("",!0),n.status=="TEST"||n.status=="OFFLINE"?(e.openBlock(),e.createBlock(p,{key:1,title:"是否确定发布该版本?",onConfirm:F=>o(n.id)},{reference:e.withCtx(()=>[e.createVNode(T,{type:"success"},{default:e.withCtx(()=>[e.createTextVNode("发布")]),_:1})]),_:2},1032,["onConfirm"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["condition"]),e.createVNode(Y,{ref_key:"versionDiloag",ref:N,onSuccess:a},null,512)],64)}}},v={install:(B,s)=>{let d=s.router,m=d.getRoutes().find(a=>a.path=="/");m&&m.meta&&(d.addRoute({path:"/app/banner",name:"AppBanner",redirect:"/app/banner/list",component:m.meta.commonLayout,children:[{path:"list",name:"BannerListView",component:z}]}),d.addRoute({path:"/app/entrance",name:"AppEntrance",redirect:"/app/entrance/list",component:m.meta.commonLayout,children:[{path:"list",name:"EntranceListView",component:X}]}),d.addRoute({path:"/app/version",name:"AppVersion",redirect:"/app/version/list",component:m.meta.commonLayout,children:[{path:"list",name:"AppVersionListView",component:Z}]}))}},J=(B,s)=>{j.forEach(m=>B.use(m)),B.use(v,s);const d=H();if(s.defaultTesterUserIds)for(let m of s.defaultTesterUserIds)d.defaultTesterUserIds.push(m)},ee={install:J};A.default=ee,A.install=J,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(I,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","pinia"],e):(I=typeof globalThis<"u"?globalThis:I||self,e(I["pg-user-core"]={},I.Vue,I["element-plus"],I.pinia))})(this,function(I,e,R,M){"use strict";const q=[],P={OPEN_WEB:{name:"打开Web页面"},OPEN_VIEW:{name:"打开内置页面"},API_REQUEST:{name:"请求API"},EXEC_METHOD:{name:"执行方法"},CUSTOM:{name:"自定义"}},L={OPEN_WEB:{name:"打开Web页面"},OPEN_VIEW:{name:"打开内置页面"},API_REQUEST:{name:"请求API"},EXEC_METHOD:{name:"执行方法"},CUSTOM:{name:"自定义"}},j=e.defineComponent({__name:"BannerDialog",emits:["success"],setup(B,{expose:s,emit:d}){const m=e.ref(!1),a=e.ref({sceneCode:null,image:null,targetPath:null,clickEventType:"",params:null,shelfTimeArr:[]}),N=e.ref({sceneCode:[{required:!0,message:"请输入场景代码"}],image:[{required:!0,message:"请上传图片"}],targetPath:[{required:!0,message:"请输入目标地址"}],clickEventType:[{required:!0,message:"请选择点击事件类型"}]}),u=e.ref(!1),o=e.inject("http"),x=e.ref();function b(){var r;(r=x.value)==null||r.validate(t=>{if(t){u.value=!0;let c=`/api/app/banner/${C.value??""}/${C.value?"update":"create"}`,_={...a.value};_.shelfTime=null,_.offShelfTime=null,a.value.shelfTimeArr.length&&(_.shelfTime=a.value.shelfTimeArr[0],_.offShelfTime=a.value.shelfTimeArr[1]),o==null||o.post(c,_).then(p=>{var g;d("success"),(g=x.value)==null||g.resetFields(),m.value=!1}).finally(()=>{u.value=!1})}})}const w=e.ref([]),C=e.ref(null);function E(r,t){w.value=r,C.value=null,m.value=!0,e.nextTick(()=>{t&&(C.value=t.id,Object.assign(a.value,t),t.shelfTime&&t.offShelfTime&&(a.value.shelfTimeArr=[new Date(t.shelfTime),new Date(t.offShelfTime)]))})}function T(){var r;(r=x.value)==null||r.resetFields()}return s({show:E}),(r,t)=>{const c=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),p=e.resolveComponent("el-form-item"),g=e.resolveComponent("pg-upload"),U=e.resolveComponent("el-input"),n=e.resolveComponent("el-collapse-transition"),A=e.resolveComponent("el-date-picker"),V=e.resolveComponent("el-form"),f=e.resolveComponent("el-button"),F=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(F,{modelValue:m.value,"onUpdate:modelValue":t[6]||(t[6]=i=>m.value=i),width:"400",onClosed:T},{footer:e.withCtx(()=>[e.createVNode(f,{type:"primary",disabled:u.value,loading:u.value,onClick:b},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1},8,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:x,rules:N.value,model:a.value,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(p,{label:"场景代码",prop:"sceneCode"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:a.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=i=>a.value.sceneCode=i),placeholder:"请输入/选择场景代码","allow-create":"",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,i=>(e.openBlock(),e.createBlock(c,{key:i,value:i,label:i},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(p,{label:"图片",prop:"image"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(g,{accept:"jpg,jpeg,png",modelValue:a.value.image,"onUpdate:modelValue":t[1]||(t[1]=i=>a.value.image=i),key:`img_${C.value}`,"list-type":"picture-card","upload-type":"banner",limit:1},null,8,["modelValue"]))]),_:1}),e.createVNode(p,{label:"点击事件类型",prop:"clickEventType"},{default:e.withCtx(()=>[e.createVNode(_,{placeholder:"请选择点击事件类型",modelValue:a.value.clickEventType,"onUpdate:modelValue":t[2]||(t[2]=i=>a.value.clickEventType=i)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(P),(i,k)=>(e.openBlock(),e.createBlock(c,{value:k,label:i.name},null,8,["value","label"]))),256))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(n,null,{default:e.withCtx(()=>[["OPEN_WEB","OPEN_VIEW","API_REQUEST"].indexOf(a.value.clickEventType)>=0?(e.openBlock(),e.createBlock(p,{key:0,label:"目标地址",prop:"targetPath"},{default:e.withCtx(()=>[e.createVNode(U,{placeholder:"请输入目标地址",modelValue:a.value.targetPath,"onUpdate:modelValue":t[3]||(t[3]=i=>a.value.targetPath=i)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(p,{label:"目标地址参数",prop:"params"},{default:e.withCtx(()=>[e.createVNode(U,{type:"textarea",modelValue:a.value.params,"onUpdate:modelValue":t[4]||(t[4]=i=>a.value.params=i),placeholder:"请输入JSON格式的参数对象"},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"生效时段",prop:"shelfTimeArr"},{default:e.withCtx(()=>[e.createVNode(A,{type:"datetimerange",modelValue:a.value.shelfTimeArr,"onUpdate:modelValue":t[5]||(t[5]=i=>a.value.shelfTimeArr=i),"start-placeholder":"上架时间","end-placeholder":"下架时间","default-time":[new Date(2e3,1,1,0,0,0),new Date(2e3,1,1,23,59,59)]},null,8,["modelValue","default-time"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["modelValue"])}}}),W=e.defineComponent({__name:"BannerListView",setup(B){const s=e.inject("http"),d=e.ref({sceneCode:null,status:null}),m=e.ref([]);function a(){s==null||s.get("/api/app/banner/all-scene-code").then(r=>{m.value=r.data})}const N=e.ref(),u=e.ref(!1);function o(){u.value=!!d.value.sceneCode,N.value.search()}function x(r){s==null||s.post(`/api/app/banner/${r}/publish`).then(t=>{o()})}function b(r){s==null||s.post(`/api/app/banner/${r}/off-shelf`).then(t=>{o()})}function w(r,t){s==null||s.post(`/api/app/banner/${r}/move-up`).then(c=>{d.value.sceneCode=t,o()})}function C(r,t){s==null||s.post(`/api/app/banner/${r}/move-down`).then(c=>{d.value.sceneCode=t,o()})}e.onBeforeMount(()=>{a()});const E=e.ref();function T(r){E.value.show(m.value,r)}return(r,t)=>{const c=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),p=e.resolveComponent("el-button"),g=e.resolveComponent("el-space"),U=e.resolveComponent("el-card"),n=e.resolveComponent("el-table-column"),A=e.resolveComponent("el-image"),V=e.resolveComponent("el-descriptions-item"),f=e.resolveComponent("el-descriptions"),F=e.resolveComponent("el-popover"),i=e.resolveComponent("el-tag"),k=e.resolveComponent("el-popconfirm"),S=e.resolveComponent("pg-table"),D=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:d.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=l=>d.value.sceneCode=l),placeholder:"场景代码",clearable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,y)=>(e.openBlock(),e.createBlock(c,{label:l,value:l,key:`sc_con_${y}`},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(_,{modelValue:d.value.status,"onUpdate:modelValue":t[1]||(t[1]=l=>d.value.status=l),placeholder:"状态",clearable:"",style:{width:"150px"}},{default:e.withCtx(()=>[e.createVNode(c,{label:"草稿",value:"DRAFT"}),e.createVNode(c,{label:"已发布",value:"PUBLISH"}),e.createVNode(c,{label:"已下架",value:"OFF_SHELF"})]),_:1},8,["modelValue"]),e.createVNode(p,{type:"primary",icon:"search",onClick:o},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(p,{icon:"plus",onClick:t[2]||(t[2]=l=>T())},{default:e.withCtx(()=>[e.createTextVNode("创建Banner")]),_:1})),[[D,"CREATE_BANNER"]])]),_:1})]),_:1}),e.createVNode(S,{ref_key:"table",ref:N,"data-url":"/api/app/banner/page",onRowDbClick:t[3]||(t[3]=l=>r.$hasPer("UPDATE_BANNER")?T(l):null),condition:d.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[u.value&&r.$hasPer("BANNER_SEQ_MOVE_UP_DOWN")?(e.openBlock(),e.createBlock(n,{key:0,align:"center",width:"80"},{default:e.withCtx(({row:l})=>[e.createVNode(g,{direction:"vertical"},{default:e.withCtx(()=>[e.createVNode(p,{icon:"ArrowUpBold",onClick:y=>w(l.id,l.sceneCode)},null,8,["onClick"]),e.createVNode(p,{icon:"ArrowDownBold",onClick:y=>C(l.id,l.sceneCode)},null,8,["onClick"])]),_:2},1024)]),_:1})):e.createCommentVNode("",!0),e.createVNode(n,{label:"场景代码",prop:"sceneCode",width:"150"}),e.createVNode(n,{label:"图片",width:"300",align:"center"},{default:e.withCtx(({row:l})=>[e.createVNode(A,{src:l.image,style:{"max-width":"300px"},"preview-src-list":[l.image],"preview-teleported":""},null,8,["src","preview-src-list"])]),_:1}),e.createVNode(n,{label:"点击事件类型",prop:"clickEventType",width:"120"},{default:e.withCtx(({row:l})=>[e.createTextVNode(e.toDisplayString(l.clickEventType?e.unref(P)[l.clickEventType].name:""),1)]),_:1}),e.createVNode(n,{label:"目标地址",prop:"targetPath","show-overflow-tooltip":""}),e.createVNode(n,{label:"目标参数",width:"120","show-overflow-tooltip":""},{default:e.withCtx(({row:l})=>[l.params?(e.openBlock(),e.createBlock(F,{key:0,trigger:"hover",width:"350"},{reference:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.params.substring(0,100))+e.toDisplayString(l.params.length>100?"...":""),1)]),default:e.withCtx(()=>[l.params.startsWith("{")?(e.openBlock(),e.createBlock(f,{key:0,column:"1",border:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(JSON.parse(l.params),(y,O)=>(e.openBlock(),e.createBlock(V,{label:O,"min-width":"150"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y),1)]),_:2},1032,["label"]))),256))]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.params),1)],64))]),_:2},1024)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{label:"上架时间",prop:"shelfTime",width:"180",align:"center"}),e.createVNode(n,{label:"下架时间",prop:"offShelfTime",width:"180",align:"center"}),e.createVNode(n,{label:"状态",align:"center",width:"88"},{default:e.withCtx(({row:l})=>[l.status=="DRAFT"?(e.openBlock(),e.createBlock(i,{key:0,type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("草稿")]),_:1})):e.createCommentVNode("",!0),l.status=="PUBLISH"?(e.openBlock(),e.createBlock(i,{key:1,type:"success"},{default:e.withCtx(()=>[e.createTextVNode("已发布")]),_:1})):e.createCommentVNode("",!0),l.status=="OFF_SHELF"?(e.openBlock(),e.createBlock(i,{key:2,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("已下架")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{align:"center",width:"90"},{default:e.withCtx(({row:l})=>[["DRAFT","OFF_SHELF"].indexOf(l.status)>=0&&r.$hasPer("BANNER_PUBLISH")?(e.openBlock(),e.createBlock(k,{key:0,onConfirm:y=>x(l.id),title:`确定要${l.status=="DRAFT"?"发布":"上架"}该Banner吗?`},{reference:e.withCtx(()=>[e.createVNode(p,{type:"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.status=="DRAFT"?"发布":"上架"),1)]),_:2},1024)]),_:2},1032,["onConfirm","title"])):e.createCommentVNode("",!0),l.status=="PUBLISH"&&r.$hasPer("BANNER_OFF_SHELF")?(e.openBlock(),e.createBlock(k,{key:1,onConfirm:y=>b(l.id),title:"确定要[下架]该Banner吗?"},{reference:e.withCtx(()=>[e.createVNode(p,{type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("下架")]),_:1})]),_:2},1032,["onConfirm"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["condition"]),e.createVNode(j,{ref_key:"bannerDialog",ref:E,onSuccess:o},null,512)],64)}}}),z=e.defineComponent({__name:"EntranceDialog",emits:["success"],setup(B,{expose:s,emit:d}){const m=e.ref(!1),a=e.ref({sceneCode:null,name:null,iconType:"NAME",icon:null,targetPath:null,clickEventType:"",params:null,shelfTimeArr:[]}),N=e.ref({sceneCode:[{required:!0,message:"请输入场景代码"}],name:[{required:!0,message:"请输入入口名称"}],iconType:[{required:!0,message:"请选择图标类型"}],icon:[{required:!0,message:`请${a.value.iconType=="NAME"?"输入图标名称":"上传图标图片"}`}],targetPath:[{required:!0,message:"请输入目标地址"}],clickEventType:[{required:!0,message:"请选择点击事件类型"}]}),u=e.ref(!1),o=e.inject("http"),x=e.ref();function b(){var r;(r=x.value)==null||r.validate(t=>{if(t){u.value=!0;let c=`/api/app/entrance/${C.value??""}/${C.value?"update":"create"}`,_={...a.value};_.shelfTime=null,_.offShelfTime=null,a.value.shelfTimeArr.length&&(_.shelfTime=a.value.shelfTimeArr[0],_.offShelfTime=a.value.shelfTimeArr[1]),o==null||o.post(c,_).then(p=>{var g;d("success"),(g=x.value)==null||g.resetFields(),m.value=!1}).finally(()=>{u.value=!1})}})}const w=e.ref([]),C=e.ref(null);function E(r,t){w.value=r,C.value=null,m.value=!0,e.nextTick(()=>{t&&(C.value=t.id,Object.assign(a.value,t),t.shelfTime&&t.offShelfTime&&(a.value.shelfTimeArr=[new Date(t.shelfTime),new Date(t.offShelfTime)]))})}function T(){var r;(r=x.value)==null||r.resetFields()}return s({show:E}),(r,t)=>{const c=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),p=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-input"),U=e.resolveComponent("pg-upload"),n=e.resolveComponent("el-collapse-transition"),A=e.resolveComponent("el-date-picker"),V=e.resolveComponent("el-form"),f=e.resolveComponent("el-button"),F=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(F,{modelValue:m.value,"onUpdate:modelValue":t[9]||(t[9]=i=>m.value=i),width:"400",onClose:T},{footer:e.withCtx(()=>[e.createVNode(f,{type:"primary",disabled:u.value,loading:u.value,onClick:b},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1},8,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(V,{ref_key:"form",ref:x,rules:N.value,model:a.value,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(p,{label:"场景代码",prop:"sceneCode"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:a.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=i=>a.value.sceneCode=i),placeholder:"请输入/选择场景代码","allow-create":"",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,i=>(e.openBlock(),e.createBlock(c,{key:i,value:i,label:i},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(p,{label:"入口名称",prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{placeholder:"请输入入口名称",modelValue:a.value.name,"onUpdate:modelValue":t[1]||(t[1]=i=>a.value.name=i)},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"图标类型",prop:"iconType"},{default:e.withCtx(()=>[e.createVNode(_,{placeholder:"请选择图标类型",modelValue:a.value.iconType,"onUpdate:modelValue":t[2]||(t[2]=i=>a.value.iconType=i)},{default:e.withCtx(()=>[e.createVNode(c,{value:"NAME",label:"图标名称"}),e.createVNode(c,{value:"URL",label:"图标URL"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(p,{label:"图标",prop:"icon"},{default:e.withCtx(()=>[a.value.iconType=="URL"?(e.openBlock(),e.createBlock(U,{accept:"jpg,jpeg,png,gif",modelValue:a.value.icon,"onUpdate:modelValue":t[3]||(t[3]=i=>a.value.icon=i),key:`img_${C.value}`,"list-type":"picture-card","upload-type":"entrance",limit:1},null,8,["modelValue"])):(e.openBlock(),e.createBlock(g,{key:1,modelValue:a.value.icon,"onUpdate:modelValue":t[4]||(t[4]=i=>a.value.icon=i),placeholder:"请输入图标名称",clearable:""},null,8,["modelValue"]))]),_:1}),e.createVNode(p,{label:"点击事件类型",prop:"clickEventType"},{default:e.withCtx(()=>[e.createVNode(_,{placeholder:"请选择点击事件类型",modelValue:a.value.clickEventType,"onUpdate:modelValue":t[5]||(t[5]=i=>a.value.clickEventType=i)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L),(i,k)=>(e.openBlock(),e.createBlock(c,{value:k,label:i.name},null,8,["value","label"]))),256))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(n,null,{default:e.withCtx(()=>[["OPEN_WEB","OPEN_VIEW","API_REQUEST"].indexOf(a.value.clickEventType)>=0?(e.openBlock(),e.createBlock(p,{key:0,label:"目标地址",prop:"targetPath"},{default:e.withCtx(()=>[e.createVNode(g,{placeholder:"请输入目标地址",modelValue:a.value.targetPath,"onUpdate:modelValue":t[6]||(t[6]=i=>a.value.targetPath=i)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(p,{label:"目标地址参数",prop:"params"},{default:e.withCtx(()=>[e.createVNode(g,{type:"textarea",modelValue:a.value.params,"onUpdate:modelValue":t[7]||(t[7]=i=>a.value.params=i),placeholder:"请输入JSON格式的参数对象"},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"生效时段",prop:"shelfTimeArr"},{default:e.withCtx(()=>[e.createVNode(A,{type:"datetimerange",modelValue:a.value.shelfTimeArr,"onUpdate:modelValue":t[8]||(t[8]=i=>a.value.shelfTimeArr=i),"start-placeholder":"上架时间","end-placeholder":"下架时间","default-time":[new Date(2e3,1,1,0,0,0),new Date(2e3,1,1,23,59,59)]},null,8,["modelValue","default-time"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["modelValue"])}}}),Q=e.defineComponent({__name:"EntranceListView",setup(B){const s=e.inject("http"),d=e.ref({sceneCode:null,status:null}),m=e.ref([]);function a(){s==null||s.get("/api/app/entrance/all-scene-code").then(r=>{m.value=r.data})}const N=e.ref(),u=e.ref(!1);function o(){u.value=!!d.value.sceneCode,N.value.search()}function x(r){s==null||s.post(`/api/app/entrance/${r}/publish`).then(t=>{o()})}function b(r){s==null||s.post(`/api/app/entrance/${r}/off-shelf`).then(t=>{o()})}function w(r,t){s==null||s.post(`/api/app/entrance/${r}/move-up`).then(c=>{d.value.sceneCode=t,o()})}function C(r,t){s==null||s.post(`/api/app/entrance/${r}/move-down`).then(c=>{d.value.sceneCode=t,o()})}e.onBeforeMount(()=>{a()});const E=e.ref();function T(r){E.value.show(m.value,r)}return(r,t)=>{const c=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),p=e.resolveComponent("el-button"),g=e.resolveComponent("el-space"),U=e.resolveComponent("el-card"),n=e.resolveComponent("el-table-column"),A=e.resolveComponent("el-image"),V=e.resolveComponent("el-descriptions-item"),f=e.resolveComponent("el-descriptions"),F=e.resolveComponent("el-popover"),i=e.resolveComponent("el-tag"),k=e.resolveComponent("el-popconfirm"),S=e.resolveComponent("pg-table"),D=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(_,{modelValue:d.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=l=>d.value.sceneCode=l),placeholder:"场景代码",clearable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,y)=>(e.openBlock(),e.createBlock(c,{label:l,value:l,key:`sc_con_${y}`},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(_,{modelValue:d.value.status,"onUpdate:modelValue":t[1]||(t[1]=l=>d.value.status=l),placeholder:"状态",clearable:"",style:{width:"150px"}},{default:e.withCtx(()=>[e.createVNode(c,{label:"草稿",value:"DRAFT"}),e.createVNode(c,{label:"已发布",value:"PUBLISH"}),e.createVNode(c,{label:"已下架",value:"OFF_SHELF"})]),_:1},8,["modelValue"]),e.createVNode(p,{type:"primary",icon:"search",onClick:o},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(p,{icon:"plus",onClick:t[2]||(t[2]=l=>T())},{default:e.withCtx(()=>[e.createTextVNode("创建入口")]),_:1})),[[D,"CREATE_ENTRANCE"]])]),_:1})]),_:1}),e.createVNode(S,{ref_key:"table",ref:N,"data-url":"/api/app/entrance/page",onRowDbClick:t[3]||(t[3]=l=>r.$hasPer("UPDATE_ENTRANCE")?T(l):null),condition:d.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[u.value&&r.$hasPer("ENTRANCE_SEQ_MOVE_UP_DOWN")?(e.openBlock(),e.createBlock(n,{key:0,align:"center",width:"80"},{default:e.withCtx(({row:l})=>[e.createVNode(g,{direction:"vertical"},{default:e.withCtx(()=>[e.createVNode(p,{icon:"ArrowUpBold",onClick:y=>w(l.id,l.sceneCode)},null,8,["onClick"]),e.createVNode(p,{icon:"ArrowDownBold",onClick:y=>C(l.id,l.sceneCode)},null,8,["onClick"])]),_:2},1024)]),_:1})):e.createCommentVNode("",!0),e.createVNode(n,{label:"场景代码",prop:"sceneCode",width:"150"}),e.createVNode(n,{label:"图标",width:"200",align:"center"},{default:e.withCtx(({row:l})=>[l.iconType=="URL"?(e.openBlock(),e.createBlock(A,{key:0,src:l.icon,style:{"max-width":"200px"},"preview-src-list":[l.icon],"preview-teleported":""},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.icon),1)],64))]),_:1}),e.createVNode(n,{label:"点击事件类型",prop:"clickEventType",width:"120"},{default:e.withCtx(({row:l})=>[e.createTextVNode(e.toDisplayString(l.clickEventType?e.unref(L)[l.clickEventType].name:""),1)]),_:1}),e.createVNode(n,{label:"目标地址",prop:"targetPath","show-overflow-tooltip":""}),e.createVNode(n,{label:"目标参数",width:"120","show-overflow-tooltip":""},{default:e.withCtx(({row:l})=>[l.params?(e.openBlock(),e.createBlock(F,{key:0,trigger:"hover",width:"350"},{reference:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.params.substring(0,100))+e.toDisplayString(l.params.length>100?"...":""),1)]),default:e.withCtx(()=>[l.params.startsWith("{")?(e.openBlock(),e.createBlock(f,{key:0,column:"1",border:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(JSON.parse(l.params),(y,O)=>(e.openBlock(),e.createBlock(V,{label:O,"min-width":"150"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y),1)]),_:2},1032,["label"]))),256))]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.params),1)],64))]),_:2},1024)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{label:"上架时间",prop:"shelfTime",width:"180",align:"center"}),e.createVNode(n,{label:"下架时间",prop:"offShelfTime",width:"180",align:"center"}),e.createVNode(n,{label:"状态",align:"center",width:"88"},{default:e.withCtx(({row:l})=>[l.status=="DRAFT"?(e.openBlock(),e.createBlock(i,{key:0,type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("草稿")]),_:1})):e.createCommentVNode("",!0),l.status=="PUBLISH"?(e.openBlock(),e.createBlock(i,{key:1,type:"success"},{default:e.withCtx(()=>[e.createTextVNode("已发布")]),_:1})):e.createCommentVNode("",!0),l.status=="OFF_SHELF"?(e.openBlock(),e.createBlock(i,{key:2,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("已下架")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(n,{align:"center",width:"90"},{default:e.withCtx(({row:l})=>[["DRAFT","OFF_SHELF"].indexOf(l.status)>=0&&r.$hasPer("ENTRANCE_PUBLISH")?(e.openBlock(),e.createBlock(k,{key:0,onConfirm:y=>x(l.id),title:`确定要${l.status=="DRAFT"?"发布":"上架"}该入口吗?`},{reference:e.withCtx(()=>[e.createVNode(p,{type:"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.status=="DRAFT"?"发布":"上架"),1)]),_:2},1024)]),_:2},1032,["onConfirm","title"])):e.createCommentVNode("",!0),l.status=="PUBLISH"&&r.$hasPer("ENTRANCE_OFF_SHELF")?(e.openBlock(),e.createBlock(k,{key:1,onConfirm:y=>b(l.id),title:"确定要[下架]该入口吗?"},{reference:e.withCtx(()=>[e.createVNode(p,{type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("下架")]),_:1})]),_:2},1032,["onConfirm"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["condition"]),e.createVNode(z,{ref_key:"entranceDialog",ref:E,onSuccess:o},null,512)],64)}}}),$=M.defineStore("pg-app-util-core-config-store",()=>{const B=[];return{defaultTesterUserIds:e.computed(()=>B)}}),oe="",X=(B,s)=>{const d=B.__vccOpts||B;for(const[m,a]of s)d[m]=a;return d},G={class:"dialog-footer"},K=X({__name:"VersionDialog",emits:["success"],setup(B,{expose:s,emit:d}){const m=e.inject("http"),a=e.ref("CREATE"),N=e.computed(()=>a.value==="EDIT"),u=e.ref(!1),o=e.ref({appCode:null,platform:"ANDROID",versionName:null,versionNumber:null,category:"SELF",isForce:!1,isHot:!0,activationTime:null,pkgUrl:null,wgtUrl:null,description:null,testerIdJsonStr:""}),x=e.ref(),b=$();e.onMounted(()=>{b.defaultTesterUserIds.length&&(o.value.testerIdJsonStr=b.defaultTesterUserIds.join(","))});let w=null;const C=e.ref(!1);async function E(V){u.value=!0,a.value=V?"EDIT":"CREATE",w=V,V&&(C.value=V.status=="RELEASE",console.log(V.status),Object.assign(o.value,V),V.testerIdJsonStr&&(o.value.testerIdJsonStr=JSON.parse(V.testerIdJsonStr).join(",")),x.value=V.isHot?V.wgtUrl:V.pkgUrl),await A(),V&&p(V.appCode)}function T(V){o.value.isHot?o.value.wgtUrl=V.fileUrl:o.value.pkgUrl=V.fileUrl}function r(){o.value={appCode:null,platform:"ANDROID",versionName:null,category:"SELF",isForce:!1,isHot:!0,activationTime:null,pkgUrl:null,wgtUrl:null,testerIdJsonStr:""}}function t(){u.value=!u.value}const c=e.ref();function _(){c.value.validate(V=>{V&&(N.value?m.post(`/api/app/version/${w.id}`,{...o.value,testerIdJsonStr:o.value.testerIdJsonStr?JSON.stringify(JSON.parse("["+o.value.testerIdJsonStr+"]")):null}).then(f=>{t(),d("success")}):m.post("/api/app/version",{...o.value,testerIdJsonStr:o.value.testerIdJsonStr?JSON.stringify(JSON.parse("["+o.value.testerIdJsonStr+"]")):null}).then(f=>{t(),d("success")}))})}function p(V){n.value.find(F=>F.code===V).platform=="IOS"?o.value.platform="IOS":o.value.platform="ANDROID"}const g=e.ref();function U(){o.value.wgtUrl=null,o.value.pkgUrl=null,g.value&&g.value.clearFileList()}const n=e.ref([]);async function A(){if(n.value.length<=0){const V=await m.get("/api/app/all");n.value=V.data}}return s({show:E}),(V,f)=>{const F=e.resolveComponent("el-option"),i=e.resolveComponent("el-select"),k=e.resolveComponent("el-form-item"),S=e.resolveComponent("el-col"),D=e.resolveComponent("el-row"),l=e.resolveComponent("el-input"),y=e.resolveComponent("el-date-picker"),O=e.resolveComponent("el-checkbox"),ee=e.resolveComponent("pg-upload"),te=e.resolveComponent("el-form"),J=e.resolveComponent("el-button"),le=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(le,{title:e.unref(N)?"编辑App版本":"发布App版本",modelValue:u.value,"onUpdate:modelValue":f[10]||(f[10]=h=>u.value=h),width:"700px",onClosed:r},{footer:e.withCtx(()=>[e.createElementVNode("div",G,[e.createVNode(J,{onClick:t},{default:e.withCtx(()=>[e.createTextVNode("取 消")]),_:1}),e.createVNode(J,{type:"primary",onClick:_},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(N)?"提 交":"创 建"),1)]),_:1})])]),default:e.withCtx(()=>[e.createVNode(te,{model:o.value,ref_key:"publishModalForm",ref:c},{default:e.withCtx(()=>[e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(S,{span:24},{default:e.withCtx(()=>[e.createVNode(k,{label:"应用","label-width":"100px",prop:"appCode",rules:[{required:!0,message:"请选择应用",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:o.value.appCode,"onUpdate:modelValue":f[0]||(f[0]=h=>o.value.appCode=h),disabled:e.unref(N)&&C.value,placeholder:"请选择要发布的平台",style:{width:"100%"},onChange:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,h=>(e.openBlock(),e.createBlock(F,{key:h.code,label:h.name,value:h.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(S,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{label:"版本名称","label-width":"100px",prop:"versionName",rules:[{required:!0,message:"请输入版本名称",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:o.value.versionName,"onUpdate:modelValue":f[1]||(f[1]=h=>o.value.versionName=h),disabled:e.unref(N)&&C.value,placeholder:"例: 1.1.2"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e.createVNode(S,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{label:"版本编号","label-width":"100px",prop:"versionNumber",rules:[{required:!0,message:"请输入版本编号",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:o.value.versionNumber,"onUpdate:modelValue":f[2]||(f[2]=h=>o.value.versionNumber=h),disabled:e.unref(N)&&C.value,type:"number",min:"1",placeholder:"例: 112"},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(S,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{label:"启用时间","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:o.value.activationTime,"onUpdate:modelValue":f[3]||(f[3]=h=>o.value.activationTime=h),type:"datetime",placeholder:"选择启用时间",disabled:e.unref(N)&&C.value},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(S,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{label:"是否热更新","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(O,{modelValue:o.value.isHot,"onUpdate:modelValue":f[4]||(f[4]=h=>o.value.isHot=h),onChange:U,disabled:e.unref(N)&&C.value},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e.createVNode(S,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{label:"是否强制","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(O,{modelValue:o.value.isForce,"onUpdate:modelValue":f[5]||(f[5]=h=>o.value.isForce=h),placeholder:"请选择是否强制",disabled:e.unref(N)&&C.value},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),o.value.category=="APP_STORE"?(e.openBlock(),e.createBlock(D,{key:0},{default:e.withCtx(()=>[e.createVNode(S,{span:24},{default:e.withCtx(()=>[e.createVNode(k,{label:"市场地址","label-width":"100px",prop:"pkgUrl",rules:[{required:!0,message:"应用市场地址",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:o.value.pkgUrl,"onUpdate:modelValue":f[6]||(f[6]=h=>o.value.pkgUrl=h),placeholder:"应用市场地址"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(S,{span:24},{default:e.withCtx(()=>[e.createVNode(k,{label:"版本描述","label-width":"100px",prop:"description",rules:[{required:!0,message:"请输入版本描述",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{type:"textarea",modelValue:o.value.description,"onUpdate:modelValue":f[7]||(f[7]=h=>o.value.description=h),autosize:{minRows:4},placeholder:"请输入版本描述"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.unref(N)&&C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D,{key:1},{default:e.withCtx(()=>[e.createVNode(S,{span:24},{default:e.withCtx(()=>[e.createVNode(k,{label:"测试用户","label-width":"100px",prop:"testerIdJsonStr"},{default:e.withCtx(()=>[e.createVNode(l,{type:"textarea",modelValue:o.value.testerIdJsonStr,"onUpdate:modelValue":f[8]||(f[8]=h=>o.value.testerIdJsonStr=h),autosize:{minRows:4},placeholder:"请输入测试用户ID。 例子: 10000, 100202, 100203"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})),o.value.platform=="ANDROID"||o.value.platform=="IOS"&&o.value.isHot?(e.openBlock(),e.createBlock(D,{key:2},{default:e.withCtx(()=>[e.createVNode(S,{span:24},{default:e.withCtx(()=>[e.createVNode(k,{label:o.value.isHot?"上传更新包":"上传安装包","label-width":"100px",rules:[{required:!0,message:"请上传更新包",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(ee,{ref_key:"appPkgUploader",ref:g,modelValue:x.value,"onUpdate:modelValue":f[9]||(f[9]=h=>x.value=h),drag:!0,multiple:!1,tips:"热更新下只能上传wgt格式的文件,非热更新下只能上传apk格式的文件",autoUpload:!0,uploadType:"appPkg",accept:o.value.isHot?".wgt":"application/vnd.android.package-archive",disabled:e.unref(N)&&C.value,onOnSuccess:T},null,8,["modelValue","accept","disabled"])]),_:1},8,["label"])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["title","modelValue"])}}},[["__scopeId","data-v-02170750"]]),Y={__name:"VersionListView",setup(B){const s=e.ref({platform:null,isHot:null,status:null}),d=e.inject("http"),m=e.ref();function a(){m.value.search()}const N=e.ref();function u(b){N.value.show(b)}async function o(b){await d.post(`/api/app/version/${b}/publish`),a(),R.ElMessage.success("发布成功")}async function x(b){await d.post(`/api/app/version/${b}/offline`),a(),R.ElMessage.success("下架成功")}return(b,w)=>{const C=e.resolveComponent("el-option"),E=e.resolveComponent("el-select"),T=e.resolveComponent("el-button"),r=e.resolveComponent("el-space"),t=e.resolveComponent("el-card"),c=e.resolveComponent("el-table-column"),_=e.resolveComponent("el-tag"),p=e.resolveComponent("el-popconfirm"),g=e.resolveComponent("pg-table"),U=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(t,null,{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createVNode(E,{modelValue:s.value.isHot,"onUpdate:modelValue":w[0]||(w[0]=n=>s.value.isHot=n),placeholder:"热更新/整包更新",style:{width:"180px"},clearable:""},{default:e.withCtx(()=>[e.createVNode(C,{label:"热更新",value:"true"}),e.createVNode(C,{label:"整包更新",value:"false"})]),_:1},8,["modelValue"]),e.createVNode(E,{modelValue:s.value.status,"onUpdate:modelValue":w[1]||(w[1]=n=>s.value.status=n),placeholder:"状态",style:{width:"120px"},clearable:""},{default:e.withCtx(()=>[e.createVNode(C,{label:"测试",value:"TEST"}),e.createVNode(C,{label:"发布",value:"RELEASE"}),e.createVNode(C,{label:"下架",value:"OFFLINE"})]),_:1},8,["modelValue"]),e.createVNode(T,{type:"primary",icon:"search",onClick:a},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(T,{icon:"plus",onClick:w[2]||(w[2]=n=>u())},{default:e.withCtx(()=>[e.createTextVNode("新建版本")]),_:1})),[[U,"CREATE_BANNER"]])]),_:1})]),_:1}),e.createVNode(g,{ref_key:"table",ref:m,"data-url":"/api/app/version/page-search",onRowDbClick:w[3]||(w[3]=n=>u(n)),condition:s.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[e.createVNode(c,{label:"ID",prop:"id",align:"center",width:"60px"}),e.createVNode(c,{label:"应用",prop:"appName",align:"center",width:"120px","show-overflow-tooltip":""}),e.createVNode(c,{label:"应用平台",prop:"appPlatform",align:"center",width:"100px","show-overflow-tooltip":""}),e.createVNode(c,{label:"版本名称",prop:"versionName",align:"center",width:"90","show-overflow-tooltip":""}),e.createVNode(c,{label:"版本编号",prop:"versionNumber",align:"center",width:"90","show-overflow-tooltip":""}),e.createVNode(c,{label:"强制更新",prop:"isForce",align:"center",width:"90","show-overflow-tooltip":""},{default:e.withCtx(({row:n})=>[n.isForce?(e.openBlock(),e.createBlock(_,{key:0,type:"warning",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("是")]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("否")]),_:1}))]),_:1}),e.createVNode(c,{label:"整包更新",prop:"isHot",align:"center",width:"90","show-overflow-tooltip":""},{default:e.withCtx(({row:n})=>[n.isHot?(e.openBlock(),e.createBlock(_,{key:0,type:"warning",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("否")]),_:1})):(e.openBlock(),e.createBlock(_,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("是")]),_:1}))]),_:1}),e.createVNode(c,{label:"启用时间",width:"150px",prop:"activationTime",align:"center","show-overflow-tooltip":""}),e.createVNode(c,{label:"状态",width:"100",align:"center"},{default:e.withCtx(({row:n})=>[e.createVNode(_,{type:n.status=="RELEASE"?"success":n.status=="OFFLINE"?"danger":"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.status=="RELEASE"?"发布":n.status=="OFFLINE"?"下线":"测试"),1)]),_:2},1032,["type"])]),_:1}),e.createVNode(c,{label:"安装包/更新包地址",prop:"pkgUrl",align:"center","show-overflow-tooltip":""},{default:e.withCtx(({row:n})=>[e.createTextVNode(e.toDisplayString(n.isHot?n.wgtUrl:n.pkgUrl),1)]),_:1}),e.createVNode(c,{label:"操作",align:"center",width:"160px"},{default:e.withCtx(({row:n})=>[n.status=="RELEASE"?(e.openBlock(),e.createBlock(p,{key:0,title:`确定下架版本[${n.versionName}]吗?`,onConfirm:A=>x(n.id)},{reference:e.withCtx(()=>[e.createVNode(T,{type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("下架")]),_:1})]),_:2},1032,["title","onConfirm"])):e.createCommentVNode("",!0),n.status=="TEST"||n.status=="OFFLINE"?(e.openBlock(),e.createBlock(p,{key:1,title:"是否确定发布该版本?",onConfirm:A=>o(n.id)},{reference:e.withCtx(()=>[e.createVNode(T,{type:"success"},{default:e.withCtx(()=>[e.createTextVNode("发布")]),_:1})]),_:2},1032,["onConfirm"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["condition"]),e.createVNode(K,{ref_key:"versionDiloag",ref:N,onSuccess:a},null,512)],64)}}},Z={install:(B,s)=>{let d=s.router,m=d.getRoutes().find(a=>a.path=="/");m&&m.meta&&(d.addRoute({path:"/app/banner",name:"AppBanner",redirect:"/app/banner/list",component:m.meta.commonLayout,children:[{path:"list",name:"BannerListView",component:W}]}),d.addRoute({path:"/app/entrance",name:"AppEntrance",redirect:"/app/entrance/list",component:m.meta.commonLayout,children:[{path:"list",name:"EntranceListView",component:Q}]}),d.addRoute({path:"/app/version",name:"AppVersion",redirect:"/app/version/list",component:m.meta.commonLayout,children:[{path:"list",name:"AppVersionListView",component:Y}]}))}},H=(B,s)=>{q.forEach(m=>B.use(m)),B.use(Z,s);const d=$();if(s.defaultTesterUserIds)for(let m of s.defaultTesterUserIds)d.defaultTesterUserIds.push(m)},v={install:H};I.default=v,I.install=H,Object.defineProperties(I,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-
|
|
1
|
+
[data-v-02170750] .pg-upload-hidden-upload{width:100%!important}
|
|
@@ -8,7 +8,7 @@ declare namespace _sfc_main {
|
|
|
8
8
|
isHot: null;
|
|
9
9
|
status: null;
|
|
10
10
|
}>;
|
|
11
|
-
http:
|
|
11
|
+
http: any;
|
|
12
12
|
table: import("vue").Ref<any>;
|
|
13
13
|
search: () => void;
|
|
14
14
|
versionDiloag: import("vue").Ref<any>;
|
|
@@ -23,7 +23,7 @@ declare namespace _sfc_main {
|
|
|
23
23
|
expose: any;
|
|
24
24
|
emit: any;
|
|
25
25
|
}): {
|
|
26
|
-
http:
|
|
26
|
+
http: any;
|
|
27
27
|
emits: any;
|
|
28
28
|
mode: import("vue").Ref<string>;
|
|
29
29
|
editMode: import("vue").ComputedRef<boolean>;
|
|
@@ -70,7 +70,6 @@ declare namespace _sfc_main {
|
|
|
70
70
|
onMounted: (hook: () => any, target?: import("vue").ComponentInternalInstance | null | undefined) => false | Function | undefined;
|
|
71
71
|
computed: typeof import("@vue/reactivity").computed;
|
|
72
72
|
readonly ElMessage: import("element-plus/es/utils").SFCInstallWithContext<import("element-plus").Message>;
|
|
73
|
-
readonly Http: any;
|
|
74
73
|
readonly useAppUtilCoreConfigStore: import("pinia").StoreDefinition<"pg-app-util-core-config-store", import("pinia")._UnwrapAll<Pick<{
|
|
75
74
|
defaultTesterUserIds: import("vue").ComputedRef<number[]>;
|
|
76
75
|
}, never>>, Pick<{
|
|
@@ -80,7 +79,6 @@ declare namespace _sfc_main {
|
|
|
80
79
|
}, never>>;
|
|
81
80
|
};
|
|
82
81
|
};
|
|
83
|
-
readonly Http: any;
|
|
84
82
|
readonly ElMessage: import("element-plus/es/utils").SFCInstallWithContext<import("element-plus").Message>;
|
|
85
83
|
};
|
|
86
84
|
}
|
|
@@ -5,7 +5,7 @@ declare namespace _sfc_main {
|
|
|
5
5
|
expose: any;
|
|
6
6
|
emit: any;
|
|
7
7
|
}): {
|
|
8
|
-
http:
|
|
8
|
+
http: any;
|
|
9
9
|
emits: any;
|
|
10
10
|
mode: import("vue").Ref<string>;
|
|
11
11
|
editMode: import("vue").ComputedRef<boolean>;
|
|
@@ -52,7 +52,6 @@ declare namespace _sfc_main {
|
|
|
52
52
|
onMounted: (hook: () => any, target?: import("vue").ComponentInternalInstance | null | undefined) => false | Function | undefined;
|
|
53
53
|
computed: typeof import("@vue/reactivity").computed;
|
|
54
54
|
readonly ElMessage: import("element-plus/es/utils").SFCInstallWithContext<import("element-plus").Message>;
|
|
55
|
-
readonly Http: any;
|
|
56
55
|
readonly useAppUtilCoreConfigStore: import("pinia").StoreDefinition<"pg-app-util-core-config-store", import("pinia")._UnwrapAll<Pick<{
|
|
57
56
|
defaultTesterUserIds: import("vue").ComputedRef<number[]>;
|
|
58
57
|
}, never>>, Pick<{
|