@pangu-backend-ui/user-core 0.0.16 → 0.0.17
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 +299 -288
- package/index.umd.cjs +1 -1
- package/package.json +1 -1
- package/types/components/AddBlacklist/AddBlacklistComp.vue.d.ts +2 -2
- package/types/components/UserDetail/UserDetailDialog.vue.d.ts +3 -123
- package/types/types/UserDetailDialogTabConfig.d.ts +2 -2
- package/types/views/BlackListView.vue.d.ts +5 -125
- package/types/views/list.vue.d.ts +3 -123
package/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("pinia"),require("@pangu-backend-ui/common")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","@pangu-backend-ui/common"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b["pg-user-core"]={},b.Vue,b.pinia,b.common))})(this,function(b,e,R,j){"use strict";const z={key:0,class:"container"},q=e.defineComponent({__name:"UserMobileComponent",props:{userId:{type:Number,default:null},maskMobile:{type:String,default:null}},setup(s){const n=s,l=e.ref({plainMobile:null,loading:!1}),i=e.inject("http");function d(){l.value.plainMobile==null&&(l.value.loading=!0,i==null||i.get(`/api/user/${n.userId}/plainmobile`).then(a=>{l.value.plainMobile=a.data,l.value.loading=!1}).finally(()=>{l.value.loading=!1}))}return(a,_)=>{const r=e.resolveComponent("View"),w=e.resolveComponent("el-icon"),p=e.resolveComponent("Loading");return n.maskMobile!=null?(e.openBlock(),e.createElementBlock("div",z,[l.value.plainMobile==null?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.maskMobile),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.value.plainMobile),1)],64)),l.value.plainMobile==null&&!l.value.loading&&n.userId!=null?(e.openBlock(),e.createBlock(w,{key:2,class:"view-icon",onClick:d},{default:e.withCtx(()=>[e.createVNode(r)]),_:1})):e.createCommentVNode("",!0),l.value.loading?(e.openBlock(),e.createBlock(w,{key:3,class:"is-loading view-icon"},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}}),te="",M=(s,n)=>{const l=s.__vccOpts||s;for(const[i,d]of n)l[i]=d;return l},B=M(q,[["__scopeId","data-v-76c9c9ae"]]),$={install:s=>{s.component("PgUserMobile",B)}},K=e.defineComponent({__name:"LoginHistory",props:["userId"],setup(s){const n=s,l=e.ref({userId:n.userId,loginTimeStart:null,loginTimeEnd:null}),i=e.ref([]);e.watch(i,_=>{_?(l.value.loginTimeStart=_[0],l.value.loginTimeEnd=_[1]):(l.value.loginTimeStart=null,l.value.loginTimeEnd=null)});const d=e.ref();function a(){d.value.search()}return(_,r)=>{const w=e.resolveComponent("el-date-picker"),p=e.resolveComponent("el-button"),V=e.resolveComponent("el-space"),h=e.resolveComponent("el-table-column"),m=e.resolveComponent("el-tag"),f=e.resolveComponent("pg-table");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(w,{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=c=>i.value=c),type:"datetimerange","range-separator":"-","start-placeholder":"登录开始时间","end-placeholder":"登录结束时间",clearable:""},null,8,["modelValue"]),e.createVNode(p,{type:"primary",icon:"search",onClick:a},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1}),e.createVNode(f,{ref_key:"historiesTable",ref:d,style:{"margin-top":"10px"},"data-url":"/api/user/login-history",condition:l.value},{columns:e.withCtx(()=>[e.createVNode(h,{prop:"createdTime",label:"登录时间",align:"center","show-overflow-tooltip":""}),e.createVNode(h,{prop:"ip",label:"登录IP",align:"center","show-overflow-tooltip":""}),e.createVNode(h,{prop:"runtimeName",label:"运行容器",align:"center","show-overflow-tooltip":""}),e.createVNode(h,{label:"登录方式",align:"center","show-overflow-tooltip":""},{default:e.withCtx(({row:c})=>[c.method==="SMS"?(e.openBlock(),e.createBlock(m,{key:0,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("短信登录")]),_:1})):e.createCommentVNode("",!0),c.method==="THIRD_PLATFORM"?(e.openBlock(),e.createBlock(m,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("第三方平台")]),_:1})):e.createCommentVNode("",!0),c.method==="UNIVERIFY"?(e.openBlock(),e.createBlock(m,{key:2,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("一键登录")]),_:1})):e.createCommentVNode("",!0),c.method==="PASSWORD"?(e.openBlock(),e.createBlock(m,{key:3,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("帐号密码")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(h,{prop:"thirdPlatformName",label:"第三方登录",align:"center","show-overflow-tooltip":""}),e.createVNode(h,{prop:"versionCode",label:"版本代码",align:"center","show-overflow-tooltip":""}),e.createVNode(h,{prop:"versionName",label:"版本名称",align:"center","show-overflow-tooltip":""})]),_:1},8,["condition"])],64)}}}),S=R.defineStore("pg-user-core-config-store",()=>{const s=[];return s.push({name:"登录历史",code:"LOGIN_HISTORY",component:K}),{userDetailDialogTabs:e.computed(()=>s)}}),E=e.defineComponent({__name:"AddBlacklistComp",props:{hiddenEntranceSlot:{type:Boolean,default:!1},userId:{type:Number,required:!0}},emits:["success"],setup(s,{expose:n,emit:l}){const i=s,d=e.inject("http"),a=e.ref(!1);let _=e.ref(null);function r(t){a.value=!0,_.value=t??i.userId,t&&h(_.value)}const w=e.ref({description:[{required:!0,message:"请输入加入黑名单的说明"}],unlockTime:[{required:!0,message:"解锁时间不能为空"}]}),p=e.ref({userId:null,unlockTime:null,permissions:[],description:null}),V=e.ref();function h(t){d==null||d.get(`/api/user/${t}/blacklist-and-all-permission-codes`).then(o=>{var g,N,x,y,D;(g=o.data)!=null&&g.info&&((N=o.data)!=null&&N.info.allowPermissionCodes&&(p.value.permissions=JSON.parse((x=o.data)==null?void 0:x.info.allowPermissionCodes)),p.value.userId=(y=o.data)==null?void 0:y.info.userId,p.value.unlockTime=o.data.info.unlockTime,p.value.description=o.data.info.description),V.value=(D=o.data)==null?void 0:D.permissionCodes})}const m=e.ref();function f(){var t;(t=m.value)==null||t.resetFields()}function c(){var t;(t=m.value)==null||t.validate((o,g)=>{o&&(d==null||d.post(`/api/user/${_.value}/blacklist`,p.value).then(N=>{a.value=!1,l("success")}))})}const u=[{text:"三天",value:()=>{const t=new Date;return t.setDate(t.getDate()+3),t}},{text:"七天",value:()=>{const t=new Date;return t.setDate(t.getDate()+7),t}},{text:"十五天",value:()=>{const t=new Date;return t.setDate(t.getDate()+15),t}},{text:"一个月",value:()=>{const t=new Date;return t.setMonth(t.getMonth()+1),t}},{text:"三个月",value:()=>{const t=new Date;return t.setMonth(t.getMonth()+3),t}},{text:"六个月",value:()=>{const t=new Date;return t.setMonth(t.getMonth()+6),t}},{text:"永久",value:()=>{const t=new Date;return t.setFullYear(t.getFullYear()+100),t}}];return n({show:r}),(t,o)=>{const g=e.resolveComponent("el-button"),N=e.resolveComponent("el-date-picker"),x=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-checkbox"),D=e.resolveComponent("el-checkbox-group"),k=e.resolveComponent("el-input"),T=e.resolveComponent("el-form"),U=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[i.hiddenEntranceSlot?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",{key:0},()=>[e.createVNode(g,{icon:"lock",type:"warning",onClick:o[0]||(o[0]=C=>r())},{default:e.withCtx(()=>[e.createTextVNode("加入黑名单")]),_:1})]),e.createVNode(U,{modelValue:a.value,"onUpdate:modelValue":o[4]||(o[4]=C=>a.value=C),onClosed:f,title:"黑名单管理",width:"500"},{footer:e.withCtx(()=>[e.createVNode(g,{type:"primary",onClick:c},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1})]),default:e.withCtx(()=>[e.createVNode(T,{ref_key:"form",ref:m,"label-position":"top",rules:w.value,model:p.value},{default:e.withCtx(()=>[e.createVNode(x,{label:"解锁时间",prop:"unlockTime"},{default:e.withCtx(()=>[e.createVNode(N,{type:"datetime",shortcuts:u,modelValue:p.value.unlockTime,"onUpdate:modelValue":o[1]||(o[1]=C=>p.value.unlockTime=C)},null,8,["modelValue"])]),_:1}),e.createVNode(x,{label:"允许权限",prop:"allowPermissionCodes"},{default:e.withCtx(()=>[e.createVNode(D,{modelValue:p.value.permissions,"onUpdate:modelValue":o[2]||(o[2]=C=>p.value.permissions=C)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(C,L)=>(e.openBlock(),e.createBlock(y,{label:L,key:L},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(x,{label:"描述",prop:"description"},{default:e.withCtx(()=>[e.createVNode(k,{type:"textarea",modelValue:p.value.description,"onUpdate:modelValue":o[3]||(o[3]=C=>p.value.description=C)},null,8,["modelValue"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["modelValue"])],64)}}}),I=e.defineComponent({__name:"UserDetailDialog",setup(s,{expose:n}){const l=S(),i=e.inject("http"),d=e.ref(!1),a=e.ref(),_=e.ref(),r=e.ref({activeName:l.userDetailDialogTabs[0].code,tabs:[]}),w=e.ref(!1);function p(u,t,o){w.value=!0,V(u),t&&(r.value.activeName=t),r.value.tabs.length=0,r.value.tabs=r.value.tabs.concat(l.userDetailDialogTabs),o&&(r.value.tabs=r.value.tabs.concat(o))}function V(u){i==null||i.get(`/api/user/${u}`).then(t=>{a.value=t.data,w.value=!1,d.value=!0,a.value.inBlacklist&&h(u)})}function h(u){i==null||i.get(`/api/user/${u}/blacklist`).then(t=>{_.value=t.data})}const m=e.ref();function f(){m.value.show(a.value.id)}function c(){a.value=null,_.value=null}return n({show:p}),(u,t)=>{const o=e.resolveComponent("el-descriptions-item"),g=e.resolveComponent("el-tag"),N=e.resolveComponent("el-descriptions"),x=e.resolveComponent("el-tab-pane"),y=e.resolveComponent("el-tabs"),D=e.resolveComponent("el-button"),k=e.resolveComponent("el-dialog"),T=e.resolveDirective("permission"),U=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createBlock(k,{modelValue:d.value,"onUpdate:modelValue":t[1]||(t[1]=C=>d.value=C),title:"用户详情",width:"1300",onClosed:c},{footer:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(D,{icon:"lock",type:"warning",onClick:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.inBlacklist?"修改":"加入")+"黑名单",1)]),_:1})),[[T,"ADD_TO_BLACKLIST"]])]),default:e.withCtx(()=>[e.createVNode(N,{border:""},{default:e.withCtx(()=>[e.createVNode(o,{label:"用户编号"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.id),1)]),_:1}),e.createVNode(o,{label:"用户昵称"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.nickname),1)]),_:1}),e.createVNode(o,{label:"手机号码"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(B,{"mask-mobile":a.value.mobile,"user-id":a.value.id,key:a.value.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(o,{label:"邀请编码"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.inviteCode),1)]),_:1}),e.createVNode(o,{label:"活动时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.touchTime),1)]),_:1}),e.createVNode(o,{label:"注册时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.createdTime),1)]),_:1}),e.createVNode(o,{label:"最后登陆"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.lastLoginTime),1)]),_:1}),e.createVNode(o,{label:"最后更新"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.updatedTime),1)]),_:1}),e.createVNode(o,{label:"上级用户"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.parentId),1)]),_:1}),e.createVNode(o,{label:"黑名单"},{default:e.withCtx(()=>[e.createVNode(g,{type:a.value.inBlacklist?"danger":"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.inBlacklist?"是":"否"),1)]),_:1},8,["type"])]),_:1}),e.createVNode(o,{label:"邀请关系"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value.relationPath),1)]),_:1})]),_:1}),_.value?(e.openBlock(),e.createBlock(N,{key:0,style:{"margin-top":"10px"},border:"",column:"2"},{default:e.withCtx(()=>[e.createVNode(o,{label:"黑名单解锁时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value.unlockTime),1)]),_:1}),e.createVNode(o,{label:"加入时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value.createdTime),1)]),_:1}),e.createVNode(o,{label:"允许权限"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value.allowPermissionCodes?JSON.parse(_.value.allowPermissionCodes).join(", "):""),1)]),_:1}),e.createVNode(o,{label:"描述"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value.description),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(y,{modelValue:r.value.activeName,"onUpdate:modelValue":t[0]||(t[0]=C=>r.value.activeName=C),key:`usr_tab_${a.value.id}`,style:{"margin-top":"10px"},type:"border-card"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.tabs,(C,L)=>(e.openBlock(),e.createBlock(x,{label:C.name,name:C.code,key:`user_detail_dialog_${C.code}`},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[r.value.activeName==C.code?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C.component),{key:`ud_tab_${C.code}`,userId:a.value.id},null,8,["userId"])):e.createCommentVNode("",!0)],1024))]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"]))]),_:1},8,["modelValue"])),[[U,w.value]]),e.createVNode(E,{ref_key:"addBlacklistComp",ref:m,onSuccess:t[2]||(t[2]=C=>V(a.value.id)),"hidden-entrance-slot":""},null,512)],64)}}}),P={install:s=>{s.component("PgUserDetailDialog",I)}},A=e.defineComponent({__name:"UserSelectorComp",props:{modelValue:{required:!0,type:Number},pageSize:{type:Number,default:20}},emits:["update:modelValue"],setup(s,{emit:n}){const l=s,i=e.inject("http"),d=e.ref(l.modelValue);e.watch(d,p=>{n("update:modelValue",p)});const a=e.ref(!1),_=e.ref([]);let r=null;function w(p){p&&(a.value=!0,r&&clearTimeout(r),r=setTimeout(()=>{i==null||i.get("/api/user/keyword-search",{keyword:p,pageSize:l.pageSize}).then(V=>{_.value=V.data}).finally(()=>{a.value=!1})},200))}return(p,V)=>{const h=e.resolveComponent("el-option"),m=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(m,{modelValue:d.value,"onUpdate:modelValue":V[0]||(V[0]=f=>d.value=f),filterable:"",remote:"",loading:a.value,"remote-method":w},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,f=>(e.openBlock(),e.createBlock(h,{key:f.id,value:f.id,label:`${f.id} / ${f.nickname} / ${f.mobile} / ${f.inviteCode}`},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{user:f},()=>[e.createTextVNode(e.toDisplayString(f.id)+" / "+e.toDisplayString(f.nickname)+" / "+e.toDisplayString(f.mobile)+" / "+e.toDisplayString(f.inviteCode),1)])]),_:2},1032,["value","label"]))),128))]),_:3},8,["modelValue","loading"])}}}),F={install:s=>{s.component("PgUserSelector",A)}},Y=[$,P,F],H=s=>(e.pushScopeId("data-v-391c43be"),s=s(),e.popScopeId(),s),J={class:"page-layout"},G={style:{"margin-top":"10px"}},W=H(()=>e.createElementVNode("template",{"slot-scope":"{row}"},null,-1)),Q=e.defineComponent({__name:"list",setup(s){const n=e.ref({id:null,parentId:null,phone:null,nicekname:null,inviteCode:null}),l=e.ref(null);function i(){l.value.search()}const d=e.ref();function a(_){d.value.show(_.id)}return(_,r)=>{const w=e.resolveComponent("el-input"),p=e.resolveComponent("el-button"),V=e.resolveComponent("el-space"),h=e.resolveComponent("el-card"),m=e.resolveComponent("el-table-column"),f=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",J,[e.createVNode(h,null,{default:e.withCtx(()=>[e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(w,{modelValue:n.value.id,"onUpdate:modelValue":r[0]||(r[0]=c=>n.value.id=c),placeholder:"ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(w,{modelValue:n.value.parentId,"onUpdate:modelValue":r[1]||(r[1]=c=>n.value.parentId=c),placeholder:"父用户ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(w,{modelValue:n.value.phone,"onUpdate:modelValue":r[2]||(r[2]=c=>n.value.phone=c),placeholder:"手机号",style:{width:"120px"},clearable:""},null,8,["modelValue"]),e.createVNode(w,{modelValue:n.value.nicekname,"onUpdate:modelValue":r[3]||(r[3]=c=>n.value.nicekname=c),placeholder:"昵称",style:{width:"150px"},clearable:""},null,8,["modelValue"]),e.createVNode(w,{modelValue:n.value.inviteCode,"onUpdate:modelValue":r[4]||(r[4]=c=>n.value.inviteCode=c),placeholder:"邀请码",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(p,{type:"primary",icon:"search",onClick:i},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createElementVNode("div",G,[e.createVNode(e.unref(j.PgTable),{ref_key:"userTable",ref:l,"data-url":"/api/user/page",condition:n.value,onRowDbClick:r[5]||(r[5]=c=>a(c))},{columns:e.withCtx(()=>[e.createVNode(m,{prop:"id",label:"UID",width:"80",align:"center"}),e.createVNode(m,{prop:"mobile",label:"手机",width:"115",align:"left","show-overflow-tooltip":""},{default:e.withCtx(c=>[(e.openBlock(),e.createBlock(B,{"mask-mobile":c.row.mobile,"user-id":c.row.id,key:c.row.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(m,{prop:"username",label:"用户名",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(m,{prop:"nickname",label:"昵称",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(m,{prop:"inviteCode",label:"邀请码",width:"90",align:"center","show-overflow-tooltip":""}),e.createVNode(m,{prop:"avatar",label:"头像",width:"60",align:"center","show-overflow-tooltip":""},{default:e.withCtx(c=>[e.createVNode(f,{fit:"cover",size:30,src:c.row.avatar,"preview-teleported":"","preview-src-list":[c.row.avatar]},null,8,["src","preview-src-list"])]),_:1}),e.createVNode(m,{prop:"parentId",label:"上级ID",width:"80",align:"left","show-overflow-tooltip":""}),e.createVNode(m,{prop:"relationPath",label:"邀请关系","min-width":"150",align:"left","show-overflow-tooltip":""}),e.createVNode(m,{prop:"blackUnlockTime",label:"黑名单解锁",width:"145",align:"left","show-overflow-tooltip":""}),e.createVNode(m,{prop:"lastLoginTime",label:"最后登录时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(m,{prop:"createdTime",label:"创建时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(m,{label:"操作",width:"220",fixed:"right"},{default:e.withCtx(()=>[W]),_:1})]),_:1},8,["condition"])])]),e.createVNode(I,{ref_key:"userDetailDialog",ref:d},null,512)],64)}}}),oe="",X=M(Q,[["__scopeId","data-v-391c43be"]]),Z=e.defineComponent({__name:"BlackListView",setup(s){const n=e.inject("http"),l=e.ref({userId:null,status:"VALID"}),i=e.ref();function d(){i.value.search()}function a(V){n==null||n.post(`/api/user/blacklist/${V}/unlock`).then(h=>{d()})}const _=e.ref();function r(V){_.value.show(V)}const w=e.ref();function p(V){w.value.show(V)}return(V,h)=>{const m=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),c=e.resolveComponent("el-button"),u=e.resolveComponent("el-space"),t=e.resolveComponent("el-card"),o=e.resolveComponent("el-table-column"),g=e.resolveComponent("el-link"),N=e.resolveComponent("el-tag"),x=e.resolveComponent("el-popconfirm"),y=e.resolveComponent("pg-table"),D=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(t,null,{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(A,{modelValue:l.value.userId,"onUpdate:modelValue":h[0]||(h[0]=k=>l.value.userId=k),clearable:"",style:{width:"300px"}},null,8,["modelValue"]),e.createVNode(f,{placeholder:"状态",modelValue:l.value.status,"onUpdate:modelValue":h[1]||(h[1]=k=>l.value.status=k),clearable:"",style:{width:"100px"}},{default:e.withCtx(()=>[e.createVNode(m,{value:"VALID",label:"有效"}),e.createVNode(m,{value:"INVALID",label:"失效"})]),_:1},8,["modelValue"]),e.createVNode(c,{icon:"search",type:"primary",onClick:d},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createVNode(y,{ref_key:"table",ref:i,"data-url":"/api/user/blacklist",condition:l.value,style:{"margin-top":"10px"}},{columns:e.withCtx(()=>[e.createVNode(o,{label:"ID",prop:"id",width:"100"}),e.createVNode(o,{label:"用户信息"},{default:e.withCtx(()=>[e.createVNode(o,{label:"用户ID",width:"100"},{default:e.withCtx(({row:k})=>[e.createVNode(g,{type:"primary",onClick:T=>p(k.userId)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.userId),1)]),_:2},1032,["onClick"])]),_:1}),e.createVNode(o,{label:"手机号",width:"150"},{default:e.withCtx(({row:k})=>[e.createVNode(B,{"user-id":k.userId,"mask-mobile":k.userMobile},null,8,["user-id","mask-mobile"])]),_:1}),e.createVNode(o,{label:"用户昵称",prop:"userNickname"})]),_:1}),e.createVNode(o,{label:"限制信息"},{default:e.withCtx(()=>[e.createVNode(o,{label:"描述",prop:"description"}),e.createVNode(o,{label:"允许权限",prop:"allowPermissionCodes","show-overflow-tooltip":""}),e.createVNode(o,{label:"状态",prop:"status",align:"center",width:"100"},{default:e.withCtx(({row:k})=>[e.createVNode(N,{type:k.status=="VALID"?"success":"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.status=="VALID"?"有效":"失效"),1)]),_:2},1032,["type"])]),_:1}),e.createVNode(o,{label:"加入时间",prop:"createdTime",width:"170"}),e.createVNode(o,{label:"解锁时间",prop:"unlockTime",width:"170"})]),_:1}),e.createVNode(o,null,{default:e.withCtx(({row:k})=>[k.status=="VALID"&&V.$hasPer("BLACKLIST_UNLOCK")?(e.openBlock(),e.createBlock(x,{key:0,title:"确定要解锁吗?",onConfirm:a},{reference:e.withCtx(()=>[e.createVNode(c,{type:"warning",icon:"unlock"},{default:e.withCtx(()=>[e.createTextVNode("解锁")]),_:1})]),_:1})):e.createCommentVNode("",!0),k.status=="VALID"?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,icon:"edit",onClick:T=>r(k.userId)},{default:e.withCtx(()=>[e.createTextVNode("编辑")]),_:2},1032,["onClick"])),[[D,"ADD_TO_BLACKLIST"]]):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["condition"]),e.createVNode(E,{ref_key:"addBlacklistComp",ref:_,onSuccess:d,"hidden-entrance-slot":""},null,512),e.createVNode(I,{ref_key:"userDetail",ref:w},null,512)],64)}}}),v={install:(s,n)=>{let l=n.router,i=l.getRoutes().find(d=>d.path=="/");i&&i.meta&&l.addRoute({path:"/user",name:"User",redirect:"/user/list",component:i.meta.commonLayout,children:[{path:"list",name:"UserList",component:X},{path:"blacklist",name:"BlackListView",component:Z}]})}},O=(s,n)=>{const l=S();if(n.userDetailDialogTabs&&n.userDetailDialogTabs.length)for(let i of n.userDetailDialogTabs)l.userDetailDialogTabs.push(i);Y.forEach(i=>s.use(i)),s.use(v,n)},ee={install:O};b.UserDetailDialog=P,b.UserMobileComp=$,b.UserSelectComp=F,b.default=ee,b.install=O,b.useUserCoreConfigStore=S,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("pinia"),require("@pangu-backend-ui/common")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","@pangu-backend-ui/common"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b["pg-user-core"]={},b.Vue,b.pinia,b.common))})(this,function(b,e,O,j){"use strict";const z={key:0,class:"container"},q=e.defineComponent({__name:"UserMobileComponent",props:{userId:{type:Number,default:null},maskMobile:{type:String,default:null}},setup(s){const n=s,a=e.ref({plainMobile:null,loading:!1}),i=e.inject("http");function d(){a.value.plainMobile==null&&(a.value.loading=!0,i==null||i.get(`/api/user/${n.userId}/plainmobile`).then(l=>{a.value.plainMobile=l.data,a.value.loading=!1}).finally(()=>{a.value.loading=!1}))}return(l,_)=>{const r=e.resolveComponent("View"),h=e.resolveComponent("el-icon"),p=e.resolveComponent("Loading");return n.maskMobile!=null?(e.openBlock(),e.createElementBlock("div",z,[a.value.plainMobile==null?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.maskMobile),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.value.plainMobile),1)],64)),a.value.plainMobile==null&&!a.value.loading&&n.userId!=null?(e.openBlock(),e.createBlock(h,{key:2,class:"view-icon",onClick:d},{default:e.withCtx(()=>[e.createVNode(r)]),_:1})):e.createCommentVNode("",!0),a.value.loading?(e.openBlock(),e.createBlock(h,{key:3,class:"is-loading view-icon"},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}}),oe="",$=(s,n)=>{const a=s.__vccOpts||s;for(const[i,d]of n)a[i]=d;return a},B=$(q,[["__scopeId","data-v-76c9c9ae"]]),M={install:s=>{s.component("PgUserMobile",B)}},K=e.defineComponent({__name:"LoginHistory",props:["userId"],setup(s){const n=s,a=e.ref({userId:n.userId,loginTimeStart:null,loginTimeEnd:null}),i=e.ref([]);e.watch(i,_=>{_?(a.value.loginTimeStart=_[0],a.value.loginTimeEnd=_[1]):(a.value.loginTimeStart=null,a.value.loginTimeEnd=null)});const d=e.ref();function l(){d.value.search()}return(_,r)=>{const h=e.resolveComponent("el-date-picker"),p=e.resolveComponent("el-button"),V=e.resolveComponent("el-space"),w=e.resolveComponent("el-table-column"),m=e.resolveComponent("el-tag"),f=e.resolveComponent("pg-table");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(h,{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=c=>i.value=c),type:"datetimerange","range-separator":"-","start-placeholder":"登录开始时间","end-placeholder":"登录结束时间",clearable:""},null,8,["modelValue"]),e.createVNode(p,{type:"primary",icon:"search",onClick:l},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1}),e.createVNode(f,{ref_key:"historiesTable",ref:d,style:{"margin-top":"10px"},"data-url":"/api/user/login-history",condition:a.value},{columns:e.withCtx(()=>[e.createVNode(w,{prop:"createdTime",label:"登录时间",align:"center","show-overflow-tooltip":""}),e.createVNode(w,{prop:"ip",label:"登录IP",align:"center","show-overflow-tooltip":""}),e.createVNode(w,{prop:"runtimeName",label:"运行容器",align:"center","show-overflow-tooltip":""}),e.createVNode(w,{label:"登录方式",align:"center","show-overflow-tooltip":""},{default:e.withCtx(({row:c})=>[c.method==="SMS"?(e.openBlock(),e.createBlock(m,{key:0,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("短信登录")]),_:1})):e.createCommentVNode("",!0),c.method==="THIRD_PLATFORM"?(e.openBlock(),e.createBlock(m,{key:1,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("第三方平台")]),_:1})):e.createCommentVNode("",!0),c.method==="UNIVERIFY"?(e.openBlock(),e.createBlock(m,{key:2,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("一键登录")]),_:1})):e.createCommentVNode("",!0),c.method==="PASSWORD"?(e.openBlock(),e.createBlock(m,{key:3,type:"primary",size:"small"},{default:e.withCtx(()=>[e.createTextVNode("帐号密码")]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(w,{prop:"thirdPlatformName",label:"第三方登录",align:"center","show-overflow-tooltip":""}),e.createVNode(w,{prop:"versionCode",label:"版本代码",align:"center","show-overflow-tooltip":""}),e.createVNode(w,{prop:"versionName",label:"版本名称",align:"center","show-overflow-tooltip":""})]),_:1},8,["condition"])],64)}}}),S=O.defineStore("pg-user-core-config-store",()=>{const s=[];return s.push({name:"登录历史",code:"LOGIN_HISTORY",component:e.shallowRef(K)}),{userDetailDialogTabs:e.computed(()=>s)}}),E=e.defineComponent({__name:"AddBlacklistComp",props:{hiddenEntranceSlot:{type:Boolean,default:!1},userId:{type:Number,required:!1}},emits:["success"],setup(s,{expose:n,emit:a}){const i=s,d=e.inject("http"),l=e.ref(!1);let _=e.ref(null);function r(t){l.value=!0;const o=t??i.userId;if(!o)throw Error("未设置用户ID");_.value=o,w(_.value)}const h=e.ref({description:[{required:!0,message:"请输入加入黑名单的说明"}],unlockTime:[{required:!0,message:"解锁时间不能为空"}]}),p=e.ref({userId:null,unlockTime:null,permissions:[],description:null}),V=e.ref();function w(t){d==null||d.get(`/api/user/${t}/blacklist-and-all-permission-codes`).then(o=>{var u,N,x,y,D;(u=o.data)!=null&&u.info&&((N=o.data)!=null&&N.info.allowPermissionCodes&&(p.value.permissions=JSON.parse((x=o.data)==null?void 0:x.info.allowPermissionCodes)),p.value.userId=(y=o.data)==null?void 0:y.info.userId,p.value.unlockTime=o.data.info.unlockTime,p.value.description=o.data.info.description),V.value=(D=o.data)==null?void 0:D.permissionCodes})}const m=e.ref();function f(){var t;(t=m.value)==null||t.resetFields()}function c(){var t;(t=m.value)==null||t.validate((o,u)=>{o&&(d==null||d.post(`/api/user/${_.value}/blacklist`,p.value).then(N=>{l.value=!1,a("success")}))})}const g=[{text:"三天",value:()=>{const t=new Date;return t.setDate(t.getDate()+3),t}},{text:"七天",value:()=>{const t=new Date;return t.setDate(t.getDate()+7),t}},{text:"十五天",value:()=>{const t=new Date;return t.setDate(t.getDate()+15),t}},{text:"一个月",value:()=>{const t=new Date;return t.setMonth(t.getMonth()+1),t}},{text:"三个月",value:()=>{const t=new Date;return t.setMonth(t.getMonth()+3),t}},{text:"六个月",value:()=>{const t=new Date;return t.setMonth(t.getMonth()+6),t}},{text:"永久",value:()=>{const t=new Date;return t.setFullYear(t.getFullYear()+100),t}}];return n({show:r}),(t,o)=>{const u=e.resolveComponent("el-button"),N=e.resolveComponent("el-date-picker"),x=e.resolveComponent("el-form-item"),y=e.resolveComponent("el-checkbox"),D=e.resolveComponent("el-checkbox-group"),k=e.resolveComponent("el-input"),T=e.resolveComponent("el-form"),U=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[i.hiddenEntranceSlot?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",{key:0},()=>[e.createVNode(u,{icon:"lock",type:"warning",onClick:o[0]||(o[0]=C=>r())},{default:e.withCtx(()=>[e.createTextVNode("加入黑名单")]),_:1})]),e.createVNode(U,{modelValue:l.value,"onUpdate:modelValue":o[4]||(o[4]=C=>l.value=C),onClosed:f,title:"黑名单管理",width:"500"},{footer:e.withCtx(()=>[e.createVNode(u,{type:"primary",onClick:c},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1})]),default:e.withCtx(()=>[e.createVNode(T,{ref_key:"form",ref:m,"label-position":"top",rules:h.value,model:p.value},{default:e.withCtx(()=>[e.createVNode(x,{label:"解锁时间",prop:"unlockTime"},{default:e.withCtx(()=>[e.createVNode(N,{type:"datetime",shortcuts:g,modelValue:p.value.unlockTime,"onUpdate:modelValue":o[1]||(o[1]=C=>p.value.unlockTime=C)},null,8,["modelValue"])]),_:1}),e.createVNode(x,{label:"允许权限",prop:"allowPermissionCodes"},{default:e.withCtx(()=>[e.createVNode(D,{modelValue:p.value.permissions,"onUpdate:modelValue":o[2]||(o[2]=C=>p.value.permissions=C)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(C,L)=>(e.openBlock(),e.createBlock(y,{label:L,key:L},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(x,{label:"描述",prop:"description"},{default:e.withCtx(()=>[e.createVNode(k,{type:"textarea",modelValue:p.value.description,"onUpdate:modelValue":o[3]||(o[3]=C=>p.value.description=C)},null,8,["modelValue"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["modelValue"])],64)}}}),Y={key:0},I=e.defineComponent({__name:"UserDetailDialog",setup(s,{expose:n}){const a=S(),i=e.inject("http"),d=e.ref(!1),l=e.ref(),_=e.ref(),r=e.ref({activeName:a.userDetailDialogTabs[0].code,tabs:[]}),h=e.ref(!1);function p(g,t,o){h.value=!0,V(g),t&&(r.value.activeName=t),r.value.tabs.length=0,r.value.tabs=r.value.tabs.concat(a.userDetailDialogTabs),o&&(r.value.tabs=r.value.tabs.concat(o))}function V(g){i==null||i.get(`/api/user/${g}`).then(t=>{l.value=t.data,h.value=!1,d.value=!0,l.value.inBlacklist&&w(g)})}function w(g){i==null||i.get(`/api/user/${g}/blacklist`).then(t=>{_.value=t.data})}const m=e.ref();function f(){m.value.show(l.value.id)}function c(){l.value=null,_.value=null}return n({show:p}),(g,t)=>{const o=e.resolveComponent("el-descriptions-item"),u=e.resolveComponent("el-tag"),N=e.resolveComponent("el-descriptions"),x=e.resolveComponent("el-tab-pane"),y=e.resolveComponent("el-tabs"),D=e.resolveComponent("el-button"),k=e.resolveComponent("el-dialog"),T=e.resolveDirective("loading"),U=e.resolveDirective("permission");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k,{modelValue:d.value,"onUpdate:modelValue":t[1]||(t[1]=C=>d.value=C),title:"用户详情",width:"1300",onClosed:c},e.createSlots({default:e.withCtx(()=>[l.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(N,{border:""},{default:e.withCtx(()=>[e.createVNode(o,{label:"用户编号"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.id),1)]),_:1}),e.createVNode(o,{label:"用户昵称"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.nickname),1)]),_:1}),e.createVNode(o,{label:"手机号码"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(B,{"mask-mobile":l.value.mobile,"user-id":l.value.id,key:l.value.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(o,{label:"邀请编码"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.inviteCode),1)]),_:1}),e.createVNode(o,{label:"活动时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.touchTime),1)]),_:1}),e.createVNode(o,{label:"注册时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.createdTime),1)]),_:1}),e.createVNode(o,{label:"最后登陆"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.lastLoginTime),1)]),_:1}),e.createVNode(o,{label:"最后更新"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.updatedTime),1)]),_:1}),e.createVNode(o,{label:"上级用户"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.parentId),1)]),_:1}),e.createVNode(o,{label:"黑名单"},{default:e.withCtx(()=>[e.createVNode(u,{type:l.value.inBlacklist?"danger":"success"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.inBlacklist?"是":"否"),1)]),_:1},8,["type"])]),_:1}),e.createVNode(o,{label:"邀请关系"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.relationPath),1)]),_:1})]),_:1}),_.value?(e.openBlock(),e.createBlock(N,{key:0,style:{"margin-top":"10px"},border:"",column:"2"},{default:e.withCtx(()=>[e.createVNode(o,{label:"黑名单解锁时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value.unlockTime),1)]),_:1}),e.createVNode(o,{label:"加入时间"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value.createdTime),1)]),_:1}),e.createVNode(o,{label:"允许权限"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value.allowPermissionCodes?JSON.parse(_.value.allowPermissionCodes).join(", "):""),1)]),_:1}),e.createVNode(o,{label:"描述"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.value.description),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(y,{modelValue:r.value.activeName,"onUpdate:modelValue":t[0]||(t[0]=C=>r.value.activeName=C),key:`usr_tab_${l.value.id}`,style:{"margin-top":"10px"},type:"border-card"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.tabs,(C,L)=>(e.openBlock(),e.createBlock(x,{label:C.name,name:C.code,key:`user_detail_dialog_${C.code}`},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[r.value.activeName==C.code?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C.component),{key:`ud_tab_${C.code}`,userId:l.value.id},null,8,["userId"])):e.createCommentVNode("",!0)],1024))]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"]))])),[[T,h.value]]):e.createCommentVNode("",!0)]),_:2},[l.value?{name:"footer",fn:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(D,{icon:"lock",type:"warning",onClick:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.inBlacklist?"修改":"加入")+"黑名单",1)]),_:1})),[[U,"ADD_TO_BLACKLIST"]])]),key:"0"}:void 0]),1032,["modelValue"]),e.createVNode(E,{ref_key:"addBlacklistComp",ref:m,onSuccess:t[2]||(t[2]=C=>V(l.value.id)),"hidden-entrance-slot":""},null,512)],64)}}}),P={install:s=>{s.component("PgUserDetailDialog",I)}},A=e.defineComponent({__name:"UserSelectorComp",props:{modelValue:{required:!0,type:Number},pageSize:{type:Number,default:20}},emits:["update:modelValue"],setup(s,{emit:n}){const a=s,i=e.inject("http"),d=e.ref(a.modelValue);e.watch(d,p=>{n("update:modelValue",p)});const l=e.ref(!1),_=e.ref([]);let r=null;function h(p){p&&(l.value=!0,r&&clearTimeout(r),r=setTimeout(()=>{i==null||i.get("/api/user/keyword-search",{keyword:p,pageSize:a.pageSize}).then(V=>{_.value=V.data}).finally(()=>{l.value=!1})},200))}return(p,V)=>{const w=e.resolveComponent("el-option"),m=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(m,{modelValue:d.value,"onUpdate:modelValue":V[0]||(V[0]=f=>d.value=f),filterable:"",remote:"",loading:l.value,"remote-method":h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,f=>(e.openBlock(),e.createBlock(w,{key:f.id,value:f.id,label:`${f.id} / ${f.nickname} / ${f.mobile} / ${f.inviteCode}`},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{user:f},()=>[e.createTextVNode(e.toDisplayString(f.id)+" / "+e.toDisplayString(f.nickname)+" / "+e.toDisplayString(f.mobile)+" / "+e.toDisplayString(f.inviteCode),1)])]),_:2},1032,["value","label"]))),128))]),_:3},8,["modelValue","loading"])}}}),F={install:s=>{s.component("PgUserSelector",A)}},H=[M,P,F],J=s=>(e.pushScopeId("data-v-391c43be"),s=s(),e.popScopeId(),s),G={class:"page-layout"},W={style:{"margin-top":"10px"}},Q=J(()=>e.createElementVNode("template",{"slot-scope":"{row}"},null,-1)),X=e.defineComponent({__name:"list",setup(s){const n=e.ref({id:null,parentId:null,phone:null,nicekname:null,inviteCode:null}),a=e.ref(null);function i(){a.value.search()}const d=e.ref();function l(_){d.value.show(_.id)}return(_,r)=>{const h=e.resolveComponent("el-input"),p=e.resolveComponent("el-button"),V=e.resolveComponent("el-space"),w=e.resolveComponent("el-card"),m=e.resolveComponent("el-table-column"),f=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",G,[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(h,{modelValue:n.value.id,"onUpdate:modelValue":r[0]||(r[0]=c=>n.value.id=c),placeholder:"ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(h,{modelValue:n.value.parentId,"onUpdate:modelValue":r[1]||(r[1]=c=>n.value.parentId=c),placeholder:"父用户ID",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(h,{modelValue:n.value.phone,"onUpdate:modelValue":r[2]||(r[2]=c=>n.value.phone=c),placeholder:"手机号",style:{width:"120px"},clearable:""},null,8,["modelValue"]),e.createVNode(h,{modelValue:n.value.nicekname,"onUpdate:modelValue":r[3]||(r[3]=c=>n.value.nicekname=c),placeholder:"昵称",style:{width:"150px"},clearable:""},null,8,["modelValue"]),e.createVNode(h,{modelValue:n.value.inviteCode,"onUpdate:modelValue":r[4]||(r[4]=c=>n.value.inviteCode=c),placeholder:"邀请码",style:{width:"100px"},clearable:""},null,8,["modelValue"]),e.createVNode(p,{type:"primary",icon:"search",onClick:i},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createElementVNode("div",W,[e.createVNode(e.unref(j.PgTable),{ref_key:"userTable",ref:a,"data-url":"/api/user/page",condition:n.value,onRowDbClick:r[5]||(r[5]=c=>l(c))},{columns:e.withCtx(()=>[e.createVNode(m,{prop:"id",label:"UID",width:"80",align:"center"}),e.createVNode(m,{prop:"mobile",label:"手机",width:"115",align:"left","show-overflow-tooltip":""},{default:e.withCtx(c=>[(e.openBlock(),e.createBlock(B,{"mask-mobile":c.row.mobile,"user-id":c.row.id,key:c.row.id},null,8,["mask-mobile","user-id"]))]),_:1}),e.createVNode(m,{prop:"username",label:"用户名",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(m,{prop:"nickname",label:"昵称",width:"110",align:"left","show-overflow-tooltip":""}),e.createVNode(m,{prop:"inviteCode",label:"邀请码",width:"90",align:"center","show-overflow-tooltip":""}),e.createVNode(m,{prop:"avatar",label:"头像",width:"60",align:"center","show-overflow-tooltip":""},{default:e.withCtx(c=>[e.createVNode(f,{fit:"cover",size:30,src:c.row.avatar,"preview-teleported":"","preview-src-list":[c.row.avatar]},null,8,["src","preview-src-list"])]),_:1}),e.createVNode(m,{prop:"parentId",label:"上级ID",width:"80",align:"left","show-overflow-tooltip":""}),e.createVNode(m,{prop:"relationPath",label:"邀请关系","min-width":"150",align:"left","show-overflow-tooltip":""}),e.createVNode(m,{prop:"blackUnlockTime",label:"黑名单解锁",width:"145",align:"left","show-overflow-tooltip":""}),e.createVNode(m,{prop:"lastLoginTime",label:"最后登录时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(m,{prop:"createdTime",label:"创建时间",width:"145",align:"center","show-overflow-tooltip":""}),e.createVNode(m,{label:"操作",width:"220",fixed:"right"},{default:e.withCtx(()=>[Q]),_:1})]),_:1},8,["condition"])])]),e.createVNode(I,{ref_key:"userDetailDialog",ref:d},null,512)],64)}}}),le="",Z=$(X,[["__scopeId","data-v-391c43be"]]),v=e.defineComponent({__name:"BlackListView",setup(s){const n=e.inject("http"),a=e.ref({userId:null,status:"VALID"}),i=e.ref();function d(){i.value.search()}function l(V){n==null||n.post(`/api/user/blacklist/${V}/unlock`).then(w=>{d()})}const _=e.ref();function r(V){_.value.show(V)}const h=e.ref();function p(V){h.value.show(V)}return(V,w)=>{const m=e.resolveComponent("el-option"),f=e.resolveComponent("el-select"),c=e.resolveComponent("el-button"),g=e.resolveComponent("el-space"),t=e.resolveComponent("el-card"),o=e.resolveComponent("el-table-column"),u=e.resolveComponent("el-link"),N=e.resolveComponent("el-tag"),x=e.resolveComponent("el-popconfirm"),y=e.resolveComponent("pg-table"),D=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(A,{modelValue:a.value.userId,"onUpdate:modelValue":w[0]||(w[0]=k=>a.value.userId=k),clearable:"",style:{width:"300px"}},null,8,["modelValue"]),e.createVNode(f,{placeholder:"状态",modelValue:a.value.status,"onUpdate:modelValue":w[1]||(w[1]=k=>a.value.status=k),clearable:"",style:{width:"100px"}},{default:e.withCtx(()=>[e.createVNode(m,{value:"VALID",label:"有效"}),e.createVNode(m,{value:"INVALID",label:"失效"})]),_:1},8,["modelValue"]),e.createVNode(c,{icon:"search",type:"primary",onClick:d},{default:e.withCtx(()=>[e.createTextVNode("搜索")]),_:1})]),_:1})]),_:1}),e.createVNode(y,{ref_key:"table",ref:i,"data-url":"/api/user/blacklist",condition:a.value,style:{"margin-top":"10px"}},{columns:e.withCtx(()=>[e.createVNode(o,{label:"ID",prop:"id",width:"100"}),e.createVNode(o,{label:"用户信息"},{default:e.withCtx(()=>[e.createVNode(o,{label:"用户ID",width:"100"},{default:e.withCtx(({row:k})=>[e.createVNode(u,{type:"primary",onClick:T=>p(k.userId)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.userId),1)]),_:2},1032,["onClick"])]),_:1}),e.createVNode(o,{label:"手机号",width:"150"},{default:e.withCtx(({row:k})=>[e.createVNode(B,{"user-id":k.userId,"mask-mobile":k.userMobile},null,8,["user-id","mask-mobile"])]),_:1}),e.createVNode(o,{label:"用户昵称",prop:"userNickname"})]),_:1}),e.createVNode(o,{label:"限制信息"},{default:e.withCtx(()=>[e.createVNode(o,{label:"描述",prop:"description"}),e.createVNode(o,{label:"允许权限",prop:"allowPermissionCodes","show-overflow-tooltip":""}),e.createVNode(o,{label:"状态",prop:"status",align:"center",width:"100"},{default:e.withCtx(({row:k})=>[e.createVNode(N,{type:k.status=="VALID"?"success":"warning"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.status=="VALID"?"有效":"失效"),1)]),_:2},1032,["type"])]),_:1}),e.createVNode(o,{label:"加入时间",prop:"createdTime",width:"170"}),e.createVNode(o,{label:"解锁时间",prop:"unlockTime",width:"170"})]),_:1}),e.createVNode(o,null,{default:e.withCtx(({row:k})=>[k.status=="VALID"&&V.$hasPer("BLACKLIST_UNLOCK")?(e.openBlock(),e.createBlock(x,{key:0,title:"确定要解锁吗?",onConfirm:l},{reference:e.withCtx(()=>[e.createVNode(c,{type:"warning",icon:"unlock"},{default:e.withCtx(()=>[e.createTextVNode("解锁")]),_:1})]),_:1})):e.createCommentVNode("",!0),k.status=="VALID"?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,icon:"edit",onClick:T=>r(k.userId)},{default:e.withCtx(()=>[e.createTextVNode("编辑")]),_:2},1032,["onClick"])),[[D,"ADD_TO_BLACKLIST"]]):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["condition"]),e.createVNode(E,{ref_key:"addBlacklistComp",ref:_,onSuccess:d,"hidden-entrance-slot":""},null,512),e.createVNode(I,{ref_key:"userDetail",ref:h},null,512)],64)}}}),ee={install:(s,n)=>{let a=n.router,i=a.getRoutes().find(d=>d.path=="/");i&&i.meta&&a.addRoute({path:"/user",name:"User",redirect:"/user/list",component:i.meta.commonLayout,children:[{path:"list",name:"UserList",component:Z},{path:"blacklist",name:"BlackListView",component:v}]})}},R=(s,n)=>{const a=S();if(n.userDetailDialogTabs&&n.userDetailDialogTabs.length)for(let i of n.userDetailDialogTabs)a.userDetailDialogTabs.push(i);H.forEach(i=>s.use(i)),s.use(ee,n)},te={install:R};b.UserDetailDialog=P,b.UserMobileComp=M,b.UserSelectComp=F,b.default=te,b.install=R,b.useUserCoreConfigStore=S,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
6
6
|
};
|
|
7
7
|
userId: {
|
|
8
8
|
type: NumberConstructor;
|
|
9
|
-
required:
|
|
9
|
+
required: false;
|
|
10
10
|
};
|
|
11
11
|
}, {
|
|
12
12
|
http: Http | undefined;
|
|
@@ -312,7 +312,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
312
312
|
};
|
|
313
313
|
userId: {
|
|
314
314
|
type: NumberConstructor;
|
|
315
|
-
required:
|
|
315
|
+
required: false;
|
|
316
316
|
};
|
|
317
317
|
}>> & {
|
|
318
318
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
@@ -17,127 +17,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
17
17
|
tabs: {
|
|
18
18
|
name: string;
|
|
19
19
|
code: string;
|
|
20
|
-
component: string | import("vue").
|
|
21
|
-
new (...args: any[]): any;
|
|
22
|
-
__isFragment?: undefined;
|
|
23
|
-
__isTeleport?: undefined;
|
|
24
|
-
__isSuspense?: undefined;
|
|
25
|
-
} | {
|
|
26
|
-
[x: string]: any;
|
|
27
|
-
setup?: ((this: void, props: Readonly<import("@vue/shared").LooseRequired<any>>, ctx: {
|
|
28
|
-
attrs: {
|
|
29
|
-
[x: string]: unknown;
|
|
30
|
-
};
|
|
31
|
-
slots: Readonly<{
|
|
32
|
-
[name: string]: import("vue").Slot | undefined;
|
|
33
|
-
}>;
|
|
34
|
-
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
35
|
-
expose: (exposed?: Record<string, any> | undefined) => void;
|
|
36
|
-
}) => any) | undefined;
|
|
37
|
-
name?: string | undefined;
|
|
38
|
-
template?: string | object | undefined;
|
|
39
|
-
render?: Function | undefined;
|
|
40
|
-
components?: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>> | undefined;
|
|
41
|
-
directives?: Record<string, import("vue").Directive<any, any>> | undefined;
|
|
42
|
-
inheritAttrs?: boolean | undefined;
|
|
43
|
-
emits?: any;
|
|
44
|
-
expose?: string[] | undefined;
|
|
45
|
-
serverPrefetch?: (() => void | Promise<any>) | undefined;
|
|
46
|
-
compilerOptions?: {
|
|
47
|
-
isCustomElement?: ((tag: string) => boolean) | undefined;
|
|
48
|
-
whitespace?: "preserve" | "condense" | undefined;
|
|
49
|
-
comments?: boolean | undefined;
|
|
50
|
-
delimiters?: [string, string] | undefined;
|
|
51
|
-
} | undefined;
|
|
52
|
-
call?: ((this: unknown, ...args: unknown[]) => never) | undefined;
|
|
53
|
-
__isFragment?: undefined;
|
|
54
|
-
__isTeleport?: undefined;
|
|
55
|
-
__isSuspense?: undefined;
|
|
56
|
-
__defaults?: {} | undefined;
|
|
57
|
-
compatConfig?: {
|
|
58
|
-
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined;
|
|
59
|
-
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined;
|
|
60
|
-
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined;
|
|
61
|
-
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined;
|
|
62
|
-
GLOBAL_SET?: boolean | "suppress-warning" | undefined;
|
|
63
|
-
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined;
|
|
64
|
-
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined;
|
|
65
|
-
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined;
|
|
66
|
-
CONFIG_SILENT?: boolean | "suppress-warning" | undefined;
|
|
67
|
-
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined;
|
|
68
|
-
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined;
|
|
69
|
-
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined;
|
|
70
|
-
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined;
|
|
71
|
-
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined;
|
|
72
|
-
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined;
|
|
73
|
-
INSTANCE_SET?: boolean | "suppress-warning" | undefined;
|
|
74
|
-
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined;
|
|
75
|
-
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
76
|
-
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined;
|
|
77
|
-
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined;
|
|
78
|
-
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined;
|
|
79
|
-
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined;
|
|
80
|
-
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined;
|
|
81
|
-
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined;
|
|
82
|
-
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined;
|
|
83
|
-
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined;
|
|
84
|
-
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
85
|
-
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined;
|
|
86
|
-
WATCH_ARRAY?: boolean | "suppress-warning" | undefined;
|
|
87
|
-
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined;
|
|
88
|
-
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined;
|
|
89
|
-
CUSTOM_DIR?: boolean | "suppress-warning" | undefined;
|
|
90
|
-
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined;
|
|
91
|
-
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined;
|
|
92
|
-
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined;
|
|
93
|
-
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined;
|
|
94
|
-
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined;
|
|
95
|
-
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined;
|
|
96
|
-
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined;
|
|
97
|
-
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined;
|
|
98
|
-
FILTERS?: boolean | "suppress-warning" | undefined;
|
|
99
|
-
PRIVATE_APIS?: boolean | "suppress-warning" | undefined;
|
|
100
|
-
MODE?: 2 | 3 | ((comp: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | null) => 2 | 3) | undefined;
|
|
101
|
-
} | undefined;
|
|
102
|
-
data?: ((this: any, vm: any) => any) | undefined;
|
|
103
|
-
computed?: import("vue").ComputedOptions | undefined;
|
|
104
|
-
methods?: import("vue").MethodOptions | undefined;
|
|
105
|
-
watch?: {
|
|
106
|
-
[x: string]: (string | import("vue").WatchCallback<any, any> | ({
|
|
107
|
-
handler: string | import("vue").WatchCallback<any, any>;
|
|
108
|
-
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback<any, any> | ({
|
|
109
|
-
handler: string | import("vue").WatchCallback<any, any>;
|
|
110
|
-
} & import("vue").WatchOptions<boolean>))[];
|
|
111
|
-
} | undefined;
|
|
112
|
-
provide?: import("vue").ComponentProvideOptions | undefined;
|
|
113
|
-
inject?: {} | string[] | undefined;
|
|
114
|
-
filters?: Record<string, Function> | undefined;
|
|
115
|
-
mixins?: any[] | undefined;
|
|
116
|
-
extends?: any;
|
|
117
|
-
beforeCreate?: (() => void) | undefined;
|
|
118
|
-
created?: (() => void) | undefined;
|
|
119
|
-
beforeMount?: (() => void) | undefined;
|
|
120
|
-
mounted?: (() => void) | undefined;
|
|
121
|
-
beforeUpdate?: (() => void) | undefined;
|
|
122
|
-
updated?: (() => void) | undefined;
|
|
123
|
-
activated?: (() => void) | undefined;
|
|
124
|
-
deactivated?: (() => void) | undefined;
|
|
125
|
-
beforeDestroy?: (() => void) | undefined;
|
|
126
|
-
beforeUnmount?: (() => void) | undefined;
|
|
127
|
-
destroyed?: (() => void) | undefined;
|
|
128
|
-
unmounted?: (() => void) | undefined;
|
|
129
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
130
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
131
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | undefined;
|
|
132
|
-
delimiters?: [string, string] | undefined;
|
|
133
|
-
__differentiator?: string | number | symbol | undefined;
|
|
134
|
-
__isBuiltIn?: boolean | undefined;
|
|
135
|
-
__file?: string | undefined;
|
|
136
|
-
__name?: string | undefined;
|
|
137
|
-
beforeRouteEnter?: import("vue-router").NavigationGuardWithThis<undefined> | undefined;
|
|
138
|
-
beforeRouteUpdate?: import("vue-router").NavigationGuard | undefined;
|
|
139
|
-
beforeRouteLeave?: import("vue-router").NavigationGuard | undefined;
|
|
140
|
-
};
|
|
20
|
+
component: string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
141
21
|
}[];
|
|
142
22
|
}>;
|
|
143
23
|
loading: import("vue").Ref<boolean>;
|
|
@@ -184,7 +64,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
184
64
|
};
|
|
185
65
|
userId: {
|
|
186
66
|
type: NumberConstructor;
|
|
187
|
-
required:
|
|
67
|
+
required: false;
|
|
188
68
|
};
|
|
189
69
|
}, {
|
|
190
70
|
http: Http | undefined;
|
|
@@ -490,7 +370,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
490
370
|
};
|
|
491
371
|
userId: {
|
|
492
372
|
type: NumberConstructor;
|
|
493
|
-
required:
|
|
373
|
+
required: false;
|
|
494
374
|
};
|
|
495
375
|
}>> & {
|
|
496
376
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
@@ -49,7 +49,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
49
49
|
};
|
|
50
50
|
userId: {
|
|
51
51
|
type: NumberConstructor;
|
|
52
|
-
required:
|
|
52
|
+
required: false;
|
|
53
53
|
};
|
|
54
54
|
}, {
|
|
55
55
|
http: Http | undefined;
|
|
@@ -355,7 +355,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
355
355
|
};
|
|
356
356
|
userId: {
|
|
357
357
|
type: NumberConstructor;
|
|
358
|
-
required:
|
|
358
|
+
required: false;
|
|
359
359
|
};
|
|
360
360
|
}>> & {
|
|
361
361
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
@@ -411,127 +411,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
411
411
|
tabs: {
|
|
412
412
|
name: string;
|
|
413
413
|
code: string;
|
|
414
|
-
component: string | import("vue").
|
|
415
|
-
new (...args: any[]): any;
|
|
416
|
-
__isFragment?: undefined;
|
|
417
|
-
__isTeleport?: undefined;
|
|
418
|
-
__isSuspense?: undefined;
|
|
419
|
-
} | {
|
|
420
|
-
[x: string]: any;
|
|
421
|
-
setup?: ((this: void, props: Readonly<import("@vue/shared").LooseRequired<any>>, ctx: {
|
|
422
|
-
attrs: {
|
|
423
|
-
[x: string]: unknown;
|
|
424
|
-
};
|
|
425
|
-
slots: Readonly<{
|
|
426
|
-
[name: string]: import("vue").Slot | undefined;
|
|
427
|
-
}>;
|
|
428
|
-
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
429
|
-
expose: (exposed?: Record<string, any> | undefined) => void;
|
|
430
|
-
}) => any) | undefined;
|
|
431
|
-
name?: string | undefined;
|
|
432
|
-
template?: string | object | undefined;
|
|
433
|
-
render?: Function | undefined;
|
|
434
|
-
components?: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>> | undefined;
|
|
435
|
-
directives?: Record<string, import("vue").Directive<any, any>> | undefined;
|
|
436
|
-
inheritAttrs?: boolean | undefined;
|
|
437
|
-
emits?: any;
|
|
438
|
-
expose?: string[] | undefined;
|
|
439
|
-
serverPrefetch?: (() => void | Promise<any>) | undefined;
|
|
440
|
-
compilerOptions?: {
|
|
441
|
-
isCustomElement?: ((tag: string) => boolean) | undefined;
|
|
442
|
-
whitespace?: "preserve" | "condense" | undefined;
|
|
443
|
-
comments?: boolean | undefined;
|
|
444
|
-
delimiters?: [string, string] | undefined;
|
|
445
|
-
} | undefined;
|
|
446
|
-
call?: ((this: unknown, ...args: unknown[]) => never) | undefined;
|
|
447
|
-
__isFragment?: undefined;
|
|
448
|
-
__isTeleport?: undefined;
|
|
449
|
-
__isSuspense?: undefined;
|
|
450
|
-
__defaults?: {} | undefined;
|
|
451
|
-
compatConfig?: {
|
|
452
|
-
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined;
|
|
453
|
-
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined;
|
|
454
|
-
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined;
|
|
455
|
-
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined;
|
|
456
|
-
GLOBAL_SET?: boolean | "suppress-warning" | undefined;
|
|
457
|
-
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined;
|
|
458
|
-
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined;
|
|
459
|
-
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined;
|
|
460
|
-
CONFIG_SILENT?: boolean | "suppress-warning" | undefined;
|
|
461
|
-
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined;
|
|
462
|
-
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined;
|
|
463
|
-
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined;
|
|
464
|
-
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined;
|
|
465
|
-
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined;
|
|
466
|
-
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined;
|
|
467
|
-
INSTANCE_SET?: boolean | "suppress-warning" | undefined;
|
|
468
|
-
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined;
|
|
469
|
-
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
470
|
-
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined;
|
|
471
|
-
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined;
|
|
472
|
-
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined;
|
|
473
|
-
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined;
|
|
474
|
-
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined;
|
|
475
|
-
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined;
|
|
476
|
-
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined;
|
|
477
|
-
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined;
|
|
478
|
-
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
479
|
-
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined;
|
|
480
|
-
WATCH_ARRAY?: boolean | "suppress-warning" | undefined;
|
|
481
|
-
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined;
|
|
482
|
-
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined;
|
|
483
|
-
CUSTOM_DIR?: boolean | "suppress-warning" | undefined;
|
|
484
|
-
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined;
|
|
485
|
-
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined;
|
|
486
|
-
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined;
|
|
487
|
-
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined;
|
|
488
|
-
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined;
|
|
489
|
-
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined;
|
|
490
|
-
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined;
|
|
491
|
-
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined;
|
|
492
|
-
FILTERS?: boolean | "suppress-warning" | undefined;
|
|
493
|
-
PRIVATE_APIS?: boolean | "suppress-warning" | undefined;
|
|
494
|
-
MODE?: 2 | 3 | ((comp: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | null) => 2 | 3) | undefined;
|
|
495
|
-
} | undefined;
|
|
496
|
-
data?: ((this: any, vm: any) => any) | undefined;
|
|
497
|
-
computed?: import("vue").ComputedOptions | undefined;
|
|
498
|
-
methods?: import("vue").MethodOptions | undefined;
|
|
499
|
-
watch?: {
|
|
500
|
-
[x: string]: (string | import("vue").WatchCallback<any, any> | ({
|
|
501
|
-
handler: string | import("vue").WatchCallback<any, any>;
|
|
502
|
-
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback<any, any> | ({
|
|
503
|
-
handler: string | import("vue").WatchCallback<any, any>;
|
|
504
|
-
} & import("vue").WatchOptions<boolean>))[];
|
|
505
|
-
} | undefined;
|
|
506
|
-
provide?: import("vue").ComponentProvideOptions | undefined;
|
|
507
|
-
inject?: {} | string[] | undefined;
|
|
508
|
-
filters?: Record<string, Function> | undefined;
|
|
509
|
-
mixins?: any[] | undefined;
|
|
510
|
-
extends?: any;
|
|
511
|
-
beforeCreate?: (() => void) | undefined;
|
|
512
|
-
created?: (() => void) | undefined;
|
|
513
|
-
beforeMount?: (() => void) | undefined;
|
|
514
|
-
mounted?: (() => void) | undefined;
|
|
515
|
-
beforeUpdate?: (() => void) | undefined;
|
|
516
|
-
updated?: (() => void) | undefined;
|
|
517
|
-
activated?: (() => void) | undefined;
|
|
518
|
-
deactivated?: (() => void) | undefined;
|
|
519
|
-
beforeDestroy?: (() => void) | undefined;
|
|
520
|
-
beforeUnmount?: (() => void) | undefined;
|
|
521
|
-
destroyed?: (() => void) | undefined;
|
|
522
|
-
unmounted?: (() => void) | undefined;
|
|
523
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
524
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
525
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | undefined;
|
|
526
|
-
delimiters?: [string, string] | undefined;
|
|
527
|
-
__differentiator?: string | number | symbol | undefined;
|
|
528
|
-
__isBuiltIn?: boolean | undefined;
|
|
529
|
-
__file?: string | undefined;
|
|
530
|
-
__name?: string | undefined;
|
|
531
|
-
beforeRouteEnter?: import("vue-router").NavigationGuardWithThis<undefined> | undefined;
|
|
532
|
-
beforeRouteUpdate?: import("vue-router").NavigationGuard | undefined;
|
|
533
|
-
beforeRouteLeave?: import("vue-router").NavigationGuard | undefined;
|
|
534
|
-
};
|
|
414
|
+
component: string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
535
415
|
}[];
|
|
536
416
|
}>;
|
|
537
417
|
loading: import("vue").Ref<boolean>;
|
|
@@ -578,7 +458,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
578
458
|
};
|
|
579
459
|
userId: {
|
|
580
460
|
type: NumberConstructor;
|
|
581
|
-
required:
|
|
461
|
+
required: false;
|
|
582
462
|
};
|
|
583
463
|
}, {
|
|
584
464
|
http: Http | undefined;
|
|
@@ -884,7 +764,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
884
764
|
};
|
|
885
765
|
userId: {
|
|
886
766
|
type: NumberConstructor;
|
|
887
|
-
required:
|
|
767
|
+
required: false;
|
|
888
768
|
};
|
|
889
769
|
}>> & {
|
|
890
770
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
@@ -143,127 +143,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
143
143
|
tabs: {
|
|
144
144
|
name: string;
|
|
145
145
|
code: string;
|
|
146
|
-
component: string | import("vue").
|
|
147
|
-
new (...args: any[]): any;
|
|
148
|
-
__isFragment?: undefined;
|
|
149
|
-
__isTeleport?: undefined;
|
|
150
|
-
__isSuspense?: undefined;
|
|
151
|
-
} | {
|
|
152
|
-
[x: string]: any;
|
|
153
|
-
setup?: ((this: void, props: Readonly<import("@vue/shared").LooseRequired<any>>, ctx: {
|
|
154
|
-
attrs: {
|
|
155
|
-
[x: string]: unknown;
|
|
156
|
-
};
|
|
157
|
-
slots: Readonly<{
|
|
158
|
-
[name: string]: import("vue").Slot | undefined;
|
|
159
|
-
}>;
|
|
160
|
-
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
161
|
-
expose: (exposed?: Record<string, any> | undefined) => void;
|
|
162
|
-
}) => any) | undefined;
|
|
163
|
-
name?: string | undefined;
|
|
164
|
-
template?: string | object | undefined;
|
|
165
|
-
render?: Function | undefined;
|
|
166
|
-
components?: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>> | undefined;
|
|
167
|
-
directives?: Record<string, import("vue").Directive<any, any>> | undefined;
|
|
168
|
-
inheritAttrs?: boolean | undefined;
|
|
169
|
-
emits?: any;
|
|
170
|
-
expose?: string[] | undefined;
|
|
171
|
-
serverPrefetch?: (() => void | Promise<any>) | undefined;
|
|
172
|
-
compilerOptions?: {
|
|
173
|
-
isCustomElement?: ((tag: string) => boolean) | undefined;
|
|
174
|
-
whitespace?: "preserve" | "condense" | undefined;
|
|
175
|
-
comments?: boolean | undefined;
|
|
176
|
-
delimiters?: [string, string] | undefined;
|
|
177
|
-
} | undefined;
|
|
178
|
-
call?: ((this: unknown, ...args: unknown[]) => never) | undefined;
|
|
179
|
-
__isFragment?: undefined;
|
|
180
|
-
__isTeleport?: undefined;
|
|
181
|
-
__isSuspense?: undefined;
|
|
182
|
-
__defaults?: {} | undefined;
|
|
183
|
-
compatConfig?: {
|
|
184
|
-
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined;
|
|
185
|
-
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined;
|
|
186
|
-
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined;
|
|
187
|
-
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined;
|
|
188
|
-
GLOBAL_SET?: boolean | "suppress-warning" | undefined;
|
|
189
|
-
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined;
|
|
190
|
-
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined;
|
|
191
|
-
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined;
|
|
192
|
-
CONFIG_SILENT?: boolean | "suppress-warning" | undefined;
|
|
193
|
-
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined;
|
|
194
|
-
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined;
|
|
195
|
-
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined;
|
|
196
|
-
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined;
|
|
197
|
-
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined;
|
|
198
|
-
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined;
|
|
199
|
-
INSTANCE_SET?: boolean | "suppress-warning" | undefined;
|
|
200
|
-
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined;
|
|
201
|
-
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
202
|
-
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined;
|
|
203
|
-
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined;
|
|
204
|
-
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined;
|
|
205
|
-
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined;
|
|
206
|
-
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined;
|
|
207
|
-
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined;
|
|
208
|
-
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined;
|
|
209
|
-
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined;
|
|
210
|
-
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
211
|
-
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined;
|
|
212
|
-
WATCH_ARRAY?: boolean | "suppress-warning" | undefined;
|
|
213
|
-
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined;
|
|
214
|
-
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined;
|
|
215
|
-
CUSTOM_DIR?: boolean | "suppress-warning" | undefined;
|
|
216
|
-
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined;
|
|
217
|
-
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined;
|
|
218
|
-
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined;
|
|
219
|
-
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined;
|
|
220
|
-
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined;
|
|
221
|
-
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined;
|
|
222
|
-
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined;
|
|
223
|
-
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined;
|
|
224
|
-
FILTERS?: boolean | "suppress-warning" | undefined;
|
|
225
|
-
PRIVATE_APIS?: boolean | "suppress-warning" | undefined;
|
|
226
|
-
MODE?: 2 | 3 | ((comp: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | null) => 2 | 3) | undefined;
|
|
227
|
-
} | undefined;
|
|
228
|
-
data?: ((this: any, vm: any) => any) | undefined;
|
|
229
|
-
computed?: import("vue").ComputedOptions | undefined;
|
|
230
|
-
methods?: import("vue").MethodOptions | undefined;
|
|
231
|
-
watch?: {
|
|
232
|
-
[x: string]: (string | import("vue").WatchCallback<any, any> | ({
|
|
233
|
-
handler: string | import("vue").WatchCallback<any, any>;
|
|
234
|
-
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback<any, any> | ({
|
|
235
|
-
handler: string | import("vue").WatchCallback<any, any>;
|
|
236
|
-
} & import("vue").WatchOptions<boolean>))[];
|
|
237
|
-
} | undefined;
|
|
238
|
-
provide?: import("vue").ComponentProvideOptions | undefined;
|
|
239
|
-
inject?: {} | string[] | undefined;
|
|
240
|
-
filters?: Record<string, Function> | undefined;
|
|
241
|
-
mixins?: any[] | undefined;
|
|
242
|
-
extends?: any;
|
|
243
|
-
beforeCreate?: (() => void) | undefined;
|
|
244
|
-
created?: (() => void) | undefined;
|
|
245
|
-
beforeMount?: (() => void) | undefined;
|
|
246
|
-
mounted?: (() => void) | undefined;
|
|
247
|
-
beforeUpdate?: (() => void) | undefined;
|
|
248
|
-
updated?: (() => void) | undefined;
|
|
249
|
-
activated?: (() => void) | undefined;
|
|
250
|
-
deactivated?: (() => void) | undefined;
|
|
251
|
-
beforeDestroy?: (() => void) | undefined;
|
|
252
|
-
beforeUnmount?: (() => void) | undefined;
|
|
253
|
-
destroyed?: (() => void) | undefined;
|
|
254
|
-
unmounted?: (() => void) | undefined;
|
|
255
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
256
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
257
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | undefined;
|
|
258
|
-
delimiters?: [string, string] | undefined;
|
|
259
|
-
__differentiator?: string | number | symbol | undefined;
|
|
260
|
-
__isBuiltIn?: boolean | undefined;
|
|
261
|
-
__file?: string | undefined;
|
|
262
|
-
__name?: string | undefined;
|
|
263
|
-
beforeRouteEnter?: import("vue-router").NavigationGuardWithThis<undefined> | undefined;
|
|
264
|
-
beforeRouteUpdate?: import("vue-router").NavigationGuard | undefined;
|
|
265
|
-
beforeRouteLeave?: import("vue-router").NavigationGuard | undefined;
|
|
266
|
-
};
|
|
146
|
+
component: string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
267
147
|
}[];
|
|
268
148
|
}>;
|
|
269
149
|
loading: import("vue").Ref<boolean>;
|
|
@@ -310,7 +190,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
310
190
|
};
|
|
311
191
|
userId: {
|
|
312
192
|
type: NumberConstructor;
|
|
313
|
-
required:
|
|
193
|
+
required: false;
|
|
314
194
|
};
|
|
315
195
|
}, {
|
|
316
196
|
http: import("@pangu-backend-ui/common").Http | undefined;
|
|
@@ -616,7 +496,7 @@ declare const _sfc_main: import("vue").DefineComponent<{}, {
|
|
|
616
496
|
};
|
|
617
497
|
userId: {
|
|
618
498
|
type: NumberConstructor;
|
|
619
|
-
required:
|
|
499
|
+
required: false;
|
|
620
500
|
};
|
|
621
501
|
}>> & {
|
|
622
502
|
onSuccess?: ((...args: any[]) => any) | undefined;
|