import{d as O,f as N,ao as R,e as f,u as s,k as r}from"./vue-vendor-CxLCUzY4.js";import{B as A,a2 as S}from"./antd-vue-vendor-CDWW6V_M.js";import{bo as k,bz as G,C,K as D,aO as e,bA as d}from"./index-B_2CoVdl.js";import"./vxe-table-vendor-B5h3MVdD.js";const P="/assets/no-data-BKo151DF.svg",h="/assets/net-error-sXkbaH3y.svg",L=O({name:"ErrorPage",props:{status:{type:Number,default:e.PAGE_NOT_FOUND},title:{type:String,default:""},subTitle:{type:String,default:""},full:{type:Boolean,default:!1}},setup(n){const a=N(new Map),{query:p}=R(),o=k(),c=G(),{t}=D(),{prefixCls:E}=C("app-exception-page"),x=f(()=>{const{status:l}=p,{status:i}=n;return Number(l)||i}),_=f(()=>s(a).get(s(x))),b=t("sys.exception.backLogin"),u=t("sys.exception.backHome");return s(a).set(e.PAGE_NOT_ACCESS,{title:"403",status:`${e.PAGE_NOT_ACCESS}`,subTitle:t("sys.exception.subTitle403"),btnText:n.full?b:u,handler:()=>n.full?o(d.BASE_LOGIN):o()}),s(a).set(e.PAGE_NOT_FOUND,{title:"404",status:`${e.PAGE_NOT_FOUND}`,subTitle:t("sys.exception.subTitle404"),btnText:n.full?b:u,handler:()=>n.full?o(d.BASE_LOGIN):o()}),s(a).set(e.ERROR,{title:"500",status:`${e.ERROR}`,subTitle:t("sys.exception.subTitle500"),btnText:u,handler:()=>o()}),s(a).set(e.PAGE_NOT_DATA,{title:t("sys.exception.noDataTitle"),subTitle:"",btnText:t("common.redo"),handler:()=>c(),icon:P}),s(a).set(e.NET_WORK_ERROR,{title:t("sys.exception.networkErrorTitle"),subTitle:t("sys.exception.networkErrorSubTitle"),btnText:t("common.redo"),handler:()=>c(),icon:h}),()=>{const{title:l,subTitle:i,btnText:T,icon:m,handler:g,status:y}=s(_)||{};return r(S,{class:E,status:y,title:n.title||l,"sub-title":n.subTitle||i},{extra:()=>T&&r(A,{type:"primary",onClick:g},{default:()=>T}),icon:()=>m?r("img",{src:m},null):null})}}});export{L as default};
