@pangu-backend-ui/apputil-core 0.0.6 → 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 +922 -595
- package/index.umd.cjs +1 -1
- package/package.json +3 -2
- package/style.css +1 -1
- package/types/views/FeedbackListView.vue.d.ts +56 -0
- package/types/views/components/FeedbackDialog.vue.d.ts +30 -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,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"}})});
|
|
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pangu-backend-ui/apputil-core",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.8",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
7
7
|
"unpkg": "index.umd.cjs",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"vue-router": "^4.1.6",
|
|
23
23
|
"pinia": "^2.0.28",
|
|
24
24
|
"@pangu-backend-ui/admin-core": "^0.0.5",
|
|
25
|
-
"@pangu-backend-ui/common": "^0.0.31"
|
|
25
|
+
"@pangu-backend-ui/common": "^0.0.31",
|
|
26
|
+
"@pangu-backend-ui/user-core": "^0.0.20"
|
|
26
27
|
},
|
|
27
28
|
"publishConfig": {
|
|
28
29
|
"access": "public",
|
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-
|
|
1
|
+
[data-v-fc54e5c7] .pg-upload-hidden-upload{width:100%!important}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export default _sfc_main;
|
|
2
|
+
declare namespace _sfc_main {
|
|
3
|
+
function setup(__props: any, { expose }: {
|
|
4
|
+
expose: any;
|
|
5
|
+
}): {
|
|
6
|
+
statusMapping: {
|
|
7
|
+
WAITING_REPLY: {
|
|
8
|
+
label: string;
|
|
9
|
+
tagType: string;
|
|
10
|
+
};
|
|
11
|
+
COMPLETED: {
|
|
12
|
+
label: string;
|
|
13
|
+
tagType: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
condition: import("vue").Ref<{
|
|
17
|
+
userId: null;
|
|
18
|
+
status: null;
|
|
19
|
+
}>;
|
|
20
|
+
table: import("vue").Ref<any>;
|
|
21
|
+
search: () => void;
|
|
22
|
+
feedbackDialog: import("vue").Ref<any>;
|
|
23
|
+
showFeedbackDialog: (feedback: any) => void;
|
|
24
|
+
userDetailDialog: import("vue").Ref<any>;
|
|
25
|
+
showUserDetailDialog: (userId: any) => void;
|
|
26
|
+
FeedbackDialog: {
|
|
27
|
+
emits: string[];
|
|
28
|
+
setup(__props: any, { expose, emit: emits }: {
|
|
29
|
+
expose: any;
|
|
30
|
+
emit: any;
|
|
31
|
+
}): {
|
|
32
|
+
http: any;
|
|
33
|
+
emits: any;
|
|
34
|
+
showState: import("vue").Ref<boolean>;
|
|
35
|
+
feedbackDetail: import("vue").Ref<null>;
|
|
36
|
+
formState: import("vue").Ref<{
|
|
37
|
+
replyContent: null;
|
|
38
|
+
}>;
|
|
39
|
+
formRule: {
|
|
40
|
+
replyContent: {
|
|
41
|
+
required: boolean;
|
|
42
|
+
message: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
show: (feedback: any) => void;
|
|
46
|
+
form: import("vue").Ref<any>;
|
|
47
|
+
submit: () => void;
|
|
48
|
+
clearForm: () => void;
|
|
49
|
+
inject: typeof import("vue").inject;
|
|
50
|
+
ref: typeof ref;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
ref: typeof ref;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
import { ref } from "@vue/runtime-core";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default _sfc_main;
|
|
2
|
+
declare namespace _sfc_main {
|
|
3
|
+
const emits: string[];
|
|
4
|
+
function setup(__props: any, { expose, emit: emits }: {
|
|
5
|
+
expose: any;
|
|
6
|
+
emit: any;
|
|
7
|
+
}): {
|
|
8
|
+
http: any;
|
|
9
|
+
emits: any;
|
|
10
|
+
showState: import("vue").Ref<boolean>;
|
|
11
|
+
feedbackDetail: import("vue").Ref<null>;
|
|
12
|
+
formState: import("vue").Ref<{
|
|
13
|
+
replyContent: null;
|
|
14
|
+
}>;
|
|
15
|
+
formRule: {
|
|
16
|
+
replyContent: {
|
|
17
|
+
required: boolean;
|
|
18
|
+
message: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
show: (feedback: any) => void;
|
|
22
|
+
form: import("vue").Ref<any>;
|
|
23
|
+
submit: () => void;
|
|
24
|
+
clearForm: () => void;
|
|
25
|
+
inject: typeof inject;
|
|
26
|
+
ref: typeof ref;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
import { inject } from "@vue/runtime-core";
|
|
30
|
+
import { ref } from "@vue/runtime-core";
|