@pangu-backend-ui/apputil-core 0.0.7 → 0.0.8
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 +643 -633
- package/index.umd.cjs +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/views/FeedbackListView.vue.d.ts +2 -0
package/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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,L,M){"use strict";const q=[],$={OPEN_WEB:{name:"打开Web页面"},OPEN_VIEW:{name:"打开内置页面"},API_REQUEST:{name:"请求API"},EXEC_METHOD:{name:"执行方法"},CUSTOM:{name:"自定义"}},O={OPEN_WEB:{name:"打开Web页面"},OPEN_VIEW:{name:"打开内置页面"},API_REQUEST:{name:"请求API"},EXEC_METHOD:{name:"执行方法"},CUSTOM:{name:"自定义"}},j=e.defineComponent({__name:"BannerDialog",emits:["success"],setup(U,{expose:i,emit:s}){const p=e.ref(!1),a=e.ref({sceneCode:null,image:null,targetPath:null,clickEventType:"",params:null,shelfTimeArr:[]}),C=e.ref({sceneCode:[{required:!0,message:"请输入场景代码"}],image:[{required:!0,message:"请上传图片"}],targetPath:[{required:!0,message:"请输入目标地址"}],clickEventType:[{required:!0,message:"请选择点击事件类型"}]}),V=e.ref(!1),n=e.inject("http"),k=e.ref();function y(){var r;(r=k.value)==null||r.validate(t=>{if(t){V.value=!0;let d=`/api/app/banner/${_.value??""}/${_.value?"update":"create"}`,f={...a.value};f.shelfTime=null,f.offShelfTime=null,a.value.shelfTimeArr.length&&(f.shelfTime=a.value.shelfTimeArr[0],f.offShelfTime=a.value.shelfTimeArr[1]),n==null||n.post(d,f).then(m=>{var g;s("success"),(g=k.value)==null||g.resetFields(),p.value=!1}).finally(()=>{V.value=!1})}})}const u=e.ref([]),_=e.ref(null);function w(r,t){u.value=r,_.value=null,p.value=!0,e.nextTick(()=>{t&&(_.value=t.id,Object.assign(a.value,t),t.shelfTime&&t.offShelfTime&&(a.value.shelfTimeArr=[new Date(t.shelfTime),new Date(t.offShelfTime)]))})}function x(){var r;(r=k.value)==null||r.resetFields()}return i({show:w}),(r,t)=>{const d=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),m=e.resolveComponent("el-form-item"),g=e.resolveComponent("pg-upload"),T=e.resolveComponent("el-input"),l=e.resolveComponent("el-collapse-transition"),E=e.resolveComponent("el-date-picker"),h=e.resolveComponent("el-form"),N=e.resolveComponent("el-button"),A=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(A,{modelValue:p.value,"onUpdate:modelValue":t[6]||(t[6]=c=>p.value=c),width:"400",onClosed:x},{footer:e.withCtx(()=>[e.createVNode(N,{type:"primary",disabled:V.value,loading:V.value,onClick:y},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1},8,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(h,{ref_key:"form",ref:k,rules:C.value,model:a.value,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(m,{label:"场景代码",prop:"sceneCode"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=c=>a.value.sceneCode=c),placeholder:"请输入/选择场景代码","allow-create":"",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,c=>(e.openBlock(),e.createBlock(d,{key:c,value:c,label:c},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(m,{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]=c=>a.value.image=c),key:`img_${_.value}`,"list-type":"picture-card","upload-type":"banner",limit:1},null,8,["modelValue"]))]),_:1}),e.createVNode(m,{label:"点击事件类型",prop:"clickEventType"},{default:e.withCtx(()=>[e.createVNode(f,{placeholder:"请选择点击事件类型",modelValue:a.value.clickEventType,"onUpdate:modelValue":t[2]||(t[2]=c=>a.value.clickEventType=c)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref($),(c,B)=>(e.openBlock(),e.createBlock(d,{value:B,label:c.name},null,8,["value","label"]))),256))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(l,null,{default:e.withCtx(()=>[["OPEN_WEB","OPEN_VIEW","API_REQUEST"].indexOf(a.value.clickEventType)>=0?(e.openBlock(),e.createBlock(m,{key:0,label:"目标地址",prop:"targetPath"},{default:e.withCtx(()=>[e.createVNode(T,{placeholder:"请输入目标地址",modelValue:a.value.targetPath,"onUpdate:modelValue":t[3]||(t[3]=c=>a.value.targetPath=c)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(m,{label:"目标地址参数",prop:"params"},{default:e.withCtx(()=>[e.createVNode(T,{type:"textarea",modelValue:a.value.params,"onUpdate:modelValue":t[4]||(t[4]=c=>a.value.params=c),placeholder:"请输入JSON格式的参数对象"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"生效时段",prop:"shelfTimeArr"},{default:e.withCtx(()=>[e.createVNode(E,{type:"datetimerange",modelValue:a.value.shelfTimeArr,"onUpdate:modelValue":t[5]||(t[5]=c=>a.value.shelfTimeArr=c),"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(U){const i=e.inject("http"),s=e.ref({sceneCode:null,status:null}),p=e.ref([]);function a(){i==null||i.get("/api/app/banner/all-scene-code").then(r=>{p.value=r.data})}const C=e.ref(),V=e.ref(!1);function n(){V.value=!!s.value.sceneCode,C.value.search()}function k(r){i==null||i.post(`/api/app/banner/${r}/publish`).then(t=>{n()})}function y(r){i==null||i.post(`/api/app/banner/${r}/off-shelf`).then(t=>{n()})}function u(r,t){i==null||i.post(`/api/app/banner/${r}/move-up`).then(d=>{s.value.sceneCode=t,n()})}function _(r,t){i==null||i.post(`/api/app/banner/${r}/move-down`).then(d=>{s.value.sceneCode=t,n()})}e.onBeforeMount(()=>{a()});const w=e.ref();function x(r){w.value.show(p.value,r)}return(r,t)=>{const d=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),m=e.resolveComponent("el-button"),g=e.resolveComponent("el-space"),T=e.resolveComponent("el-card"),l=e.resolveComponent("el-table-column"),E=e.resolveComponent("el-image"),h=e.resolveComponent("el-descriptions-item"),N=e.resolveComponent("el-descriptions"),A=e.resolveComponent("el-popover"),c=e.resolveComponent("el-tag"),B=e.resolveComponent("el-popconfirm"),D=e.resolveComponent("pg-table"),F=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(T,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(f,{modelValue:s.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=o=>s.value.sceneCode=o),placeholder:"场景代码",clearable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,S)=>(e.openBlock(),e.createBlock(d,{label:o,value:o,key:`sc_con_${S}`},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(f,{modelValue:s.value.status,"onUpdate:modelValue":t[1]||(t[1]=o=>s.value.status=o),placeholder:"状态",clearable:"",style:{width:"150px"}},{default:e.withCtx(()=>[e.createVNode(d,{label:"草稿",value:"DRAFT"}),e.createVNode(d,{label:"已发布",value:"PUBLISH"}),e.createVNode(d,{label:"已下架",value:"OFF_SHELF"})]),_:1},8,["modelValue"]),e.createVNode(m,{type:"primary",icon:"search",onClick:n},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(m,{icon:"plus",onClick:t[2]||(t[2]=o=>x())},{default:e.withCtx(()=>[e.createTextVNode("创建Banner")]),_:1})),[[F,"CREATE_BANNER"]])]),_:1})]),_:1}),e.createVNode(D,{ref_key:"table",ref:C,"data-url":"/api/app/banner/page",onRowDbClick:t[3]||(t[3]=o=>r.$hasPer("UPDATE_BANNER")?x(o):null),condition:s.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[V.value&&r.$hasPer("BANNER_SEQ_MOVE_UP_DOWN")?(e.openBlock(),e.createBlock(l,{key:0,align:"center",width:"80"},{default:e.withCtx(({row:o})=>[e.createVNode(g,{direction:"vertical"},{default:e.withCtx(()=>[e.createVNode(m,{icon:"ArrowUpBold",onClick:S=>u(o.id,o.sceneCode)},null,8,["onClick"]),e.createVNode(m,{icon:"ArrowDownBold",onClick:S=>_(o.id,o.sceneCode)},null,8,["onClick"])]),_:2},1024)]),_:1})):e.createCommentVNode("",!0),e.createVNode(l,{label:"场景代码",prop:"sceneCode",width:"150"}),e.createVNode(l,{label:"图片",width:"300",align:"center"},{default:e.withCtx(({row:o})=>[e.createVNode(E,{src:o.image,style:{"max-width":"300px"},"preview-src-list":[o.image],"preview-teleported":""},null,8,["src","preview-src-list"])]),_:1}),e.createVNode(l,{label:"点击事件类型",prop:"clickEventType",width:"120"},{default:e.withCtx(({row:o})=>[e.createTextVNode(e.toDisplayString(o.clickEventType?e.unref($)[o.clickEventType].name:""),1)]),_:1}),e.createVNode(l,{label:"目标地址",prop:"targetPath","show-overflow-tooltip":""}),e.createVNode(l,{label:"目标参数",width:"120","show-overflow-tooltip":""},{default:e.withCtx(({row:o})=>[o.params?(e.openBlock(),e.createBlock(A,{key:0,trigger:"hover",width:"350"},{reference:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.params.substring(0,100))+e.toDisplayString(o.params.length>100?"...":""),1)]),default:e.withCtx(()=>[o.params.startsWith("{")?(e.openBlock(),e.createBlock(N,{key:0,column:"1",border:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(JSON.parse(o.params),(S,R)=>(e.openBlock(),e.createBlock(h,{label:R,"min-width":"150"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S),1)]),_:2},1032,["label"]))),256))]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.params),1)],64))]),_:2},1024)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(l,{label:"上架时间",prop:"shelfTime",width:"180",align:"center"}),e.createVNode(l,{label:"下架时间",prop:"offShelfTime",width:"180",align:"center"}),e.createVNode(l,{label:"状态",align:"center",width:"88"},{default:e.withCtx(({row:o})=>[o.status=="DRAFT"?(e.openBlock(),e.createBlock(c,{key:0,type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("草稿")]),_:1})):e.createCommentVNode("",!0),o.status=="PUBLISH"?(e.openBlock(),e.createBlock(c,{key:1,type:"success"},{default:e.withCtx(()=>[e.createTextVNode("已发布")]),_:1})):e.createCommentVNode("",!0),o.status=="OFF_SHELF"?(e.openBlock(),e.createBlock(c,{key:2,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("已下架")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(l,{align:"center",width:"90"},{default:e.withCtx(({row:o})=>[["DRAFT","OFF_SHELF"].indexOf(o.status)>=0&&r.$hasPer("BANNER_PUBLISH")?(e.openBlock(),e.createBlock(B,{key:0,onConfirm:S=>k(o.id),title:`确定要${o.status=="DRAFT"?"发布":"上架"}该Banner吗?`},{reference:e.withCtx(()=>[e.createVNode(m,{type:"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.status=="DRAFT"?"发布":"上架"),1)]),_:2},1024)]),_:2},1032,["onConfirm","title"])):e.createCommentVNode("",!0),o.status=="PUBLISH"&&r.$hasPer("BANNER_OFF_SHELF")?(e.openBlock(),e.createBlock(B,{key:1,onConfirm:S=>y(o.id),title:"确定要[下架]该Banner吗?"},{reference:e.withCtx(()=>[e.createVNode(m,{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:w,onSuccess:n},null,512)],64)}}}),z=e.defineComponent({__name:"EntranceDialog",emits:["success"],setup(U,{expose:i,emit:s}){const p=e.ref(!1),a=e.ref({sceneCode:null,name:null,iconType:"NAME",icon:null,targetPath:null,clickEventType:"",params:null,shelfTimeArr:[]}),C=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:"请选择点击事件类型"}]}),V=e.ref(!1),n=e.inject("http"),k=e.ref();function y(){var r;(r=k.value)==null||r.validate(t=>{if(t){V.value=!0;let d=`/api/app/entrance/${_.value??""}/${_.value?"update":"create"}`,f={...a.value};f.shelfTime=null,f.offShelfTime=null,a.value.shelfTimeArr.length&&(f.shelfTime=a.value.shelfTimeArr[0],f.offShelfTime=a.value.shelfTimeArr[1]),n==null||n.post(d,f).then(m=>{var g;s("success"),(g=k.value)==null||g.resetFields(),p.value=!1}).finally(()=>{V.value=!1})}})}const u=e.ref([]),_=e.ref(null);function w(r,t){u.value=r,_.value=null,p.value=!0,e.nextTick(()=>{t&&(_.value=t.id,Object.assign(a.value,t),t.shelfTime&&t.offShelfTime&&(a.value.shelfTimeArr=[new Date(t.shelfTime),new Date(t.offShelfTime)]))})}function x(){var r;(r=k.value)==null||r.resetFields()}return i({show:w}),(r,t)=>{const d=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),m=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-input"),T=e.resolveComponent("pg-upload"),l=e.resolveComponent("el-collapse-transition"),E=e.resolveComponent("el-date-picker"),h=e.resolveComponent("el-form"),N=e.resolveComponent("el-button"),A=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(A,{modelValue:p.value,"onUpdate:modelValue":t[9]||(t[9]=c=>p.value=c),width:"400",onClose:x},{footer:e.withCtx(()=>[e.createVNode(N,{type:"primary",disabled:V.value,loading:V.value,onClick:y},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1},8,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(h,{ref_key:"form",ref:k,rules:C.value,model:a.value,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(m,{label:"场景代码",prop:"sceneCode"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=c=>a.value.sceneCode=c),placeholder:"请输入/选择场景代码","allow-create":"",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,c=>(e.openBlock(),e.createBlock(d,{key:c,value:c,label:c},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(m,{label:"入口名称",prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{placeholder:"请输入入口名称",modelValue:a.value.name,"onUpdate:modelValue":t[1]||(t[1]=c=>a.value.name=c)},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"图标类型",prop:"iconType"},{default:e.withCtx(()=>[e.createVNode(f,{placeholder:"请选择图标类型",modelValue:a.value.iconType,"onUpdate:modelValue":t[2]||(t[2]=c=>a.value.iconType=c)},{default:e.withCtx(()=>[e.createVNode(d,{value:"NAME",label:"图标名称"}),e.createVNode(d,{value:"URL",label:"图标URL"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(m,{label:"图标",prop:"icon"},{default:e.withCtx(()=>[a.value.iconType=="URL"?(e.openBlock(),e.createBlock(T,{accept:"jpg,jpeg,png,gif",modelValue:a.value.icon,"onUpdate:modelValue":t[3]||(t[3]=c=>a.value.icon=c),key:`img_${_.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]=c=>a.value.icon=c),placeholder:"请输入图标名称",clearable:""},null,8,["modelValue"]))]),_:1}),e.createVNode(m,{label:"点击事件类型",prop:"clickEventType"},{default:e.withCtx(()=>[e.createVNode(f,{placeholder:"请选择点击事件类型",modelValue:a.value.clickEventType,"onUpdate:modelValue":t[5]||(t[5]=c=>a.value.clickEventType=c)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(O),(c,B)=>(e.openBlock(),e.createBlock(d,{value:B,label:c.name},null,8,["value","label"]))),256))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(l,null,{default:e.withCtx(()=>[["OPEN_WEB","OPEN_VIEW","API_REQUEST"].indexOf(a.value.clickEventType)>=0?(e.openBlock(),e.createBlock(m,{key:0,label:"目标地址",prop:"targetPath"},{default:e.withCtx(()=>[e.createVNode(g,{placeholder:"请输入目标地址",modelValue:a.value.targetPath,"onUpdate:modelValue":t[6]||(t[6]=c=>a.value.targetPath=c)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(m,{label:"目标地址参数",prop:"params"},{default:e.withCtx(()=>[e.createVNode(g,{type:"textarea",modelValue:a.value.params,"onUpdate:modelValue":t[7]||(t[7]=c=>a.value.params=c),placeholder:"请输入JSON格式的参数对象"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"生效时段",prop:"shelfTimeArr"},{default:e.withCtx(()=>[e.createVNode(E,{type:"datetimerange",modelValue:a.value.shelfTimeArr,"onUpdate:modelValue":t[8]||(t[8]=c=>a.value.shelfTimeArr=c),"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(U){const i=e.inject("http"),s=e.ref({sceneCode:null,status:null}),p=e.ref([]);function a(){i==null||i.get("/api/app/entrance/all-scene-code").then(r=>{p.value=r.data})}const C=e.ref(),V=e.ref(!1);function n(){V.value=!!s.value.sceneCode,C.value.search()}function k(r){i==null||i.post(`/api/app/entrance/${r}/publish`).then(t=>{n()})}function y(r){i==null||i.post(`/api/app/entrance/${r}/off-shelf`).then(t=>{n()})}function u(r,t){i==null||i.post(`/api/app/entrance/${r}/move-up`).then(d=>{s.value.sceneCode=t,n()})}function _(r,t){i==null||i.post(`/api/app/entrance/${r}/move-down`).then(d=>{s.value.sceneCode=t,n()})}e.onBeforeMount(()=>{a()});const w=e.ref();function x(r){w.value.show(p.value,r)}return(r,t)=>{const d=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),m=e.resolveComponent("el-button"),g=e.resolveComponent("el-space"),T=e.resolveComponent("el-card"),l=e.resolveComponent("el-table-column"),E=e.resolveComponent("el-image"),h=e.resolveComponent("el-descriptions-item"),N=e.resolveComponent("el-descriptions"),A=e.resolveComponent("el-popover"),c=e.resolveComponent("el-tag"),B=e.resolveComponent("el-popconfirm"),D=e.resolveComponent("pg-table"),F=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(T,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(f,{modelValue:s.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=o=>s.value.sceneCode=o),placeholder:"场景代码",clearable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,S)=>(e.openBlock(),e.createBlock(d,{label:o,value:o,key:`sc_con_${S}`},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(f,{modelValue:s.value.status,"onUpdate:modelValue":t[1]||(t[1]=o=>s.value.status=o),placeholder:"状态",clearable:"",style:{width:"150px"}},{default:e.withCtx(()=>[e.createVNode(d,{label:"草稿",value:"DRAFT"}),e.createVNode(d,{label:"已发布",value:"PUBLISH"}),e.createVNode(d,{label:"已下架",value:"OFF_SHELF"})]),_:1},8,["modelValue"]),e.createVNode(m,{type:"primary",icon:"search",onClick:n},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(m,{icon:"plus",onClick:t[2]||(t[2]=o=>x())},{default:e.withCtx(()=>[e.createTextVNode("创建入口")]),_:1})),[[F,"CREATE_ENTRANCE"]])]),_:1})]),_:1}),e.createVNode(D,{ref_key:"table",ref:C,"data-url":"/api/app/entrance/page",onRowDbClick:t[3]||(t[3]=o=>r.$hasPer("UPDATE_ENTRANCE")?x(o):null),condition:s.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[V.value&&r.$hasPer("ENTRANCE_SEQ_MOVE_UP_DOWN")?(e.openBlock(),e.createBlock(l,{key:0,align:"center",width:"80"},{default:e.withCtx(({row:o})=>[e.createVNode(g,{direction:"vertical"},{default:e.withCtx(()=>[e.createVNode(m,{icon:"ArrowUpBold",onClick:S=>u(o.id,o.sceneCode)},null,8,["onClick"]),e.createVNode(m,{icon:"ArrowDownBold",onClick:S=>_(o.id,o.sceneCode)},null,8,["onClick"])]),_:2},1024)]),_:1})):e.createCommentVNode("",!0),e.createVNode(l,{label:"场景代码",prop:"sceneCode",width:"150"}),e.createVNode(l,{label:"图标",width:"200",align:"center"},{default:e.withCtx(({row:o})=>[o.iconType=="URL"?(e.openBlock(),e.createBlock(E,{key:0,src:o.icon,style:{"max-width":"200px"},"preview-src-list":[o.icon],"preview-teleported":""},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.icon),1)],64))]),_:1}),e.createVNode(l,{label:"点击事件类型",prop:"clickEventType",width:"120"},{default:e.withCtx(({row:o})=>[e.createTextVNode(e.toDisplayString(o.clickEventType?e.unref(O)[o.clickEventType].name:""),1)]),_:1}),e.createVNode(l,{label:"目标地址",prop:"targetPath","show-overflow-tooltip":""}),e.createVNode(l,{label:"目标参数",width:"120","show-overflow-tooltip":""},{default:e.withCtx(({row:o})=>[o.params?(e.openBlock(),e.createBlock(A,{key:0,trigger:"hover",width:"350"},{reference:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.params.substring(0,100))+e.toDisplayString(o.params.length>100?"...":""),1)]),default:e.withCtx(()=>[o.params.startsWith("{")?(e.openBlock(),e.createBlock(N,{key:0,column:"1",border:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(JSON.parse(o.params),(S,R)=>(e.openBlock(),e.createBlock(h,{label:R,"min-width":"150"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S),1)]),_:2},1032,["label"]))),256))]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.params),1)],64))]),_:2},1024)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(l,{label:"上架时间",prop:"shelfTime",width:"180",align:"center"}),e.createVNode(l,{label:"下架时间",prop:"offShelfTime",width:"180",align:"center"}),e.createVNode(l,{label:"状态",align:"center",width:"88"},{default:e.withCtx(({row:o})=>[o.status=="DRAFT"?(e.openBlock(),e.createBlock(c,{key:0,type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("草稿")]),_:1})):e.createCommentVNode("",!0),o.status=="PUBLISH"?(e.openBlock(),e.createBlock(c,{key:1,type:"success"},{default:e.withCtx(()=>[e.createTextVNode("已发布")]),_:1})):e.createCommentVNode("",!0),o.status=="OFF_SHELF"?(e.openBlock(),e.createBlock(c,{key:2,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("已下架")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(l,{align:"center",width:"90"},{default:e.withCtx(({row:o})=>[["DRAFT","OFF_SHELF"].indexOf(o.status)>=0&&r.$hasPer("ENTRANCE_PUBLISH")?(e.openBlock(),e.createBlock(B,{key:0,onConfirm:S=>k(o.id),title:`确定要${o.status=="DRAFT"?"发布":"上架"}该入口吗?`},{reference:e.withCtx(()=>[e.createVNode(m,{type:"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.status=="DRAFT"?"发布":"上架"),1)]),_:2},1024)]),_:2},1032,["onConfirm","title"])):e.createCommentVNode("",!0),o.status=="PUBLISH"&&r.$hasPer("ENTRANCE_OFF_SHELF")?(e.openBlock(),e.createBlock(B,{key:1,onConfirm:S=>y(o.id),title:"确定要[下架]该入口吗?"},{reference:e.withCtx(()=>[e.createVNode(m,{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:w,onSuccess:n},null,512)],64)}}}),P=M.defineStore("pg-app-util-core-config-store",()=>{const U=[];return{defaultTesterUserIds:e.computed(()=>U)}}),_e="",G=(U,i)=>{const s=U.__vccOpts||U;for(const[p,a]of i)s[p]=a;return s},X={class:"dialog-footer"},Y=G({__name:"VersionDialog",emits:["success"],setup(U,{expose:i,emit:s}){const p=e.inject("http"),a=e.ref("CREATE"),C=e.computed(()=>a.value==="EDIT"),V=e.ref(!1),n=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:""}),k=e.ref(),y=P();e.onMounted(()=>{y.defaultTesterUserIds.length&&(n.value.testerIdJsonStr=y.defaultTesterUserIds.join(","))});let u=null;const _=e.ref(!1);async function w(h){V.value=!0,a.value=h?"EDIT":"CREATE",u=h,h&&(_.value=h.status=="RELEASE",console.log(h.status),Object.assign(n.value,h),h.testerIdJsonStr&&(n.value.testerIdJsonStr=JSON.parse(h.testerIdJsonStr).join(",")),k.value=h.isHot?h.wgtUrl:h.pkgUrl),await E(),h&&m(h.appCode)}function x(h){n.value.isHot?n.value.wgtUrl=h.fileUrl:n.value.pkgUrl=h.fileUrl}function r(){n.value={appCode:null,platform:"ANDROID",versionName:null,category:"SELF",isForce:!1,isHot:!0,activationTime:null,pkgUrl:null,wgtUrl:null,testerIdJsonStr:""}}function t(){V.value=!V.value}const d=e.ref();function f(){d.value.validate(h=>{h&&(C.value?p.post(`/api/app/version/${u.id}`,{...n.value,testerIdJsonStr:n.value.testerIdJsonStr?JSON.stringify(JSON.parse("["+n.value.testerIdJsonStr+"]")):null}).then(N=>{t(),s("success")}):p.post("/api/app/version",{...n.value,testerIdJsonStr:n.value.testerIdJsonStr?JSON.stringify(JSON.parse("["+n.value.testerIdJsonStr+"]")):null}).then(N=>{t(),s("success")}))})}function m(h){l.value.find(A=>A.code===h).platform=="IOS"?n.value.platform="IOS":n.value.platform="ANDROID"}const g=e.ref();function T(){n.value.wgtUrl=null,n.value.pkgUrl=null,g.value&&g.value.clearFileList()}const l=e.ref([]);async function E(){if(l.value.length<=0){const h=await p.get("/api/app/all");l.value=h.data}}return i({show:w}),(h,N)=>{const A=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),B=e.resolveComponent("el-form-item"),D=e.resolveComponent("el-col"),F=e.resolveComponent("el-row"),o=e.resolveComponent("el-input"),S=e.resolveComponent("el-date-picker"),R=e.resolveComponent("el-checkbox"),pe=e.resolveComponent("pg-upload"),me=e.resolveComponent("el-form"),J=e.resolveComponent("el-button"),fe=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(fe,{title:e.unref(C)?"编辑App版本":"发布App版本",modelValue:V.value,"onUpdate:modelValue":N[10]||(N[10]=b=>V.value=b),width:"700px",onClosed:r},{footer:e.withCtx(()=>[e.createElementVNode("div",X,[e.createVNode(J,{onClick:t},{default:e.withCtx(()=>[e.createTextVNode("取 消")]),_:1}),e.createVNode(J,{type:"primary",onClick:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(C)?"提 交":"创 建"),1)]),_:1})])]),default:e.withCtx(()=>[e.createVNode(me,{model:n.value,ref_key:"publishModalForm",ref:d},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode(D,{span:24},{default:e.withCtx(()=>[e.createVNode(B,{label:"应用","label-width":"100px",prop:"appCode",rules:[{required:!0,message:"请选择应用",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:n.value.appCode,"onUpdate:modelValue":N[0]||(N[0]=b=>n.value.appCode=b),disabled:e.unref(C)&&_.value,placeholder:"请选择要发布的平台",style:{width:"100%"},onChange:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,b=>(e.openBlock(),e.createBlock(A,{key:b.code,label:b.name,value:b.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode(D,{span:12},{default:e.withCtx(()=>[e.createVNode(B,{label:"版本名称","label-width":"100px",prop:"versionName",rules:[{required:!0,message:"请输入版本名称",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:n.value.versionName,"onUpdate:modelValue":N[1]||(N[1]=b=>n.value.versionName=b),disabled:e.unref(C)&&_.value,placeholder:"例: 1.1.2"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e.createVNode(D,{span:12},{default:e.withCtx(()=>[e.createVNode(B,{label:"版本编号","label-width":"100px",prop:"versionNumber",rules:[{required:!0,message:"请输入版本编号",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:n.value.versionNumber,"onUpdate:modelValue":N[2]||(N[2]=b=>n.value.versionNumber=b),disabled:e.unref(C)&&_.value,type:"number",min:"1",placeholder:"例: 112"},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode(D,{span:12},{default:e.withCtx(()=>[e.createVNode(B,{label:"启用时间","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:n.value.activationTime,"onUpdate:modelValue":N[3]||(N[3]=b=>n.value.activationTime=b),type:"datetime",placeholder:"选择启用时间",disabled:e.unref(C)&&_.value},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode(D,{span:12},{default:e.withCtx(()=>[e.createVNode(B,{label:"是否热更新","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:n.value.isHot,"onUpdate:modelValue":N[4]||(N[4]=b=>n.value.isHot=b),onChange:T,disabled:e.unref(C)&&_.value},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e.createVNode(D,{span:12},{default:e.withCtx(()=>[e.createVNode(B,{label:"是否强制","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:n.value.isForce,"onUpdate:modelValue":N[5]||(N[5]=b=>n.value.isForce=b),placeholder:"请选择是否强制",disabled:e.unref(C)&&_.value},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),n.value.category=="APP_STORE"?(e.openBlock(),e.createBlock(F,{key:0},{default:e.withCtx(()=>[e.createVNode(D,{span:24},{default:e.withCtx(()=>[e.createVNode(B,{label:"市场地址","label-width":"100px",prop:"pkgUrl",rules:[{required:!0,message:"应用市场地址",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:n.value.pkgUrl,"onUpdate:modelValue":N[6]||(N[6]=b=>n.value.pkgUrl=b),placeholder:"应用市场地址"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode(D,{span:24},{default:e.withCtx(()=>[e.createVNode(B,{label:"版本描述","label-width":"100px",prop:"description",rules:[{required:!0,message:"请输入版本描述",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(o,{type:"textarea",modelValue:n.value.description,"onUpdate:modelValue":N[7]||(N[7]=b=>n.value.description=b),autosize:{minRows:4},placeholder:"请输入版本描述"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.unref(C)&&_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F,{key:1},{default:e.withCtx(()=>[e.createVNode(D,{span:24},{default:e.withCtx(()=>[e.createVNode(B,{label:"测试用户","label-width":"100px",prop:"testerIdJsonStr"},{default:e.withCtx(()=>[e.createVNode(o,{type:"textarea",modelValue:n.value.testerIdJsonStr,"onUpdate:modelValue":N[8]||(N[8]=b=>n.value.testerIdJsonStr=b),autosize:{minRows:4},placeholder:"请输入测试用户ID。 例子: 10000, 100202, 100203"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})),n.value.platform=="ANDROID"||n.value.platform=="IOS"&&n.value.isHot?(e.openBlock(),e.createBlock(F,{key:2},{default:e.withCtx(()=>[e.createVNode(D,{span:24},{default:e.withCtx(()=>[e.createVNode(B,{label:n.value.isHot?"上传更新包":"上传安装包","label-width":"100px",rules:[{required:!0,message:"请上传更新包",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(pe,{ref_key:"appPkgUploader",ref:g,modelValue:k.value,"onUpdate:modelValue":N[9]||(N[9]=b=>k.value=b),drag:!0,multiple:!1,tips:"热更新下只能上传wgt格式的文件,非热更新下只能上传apk格式的文件",autoUpload:!0,uploadType:"appPkg",accept:n.value.isHot?".wgt":"application/vnd.android.package-archive",disabled:e.unref(C)&&_.value,onOnSuccess:x},null,8,["modelValue","accept","disabled"])]),_:1},8,["label"])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["title","modelValue"])}}},[["__scopeId","data-v-02170750"]]),K={__name:"VersionListView",setup(U){const i=e.ref({platform:null,isHot:null,status:null}),s=e.inject("http"),p=e.ref();function a(){p.value.search()}const C=e.ref();function V(y){C.value.show(y)}async function n(y){await s.post(`/api/app/version/${y}/publish`),a(),L.ElMessage.success("发布成功")}async function k(y){await s.post(`/api/app/version/${y}/offline`),a(),L.ElMessage.success("下架成功")}return(y,u)=>{const _=e.resolveComponent("el-option"),w=e.resolveComponent("el-select"),x=e.resolveComponent("el-button"),r=e.resolveComponent("el-space"),t=e.resolveComponent("el-card"),d=e.resolveComponent("el-table-column"),f=e.resolveComponent("el-tag"),m=e.resolveComponent("el-popconfirm"),g=e.resolveComponent("pg-table"),T=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(w,{modelValue:i.value.isHot,"onUpdate:modelValue":u[0]||(u[0]=l=>i.value.isHot=l),placeholder:"热更新/整包更新",style:{width:"180px"},clearable:""},{default:e.withCtx(()=>[e.createVNode(_,{label:"热更新",value:"true"}),e.createVNode(_,{label:"整包更新",value:"false"})]),_:1},8,["modelValue"]),e.createVNode(w,{modelValue:i.value.status,"onUpdate:modelValue":u[1]||(u[1]=l=>i.value.status=l),placeholder:"状态",style:{width:"120px"},clearable:""},{default:e.withCtx(()=>[e.createVNode(_,{label:"测试",value:"TEST"}),e.createVNode(_,{label:"发布",value:"RELEASE"}),e.createVNode(_,{label:"下架",value:"OFFLINE"})]),_:1},8,["modelValue"]),e.createVNode(x,{type:"primary",icon:"search",onClick:a},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(x,{icon:"plus",onClick:u[2]||(u[2]=l=>V())},{default:e.withCtx(()=>[e.createTextVNode("新建版本")]),_:1})),[[T,"CREATE_BANNER"]])]),_:1})]),_:1}),e.createVNode(g,{ref_key:"table",ref:p,"data-url":"/api/app/version/page-search",onRowDbClick:u[3]||(u[3]=l=>V(l)),condition:i.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[e.createVNode(d,{label:"ID",prop:"id",align:"center",width:"60px"}),e.createVNode(d,{label:"应用",prop:"appName",align:"center",width:"120px","show-overflow-tooltip":""}),e.createVNode(d,{label:"应用平台",prop:"appPlatform",align:"center",width:"100px","show-overflow-tooltip":""}),e.createVNode(d,{label:"版本名称",prop:"versionName",align:"center",width:"90","show-overflow-tooltip":""}),e.createVNode(d,{label:"版本编号",prop:"versionNumber",align:"center",width:"90","show-overflow-tooltip":""}),e.createVNode(d,{label:"强制更新",prop:"isForce",align:"center",width:"90","show-overflow-tooltip":""},{default:e.withCtx(({row:l})=>[l.isForce?(e.openBlock(),e.createBlock(f,{key:0,type:"warning",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("是")]),_:1})):(e.openBlock(),e.createBlock(f,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("否")]),_:1}))]),_:1}),e.createVNode(d,{label:"整包更新",prop:"isHot",align:"center",width:"90","show-overflow-tooltip":""},{default:e.withCtx(({row:l})=>[l.isHot?(e.openBlock(),e.createBlock(f,{key:0,type:"warning",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("否")]),_:1})):(e.openBlock(),e.createBlock(f,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("是")]),_:1}))]),_:1}),e.createVNode(d,{label:"启用时间",width:"150px",prop:"activationTime",align:"center","show-overflow-tooltip":""}),e.createVNode(d,{label:"状态",width:"100",align:"center"},{default:e.withCtx(({row:l})=>[e.createVNode(f,{type:l.status=="RELEASE"?"success":l.status=="OFFLINE"?"danger":"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.status=="RELEASE"?"发布":l.status=="OFFLINE"?"下线":"测试"),1)]),_:2},1032,["type"])]),_:1}),e.createVNode(d,{label:"安装包/更新包地址",prop:"pkgUrl",align:"center","show-overflow-tooltip":""},{default:e.withCtx(({row:l})=>[e.createTextVNode(e.toDisplayString(l.isHot?l.wgtUrl:l.pkgUrl),1)]),_:1}),e.createVNode(d,{label:"操作",align:"center",width:"160px"},{default:e.withCtx(({row:l})=>[l.status=="RELEASE"?(e.openBlock(),e.createBlock(m,{key:0,title:`确定下架版本[${l.versionName}]吗?`,onConfirm:E=>k(l.id)},{reference:e.withCtx(()=>[e.createVNode(x,{type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("下架")]),_:1})]),_:2},1032,["title","onConfirm"])):e.createCommentVNode("",!0),l.status=="TEST"||l.status=="OFFLINE"?(e.openBlock(),e.createBlock(m,{key:1,title:"是否确定发布该版本?",onConfirm:E=>n(l.id)},{reference:e.withCtx(()=>[e.createVNode(x,{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:C,onSuccess:a},null,512)],64)}}},Z={style:{display:"flex","flex-direction":"column"}},v={style:{display:"flex",gap:"5px","margin-top":"10px"}},ee={__name:"FeedbackDialog",emits:["success"],setup(U,{expose:i,emit:s}){const p=e.inject("http"),a=e.ref(!1),C=e.ref(null),V=e.ref({replyContent:null}),n={replyContent:{required:!0,message:"请输入回复内容"}};function k(w){C.value=w,V.value.replyContent=w.replyContent,a.value=!0}const y=e.ref();function u(){var w;(w=y.value)==null||w.validate(x=>{x&&p.post(`/api/feedback/${C.value.id}/reply`,{content:V.value.replyContent}).then(r=>{var t;s("success"),(t=y.value)==null||t.resetFields(),a.value=!1})})}function _(){V.value.replyContent=null}return i({show:k}),(w,x)=>{const r=e.resolveComponent("el-image"),t=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-input"),f=e.resolveComponent("el-form"),m=e.resolveComponent("el-button"),g=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(g,{title:"回复",modelValue:a.value,"onUpdate:modelValue":x[1]||(x[1]=T=>a.value=T),width:"400",onClose:_},{footer:e.withCtx(()=>[e.createVNode(m,{type:"primary",disabled:w.handling,loading:w.handling,onClick:u},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1},8,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(f,{ref_key:"form",ref:y,rules:n,model:V.value,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(t,{label:"反馈内容"},{default:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createTextVNode(e.toDisplayString(C.value.content)+" ",1),e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.images,(T,l)=>(e.openBlock(),e.createBlock(r,{key:l,src:T,"preview-teleported":"","preview-src-list":C.value.images,style:{width:"80px"}},null,8,["src","preview-src-list"]))),128))])])]),_:1}),e.createVNode(t,{label:"回复内容",prop:"replyContent"},{default:e.withCtx(()=>[e.createVNode(d,{type:"textarea",modelValue:V.value.replyContent,"onUpdate:modelValue":x[0]||(x[0]=T=>V.value.replyContent=T),placeholder:"请输入要回复的内容"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},te=e.createElementVNode("br",null,null,-1),le=e.createElementVNode("br",null,null,-1),oe=e.createElementVNode("br",null,null,-1),ae=e.createElementVNode("br",null,null,-1),ne={style:{display:"flex","flex-direction":"column"}},re={style:{display:"flex",gap:"3px","margin-top":"5px"}},ie=e.createElementVNode("br",null,null,-1),ce={__name:"FeedbackListView",setup(U){const i={WAITING_REPLY:{label:"待回复",tagType:"warning"},COMPLETED:{label:"已完成",tagType:"success"}},s=e.ref({userId:null,status:null}),p=e.ref();function a(){p.value.search()}const C=e.ref();function V(n){C.value.show(n)}return(n,k)=>{const y=e.resolveComponent("pg-user-selector"),u=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),w=e.resolveComponent("el-button"),x=e.resolveComponent("el-space"),r=e.resolveComponent("el-card"),t=e.resolveComponent("el-table-column"),d=e.resolveComponent("el-avatar"),f=e.resolveComponent("el-link"),m=e.resolveComponent("el-image"),g=e.resolveComponent("el-tag"),T=e.resolveComponent("pg-table");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(r,null,{default:e.withCtx(()=>[e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(y,{modelValue:s.value.userId,"onUpdate:modelValue":k[0]||(k[0]=l=>s.value.userId=l),placeholder:"搜索用户",clearable:"",style:{width:"250px"}},null,8,["modelValue"]),e.createVNode(_,{modelValue:s.value.status,"onUpdate:modelValue":k[1]||(k[1]=l=>s.value.status=l),placeholder:"状态",style:{width:"100px"},clearable:""},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(l,E)=>e.createVNode(u,{label:l.name,value:E},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.name),1)]),_:2},1032,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(w,{type:"primary",icon:"search",onClick:a},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createVNode(T,{ref_key:"table",ref:p,style:{"margin-top":"10px"},"data-url":"/api/feedback/page-search",condition:s.value},{default:e.withCtx(()=>[e.createVNode(t,{label:"ID",prop:"id",width:"80",align:"center"}),e.createVNode(t,{label:"用户信息",width:"200"},{default:e.withCtx(({row:l})=>[e.createVNode(d,{src:l.avatar},null,8,["src"]),te,e.createTextVNode(" "+e.toDisplayString(l.nickname),1),le,e.createVNode(f,{type:"primary",onClick:E=>n.showUserDetail(l.userId)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.userId),1)]),_:2},1032,["onClick"])]),_:1}),e.createVNode(t,{label:"应用",width:"120"},{default:e.withCtx(({row:l})=>[e.createTextVNode(e.toDisplayString(l.appName),1),oe,e.createTextVNode(" "+e.toDisplayString(l.frontAppVersionName),1),ae,e.createTextVNode(" "+e.toDisplayString(l.frontAppVersionNumber),1)]),_:1}),e.createVNode(t,{label:"反馈内容",prop:"content"},{default:e.withCtx(({row:l})=>[e.createElementVNode("div",ne,[e.createTextVNode(e.toDisplayString(l.content)+" ",1),e.createElementVNode("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.images,(E,h)=>(e.openBlock(),e.createBlock(m,{key:h,src:E,style:{width:"80px"},"preview-teleported":"","preview-src-list":l.images},null,8,["src","preview-src-list"]))),128))])])]),_:1}),e.createVNode(t,{label:"状态",width:"100",align:"center"},{default:e.withCtx(({row:l})=>[e.createVNode(g,{type:i[l.status].tagType},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i[l.status].label),1)]),_:2},1032,["type"])]),_:1}),e.createVNode(t,{label:"回复内容",prop:"replyContent"}),e.createVNode(t,{label:"提交/回复时间",width:"180",align:"center"},{default:e.withCtx(({row:l})=>[e.createTextVNode(e.toDisplayString(l.createdTime),1),ie,e.createTextVNode(" "+e.toDisplayString(l.replyTime??"/"),1)]),_:1}),e.createVNode(t,{label:"操作",width:"120",align:"center"},{default:e.withCtx(({row:l})=>[e.createVNode(w,{onClick:E=>V(l),type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.status=="WAITING_REPLY"?"回复":"修改回复"),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["condition"]),e.createVNode(ee,{ref_key:"feedbackDialog",ref:C,onSuccess:a},null,512)],64)}}},se={install:(U,i)=>{let s=i.router,p=s.getRoutes().find(a=>a.path=="/");p&&p.meta&&(s.addRoute({path:"/app/banner",name:"AppBanner",redirect:"/app/banner/list",component:p.meta.commonLayout,children:[{path:"list",name:"BannerListView",component:W}]}),s.addRoute({path:"/app/entrance",name:"AppEntrance",redirect:"/app/entrance/list",component:p.meta.commonLayout,children:[{path:"list",name:"EntranceListView",component:Q}]}),s.addRoute({path:"/app/version",name:"AppVersion",redirect:"/app/version/list",component:p.meta.commonLayout,children:[{path:"list",name:"AppVersionListView",component:K}]}),s.addRoute({path:"/app/feedback",name:"Feedback",redirect:"/app/feedback/list",component:p.meta.commonLayout,children:[{path:"list",name:"FeedbackListView",component:ce}]}))}},H=(U,i)=>{q.forEach(p=>U.use(p)),U.use(se,i);const s=P();if(i.defaultTesterUserIds)for(let p of i.defaultTesterUserIds)s.defaultTesterUserIds.push(p)},de={install:H};I.default=de,I.install=H,Object.defineProperties(I,{__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,L,M){"use strict";const q=[],P={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:"自定义"}},j=e.defineComponent({__name:"BannerDialog",emits:["success"],setup(D,{expose:c,emit:d}){const f=e.ref(!1),o=e.ref({sceneCode:null,image:null,targetPath:null,clickEventType:"",params:null,shelfTimeArr:[]}),V=e.ref({sceneCode:[{required:!0,message:"请输入场景代码"}],image:[{required:!0,message:"请上传图片"}],targetPath:[{required:!0,message:"请输入目标地址"}],clickEventType:[{required:!0,message:"请选择点击事件类型"}]}),h=e.ref(!1),a=e.inject("http"),y=e.ref();function w(){var r;(r=y.value)==null||r.validate(t=>{if(t){h.value=!0;let p=`/api/app/banner/${C.value??""}/${C.value?"update":"create"}`,m={...o.value};m.shelfTime=null,m.offShelfTime=null,o.value.shelfTimeArr.length&&(m.shelfTime=o.value.shelfTimeArr[0],m.offShelfTime=o.value.shelfTimeArr[1]),a==null||a.post(p,m).then(_=>{var k;d("success"),(k=y.value)==null||k.resetFields(),f.value=!1}).finally(()=>{h.value=!1})}})}const g=e.ref([]),C=e.ref(null);function u(r,t){g.value=r,C.value=null,f.value=!0,e.nextTick(()=>{t&&(C.value=t.id,Object.assign(o.value,t),t.shelfTime&&t.offShelfTime&&(o.value.shelfTimeArr=[new Date(t.shelfTime),new Date(t.offShelfTime)]))})}function x(){var r;(r=y.value)==null||r.resetFields()}return c({show:u}),(r,t)=>{const p=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),_=e.resolveComponent("el-form-item"),k=e.resolveComponent("pg-upload"),T=e.resolveComponent("el-input"),i=e.resolveComponent("el-collapse-transition"),F=e.resolveComponent("el-date-picker"),N=e.resolveComponent("el-form"),n=e.resolveComponent("el-button"),E=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(E,{modelValue:f.value,"onUpdate:modelValue":t[6]||(t[6]=s=>f.value=s),width:"400",onClosed:x},{footer:e.withCtx(()=>[e.createVNode(n,{type:"primary",disabled:h.value,loading:h.value,onClick:w},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1},8,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(N,{ref_key:"form",ref:y,rules:V.value,model:o.value,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(_,{label:"场景代码",prop:"sceneCode"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:o.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=s=>o.value.sceneCode=s),placeholder:"请输入/选择场景代码","allow-create":"",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,s=>(e.openBlock(),e.createBlock(p,{key:s,value:s,label:s},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(_,{label:"图片",prop:"image"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(k,{accept:"jpg,jpeg,png",modelValue:o.value.image,"onUpdate:modelValue":t[1]||(t[1]=s=>o.value.image=s),key:`img_${C.value}`,"list-type":"picture-card","upload-type":"banner",limit:1},null,8,["modelValue"]))]),_:1}),e.createVNode(_,{label:"点击事件类型",prop:"clickEventType"},{default:e.withCtx(()=>[e.createVNode(m,{placeholder:"请选择点击事件类型",modelValue:o.value.clickEventType,"onUpdate:modelValue":t[2]||(t[2]=s=>o.value.clickEventType=s)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(P),(s,B)=>(e.openBlock(),e.createBlock(p,{value:B,label:s.name},null,8,["value","label"]))),256))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(i,null,{default:e.withCtx(()=>[["OPEN_WEB","OPEN_VIEW","API_REQUEST"].indexOf(o.value.clickEventType)>=0?(e.openBlock(),e.createBlock(_,{key:0,label:"目标地址",prop:"targetPath"},{default:e.withCtx(()=>[e.createVNode(T,{placeholder:"请输入目标地址",modelValue:o.value.targetPath,"onUpdate:modelValue":t[3]||(t[3]=s=>o.value.targetPath=s)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(_,{label:"目标地址参数",prop:"params"},{default:e.withCtx(()=>[e.createVNode(T,{type:"textarea",modelValue:o.value.params,"onUpdate:modelValue":t[4]||(t[4]=s=>o.value.params=s),placeholder:"请输入JSON格式的参数对象"},null,8,["modelValue"])]),_:1}),e.createVNode(_,{label:"生效时段",prop:"shelfTimeArr"},{default:e.withCtx(()=>[e.createVNode(F,{type:"datetimerange",modelValue:o.value.shelfTimeArr,"onUpdate:modelValue":t[5]||(t[5]=s=>o.value.shelfTimeArr=s),"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(D){const c=e.inject("http"),d=e.ref({sceneCode:null,status:null}),f=e.ref([]);function o(){c==null||c.get("/api/app/banner/all-scene-code").then(r=>{f.value=r.data})}const V=e.ref(),h=e.ref(!1);function a(){h.value=!!d.value.sceneCode,V.value.search()}function y(r){c==null||c.post(`/api/app/banner/${r}/publish`).then(t=>{a()})}function w(r){c==null||c.post(`/api/app/banner/${r}/off-shelf`).then(t=>{a()})}function g(r,t){c==null||c.post(`/api/app/banner/${r}/move-up`).then(p=>{d.value.sceneCode=t,a()})}function C(r,t){c==null||c.post(`/api/app/banner/${r}/move-down`).then(p=>{d.value.sceneCode=t,a()})}e.onBeforeMount(()=>{o()});const u=e.ref();function x(r){u.value.show(f.value,r)}return(r,t)=>{const p=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),_=e.resolveComponent("el-button"),k=e.resolveComponent("el-space"),T=e.resolveComponent("el-card"),i=e.resolveComponent("el-table-column"),F=e.resolveComponent("el-image"),N=e.resolveComponent("el-descriptions-item"),n=e.resolveComponent("el-descriptions"),E=e.resolveComponent("el-popover"),s=e.resolveComponent("el-tag"),B=e.resolveComponent("el-popconfirm"),U=e.resolveComponent("pg-table"),A=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(T,null,{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(m,{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(f.value,(l,S)=>(e.openBlock(),e.createBlock(p,{label:l,value:l,key:`sc_con_${S}`},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(m,{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(p,{label:"草稿",value:"DRAFT"}),e.createVNode(p,{label:"已发布",value:"PUBLISH"}),e.createVNode(p,{label:"已下架",value:"OFF_SHELF"})]),_:1},8,["modelValue"]),e.createVNode(_,{type:"primary",icon:"search",onClick:a},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(_,{icon:"plus",onClick:t[2]||(t[2]=l=>x())},{default:e.withCtx(()=>[e.createTextVNode("创建Banner")]),_:1})),[[A,"CREATE_BANNER"]])]),_:1})]),_:1}),e.createVNode(U,{ref_key:"table",ref:V,"data-url":"/api/app/banner/page",onRowDbClick:t[3]||(t[3]=l=>r.$hasPer("UPDATE_BANNER")?x(l):null),condition:d.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[h.value&&r.$hasPer("BANNER_SEQ_MOVE_UP_DOWN")?(e.openBlock(),e.createBlock(i,{key:0,align:"center",width:"80"},{default:e.withCtx(({row:l})=>[e.createVNode(k,{direction:"vertical"},{default:e.withCtx(()=>[e.createVNode(_,{icon:"ArrowUpBold",onClick:S=>g(l.id,l.sceneCode)},null,8,["onClick"]),e.createVNode(_,{icon:"ArrowDownBold",onClick:S=>C(l.id,l.sceneCode)},null,8,["onClick"])]),_:2},1024)]),_:1})):e.createCommentVNode("",!0),e.createVNode(i,{label:"场景代码",prop:"sceneCode",width:"150"}),e.createVNode(i,{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(i,{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(i,{label:"目标地址",prop:"targetPath","show-overflow-tooltip":""}),e.createVNode(i,{label:"目标参数",width:"120","show-overflow-tooltip":""},{default:e.withCtx(({row:l})=>[l.params?(e.openBlock(),e.createBlock(E,{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(n,{key:0,column:"1",border:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(JSON.parse(l.params),(S,R)=>(e.openBlock(),e.createBlock(N,{label:R,"min-width":"150"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S),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(i,{label:"上架时间",prop:"shelfTime",width:"180",align:"center"}),e.createVNode(i,{label:"下架时间",prop:"offShelfTime",width:"180",align:"center"}),e.createVNode(i,{label:"状态",align:"center",width:"88"},{default:e.withCtx(({row:l})=>[l.status=="DRAFT"?(e.openBlock(),e.createBlock(s,{key:0,type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("草稿")]),_:1})):e.createCommentVNode("",!0),l.status=="PUBLISH"?(e.openBlock(),e.createBlock(s,{key:1,type:"success"},{default:e.withCtx(()=>[e.createTextVNode("已发布")]),_:1})):e.createCommentVNode("",!0),l.status=="OFF_SHELF"?(e.openBlock(),e.createBlock(s,{key:2,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("已下架")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(i,{align:"center",width:"90"},{default:e.withCtx(({row:l})=>[["DRAFT","OFF_SHELF"].indexOf(l.status)>=0&&r.$hasPer("BANNER_PUBLISH")?(e.openBlock(),e.createBlock(B,{key:0,onConfirm:S=>y(l.id),title:`确定要${l.status=="DRAFT"?"发布":"上架"}该Banner吗?`},{reference:e.withCtx(()=>[e.createVNode(_,{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(B,{key:1,onConfirm:S=>w(l.id),title:"确定要[下架]该Banner吗?"},{reference:e.withCtx(()=>[e.createVNode(_,{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:u,onSuccess:a},null,512)],64)}}}),z=e.defineComponent({__name:"EntranceDialog",emits:["success"],setup(D,{expose:c,emit:d}){const f=e.ref(!1),o=e.ref({sceneCode:null,name:null,iconType:"NAME",icon:null,targetPath:null,clickEventType:"",params:null,shelfTimeArr:[]}),V=e.ref({sceneCode:[{required:!0,message:"请输入场景代码"}],name:[{required:!0,message:"请输入入口名称"}],iconType:[{required:!0,message:"请选择图标类型"}],icon:[{required:!0,message:`请${o.value.iconType=="NAME"?"输入图标名称":"上传图标图片"}`}],targetPath:[{required:!0,message:"请输入目标地址"}],clickEventType:[{required:!0,message:"请选择点击事件类型"}]}),h=e.ref(!1),a=e.inject("http"),y=e.ref();function w(){var r;(r=y.value)==null||r.validate(t=>{if(t){h.value=!0;let p=`/api/app/entrance/${C.value??""}/${C.value?"update":"create"}`,m={...o.value};m.shelfTime=null,m.offShelfTime=null,o.value.shelfTimeArr.length&&(m.shelfTime=o.value.shelfTimeArr[0],m.offShelfTime=o.value.shelfTimeArr[1]),a==null||a.post(p,m).then(_=>{var k;d("success"),(k=y.value)==null||k.resetFields(),f.value=!1}).finally(()=>{h.value=!1})}})}const g=e.ref([]),C=e.ref(null);function u(r,t){g.value=r,C.value=null,f.value=!0,e.nextTick(()=>{t&&(C.value=t.id,Object.assign(o.value,t),t.shelfTime&&t.offShelfTime&&(o.value.shelfTimeArr=[new Date(t.shelfTime),new Date(t.offShelfTime)]))})}function x(){var r;(r=y.value)==null||r.resetFields()}return c({show:u}),(r,t)=>{const p=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),_=e.resolveComponent("el-form-item"),k=e.resolveComponent("el-input"),T=e.resolveComponent("pg-upload"),i=e.resolveComponent("el-collapse-transition"),F=e.resolveComponent("el-date-picker"),N=e.resolveComponent("el-form"),n=e.resolveComponent("el-button"),E=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(E,{modelValue:f.value,"onUpdate:modelValue":t[9]||(t[9]=s=>f.value=s),width:"400",onClose:x},{footer:e.withCtx(()=>[e.createVNode(n,{type:"primary",disabled:h.value,loading:h.value,onClick:w},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1},8,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(N,{ref_key:"form",ref:y,rules:V.value,model:o.value,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(_,{label:"场景代码",prop:"sceneCode"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:o.value.sceneCode,"onUpdate:modelValue":t[0]||(t[0]=s=>o.value.sceneCode=s),placeholder:"请输入/选择场景代码","allow-create":"",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,s=>(e.openBlock(),e.createBlock(p,{key:s,value:s,label:s},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(_,{label:"入口名称",prop:"name"},{default:e.withCtx(()=>[e.createVNode(k,{placeholder:"请输入入口名称",modelValue:o.value.name,"onUpdate:modelValue":t[1]||(t[1]=s=>o.value.name=s)},null,8,["modelValue"])]),_:1}),e.createVNode(_,{label:"图标类型",prop:"iconType"},{default:e.withCtx(()=>[e.createVNode(m,{placeholder:"请选择图标类型",modelValue:o.value.iconType,"onUpdate:modelValue":t[2]||(t[2]=s=>o.value.iconType=s)},{default:e.withCtx(()=>[e.createVNode(p,{value:"NAME",label:"图标名称"}),e.createVNode(p,{value:"URL",label:"图标URL"})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(_,{label:"图标",prop:"icon"},{default:e.withCtx(()=>[o.value.iconType=="URL"?(e.openBlock(),e.createBlock(T,{accept:"jpg,jpeg,png,gif",modelValue:o.value.icon,"onUpdate:modelValue":t[3]||(t[3]=s=>o.value.icon=s),key:`img_${C.value}`,"list-type":"picture-card","upload-type":"entrance",limit:1},null,8,["modelValue"])):(e.openBlock(),e.createBlock(k,{key:1,modelValue:o.value.icon,"onUpdate:modelValue":t[4]||(t[4]=s=>o.value.icon=s),placeholder:"请输入图标名称",clearable:""},null,8,["modelValue"]))]),_:1}),e.createVNode(_,{label:"点击事件类型",prop:"clickEventType"},{default:e.withCtx(()=>[e.createVNode(m,{placeholder:"请选择点击事件类型",modelValue:o.value.clickEventType,"onUpdate:modelValue":t[5]||(t[5]=s=>o.value.clickEventType=s)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref($),(s,B)=>(e.openBlock(),e.createBlock(p,{value:B,label:s.name},null,8,["value","label"]))),256))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(i,null,{default:e.withCtx(()=>[["OPEN_WEB","OPEN_VIEW","API_REQUEST"].indexOf(o.value.clickEventType)>=0?(e.openBlock(),e.createBlock(_,{key:0,label:"目标地址",prop:"targetPath"},{default:e.withCtx(()=>[e.createVNode(k,{placeholder:"请输入目标地址",modelValue:o.value.targetPath,"onUpdate:modelValue":t[6]||(t[6]=s=>o.value.targetPath=s)},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(_,{label:"目标地址参数",prop:"params"},{default:e.withCtx(()=>[e.createVNode(k,{type:"textarea",modelValue:o.value.params,"onUpdate:modelValue":t[7]||(t[7]=s=>o.value.params=s),placeholder:"请输入JSON格式的参数对象"},null,8,["modelValue"])]),_:1}),e.createVNode(_,{label:"生效时段",prop:"shelfTimeArr"},{default:e.withCtx(()=>[e.createVNode(F,{type:"datetimerange",modelValue:o.value.shelfTimeArr,"onUpdate:modelValue":t[8]||(t[8]=s=>o.value.shelfTimeArr=s),"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(D){const c=e.inject("http"),d=e.ref({sceneCode:null,status:null}),f=e.ref([]);function o(){c==null||c.get("/api/app/entrance/all-scene-code").then(r=>{f.value=r.data})}const V=e.ref(),h=e.ref(!1);function a(){h.value=!!d.value.sceneCode,V.value.search()}function y(r){c==null||c.post(`/api/app/entrance/${r}/publish`).then(t=>{a()})}function w(r){c==null||c.post(`/api/app/entrance/${r}/off-shelf`).then(t=>{a()})}function g(r,t){c==null||c.post(`/api/app/entrance/${r}/move-up`).then(p=>{d.value.sceneCode=t,a()})}function C(r,t){c==null||c.post(`/api/app/entrance/${r}/move-down`).then(p=>{d.value.sceneCode=t,a()})}e.onBeforeMount(()=>{o()});const u=e.ref();function x(r){u.value.show(f.value,r)}return(r,t)=>{const p=e.resolveComponent("el-option"),m=e.resolveComponent("el-select"),_=e.resolveComponent("el-button"),k=e.resolveComponent("el-space"),T=e.resolveComponent("el-card"),i=e.resolveComponent("el-table-column"),F=e.resolveComponent("el-image"),N=e.resolveComponent("el-descriptions-item"),n=e.resolveComponent("el-descriptions"),E=e.resolveComponent("el-popover"),s=e.resolveComponent("el-tag"),B=e.resolveComponent("el-popconfirm"),U=e.resolveComponent("pg-table"),A=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(T,null,{default:e.withCtx(()=>[e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(m,{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(f.value,(l,S)=>(e.openBlock(),e.createBlock(p,{label:l,value:l,key:`sc_con_${S}`},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(m,{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(p,{label:"草稿",value:"DRAFT"}),e.createVNode(p,{label:"已发布",value:"PUBLISH"}),e.createVNode(p,{label:"已下架",value:"OFF_SHELF"})]),_:1},8,["modelValue"]),e.createVNode(_,{type:"primary",icon:"search",onClick:a},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(_,{icon:"plus",onClick:t[2]||(t[2]=l=>x())},{default:e.withCtx(()=>[e.createTextVNode("创建入口")]),_:1})),[[A,"CREATE_ENTRANCE"]])]),_:1})]),_:1}),e.createVNode(U,{ref_key:"table",ref:V,"data-url":"/api/app/entrance/page",onRowDbClick:t[3]||(t[3]=l=>r.$hasPer("UPDATE_ENTRANCE")?x(l):null),condition:d.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[h.value&&r.$hasPer("ENTRANCE_SEQ_MOVE_UP_DOWN")?(e.openBlock(),e.createBlock(i,{key:0,align:"center",width:"80"},{default:e.withCtx(({row:l})=>[e.createVNode(k,{direction:"vertical"},{default:e.withCtx(()=>[e.createVNode(_,{icon:"ArrowUpBold",onClick:S=>g(l.id,l.sceneCode)},null,8,["onClick"]),e.createVNode(_,{icon:"ArrowDownBold",onClick:S=>C(l.id,l.sceneCode)},null,8,["onClick"])]),_:2},1024)]),_:1})):e.createCommentVNode("",!0),e.createVNode(i,{label:"场景代码",prop:"sceneCode",width:"150"}),e.createVNode(i,{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(i,{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(i,{label:"目标地址",prop:"targetPath","show-overflow-tooltip":""}),e.createVNode(i,{label:"目标参数",width:"120","show-overflow-tooltip":""},{default:e.withCtx(({row:l})=>[l.params?(e.openBlock(),e.createBlock(E,{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(n,{key:0,column:"1",border:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(JSON.parse(l.params),(S,R)=>(e.openBlock(),e.createBlock(N,{label:R,"min-width":"150"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S),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(i,{label:"上架时间",prop:"shelfTime",width:"180",align:"center"}),e.createVNode(i,{label:"下架时间",prop:"offShelfTime",width:"180",align:"center"}),e.createVNode(i,{label:"状态",align:"center",width:"88"},{default:e.withCtx(({row:l})=>[l.status=="DRAFT"?(e.openBlock(),e.createBlock(s,{key:0,type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("草稿")]),_:1})):e.createCommentVNode("",!0),l.status=="PUBLISH"?(e.openBlock(),e.createBlock(s,{key:1,type:"success"},{default:e.withCtx(()=>[e.createTextVNode("已发布")]),_:1})):e.createCommentVNode("",!0),l.status=="OFF_SHELF"?(e.openBlock(),e.createBlock(s,{key:2,type:"warning"},{default:e.withCtx(()=>[e.createTextVNode("已下架")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(i,{align:"center",width:"90"},{default:e.withCtx(({row:l})=>[["DRAFT","OFF_SHELF"].indexOf(l.status)>=0&&r.$hasPer("ENTRANCE_PUBLISH")?(e.openBlock(),e.createBlock(B,{key:0,onConfirm:S=>y(l.id),title:`确定要${l.status=="DRAFT"?"发布":"上架"}该入口吗?`},{reference:e.withCtx(()=>[e.createVNode(_,{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(B,{key:1,onConfirm:S=>w(l.id),title:"确定要[下架]该入口吗?"},{reference:e.withCtx(()=>[e.createVNode(_,{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:u,onSuccess:a},null,512)],64)}}}),O=M.defineStore("pg-app-util-core-config-store",()=>{const D=[];return{defaultTesterUserIds:e.computed(()=>D)}}),_e="",G=(D,c)=>{const d=D.__vccOpts||D;for(const[f,o]of c)d[f]=o;return d},X={class:"dialog-footer"},Y=G({__name:"VersionDialog",emits:["success"],setup(D,{expose:c,emit:d}){const f=e.inject("http"),o=e.ref("CREATE"),V=e.computed(()=>o.value==="EDIT"),h=e.ref(!1),a=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:""}),y=e.ref(),w=O();e.onMounted(()=>{w.defaultTesterUserIds.length&&(a.value.testerIdJsonStr=w.defaultTesterUserIds.join(","))});let g=null;const C=e.ref(!1);async function u(N){h.value=!0,o.value=N?"EDIT":"CREATE",g=N,N&&(C.value=N.status=="RELEASE",console.log(N.status),Object.assign(a.value,N),N.testerIdJsonStr&&(a.value.testerIdJsonStr=JSON.parse(N.testerIdJsonStr).join(",")),y.value=N.isHot?N.wgtUrl:N.pkgUrl),await F(),N&&_(N.appCode)}function x(N){a.value.isHot?a.value.wgtUrl=N.fileUrl:a.value.pkgUrl=N.fileUrl}function r(){a.value={appCode:null,platform:"ANDROID",versionName:null,category:"SELF",isForce:!1,isHot:!0,activationTime:null,pkgUrl:null,wgtUrl:null,testerIdJsonStr:""}}function t(){h.value=!h.value}const p=e.ref();function m(){p.value.validate(N=>{N&&(V.value?f.post(`/api/app/version/${g.id}`,{...a.value,testerIdJsonStr:a.value.testerIdJsonStr?JSON.stringify(JSON.parse("["+a.value.testerIdJsonStr+"]")):null}).then(n=>{t(),d("success")}):f.post("/api/app/version",{...a.value,testerIdJsonStr:a.value.testerIdJsonStr?JSON.stringify(JSON.parse("["+a.value.testerIdJsonStr+"]")):null}).then(n=>{t(),d("success")}))})}function _(N){i.value.find(E=>E.code===N).platform=="IOS"?a.value.platform="IOS":a.value.platform="ANDROID"}const k=e.ref();function T(){a.value.wgtUrl=null,a.value.pkgUrl=null,k.value&&k.value.clearFileList()}const i=e.ref([]);async function F(){if(i.value.length<=0){const N=await f.get("/api/app/all");i.value=N.data}}return c({show:u}),(N,n)=>{const E=e.resolveComponent("el-option"),s=e.resolveComponent("el-select"),B=e.resolveComponent("el-form-item"),U=e.resolveComponent("el-col"),A=e.resolveComponent("el-row"),l=e.resolveComponent("el-input"),S=e.resolveComponent("el-date-picker"),R=e.resolveComponent("el-checkbox"),pe=e.resolveComponent("pg-upload"),me=e.resolveComponent("el-form"),J=e.resolveComponent("el-button"),fe=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(fe,{title:e.unref(V)?"编辑App版本":"发布App版本",modelValue:h.value,"onUpdate:modelValue":n[10]||(n[10]=b=>h.value=b),width:"700px",onClosed:r},{footer:e.withCtx(()=>[e.createElementVNode("div",X,[e.createVNode(J,{onClick:t},{default:e.withCtx(()=>[e.createTextVNode("取 消")]),_:1}),e.createVNode(J,{type:"primary",onClick:m},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(V)?"提 交":"创 建"),1)]),_:1})])]),default:e.withCtx(()=>[e.createVNode(me,{model:a.value,ref_key:"publishModalForm",ref:p},{default:e.withCtx(()=>[e.createVNode(A,null,{default:e.withCtx(()=>[e.createVNode(U,{span:24},{default:e.withCtx(()=>[e.createVNode(B,{label:"应用","label-width":"100px",prop:"appCode",rules:[{required:!0,message:"请选择应用",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:a.value.appCode,"onUpdate:modelValue":n[0]||(n[0]=b=>a.value.appCode=b),disabled:e.unref(V)&&C.value,placeholder:"请选择要发布的平台",style:{width:"100%"},onChange:_},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,b=>(e.openBlock(),e.createBlock(E,{key:b.code,label:b.name,value:b.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(A,null,{default:e.withCtx(()=>[e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(B,{label:"版本名称","label-width":"100px",prop:"versionName",rules:[{required:!0,message:"请输入版本名称",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:a.value.versionName,"onUpdate:modelValue":n[1]||(n[1]=b=>a.value.versionName=b),disabled:e.unref(V)&&C.value,placeholder:"例: 1.1.2"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(B,{label:"版本编号","label-width":"100px",prop:"versionNumber",rules:[{required:!0,message:"请输入版本编号",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:a.value.versionNumber,"onUpdate:modelValue":n[2]||(n[2]=b=>a.value.versionNumber=b),disabled:e.unref(V)&&C.value,type:"number",min:"1",placeholder:"例: 112"},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(A,null,{default:e.withCtx(()=>[e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(B,{label:"启用时间","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:a.value.activationTime,"onUpdate:modelValue":n[3]||(n[3]=b=>a.value.activationTime=b),type:"datetime",placeholder:"选择启用时间",disabled:e.unref(V)&&C.value},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e.createVNode(A,null,{default:e.withCtx(()=>[e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(B,{label:"是否热更新","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:a.value.isHot,"onUpdate:modelValue":n[4]||(n[4]=b=>a.value.isHot=b),onChange:T,disabled:e.unref(V)&&C.value},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e.createVNode(U,{span:12},{default:e.withCtx(()=>[e.createVNode(B,{label:"是否强制","label-width":"100px"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:a.value.isForce,"onUpdate:modelValue":n[5]||(n[5]=b=>a.value.isForce=b),placeholder:"请选择是否强制",disabled:e.unref(V)&&C.value},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),a.value.category=="APP_STORE"?(e.openBlock(),e.createBlock(A,{key:0},{default:e.withCtx(()=>[e.createVNode(U,{span:24},{default:e.withCtx(()=>[e.createVNode(B,{label:"市场地址","label-width":"100px",prop:"pkgUrl",rules:[{required:!0,message:"应用市场地址",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{modelValue:a.value.pkgUrl,"onUpdate:modelValue":n[6]||(n[6]=b=>a.value.pkgUrl=b),placeholder:"应用市场地址"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(A,null,{default:e.withCtx(()=>[e.createVNode(U,{span:24},{default:e.withCtx(()=>[e.createVNode(B,{label:"版本描述","label-width":"100px",prop:"description",rules:[{required:!0,message:"请输入版本描述",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(l,{type:"textarea",modelValue:a.value.description,"onUpdate:modelValue":n[7]||(n[7]=b=>a.value.description=b),autosize:{minRows:4},placeholder:"请输入版本描述"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.unref(V)&&C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(A,{key:1},{default:e.withCtx(()=>[e.createVNode(U,{span:24},{default:e.withCtx(()=>[e.createVNode(B,{label:"测试用户","label-width":"100px",prop:"testerIdJsonStr"},{default:e.withCtx(()=>[e.createVNode(l,{type:"textarea",modelValue:a.value.testerIdJsonStr,"onUpdate:modelValue":n[8]||(n[8]=b=>a.value.testerIdJsonStr=b),autosize:{minRows:4},placeholder:"请输入测试用户ID。 例子: 10000, 100202, 100203"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})),a.value.platform=="ANDROID"||a.value.platform=="IOS"&&a.value.isHot?(e.openBlock(),e.createBlock(A,{key:2},{default:e.withCtx(()=>[e.createVNode(U,{span:24},{default:e.withCtx(()=>[e.createVNode(B,{label:a.value.isHot?"上传更新包":"上传安装包","label-width":"100px",rules:[{required:!0,message:"请上传更新包",trigger:"blur"}]},{default:e.withCtx(()=>[e.createVNode(pe,{ref_key:"appPkgUploader",ref:k,modelValue:y.value,"onUpdate:modelValue":n[9]||(n[9]=b=>y.value=b),drag:!0,multiple:!1,tips:"热更新下只能上传wgt格式的文件,非热更新下只能上传apk格式的文件",autoUpload:!0,uploadType:"appPkg",accept:a.value.isHot?".wgt":"application/vnd.android.package-archive",disabled:e.unref(V)&&C.value,fileSizeInKb:1024*400,onOnSuccess:x},null,8,["modelValue","accept","disabled"])]),_:1},8,["label"])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["title","modelValue"])}}},[["__scopeId","data-v-fc54e5c7"]]),K={__name:"VersionListView",setup(D){const c=e.ref({platform:null,isHot:null,status:null}),d=e.inject("http"),f=e.ref();function o(){f.value.search()}const V=e.ref();function h(w){V.value.show(w)}async function a(w){await d.post(`/api/app/version/${w}/publish`),o(),L.ElMessage.success("发布成功")}async function y(w){await d.post(`/api/app/version/${w}/offline`),o(),L.ElMessage.success("下架成功")}return(w,g)=>{const C=e.resolveComponent("el-option"),u=e.resolveComponent("el-select"),x=e.resolveComponent("el-button"),r=e.resolveComponent("el-space"),t=e.resolveComponent("el-card"),p=e.resolveComponent("el-table-column"),m=e.resolveComponent("el-tag"),_=e.resolveComponent("el-popconfirm"),k=e.resolveComponent("pg-table"),T=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(u,{modelValue:c.value.isHot,"onUpdate:modelValue":g[0]||(g[0]=i=>c.value.isHot=i),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(u,{modelValue:c.value.status,"onUpdate:modelValue":g[1]||(g[1]=i=>c.value.status=i),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(x,{type:"primary",icon:"search",onClick:o},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(x,{icon:"plus",onClick:g[2]||(g[2]=i=>h())},{default:e.withCtx(()=>[e.createTextVNode("新建版本")]),_:1})),[[T,"CREATE_BANNER"]])]),_:1})]),_:1}),e.createVNode(k,{ref_key:"table",ref:f,"data-url":"/api/app/version/page-search",onRowDbClick:g[3]||(g[3]=i=>h(i)),condition:c.value,style:{"margin-top":"10px"}},{default:e.withCtx(()=>[e.createVNode(p,{label:"ID",prop:"id",align:"center",width:"60px"}),e.createVNode(p,{label:"应用",prop:"appName",align:"center",width:"120px","show-overflow-tooltip":""}),e.createVNode(p,{label:"应用平台",prop:"appPlatform",align:"center",width:"100px","show-overflow-tooltip":""}),e.createVNode(p,{label:"版本名称",prop:"versionName",align:"center",width:"90","show-overflow-tooltip":""}),e.createVNode(p,{label:"版本编号",prop:"versionNumber",align:"center",width:"90","show-overflow-tooltip":""}),e.createVNode(p,{label:"强制更新",prop:"isForce",align:"center",width:"90","show-overflow-tooltip":""},{default:e.withCtx(({row:i})=>[i.isForce?(e.openBlock(),e.createBlock(m,{key:0,type:"warning",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("是")]),_:1})):(e.openBlock(),e.createBlock(m,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("否")]),_:1}))]),_:1}),e.createVNode(p,{label:"整包更新",prop:"isHot",align:"center",width:"90","show-overflow-tooltip":""},{default:e.withCtx(({row:i})=>[i.isHot?(e.openBlock(),e.createBlock(m,{key:0,type:"warning",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("否")]),_:1})):(e.openBlock(),e.createBlock(m,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("是")]),_:1}))]),_:1}),e.createVNode(p,{label:"启用时间",width:"150px",prop:"activationTime",align:"center","show-overflow-tooltip":""}),e.createVNode(p,{label:"状态",width:"100",align:"center"},{default:e.withCtx(({row:i})=>[e.createVNode(m,{type:i.status=="RELEASE"?"success":i.status=="OFFLINE"?"danger":"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.status=="RELEASE"?"发布":i.status=="OFFLINE"?"下线":"测试"),1)]),_:2},1032,["type"])]),_:1}),e.createVNode(p,{label:"安装包/更新包地址",prop:"pkgUrl",align:"center","show-overflow-tooltip":""},{default:e.withCtx(({row:i})=>[e.createTextVNode(e.toDisplayString(i.isHot?i.wgtUrl:i.pkgUrl),1)]),_:1}),e.createVNode(p,{label:"操作",align:"center",width:"160px"},{default:e.withCtx(({row:i})=>[i.status=="RELEASE"?(e.openBlock(),e.createBlock(_,{key:0,title:`确定下架版本[${i.versionName}]吗?`,onConfirm:F=>y(i.id)},{reference:e.withCtx(()=>[e.createVNode(x,{type:"danger"},{default:e.withCtx(()=>[e.createTextVNode("下架")]),_:1})]),_:2},1032,["title","onConfirm"])):e.createCommentVNode("",!0),i.status=="TEST"||i.status=="OFFLINE"?(e.openBlock(),e.createBlock(_,{key:1,title:"是否确定发布该版本?",onConfirm:F=>a(i.id)},{reference:e.withCtx(()=>[e.createVNode(x,{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:V,onSuccess:o},null,512)],64)}}},Z={style:{display:"flex","flex-direction":"column"}},v={style:{display:"flex",gap:"5px","margin-top":"10px"}},ee={__name:"FeedbackDialog",emits:["success"],setup(D,{expose:c,emit:d}){const f=e.inject("http"),o=e.ref(!1),V=e.ref(null),h=e.ref({replyContent:null}),a={replyContent:{required:!0,message:"请输入回复内容"}};function y(u){V.value=u,h.value.replyContent=u.replyContent,o.value=!0}const w=e.ref();function g(){var u;(u=w.value)==null||u.validate(x=>{x&&f.post(`/api/feedback/${V.value.id}/reply`,{content:h.value.replyContent}).then(r=>{var t;d("success"),(t=w.value)==null||t.resetFields(),o.value=!1})})}function C(){h.value.replyContent=null}return c({show:y}),(u,x)=>{const r=e.resolveComponent("el-image"),t=e.resolveComponent("el-form-item"),p=e.resolveComponent("el-input"),m=e.resolveComponent("el-form"),_=e.resolveComponent("el-button"),k=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(k,{title:"回复",modelValue:o.value,"onUpdate:modelValue":x[1]||(x[1]=T=>o.value=T),width:"400",onClose:C},{footer:e.withCtx(()=>[e.createVNode(_,{type:"primary",disabled:u.handling,loading:u.handling,onClick:g},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1},8,["disabled","loading"])]),default:e.withCtx(()=>[e.createVNode(m,{ref_key:"form",ref:w,rules:a,model:h.value,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(t,{label:"反馈内容"},{default:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createTextVNode(e.toDisplayString(V.value.content)+" ",1),e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value.images,(T,i)=>(e.openBlock(),e.createBlock(r,{key:i,src:T,"preview-teleported":"","preview-src-list":V.value.images,style:{width:"80px"}},null,8,["src","preview-src-list"]))),128))])])]),_:1}),e.createVNode(t,{label:"回复内容",prop:"replyContent"},{default:e.withCtx(()=>[e.createVNode(p,{type:"textarea",modelValue:h.value.replyContent,"onUpdate:modelValue":x[0]||(x[0]=T=>h.value.replyContent=T),placeholder:"请输入要回复的内容"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},te=e.createElementVNode("br",null,null,-1),le=e.createElementVNode("br",null,null,-1),oe=e.createElementVNode("br",null,null,-1),ae=e.createElementVNode("br",null,null,-1),ne={style:{display:"flex","flex-direction":"column"}},re={style:{display:"flex",gap:"3px","margin-top":"5px"}},ie=e.createElementVNode("br",null,null,-1),ce={__name:"FeedbackListView",setup(D){const c={WAITING_REPLY:{label:"待回复",tagType:"warning"},COMPLETED:{label:"已完成",tagType:"success"}},d=e.ref({userId:null,status:null}),f=e.ref();function o(){f.value.search()}const V=e.ref();function h(w){V.value.show(w)}const a=e.ref();function y(w){a.value.show(w)}return(w,g)=>{const C=e.resolveComponent("pg-user-selector"),u=e.resolveComponent("el-option"),x=e.resolveComponent("el-select"),r=e.resolveComponent("el-button"),t=e.resolveComponent("el-space"),p=e.resolveComponent("el-card"),m=e.resolveComponent("el-table-column"),_=e.resolveComponent("el-link"),k=e.resolveComponent("el-avatar"),T=e.resolveComponent("el-image"),i=e.resolveComponent("el-tag"),F=e.resolveComponent("pg-table"),N=e.resolveComponent("PgUserDetailDialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(t,null,{default:e.withCtx(()=>[e.createVNode(C,{modelValue:d.value.userId,"onUpdate:modelValue":g[0]||(g[0]=n=>d.value.userId=n),placeholder:"搜索用户",clearable:"",style:{width:"250px"}},null,8,["modelValue"]),e.createVNode(x,{modelValue:d.value.status,"onUpdate:modelValue":g[1]||(g[1]=n=>d.value.status=n),placeholder:"状态",style:{width:"100px"},clearable:""},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(c,(n,E)=>e.createVNode(u,{label:n.label,value:E},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(r,{type:"primary",icon:"search",onClick:o},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createVNode(F,{ref_key:"table",ref:f,style:{"margin-top":"10px"},"data-url":"/api/feedback/page-search",condition:d.value},{default:e.withCtx(()=>[e.createVNode(m,{label:"ID",prop:"id",width:"80",align:"center"}),e.createVNode(m,{label:"用户信息",width:"200",align:"center"},{default:e.withCtx(({row:n})=>[e.createVNode(_,{type:"primary",onClick:E=>y(n.userId)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.userId),1)]),_:2},1032,["onClick"]),te,e.createVNode(k,{src:n.avatar},null,8,["src"]),le,e.createTextVNode(" "+e.toDisplayString(n.nickname),1)]),_:1}),e.createVNode(m,{label:"应用",width:"120"},{default:e.withCtx(({row:n})=>[e.createTextVNode(e.toDisplayString(n.appName),1),oe,e.createTextVNode(" "+e.toDisplayString(n.frontAppVersionName),1),ae,e.createTextVNode(" "+e.toDisplayString(n.frontAppVersionNumber),1)]),_:1}),e.createVNode(m,{label:"反馈内容",prop:"content"},{default:e.withCtx(({row:n})=>[e.createElementVNode("div",ne,[e.createTextVNode(e.toDisplayString(n.content)+" ",1),e.createElementVNode("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.images,(E,s)=>(e.openBlock(),e.createBlock(T,{key:s,src:E,style:{width:"80px"},"preview-teleported":"","preview-src-list":n.images},null,8,["src","preview-src-list"]))),128))])])]),_:1}),e.createVNode(m,{label:"状态",width:"100",align:"center"},{default:e.withCtx(({row:n})=>[e.createVNode(i,{type:c[n.status].tagType},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c[n.status].label),1)]),_:2},1032,["type"])]),_:1}),e.createVNode(m,{label:"回复内容",prop:"replyContent"}),e.createVNode(m,{label:"提交/回复时间",width:"180",align:"center"},{default:e.withCtx(({row:n})=>[e.createTextVNode(e.toDisplayString(n.createdTime),1),ie,e.createTextVNode(" "+e.toDisplayString(n.replyTime??"/"),1)]),_:1}),e.createVNode(m,{label:"操作",width:"120",align:"center"},{default:e.withCtx(({row:n})=>[e.createVNode(r,{onClick:E=>h(n),type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.status=="WAITING_REPLY"?"回复":"修改回复"),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["condition"]),e.createVNode(ee,{ref_key:"feedbackDialog",ref:V,onSuccess:o},null,512),e.createVNode(N,{ref_key:"userDetailDialog",ref:a},null,512)],64)}}},se={install:(D,c)=>{let d=c.router,f=d.getRoutes().find(o=>o.path=="/");f&&f.meta&&(d.addRoute({path:"/app/banner",name:"AppBanner",redirect:"/app/banner/list",component:f.meta.commonLayout,children:[{path:"list",name:"BannerListView",component:W}]}),d.addRoute({path:"/app/entrance",name:"AppEntrance",redirect:"/app/entrance/list",component:f.meta.commonLayout,children:[{path:"list",name:"EntranceListView",component:Q}]}),d.addRoute({path:"/app/version",name:"AppVersion",redirect:"/app/version/list",component:f.meta.commonLayout,children:[{path:"list",name:"AppVersionListView",component:K}]}),d.addRoute({path:"/app/feedback",name:"Feedback",redirect:"/app/feedback/list",component:f.meta.commonLayout,children:[{path:"list",name:"FeedbackListView",component:ce}]}))}},H=(D,c)=>{q.forEach(f=>D.use(f)),D.use(se,c);const d=O();if(c.defaultTesterUserIds)for(let f of c.defaultTesterUserIds)d.defaultTesterUserIds.push(f)},de={install:H};I.default=de,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-fc54e5c7] .pg-upload-hidden-upload{width:100%!important}
|
|
@@ -21,6 +21,8 @@ declare namespace _sfc_main {
|
|
|
21
21
|
search: () => void;
|
|
22
22
|
feedbackDialog: import("vue").Ref<any>;
|
|
23
23
|
showFeedbackDialog: (feedback: any) => void;
|
|
24
|
+
userDetailDialog: import("vue").Ref<any>;
|
|
25
|
+
showUserDetailDialog: (userId: any) => void;
|
|
24
26
|
FeedbackDialog: {
|
|
25
27
|
emits: string[];
|
|
26
28
|
setup(__props: any, { expose, emit: emits }: {
|