diff --git a/public/assets/401-DXe-DH5E.js b/public/assets/401-BnjWydF6.js similarity index 92% rename from public/assets/401-DXe-DH5E.js rename to public/assets/401-BnjWydF6.js index 9c89652..e65ee43 100644 --- a/public/assets/401-DXe-DH5E.js +++ b/public/assets/401-BnjWydF6.js @@ -1 +1 @@ -import{_}from"./index-fNs72j9w.js";import{D as d,G as e,U as a,H as o,P as t,I as r,C as p,V as u}from"./vue-DweYBrEc.js";const f={},m={class:"page"},g={class:"container"},v={class:"warning"},b={class:"page-footer"};function k(s,n){const l=r("router-link"),i=r("el-button"),c=r("el-button-group");return p(),d("div",m,[e("div",g,[n[1]||(n[1]=e("div",{class:"fbi"},"401 WARNING",-1)),e("div",v,a(s.$t("401.noPowerTip")),1),e("div",b,[o(c,null,{default:t(()=>[o(i,{size:"large",type:"info"},{default:t(()=>[o(l,{class:"stopcode-a",to:"/"},{default:t(()=>[u(a(s.$t("404.Return to home page")),1)]),_:1})]),_:1}),o(i,{size:"large",type:"info"},{default:t(()=>[o(l,{class:"stopcode-a",to:""},{default:t(()=>[e("span",{onClick:n[0]||(n[0]=N=>s.$router.back())},a(s.$t("404.Back to previous page")),1)]),_:1})]),_:1})]),_:1})])])])}const C=_(f,[["render",k],["__scopeId","data-v-b6724a97"]]);export{C as default}; +import{_}from"./index-BIzd9_wD.js";import{D as d,G as e,U as a,H as o,P as t,I as r,C as p,V as u}from"./vue-DweYBrEc.js";const f={},m={class:"page"},g={class:"container"},v={class:"warning"},b={class:"page-footer"};function k(s,n){const l=r("router-link"),i=r("el-button"),c=r("el-button-group");return p(),d("div",m,[e("div",g,[n[1]||(n[1]=e("div",{class:"fbi"},"401 WARNING",-1)),e("div",v,a(s.$t("401.noPowerTip")),1),e("div",b,[o(c,null,{default:t(()=>[o(i,{size:"large",type:"info"},{default:t(()=>[o(l,{class:"stopcode-a",to:"/"},{default:t(()=>[u(a(s.$t("404.Return to home page")),1)]),_:1})]),_:1}),o(i,{size:"large",type:"info"},{default:t(()=>[o(l,{class:"stopcode-a",to:""},{default:t(()=>[e("span",{onClick:n[0]||(n[0]=N=>s.$router.back())},a(s.$t("404.Back to previous page")),1)]),_:1})]),_:1})]),_:1})])])])}const C=_(f,[["render",k],["__scopeId","data-v-b6724a97"]]);export{C as default}; diff --git a/public/assets/404-rz5fLt77.js b/public/assets/404-DwmMkGOd.js similarity index 95% rename from public/assets/404-rz5fLt77.js rename to public/assets/404-DwmMkGOd.js index 8b569e8..92a4f56 100644 --- a/public/assets/404-rz5fLt77.js +++ b/public/assets/404-DwmMkGOd.js @@ -1 +1 @@ -import{B as m,b as _,o as v,j as f,D as h,G as e,U as o,V as n,H as c,P as d,I as g,a0 as k,C}from"./vue-DweYBrEc.js";import{_ as $}from"./index-fNs72j9w.js";const B="/assets/qr-CamScR9_.png",b={class:"page"},w={class:"container"},M={class:"tip"},R={class:"complete"},V={class:"percentage"},I={class:"details"},N={class:"stopcode"},T={class:"stopcode-text"},q={class:"stopcode-text"},y=m({__name:"404",setup(D){const p=k(),a=_(0);var r=null;function u(){a.value+=Math.floor(Math.random()*50),a.value>=100?(a.value=100,p.back()):i()}function i(){r=setTimeout(u,Math.random()*500+500)}return v(()=>{i()}),f(()=>{clearTimeout(r)}),(t,s)=>{const l=g("router-link");return C(),h("div",b,[e("div",w,[s[3]||(s[3]=e("div",{class:"font-h1"},":(",-1)),e("div",M,o(t.$t("404.problems tip")),1),e("div",R,[n(o(t.$t("Complete"))+" ",1),e("span",V,o(a.value),1),s[1]||(s[1]=n("% "))]),e("div",I,[s[2]||(s[2]=e("div",{class:"qr-image"},[e("img",{src:B,alt:"QR Code"})],-1)),e("div",N,[e("div",T,o(t.$t("404.We will automatically return to the previous page when we are finished")),1),e("div",q,[c(l,{class:"stopcode-a",to:""},{default:d(()=>[e("span",{onClick:s[0]||(s[0]=S=>t.$router.back())},o(t.$t("404.Back to previous page")),1)]),_:1}),c(l,{class:"stopcode-a",to:"/"},{default:d(()=>[n(o(t.$t("404.Return to home page")),1)]),_:1})])])])])])}}}),x=$(y,[["__scopeId","data-v-1e5abc9c"]]);export{x as default}; +import{B as m,b as _,o as v,j as f,D as h,G as e,U as o,V as n,H as c,P as d,I as g,a0 as k,C}from"./vue-DweYBrEc.js";import{_ as $}from"./index-BIzd9_wD.js";const B="/assets/qr-CamScR9_.png",b={class:"page"},w={class:"container"},M={class:"tip"},R={class:"complete"},V={class:"percentage"},I={class:"details"},N={class:"stopcode"},T={class:"stopcode-text"},q={class:"stopcode-text"},y=m({__name:"404",setup(D){const p=k(),a=_(0);var r=null;function u(){a.value+=Math.floor(Math.random()*50),a.value>=100?(a.value=100,p.back()):i()}function i(){r=setTimeout(u,Math.random()*500+500)}return v(()=>{i()}),f(()=>{clearTimeout(r)}),(t,s)=>{const l=g("router-link");return C(),h("div",b,[e("div",w,[s[3]||(s[3]=e("div",{class:"font-h1"},":(",-1)),e("div",M,o(t.$t("404.problems tip")),1),e("div",R,[n(o(t.$t("Complete"))+" ",1),e("span",V,o(a.value),1),s[1]||(s[1]=n("% "))]),e("div",I,[s[2]||(s[2]=e("div",{class:"qr-image"},[e("img",{src:B,alt:"QR Code"})],-1)),e("div",N,[e("div",T,o(t.$t("404.We will automatically return to the previous page when we are finished")),1),e("div",q,[c(l,{class:"stopcode-a",to:""},{default:d(()=>[e("span",{onClick:s[0]||(s[0]=S=>t.$router.back())},o(t.$t("404.Back to previous page")),1)]),_:1}),c(l,{class:"stopcode-a",to:"/"},{default:d(()=>[n(o(t.$t("404.Return to home page")),1)]),_:1})])])])])])}}}),x=$(y,[["__scopeId","data-v-1e5abc9c"]]);export{x as default}; diff --git a/public/assets/add-BKa1i-ju.js b/public/assets/add-BKa1i-ju.js deleted file mode 100644 index 38c84e9..0000000 --- a/public/assets/add-BKa1i-ju.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./add.vue_vue_type_script_setup_true_lang-CNhJc_Y2.js";import"./vue-DweYBrEc.js";import"./index-BlEwok4a.js";import"./index-CgMrKa77.js";import"./index-fNs72j9w.js";import"./index-DMA3A9_B.js";import"./validate-CEOscgyN.js";export{o as default}; diff --git a/public/assets/add-wR5uq2Rc.js b/public/assets/add-wR5uq2Rc.js new file mode 100644 index 0000000..2e5db92 --- /dev/null +++ b/public/assets/add-wR5uq2Rc.js @@ -0,0 +1 @@ +import{_ as o}from"./add.vue_vue_type_script_setup_true_lang-CiNGN5ZK.js";import"./vue-DweYBrEc.js";import"./index-Uyc56W3P.js";import"./index-BQ-QT2OB.js";import"./index-BIzd9_wD.js";import"./index-DdhozyMV.js";import"./validate-DJPb9IIE.js";export{o as default}; diff --git a/public/assets/add.vue_vue_type_script_setup_true_lang-CNhJc_Y2.js b/public/assets/add.vue_vue_type_script_setup_true_lang-CiNGN5ZK.js similarity index 98% rename from public/assets/add.vue_vue_type_script_setup_true_lang-CNhJc_Y2.js rename to public/assets/add.vue_vue_type_script_setup_true_lang-CiNGN5ZK.js index 76c6adf..b036bcd 100644 --- a/public/assets/add.vue_vue_type_script_setup_true_lang-CNhJc_Y2.js +++ b/public/assets/add.vue_vue_type_script_setup_true_lang-CiNGN5ZK.js @@ -1,2 +1,2 @@ -import{B as Ae,a as q,C as d,D as _e,O as m,u as n,W as g,a7 as S,a6 as N,a8 as Me,I as _,X as F,P as v,H as b,G as Ee,F as De,V as O,U as W,_ as Ie}from"./vue-DweYBrEc.js";import{F as f}from"./index-BlEwok4a.js";import{c as Pe,b as h}from"./validate-CEOscgyN.js";import{c as R,j as Ue,e as Se,x as qe}from"./index-fNs72j9w.js";import{i as M}from"./index-CgMrKa77.js";const k="/admin/routine.Config/",B=new Map([["index",k+"index"],["add",k+"add"],["edit",k+"edit"],["del",k+"del"],["sendTestMail",k+"sendTestMail"]]);function je(){return R({url:B.get("index"),method:"get"})}function Re(c,y){return R({url:B.get(c),method:"post",data:y},{showSuccessMessage:!0})}function Ge(c){return R({url:B.get("del"),method:"DELETE",params:{ids:c}},{showSuccessMessage:!0})}function Le(c,y){return R({url:B.get("sendTestMail"),method:"POST",data:Object.assign({},c,{testMail:y})},{showSuccessMessage:!0})}const Be=Ae({__name:"createData",props:{dataTitle:{default:Ue.global.t("utils.Var")},modelValue:{default:()=>({name:"",title:"",type:"",tip:"",rule:[],extend:"",dict:"",inputExtend:""})},options:{},excludeInputTypes:{default:()=>[]},excludeValidatorRule:{default:()=>[]}},emits:["update:modelValue"],setup(c,{emit:y}){var w,V,u,E,D,C,I,P,U,A,r,j,G,L,$,H,X,J,Q,Y,Z,ee,te,le,ae,oe,ie,ne,ue,se,de,re;const{t:i}=Ue.global,t=c,x=["radio","checkbox","select","selects"],e=q({name:{show:((V=(w=t.options)==null?void 0:w.name)==null?void 0:V.show)!==!1,value:t.modelValue.name,title:((E=(u=t.options)==null?void 0:u.name)==null?void 0:E.title)??t.dataTitle+i("utils.Name")},title:{show:((C=(D=t.options)==null?void 0:D.title)==null?void 0:C.show)!==!1,value:t.modelValue.title,title:((P=(I=t.options)==null?void 0:I.title)==null?void 0:P.title)??t.dataTitle+i("utils.Title")},type:{show:((A=(U=t.options)==null?void 0:U.type)==null?void 0:A.show)!==!1,value:t.modelValue.type,title:((j=(r=t.options)==null?void 0:r.type)==null?void 0:j.title)??t.dataTitle+i("utils.type")},tip:{show:((L=(G=t.options)==null?void 0:G.tip)==null?void 0:L.show)!==!1,value:t.modelValue.tip,title:((H=($=t.options)==null?void 0:$.tip)==null?void 0:H.title)??i("utils.Tip")},rule:{show:((J=(X=t.options)==null?void 0:X.rule)==null?void 0:J.show)!==!1,value:t.modelValue.rule,title:((Y=(Q=t.options)==null?void 0:Q.rule)==null?void 0:Y.title)??i("utils.Rule")},extend:{show:((ee=(Z=t.options)==null?void 0:Z.extend)==null?void 0:ee.show)!==!1,value:t.modelValue.extend,title:((le=(te=t.options)==null?void 0:te.extend)==null?void 0:le.title)??"FormItem "+i("utils.Extend")},dict:{show:((oe=(ae=t.options)==null?void 0:ae.dict)==null?void 0:oe.show)!==!1,value:t.modelValue.dict,title:((ne=(ie=t.options)==null?void 0:ie.dict)==null?void 0:ne.title)??i("utils.Dict")},inputExtend:{show:((se=(ue=t.options)==null?void 0:ue.inputExtend)==null?void 0:se.show)!==!1,value:t.modelValue.inputExtend,title:((re=(de=t.options)==null?void 0:de.inputExtend)==null?void 0:re.title)??"Input "+i("utils.Extend")}}),o=q({validators:{},inputTypes:{}}),T=y,l=()=>{T("update:modelValue",{name:e.name.value??"",title:e.title.value??"",type:e.type.value??"",tip:e.tip.value??"",rule:e.rule.value??[],extend:e.extend.value??"",dict:x.includes(e.type.value??"")?e.dict.value??"":"",inputExtend:e.inputExtend.value??""})};return(()=>{let K={};for(const p in M)t.excludeInputTypes.includes(M[p])||(K[M[p]]=M[p]);o.inputTypes=K;let a={};for(const p in Pe)t.excludeValidatorRule.includes(p)||(a[p]=Pe[p]);o.validators=a,l()})(),(K,a)=>{var p,pe,me,fe,ce,ge,ye,Ve,ve,be,he,xe,we,Ce,ke,Te;return d(),_e("div",null,[e.name.show?(d(),m(f,{key:0,label:e.name.title,type:"string",modelValue:e.name.value,"onUpdate:modelValue":a[0]||(a[0]=s=>e.name.value=s),placeholder:n(i)("Please input field",{field:e.name.title}),"input-attr":{onChange:l,...(pe=(p=t.options)==null?void 0:p.name)==null?void 0:pe.inputAttr},prop:"name"},null,8,["label","modelValue","placeholder","input-attr"])):g("",!0),e.title.show?(d(),m(f,{key:1,label:e.title.title,type:"string",modelValue:e.title.value,"onUpdate:modelValue":a[1]||(a[1]=s=>e.title.value=s),placeholder:n(i)("Please input field",{field:e.title.title}),"input-attr":{onChange:l,...(fe=(me=t.options)==null?void 0:me.title)==null?void 0:fe.inputAttr},prop:"title"},null,8,["label","modelValue","placeholder","input-attr"])):g("",!0),e.type.show?(d(),m(f,{key:2,label:e.type.title,type:"select",modelValue:e.type.value,"onUpdate:modelValue":a[2]||(a[2]=s=>e.type.value=s),placeholder:n(i)("Please select field",{field:e.type.title}),"input-attr":{onChange:l,content:o.inputTypes,...(ge=(ce=t.options)==null?void 0:ce.type)==null?void 0:ge.inputAttr},prop:"type"},null,8,["label","modelValue","placeholder","input-attr"])):g("",!0),e.dict.show&&x.includes(e.type.value)?(d(),m(f,{key:3,label:e.dict.title,type:"textarea",modelValue:e.dict.value,"onUpdate:modelValue":a[3]||(a[3]=s=>e.dict.value=s),"input-attr":{rows:3,placeholder:n(i)("utils.One line at a time, without quotation marks, for example: key1=value1"),onChange:l,...(Ve=(ye=t.options)==null?void 0:ye.dict)==null?void 0:Ve.inputAttr},prop:"dict",onKeyup:a[4]||(a[4]=S(N(()=>{},["stop"]),["enter"]))},null,8,["label","modelValue","input-attr"])):g("",!0),e.tip.show?(d(),m(f,{key:4,label:e.tip.title,type:"string",modelValue:e.tip.value,"onUpdate:modelValue":a[5]||(a[5]=s=>e.tip.value=s),placeholder:n(i)("Please input field",{field:e.tip.title}),"input-attr":{onChange:l,...(be=(ve=t.options)==null?void 0:ve.tip)==null?void 0:be.inputAttr},prop:"tip"},null,8,["label","modelValue","placeholder","input-attr"])):g("",!0),e.rule.show?(d(),m(f,{key:5,label:e.rule.title,type:"selects",modelValue:e.rule.value,"onUpdate:modelValue":a[6]||(a[6]=s=>e.rule.value=s),placeholder:n(i)("Please select field",{field:e.rule.title}),"input-attr":{onChange:l,content:o.validators,...(xe=(he=t.options)==null?void 0:he.rule)==null?void 0:xe.inputAttr},prop:"rule"},null,8,["label","modelValue","placeholder","input-attr"])):g("",!0),e.extend.show?(d(),m(f,{key:6,label:e.extend.title,type:"textarea",modelValue:e.extend.value,"onUpdate:modelValue":a[7]||(a[7]=s=>e.extend.value=s),"input-attr":{onChange:l,placeholder:n(i)("utils.One attribute per line without quotation marks(formitem)"),...(Ce=(we=t.options)==null?void 0:we.extend)==null?void 0:Ce.inputAttr},prop:"extend",onKeyup:a[8]||(a[8]=S(N(()=>{},["stop"]),["enter"]))},null,8,["label","modelValue","input-attr"])):g("",!0),e.inputExtend.show?(d(),m(f,{key:7,label:e.inputExtend.title,type:"textarea",modelValue:e.inputExtend.value,"onUpdate:modelValue":a[9]||(a[9]=s=>e.inputExtend.value=s),"input-attr":{onChange:l,placeholder:n(i)("utils.Extended properties of Input, one line without quotation marks, such as: size=large"),...(Te=(ke=t.options)==null?void 0:ke.inputExtend)==null?void 0:Te.inputAttr},prop:"inputExtend",onKeyup:a[10]||(a[10]=S(N(()=>{},["stop"]),["enter"]))},null,8,["label","modelValue","input-attr"])):g("",!0)])}}}),Ke={class:"title"},$e=Ae({__name:"add",props:{modelValue:{type:Boolean,default:!1},configGroup:{default:()=>({})}},emits:["update:modelValue"],setup(c,{emit:y}){const i=Se(),t=c,x=y,e=()=>{x("update:modelValue",!1)},{t:o}=qe.useI18n(),T=Me("formRef"),l=q({inputTypes:{},labelWidth:180,submitLoading:!1,addConfig:{group:"",weigh:0,content:""},formItemData:{dict:`key1=value1 +import{B as Ae,a as q,C as d,D as _e,O as m,u as n,W as g,a7 as S,a6 as N,a8 as Me,I as _,X as F,P as v,H as b,G as Ee,F as De,V as O,U as W,_ as Ie}from"./vue-DweYBrEc.js";import{F as f}from"./index-Uyc56W3P.js";import{c as Pe,b as h}from"./validate-DJPb9IIE.js";import{c as R,j as Ue,e as Se,x as qe}from"./index-BIzd9_wD.js";import{i as M}from"./index-BQ-QT2OB.js";const k="/admin/routine.Config/",B=new Map([["index",k+"index"],["add",k+"add"],["edit",k+"edit"],["del",k+"del"],["sendTestMail",k+"sendTestMail"]]);function je(){return R({url:B.get("index"),method:"get"})}function Re(c,y){return R({url:B.get(c),method:"post",data:y},{showSuccessMessage:!0})}function Ge(c){return R({url:B.get("del"),method:"DELETE",params:{ids:c}},{showSuccessMessage:!0})}function Le(c,y){return R({url:B.get("sendTestMail"),method:"POST",data:Object.assign({},c,{testMail:y})},{showSuccessMessage:!0})}const Be=Ae({__name:"createData",props:{dataTitle:{default:Ue.global.t("utils.Var")},modelValue:{default:()=>({name:"",title:"",type:"",tip:"",rule:[],extend:"",dict:"",inputExtend:""})},options:{},excludeInputTypes:{default:()=>[]},excludeValidatorRule:{default:()=>[]}},emits:["update:modelValue"],setup(c,{emit:y}){var w,V,u,E,D,C,I,P,U,A,r,j,G,L,$,H,X,J,Q,Y,Z,ee,te,le,ae,oe,ie,ne,ue,se,de,re;const{t:i}=Ue.global,t=c,x=["radio","checkbox","select","selects"],e=q({name:{show:((V=(w=t.options)==null?void 0:w.name)==null?void 0:V.show)!==!1,value:t.modelValue.name,title:((E=(u=t.options)==null?void 0:u.name)==null?void 0:E.title)??t.dataTitle+i("utils.Name")},title:{show:((C=(D=t.options)==null?void 0:D.title)==null?void 0:C.show)!==!1,value:t.modelValue.title,title:((P=(I=t.options)==null?void 0:I.title)==null?void 0:P.title)??t.dataTitle+i("utils.Title")},type:{show:((A=(U=t.options)==null?void 0:U.type)==null?void 0:A.show)!==!1,value:t.modelValue.type,title:((j=(r=t.options)==null?void 0:r.type)==null?void 0:j.title)??t.dataTitle+i("utils.type")},tip:{show:((L=(G=t.options)==null?void 0:G.tip)==null?void 0:L.show)!==!1,value:t.modelValue.tip,title:((H=($=t.options)==null?void 0:$.tip)==null?void 0:H.title)??i("utils.Tip")},rule:{show:((J=(X=t.options)==null?void 0:X.rule)==null?void 0:J.show)!==!1,value:t.modelValue.rule,title:((Y=(Q=t.options)==null?void 0:Q.rule)==null?void 0:Y.title)??i("utils.Rule")},extend:{show:((ee=(Z=t.options)==null?void 0:Z.extend)==null?void 0:ee.show)!==!1,value:t.modelValue.extend,title:((le=(te=t.options)==null?void 0:te.extend)==null?void 0:le.title)??"FormItem "+i("utils.Extend")},dict:{show:((oe=(ae=t.options)==null?void 0:ae.dict)==null?void 0:oe.show)!==!1,value:t.modelValue.dict,title:((ne=(ie=t.options)==null?void 0:ie.dict)==null?void 0:ne.title)??i("utils.Dict")},inputExtend:{show:((se=(ue=t.options)==null?void 0:ue.inputExtend)==null?void 0:se.show)!==!1,value:t.modelValue.inputExtend,title:((re=(de=t.options)==null?void 0:de.inputExtend)==null?void 0:re.title)??"Input "+i("utils.Extend")}}),o=q({validators:{},inputTypes:{}}),T=y,l=()=>{T("update:modelValue",{name:e.name.value??"",title:e.title.value??"",type:e.type.value??"",tip:e.tip.value??"",rule:e.rule.value??[],extend:e.extend.value??"",dict:x.includes(e.type.value??"")?e.dict.value??"":"",inputExtend:e.inputExtend.value??""})};return(()=>{let K={};for(const p in M)t.excludeInputTypes.includes(M[p])||(K[M[p]]=M[p]);o.inputTypes=K;let a={};for(const p in Pe)t.excludeValidatorRule.includes(p)||(a[p]=Pe[p]);o.validators=a,l()})(),(K,a)=>{var p,pe,me,fe,ce,ge,ye,Ve,ve,be,he,xe,we,Ce,ke,Te;return d(),_e("div",null,[e.name.show?(d(),m(f,{key:0,label:e.name.title,type:"string",modelValue:e.name.value,"onUpdate:modelValue":a[0]||(a[0]=s=>e.name.value=s),placeholder:n(i)("Please input field",{field:e.name.title}),"input-attr":{onChange:l,...(pe=(p=t.options)==null?void 0:p.name)==null?void 0:pe.inputAttr},prop:"name"},null,8,["label","modelValue","placeholder","input-attr"])):g("",!0),e.title.show?(d(),m(f,{key:1,label:e.title.title,type:"string",modelValue:e.title.value,"onUpdate:modelValue":a[1]||(a[1]=s=>e.title.value=s),placeholder:n(i)("Please input field",{field:e.title.title}),"input-attr":{onChange:l,...(fe=(me=t.options)==null?void 0:me.title)==null?void 0:fe.inputAttr},prop:"title"},null,8,["label","modelValue","placeholder","input-attr"])):g("",!0),e.type.show?(d(),m(f,{key:2,label:e.type.title,type:"select",modelValue:e.type.value,"onUpdate:modelValue":a[2]||(a[2]=s=>e.type.value=s),placeholder:n(i)("Please select field",{field:e.type.title}),"input-attr":{onChange:l,content:o.inputTypes,...(ge=(ce=t.options)==null?void 0:ce.type)==null?void 0:ge.inputAttr},prop:"type"},null,8,["label","modelValue","placeholder","input-attr"])):g("",!0),e.dict.show&&x.includes(e.type.value)?(d(),m(f,{key:3,label:e.dict.title,type:"textarea",modelValue:e.dict.value,"onUpdate:modelValue":a[3]||(a[3]=s=>e.dict.value=s),"input-attr":{rows:3,placeholder:n(i)("utils.One line at a time, without quotation marks, for example: key1=value1"),onChange:l,...(Ve=(ye=t.options)==null?void 0:ye.dict)==null?void 0:Ve.inputAttr},prop:"dict",onKeyup:a[4]||(a[4]=S(N(()=>{},["stop"]),["enter"]))},null,8,["label","modelValue","input-attr"])):g("",!0),e.tip.show?(d(),m(f,{key:4,label:e.tip.title,type:"string",modelValue:e.tip.value,"onUpdate:modelValue":a[5]||(a[5]=s=>e.tip.value=s),placeholder:n(i)("Please input field",{field:e.tip.title}),"input-attr":{onChange:l,...(be=(ve=t.options)==null?void 0:ve.tip)==null?void 0:be.inputAttr},prop:"tip"},null,8,["label","modelValue","placeholder","input-attr"])):g("",!0),e.rule.show?(d(),m(f,{key:5,label:e.rule.title,type:"selects",modelValue:e.rule.value,"onUpdate:modelValue":a[6]||(a[6]=s=>e.rule.value=s),placeholder:n(i)("Please select field",{field:e.rule.title}),"input-attr":{onChange:l,content:o.validators,...(xe=(he=t.options)==null?void 0:he.rule)==null?void 0:xe.inputAttr},prop:"rule"},null,8,["label","modelValue","placeholder","input-attr"])):g("",!0),e.extend.show?(d(),m(f,{key:6,label:e.extend.title,type:"textarea",modelValue:e.extend.value,"onUpdate:modelValue":a[7]||(a[7]=s=>e.extend.value=s),"input-attr":{onChange:l,placeholder:n(i)("utils.One attribute per line without quotation marks(formitem)"),...(Ce=(we=t.options)==null?void 0:we.extend)==null?void 0:Ce.inputAttr},prop:"extend",onKeyup:a[8]||(a[8]=S(N(()=>{},["stop"]),["enter"]))},null,8,["label","modelValue","input-attr"])):g("",!0),e.inputExtend.show?(d(),m(f,{key:7,label:e.inputExtend.title,type:"textarea",modelValue:e.inputExtend.value,"onUpdate:modelValue":a[9]||(a[9]=s=>e.inputExtend.value=s),"input-attr":{onChange:l,placeholder:n(i)("utils.Extended properties of Input, one line without quotation marks, such as: size=large"),...(Te=(ke=t.options)==null?void 0:ke.inputExtend)==null?void 0:Te.inputAttr},prop:"inputExtend",onKeyup:a[10]||(a[10]=S(N(()=>{},["stop"]),["enter"]))},null,8,["label","modelValue","input-attr"])):g("",!0)])}}}),Ke={class:"title"},$e=Ae({__name:"add",props:{modelValue:{type:Boolean,default:!1},configGroup:{default:()=>({})}},emits:["update:modelValue"],setup(c,{emit:y}){const i=Se(),t=c,x=y,e=()=>{x("update:modelValue",!1)},{t:o}=qe.useI18n(),T=Me("formRef"),l=q({inputTypes:{},labelWidth:180,submitLoading:!1,addConfig:{group:"",weigh:0,content:""},formItemData:{dict:`key1=value1 key2=value2`}}),z=q({group:[h({name:"required",trigger:"change",message:o("Please select field",{field:o("routine.config.Variable group")})})],name:[h({name:"required",title:o("routine.config.Variable name")}),h({name:"varName",message:o("Please enter the correct field",{field:o("routine.config.Variable name")})})],title:[h({name:"required",title:o("routine.config.Variable title")})],type:[h({name:"required",trigger:"change",message:o("Please select field",{field:o("routine.config.Variable type")})})],weigh:[h({name:"integer",title:o("routine.config.number")})]}),w=()=>{var V;(V=T.value)==null||V.validate(u=>{u&&(l.addConfig.content=l.formItemData.dict,delete l.formItemData.dict,Re("add",{...l.addConfig,...l.formItemData}).then(()=>{x("update:modelValue",!1)}))})};return(V,u)=>{const E=_("el-form"),D=_("el-scrollbar"),C=_("el-button"),I=_("el-dialog"),P=F("drag"),U=F("zoom"),A=F("blur");return d(),m(I,{class:"ba-operate-dialog","close-on-click-modal":!1,"model-value":t.modelValue,onClose:e},{header:v(()=>[Ie((d(),_e("div",Ke,[O(W(n(o)("routine.config.Add configuration item")),1)])),[[P,[".ba-operate-dialog",".el-dialog__header"]],[U,".ba-operate-dialog"]])]),footer:v(()=>[Ee("div",{style:De("width: calc(100% - "+l.labelWidth/1.8+"px)")},[b(C,{onClick:e},{default:v(()=>[O(W(n(o)("Cancel")),1)]),_:1}),Ie((d(),m(C,{loading:l.submitLoading,onClick:u[4]||(u[4]=r=>w()),type:"primary"},{default:v(()=>[O(W(n(o)("Add")),1)]),_:1},8,["loading"])),[[A]])],4)]),default:v(()=>[b(D,{class:"ba-table-form-scrollbar"},{default:v(()=>[Ee("div",{class:"ba-operate-form ba-add-form",style:De(n(i).layout.shrink?"":"width: calc(100% - "+l.labelWidth/2+"px)")},[b(E,{ref_key:"formRef",ref:T,onKeyup:u[3]||(u[3]=S(r=>w(),["enter"])),rules:z,model:{...l.addConfig,...l.formItemData},"label-position":n(i).layout.shrink?"top":"right","label-width":160},{default:v(()=>[b(f,{label:n(o)("routine.config.Variable group"),type:"select",modelValue:l.addConfig.group,"onUpdate:modelValue":u[0]||(u[0]=r=>l.addConfig.group=r),prop:"group","input-attr":{content:V.configGroup},placeholder:n(o)("Please select field",{field:n(o)("routine.config.Variable group")})},null,8,["label","modelValue","input-attr","placeholder"]),b(Be,{modelValue:l.formItemData,"onUpdate:modelValue":u[1]||(u[1]=r=>l.formItemData=r)},null,8,["modelValue"]),b(f,{label:n(o)("Weigh"),type:"number",modelValue:l.addConfig.weigh,"onUpdate:modelValue":u[2]||(u[2]=r=>l.addConfig.weigh=r),prop:"weigh"},null,8,["label","modelValue"])]),_:1},8,["rules","model","label-position"])],4)]),_:1})]),_:1},8,["model-value"])}}});export{$e as _,Le as a,Ge as d,je as i,Re as p}; diff --git a/public/assets/adminInfo-Ce-OA1GU.js b/public/assets/adminInfo-APS0wXR-.js similarity index 97% rename from public/assets/adminInfo-Ce-OA1GU.js rename to public/assets/adminInfo-APS0wXR-.js index 27b0b15..895e818 100644 --- a/public/assets/adminInfo-Ce-OA1GU.js +++ b/public/assets/adminInfo-APS0wXR-.js @@ -1 +1 @@ -import{B as X,a8 as Y,a as P,I as m,X as Z,C as p,D as U,H as o,P as i,G as u,u as a,p as J,O as _,W as Q,U as c,a7 as V,a6 as z,V as w,_ as ee,Z as ne,Y as ae}from"./vue-DweYBrEc.js";import{c as k,x as oe,w as te,y as F,f as le,T as S,G as ie,a9 as de,_ as me}from"./index-fNs72j9w.js";import{b as I}from"./validate-CEOscgyN.js";const D="/admin/routine.AdminInfo/",y=new Map([["index",D+"index"],["edit",D+"edit"],["log","/admin/auth.AdminLog/index"]]);function re(){return k({url:y.get("index"),method:"get"})}function se(g={}){return k({url:y.get("log"),method:"get",params:g})}function T(g){return k({url:y.get("edit"),method:"post",data:g},{showSuccessMessage:!0})}const ue={class:"default-main"},fe={class:"admin-info"},pe={class:"image-slot"},ce={class:"admin-info-base"},ge={class:"admin-nickname"},_e={class:"admin-other"},Ie={class:"admin-info-form"},be=X({name:"routine/adminInfo",__name:"adminInfo",setup(g){const{t}=oe.useI18n(),b=Y("formRef"),x=te(),e=P({adminInfo:{},formKey:F(),buttonLoading:!1,log:[],logFilter:{limit:12},logCurrentPage:1,logPageSize:12,logTotal:100,logLoading:!0});re().then(d=>{e.adminInfo=d.data.info,e.formKey=F(),e.logFilter.search=[{field:"admin_id",val:d.data.info.id,operator:"eq"}],v()});const v=()=>{se(e.logFilter).then(d=>{e.log=d.data.list,e.logTotal=d.data.total,e.logLoading=!1}).catch(()=>{e.logLoading=!1})},B=d=>{e.logPageSize=d,e.logFilter.limit=d,v()},K=d=>{e.logCurrentPage=d,e.logFilter.page=d,v()},R=P({nickname:[I({name:"required",title:t("routine.adminInfo.User nickname")})],email:[I({name:"email",title:t("routine.adminInfo.e-mail address")})],mobile:[I({name:"mobile",message:t("Please enter the correct field",{field:t("routine.adminInfo.phone number")})})],password:[I({name:"password"})]}),A=d=>{let n=new FormData;n.append("file",d.raw),de(n).then(r=>{r.code==1&&T({id:e.adminInfo.id,avatar:r.data.file.url}).then(()=>{x.dataFill({avatar:r.data.file.full_url}),e.adminInfo.avatar=r.data.file.full_url})})},h=()=>{var d;(d=b.value)==null||d.validate(n=>{if(n){let r={...e.adminInfo};delete r.last_login_time,delete r.username,delete r.avatar,e.buttonLoading=!0,T(r).then(()=>{x.dataFill({nickname:e.adminInfo.nickname}),e.buttonLoading=!1}).catch(()=>{e.buttonLoading=!1})}})};return(d,n)=>{const r=m("Icon"),N=m("el-image"),j=m("el-upload"),f=m("el-input"),s=m("el-form-item"),C=m("el-button"),$=m("el-form"),L=m("el-col"),E=m("el-timeline-item"),M=m("el-timeline"),q=m("el-pagination"),G=m("el-card"),O=m("el-row"),H=Z("loading");return p(),U("div",ue,[o(O,{gutter:30},{default:i(()=>[o(L,{class:"lg-mb-20",xs:24,sm:24,md:24,lg:10},{default:i(()=>[u("div",fe,[a(J)(e.adminInfo)?Q("",!0):(p(),_(j,{key:0,class:"avatar-uploader",action:"","show-file-list":!1,onChange:A,"auto-upload":!1,accept:"image/gif, image/jpg, image/jpeg, image/bmp, image/png, image/webp"},{default:i(()=>[o(N,{fit:"cover",src:a(le)(e.adminInfo.avatar),class:"avatar"},{error:i(()=>[u("div",pe,[o(r,{size:"30",color:"#c0c4cc",name:"el-icon-Picture"})])]),_:1},8,["src"])]),_:1})),u("div",ce,[u("div",ge,c(e.adminInfo.nickname),1),u("div",_e,[u("div",null,c(a(t)("routine.adminInfo.Last logged in on"))+" "+c(a(S)(e.adminInfo.last_login_time)),1)])]),u("div",Ie,[(p(),_($,{onKeyup:n[10]||(n[10]=V(l=>h(),["enter"])),key:e.formKey,"label-position":"top",rules:R,ref_key:"formRef",ref:b,model:e.adminInfo},{default:i(()=>[o(s,{label:a(t)("routine.adminInfo.user name")},{default:i(()=>[o(f,{disabled:"",modelValue:e.adminInfo.username,"onUpdate:modelValue":n[0]||(n[0]=l=>e.adminInfo.username=l)},null,8,["modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("routine.adminInfo.User nickname"),prop:"nickname"},{default:i(()=>[o(f,{placeholder:a(t)("routine.adminInfo.Please enter a nickname"),modelValue:e.adminInfo.nickname,"onUpdate:modelValue":n[1]||(n[1]=l=>e.adminInfo.nickname=l)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("routine.adminInfo.e-mail address"),prop:"email"},{default:i(()=>[o(f,{placeholder:a(t)("Please input field",{field:a(t)("routine.adminInfo.e-mail address")}),modelValue:e.adminInfo.email,"onUpdate:modelValue":n[2]||(n[2]=l=>e.adminInfo.email=l)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("routine.adminInfo.phone number"),prop:"mobile"},{default:i(()=>[o(f,{placeholder:a(t)("Please input field",{field:a(t)("routine.adminInfo.phone number")}),modelValue:e.adminInfo.mobile,"onUpdate:modelValue":n[3]||(n[3]=l=>e.adminInfo.mobile=l)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("routine.adminInfo.autograph"),prop:"motto"},{default:i(()=>[o(f,{onKeyup:[n[4]||(n[4]=V(z(()=>{},["stop"]),["enter"])),n[5]||(n[5]=V(z(l=>h(),["ctrl"]),["enter"]))],placeholder:a(t)("routine.adminInfo.This guy is lazy and doesn write anything"),type:"textarea",modelValue:e.adminInfo.motto,"onUpdate:modelValue":n[6]||(n[6]=l=>e.adminInfo.motto=l)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("routine.adminInfo.New password"),prop:"password"},{default:i(()=>[o(f,{type:"password",placeholder:a(t)("routine.adminInfo.Please leave blank if not modified"),modelValue:e.adminInfo.password,"onUpdate:modelValue":n[7]||(n[7]=l=>e.adminInfo.password=l)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),o(s,null,{default:i(()=>[o(C,{type:"primary",loading:e.buttonLoading,onClick:n[8]||(n[8]=l=>h())},{default:i(()=>[w(c(a(t)("routine.adminInfo.Save changes")),1)]),_:1},8,["loading"]),o(C,{onClick:n[9]||(n[9]=l=>a(ie)(a(b)))},{default:i(()=>[w(c(a(t)("Reset")),1)]),_:1})]),_:1})]),_:1},8,["rules","model"]))])])]),_:1}),ee((p(),_(L,{xs:24,sm:24,md:24,lg:12},{default:i(()=>[o(G,{header:a(t)("routine.adminInfo.Operation log"),shadow:"never"},{default:i(()=>[o(M,null,{default:i(()=>[(p(!0),U(ne,null,ae(e.log,(l,W)=>(p(),_(E,{key:W,size:"large",timestamp:a(S)(l.create_time)},{default:i(()=>[w(c(l.title),1)]),_:2},1032,["timestamp"]))),128))]),_:1}),o(q,{currentPage:e.logCurrentPage,"page-size":e.logPageSize,"page-sizes":[12,22,52,100],background:"",layout:"prev, next, jumper",total:e.logTotal,onSizeChange:B,onCurrentChange:K},null,8,["currentPage","page-size","total"])]),_:1},8,["header"])]),_:1})),[[H,e.logLoading]])]),_:1})])}}}),we=me(be,[["__scopeId","data-v-63de0f4f"]]);export{we as default}; +import{B as X,a8 as Y,a as P,I as m,X as Z,C as p,D as U,H as o,P as i,G as u,u as a,p as J,O as _,W as Q,U as c,a7 as V,a6 as z,V as w,_ as ee,Z as ne,Y as ae}from"./vue-DweYBrEc.js";import{c as k,x as oe,w as te,y as F,f as le,T as S,G as ie,a9 as de,_ as me}from"./index-BIzd9_wD.js";import{b as I}from"./validate-DJPb9IIE.js";const D="/admin/routine.AdminInfo/",y=new Map([["index",D+"index"],["edit",D+"edit"],["log","/admin/auth.AdminLog/index"]]);function re(){return k({url:y.get("index"),method:"get"})}function se(g={}){return k({url:y.get("log"),method:"get",params:g})}function T(g){return k({url:y.get("edit"),method:"post",data:g},{showSuccessMessage:!0})}const ue={class:"default-main"},fe={class:"admin-info"},pe={class:"image-slot"},ce={class:"admin-info-base"},ge={class:"admin-nickname"},_e={class:"admin-other"},Ie={class:"admin-info-form"},be=X({name:"routine/adminInfo",__name:"adminInfo",setup(g){const{t}=oe.useI18n(),b=Y("formRef"),x=te(),e=P({adminInfo:{},formKey:F(),buttonLoading:!1,log:[],logFilter:{limit:12},logCurrentPage:1,logPageSize:12,logTotal:100,logLoading:!0});re().then(d=>{e.adminInfo=d.data.info,e.formKey=F(),e.logFilter.search=[{field:"admin_id",val:d.data.info.id,operator:"eq"}],v()});const v=()=>{se(e.logFilter).then(d=>{e.log=d.data.list,e.logTotal=d.data.total,e.logLoading=!1}).catch(()=>{e.logLoading=!1})},B=d=>{e.logPageSize=d,e.logFilter.limit=d,v()},K=d=>{e.logCurrentPage=d,e.logFilter.page=d,v()},R=P({nickname:[I({name:"required",title:t("routine.adminInfo.User nickname")})],email:[I({name:"email",title:t("routine.adminInfo.e-mail address")})],mobile:[I({name:"mobile",message:t("Please enter the correct field",{field:t("routine.adminInfo.phone number")})})],password:[I({name:"password"})]}),A=d=>{let n=new FormData;n.append("file",d.raw),de(n).then(r=>{r.code==1&&T({id:e.adminInfo.id,avatar:r.data.file.url}).then(()=>{x.dataFill({avatar:r.data.file.full_url}),e.adminInfo.avatar=r.data.file.full_url})})},h=()=>{var d;(d=b.value)==null||d.validate(n=>{if(n){let r={...e.adminInfo};delete r.last_login_time,delete r.username,delete r.avatar,e.buttonLoading=!0,T(r).then(()=>{x.dataFill({nickname:e.adminInfo.nickname}),e.buttonLoading=!1}).catch(()=>{e.buttonLoading=!1})}})};return(d,n)=>{const r=m("Icon"),N=m("el-image"),j=m("el-upload"),f=m("el-input"),s=m("el-form-item"),C=m("el-button"),$=m("el-form"),L=m("el-col"),E=m("el-timeline-item"),M=m("el-timeline"),q=m("el-pagination"),G=m("el-card"),O=m("el-row"),H=Z("loading");return p(),U("div",ue,[o(O,{gutter:30},{default:i(()=>[o(L,{class:"lg-mb-20",xs:24,sm:24,md:24,lg:10},{default:i(()=>[u("div",fe,[a(J)(e.adminInfo)?Q("",!0):(p(),_(j,{key:0,class:"avatar-uploader",action:"","show-file-list":!1,onChange:A,"auto-upload":!1,accept:"image/gif, image/jpg, image/jpeg, image/bmp, image/png, image/webp"},{default:i(()=>[o(N,{fit:"cover",src:a(le)(e.adminInfo.avatar),class:"avatar"},{error:i(()=>[u("div",pe,[o(r,{size:"30",color:"#c0c4cc",name:"el-icon-Picture"})])]),_:1},8,["src"])]),_:1})),u("div",ce,[u("div",ge,c(e.adminInfo.nickname),1),u("div",_e,[u("div",null,c(a(t)("routine.adminInfo.Last logged in on"))+" "+c(a(S)(e.adminInfo.last_login_time)),1)])]),u("div",Ie,[(p(),_($,{onKeyup:n[10]||(n[10]=V(l=>h(),["enter"])),key:e.formKey,"label-position":"top",rules:R,ref_key:"formRef",ref:b,model:e.adminInfo},{default:i(()=>[o(s,{label:a(t)("routine.adminInfo.user name")},{default:i(()=>[o(f,{disabled:"",modelValue:e.adminInfo.username,"onUpdate:modelValue":n[0]||(n[0]=l=>e.adminInfo.username=l)},null,8,["modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("routine.adminInfo.User nickname"),prop:"nickname"},{default:i(()=>[o(f,{placeholder:a(t)("routine.adminInfo.Please enter a nickname"),modelValue:e.adminInfo.nickname,"onUpdate:modelValue":n[1]||(n[1]=l=>e.adminInfo.nickname=l)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("routine.adminInfo.e-mail address"),prop:"email"},{default:i(()=>[o(f,{placeholder:a(t)("Please input field",{field:a(t)("routine.adminInfo.e-mail address")}),modelValue:e.adminInfo.email,"onUpdate:modelValue":n[2]||(n[2]=l=>e.adminInfo.email=l)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("routine.adminInfo.phone number"),prop:"mobile"},{default:i(()=>[o(f,{placeholder:a(t)("Please input field",{field:a(t)("routine.adminInfo.phone number")}),modelValue:e.adminInfo.mobile,"onUpdate:modelValue":n[3]||(n[3]=l=>e.adminInfo.mobile=l)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("routine.adminInfo.autograph"),prop:"motto"},{default:i(()=>[o(f,{onKeyup:[n[4]||(n[4]=V(z(()=>{},["stop"]),["enter"])),n[5]||(n[5]=V(z(l=>h(),["ctrl"]),["enter"]))],placeholder:a(t)("routine.adminInfo.This guy is lazy and doesn write anything"),type:"textarea",modelValue:e.adminInfo.motto,"onUpdate:modelValue":n[6]||(n[6]=l=>e.adminInfo.motto=l)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),o(s,{label:a(t)("routine.adminInfo.New password"),prop:"password"},{default:i(()=>[o(f,{type:"password",placeholder:a(t)("routine.adminInfo.Please leave blank if not modified"),modelValue:e.adminInfo.password,"onUpdate:modelValue":n[7]||(n[7]=l=>e.adminInfo.password=l)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),o(s,null,{default:i(()=>[o(C,{type:"primary",loading:e.buttonLoading,onClick:n[8]||(n[8]=l=>h())},{default:i(()=>[w(c(a(t)("routine.adminInfo.Save changes")),1)]),_:1},8,["loading"]),o(C,{onClick:n[9]||(n[9]=l=>a(ie)(a(b)))},{default:i(()=>[w(c(a(t)("Reset")),1)]),_:1})]),_:1})]),_:1},8,["rules","model"]))])])]),_:1}),ee((p(),_(L,{xs:24,sm:24,md:24,lg:12},{default:i(()=>[o(G,{header:a(t)("routine.adminInfo.Operation log"),shadow:"never"},{default:i(()=>[o(M,null,{default:i(()=>[(p(!0),U(ne,null,ae(e.log,(l,W)=>(p(),_(E,{key:W,size:"large",timestamp:a(S)(l.create_time)},{default:i(()=>[w(c(l.title),1)]),_:2},1032,["timestamp"]))),128))]),_:1}),o(q,{currentPage:e.logCurrentPage,"page-size":e.logPageSize,"page-sizes":[12,22,52,100],background:"",layout:"prev, next, jumper",total:e.logTotal,onSizeChange:B,onCurrentChange:K},null,8,["currentPage","page-size","total"])]),_:1},8,["header"])]),_:1})),[[H,e.logLoading]])]),_:1})])}}}),we=me(be,[["__scopeId","data-v-63de0f4f"]]);export{we as default}; diff --git a/public/assets/annualReport-CnOk6ryL.js b/public/assets/annualReport-Clhw3i66.js similarity index 99% rename from public/assets/annualReport-CnOk6ryL.js rename to public/assets/annualReport-Clhw3i66.js index 5b451b1..dbd7884 100644 --- a/public/assets/annualReport-CnOk6ryL.js +++ b/public/assets/annualReport-Clhw3i66.js @@ -1 +1 @@ -import{i as W}from"./echarts-e5otCyz6.js";import{x as H,_ as Z}from"./index-fNs72j9w.js";import{a as $}from"./moneyLog-DiIBY9Nv.js";import{B as X,b as f,l as C,a as z,w as q,o as J,j as K,I as j,X as Q,C as l,D as u,G as o,U as r,u as d,H as ee,P as te,Z as R,Y as b,O as ae,_ as oe,n as B}from"./vue-DweYBrEc.js";const ne={class:"default-main annual-report"},re={class:"report-heading"},le={class:"report-content"},se={class:"report-table-wrap"},ie={class:"report-table"},ue={class:"year-total"},ce={class:"chart-card"},me={class:"chart-card"},pe=X({name:"user/moneyLog/annualReport",__name:"annualReport",setup(ye){const{locale:F,t:e}=H.useI18n(),A=new Date().getFullYear(),m=f(A),v=f(!1),L=f(),_=f();let s,i;const k=C(()=>[e("user.moneyLog.annualReport.months.jan"),e("user.moneyLog.annualReport.months.feb"),e("user.moneyLog.annualReport.months.mar"),e("user.moneyLog.annualReport.months.apr"),e("user.moneyLog.annualReport.months.may"),e("user.moneyLog.annualReport.months.jun"),e("user.moneyLog.annualReport.months.jul"),e("user.moneyLog.annualReport.months.aug"),e("user.moneyLog.annualReport.months.sep"),e("user.moneyLog.annualReport.months.oct"),e("user.moneyLog.annualReport.months.nov"),e("user.moneyLog.annualReport.months.dec")]),U=[{key:"deposit",label:"user.moneyLog.annualReport.deposit",currency:!0},{key:"withdraw",label:"user.moneyLog.annualReport.withdraw",currency:!0},{key:"transactionDeposit",label:"user.moneyLog.annualReport.transactionDeposit",currency:!1},{key:"transactionWithdraw",label:"user.moneyLog.annualReport.transactionWithdraw",currency:!1},{key:"activePlayer",label:"user.moneyLog.annualReport.activePlayer",currency:!1},{key:"firstDeposit",label:"user.moneyLog.annualReport.firstDeposit",currency:!1},{key:"unclaimReceipt",label:"user.moneyLog.annualReport.unclaimReceipt",currency:!1},{key:"unclaimAmount",label:"user.moneyLog.annualReport.unclaimAmount",currency:!0}],S=()=>({deposit:Array(12).fill(0),withdraw:Array(12).fill(0),transactionDeposit:Array(12).fill(0),transactionWithdraw:Array(12).fill(0),activePlayer:Array(12).fill(0),firstDeposit:Array(12).fill(0),unclaimReceipt:Array(12).fill(0),unclaimAmount:Array(12).fill(0)}),x=()=>({deposit:0,withdraw:0,transactionDeposit:0,transactionWithdraw:0,activePlayer:0,firstDeposit:0,unclaimReceipt:0,unclaimAmount:0}),c=z(S()),D=z(x()),V=C(()=>Array.from({length:8},(n,t)=>A-t)),M={DEPOSIT:"deposit",WITHDRAW:"withdraw","TRANSACTION (DEPOSIT)":"transactionDeposit","TRANSACTION (WITHDRAW)":"transactionWithdraw","ACTIVE PLAYER":"activePlayer","FIRST DEPOSIT":"firstDeposit","UNCLAIM RECEIPT":"unclaimReceipt","UNCLAIM AMOUNT":"unclaimAmount"},I=n=>{const t=Number(n);return Number.isFinite(t)?t:0},Y=n=>{var h;const t=S(),p=x(),g=(n==null?void 0:n.report_table)??((h=n==null?void 0:n.data)==null?void 0:h.report_table);return Array.isArray(g)?(g.forEach(a=>{const y=M[String(a.title||"").trim().toUpperCase()];y&&(t[y]=Array.from({length:12},(O,G)=>I(a[`month_${G+1}`])),p[y]=I(a.year_total))}),{data:t,totals:p}):{data:t,totals:p}},T=(n,t)=>new Intl.NumberFormat(void 0,{minimumFractionDigits:t?2:0,maximumFractionDigits:t?2:0}).format(n),w=()=>({animationDuration:500,grid:{left:58,right:24,top:52,bottom:70},toolbox:{right:14,feature:{saveAsImage:{title:e("user.moneyLog.annualReport.download")}}},tooltip:{trigger:"axis"},xAxis:{type:"category",boundaryGap:!1,data:k.value,axisLine:{lineStyle:{color:"#d8d8d8"}},axisLabel:{color:"#777"}},yAxis:{type:"value",splitLine:{lineStyle:{color:"#ededed"}},axisLabel:{color:"#777"}},dataZoom:[{type:"slider",height:18,bottom:14,start:0,end:100},{type:"inside"}]}),E=()=>{L.value&&(s||(s=W(L.value)),s.setOption({...w(),legend:{top:10,data:[e("user.moneyLog.annualReport.deposit"),e("user.moneyLog.annualReport.withdraw")]},series:[{name:e("user.moneyLog.annualReport.deposit"),type:"line",smooth:!0,symbolSize:6,data:c.deposit,itemStyle:{color:"#32b36b"},lineStyle:{width:2},areaStyle:{color:"rgba(50, 179, 107, 0.22)"}},{name:e("user.moneyLog.annualReport.withdraw"),type:"line",smooth:!0,symbolSize:6,data:c.withdraw,itemStyle:{color:"#ef5b5b"},lineStyle:{width:2},areaStyle:{color:"rgba(239, 91, 91, 0.18)"}}]})),_.value&&(i||(i=W(_.value)),i.setOption({...w(),xAxis:{...w().xAxis,boundaryGap:!0},legend:{top:10,data:[e("user.moneyLog.annualReport.activePlayer"),e("user.moneyLog.annualReport.transactionDeposit"),e("user.moneyLog.annualReport.transactionWithdraw")]},series:[{name:e("user.moneyLog.annualReport.activePlayer"),type:"bar",data:c.activePlayer,itemStyle:{color:"#4f8edc"}},{name:e("user.moneyLog.annualReport.transactionDeposit"),type:"bar",data:c.transactionDeposit,itemStyle:{color:"#32b36b"}},{name:e("user.moneyLog.annualReport.transactionWithdraw"),type:"bar",data:c.transactionWithdraw,itemStyle:{color:"#f2b441"}}]}))},P=async()=>{v.value=!0;try{const n=await $({year:m.value}),t=Y(n.data);Object.assign(c,t.data),Object.assign(D,t.totals),await B(),E()}finally{v.value=!1}},N=()=>{s==null||s.resize(),i==null||i.resize()};return q(F,async()=>{await B(),E()}),J(()=>{window.addEventListener("resize",N),P()}),K(()=>{window.removeEventListener("resize",N),s==null||s.dispose(),i==null||i.dispose()}),(n,t)=>{const p=j("el-option"),g=j("el-select"),h=Q("loading");return l(),u("div",ne,[o("div",re,[o("h1",null,r(d(e)("user.moneyLog.annualReport.title")),1),ee(g,{modelValue:m.value,"onUpdate:modelValue":t[0]||(t[0]=a=>m.value=a),class:"year-select",onChange:P},{default:te(()=>[(l(!0),u(R,null,b(V.value,a=>(l(),ae(p,{key:a,label:a,value:a},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),oe((l(),u("div",le,[o("div",se,[o("table",ie,[o("thead",null,[o("tr",null,[t[1]||(t[1]=o("th",null,null,-1)),(l(!0),u(R,null,b(k.value,a=>(l(),u("th",{key:a},r(a),1))),128)),o("th",null,r(d(e)("user.moneyLog.annualReport.year")),1)])]),o("tbody",null,[(l(),u(R,null,b(U,a=>o("tr",{key:a.key},[o("th",null,r(d(e)(a.label)),1),(l(!0),u(R,null,b(c[a.key],(y,O)=>(l(),u("td",{key:O},r(T(y,a.currency)),1))),128)),o("td",ue,r(T(D[a.key],a.currency)),1)])),64))])])]),o("div",ce,[o("h2",null,r(m.value)+" "+r(d(e)("user.moneyLog.annualReport.depositWithdraw")),1),o("div",{ref_key:"depositChartRef",ref:L,class:"report-chart"},null,512)]),o("div",me,[o("h2",null,r(m.value)+" "+r(d(e)("user.moneyLog.annualReport.transactionActive")),1),o("div",{ref_key:"transactionChartRef",ref:_,class:"report-chart"},null,512)])])),[[h,v.value]])])}}}),Re=Z(pe,[["__scopeId","data-v-909448c8"]]);export{Re as default}; +import{i as W}from"./echarts-e5otCyz6.js";import{x as H,_ as Z}from"./index-BIzd9_wD.js";import{a as $}from"./moneyLog-B5jWmD9F.js";import{B as X,b as f,l as C,a as z,w as q,o as J,j as K,I as j,X as Q,C as l,D as u,G as o,U as r,u as d,H as ee,P as te,Z as R,Y as b,O as ae,_ as oe,n as B}from"./vue-DweYBrEc.js";const ne={class:"default-main annual-report"},re={class:"report-heading"},le={class:"report-content"},se={class:"report-table-wrap"},ie={class:"report-table"},ue={class:"year-total"},ce={class:"chart-card"},me={class:"chart-card"},pe=X({name:"user/moneyLog/annualReport",__name:"annualReport",setup(ye){const{locale:F,t:e}=H.useI18n(),A=new Date().getFullYear(),m=f(A),v=f(!1),L=f(),_=f();let s,i;const k=C(()=>[e("user.moneyLog.annualReport.months.jan"),e("user.moneyLog.annualReport.months.feb"),e("user.moneyLog.annualReport.months.mar"),e("user.moneyLog.annualReport.months.apr"),e("user.moneyLog.annualReport.months.may"),e("user.moneyLog.annualReport.months.jun"),e("user.moneyLog.annualReport.months.jul"),e("user.moneyLog.annualReport.months.aug"),e("user.moneyLog.annualReport.months.sep"),e("user.moneyLog.annualReport.months.oct"),e("user.moneyLog.annualReport.months.nov"),e("user.moneyLog.annualReport.months.dec")]),U=[{key:"deposit",label:"user.moneyLog.annualReport.deposit",currency:!0},{key:"withdraw",label:"user.moneyLog.annualReport.withdraw",currency:!0},{key:"transactionDeposit",label:"user.moneyLog.annualReport.transactionDeposit",currency:!1},{key:"transactionWithdraw",label:"user.moneyLog.annualReport.transactionWithdraw",currency:!1},{key:"activePlayer",label:"user.moneyLog.annualReport.activePlayer",currency:!1},{key:"firstDeposit",label:"user.moneyLog.annualReport.firstDeposit",currency:!1},{key:"unclaimReceipt",label:"user.moneyLog.annualReport.unclaimReceipt",currency:!1},{key:"unclaimAmount",label:"user.moneyLog.annualReport.unclaimAmount",currency:!0}],S=()=>({deposit:Array(12).fill(0),withdraw:Array(12).fill(0),transactionDeposit:Array(12).fill(0),transactionWithdraw:Array(12).fill(0),activePlayer:Array(12).fill(0),firstDeposit:Array(12).fill(0),unclaimReceipt:Array(12).fill(0),unclaimAmount:Array(12).fill(0)}),x=()=>({deposit:0,withdraw:0,transactionDeposit:0,transactionWithdraw:0,activePlayer:0,firstDeposit:0,unclaimReceipt:0,unclaimAmount:0}),c=z(S()),D=z(x()),V=C(()=>Array.from({length:8},(n,t)=>A-t)),M={DEPOSIT:"deposit",WITHDRAW:"withdraw","TRANSACTION (DEPOSIT)":"transactionDeposit","TRANSACTION (WITHDRAW)":"transactionWithdraw","ACTIVE PLAYER":"activePlayer","FIRST DEPOSIT":"firstDeposit","UNCLAIM RECEIPT":"unclaimReceipt","UNCLAIM AMOUNT":"unclaimAmount"},I=n=>{const t=Number(n);return Number.isFinite(t)?t:0},Y=n=>{var h;const t=S(),p=x(),g=(n==null?void 0:n.report_table)??((h=n==null?void 0:n.data)==null?void 0:h.report_table);return Array.isArray(g)?(g.forEach(a=>{const y=M[String(a.title||"").trim().toUpperCase()];y&&(t[y]=Array.from({length:12},(O,G)=>I(a[`month_${G+1}`])),p[y]=I(a.year_total))}),{data:t,totals:p}):{data:t,totals:p}},T=(n,t)=>new Intl.NumberFormat(void 0,{minimumFractionDigits:t?2:0,maximumFractionDigits:t?2:0}).format(n),w=()=>({animationDuration:500,grid:{left:58,right:24,top:52,bottom:70},toolbox:{right:14,feature:{saveAsImage:{title:e("user.moneyLog.annualReport.download")}}},tooltip:{trigger:"axis"},xAxis:{type:"category",boundaryGap:!1,data:k.value,axisLine:{lineStyle:{color:"#d8d8d8"}},axisLabel:{color:"#777"}},yAxis:{type:"value",splitLine:{lineStyle:{color:"#ededed"}},axisLabel:{color:"#777"}},dataZoom:[{type:"slider",height:18,bottom:14,start:0,end:100},{type:"inside"}]}),E=()=>{L.value&&(s||(s=W(L.value)),s.setOption({...w(),legend:{top:10,data:[e("user.moneyLog.annualReport.deposit"),e("user.moneyLog.annualReport.withdraw")]},series:[{name:e("user.moneyLog.annualReport.deposit"),type:"line",smooth:!0,symbolSize:6,data:c.deposit,itemStyle:{color:"#32b36b"},lineStyle:{width:2},areaStyle:{color:"rgba(50, 179, 107, 0.22)"}},{name:e("user.moneyLog.annualReport.withdraw"),type:"line",smooth:!0,symbolSize:6,data:c.withdraw,itemStyle:{color:"#ef5b5b"},lineStyle:{width:2},areaStyle:{color:"rgba(239, 91, 91, 0.18)"}}]})),_.value&&(i||(i=W(_.value)),i.setOption({...w(),xAxis:{...w().xAxis,boundaryGap:!0},legend:{top:10,data:[e("user.moneyLog.annualReport.activePlayer"),e("user.moneyLog.annualReport.transactionDeposit"),e("user.moneyLog.annualReport.transactionWithdraw")]},series:[{name:e("user.moneyLog.annualReport.activePlayer"),type:"bar",data:c.activePlayer,itemStyle:{color:"#4f8edc"}},{name:e("user.moneyLog.annualReport.transactionDeposit"),type:"bar",data:c.transactionDeposit,itemStyle:{color:"#32b36b"}},{name:e("user.moneyLog.annualReport.transactionWithdraw"),type:"bar",data:c.transactionWithdraw,itemStyle:{color:"#f2b441"}}]}))},P=async()=>{v.value=!0;try{const n=await $({year:m.value}),t=Y(n.data);Object.assign(c,t.data),Object.assign(D,t.totals),await B(),E()}finally{v.value=!1}},N=()=>{s==null||s.resize(),i==null||i.resize()};return q(F,async()=>{await B(),E()}),J(()=>{window.addEventListener("resize",N),P()}),K(()=>{window.removeEventListener("resize",N),s==null||s.dispose(),i==null||i.dispose()}),(n,t)=>{const p=j("el-option"),g=j("el-select"),h=Q("loading");return l(),u("div",ne,[o("div",re,[o("h1",null,r(d(e)("user.moneyLog.annualReport.title")),1),ee(g,{modelValue:m.value,"onUpdate:modelValue":t[0]||(t[0]=a=>m.value=a),class:"year-select",onChange:P},{default:te(()=>[(l(!0),u(R,null,b(V.value,a=>(l(),ae(p,{key:a,label:a,value:a},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),oe((l(),u("div",le,[o("div",se,[o("table",ie,[o("thead",null,[o("tr",null,[t[1]||(t[1]=o("th",null,null,-1)),(l(!0),u(R,null,b(k.value,a=>(l(),u("th",{key:a},r(a),1))),128)),o("th",null,r(d(e)("user.moneyLog.annualReport.year")),1)])]),o("tbody",null,[(l(),u(R,null,b(U,a=>o("tr",{key:a.key},[o("th",null,r(d(e)(a.label)),1),(l(!0),u(R,null,b(c[a.key],(y,O)=>(l(),u("td",{key:O},r(T(y,a.currency)),1))),128)),o("td",ue,r(T(D[a.key],a.currency)),1)])),64))])])]),o("div",ce,[o("h2",null,r(m.value)+" "+r(d(e)("user.moneyLog.annualReport.depositWithdraw")),1),o("div",{ref_key:"depositChartRef",ref:L,class:"report-chart"},null,512)]),o("div",me,[o("h2",null,r(m.value)+" "+r(d(e)("user.moneyLog.annualReport.transactionActive")),1),o("div",{ref_key:"transactionChartRef",ref:_,class:"report-chart"},null,512)])])),[[h,v.value]])])}}}),Re=Z(pe,[["__scopeId","data-v-909448c8"]]);export{Re as default}; diff --git a/public/assets/baAccount-CcWt-K1G.js b/public/assets/baAccount-DemSY7dD.js similarity index 93% rename from public/assets/baAccount-CcWt-K1G.js rename to public/assets/baAccount-DemSY7dD.js index 04c142d..178a76d 100644 --- a/public/assets/baAccount-CcWt-K1G.js +++ b/public/assets/baAccount-DemSY7dD.js @@ -1 +1 @@ -import{B as P,aE as x,a8 as G,a as w,w as S,I as d,X as B,C as m,D as b,H as i,u as a,P as c,_ as y,G as n,U as u,O as A,V as f,a7 as E,aF as N}from"./vue-DweYBrEc.js";import{x as T,u as q,y as K,_ as j}from"./index-fNs72j9w.js";import{u as H,b as O,c as X}from"./index-CLJRKiC0.js";import{c as J}from"./index-CYWPsgm-.js";import{F as C}from"./index-BlEwok4a.js";import{b as v}from"./validate-CEOscgyN.js";const Q={key:0,class:"userinfo"},W={class:"user-avatar-box"},Y=["src"],Z={class:"username"},ee={class:"user-info"},ae={class:"userinfo-buttons"},oe={href:"https://uni.buildadmin.com/user",target:"_blank",rel:"noopener noreferrer"},te={key:1,class:"ba-login"},se={class:"ba-title"},ne={target:"_blank",class:"ba-account-register",href:"https://uni.buildadmin.com/user/login?type=register",rel:"noopener noreferrer"},le=P({__name:"baAccount",props:N({loginCallback:{type:Function,default:()=>{}}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(h){const{t:l}=T.useI18n(),t=H(),F=q(),g=x(h,"modelValue"),k=G("baAccountFormRef"),L=h,o=w({loading:!0,submitLoading:!1,user:{tab:"login",username:"",password:"",captchaId:K(),captchaInfo:"",keep:!1}}),I=()=>{var s;(s=k.value)==null||s.validate(e=>{e&&J(o.user.captchaId,_=>U(_),{apiBaseURL:F.apiUrl})})},U=(s="")=>{o.submitLoading=!0,o.user.captchaInfo=s,O(o.user).then(e=>{t.dataFill(e.data.userInfo,!1),L.loginCallback(e)}).finally(()=>{o.submitLoading=!1})},z=w({username:[v({name:"required",title:l("layouts.Username")})],password:[v({name:"required",title:l("layouts.Password")}),v({name:"password"})]});return S(()=>g.value,s=>{s&&t.token&&X().then(e=>{t.dataFill(e.data.userInfo)}).catch(()=>{t.removeToken()}).finally(()=>{o.loading=!1})}),(s,e)=>{const _=d("Icon"),p=d("el-button"),R=d("el-form-item"),$=d("el-form"),D=d("el-dialog"),V=B("blur"),M=B("loading");return m(),b("div",null,[i(D,{modelValue:g.value,"onUpdate:modelValue":e[5]||(e[5]=r=>g.value=r),class:"ba-account-dialog",width:"25%",title:a(l)("layouts.Member information")},{default:c(()=>[a(t).token?y((m(),b("div",Q,[n("div",W,[n("img",{class:"user-avatar",src:a(t).avatar,alt:""},null,8,Y),i(_,{class:"user-avatar-gender",name:a(t).getGenderIcon().name,size:"14",color:a(t).getGenderIcon().color},null,8,["name","color"])]),n("p",Z,u(a(t).nickname),1),n("p",ee,[n("span",null,u(s.$t("Integral")+" "+a(t).score),1),n("span",null,u(s.$t("Balance")+" "+a(t).money),1)]),n("div",ae,[n("a",oe,[y((m(),A(p,{size:"default",type:"primary"},{default:c(()=>[f(u(s.$t("layouts.Member center")),1)]),_:1})),[[V]])]),y((m(),A(p,{onClick:e[0]||(e[0]=r=>a(t).logout()),size:"default",type:"warning"},{default:c(()=>[f(u(s.$t("layouts.Logout")),1)]),_:1})),[[V]])])])),[[M,o.loading]]):(m(),b("div",te,[n("h3",se,u(a(l)("layouts.Login to the buildadmin")),1),i($,{onKeyup:e[4]||(e[4]=E(r=>I(),["enter"])),ref_key:"baAccountFormRef",ref:k,rules:z,class:"ba-account-login-form",model:o.user},{default:c(()=>[i(C,{modelValue:o.user.username,"onUpdate:modelValue":e[1]||(e[1]=r=>o.user.username=r),type:"string",prop:"username",placeholder:a(l)("layouts.Please enter buildadmin account name or email"),"input-attr":{size:"large"}},null,8,["modelValue","placeholder"]),i(C,{modelValue:o.user.password,"onUpdate:modelValue":e[2]||(e[2]=r=>o.user.password=r),type:"password",prop:"password",placeholder:a(l)("layouts.Please enter the buildadmin account password"),"input-attr":{size:"large"}},null,8,["modelValue","placeholder"]),i(R,{class:"form-buttons"},{default:c(()=>[i(p,{onClick:e[3]||(e[3]=r=>I()),loading:o.submitLoading,round:"",type:"primary",size:"large"},{default:c(()=>[f(u(a(l)("layouts.Login")),1)]),_:1},8,["loading"]),n("a",ne,[i(p,{round:"",plain:"",type:"info",size:"large"},{default:c(()=>[f(u(a(l)("layouts.Register")),1)]),_:1})])]),_:1})]),_:1},8,["rules","model"])]))]),_:1},8,["modelValue","title"])])}}}),pe=j(le,[["__scopeId","data-v-3d2b2a16"]]);export{pe as B}; +import{B as P,aE as x,a8 as G,a as w,w as S,I as d,X as B,C as m,D as b,H as i,u as a,P as c,_ as y,G as n,U as u,O as A,V as f,a7 as E,aF as N}from"./vue-DweYBrEc.js";import{x as T,u as q,y as K,_ as j}from"./index-BIzd9_wD.js";import{u as H,b as O,c as X}from"./index-BJWGSl1I.js";import{c as J}from"./index-C7Qewjoc.js";import{F as C}from"./index-Uyc56W3P.js";import{b as v}from"./validate-DJPb9IIE.js";const Q={key:0,class:"userinfo"},W={class:"user-avatar-box"},Y=["src"],Z={class:"username"},ee={class:"user-info"},ae={class:"userinfo-buttons"},oe={href:"https://uni.buildadmin.com/user",target:"_blank",rel:"noopener noreferrer"},te={key:1,class:"ba-login"},se={class:"ba-title"},ne={target:"_blank",class:"ba-account-register",href:"https://uni.buildadmin.com/user/login?type=register",rel:"noopener noreferrer"},le=P({__name:"baAccount",props:N({loginCallback:{type:Function,default:()=>{}}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(h){const{t:l}=T.useI18n(),t=H(),F=q(),g=x(h,"modelValue"),k=G("baAccountFormRef"),L=h,o=w({loading:!0,submitLoading:!1,user:{tab:"login",username:"",password:"",captchaId:K(),captchaInfo:"",keep:!1}}),I=()=>{var s;(s=k.value)==null||s.validate(e=>{e&&J(o.user.captchaId,_=>U(_),{apiBaseURL:F.apiUrl})})},U=(s="")=>{o.submitLoading=!0,o.user.captchaInfo=s,O(o.user).then(e=>{t.dataFill(e.data.userInfo,!1),L.loginCallback(e)}).finally(()=>{o.submitLoading=!1})},z=w({username:[v({name:"required",title:l("layouts.Username")})],password:[v({name:"required",title:l("layouts.Password")}),v({name:"password"})]});return S(()=>g.value,s=>{s&&t.token&&X().then(e=>{t.dataFill(e.data.userInfo)}).catch(()=>{t.removeToken()}).finally(()=>{o.loading=!1})}),(s,e)=>{const _=d("Icon"),p=d("el-button"),R=d("el-form-item"),$=d("el-form"),D=d("el-dialog"),V=B("blur"),M=B("loading");return m(),b("div",null,[i(D,{modelValue:g.value,"onUpdate:modelValue":e[5]||(e[5]=r=>g.value=r),class:"ba-account-dialog",width:"25%",title:a(l)("layouts.Member information")},{default:c(()=>[a(t).token?y((m(),b("div",Q,[n("div",W,[n("img",{class:"user-avatar",src:a(t).avatar,alt:""},null,8,Y),i(_,{class:"user-avatar-gender",name:a(t).getGenderIcon().name,size:"14",color:a(t).getGenderIcon().color},null,8,["name","color"])]),n("p",Z,u(a(t).nickname),1),n("p",ee,[n("span",null,u(s.$t("Integral")+" "+a(t).score),1),n("span",null,u(s.$t("Balance")+" "+a(t).money),1)]),n("div",ae,[n("a",oe,[y((m(),A(p,{size:"default",type:"primary"},{default:c(()=>[f(u(s.$t("layouts.Member center")),1)]),_:1})),[[V]])]),y((m(),A(p,{onClick:e[0]||(e[0]=r=>a(t).logout()),size:"default",type:"warning"},{default:c(()=>[f(u(s.$t("layouts.Logout")),1)]),_:1})),[[V]])])])),[[M,o.loading]]):(m(),b("div",te,[n("h3",se,u(a(l)("layouts.Login to the buildadmin")),1),i($,{onKeyup:e[4]||(e[4]=E(r=>I(),["enter"])),ref_key:"baAccountFormRef",ref:k,rules:z,class:"ba-account-login-form",model:o.user},{default:c(()=>[i(C,{modelValue:o.user.username,"onUpdate:modelValue":e[1]||(e[1]=r=>o.user.username=r),type:"string",prop:"username",placeholder:a(l)("layouts.Please enter buildadmin account name or email"),"input-attr":{size:"large"}},null,8,["modelValue","placeholder"]),i(C,{modelValue:o.user.password,"onUpdate:modelValue":e[2]||(e[2]=r=>o.user.password=r),type:"password",prop:"password",placeholder:a(l)("layouts.Please enter the buildadmin account password"),"input-attr":{size:"large"}},null,8,["modelValue","placeholder"]),i(R,{class:"form-buttons"},{default:c(()=>[i(p,{onClick:e[3]||(e[3]=r=>I()),loading:o.submitLoading,round:"",type:"primary",size:"large"},{default:c(()=>[f(u(a(l)("layouts.Login")),1)]),_:1},8,["loading"]),n("a",ne,[i(p,{round:"",plain:"",type:"info",size:"large"},{default:c(()=>[f(u(a(l)("layouts.Register")),1)]),_:1})])]),_:1})]),_:1},8,["rules","model"])]))]),_:1},8,["modelValue","title"])])}}}),pe=j(le,[["__scopeId","data-v-3d2b2a16"]]);export{pe as B}; diff --git a/public/assets/balance-6c5j4mA0.js b/public/assets/balance-CkpLxANh.js similarity index 96% rename from public/assets/balance-6c5j4mA0.js rename to public/assets/balance-CkpLxANh.js index 7522f25..e3cade4 100644 --- a/public/assets/balance-6c5j4mA0.js +++ b/public/assets/balance-CkpLxANh.js @@ -1 +1 @@ -import{b,a as k,T as z,ad as B,_ as P}from"./index-fNs72j9w.js";import{B as S,a as $,o as w,I as l,X as D,C as t,D as s,H as g,P as d,_ as L,Z as I,Y as T,G as c,U as n,u as i,O as j}from"./vue-DweYBrEc.js";const F={class:"user-views"},M={class:"card-header"},N={class:"right-title"},U={class:"logs"},V={class:"log-title"},E={key:0,class:"log-change-amount increase"},G={key:1,class:"log-change-amount reduce"},H={class:"log-after"},O={class:"log-change-time"},X={key:0,class:"log-footer"},Y=S({__name:"balance",setup(Z){const u=b(),_=k(),e=$({logs:[],currentPage:1,total:0,pageSize:10,pageLoading:!0}),p=a=>{e.pageSize=a,r()},h=a=>{e.currentPage=a,r()},r=()=>{B(e.currentPage,e.pageSize).then(a=>{e.pageLoading=!1,e.logs=a.data.list,e.total=a.data.total})};return w(()=>{r()}),(a,q)=>{const m=l("el-pagination"),v=l("el-empty"),f=l("el-card"),y=D("loading");return t(),s("div",F,[g(f,{class:"user-views-card",shadow:"hover"},{header:d(()=>[c("div",M,[c("span",null,n(a.$t("user.account.balance.Balance change record")),1),c("span",N,n(a.$t("user.account.balance.Current balance")+" "+i(u).money),1)])]),default:d(()=>[L((t(),s("div",U,[(t(!0),s(I,null,T(e.logs,(o,C)=>(t(),s("div",{class:"log-item",key:C},[c("div",V,n(o.memo),1),o.money>0?(t(),s("div",E,n(a.$t("Balance")+":+"+o.money),1)):(t(),s("div",G,n(a.$t("Balance")+":"+o.money),1)),c("div",H,n(a.$t("user.account.balance.Balance after change")+":"+o.after),1),c("div",O,n(a.$t("user.account.balance.Change time")+":"+i(z)(o.create_time)),1)]))),128))])),[[y,e.pageLoading]]),e.total>0?(t(),s("div",X,[g(m,{currentPage:e.currentPage,"page-size":e.pageSize,"page-sizes":[10,20,50,100],background:"",layout:i(_).state.shrink?"prev, next, jumper":"sizes, ->, prev, pager, next, jumper",total:e.total,onSizeChange:p,onCurrentChange:h},null,8,["currentPage","page-size","layout","total"])])):(t(),j(v,{key:1}))]),_:1})])}}}),J=P(Y,[["__scopeId","data-v-3a90286f"]]);export{J as default}; +import{b,a as k,T as z,ad as B,_ as P}from"./index-BIzd9_wD.js";import{B as S,a as $,o as w,I as l,X as D,C as t,D as s,H as g,P as d,_ as L,Z as I,Y as T,G as c,U as n,u as i,O as j}from"./vue-DweYBrEc.js";const F={class:"user-views"},M={class:"card-header"},N={class:"right-title"},U={class:"logs"},V={class:"log-title"},E={key:0,class:"log-change-amount increase"},G={key:1,class:"log-change-amount reduce"},H={class:"log-after"},O={class:"log-change-time"},X={key:0,class:"log-footer"},Y=S({__name:"balance",setup(Z){const u=b(),_=k(),e=$({logs:[],currentPage:1,total:0,pageSize:10,pageLoading:!0}),p=a=>{e.pageSize=a,r()},h=a=>{e.currentPage=a,r()},r=()=>{B(e.currentPage,e.pageSize).then(a=>{e.pageLoading=!1,e.logs=a.data.list,e.total=a.data.total})};return w(()=>{r()}),(a,q)=>{const m=l("el-pagination"),v=l("el-empty"),f=l("el-card"),y=D("loading");return t(),s("div",F,[g(f,{class:"user-views-card",shadow:"hover"},{header:d(()=>[c("div",M,[c("span",null,n(a.$t("user.account.balance.Balance change record")),1),c("span",N,n(a.$t("user.account.balance.Current balance")+" "+i(u).money),1)])]),default:d(()=>[L((t(),s("div",U,[(t(!0),s(I,null,T(e.logs,(o,C)=>(t(),s("div",{class:"log-item",key:C},[c("div",V,n(o.memo),1),o.money>0?(t(),s("div",E,n(a.$t("Balance")+":+"+o.money),1)):(t(),s("div",G,n(a.$t("Balance")+":"+o.money),1)),c("div",H,n(a.$t("user.account.balance.Balance after change")+":"+o.after),1),c("div",O,n(a.$t("user.account.balance.Change time")+":"+i(z)(o.create_time)),1)]))),128))])),[[y,e.pageLoading]]),e.total>0?(t(),s("div",X,[g(m,{currentPage:e.currentPage,"page-size":e.pageSize,"page-sizes":[10,20,50,100],background:"",layout:i(_).state.shrink?"prev, next, jumper":"sizes, ->, prev, pager, next, jumper",total:e.total,onSizeChange:p,onCurrentChange:h},null,8,["currentPage","page-size","layout","total"])])):(t(),j(v,{key:1}))]),_:1})])}}}),J=P(Y,[["__scopeId","data-v-3a90286f"]]);export{J as default}; diff --git a/public/assets/buy-bnFhKl0h.js b/public/assets/buy-ESul3bMW.js similarity index 90% rename from public/assets/buy-bnFhKl0h.js rename to public/assets/buy-ESul3bMW.js index 76023b0..b39a5c1 100644 --- a/public/assets/buy-bnFhKl0h.js +++ b/public/assets/buy-ESul3bMW.js @@ -1 +1 @@ -import{x as B,_ as I}from"./index-fNs72j9w.js";import{s as o,a as N,c as P,o as _,b as U}from"./index-EFlNRwTR.js";import{u as $}from"./index-CLJRKiC0.js";import{B as A,I as f,X as v,C as a,D as r,H as g,u as e,P as u,_ as m,p as D,G as s,U as t,V as d,Z as k,O as y,W as b}from"./vue-DweYBrEc.js";import"./terminal-B3G_hUkG.js";const O={key:0,class:"order-info"},E={class:"order-info-item"},M={class:"order-info-item"},z={class:"order-info-item"},W={class:"order-info-item"},j={key:0,class:"order-price"},F={key:1,class:"order-price"},G={class:"order-footer"},H={class:"order-agreement"},S={href:"https://doc.buildadmin.com/guide/other/appendix/templateAgreement.html",target:"_blank",rel:"noopener noreferrer"},T={class:"order-info-buttons"},X=A({__name:"buy",setup(Z){const{t:l}=B.useI18n(),h=$();return(q,n)=>{const x=f("el-alert"),C=f("el-checkbox"),c=f("el-button"),V=f("el-dialog"),p=v("blur"),w=v("loading");return a(),r("div",null,[g(V,{modelValue:e(o).dialog.buy,"onUpdate:modelValue":n[6]||(n[6]=i=>e(o).dialog.buy=i),class:"buy-dialog",title:e(l)("module.Confirm order info"),top:"20vh",width:"28%"},{default:u(()=>[m((a(),r("div",null,[g(x,{title:e(l)("module.Module installation warning"),type:"error",center:!0,closable:!1},null,8,["title"]),e(D)(e(o).buy.info)?b("",!0):(a(),r("div",O,[s("div",E,t(e(l)("module.Order title"))+":"+t(e(o).buy.info.title),1),s("div",M,t(e(l)("module.Order No"))+":"+t(e(o).buy.info.sn),1),s("div",z,t(e(l)("module.Purchase user"))+":"+t(e(N)(e(h))),1),s("div",W,[d(t(e(l)("module.Order price"))+": ",1),e(o).buy.info.purchased?(a(),r("span",F,t(e(l)("module.Purchased, can be installed directly")),1)):(a(),r("span",j,t(e(P)(e(o).buy.info.amount,e(o).buy.info.pay.money?1:0)),1))]),s("div",G,[s("div",H,[g(C,{modelValue:e(o).buy.agreement,"onUpdate:modelValue":n[0]||(n[0]=i=>e(o).buy.agreement=i),size:"small",label:""},null,8,["modelValue"]),s("span",null,[d(t(e(l)("module.Understand and agree"))+"《 ",1),s("a",S,t(e(l)("module.Module purchase and use agreement")),1),n[7]||(n[7]=d(" 》 "))])]),s("div",T,[e(o).buy.info.purchased?m((a(),y(c,{key:1,loading:e(o).loading.common,onClick:n[5]||(n[5]=i=>e(U)(e(o).buy.info.uid,e(o).buy.info.id,!0)),type:"warning"},{default:u(()=>[d(t(e(l)("module.Install now")),1)]),_:1},8,["loading"])),[[p]]):(a(),r(k,{key:0},[e(o).buy.info.pay.score?m((a(),y(c,{key:0,loading:e(o).loading.common,onClick:n[1]||(n[1]=i=>e(_)("score")),type:"warning"},{default:u(()=>[d(t(e(l)("module.Point payment")),1)]),_:1},8,["loading"])),[[p]]):b("",!0),e(o).buy.info.pay.money?(a(),r(k,{key:1},[m((a(),y(c,{loading:e(o).loading.common,onClick:n[2]||(n[2]=i=>e(_)("balance")),type:"warning"},{default:u(()=>[d(t(e(l)("module.Balance payment")),1)]),_:1},8,["loading"])),[[p]]),m((a(),y(c,{loading:e(o).loading.common,onClick:n[3]||(n[3]=i=>e(_)("wx")),type:"success"},{default:u(()=>[d(t(e(l)("module.Wechat payment")),1)]),_:1},8,["loading"])),[[p]]),m((a(),y(c,{loading:e(o).loading.common,onClick:n[4]||(n[4]=i=>e(_)("zfb")),type:"primary"},{default:u(()=>[d(t(e(l)("module.Alipay payment")),1)]),_:1},8,["loading"])),[[p]])],64)):b("",!0)],64))])])]))])),[[w,e(o).loading.buy]])]),_:1},8,["modelValue","title"])])}}}),Y=I(X,[["__scopeId","data-v-13d418e1"]]);export{Y as default}; +import{x as B,_ as I}from"./index-BIzd9_wD.js";import{s as o,a as N,c as P,o as _,b as U}from"./index-DFZ67V8S.js";import{u as $}from"./index-BJWGSl1I.js";import{B as A,I as f,X as v,C as a,D as r,H as g,u as e,P as u,_ as m,p as D,G as s,U as t,V as d,Z as k,O as y,W as b}from"./vue-DweYBrEc.js";import"./terminal-Czj_5HRs.js";const O={key:0,class:"order-info"},E={class:"order-info-item"},M={class:"order-info-item"},z={class:"order-info-item"},W={class:"order-info-item"},j={key:0,class:"order-price"},F={key:1,class:"order-price"},G={class:"order-footer"},H={class:"order-agreement"},S={href:"https://doc.buildadmin.com/guide/other/appendix/templateAgreement.html",target:"_blank",rel:"noopener noreferrer"},T={class:"order-info-buttons"},X=A({__name:"buy",setup(Z){const{t:l}=B.useI18n(),h=$();return(q,n)=>{const x=f("el-alert"),C=f("el-checkbox"),c=f("el-button"),V=f("el-dialog"),p=v("blur"),w=v("loading");return a(),r("div",null,[g(V,{modelValue:e(o).dialog.buy,"onUpdate:modelValue":n[6]||(n[6]=i=>e(o).dialog.buy=i),class:"buy-dialog",title:e(l)("module.Confirm order info"),top:"20vh",width:"28%"},{default:u(()=>[m((a(),r("div",null,[g(x,{title:e(l)("module.Module installation warning"),type:"error",center:!0,closable:!1},null,8,["title"]),e(D)(e(o).buy.info)?b("",!0):(a(),r("div",O,[s("div",E,t(e(l)("module.Order title"))+":"+t(e(o).buy.info.title),1),s("div",M,t(e(l)("module.Order No"))+":"+t(e(o).buy.info.sn),1),s("div",z,t(e(l)("module.Purchase user"))+":"+t(e(N)(e(h))),1),s("div",W,[d(t(e(l)("module.Order price"))+": ",1),e(o).buy.info.purchased?(a(),r("span",F,t(e(l)("module.Purchased, can be installed directly")),1)):(a(),r("span",j,t(e(P)(e(o).buy.info.amount,e(o).buy.info.pay.money?1:0)),1))]),s("div",G,[s("div",H,[g(C,{modelValue:e(o).buy.agreement,"onUpdate:modelValue":n[0]||(n[0]=i=>e(o).buy.agreement=i),size:"small",label:""},null,8,["modelValue"]),s("span",null,[d(t(e(l)("module.Understand and agree"))+"《 ",1),s("a",S,t(e(l)("module.Module purchase and use agreement")),1),n[7]||(n[7]=d(" 》 "))])]),s("div",T,[e(o).buy.info.purchased?m((a(),y(c,{key:1,loading:e(o).loading.common,onClick:n[5]||(n[5]=i=>e(U)(e(o).buy.info.uid,e(o).buy.info.id,!0)),type:"warning"},{default:u(()=>[d(t(e(l)("module.Install now")),1)]),_:1},8,["loading"])),[[p]]):(a(),r(k,{key:0},[e(o).buy.info.pay.score?m((a(),y(c,{key:0,loading:e(o).loading.common,onClick:n[1]||(n[1]=i=>e(_)("score")),type:"warning"},{default:u(()=>[d(t(e(l)("module.Point payment")),1)]),_:1},8,["loading"])),[[p]]):b("",!0),e(o).buy.info.pay.money?(a(),r(k,{key:1},[m((a(),y(c,{loading:e(o).loading.common,onClick:n[2]||(n[2]=i=>e(_)("balance")),type:"warning"},{default:u(()=>[d(t(e(l)("module.Balance payment")),1)]),_:1},8,["loading"])),[[p]]),m((a(),y(c,{loading:e(o).loading.common,onClick:n[3]||(n[3]=i=>e(_)("wx")),type:"success"},{default:u(()=>[d(t(e(l)("module.Wechat payment")),1)]),_:1},8,["loading"])),[[p]]),m((a(),y(c,{loading:e(o).loading.common,onClick:n[4]||(n[4]=i=>e(_)("zfb")),type:"primary"},{default:u(()=>[d(t(e(l)("module.Alipay payment")),1)]),_:1},8,["loading"])),[[p]])],64)):b("",!0)],64))])])]))])),[[w,e(o).loading.buy]])]),_:1},8,["modelValue","title"])])}}}),Y=I(X,[["__scopeId","data-v-13d418e1"]]);export{Y as default}; diff --git a/public/assets/changePassword-DHj25x-Z.js b/public/assets/changePassword-BVouqSzn.js similarity index 91% rename from public/assets/changePassword-DHj25x-Z.js rename to public/assets/changePassword-BVouqSzn.js index c3229b8..94ee027 100644 --- a/public/assets/changePassword-DHj25x-Z.js +++ b/public/assets/changePassword-BVouqSzn.js @@ -1 +1 @@ -import{B as b,a8 as v,a as V,I as m,C as y,D as C,H as n,P as l,G as S,a7 as I,u as r,V as f,U as p}from"./vue-DweYBrEc.js";import{x as N,b as R,G as $,ae as x,_ as L}from"./index-fNs72j9w.js";import{b as u}from"./validate-CEOscgyN.js";import{F as i}from"./index-BlEwok4a.js";import"./index-CgMrKa77.js";import"./index-DMA3A9_B.js";const U={class:"user-views"},B={class:"change-password"},k=b({__name:"changePassword",setup(q){const{t:s}=N.useI18n(),P=R(),w=v("formRef"),e=V({formSubmitLoading:!1,form:{oldPassword:"",newPassword:"",confirmPassword:""},rules:{oldPassword:[u({name:"required",title:s("user.account.changePassword.Old password")})],newPassword:[u({name:"required",title:s("user.account.changePassword.New password")}),u({name:"password"})],confirmPassword:[u({name:"required",title:s("user.account.changePassword.Confirm new password")}),u({name:"password"}),{validator:(d,o,a)=>{(e.form.newPassword||e.form.confirmPassword)&&(e.form.newPassword==e.form.confirmPassword?a():a(new Error(s("user.account.changePassword.The duplicate password does not match the new password")))),a()},trigger:"blur"}]}}),c=()=>{var d;(d=w.value)==null||d.validate(o=>{o&&(e.formSubmitLoading=!0,x(e.form).then(a=>{e.formSubmitLoading=!1,a.code==1&&P.logout()}).catch(()=>{e.formSubmitLoading=!1}))})};return(d,o)=>{const a=m("el-button"),g=m("el-form-item"),h=m("el-form"),_=m("el-card");return y(),C("div",U,[n(_,{class:"user-views-card",shadow:"hover",header:r(s)("user.account.changePassword.Change Password")},{default:l(()=>[S("div",B,[n(h,{model:e.form,rules:e.rules,"label-position":"top",ref_key:"formRef",ref:w,onKeyup:o[5]||(o[5]=I(t=>c(),["enter"]))},{default:l(()=>[n(i,{label:r(s)("user.account.changePassword.Old password"),type:"password",modelValue:e.form.oldPassword,"onUpdate:modelValue":o[0]||(o[0]=t=>e.form.oldPassword=t),prop:"oldPassword","input-attr":{showPassword:!0},placeholder:r(s)("user.account.changePassword.Please enter your current password")},null,8,["label","modelValue","placeholder"]),n(i,{label:r(s)("user.account.changePassword.New password"),type:"password",modelValue:e.form.newPassword,"onUpdate:modelValue":o[1]||(o[1]=t=>e.form.newPassword=t),prop:"newPassword","input-attr":{showPassword:!0},placeholder:r(s)("Please input field",{field:r(s)("user.account.changePassword.New password")})},null,8,["label","modelValue","placeholder"]),n(i,{label:r(s)("user.account.changePassword.Confirm new password"),type:"password",modelValue:e.form.confirmPassword,"onUpdate:modelValue":o[2]||(o[2]=t=>e.form.confirmPassword=t),prop:"confirmPassword","input-attr":{showPassword:!0},placeholder:r(s)("Please input field",{field:r(s)("user.account.changePassword.Confirm new password")})},null,8,["label","modelValue","placeholder"]),n(g,{class:"submit-buttons"},{default:l(()=>[n(a,{onClick:o[3]||(o[3]=t=>r($)(r(w)))},{default:l(()=>[f(p(d.$t("Reset")),1)]),_:1}),n(a,{type:"primary",loading:e.formSubmitLoading,onClick:o[4]||(o[4]=t=>c())},{default:l(()=>[f(p(d.$t("Save")),1)]),_:1},8,["loading"])]),_:1})]),_:1},8,["model","rules"])])]),_:1},8,["header"])])}}}),O=L(k,[["__scopeId","data-v-9cc2dcfb"]]);export{O as default}; +import{B as b,a8 as v,a as V,I as m,C as y,D as C,H as n,P as l,G as S,a7 as I,u as r,V as f,U as p}from"./vue-DweYBrEc.js";import{x as N,b as R,G as $,ae as x,_ as L}from"./index-BIzd9_wD.js";import{b as u}from"./validate-DJPb9IIE.js";import{F as i}from"./index-Uyc56W3P.js";import"./index-BQ-QT2OB.js";import"./index-DdhozyMV.js";const U={class:"user-views"},B={class:"change-password"},k=b({__name:"changePassword",setup(q){const{t:s}=N.useI18n(),P=R(),w=v("formRef"),e=V({formSubmitLoading:!1,form:{oldPassword:"",newPassword:"",confirmPassword:""},rules:{oldPassword:[u({name:"required",title:s("user.account.changePassword.Old password")})],newPassword:[u({name:"required",title:s("user.account.changePassword.New password")}),u({name:"password"})],confirmPassword:[u({name:"required",title:s("user.account.changePassword.Confirm new password")}),u({name:"password"}),{validator:(d,o,a)=>{(e.form.newPassword||e.form.confirmPassword)&&(e.form.newPassword==e.form.confirmPassword?a():a(new Error(s("user.account.changePassword.The duplicate password does not match the new password")))),a()},trigger:"blur"}]}}),c=()=>{var d;(d=w.value)==null||d.validate(o=>{o&&(e.formSubmitLoading=!0,x(e.form).then(a=>{e.formSubmitLoading=!1,a.code==1&&P.logout()}).catch(()=>{e.formSubmitLoading=!1}))})};return(d,o)=>{const a=m("el-button"),g=m("el-form-item"),h=m("el-form"),_=m("el-card");return y(),C("div",U,[n(_,{class:"user-views-card",shadow:"hover",header:r(s)("user.account.changePassword.Change Password")},{default:l(()=>[S("div",B,[n(h,{model:e.form,rules:e.rules,"label-position":"top",ref_key:"formRef",ref:w,onKeyup:o[5]||(o[5]=I(t=>c(),["enter"]))},{default:l(()=>[n(i,{label:r(s)("user.account.changePassword.Old password"),type:"password",modelValue:e.form.oldPassword,"onUpdate:modelValue":o[0]||(o[0]=t=>e.form.oldPassword=t),prop:"oldPassword","input-attr":{showPassword:!0},placeholder:r(s)("user.account.changePassword.Please enter your current password")},null,8,["label","modelValue","placeholder"]),n(i,{label:r(s)("user.account.changePassword.New password"),type:"password",modelValue:e.form.newPassword,"onUpdate:modelValue":o[1]||(o[1]=t=>e.form.newPassword=t),prop:"newPassword","input-attr":{showPassword:!0},placeholder:r(s)("Please input field",{field:r(s)("user.account.changePassword.New password")})},null,8,["label","modelValue","placeholder"]),n(i,{label:r(s)("user.account.changePassword.Confirm new password"),type:"password",modelValue:e.form.confirmPassword,"onUpdate:modelValue":o[2]||(o[2]=t=>e.form.confirmPassword=t),prop:"confirmPassword","input-attr":{showPassword:!0},placeholder:r(s)("Please input field",{field:r(s)("user.account.changePassword.Confirm new password")})},null,8,["label","modelValue","placeholder"]),n(g,{class:"submit-buttons"},{default:l(()=>[n(a,{onClick:o[3]||(o[3]=t=>r($)(r(w)))},{default:l(()=>[f(p(d.$t("Reset")),1)]),_:1}),n(a,{type:"primary",loading:e.formSubmitLoading,onClick:o[4]||(o[4]=t=>c())},{default:l(()=>[f(p(d.$t("Save")),1)]),_:1},8,["loading"])]),_:1})]),_:1},8,["model","rules"])])]),_:1},8,["header"])])}}}),O=L(k,[["__scopeId","data-v-9cc2dcfb"]]);export{O as default}; diff --git a/public/assets/commonDialog-C22mGy5A.js b/public/assets/commonDialog-CEkglXmG.js similarity index 70% rename from public/assets/commonDialog-C22mGy5A.js rename to public/assets/commonDialog-CEkglXmG.js index 5ef2374..71c1252 100644 --- a/public/assets/commonDialog-C22mGy5A.js +++ b/public/assets/commonDialog-CEkglXmG.js @@ -1 +1 @@ -import{s as o}from"./index-EFlNRwTR.js";import f from"./commonDone-D38AgrRZ.js";import g from"./commonSelectVersion-CyQ36GIz.js";import C from"./confirmFileConflict-CQjiGfum.js";import k from"./installConflict-DfXx-lge.js";import y from"./uploadInstall-NaE1z4qs.js";import{B as v,I as i,X as V,C as t,D as a,H as c,u as e,P as s,_ as D,W as l,O as m}from"./vue-DweYBrEc.js";import{_ as x}from"./index-fNs72j9w.js";import"./index-CLJRKiC0.js";import"./terminal-B3G_hUkG.js";import"./index-CgMrKa77.js";import"./index-DMA3A9_B.js";import"./index-BlEwok4a.js";const I=["element-loading-text"],b=v({__name:"commonDialog",setup(h){return(r,n)=>{const d=i("el-scrollbar"),p=i("el-dialog"),u=V("loading");return t(),a("div",null,[c(p,{"close-on-press-escape":e(o).common.quickClose,title:e(o).common.dialogTitle,"close-on-click-modal":e(o).common.quickClose,modelValue:e(o).dialog.common,"onUpdate:modelValue":n[0]||(n[0]=_=>e(o).dialog.common=_),class:"common-dialog"},{default:s(()=>[c(d,{height:500},{default:s(()=>[e(o).common.type=="loading"?D((t(),a("div",{"element-loading-text":e(o).common.loadingTitle?r.$t("module.stateTitle "+e(o).common.loadingTitle):"",key:e(o).common.loadingComponentKey,class:"common-loading"},null,8,I)),[[u,!0]]):l("",!0),e(o).common.type=="selectVersion"?(t(),m(g,{key:1})):l("",!0),e(o).common.type=="installConflict"?(t(),m(k,{key:2})):l("",!0),e(o).common.type=="disableConfirmConflict"?(t(),m(C,{key:3})):l("",!0),e(o).common.type=="done"?(t(),m(f,{key:4})):l("",!0),e(o).common.type=="uploadInstall"?(t(),m(y,{key:5})):l("",!0)]),_:1})]),_:1},8,["close-on-press-escape","title","close-on-click-modal","modelValue"])])}}}),W=x(b,[["__scopeId","data-v-deb1af09"]]);export{W as default}; +import{s as o}from"./index-DFZ67V8S.js";import f from"./commonDone-6CfQl4ob.js";import g from"./commonSelectVersion--fHBNzYr.js";import C from"./confirmFileConflict-CelrLmFh.js";import k from"./installConflict-DlSX-f0Y.js";import y from"./uploadInstall-DGgE-E8X.js";import{B as v,I as i,X as V,C as t,D as a,H as c,u as e,P as s,_ as D,W as l,O as m}from"./vue-DweYBrEc.js";import{_ as x}from"./index-BIzd9_wD.js";import"./index-BJWGSl1I.js";import"./terminal-Czj_5HRs.js";import"./index-BQ-QT2OB.js";import"./index-DdhozyMV.js";import"./index-Uyc56W3P.js";const I=["element-loading-text"],b=v({__name:"commonDialog",setup(h){return(r,n)=>{const d=i("el-scrollbar"),p=i("el-dialog"),u=V("loading");return t(),a("div",null,[c(p,{"close-on-press-escape":e(o).common.quickClose,title:e(o).common.dialogTitle,"close-on-click-modal":e(o).common.quickClose,modelValue:e(o).dialog.common,"onUpdate:modelValue":n[0]||(n[0]=_=>e(o).dialog.common=_),class:"common-dialog"},{default:s(()=>[c(d,{height:500},{default:s(()=>[e(o).common.type=="loading"?D((t(),a("div",{"element-loading-text":e(o).common.loadingTitle?r.$t("module.stateTitle "+e(o).common.loadingTitle):"",key:e(o).common.loadingComponentKey,class:"common-loading"},null,8,I)),[[u,!0]]):l("",!0),e(o).common.type=="selectVersion"?(t(),m(g,{key:1})):l("",!0),e(o).common.type=="installConflict"?(t(),m(k,{key:2})):l("",!0),e(o).common.type=="disableConfirmConflict"?(t(),m(C,{key:3})):l("",!0),e(o).common.type=="done"?(t(),m(f,{key:4})):l("",!0),e(o).common.type=="uploadInstall"?(t(),m(y,{key:5})):l("",!0)]),_:1})]),_:1},8,["close-on-press-escape","title","close-on-click-modal","modelValue"])])}}}),W=x(b,[["__scopeId","data-v-deb1af09"]]);export{W as default}; diff --git a/public/assets/commonDone-D38AgrRZ.js b/public/assets/commonDone-6CfQl4ob.js similarity index 95% rename from public/assets/commonDone-D38AgrRZ.js rename to public/assets/commonDone-6CfQl4ob.js index 5dcfb34..c34d3e4 100644 --- a/public/assets/commonDone-D38AgrRZ.js +++ b/public/assets/commonDone-6CfQl4ob.js @@ -1 +1 @@ -import{x as L,R as S,_ as C}from"./index-fNs72j9w.js";import{s,m as d,d as w,e as N}from"./index-EFlNRwTR.js";import{B as V}from"./index-CgMrKa77.js";import{F as R}from"./index-BlEwok4a.js";import{u as H,t as M}from"./terminal-B3G_hUkG.js";import{B as U,a as P,I as h,X as b,C as n,D as a,G as l,u as e,U as o,_ as D,W as m,V as r,H as u,P as p,O as W,ag as j}from"./vue-DweYBrEc.js";import"./index-CLJRKiC0.js";import"./index-DMA3A9_B.js";const F={class:"install-done"},O={class:"install-done-title"},z={key:0},G={key:1},X={key:2},$={key:3},q={class:"install-tis-box"},J={key:0,class:"depend-box"},K={key:0,class:"depend-loading"},Q={class:"depend-tis"},Y={key:0},Z={class:"color-red"},ee={key:0},te={key:1},oe={key:1,class:"color-green"},le={key:2,class:"exec-fail color-red"},se={key:1,class:"depend-tis"},ne={key:2},ae={key:0,class:"install-tis-box text-align-center"},de={class:"install-tis"},ie={class:"dependency-installation-fail-tips"},me={class:"install-tis-box"},ce={class:"install-tis"},re={class:"install-tis-box"},ue={class:"install-form"},pe={key:1,class:"install-tis-box"},_e={class:"install-form"},he={class:"el-popover__title"},fe={class:"reload-hot-server-content"},ve={class:"block-help hot-server-tips"},ye={class:"install-done-button-box"},Se=U({__name:"commonDone",setup(be){const{t}=L.useI18n(),_=H(),i=P({rebuild:0,reloadHotServer:0}),v=()=>{_.toggle(!0)},I=()=>{s.dialog.common=!1,i.rebuild==1?(_.toggle(!0),_.addTaskPM("web-build",!1,"",y=>{y==M.Success&&(_.toggle(!1),i.reloadHotServer==1&&s.common.moduleState!=d.DISABLE)})):i.reloadHotServer==1&&s.common.moduleState!=d.DISABLE},g=()=>{j.confirm(t("module.Is the command that failed on the WEB terminal executed manually or in other ways successfully?"),t("Reminder"),{confirmButtonText:t("module.yes"),cancelButtonText:t("Cancel"),type:"warning"}).then(()=>{s.loading.common=!0,w(s.common.uid).then(()=>{N(),s.loading.common=!1,s.common.dependInstallState="success"})})};return(y,c)=>{const k=h("el-link"),x=h("el-popover"),E=h("el-form-item"),T=h("el-button"),A=b("loading"),B=b("blur");return n(),a("div",F,[l("div",O,[e(s).common.moduleState==e(d).INSTALLED?(n(),a("span",z,o(e(t)("module.Congratulations, module installation is complete")),1)):e(s).common.moduleState==e(d).DISABLE?(n(),a("span",G,o(e(t)("module.Module is disabled")),1)):e(s).common.moduleState==e(d).DEPENDENT_WAIT_INSTALL?(n(),a("span",X,o(e(t)("module.Congratulations, the code of the module is ready")),1)):(n(),a("span",$,o(e(t)("module.Unknown state")),1))]),l("div",q,[e(s).common.dependInstallState!="none"?(n(),a("div",J,[e(s).common.dependInstallState=="executing"?D((n(),a("div",K,null,512)),[[A,!0]]):m("",!0),l("div",Q,[e(s).common.dependInstallState=="executing"?(n(),a("div",Y,[l("span",Z,o(e(t)("module.Do not refresh the page!")),1),e(s).common.moduleState==e(d).DISABLE?(n(),a("span",ee,o(e(t)("module.New adjustment of dependency detected")),1)):e(s).common.moduleState==e(d).DEPENDENT_WAIT_INSTALL?(n(),a("span",te,o(e(t)("module.This module adds new dependencies")),1)):m("",!0),c[2]||(c[2]=l("span",null,",",-1)),l("span",null,o(e(t)("module.The built-in terminal of the system is automatically installing these dependencies, please wait~")),1),l("span",{class:"span-a",onClick:v},o(e(t)("module.View progress")),1)])):m("",!0),e(s).common.dependInstallState=="success"?(n(),a("div",oe,o(e(t)("module.Dependency installation completed~")),1)):m("",!0),e(s).common.dependInstallState=="fail"?(n(),a("div",le,[r(o(e(t)("module.Dependency installation fail 1"))+" ",1),l("span",{class:"span-a",onClick:v},o(e(t)("module.Dependency installation fail 2")),1),r(" "+o(e(t)("module.Dependency installation fail 3"))+" ",1),u(k,{target:"_blank",type:"primary",href:"https://doc.buildadmin.com/guide/install/manualOperation.html"},{default:p(()=>[r(o(e(t)("module.Dependency installation fail 4")),1)]),_:1})])):m("",!0)])])):e(s).common.moduleState==e(d).INSTALLED?(n(),a("div",se,o(e(t)("module.This module does not add new dependencies")),1)):(n(),a("div",ne,o(e(t)("module.There is no adjustment for system dependency")),1))]),e(s).common.dependInstallState=="fail"?(n(),a("div",ae,[l("div",de,[r(o(e(t)("module.Dependency installation fail 5"))+" ",1),l("span",{class:"span-a",onClick:g},o(e(t)("module.Dependency installation fail 6")),1),r(" "+o(e(t)("module.Dependency installation fail 7"))+" ",1),l("span",ie,o(e(t)("module.dependency-installation-fail-tips")),1)])])):m("",!0),l("div",me,[l("div",ce,o(e(t)("module.please"))+" "+o(e(s).common.moduleState==e(d).DISABLE?"":e(t)("module.After installation 1"))+" "+o(e(t)("module.Manually clean up the system and browser cache")),1)]),l("div",re,[l("div",ue,[u(R,{label:(e(s).common.moduleState==e(d).DISABLE?"":e(t)("module.After installation 2"))+e(t)("module.Automatically execute reissue command?"),modelValue:i.rebuild,"onUpdate:modelValue":c[0]||(c[0]=f=>i.rebuild=f),type:"radio","input-attr":{border:!0,content:{0:e(t)("module.no"),1:e(t)("module.yes")}}},null,8,["label","modelValue","input-attr"])])]),e(S).dirtyFile&&e(s).common.moduleState!=e(d).DISABLE?(n(),a("div",pe,[l("div",_e,[u(E,{label:e(t)("module.After installation 2")+e(t)("module.Restart Vite hot server")},{default:p(()=>[u(V,{modelValue:i.reloadHotServer,"onUpdate:modelValue":c[1]||(c[1]=f=>i.reloadHotServer=f),type:"radio",attr:{class:"hot-server-input",border:!0,content:{0:e(t)("vite.Later")+e(t)("module.Manual restart"),1:e(t)("module.Restart Now")}}},null,8,["modelValue","attr"]),u(x,{width:360,placement:"top"},{reference:p(()=>[l("div",ve,o(e(t)("module.detailed information"))+"?",1)]),default:p(()=>[l("div",null,[l("div",he,o(e(t)("vite.Reload hot server title")),1),l("div",fe,[l("p",null,[l("span",null,o(e(t)("vite.Reload hot server tips 1")),1),l("span",null,"【"+o(e(t)(`vite.Close type ${e(S).closeType}`))+"】",1),l("span",null,o(e(t)("vite.Reload hot server tips 2")),1)]),l("p",null,o(e(t)("vite.Reload hot server tips 3")),1),l("p",null,o(e(t)("module.Restart Vite hot server tips")),1)])])]),_:1})]),_:1},8,["label"])])])):m("",!0),l("div",ye,[D((n(),W(T,{disabled:!(e(s).common.dependInstallState!="executing"||e(s).common.moduleState==e(d).INSTALLED),size:"large",class:"install-done-button",type:"primary",loading:e(s).loading.common,onClick:I},{default:p(()=>[r(o(e(s).common.moduleState==e(d).DISABLE?e(t)("Complete"):e(t)("module.End of installation")),1)]),_:1},8,["disabled","loading"])),[[B]])])])}}}),Be=C(Se,[["__scopeId","data-v-fabd7ed2"]]);export{Be as default}; +import{x as L,R as S,_ as C}from"./index-BIzd9_wD.js";import{s,m as d,d as w,e as N}from"./index-DFZ67V8S.js";import{B as V}from"./index-BQ-QT2OB.js";import{F as R}from"./index-Uyc56W3P.js";import{u as H,t as M}from"./terminal-Czj_5HRs.js";import{B as U,a as P,I as h,X as b,C as n,D as a,G as l,u as e,U as o,_ as D,W as m,V as r,H as u,P as p,O as W,ag as j}from"./vue-DweYBrEc.js";import"./index-BJWGSl1I.js";import"./index-DdhozyMV.js";const F={class:"install-done"},O={class:"install-done-title"},z={key:0},G={key:1},X={key:2},$={key:3},q={class:"install-tis-box"},J={key:0,class:"depend-box"},K={key:0,class:"depend-loading"},Q={class:"depend-tis"},Y={key:0},Z={class:"color-red"},ee={key:0},te={key:1},oe={key:1,class:"color-green"},le={key:2,class:"exec-fail color-red"},se={key:1,class:"depend-tis"},ne={key:2},ae={key:0,class:"install-tis-box text-align-center"},de={class:"install-tis"},ie={class:"dependency-installation-fail-tips"},me={class:"install-tis-box"},ce={class:"install-tis"},re={class:"install-tis-box"},ue={class:"install-form"},pe={key:1,class:"install-tis-box"},_e={class:"install-form"},he={class:"el-popover__title"},fe={class:"reload-hot-server-content"},ve={class:"block-help hot-server-tips"},ye={class:"install-done-button-box"},Se=U({__name:"commonDone",setup(be){const{t}=L.useI18n(),_=H(),i=P({rebuild:0,reloadHotServer:0}),v=()=>{_.toggle(!0)},I=()=>{s.dialog.common=!1,i.rebuild==1?(_.toggle(!0),_.addTaskPM("web-build",!1,"",y=>{y==M.Success&&(_.toggle(!1),i.reloadHotServer==1&&s.common.moduleState!=d.DISABLE)})):i.reloadHotServer==1&&s.common.moduleState!=d.DISABLE},g=()=>{j.confirm(t("module.Is the command that failed on the WEB terminal executed manually or in other ways successfully?"),t("Reminder"),{confirmButtonText:t("module.yes"),cancelButtonText:t("Cancel"),type:"warning"}).then(()=>{s.loading.common=!0,w(s.common.uid).then(()=>{N(),s.loading.common=!1,s.common.dependInstallState="success"})})};return(y,c)=>{const k=h("el-link"),x=h("el-popover"),E=h("el-form-item"),T=h("el-button"),A=b("loading"),B=b("blur");return n(),a("div",F,[l("div",O,[e(s).common.moduleState==e(d).INSTALLED?(n(),a("span",z,o(e(t)("module.Congratulations, module installation is complete")),1)):e(s).common.moduleState==e(d).DISABLE?(n(),a("span",G,o(e(t)("module.Module is disabled")),1)):e(s).common.moduleState==e(d).DEPENDENT_WAIT_INSTALL?(n(),a("span",X,o(e(t)("module.Congratulations, the code of the module is ready")),1)):(n(),a("span",$,o(e(t)("module.Unknown state")),1))]),l("div",q,[e(s).common.dependInstallState!="none"?(n(),a("div",J,[e(s).common.dependInstallState=="executing"?D((n(),a("div",K,null,512)),[[A,!0]]):m("",!0),l("div",Q,[e(s).common.dependInstallState=="executing"?(n(),a("div",Y,[l("span",Z,o(e(t)("module.Do not refresh the page!")),1),e(s).common.moduleState==e(d).DISABLE?(n(),a("span",ee,o(e(t)("module.New adjustment of dependency detected")),1)):e(s).common.moduleState==e(d).DEPENDENT_WAIT_INSTALL?(n(),a("span",te,o(e(t)("module.This module adds new dependencies")),1)):m("",!0),c[2]||(c[2]=l("span",null,",",-1)),l("span",null,o(e(t)("module.The built-in terminal of the system is automatically installing these dependencies, please wait~")),1),l("span",{class:"span-a",onClick:v},o(e(t)("module.View progress")),1)])):m("",!0),e(s).common.dependInstallState=="success"?(n(),a("div",oe,o(e(t)("module.Dependency installation completed~")),1)):m("",!0),e(s).common.dependInstallState=="fail"?(n(),a("div",le,[r(o(e(t)("module.Dependency installation fail 1"))+" ",1),l("span",{class:"span-a",onClick:v},o(e(t)("module.Dependency installation fail 2")),1),r(" "+o(e(t)("module.Dependency installation fail 3"))+" ",1),u(k,{target:"_blank",type:"primary",href:"https://doc.buildadmin.com/guide/install/manualOperation.html"},{default:p(()=>[r(o(e(t)("module.Dependency installation fail 4")),1)]),_:1})])):m("",!0)])])):e(s).common.moduleState==e(d).INSTALLED?(n(),a("div",se,o(e(t)("module.This module does not add new dependencies")),1)):(n(),a("div",ne,o(e(t)("module.There is no adjustment for system dependency")),1))]),e(s).common.dependInstallState=="fail"?(n(),a("div",ae,[l("div",de,[r(o(e(t)("module.Dependency installation fail 5"))+" ",1),l("span",{class:"span-a",onClick:g},o(e(t)("module.Dependency installation fail 6")),1),r(" "+o(e(t)("module.Dependency installation fail 7"))+" ",1),l("span",ie,o(e(t)("module.dependency-installation-fail-tips")),1)])])):m("",!0),l("div",me,[l("div",ce,o(e(t)("module.please"))+" "+o(e(s).common.moduleState==e(d).DISABLE?"":e(t)("module.After installation 1"))+" "+o(e(t)("module.Manually clean up the system and browser cache")),1)]),l("div",re,[l("div",ue,[u(R,{label:(e(s).common.moduleState==e(d).DISABLE?"":e(t)("module.After installation 2"))+e(t)("module.Automatically execute reissue command?"),modelValue:i.rebuild,"onUpdate:modelValue":c[0]||(c[0]=f=>i.rebuild=f),type:"radio","input-attr":{border:!0,content:{0:e(t)("module.no"),1:e(t)("module.yes")}}},null,8,["label","modelValue","input-attr"])])]),e(S).dirtyFile&&e(s).common.moduleState!=e(d).DISABLE?(n(),a("div",pe,[l("div",_e,[u(E,{label:e(t)("module.After installation 2")+e(t)("module.Restart Vite hot server")},{default:p(()=>[u(V,{modelValue:i.reloadHotServer,"onUpdate:modelValue":c[1]||(c[1]=f=>i.reloadHotServer=f),type:"radio",attr:{class:"hot-server-input",border:!0,content:{0:e(t)("vite.Later")+e(t)("module.Manual restart"),1:e(t)("module.Restart Now")}}},null,8,["modelValue","attr"]),u(x,{width:360,placement:"top"},{reference:p(()=>[l("div",ve,o(e(t)("module.detailed information"))+"?",1)]),default:p(()=>[l("div",null,[l("div",he,o(e(t)("vite.Reload hot server title")),1),l("div",fe,[l("p",null,[l("span",null,o(e(t)("vite.Reload hot server tips 1")),1),l("span",null,"【"+o(e(t)(`vite.Close type ${e(S).closeType}`))+"】",1),l("span",null,o(e(t)("vite.Reload hot server tips 2")),1)]),l("p",null,o(e(t)("vite.Reload hot server tips 3")),1),l("p",null,o(e(t)("module.Restart Vite hot server tips")),1)])])]),_:1})]),_:1},8,["label"])])])):m("",!0),l("div",ye,[D((n(),W(T,{disabled:!(e(s).common.dependInstallState!="executing"||e(s).common.moduleState==e(d).INSTALLED),size:"large",class:"install-done-button",type:"primary",loading:e(s).loading.common,onClick:I},{default:p(()=>[r(o(e(s).common.moduleState==e(d).DISABLE?e(t)("Complete"):e(t)("module.End of installation")),1)]),_:1},8,["disabled","loading"])),[[B]])])])}}}),Be=C(Se,[["__scopeId","data-v-fabd7ed2"]]);export{Be as default}; diff --git a/public/assets/commonSelectVersion-CyQ36GIz.js b/public/assets/commonSelectVersion--fHBNzYr.js similarity index 91% rename from public/assets/commonSelectVersion-CyQ36GIz.js rename to public/assets/commonSelectVersion--fHBNzYr.js index d4f927e..8e142d7 100644 --- a/public/assets/commonSelectVersion-CyQ36GIz.js +++ b/public/assets/commonSelectVersion--fHBNzYr.js @@ -1 +1 @@ -import{x as B,T as b,_ as S}from"./index-fNs72j9w.js";import{s as a,f as z,g as D,h as F}from"./index-EFlNRwTR.js";import{B as M,aH as w,I as _,C as s,D as c,H as i,u as e,P as d,G as u,O as p,U as m,V as h}from"./vue-DweYBrEc.js";import"./index-CLJRKiC0.js";import"./terminal-B3G_hUkG.js";const N={key:0},T={class:"available-system-version"},j={class:"available-system-version-text"},A={key:1},E={key:0},H={key:0,class:"renewal-text"},L={key:1},O={key:2},$={class:"renewal"},G={class:"renewal-text"},P=M({__name:"commonSelectVersion",setup(R){const{t}=B.useI18n(),k=w(o=>(o=o.replace(/^v/,""),o=o.split(".").map(l=>l.padStart(2,"0")).join(""),parseInt(o))),x=o=>{const l=a.installedModule.find(r=>r.uid==a.common.uid);return!!(l&&(o=o.replace(/^v/,""),l.version=l.version.replace(/^v/,""),o==l.version))},v=w(o=>k(a.sysVersion)>parseInt(o)),g=(o,l,r)=>{a.dialog.common=!0,a.common.dialogTitle=t("module.Install"),D("download"),a.dialog.baAccount=!1,a.dialog.buy=!1,a.dialog.goodsInfo=!1,F(o,l,r,a.common.update)};return(o,l)=>{const r=_("el-table-column"),f=_("Icon"),y=_("el-button"),C=_("el-tooltip"),I=_("el-table");return s(),c("div",null,[i(I,{data:e(a).common.versions,class:"w100",stripe:""},{default:d(()=>[i(r,{property:"version",align:"center",label:e(t)("module.Version")},null,8,["label"]),i(r,{property:"short_describe","show-overflow-tooltip":!0,align:"center",label:e(t)("module.Description")},null,8,["label"]),i(r,{property:"available_system_version_text",align:"center",label:e(t)("module.Available system version")},{default:d(n=>[n.row.available_system_version&&e(a).sysVersion?(s(),c("div",N,[u("div",T,[e(v)(n.row.available_system_version)?(s(),p(f,{key:0,name:"el-icon-CircleCheckFilled",color:"var(--el-color-success)",size:"14"})):(s(),p(f,{key:1,name:"el-icon-CircleCloseFilled",size:"14",color:"var(--el-color-danger)"})),u("div",j,m(n.row.available_system_version_text),1)])])):(s(),c("div",A,"-"))]),_:1},8,["label"]),i(r,{property:"createtime_text",align:"center",label:e(t)("Create time")},null,8,["label"]),i(r,{label:e(t)("module.Install"),align:"center","min-width":140},{default:d(n=>[n.row.downloadable?(s(),c("div",E,[x(n.row.version)?(s(),c("div",H,m(e(t)("module.Current installed version")),1)):e(v)(n.row.available_system_version)?(s(),c("div",O,[i(y,{type:"primary",onClick:V=>g(n.row.uid,n.row.order_id,n.row.version)},{default:d(()=>[h(m(e(t)("module.Click to install")),1)]),_:2},1032,["onClick"])])):(s(),c("div",L,m(e(t)("module.Insufficient system version")),1))])):(s(),p(C,{key:1,effect:"dark",content:e(t)("module.Order expiration time",{expiration_time:e(b)(n.row.order_expiration_time),create_time:e(b)(n.row.createtime)}),placement:"top"},{default:d(()=>[u("div",$,[u("div",G,m(e(t)("module.Versions released beyond the authorization period")),1),i(y,{onClick:l[0]||(l[0]=V=>e(z)(!0)),type:"danger"},{default:d(()=>[h(m(e(t)("module.Renewal")),1)]),_:1})])]),_:2},1032,["content"]))]),_:1},8,["label"])]),_:1},8,["data"])])}}}),W=S(P,[["__scopeId","data-v-5678fe15"]]);export{W as default}; +import{x as B,T as b,_ as S}from"./index-BIzd9_wD.js";import{s as a,f as z,g as D,h as F}from"./index-DFZ67V8S.js";import{B as M,aH as w,I as _,C as s,D as c,H as i,u as e,P as d,G as u,O as p,U as m,V as h}from"./vue-DweYBrEc.js";import"./index-BJWGSl1I.js";import"./terminal-Czj_5HRs.js";const N={key:0},T={class:"available-system-version"},j={class:"available-system-version-text"},A={key:1},E={key:0},H={key:0,class:"renewal-text"},L={key:1},O={key:2},$={class:"renewal"},G={class:"renewal-text"},P=M({__name:"commonSelectVersion",setup(R){const{t}=B.useI18n(),k=w(o=>(o=o.replace(/^v/,""),o=o.split(".").map(l=>l.padStart(2,"0")).join(""),parseInt(o))),x=o=>{const l=a.installedModule.find(r=>r.uid==a.common.uid);return!!(l&&(o=o.replace(/^v/,""),l.version=l.version.replace(/^v/,""),o==l.version))},v=w(o=>k(a.sysVersion)>parseInt(o)),g=(o,l,r)=>{a.dialog.common=!0,a.common.dialogTitle=t("module.Install"),D("download"),a.dialog.baAccount=!1,a.dialog.buy=!1,a.dialog.goodsInfo=!1,F(o,l,r,a.common.update)};return(o,l)=>{const r=_("el-table-column"),f=_("Icon"),y=_("el-button"),C=_("el-tooltip"),I=_("el-table");return s(),c("div",null,[i(I,{data:e(a).common.versions,class:"w100",stripe:""},{default:d(()=>[i(r,{property:"version",align:"center",label:e(t)("module.Version")},null,8,["label"]),i(r,{property:"short_describe","show-overflow-tooltip":!0,align:"center",label:e(t)("module.Description")},null,8,["label"]),i(r,{property:"available_system_version_text",align:"center",label:e(t)("module.Available system version")},{default:d(n=>[n.row.available_system_version&&e(a).sysVersion?(s(),c("div",N,[u("div",T,[e(v)(n.row.available_system_version)?(s(),p(f,{key:0,name:"el-icon-CircleCheckFilled",color:"var(--el-color-success)",size:"14"})):(s(),p(f,{key:1,name:"el-icon-CircleCloseFilled",size:"14",color:"var(--el-color-danger)"})),u("div",j,m(n.row.available_system_version_text),1)])])):(s(),c("div",A,"-"))]),_:1},8,["label"]),i(r,{property:"createtime_text",align:"center",label:e(t)("Create time")},null,8,["label"]),i(r,{label:e(t)("module.Install"),align:"center","min-width":140},{default:d(n=>[n.row.downloadable?(s(),c("div",E,[x(n.row.version)?(s(),c("div",H,m(e(t)("module.Current installed version")),1)):e(v)(n.row.available_system_version)?(s(),c("div",O,[i(y,{type:"primary",onClick:V=>g(n.row.uid,n.row.order_id,n.row.version)},{default:d(()=>[h(m(e(t)("module.Click to install")),1)]),_:2},1032,["onClick"])])):(s(),c("div",L,m(e(t)("module.Insufficient system version")),1))])):(s(),p(C,{key:1,effect:"dark",content:e(t)("module.Order expiration time",{expiration_time:e(b)(n.row.order_expiration_time),create_time:e(b)(n.row.createtime)}),placement:"top"},{default:d(()=>[u("div",$,[u("div",G,m(e(t)("module.Versions released beyond the authorization period")),1),i(y,{onClick:l[0]||(l[0]=V=>e(z)(!0)),type:"danger"},{default:d(()=>[h(m(e(t)("module.Renewal")),1)]),_:1})])]),_:2},1032,["content"]))]),_:1},8,["label"])]),_:1},8,["data"])])}}}),W=S(P,[["__scopeId","data-v-5678fe15"]]);export{W as default}; diff --git a/public/assets/confirmFileConflict-CQjiGfum.js b/public/assets/confirmFileConflict-CelrLmFh.js similarity index 92% rename from public/assets/confirmFileConflict-CQjiGfum.js rename to public/assets/confirmFileConflict-CelrLmFh.js index 9bf69ee..5e1920d 100644 --- a/public/assets/confirmFileConflict-CQjiGfum.js +++ b/public/assets/confirmFileConflict-CelrLmFh.js @@ -1 +1 @@ -import{s as t,i as k}from"./index-EFlNRwTR.js";import{B,I as i,X as F,C as s,D as m,G as u,u as n,Z as g,U as d,H as l,P as a,W as p,_ as C,O as $,V as h}from"./vue-DweYBrEc.js";import{_ as N}from"./index-fNs72j9w.js";import"./index-CLJRKiC0.js";import"./terminal-B3G_hUkG.js";const T={class:"confirm-file-conflict"},U={class:"conflict-title"},I={class:"conflict-title"},z={key:0},E={class:"center-buttons"},G=B({__name:"confirmFileConflict",setup(H){const w=()=>{t.dialog.common=!1,t.goodsInfo.enable=!0};return(e,r)=>{const D=i("el-alert"),c=i("el-table-column"),b=i("el-table"),f=i("el-option"),y=i("el-select"),_=i("el-button"),v=F("blur");return s(),m("div",null,[u("div",T,[n(t).common.disableConflictFile.length?(s(),m(g,{key:0},[u("div",U,d(e.$t("module.File conflict")),1),l(D,{closable:!1,center:!0,title:e.$t("module.Update warning"),class:"alert-warning",type:"warning"},null,8,["title"]),l(b,{data:n(t).common.disableConflictFile,stripe:"",border:"",style:{width:"100%",marginBottom:"20px"}},{default:a(()=>[l(c,{prop:"file",label:e.$t("module.Conflict file")},null,8,["label"])]),_:1},8,["data"])],64)):p("",!0),n(t).common.disableDependConflict.length>0?(s(),m(g,{key:1},[u("div",I,d(e.$t("module.The module declares the added dependencies")),1),l(b,{data:n(t).common.disableDependConflict,stripe:"",border:"",style:{width:"100%"}},{default:a(()=>[l(c,{prop:"env",label:e.$t("module.environment")},{default:a(o=>[o.row.env?(s(),m("span",z,d(e.$t("module.env "+o.row.env)),1)):p("",!0)]),_:1},8,["label"]),l(c,{prop:"dependTitle",label:e.$t("module.Dependencies")},null,8,["label"]),l(c,{prop:"solution",width:"200",label:e.$t("module.Treatment scheme"),align:"center"},{default:a(o=>[l(y,{modelValue:o.row.solution,"onUpdate:modelValue":V=>o.row.solution=V},{default:a(()=>[l(f,{label:e.$t("Delete"),value:"delete"},null,8,["label"]),l(f,{label:e.$t("module.retain"),value:"retain"},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data"])],64)):p("",!0)]),u("div",E,[C((s(),$(_,{class:"center-button",loading:n(t).loading.common,disabled:n(t).loading.common,size:"large",type:"primary",onClick:r[0]||(r[0]=o=>n(k)(!0))},{default:a(()=>[h(d(e.$t("module.Confirm to disable the module")),1)]),_:1},8,["loading","disabled"])),[[v]]),C((s(),$(_,{class:"center-button",size:"large",onClick:r[1]||(r[1]=o=>w())},{default:a(()=>[h(d(e.$t("Cancel")),1)]),_:1})),[[v]])])])}}}),Z=N(G,[["__scopeId","data-v-c638e996"]]);export{Z as default}; +import{s as t,i as k}from"./index-DFZ67V8S.js";import{B,I as i,X as F,C as s,D as m,G as u,u as n,Z as g,U as d,H as l,P as a,W as p,_ as C,O as $,V as h}from"./vue-DweYBrEc.js";import{_ as N}from"./index-BIzd9_wD.js";import"./index-BJWGSl1I.js";import"./terminal-Czj_5HRs.js";const T={class:"confirm-file-conflict"},U={class:"conflict-title"},I={class:"conflict-title"},z={key:0},E={class:"center-buttons"},G=B({__name:"confirmFileConflict",setup(H){const w=()=>{t.dialog.common=!1,t.goodsInfo.enable=!0};return(e,r)=>{const D=i("el-alert"),c=i("el-table-column"),b=i("el-table"),f=i("el-option"),y=i("el-select"),_=i("el-button"),v=F("blur");return s(),m("div",null,[u("div",T,[n(t).common.disableConflictFile.length?(s(),m(g,{key:0},[u("div",U,d(e.$t("module.File conflict")),1),l(D,{closable:!1,center:!0,title:e.$t("module.Update warning"),class:"alert-warning",type:"warning"},null,8,["title"]),l(b,{data:n(t).common.disableConflictFile,stripe:"",border:"",style:{width:"100%",marginBottom:"20px"}},{default:a(()=>[l(c,{prop:"file",label:e.$t("module.Conflict file")},null,8,["label"])]),_:1},8,["data"])],64)):p("",!0),n(t).common.disableDependConflict.length>0?(s(),m(g,{key:1},[u("div",I,d(e.$t("module.The module declares the added dependencies")),1),l(b,{data:n(t).common.disableDependConflict,stripe:"",border:"",style:{width:"100%"}},{default:a(()=>[l(c,{prop:"env",label:e.$t("module.environment")},{default:a(o=>[o.row.env?(s(),m("span",z,d(e.$t("module.env "+o.row.env)),1)):p("",!0)]),_:1},8,["label"]),l(c,{prop:"dependTitle",label:e.$t("module.Dependencies")},null,8,["label"]),l(c,{prop:"solution",width:"200",label:e.$t("module.Treatment scheme"),align:"center"},{default:a(o=>[l(y,{modelValue:o.row.solution,"onUpdate:modelValue":V=>o.row.solution=V},{default:a(()=>[l(f,{label:e.$t("Delete"),value:"delete"},null,8,["label"]),l(f,{label:e.$t("module.retain"),value:"retain"},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data"])],64)):p("",!0)]),u("div",E,[C((s(),$(_,{class:"center-button",loading:n(t).loading.common,disabled:n(t).loading.common,size:"large",type:"primary",onClick:r[0]||(r[0]=o=>n(k)(!0))},{default:a(()=>[h(d(e.$t("module.Confirm to disable the module")),1)]),_:1},8,["loading","disabled"])),[[v]]),C((s(),$(_,{class:"center-button",size:"large",onClick:r[1]||(r[1]=o=>w())},{default:a(()=>[h(d(e.$t("Cancel")),1)]),_:1})),[[v]])])])}}}),Z=N(G,[["__scopeId","data-v-c638e996"]]);export{Z as default}; diff --git a/public/assets/customerReport-8RMDutDK.js b/public/assets/customerReport-DHXr29xy.js similarity index 98% rename from public/assets/customerReport-8RMDutDK.js rename to public/assets/customerReport-DHXr29xy.js index f697e56..9327106 100644 --- a/public/assets/customerReport-8RMDutDK.js +++ b/public/assets/customerReport-DHXr29xy.js @@ -1 +1 @@ -import{x as X,_ as Z}from"./index-fNs72j9w.js";import{c as q}from"./moneyLog-DiIBY9Nv.js";import{B as J,b as h,l as k,a as Y,o as K,I as f,X as Q,C as c,D as m,G as e,U as o,u as n,H as p,P,V,_ as ee,Z as y,Y as C,$ as te,W as oe,F as se}from"./vue-DweYBrEc.js";const ae={class:"default-main admin-report-page customer-report"},ne={class:"admin-report-filter report-filter"},re={class:"admin-report-heading"},le={class:"admin-report-filter-content filter-content"},ue={class:"filter-item"},ie={class:"filter-item"},ce={class:"filter-item"},me={class:"filter-item"},de={class:"admin-report-actions filter-actions"},pe={class:"admin-report-summary date-summary"},_e={class:"admin-report-table-wrap report-table-wrap"},ge={rowspan:"2",class:"date-column"},ve={rowspan:"2",class:"username-column"},he={colspan:"2"},ye={colspan:"2"},be={rowspan:"2"},fe={rowspan:"2"},Re={rowspan:"2"},Le={class:"username-cell"},we={class:"deposit-value"},Ve={class:"deposit-value"},Ce={class:"withdraw-value"},De={class:"withdraw-value"},$e={class:"reward-cell"},ke={class:"reward-cell"},xe={key:0},ze=["colspan"],Ne={class:"admin-report-footer table-footer"},Pe={class:"admin-report-page-size page-size"},Me=J({name:"user/moneyLog/customerReport",__name:"customerReport",setup(Se){const{t:a}=X.useI18n(),R=h([]),A=k(()=>["deposit","withdraw",...R.value.map(r=>r.id)]),F=k(()=>9+R.value.length*2),I=k(()=>1580+R.value.length*250),j=[100,500,1e3,5e3],x=h([]),M=h(0),_=h(1),S=h(1),D=h(100),z=h(!1),d=Y({start:"",end:"",username:"",loseRebate:""}),u=Y({...d}),B=k(()=>u.start&&u.end?`${u.start} to ${u.end}`:u.start?`${u.start} -`:u.end?`- ${u.end}`:a("user.moneyLog.customerReport.allTime")),i=r=>{const t=Number(r);return Number.isFinite(t)?t:0},O=r=>{const t=(r==null?void 0:r.data)??r??{},g=t.games&&typeof t.games=="object"?t.games:{},L=Object.entries(g).map(([l,v])=>({id:l,name:String(v)})),w=Array.isArray(t.list)?t.list:[];return{games:L,rows:w.map(l=>({registerDate:String(l.register_date??""),username:String(l.username??""),depositCount:i(l.deposit_count),depositAmount:i(l.deposit_total),withdrawCount:i(l.withdraw_count),withdrawAmount:i(l.withdraw_total),winLose:i(l.win_lose),loseRebate:i(l.lose_rebate),referral:i(l.referral_count),rewards:L.map(v=>({gameId:v.id,count:i(l[`game_${v.id}_count`]),amount:i(l[`game_${v.id}_total`])}))})),total:i(t.count??t.total??w.length),currentPage:i(t.current_page)||_.value,lastPage:i(t.last_page)||1}},$=async()=>{z.value=!0;try{const r=await q({start:u.start,end:u.end,username:u.username,lose_rebate:u.loseRebate,page:_.value,limit:D.value}),t=O(r.data);R.value=t.games,x.value=t.rows,M.value=t.total,_.value=t.currentPage,S.value=t.lastPage}finally{z.value=!1}},U=async()=>{Object.assign(u,d),_.value=1,await $()},G=async()=>{Object.assign(d,{start:"",end:"",username:"",loseRebate:""}),await U()},W=async()=>{_.value=1,await $()},b=(r,t=!1)=>{const g=new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}).format(Number(r)||0);return t?`AUD${g}`:g},E=r=>{const t=Number(r)||0;return t===0?b(0):`${t>0?"+":"-"}${b(Math.abs(t))}`};return K($),(r,t)=>{const g=f("el-date-picker"),L=f("el-input"),w=f("el-button"),l=f("el-pagination"),v=f("el-option"),H=f("el-select"),T=Q("loading");return c(),m("div",ae,[e("section",ne,[e("header",re,o(n(a)("user.moneyLog.customerReport.title")),1),e("div",le,[e("div",ue,[e("label",null,o(n(a)("user.moneyLog.customerReport.startDate"))+":",1),p(g,{modelValue:d.start,"onUpdate:modelValue":t[0]||(t[0]=s=>d.start=s),type:"date","value-format":"YYYY-MM-DD",clearable:""},null,8,["modelValue"])]),e("div",ie,[e("label",null,o(n(a)("user.moneyLog.customerReport.endDate"))+":",1),p(g,{modelValue:d.end,"onUpdate:modelValue":t[1]||(t[1]=s=>d.end=s),type:"date","value-format":"YYYY-MM-DD",clearable:""},null,8,["modelValue"])]),e("div",ce,[e("label",null,o(n(a)("user.moneyLog.customerReport.fullUsername"))+":",1),p(L,{modelValue:d.username,"onUpdate:modelValue":t[2]||(t[2]=s=>d.username=s),placeholder:n(a)("user.moneyLog.customerReport.options"),clearable:""},null,8,["modelValue","placeholder"])]),e("div",me,[e("label",null,o(n(a)("user.moneyLog.customerReport.loseRebate"))+":",1),p(L,{modelValue:d.loseRebate,"onUpdate:modelValue":t[3]||(t[3]=s=>d.loseRebate=s),placeholder:n(a)("user.moneyLog.customerReport.rebatePlaceholder"),clearable:""},null,8,["modelValue","placeholder"])]),e("div",de,[p(w,{type:"primary",onClick:U},{default:P(()=>[V(o(n(a)("user.moneyLog.customerReport.search")),1)]),_:1}),p(w,{onClick:G},{default:P(()=>[V(o(n(a)("user.moneyLog.customerReport.clear")),1)]),_:1})])])]),e("div",pe,[e("strong",null,o(n(a)("user.moneyLog.customerReport.dateOfData"))+":",1),V(" "+o(B.value),1)]),ee((c(),m("div",_e,[e("table",{class:"admin-report-table report-table",style:se({minWidth:`${I.value}px`})},[e("thead",null,[e("tr",null,[e("th",ge,o(n(a)("user.moneyLog.customerReport.registerDate"))+" ↓",1),e("th",ve,o(n(a)("user.moneyLog.customerReport.username")),1),e("th",he,o(n(a)("user.moneyLog.customerReport.deposit")),1),e("th",ye,o(n(a)("user.moneyLog.customerReport.withdraw")),1),e("th",be,o(n(a)("user.moneyLog.customerReport.winLose"))+" ↕",1),e("th",fe,[V(o(n(a)("user.moneyLog.customerReport.loseRebate"))+" ",1),e("small",null,"("+o(n(a)("user.moneyLog.customerReport.option"))+")",1)]),e("th",Re,o(n(a)("user.moneyLog.customerReport.referral"))+" ↕",1),(c(!0),m(y,null,C(R.value,s=>(c(),m("th",{key:s.id,colspan:"2",class:"reward-heading"},o(n(a)("user.moneyLog.customerReport.reward",{game:s.name})),1))),128))]),e("tr",null,[(c(!0),m(y,null,C(A.value,s=>(c(),m(y,{key:s},[e("th",null,o(n(a)("user.moneyLog.customerReport.count"))+" ↕",1),e("th",null,o(n(a)("user.moneyLog.customerReport.amount"))+" ↕",1)],64))),128))])]),e("tbody",null,[(c(!0),m(y,null,C(x.value,s=>(c(),m("tr",{key:`${s.registerDate}-${s.username}`},[e("td",null,o(s.registerDate),1),e("td",Le,[t[6]||(t[6]=e("span",{class:"user-icon"},"♟",-1)),V(o(s.username),1)]),e("td",we,o(s.depositCount),1),e("td",Ve,o(b(s.depositAmount,!0)),1),e("td",Ce,o(s.withdrawCount),1),e("td",De,o(b(s.withdrawAmount,!0)),1),e("td",{class:te(s.winLose>=0?"positive-value":"negative-value")},o(E(s.winLose)),3),e("td",null,o(b(s.loseRebate)),1),e("td",null,o(s.referral),1),(c(!0),m(y,null,C(s.rewards,N=>(c(),m(y,{key:N.gameId},[e("td",$e,o(N.count),1),e("td",ke,o(b(N.amount)),1)],64))),128))]))),128)),x.value.length===0?(c(),m("tr",xe,[e("td",{class:"empty-row",colspan:F.value},o(n(a)("user.moneyLog.customerReport.noData")),9,ze)])):oe("",!0)])],4)])),[[T,z.value]]),e("div",Ne,[e("div",null,o(n(a)("user.moneyLog.customerReport.totalRecords",{total:M.value})),1),p(l,{"current-page":_.value,"onUpdate:currentPage":t[4]||(t[4]=s=>_.value=s),small:"",background:"",layout:"prev, pager, next","page-size":D.value,"page-count":S.value,onCurrentChange:$},null,8,["current-page","page-size","page-count"]),e("div",Pe,[e("span",null,o(n(a)("user.moneyLog.customerReport.show")),1),p(H,{modelValue:D.value,"onUpdate:modelValue":t[5]||(t[5]=s=>D.value=s),onChange:W},{default:P(()=>[(c(),m(y,null,C(j,s=>p(v,{key:s,label:s,value:s},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e("span",null,o(n(a)("user.moneyLog.customerReport.entries")),1)])])])}}}),Fe=Z(Me,[["__scopeId","data-v-adc861f2"]]);export{Fe as default}; +import{x as X,_ as Z}from"./index-BIzd9_wD.js";import{c as q}from"./moneyLog-B5jWmD9F.js";import{B as J,b as h,l as k,a as Y,o as K,I as f,X as Q,C as c,D as m,G as e,U as o,u as n,H as p,P,V,_ as ee,Z as y,Y as C,$ as te,W as oe,F as se}from"./vue-DweYBrEc.js";const ae={class:"default-main admin-report-page customer-report"},ne={class:"admin-report-filter report-filter"},re={class:"admin-report-heading"},le={class:"admin-report-filter-content filter-content"},ue={class:"filter-item"},ie={class:"filter-item"},ce={class:"filter-item"},me={class:"filter-item"},de={class:"admin-report-actions filter-actions"},pe={class:"admin-report-summary date-summary"},_e={class:"admin-report-table-wrap report-table-wrap"},ge={rowspan:"2",class:"date-column"},ve={rowspan:"2",class:"username-column"},he={colspan:"2"},ye={colspan:"2"},be={rowspan:"2"},fe={rowspan:"2"},Re={rowspan:"2"},Le={class:"username-cell"},we={class:"deposit-value"},Ve={class:"deposit-value"},Ce={class:"withdraw-value"},De={class:"withdraw-value"},$e={class:"reward-cell"},ke={class:"reward-cell"},xe={key:0},ze=["colspan"],Ne={class:"admin-report-footer table-footer"},Pe={class:"admin-report-page-size page-size"},Me=J({name:"user/moneyLog/customerReport",__name:"customerReport",setup(Se){const{t:a}=X.useI18n(),R=h([]),A=k(()=>["deposit","withdraw",...R.value.map(r=>r.id)]),F=k(()=>9+R.value.length*2),I=k(()=>1580+R.value.length*250),j=[100,500,1e3,5e3],x=h([]),M=h(0),_=h(1),S=h(1),D=h(100),z=h(!1),d=Y({start:"",end:"",username:"",loseRebate:""}),u=Y({...d}),B=k(()=>u.start&&u.end?`${u.start} to ${u.end}`:u.start?`${u.start} -`:u.end?`- ${u.end}`:a("user.moneyLog.customerReport.allTime")),i=r=>{const t=Number(r);return Number.isFinite(t)?t:0},O=r=>{const t=(r==null?void 0:r.data)??r??{},g=t.games&&typeof t.games=="object"?t.games:{},L=Object.entries(g).map(([l,v])=>({id:l,name:String(v)})),w=Array.isArray(t.list)?t.list:[];return{games:L,rows:w.map(l=>({registerDate:String(l.register_date??""),username:String(l.username??""),depositCount:i(l.deposit_count),depositAmount:i(l.deposit_total),withdrawCount:i(l.withdraw_count),withdrawAmount:i(l.withdraw_total),winLose:i(l.win_lose),loseRebate:i(l.lose_rebate),referral:i(l.referral_count),rewards:L.map(v=>({gameId:v.id,count:i(l[`game_${v.id}_count`]),amount:i(l[`game_${v.id}_total`])}))})),total:i(t.count??t.total??w.length),currentPage:i(t.current_page)||_.value,lastPage:i(t.last_page)||1}},$=async()=>{z.value=!0;try{const r=await q({start:u.start,end:u.end,username:u.username,lose_rebate:u.loseRebate,page:_.value,limit:D.value}),t=O(r.data);R.value=t.games,x.value=t.rows,M.value=t.total,_.value=t.currentPage,S.value=t.lastPage}finally{z.value=!1}},U=async()=>{Object.assign(u,d),_.value=1,await $()},G=async()=>{Object.assign(d,{start:"",end:"",username:"",loseRebate:""}),await U()},W=async()=>{_.value=1,await $()},b=(r,t=!1)=>{const g=new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}).format(Number(r)||0);return t?`AUD${g}`:g},E=r=>{const t=Number(r)||0;return t===0?b(0):`${t>0?"+":"-"}${b(Math.abs(t))}`};return K($),(r,t)=>{const g=f("el-date-picker"),L=f("el-input"),w=f("el-button"),l=f("el-pagination"),v=f("el-option"),H=f("el-select"),T=Q("loading");return c(),m("div",ae,[e("section",ne,[e("header",re,o(n(a)("user.moneyLog.customerReport.title")),1),e("div",le,[e("div",ue,[e("label",null,o(n(a)("user.moneyLog.customerReport.startDate"))+":",1),p(g,{modelValue:d.start,"onUpdate:modelValue":t[0]||(t[0]=s=>d.start=s),type:"date","value-format":"YYYY-MM-DD",clearable:""},null,8,["modelValue"])]),e("div",ie,[e("label",null,o(n(a)("user.moneyLog.customerReport.endDate"))+":",1),p(g,{modelValue:d.end,"onUpdate:modelValue":t[1]||(t[1]=s=>d.end=s),type:"date","value-format":"YYYY-MM-DD",clearable:""},null,8,["modelValue"])]),e("div",ce,[e("label",null,o(n(a)("user.moneyLog.customerReport.fullUsername"))+":",1),p(L,{modelValue:d.username,"onUpdate:modelValue":t[2]||(t[2]=s=>d.username=s),placeholder:n(a)("user.moneyLog.customerReport.options"),clearable:""},null,8,["modelValue","placeholder"])]),e("div",me,[e("label",null,o(n(a)("user.moneyLog.customerReport.loseRebate"))+":",1),p(L,{modelValue:d.loseRebate,"onUpdate:modelValue":t[3]||(t[3]=s=>d.loseRebate=s),placeholder:n(a)("user.moneyLog.customerReport.rebatePlaceholder"),clearable:""},null,8,["modelValue","placeholder"])]),e("div",de,[p(w,{type:"primary",onClick:U},{default:P(()=>[V(o(n(a)("user.moneyLog.customerReport.search")),1)]),_:1}),p(w,{onClick:G},{default:P(()=>[V(o(n(a)("user.moneyLog.customerReport.clear")),1)]),_:1})])])]),e("div",pe,[e("strong",null,o(n(a)("user.moneyLog.customerReport.dateOfData"))+":",1),V(" "+o(B.value),1)]),ee((c(),m("div",_e,[e("table",{class:"admin-report-table report-table",style:se({minWidth:`${I.value}px`})},[e("thead",null,[e("tr",null,[e("th",ge,o(n(a)("user.moneyLog.customerReport.registerDate"))+" ↓",1),e("th",ve,o(n(a)("user.moneyLog.customerReport.username")),1),e("th",he,o(n(a)("user.moneyLog.customerReport.deposit")),1),e("th",ye,o(n(a)("user.moneyLog.customerReport.withdraw")),1),e("th",be,o(n(a)("user.moneyLog.customerReport.winLose"))+" ↕",1),e("th",fe,[V(o(n(a)("user.moneyLog.customerReport.loseRebate"))+" ",1),e("small",null,"("+o(n(a)("user.moneyLog.customerReport.option"))+")",1)]),e("th",Re,o(n(a)("user.moneyLog.customerReport.referral"))+" ↕",1),(c(!0),m(y,null,C(R.value,s=>(c(),m("th",{key:s.id,colspan:"2",class:"reward-heading"},o(n(a)("user.moneyLog.customerReport.reward",{game:s.name})),1))),128))]),e("tr",null,[(c(!0),m(y,null,C(A.value,s=>(c(),m(y,{key:s},[e("th",null,o(n(a)("user.moneyLog.customerReport.count"))+" ↕",1),e("th",null,o(n(a)("user.moneyLog.customerReport.amount"))+" ↕",1)],64))),128))])]),e("tbody",null,[(c(!0),m(y,null,C(x.value,s=>(c(),m("tr",{key:`${s.registerDate}-${s.username}`},[e("td",null,o(s.registerDate),1),e("td",Le,[t[6]||(t[6]=e("span",{class:"user-icon"},"♟",-1)),V(o(s.username),1)]),e("td",we,o(s.depositCount),1),e("td",Ve,o(b(s.depositAmount,!0)),1),e("td",Ce,o(s.withdrawCount),1),e("td",De,o(b(s.withdrawAmount,!0)),1),e("td",{class:te(s.winLose>=0?"positive-value":"negative-value")},o(E(s.winLose)),3),e("td",null,o(b(s.loseRebate)),1),e("td",null,o(s.referral),1),(c(!0),m(y,null,C(s.rewards,N=>(c(),m(y,{key:N.gameId},[e("td",$e,o(N.count),1),e("td",ke,o(b(N.amount)),1)],64))),128))]))),128)),x.value.length===0?(c(),m("tr",xe,[e("td",{class:"empty-row",colspan:F.value},o(n(a)("user.moneyLog.customerReport.noData")),9,ze)])):oe("",!0)])],4)])),[[T,z.value]]),e("div",Ne,[e("div",null,o(n(a)("user.moneyLog.customerReport.totalRecords",{total:M.value})),1),p(l,{"current-page":_.value,"onUpdate:currentPage":t[4]||(t[4]=s=>_.value=s),small:"",background:"",layout:"prev, pager, next","page-size":D.value,"page-count":S.value,onCurrentChange:$},null,8,["current-page","page-size","page-count"]),e("div",Pe,[e("span",null,o(n(a)("user.moneyLog.customerReport.show")),1),p(H,{modelValue:D.value,"onUpdate:modelValue":t[5]||(t[5]=s=>D.value=s),onChange:W},{default:P(()=>[(c(),m(y,null,C(j,s=>p(v,{key:s,label:s,value:s},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e("span",null,o(n(a)("user.moneyLog.customerReport.entries")),1)])])])}}}),Fe=Z(Me,[["__scopeId","data-v-adc861f2"]]);export{Fe as default}; diff --git a/public/assets/dailyReport-DghlDGaq.js b/public/assets/dailyReport-DUx50_sO.js similarity index 97% rename from public/assets/dailyReport-DghlDGaq.js rename to public/assets/dailyReport-DUx50_sO.js index a45f162..670483e 100644 --- a/public/assets/dailyReport-DghlDGaq.js +++ b/public/assets/dailyReport-DUx50_sO.js @@ -1 +1 @@ -import{x as z,_ as B}from"./index-fNs72j9w.js";import{d as U}from"./moneyLog-DiIBY9Nv.js";import{B as j,a as A,b as D,l as C,o as G,I as W,X as E,C as d,D as c,G as e,U as a,u as i,H as k,Z as p,Y as h,$ as w,_ as H,W as O,F as P}from"./vue-DweYBrEc.js";const X={class:"default-main admin-report-page daily-report"},Z={class:"admin-report-filter report-filter"},q={class:"admin-report-heading"},J={class:"admin-report-filter-content filter-content"},K={class:"date-fields"},Q={class:"admin-report-tabs period-tabs"},ee=["onClick"],te={class:"admin-report-table-wrap report-table-wrap"},ae={rowspan:"2",class:"date-column"},oe={colspan:"2"},se={colspan:"2"},ne={rowspan:"2",class:"single-column"},le={colspan:"2"},ie={rowspan:"2",class:"single-column"},re={rowspan:"2",class:"single-column"},de={rowspan:"2",class:"single-column"},ce={class:"count-column"},ue={class:"total-column"},me={class:"date-cell"},pe={class:"deposit-value"},_e={class:"deposit-value"},ye={class:"withdraw-value"},ge={class:"withdraw-value"},he={class:"reward-cell"},ve={class:"reward-cell"},be={key:0},fe=["colspan"],we=j({name:"user/moneyLog/dailyReport",__name:"dailyReport",setup(Re){const{t:l}=z.useI18n(),M=s=>{const o=m=>String(m).padStart(2,"0");return`${s.getFullYear()}-${o(s.getMonth()+1)}-${o(s.getDate())}`},v=new Date,Y=new Date(v.getFullYear(),v.getMonth(),1),$=new Date(v.getFullYear(),v.getMonth()+1,0),u=A({start:M(Y),end:M($),period:"daily"}),F=[{value:"daily",label:"user.moneyLog.dailyReport.daily"},{value:"monthly",label:"user.moneyLog.dailyReport.monthly"},{value:"yearly",label:"user.moneyLog.dailyReport.yearly"}],_=D([]),N=C(()=>["deposit","withdraw","unclaim",..._.value.map(s=>s.id)]),V=C(()=>11+_.value.length*2),x=C(()=>1596+_.value.length*230),R=D([]),L=D(!1),r=s=>{const o=Number(s);return Number.isFinite(o)?o:0},I=s=>{const o=(s==null?void 0:s.data)??s??{},m=o.games&&typeof o.games=="object"?o.games:{},f=Object.entries(m).map(([n,g])=>({id:n,name:String(g)})),t=Array.isArray(o.list)?o.list:[];return{games:f,rows:t.map(n=>({date:String(n.date??""),depositCount:r(n.deposit_count),depositTotal:r(n.deposit_total),withdrawCount:r(n.withdraw_count),withdrawTotal:r(n.withdraw_total),winLose:r(n.win_lose),unclaimCount:r(n.unclaim_count),unclaimTotal:r(n.unclaim_total),activeMember:r(n.active_member),newDeposit:r(n.new_deposit),newRegister:r(n.new_register),rewards:f.map(g=>({gameId:g.id,count:r(n[`game_${g.id}_count`]),total:r(n[`game_${g.id}_total`])}))}))}},b=async()=>{L.value=!0;try{const s=await U({start:u.start,end:u.end,type:u.period}),o=I(s.data);_.value=o.games,R.value=o.rows}finally{L.value=!1}},T=s=>{u.period!==s&&(u.period=s,b())},y=(s,o=!1)=>{const m=new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}).format(Number(s)||0);return o?`AUD${m}`:m},S=s=>{const o=Number(s)||0;return`${o>=0?"+":"-"}${y(Math.abs(o))}`};return G(b),(s,o)=>{const m=W("el-date-picker"),f=E("loading");return d(),c("div",X,[e("section",Z,[e("header",q,a(i(l)("user.moneyLog.dailyReport.title")),1),e("div",J,[e("div",K,[e("label",null,a(i(l)("user.moneyLog.dailyReport.startDate"))+":",1),k(m,{modelValue:u.start,"onUpdate:modelValue":o[0]||(o[0]=t=>u.start=t),type:"date","value-format":"YYYY-MM-DD",clearable:!1,onChange:b},null,8,["modelValue"]),e("label",null,a(i(l)("user.moneyLog.dailyReport.endDate"))+":",1),k(m,{modelValue:u.end,"onUpdate:modelValue":o[1]||(o[1]=t=>u.end=t),type:"date","value-format":"YYYY-MM-DD",clearable:!1,onChange:b},null,8,["modelValue"])]),e("div",Q,[(d(),c(p,null,h(F,t=>e("button",{key:t.value,type:"button",class:w({active:u.period===t.value}),onClick:n=>T(t.value)},a(i(l)(t.label)),11,ee)),64))])])]),H((d(),c("div",te,[e("table",{class:"admin-report-table report-table",style:P({minWidth:`${x.value}px`})},[e("thead",null,[e("tr",null,[e("th",ae,a(i(l)("user.moneyLog.dailyReport.date")),1),e("th",oe,a(i(l)("user.moneyLog.dailyReport.deposit")),1),e("th",se,a(i(l)("user.moneyLog.dailyReport.withdraw")),1),e("th",ne,a(i(l)("user.moneyLog.dailyReport.winLose")),1),e("th",le,a(i(l)("user.moneyLog.dailyReport.unclaim")),1),e("th",ie,a(i(l)("user.moneyLog.dailyReport.activeMember")),1),e("th",re,a(i(l)("user.moneyLog.dailyReport.newDeposit")),1),e("th",de,a(i(l)("user.moneyLog.dailyReport.newRegister")),1),(d(!0),c(p,null,h(_.value,t=>(d(),c("th",{key:t.id,colspan:"2",class:"reward-heading"},a(i(l)("user.moneyLog.dailyReport.reward",{game:t.name})),1))),128))]),e("tr",null,[(d(!0),c(p,null,h(N.value,t=>(d(),c(p,{key:t},[e("th",ce,a(i(l)("user.moneyLog.dailyReport.count")),1),e("th",ue,a(i(l)("user.moneyLog.dailyReport.total")),1)],64))),128))])]),e("tbody",null,[(d(!0),c(p,null,h(R.value,t=>(d(),c("tr",{key:t.date},[e("td",me,a(t.date),1),e("td",pe,a(t.depositCount),1),e("td",_e,a(y(t.depositTotal,!0)),1),e("td",ye,a(t.withdrawCount),1),e("td",ge,a(y(t.withdrawTotal,!0)),1),e("td",{class:w(t.winLose>=0?"positive-value":"negative-value")},a(S(t.winLose)),3),e("td",{class:w({"unclaim-value":t.unclaimCount>0})},a(t.unclaimCount),3),e("td",{class:w({"unclaim-value":t.unclaimTotal>0})},a(y(t.unclaimTotal,!0)),3),e("td",null,a(t.activeMember),1),e("td",null,a(t.newDeposit),1),e("td",null,a(t.newRegister),1),(d(!0),c(p,null,h(t.rewards,n=>(d(),c(p,{key:n.gameId},[e("td",he,a(n.count),1),e("td",ve,a(y(n.total)),1)],64))),128))]))),128)),R.value.length===0?(d(),c("tr",be,[e("td",{class:"empty-row",colspan:V.value},a(i(l)("user.moneyLog.dailyReport.noData")),9,fe)])):O("",!0)])],4)])),[[f,L.value]])])}}}),Me=B(we,[["__scopeId","data-v-5899792f"]]);export{Me as default}; +import{x as z,_ as B}from"./index-BIzd9_wD.js";import{d as U}from"./moneyLog-B5jWmD9F.js";import{B as j,a as A,b as D,l as C,o as G,I as W,X as E,C as d,D as c,G as e,U as a,u as i,H as k,Z as p,Y as h,$ as w,_ as H,W as O,F as P}from"./vue-DweYBrEc.js";const X={class:"default-main admin-report-page daily-report"},Z={class:"admin-report-filter report-filter"},q={class:"admin-report-heading"},J={class:"admin-report-filter-content filter-content"},K={class:"date-fields"},Q={class:"admin-report-tabs period-tabs"},ee=["onClick"],te={class:"admin-report-table-wrap report-table-wrap"},ae={rowspan:"2",class:"date-column"},oe={colspan:"2"},se={colspan:"2"},ne={rowspan:"2",class:"single-column"},le={colspan:"2"},ie={rowspan:"2",class:"single-column"},re={rowspan:"2",class:"single-column"},de={rowspan:"2",class:"single-column"},ce={class:"count-column"},ue={class:"total-column"},me={class:"date-cell"},pe={class:"deposit-value"},_e={class:"deposit-value"},ye={class:"withdraw-value"},ge={class:"withdraw-value"},he={class:"reward-cell"},ve={class:"reward-cell"},be={key:0},fe=["colspan"],we=j({name:"user/moneyLog/dailyReport",__name:"dailyReport",setup(Re){const{t:l}=z.useI18n(),M=s=>{const o=m=>String(m).padStart(2,"0");return`${s.getFullYear()}-${o(s.getMonth()+1)}-${o(s.getDate())}`},v=new Date,Y=new Date(v.getFullYear(),v.getMonth(),1),$=new Date(v.getFullYear(),v.getMonth()+1,0),u=A({start:M(Y),end:M($),period:"daily"}),F=[{value:"daily",label:"user.moneyLog.dailyReport.daily"},{value:"monthly",label:"user.moneyLog.dailyReport.monthly"},{value:"yearly",label:"user.moneyLog.dailyReport.yearly"}],_=D([]),N=C(()=>["deposit","withdraw","unclaim",..._.value.map(s=>s.id)]),V=C(()=>11+_.value.length*2),x=C(()=>1596+_.value.length*230),R=D([]),L=D(!1),r=s=>{const o=Number(s);return Number.isFinite(o)?o:0},I=s=>{const o=(s==null?void 0:s.data)??s??{},m=o.games&&typeof o.games=="object"?o.games:{},f=Object.entries(m).map(([n,g])=>({id:n,name:String(g)})),t=Array.isArray(o.list)?o.list:[];return{games:f,rows:t.map(n=>({date:String(n.date??""),depositCount:r(n.deposit_count),depositTotal:r(n.deposit_total),withdrawCount:r(n.withdraw_count),withdrawTotal:r(n.withdraw_total),winLose:r(n.win_lose),unclaimCount:r(n.unclaim_count),unclaimTotal:r(n.unclaim_total),activeMember:r(n.active_member),newDeposit:r(n.new_deposit),newRegister:r(n.new_register),rewards:f.map(g=>({gameId:g.id,count:r(n[`game_${g.id}_count`]),total:r(n[`game_${g.id}_total`])}))}))}},b=async()=>{L.value=!0;try{const s=await U({start:u.start,end:u.end,type:u.period}),o=I(s.data);_.value=o.games,R.value=o.rows}finally{L.value=!1}},T=s=>{u.period!==s&&(u.period=s,b())},y=(s,o=!1)=>{const m=new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}).format(Number(s)||0);return o?`AUD${m}`:m},S=s=>{const o=Number(s)||0;return`${o>=0?"+":"-"}${y(Math.abs(o))}`};return G(b),(s,o)=>{const m=W("el-date-picker"),f=E("loading");return d(),c("div",X,[e("section",Z,[e("header",q,a(i(l)("user.moneyLog.dailyReport.title")),1),e("div",J,[e("div",K,[e("label",null,a(i(l)("user.moneyLog.dailyReport.startDate"))+":",1),k(m,{modelValue:u.start,"onUpdate:modelValue":o[0]||(o[0]=t=>u.start=t),type:"date","value-format":"YYYY-MM-DD",clearable:!1,onChange:b},null,8,["modelValue"]),e("label",null,a(i(l)("user.moneyLog.dailyReport.endDate"))+":",1),k(m,{modelValue:u.end,"onUpdate:modelValue":o[1]||(o[1]=t=>u.end=t),type:"date","value-format":"YYYY-MM-DD",clearable:!1,onChange:b},null,8,["modelValue"])]),e("div",Q,[(d(),c(p,null,h(F,t=>e("button",{key:t.value,type:"button",class:w({active:u.period===t.value}),onClick:n=>T(t.value)},a(i(l)(t.label)),11,ee)),64))])])]),H((d(),c("div",te,[e("table",{class:"admin-report-table report-table",style:P({minWidth:`${x.value}px`})},[e("thead",null,[e("tr",null,[e("th",ae,a(i(l)("user.moneyLog.dailyReport.date")),1),e("th",oe,a(i(l)("user.moneyLog.dailyReport.deposit")),1),e("th",se,a(i(l)("user.moneyLog.dailyReport.withdraw")),1),e("th",ne,a(i(l)("user.moneyLog.dailyReport.winLose")),1),e("th",le,a(i(l)("user.moneyLog.dailyReport.unclaim")),1),e("th",ie,a(i(l)("user.moneyLog.dailyReport.activeMember")),1),e("th",re,a(i(l)("user.moneyLog.dailyReport.newDeposit")),1),e("th",de,a(i(l)("user.moneyLog.dailyReport.newRegister")),1),(d(!0),c(p,null,h(_.value,t=>(d(),c("th",{key:t.id,colspan:"2",class:"reward-heading"},a(i(l)("user.moneyLog.dailyReport.reward",{game:t.name})),1))),128))]),e("tr",null,[(d(!0),c(p,null,h(N.value,t=>(d(),c(p,{key:t},[e("th",ce,a(i(l)("user.moneyLog.dailyReport.count")),1),e("th",ue,a(i(l)("user.moneyLog.dailyReport.total")),1)],64))),128))])]),e("tbody",null,[(d(!0),c(p,null,h(R.value,t=>(d(),c("tr",{key:t.date},[e("td",me,a(t.date),1),e("td",pe,a(t.depositCount),1),e("td",_e,a(y(t.depositTotal,!0)),1),e("td",ye,a(t.withdrawCount),1),e("td",ge,a(y(t.withdrawTotal,!0)),1),e("td",{class:w(t.winLose>=0?"positive-value":"negative-value")},a(S(t.winLose)),3),e("td",{class:w({"unclaim-value":t.unclaimCount>0})},a(t.unclaimCount),3),e("td",{class:w({"unclaim-value":t.unclaimTotal>0})},a(y(t.unclaimTotal,!0)),3),e("td",null,a(t.activeMember),1),e("td",null,a(t.newDeposit),1),e("td",null,a(t.newRegister),1),(d(!0),c(p,null,h(t.rewards,n=>(d(),c(p,{key:n.gameId},[e("td",he,a(n.count),1),e("td",ve,a(y(n.total)),1)],64))),128))]))),128)),R.value.length===0?(d(),c("tr",be,[e("td",{class:"empty-row",colspan:V.value},a(i(l)("user.moneyLog.dailyReport.noData")),9,fe)])):O("",!0)])],4)])),[[f,L.value]])])}}}),Me=B(we,[["__scopeId","data-v-5899792f"]]);export{Me as default}; diff --git a/public/assets/darkSwitch-CMn1l1Tk.js b/public/assets/darkSwitch-BvKBTcdV.js similarity index 88% rename from public/assets/darkSwitch-CMn1l1Tk.js rename to public/assets/darkSwitch-BvKBTcdV.js index 85cc2f7..0de49d3 100644 --- a/public/assets/darkSwitch-CMn1l1Tk.js +++ b/public/assets/darkSwitch-BvKBTcdV.js @@ -1 +1 @@ -import{_ as t}from"./index-fNs72j9w.js";import{I as e,C as a,D as n,G as s,H as c}from"./vue-DweYBrEc.js";const g="/assets/logo-t5WO8pHa.png",i={},r={class:"theme-toggle-content"},_={class:"switch"},l={class:"switch-action"};function d(p,h){const o=e("Icon");return a(),n("div",r,[s("div",_,[s("div",l,[c(o,{name:"local-dark",color:"#f2f2f2",size:"13px",class:"switch-icon dark-icon"}),c(o,{name:"local-light",color:"#303133",size:"13px",class:"switch-icon light-icon"})])])])}const k=t(i,[["render",d],["__scopeId","data-v-62d134a8"]]);export{k as D,g as _}; +import{_ as t}from"./index-BIzd9_wD.js";import{I as e,C as a,D as n,G as s,H as c}from"./vue-DweYBrEc.js";const g="/assets/logo-t5WO8pHa.png",i={},r={class:"theme-toggle-content"},_={class:"switch"},l={class:"switch-action"};function d(p,h){const o=e("Icon");return a(),n("div",r,[s("div",_,[s("div",l,[c(o,{name:"local-dark",color:"#f2f2f2",size:"13px",class:"switch-icon dark-icon"}),c(o,{name:"local-light",color:"#303133",size:"13px",class:"switch-icon light-icon"})])])])}const k=t(i,[["render",d],["__scopeId","data-v-62d134a8"]]);export{k as D,g as _}; diff --git a/public/assets/dashboard-JBt8kWSu.js b/public/assets/dashboard-CambQJYo.js similarity index 99% rename from public/assets/dashboard-JBt8kWSu.js rename to public/assets/dashboard-CambQJYo.js index 56bc667..0494568 100644 --- a/public/assets/dashboard-JBt8kWSu.js +++ b/public/assets/dashboard-CambQJYo.js @@ -1 +1 @@ -import{B as oa,b as ae,a as $,l as z,o as na,I as v,X as ra,C,D as x,G as s,U as u,u as o,Z as R,Y as H,F as da,$ as te,H as n,P as i,V as b,aG as sa,W as fe,O as le,_ as ia}from"./vue-DweYBrEc.js";import{c as Y,x as ua,_ as ca}from"./index-fNs72j9w.js";const O="/admin/Dashboard/";function ma(A){return Y({url:O+"index",method:"get",params:A})}function ba(A){return Y({url:O+"bankTransact",method:"post",data:A},{showSuccessMessage:!0})}function pa(A){return Y({url:O+"newTransact",method:"post",data:A},{showSuccessMessage:!0})}function ha(A){return Y({url:O+"editTransact",method:"post",data:A},{showSuccessMessage:!0})}function fa(A){return Y({url:O+"delTransact",method:"get",params:A})}function ga(A){return Y({url:O+"logHistory",method:"get",params:A})}const _a={class:"default-main bookkeeping-dashboard"},va={class:"dashboard-grid"},ya={class:"dashboard-panel bank-panel"},ka={class:"panel-title"},wa={class:"table-scroll"},Ca={class:"bank-table"},Ta={class:"balance"},Va={class:"bank-operate"},Aa=["id"],Da={class:"bank-operate-main"},Ua=["for","aria-label","title"],xa={class:"breakdown"},Ma={class:"breakdown-row breakdown-in"},Na={class:"breakdown-count"},$a={class:"breakdown-row breakdown-out"},Ia={class:"breakdown-count"},Sa={class:"bank-calculator"},Fa={class:"calculator-formula"},Ba={class:"calculator-hint"},Pa={key:0},za={class:"empty-banks",colspan:"4"},Ra={class:"summary-side"},Ya={class:"dashboard-panel summary-panel"},Oa={class:"panel-title"},Wa={class:"transaction-section"},Ha={class:"filter-row"},La={class:"date-filter"},Ea={class:"totals"},ja={class:"pagination"},Ga={class:"dialog-note"},qa=oa({name:"dashboard",__name:"dashboard",setup(A){const{t}=ua.useI18n(),L=()=>{const a=new Date,e=r=>r.toString().padStart(2,"0");return`${a.getFullYear()}-${e(a.getMonth()+1)}-${e(a.getDate())}`},M=a=>Number(a).toLocaleString("en-AU",{minimumFractionDigits:2,maximumFractionDigits:2}),f=a=>{const e=Number(a);return Number.isFinite(e)?e:0},ge=a=>a.replace(/,/g,"").replace(/乘以/g,"*").replace(/除以/g,"/").replace(/加/g,"+").replace(/减/g,"-").replace(/[+]/g,"+").replace(/[-–—]/g,"-").replace(/[×*xX]/g,"*").replace(/[÷/]/g,"/").replace(/\s+/g,"").replace(/^=/,""),_e=a=>{let e=0;const r=()=>{const g=a.slice(e).match(/^(?:\d+(?:\.\d*)?|\.\d+)/);return g?(e+=g[0].length,Number(g[0])):null},d=()=>{const g=a[e];if(g==="+")return e+=1,d();if(g==="-"){e+=1;const h=d();return h===null?null:-h}if(g==="("){e+=1;const h=c();return h===null||a[e]!==")"?null:(e+=1,h)}return r()},p=()=>{let g=d();if(g===null)return null;for(;a[e]==="*"||a[e]==="/";){const h=a[e];e+=1;const U=d();if(U===null)return null;g=h==="*"?g*U:U===0?Number.NaN:g/U}return g};function c(){let g=p();if(g===null)return null;for(;a[e]==="+"||a[e]==="-";){const h=a[e];e+=1;const U=p();if(U===null)return null;g=h==="+"?g+U:g-U}return g}const T=c();return T!==null&&e===a.length&&Number.isFinite(T)?T:null},ve=(a,e)=>{const r=ge(e);if(!r)return{valid:!0,value:a};if(!/^[\d+\-*/().]+$/.test(r))return{valid:!1,value:a};const d=/^[+\-*/]/.test(r)?`${a}${r}`:`${a}+${r}`,p=_e(d);return p===null?{valid:!1,value:a}:{valid:!0,value:p}},E=a=>Math.min(255,Math.max(0,Math.round(a))),Z=a=>{const e=Number(a);return Number.isFinite(e)?E(e):0},ye=a=>{if(a===void 0)return 1;const e=Number(a);return Number.isFinite(e)?Math.min(1,Math.max(0,e)):1},oe=a=>{const e=a.trim(),r=e.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(r){const p=r[1],c=p.length===3?p.split("").map(T=>T+T).join(""):p;return{r:Number.parseInt(c.slice(0,2),16),g:Number.parseInt(c.slice(2,4),16),b:Number.parseInt(c.slice(4,6),16),a:c.length===8?Number.parseInt(c.slice(6,8),16)/255:1}}const d=e.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)$/i);return d?{r:Z(d[1]),g:Z(d[2]),b:Z(d[3]),a:ye(d[4])}:null},ke=a=>`rgb(${E(a.r)}, ${E(a.g)}, ${E(a.b)})`,we=(a,e,r)=>({r:a.r*(1-r)+e.r*r,g:a.g*(1-r)+e.g*r,b:a.b*(1-r)+e.b*r}),Ce=a=>{const e=oe(a);if(!e)return a;const r={r:e.r*e.a+255*(1-e.a),g:e.g*e.a+255*(1-e.a),b:e.b*e.a+255*(1-e.a)},d=Math.max(r.r,r.g,r.b),p=Math.min(r.r,r.g,r.b);return d-p<18?ke(we(r,{r:241,g:245,b:249},.72)):r.g>=r.r&&r.g>=r.b?"#d9f3e5":r.r>=r.g&&r.r>=r.b?"#f8dde2":"#dbeafe"},K=a=>{const e=a/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},ne=a=>.2126*K(a.r)+.7152*K(a.g)+.0722*K(a.b),J=(a,e)=>{const r=Math.max(a,e),d=Math.min(a,e);return(r+.05)/(d+.05)},Te=a=>{const e=oe(a);if(!e)return"#172033";const r={r:e.r*e.a+255*(1-e.a),g:e.g*e.a+255*(1-e.a),b:e.b*e.a+255*(1-e.a)},d=ne(r),p=J(d,ne({r:23,g:32,b:51})),c=J(d,1),T=J(d,0);return p>=4.5||p>=c?"#172033":c>=T?"#ffffff":"#000000"},Ve=a=>{if(!a.labelColor)return{};const e=Ce(a.labelColor),r=Te(e),d=r==="#ffffff";return{backgroundColor:e,"--bank-row-text-color":r,"--bank-row-muted-color":d?"rgba(255, 255, 255, 0.82)":"rgba(0, 0, 0, 0.72)","--bank-row-border-color":d?"rgba(255, 255, 255, 0.24)":"rgba(0, 0, 0, 0.16)","--bank-row-control-bg":d?"rgba(255, 255, 255, 0.16)":"rgba(255, 255, 255, 0.72)","--bank-row-control-hover-bg":d?"rgba(255, 255, 255, 0.26)":"rgba(255, 255, 255, 0.88)"}},re=a=>{if(typeof a=="string"&&a.trim()&&!Number.isFinite(Number(a)))return a;const e=f(a);if(!e)return"";const r=new Date(e*1e3),d=p=>p.toString().padStart(2,"0");return`${r.getFullYear()}-${d(r.getMonth()+1)}-${d(r.getDate())} ${d(r.getHours())}:${d(r.getMinutes())}:${d(r.getSeconds())}`},Ae=a=>{const e=f(a.total_fund_in??a.fund_in),r=f(a.total_fund_out??a.fund_out),d=String(a.safe_alert??"0");return{id:a.id,name:a.bank_name||"-",account:a.bank_account||"",balance:f(a.current_balance??a.balance??e-r),deposit:e,withdraw:r,depositCount:f(a.count_fund_in??a.deposit_count??a.tx_in),withdrawCount:f(a.count_fund_out??a.withdraw_count??a.tx_out),alertCode:d,rowClass:String(a.status??"1")==="0"?"bank-muted":"",labelColor:a.label_color||""}},F=ae([]),de=ae([]),y=$({totalDeposit:0,totalWithdraw:0,countDeposit:0,countWithdraw:0,activePlayer:0,firstDeposit:0,unclaimAmount:0,unclaimReceipt:0}),j=$({totalDeposit:0,totalWithdraw:0}),D=$({startDate:L(),endDate:L()}),k=$({count:0,currentPage:1,lastPage:1,pageSize:10}),W=ae(!1),Q=$({}),se=z(()=>W.value?F.value:F.value.slice(0,4)),De=z(()=>j.totalDeposit),Ue=z(()=>j.totalWithdraw),xe=z(()=>{const a=new Date(`${D.startDate}T00:00:00`),e=new Date(`${D.endDate}T00:00:00`),r=Math.max(1,Math.floor((e.getTime()-a.getTime())/864e5)+1);return t("dashboard.Date range",{start:D.startDate,end:D.endDate,days:r,unit:t(r===1?"dashboard.Day":"dashboard.Days")})}),Me=z(()=>[{label:t("dashboard.Total Deposit / IN"),value:`AUD ${M(y.totalDeposit)}`},{label:t("dashboard.Total Withdraw / OUT"),value:`AUD ${M(y.totalWithdraw)}`},{label:t("dashboard.Deposit Count"),value:y.countDeposit},{label:t("dashboard.Withdraw Count"),value:y.countWithdraw},{label:t("dashboard.Active Player"),value:y.activePlayer},{label:t("dashboard.First Deposit Player"),value:y.firstDeposit},{label:t("dashboard.Unclaimed Amount"),value:`AUD ${M(y.unclaimAmount)}`},{label:t("dashboard.Unclaimed Receipt"),value:y.unclaimReceipt}]),G=a=>String(a.id),ie=a=>`bank-calculator-${G(a).replace(/[^a-zA-Z0-9_-]/g,"-")}`,ue=a=>ve(a.balance,Q[G(a)]||""),Ne=a=>!ue(a).valid,$e=a=>{const e=ue(a);return e.valid?`AUD ${M(e.value)}`:"AUD --"},_=$({visible:!1,loading:!1,mode:"create",editId:""}),Ie=z(()=>_.mode==="edit"?t("dashboard.Edit Transaction",{id:_.editId}):t("dashboard.Create New Transaction")),m=$({time:"",timeMode:"Auto",category:1,type:1,username:"",remark:"",amount:0,bank:"",label:"",ticketAuto:!0}),N=$({visible:!1,loading:!1,rows:[]}),I=$({visible:!1,loading:!1}),w=$({bankFrom:"",fromName:"",bankTo:"",money:0,remark:""}),Se=a=>({1:t("dashboard.Hourly Alert"),2:t("dashboard.Daily Alert"),3:t("dashboard.Weekly Alert"),4:t("dashboard.Monthly Alert"),5:t("dashboard.Yearly Alert"),6:t("dashboard.Lifetime Alert")})[a]||t("dashboard.No Alert"),Fe=a=>({1:t("dashboard.Deposit"),2:t("dashboard.Withdraw"),3:"IN",4:"OUT"})[a]||a,Be=a=>({1:t("dashboard.Customer"),2:t("dashboard.Other Adjust")})[a]||a,Pe=a=>({1:t("dashboard.First Deposit"),2:t("dashboard.Unclaim")})[a]||"",ze=a=>{const e=String(a.type??"");return{id:a.id,createdBy:a.created_by||"",createdTime:re(a.create_time),categoryId:String(a.category??""),username:a.user_name||"",remark:a.memo||"",bank:a.bank_name||"",bankId:a.bank_id||"",typeId:e,flow:["1","3"].includes(e)?"in":"out",amount:f(a.money),labelId:String(a.label??""),ticket:Array.isArray(a.scoreLog)?a.scoreLog.map(r=>`${r.game_type_text||""} : ${r.score??""}`).filter(r=>r.trim()!==":"):[]}},B=(a=k.currentPage)=>ma({start:D.startDate,end:D.endDate,page:a}).then(e=>{var T;const r=Array.isArray(e.data.bank)?e.data.bank:(T=e.data.bank)==null?void 0:T.list;F.value=Array.isArray(r)?r.map(Ae):[];const d=e.data.transaction,p=Array.isArray(d==null?void 0:d.list)?d.list:[];de.value=p.map(ze),k.count=f(d==null?void 0:d.count),k.currentPage=f(d==null?void 0:d.current_page)||a,k.lastPage=f(d==null?void 0:d.last_page)||1,k.pageSize=k.lastPage>0?Math.max(1,Math.ceil(k.count/k.lastPage)):10,j.totalDeposit=f(d==null?void 0:d.total_deposit),j.totalWithdraw=f(d==null?void 0:d.total_withdraw);const c=e.data.customer;y.totalDeposit=f(c==null?void 0:c.total_deposit),y.totalWithdraw=f(c==null?void 0:c.total_withdraw),y.countDeposit=f(c==null?void 0:c.count_deposit),y.countWithdraw=f(c==null?void 0:c.count_withdraw),y.activePlayer=f(c==null?void 0:c.active_player),y.firstDeposit=f(c==null?void 0:c.first_deposit),y.unclaimAmount=f(c==null?void 0:c.unclaim_amount),y.unclaimReceipt=f(c==null?void 0:c.unclaim_receipt)}),Re=()=>{Object.assign(m,{time:"",timeMode:"Auto",category:1,type:1,username:"",remark:"",amount:0,bank:"",label:"",ticketAuto:!0})},Ye=()=>{Re(),_.mode="create",_.editId="",_.visible=!0},Oe=a=>{var e;Object.assign(m,{time:a.createdTime,timeMode:"Manual",category:f(a.categoryId)||1,type:f(a.typeId)||1,username:a.username,remark:a.remark,amount:a.amount,bank:a.bankId||((e=F.value.find(r=>r.name===a.bank))==null?void 0:e.id)||"",label:a.labelId?f(a.labelId):"",ticketAuto:a.ticket.length>0}),_.mode="edit",_.editId=a.id,_.visible=!0},We=()=>{if(m.timeMode==="Auto"||!m.time)return Math.floor(Date.now()/1e3);const a=new Date(m.time.replace(" ","T")),e=Math.floor(a.getTime()/1e3);return Number.isFinite(e)?e:Math.floor(Date.now()/1e3)},ce=()=>({create_time:We(),category:m.category,type:m.type,user_name:m.username,memo:m.remark,money:m.amount,bank_id:m.bank,label:m.label,game_ticket:m.ticketAuto?1:0}),He=()=>{_.loading=!0,(_.mode==="edit"&&_.editId!==""?ha({...ce(),id:_.editId}):pa(ce())).then(()=>(_.visible=!1,k.currentPage=1,B(1))).finally(()=>{_.loading=!1})},Le=a=>({id:a.id||a.money_log_id||"",editedBy:String(a.admin_name||""),editedTime:re(a.create_time),bankBefore:String(a.bank_befter??""),bankAfter:String(a.bank_after??"")}),Ee=a=>t("dashboard.Bank change",{before:a.bankBefore,after:a.bankAfter}),je=a=>{N.visible=!0,N.loading=!0,N.rows=[],ga({id:a.id}).then(e=>{var d;const r=Array.isArray(e.data)?e.data:(d=e.data)==null?void 0:d.list;N.rows=Array.isArray(r)?r.map(p=>Le(p)):[]}).finally(()=>{N.loading=!1})},Ge=a=>{Object.assign(w,{bankFrom:a.id,fromName:a.name,bankTo:"",money:0,remark:""}),I.visible=!0},qe=()=>{I.loading=!0,ba({money:w.money,bank_from:w.bankFrom,bank_to:w.bankTo,remark:w.remark}).then(()=>(I.visible=!1,B())).finally(()=>{I.loading=!1})},Xe=a=>{fa({id:a.id}).then(()=>B(k.currentPage))},Ze=()=>{D.startDate=L(),D.endDate=L(),k.currentPage=1,B(1).catch(()=>{})},Ke=()=>{k.currentPage=1,B(1).catch(()=>{})},Je=a=>{B(a).catch(()=>{})},Qe=({row:a})=>a.flow==="in"?"transaction-in":"transaction-out";return na(()=>{B().catch(()=>{})}),(a,e)=>{const r=v("Icon"),d=v("el-button"),p=v("el-input"),c=v("el-tag"),T=v("el-alert"),g=v("el-date-picker"),h=v("el-table-column"),U=v("el-table"),ea=v("el-pagination"),me=v("el-radio"),be=v("el-radio-group"),V=v("el-form-item"),P=v("el-option"),q=v("el-select"),X=v("el-radio-button"),pe=v("el-input-number"),aa=v("el-checkbox"),he=v("el-form"),ee=v("el-dialog"),ta=ra("loading");return C(),x("div",_a,[s("section",va,[s("div",ya,[s("div",ka,u(o(t)("dashboard.Available Bank Balance")),1),s("div",wa,[s("table",Ca,[s("thead",null,[s("tr",null,[s("th",null,u(o(t)("dashboard.Bank Name")),1),s("th",null,u(o(t)("dashboard.Current Balance")),1),s("th",null,u(o(t)("dashboard.Transaction Breakdown")),1),s("th",null,u(o(t)("dashboard.Safe Alert")),1)])]),s("tbody",null,[(C(!0),x(R,null,H(se.value,l=>(C(),x("tr",{key:l.id,class:te([l.rowClass,{"bank-colored":l.labelColor}]),style:da(Ve(l))},[s("td",null,[s("strong",null,u(l.name),1),s("small",null,u(l.account),1)]),s("td",Ta,"AUD "+u(M(l.balance)),1),s("td",null,[s("div",Va,[s("input",{id:ie(l),class:"calculator-toggle",type:"checkbox"},null,8,Aa),s("div",Da,[s("label",{class:"calculator-button",for:ie(l),"aria-label":o(t)("dashboard.Fast Calculation"),title:o(t)("dashboard.Fast Calculation")},[n(r,{name:"fa fa-calculator",size:"13",color:"currentColor"})],8,Ua),n(d,{size:"small",icon:o(sa),onClick:S=>Ge(l)},{default:i(()=>[b(u(o(t)("dashboard.Transfer")),1)]),_:2},1032,["icon","onClick"]),s("div",xa,[s("div",Ma,[e[24]||(e[24]=s("span",{class:"breakdown-label"},"入",-1)),s("span",Na,"("+u(l.depositCount)+")",1),s("strong",null,u(M(l.deposit)),1)]),s("div",$a,[e[25]||(e[25]=s("span",{class:"breakdown-label"},"出",-1)),s("span",Ia,"("+u(l.withdrawCount)+")",1),s("strong",null,u(M(l.withdraw)),1)])])]),s("div",Sa,[s("div",Fa,[n(p,{modelValue:Q[G(l)],"onUpdate:modelValue":S=>Q[G(l)]=S,class:"calculator-input",size:"small",placeholder:o(t)("dashboard.Calculation placeholder"),clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder"]),e[26]||(e[26]=s("span",{class:"calculator-equals"},"=",-1)),s("strong",{class:te(["calculator-result",{"is-invalid":Ne(l)}])},u($e(l)),3)]),s("div",Ba,[b(u(o(t)("dashboard.Fast Calculation Support"))+" ",1),e[27]||(e[27]=s("span",null,"+ − × ÷",-1))])])])]),s("td",null,[n(c,{size:"small",effect:"plain",type:l.alertCode!=="0"?"danger":"info"},{default:i(()=>[b(u(Se(l.alertCode)),1)]),_:2},1032,["type"])])],6))),128)),se.value.length?fe("",!0):(C(),x("tr",Pa,[s("td",za,u(o(t)("dashboard.No bank data")),1)]))])])]),F.value.length>4?(C(),x("button",{key:0,class:"more-info",type:"button",onClick:e[0]||(e[0]=l=>W.value=!W.value)},[b(u(W.value?o(t)("dashboard.Show less"):o(t)("dashboard.More info"))+" ",1),n(r,{name:W.value?"fa fa-caret-up":"fa fa-caret-down"},null,8,["name"])])):fe("",!0)]),s("aside",Ra,[s("div",Ya,[s("div",Oa,u(o(t)("dashboard.Customer Summary")),1),s("dl",null,[(C(!0),x(R,null,H(Me.value,l=>(C(),x(R,{key:l.label},[s("dt",null,u(l.label)+":",1),s("dd",null,u(l.value),1)],64))),128))])]),n(d,{class:"create-button",type:"success",onClick:Ye},{default:i(()=>[b(u(o(t)("dashboard.Create New Transaction")),1)]),_:1})])]),n(T,{class:"webhook-alert",type:"warning",closable:!0,"show-icon":""},{title:i(()=>[s("strong",null,u(o(t)("dashboard.Webhook enabled")),1)]),default:i(()=>[s("p",null,u(o(t)("dashboard.Webhook hint")),1)]),_:1}),s("section",Wa,[s("div",Ha,[s("div",La,[s("label",null,u(o(t)("dashboard.Start Date"))+":",1),n(g,{modelValue:D.startDate,"onUpdate:modelValue":e[1]||(e[1]=l=>D.startDate=l),type:"date","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),s("label",null,u(o(t)("dashboard.End Date"))+":",1),n(g,{modelValue:D.endDate,"onUpdate:modelValue":e[2]||(e[2]=l=>D.endDate=l),type:"date","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),n(d,{onClick:Ke},{default:i(()=>[b(u(o(t)("Search")),1)]),_:1}),n(d,{onClick:Ze},{default:i(()=>[b(u(o(t)("dashboard.Today")),1)]),_:1})]),s("div",Ea,[s("span",null,u(o(t)("dashboard.Date of data"))+": "+u(xe.value),1),s("b",null,[b(u(o(t)("dashboard.Total Deposit / IN"))+": ",1),s("em",null,"AUD "+u(M(De.value)),1)]),s("b",null,[b(u(o(t)("dashboard.Total Withdraw / OUT"))+": ",1),s("em",null,"AUD "+u(M(Ue.value)),1)])])]),n(U,{data:de.value,border:"",size:"small",class:"transaction-table","row-class-name":Qe},{default:i(()=>[n(h,{prop:"createdBy",label:o(t)("dashboard.Created by"),width:"110"},null,8,["label"]),n(h,{prop:"createdTime",label:o(t)("dashboard.Created Time"),width:"170"},null,8,["label"]),n(h,{label:o(t)("dashboard.Category"),width:"100"},{default:i(({row:l})=>[b(u(Be(l.categoryId)),1)]),_:1},8,["label"]),n(h,{prop:"username",label:o(t)("dashboard.Username"),width:"110"},null,8,["label"]),n(h,{prop:"remark",label:o(t)("dashboard.Remark"),"min-width":"205"},null,8,["label"]),n(h,{prop:"bank",label:o(t)("dashboard.Bank"),"min-width":"165"},null,8,["label"]),n(h,{label:o(t)("dashboard.Type"),width:"95"},{default:i(({row:l})=>[b(u(Fe(l.typeId)),1)]),_:1},8,["label"]),n(h,{label:o(t)("dashboard.Amount (AUD)"),width:"130",align:"right"},{default:i(({row:l})=>[s("strong",{class:te(l.flow==="in"?"amount-in":"amount-out")},u(M(l.amount)),3)]),_:1},8,["label"]),n(h,{label:o(t)("dashboard.Label"),width:"100"},{default:i(({row:l})=>[b(u(Pe(l.labelId)),1)]),_:1},8,["label"]),n(h,{label:o(t)("dashboard.Game Ticket"),"min-width":"140"},{default:i(({row:l})=>[(C(!0),x(R,null,H(l.ticket,(S,la)=>(C(),x("div",{key:`${S}-${la}`},u(S),1))),128))]),_:1},8,["label"]),n(h,{label:o(t)("dashboard.Action"),fixed:"right",width:"180"},{default:i(({row:l})=>[n(d,{link:"",type:"primary",size:"small",onClick:S=>je(l)},{default:i(()=>[b(u(o(t)("dashboard.History")),1)]),_:2},1032,["onClick"]),n(d,{link:"",type:"primary",size:"small",onClick:S=>Oe(l)},{default:i(()=>[b(u(o(t)("Edit")),1)]),_:2},1032,["onClick"]),n(d,{link:"",type:"danger",size:"small",onClick:S=>Xe(l)},{default:i(()=>[b(u(o(t)("Delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"]),s("div",ja,[n(ea,{"current-page":k.currentPage,"onUpdate:currentPage":e[3]||(e[3]=l=>k.currentPage=l),background:"",layout:"prev, pager, next",total:k.count,"page-size":k.pageSize,onCurrentChange:Je},null,8,["current-page","total","page-size"])])]),n(ee,{modelValue:_.visible,"onUpdate:modelValue":e[15]||(e[15]=l=>_.visible=l),title:Ie.value,width:"680px"},{footer:i(()=>[n(d,{type:"primary",loading:_.loading,onClick:He},{default:i(()=>[b(u(o(t)("Confirm")),1)]),_:1},8,["loading"]),n(d,{onClick:e[14]||(e[14]=l=>_.visible=!1)},{default:i(()=>[b(u(o(t)("Cancel")),1)]),_:1})]),default:i(()=>[n(he,{model:m,"label-width":"145px"},{default:i(()=>[n(V,{label:o(t)("dashboard.Date & Time")},{default:i(()=>[n(g,{modelValue:m.time,"onUpdate:modelValue":e[4]||(e[4]=l=>m.time=l),type:"datetime","value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue"]),n(be,{modelValue:m.timeMode,"onUpdate:modelValue":e[5]||(e[5]=l=>m.timeMode=l),class:"inline-mode"},{default:i(()=>[n(me,{value:"Auto"},{default:i(()=>[b(u(o(t)("dashboard.Auto")),1)]),_:1}),n(me,{value:"Manual"},{default:i(()=>[b(u(o(t)("dashboard.Manual")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Category")},{default:i(()=>[n(q,{modelValue:m.category,"onUpdate:modelValue":e[6]||(e[6]=l=>m.category=l)},{default:i(()=>[n(P,{label:o(t)("dashboard.Customer"),value:1},null,8,["label"]),n(P,{label:o(t)("dashboard.Other Adjust"),value:2},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Type")},{default:i(()=>[n(be,{modelValue:m.type,"onUpdate:modelValue":e[7]||(e[7]=l=>m.type=l)},{default:i(()=>[n(X,{value:1},{default:i(()=>[b(u(o(t)("dashboard.Deposit")),1)]),_:1}),n(X,{value:2},{default:i(()=>[b(u(o(t)("dashboard.Withdraw")),1)]),_:1}),n(X,{value:3},{default:i(()=>e[28]||(e[28]=[b("IN")])),_:1}),n(X,{value:4},{default:i(()=>e[29]||(e[29]=[b("OUT")])),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Username")},{default:i(()=>[n(p,{modelValue:m.username,"onUpdate:modelValue":e[8]||(e[8]=l=>m.username=l),disabled:_.mode==="edit",placeholder:o(t)("dashboard.Username placeholder")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Remark")},{default:i(()=>[n(p,{modelValue:m.remark,"onUpdate:modelValue":e[9]||(e[9]=l=>m.remark=l),placeholder:o(t)("dashboard.Optional")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Amount (AUD)")},{default:i(()=>[n(pe,{modelValue:m.amount,"onUpdate:modelValue":e[10]||(e[10]=l=>m.amount=l),min:0,precision:2},null,8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Bank")},{default:i(()=>[n(q,{modelValue:m.bank,"onUpdate:modelValue":e[11]||(e[11]=l=>m.bank=l),placeholder:o(t)("dashboard.Optional select")},{default:i(()=>[(C(!0),x(R,null,H(F.value,l=>(C(),le(P,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Label")},{default:i(()=>[n(q,{modelValue:m.label,"onUpdate:modelValue":e[12]||(e[12]=l=>m.label=l),placeholder:o(t)("dashboard.Optional select")},{default:i(()=>[n(P,{label:o(t)("dashboard.First Deposit"),value:1},null,8,["label"]),n(P,{label:o(t)("dashboard.Unclaim"),value:2},null,8,["label"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Game Ticket Auto")},{default:i(()=>[n(aa,{modelValue:m.ticketAuto,"onUpdate:modelValue":e[13]||(e[13]=l=>m.ticketAuto=l)},{default:i(()=>[b(u(o(t)("dashboard.Auto generate ticket")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),n(ee,{modelValue:N.visible,"onUpdate:modelValue":e[17]||(e[17]=l=>N.visible=l),title:o(t)("dashboard.Transaction Edit History"),width:"720px"},{footer:i(()=>[n(d,{onClick:e[16]||(e[16]=l=>N.visible=!1)},{default:i(()=>[b(u(o(t)("Cancel")),1)]),_:1})]),default:i(()=>[s("p",Ga,u(o(t)("dashboard.History retention note")),1),ia((C(),le(U,{data:N.rows,border:"",size:"small","empty-text":o(t)("dashboard.No Record")},{default:i(()=>[n(h,{prop:"id",label:o(t)("dashboard.Tx ID"),width:"100"},null,8,["label"]),n(h,{prop:"editedBy",label:o(t)("dashboard.Edit By"),width:"120"},null,8,["label"]),n(h,{prop:"editedTime",label:o(t)("dashboard.Edit Time"),width:"170"},null,8,["label"]),n(h,{label:o(t)("dashboard.Changes")},{default:i(({row:l})=>[b(u(Ee(l)),1)]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[ta,N.loading]])]),_:1},8,["modelValue","title"]),n(ee,{modelValue:I.visible,"onUpdate:modelValue":e[23]||(e[23]=l=>I.visible=l),title:o(t)("dashboard.Bank Transfer"),width:"560px"},{footer:i(()=>[n(d,{type:"primary",loading:I.loading,onClick:qe},{default:i(()=>[b(u(o(t)("Confirm")),1)]),_:1},8,["loading"]),n(d,{onClick:e[22]||(e[22]=l=>I.visible=!1)},{default:i(()=>[b(u(o(t)("Cancel")),1)]),_:1})]),default:i(()=>[n(he,{model:w,"label-width":"125px"},{default:i(()=>[n(V,{label:o(t)("dashboard.Transfer (From)")},{default:i(()=>[n(p,{modelValue:w.fromName,"onUpdate:modelValue":e[18]||(e[18]=l=>w.fromName=l),disabled:""},null,8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Transfer (To)")},{default:i(()=>[n(q,{modelValue:w.bankTo,"onUpdate:modelValue":e[19]||(e[19]=l=>w.bankTo=l),placeholder:o(t)("dashboard.Select Bank")},{default:i(()=>[(C(!0),x(R,null,H(F.value,l=>(C(),le(P,{key:l.id,label:l.name,value:l.id,disabled:l.id===w.bankFrom},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Amount")},{default:i(()=>[n(pe,{modelValue:w.money,"onUpdate:modelValue":e[20]||(e[20]=l=>w.money=l),min:0,precision:2},null,8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Remark")},{default:i(()=>[n(p,{modelValue:w.remark,"onUpdate:modelValue":e[21]||(e[21]=l=>w.remark=l),placeholder:o(t)("dashboard.Optional")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])}}}),Ka=ca(qa,[["__scopeId","data-v-6fc92eea"]]);export{Ka as default}; +import{B as oa,b as ae,a as $,l as z,o as na,I as v,X as ra,C,D as x,G as s,U as u,u as o,Z as R,Y as H,F as da,$ as te,H as n,P as i,V as b,aG as sa,W as fe,O as le,_ as ia}from"./vue-DweYBrEc.js";import{c as Y,x as ua,_ as ca}from"./index-BIzd9_wD.js";const O="/admin/Dashboard/";function ma(A){return Y({url:O+"index",method:"get",params:A})}function ba(A){return Y({url:O+"bankTransact",method:"post",data:A},{showSuccessMessage:!0})}function pa(A){return Y({url:O+"newTransact",method:"post",data:A},{showSuccessMessage:!0})}function ha(A){return Y({url:O+"editTransact",method:"post",data:A},{showSuccessMessage:!0})}function fa(A){return Y({url:O+"delTransact",method:"get",params:A})}function ga(A){return Y({url:O+"logHistory",method:"get",params:A})}const _a={class:"default-main bookkeeping-dashboard"},va={class:"dashboard-grid"},ya={class:"dashboard-panel bank-panel"},ka={class:"panel-title"},wa={class:"table-scroll"},Ca={class:"bank-table"},Ta={class:"balance"},Va={class:"bank-operate"},Aa=["id"],Da={class:"bank-operate-main"},Ua=["for","aria-label","title"],xa={class:"breakdown"},Ma={class:"breakdown-row breakdown-in"},Na={class:"breakdown-count"},$a={class:"breakdown-row breakdown-out"},Ia={class:"breakdown-count"},Sa={class:"bank-calculator"},Fa={class:"calculator-formula"},Ba={class:"calculator-hint"},Pa={key:0},za={class:"empty-banks",colspan:"4"},Ra={class:"summary-side"},Ya={class:"dashboard-panel summary-panel"},Oa={class:"panel-title"},Wa={class:"transaction-section"},Ha={class:"filter-row"},La={class:"date-filter"},Ea={class:"totals"},ja={class:"pagination"},Ga={class:"dialog-note"},qa=oa({name:"dashboard",__name:"dashboard",setup(A){const{t}=ua.useI18n(),L=()=>{const a=new Date,e=r=>r.toString().padStart(2,"0");return`${a.getFullYear()}-${e(a.getMonth()+1)}-${e(a.getDate())}`},M=a=>Number(a).toLocaleString("en-AU",{minimumFractionDigits:2,maximumFractionDigits:2}),f=a=>{const e=Number(a);return Number.isFinite(e)?e:0},ge=a=>a.replace(/,/g,"").replace(/乘以/g,"*").replace(/除以/g,"/").replace(/加/g,"+").replace(/减/g,"-").replace(/[+]/g,"+").replace(/[-–—]/g,"-").replace(/[×*xX]/g,"*").replace(/[÷/]/g,"/").replace(/\s+/g,"").replace(/^=/,""),_e=a=>{let e=0;const r=()=>{const g=a.slice(e).match(/^(?:\d+(?:\.\d*)?|\.\d+)/);return g?(e+=g[0].length,Number(g[0])):null},d=()=>{const g=a[e];if(g==="+")return e+=1,d();if(g==="-"){e+=1;const h=d();return h===null?null:-h}if(g==="("){e+=1;const h=c();return h===null||a[e]!==")"?null:(e+=1,h)}return r()},p=()=>{let g=d();if(g===null)return null;for(;a[e]==="*"||a[e]==="/";){const h=a[e];e+=1;const U=d();if(U===null)return null;g=h==="*"?g*U:U===0?Number.NaN:g/U}return g};function c(){let g=p();if(g===null)return null;for(;a[e]==="+"||a[e]==="-";){const h=a[e];e+=1;const U=p();if(U===null)return null;g=h==="+"?g+U:g-U}return g}const T=c();return T!==null&&e===a.length&&Number.isFinite(T)?T:null},ve=(a,e)=>{const r=ge(e);if(!r)return{valid:!0,value:a};if(!/^[\d+\-*/().]+$/.test(r))return{valid:!1,value:a};const d=/^[+\-*/]/.test(r)?`${a}${r}`:`${a}+${r}`,p=_e(d);return p===null?{valid:!1,value:a}:{valid:!0,value:p}},E=a=>Math.min(255,Math.max(0,Math.round(a))),Z=a=>{const e=Number(a);return Number.isFinite(e)?E(e):0},ye=a=>{if(a===void 0)return 1;const e=Number(a);return Number.isFinite(e)?Math.min(1,Math.max(0,e)):1},oe=a=>{const e=a.trim(),r=e.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(r){const p=r[1],c=p.length===3?p.split("").map(T=>T+T).join(""):p;return{r:Number.parseInt(c.slice(0,2),16),g:Number.parseInt(c.slice(2,4),16),b:Number.parseInt(c.slice(4,6),16),a:c.length===8?Number.parseInt(c.slice(6,8),16)/255:1}}const d=e.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)$/i);return d?{r:Z(d[1]),g:Z(d[2]),b:Z(d[3]),a:ye(d[4])}:null},ke=a=>`rgb(${E(a.r)}, ${E(a.g)}, ${E(a.b)})`,we=(a,e,r)=>({r:a.r*(1-r)+e.r*r,g:a.g*(1-r)+e.g*r,b:a.b*(1-r)+e.b*r}),Ce=a=>{const e=oe(a);if(!e)return a;const r={r:e.r*e.a+255*(1-e.a),g:e.g*e.a+255*(1-e.a),b:e.b*e.a+255*(1-e.a)},d=Math.max(r.r,r.g,r.b),p=Math.min(r.r,r.g,r.b);return d-p<18?ke(we(r,{r:241,g:245,b:249},.72)):r.g>=r.r&&r.g>=r.b?"#d9f3e5":r.r>=r.g&&r.r>=r.b?"#f8dde2":"#dbeafe"},K=a=>{const e=a/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},ne=a=>.2126*K(a.r)+.7152*K(a.g)+.0722*K(a.b),J=(a,e)=>{const r=Math.max(a,e),d=Math.min(a,e);return(r+.05)/(d+.05)},Te=a=>{const e=oe(a);if(!e)return"#172033";const r={r:e.r*e.a+255*(1-e.a),g:e.g*e.a+255*(1-e.a),b:e.b*e.a+255*(1-e.a)},d=ne(r),p=J(d,ne({r:23,g:32,b:51})),c=J(d,1),T=J(d,0);return p>=4.5||p>=c?"#172033":c>=T?"#ffffff":"#000000"},Ve=a=>{if(!a.labelColor)return{};const e=Ce(a.labelColor),r=Te(e),d=r==="#ffffff";return{backgroundColor:e,"--bank-row-text-color":r,"--bank-row-muted-color":d?"rgba(255, 255, 255, 0.82)":"rgba(0, 0, 0, 0.72)","--bank-row-border-color":d?"rgba(255, 255, 255, 0.24)":"rgba(0, 0, 0, 0.16)","--bank-row-control-bg":d?"rgba(255, 255, 255, 0.16)":"rgba(255, 255, 255, 0.72)","--bank-row-control-hover-bg":d?"rgba(255, 255, 255, 0.26)":"rgba(255, 255, 255, 0.88)"}},re=a=>{if(typeof a=="string"&&a.trim()&&!Number.isFinite(Number(a)))return a;const e=f(a);if(!e)return"";const r=new Date(e*1e3),d=p=>p.toString().padStart(2,"0");return`${r.getFullYear()}-${d(r.getMonth()+1)}-${d(r.getDate())} ${d(r.getHours())}:${d(r.getMinutes())}:${d(r.getSeconds())}`},Ae=a=>{const e=f(a.total_fund_in??a.fund_in),r=f(a.total_fund_out??a.fund_out),d=String(a.safe_alert??"0");return{id:a.id,name:a.bank_name||"-",account:a.bank_account||"",balance:f(a.current_balance??a.balance??e-r),deposit:e,withdraw:r,depositCount:f(a.count_fund_in??a.deposit_count??a.tx_in),withdrawCount:f(a.count_fund_out??a.withdraw_count??a.tx_out),alertCode:d,rowClass:String(a.status??"1")==="0"?"bank-muted":"",labelColor:a.label_color||""}},F=ae([]),de=ae([]),y=$({totalDeposit:0,totalWithdraw:0,countDeposit:0,countWithdraw:0,activePlayer:0,firstDeposit:0,unclaimAmount:0,unclaimReceipt:0}),j=$({totalDeposit:0,totalWithdraw:0}),D=$({startDate:L(),endDate:L()}),k=$({count:0,currentPage:1,lastPage:1,pageSize:10}),W=ae(!1),Q=$({}),se=z(()=>W.value?F.value:F.value.slice(0,4)),De=z(()=>j.totalDeposit),Ue=z(()=>j.totalWithdraw),xe=z(()=>{const a=new Date(`${D.startDate}T00:00:00`),e=new Date(`${D.endDate}T00:00:00`),r=Math.max(1,Math.floor((e.getTime()-a.getTime())/864e5)+1);return t("dashboard.Date range",{start:D.startDate,end:D.endDate,days:r,unit:t(r===1?"dashboard.Day":"dashboard.Days")})}),Me=z(()=>[{label:t("dashboard.Total Deposit / IN"),value:`AUD ${M(y.totalDeposit)}`},{label:t("dashboard.Total Withdraw / OUT"),value:`AUD ${M(y.totalWithdraw)}`},{label:t("dashboard.Deposit Count"),value:y.countDeposit},{label:t("dashboard.Withdraw Count"),value:y.countWithdraw},{label:t("dashboard.Active Player"),value:y.activePlayer},{label:t("dashboard.First Deposit Player"),value:y.firstDeposit},{label:t("dashboard.Unclaimed Amount"),value:`AUD ${M(y.unclaimAmount)}`},{label:t("dashboard.Unclaimed Receipt"),value:y.unclaimReceipt}]),G=a=>String(a.id),ie=a=>`bank-calculator-${G(a).replace(/[^a-zA-Z0-9_-]/g,"-")}`,ue=a=>ve(a.balance,Q[G(a)]||""),Ne=a=>!ue(a).valid,$e=a=>{const e=ue(a);return e.valid?`AUD ${M(e.value)}`:"AUD --"},_=$({visible:!1,loading:!1,mode:"create",editId:""}),Ie=z(()=>_.mode==="edit"?t("dashboard.Edit Transaction",{id:_.editId}):t("dashboard.Create New Transaction")),m=$({time:"",timeMode:"Auto",category:1,type:1,username:"",remark:"",amount:0,bank:"",label:"",ticketAuto:!0}),N=$({visible:!1,loading:!1,rows:[]}),I=$({visible:!1,loading:!1}),w=$({bankFrom:"",fromName:"",bankTo:"",money:0,remark:""}),Se=a=>({1:t("dashboard.Hourly Alert"),2:t("dashboard.Daily Alert"),3:t("dashboard.Weekly Alert"),4:t("dashboard.Monthly Alert"),5:t("dashboard.Yearly Alert"),6:t("dashboard.Lifetime Alert")})[a]||t("dashboard.No Alert"),Fe=a=>({1:t("dashboard.Deposit"),2:t("dashboard.Withdraw"),3:"IN",4:"OUT"})[a]||a,Be=a=>({1:t("dashboard.Customer"),2:t("dashboard.Other Adjust")})[a]||a,Pe=a=>({1:t("dashboard.First Deposit"),2:t("dashboard.Unclaim")})[a]||"",ze=a=>{const e=String(a.type??"");return{id:a.id,createdBy:a.created_by||"",createdTime:re(a.create_time),categoryId:String(a.category??""),username:a.user_name||"",remark:a.memo||"",bank:a.bank_name||"",bankId:a.bank_id||"",typeId:e,flow:["1","3"].includes(e)?"in":"out",amount:f(a.money),labelId:String(a.label??""),ticket:Array.isArray(a.scoreLog)?a.scoreLog.map(r=>`${r.game_type_text||""} : ${r.score??""}`).filter(r=>r.trim()!==":"):[]}},B=(a=k.currentPage)=>ma({start:D.startDate,end:D.endDate,page:a}).then(e=>{var T;const r=Array.isArray(e.data.bank)?e.data.bank:(T=e.data.bank)==null?void 0:T.list;F.value=Array.isArray(r)?r.map(Ae):[];const d=e.data.transaction,p=Array.isArray(d==null?void 0:d.list)?d.list:[];de.value=p.map(ze),k.count=f(d==null?void 0:d.count),k.currentPage=f(d==null?void 0:d.current_page)||a,k.lastPage=f(d==null?void 0:d.last_page)||1,k.pageSize=k.lastPage>0?Math.max(1,Math.ceil(k.count/k.lastPage)):10,j.totalDeposit=f(d==null?void 0:d.total_deposit),j.totalWithdraw=f(d==null?void 0:d.total_withdraw);const c=e.data.customer;y.totalDeposit=f(c==null?void 0:c.total_deposit),y.totalWithdraw=f(c==null?void 0:c.total_withdraw),y.countDeposit=f(c==null?void 0:c.count_deposit),y.countWithdraw=f(c==null?void 0:c.count_withdraw),y.activePlayer=f(c==null?void 0:c.active_player),y.firstDeposit=f(c==null?void 0:c.first_deposit),y.unclaimAmount=f(c==null?void 0:c.unclaim_amount),y.unclaimReceipt=f(c==null?void 0:c.unclaim_receipt)}),Re=()=>{Object.assign(m,{time:"",timeMode:"Auto",category:1,type:1,username:"",remark:"",amount:0,bank:"",label:"",ticketAuto:!0})},Ye=()=>{Re(),_.mode="create",_.editId="",_.visible=!0},Oe=a=>{var e;Object.assign(m,{time:a.createdTime,timeMode:"Manual",category:f(a.categoryId)||1,type:f(a.typeId)||1,username:a.username,remark:a.remark,amount:a.amount,bank:a.bankId||((e=F.value.find(r=>r.name===a.bank))==null?void 0:e.id)||"",label:a.labelId?f(a.labelId):"",ticketAuto:a.ticket.length>0}),_.mode="edit",_.editId=a.id,_.visible=!0},We=()=>{if(m.timeMode==="Auto"||!m.time)return Math.floor(Date.now()/1e3);const a=new Date(m.time.replace(" ","T")),e=Math.floor(a.getTime()/1e3);return Number.isFinite(e)?e:Math.floor(Date.now()/1e3)},ce=()=>({create_time:We(),category:m.category,type:m.type,user_name:m.username,memo:m.remark,money:m.amount,bank_id:m.bank,label:m.label,game_ticket:m.ticketAuto?1:0}),He=()=>{_.loading=!0,(_.mode==="edit"&&_.editId!==""?ha({...ce(),id:_.editId}):pa(ce())).then(()=>(_.visible=!1,k.currentPage=1,B(1))).finally(()=>{_.loading=!1})},Le=a=>({id:a.id||a.money_log_id||"",editedBy:String(a.admin_name||""),editedTime:re(a.create_time),bankBefore:String(a.bank_befter??""),bankAfter:String(a.bank_after??"")}),Ee=a=>t("dashboard.Bank change",{before:a.bankBefore,after:a.bankAfter}),je=a=>{N.visible=!0,N.loading=!0,N.rows=[],ga({id:a.id}).then(e=>{var d;const r=Array.isArray(e.data)?e.data:(d=e.data)==null?void 0:d.list;N.rows=Array.isArray(r)?r.map(p=>Le(p)):[]}).finally(()=>{N.loading=!1})},Ge=a=>{Object.assign(w,{bankFrom:a.id,fromName:a.name,bankTo:"",money:0,remark:""}),I.visible=!0},qe=()=>{I.loading=!0,ba({money:w.money,bank_from:w.bankFrom,bank_to:w.bankTo,remark:w.remark}).then(()=>(I.visible=!1,B())).finally(()=>{I.loading=!1})},Xe=a=>{fa({id:a.id}).then(()=>B(k.currentPage))},Ze=()=>{D.startDate=L(),D.endDate=L(),k.currentPage=1,B(1).catch(()=>{})},Ke=()=>{k.currentPage=1,B(1).catch(()=>{})},Je=a=>{B(a).catch(()=>{})},Qe=({row:a})=>a.flow==="in"?"transaction-in":"transaction-out";return na(()=>{B().catch(()=>{})}),(a,e)=>{const r=v("Icon"),d=v("el-button"),p=v("el-input"),c=v("el-tag"),T=v("el-alert"),g=v("el-date-picker"),h=v("el-table-column"),U=v("el-table"),ea=v("el-pagination"),me=v("el-radio"),be=v("el-radio-group"),V=v("el-form-item"),P=v("el-option"),q=v("el-select"),X=v("el-radio-button"),pe=v("el-input-number"),aa=v("el-checkbox"),he=v("el-form"),ee=v("el-dialog"),ta=ra("loading");return C(),x("div",_a,[s("section",va,[s("div",ya,[s("div",ka,u(o(t)("dashboard.Available Bank Balance")),1),s("div",wa,[s("table",Ca,[s("thead",null,[s("tr",null,[s("th",null,u(o(t)("dashboard.Bank Name")),1),s("th",null,u(o(t)("dashboard.Current Balance")),1),s("th",null,u(o(t)("dashboard.Transaction Breakdown")),1),s("th",null,u(o(t)("dashboard.Safe Alert")),1)])]),s("tbody",null,[(C(!0),x(R,null,H(se.value,l=>(C(),x("tr",{key:l.id,class:te([l.rowClass,{"bank-colored":l.labelColor}]),style:da(Ve(l))},[s("td",null,[s("strong",null,u(l.name),1),s("small",null,u(l.account),1)]),s("td",Ta,"AUD "+u(M(l.balance)),1),s("td",null,[s("div",Va,[s("input",{id:ie(l),class:"calculator-toggle",type:"checkbox"},null,8,Aa),s("div",Da,[s("label",{class:"calculator-button",for:ie(l),"aria-label":o(t)("dashboard.Fast Calculation"),title:o(t)("dashboard.Fast Calculation")},[n(r,{name:"fa fa-calculator",size:"13",color:"currentColor"})],8,Ua),n(d,{size:"small",icon:o(sa),onClick:S=>Ge(l)},{default:i(()=>[b(u(o(t)("dashboard.Transfer")),1)]),_:2},1032,["icon","onClick"]),s("div",xa,[s("div",Ma,[e[24]||(e[24]=s("span",{class:"breakdown-label"},"入",-1)),s("span",Na,"("+u(l.depositCount)+")",1),s("strong",null,u(M(l.deposit)),1)]),s("div",$a,[e[25]||(e[25]=s("span",{class:"breakdown-label"},"出",-1)),s("span",Ia,"("+u(l.withdrawCount)+")",1),s("strong",null,u(M(l.withdraw)),1)])])]),s("div",Sa,[s("div",Fa,[n(p,{modelValue:Q[G(l)],"onUpdate:modelValue":S=>Q[G(l)]=S,class:"calculator-input",size:"small",placeholder:o(t)("dashboard.Calculation placeholder"),clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder"]),e[26]||(e[26]=s("span",{class:"calculator-equals"},"=",-1)),s("strong",{class:te(["calculator-result",{"is-invalid":Ne(l)}])},u($e(l)),3)]),s("div",Ba,[b(u(o(t)("dashboard.Fast Calculation Support"))+" ",1),e[27]||(e[27]=s("span",null,"+ − × ÷",-1))])])])]),s("td",null,[n(c,{size:"small",effect:"plain",type:l.alertCode!=="0"?"danger":"info"},{default:i(()=>[b(u(Se(l.alertCode)),1)]),_:2},1032,["type"])])],6))),128)),se.value.length?fe("",!0):(C(),x("tr",Pa,[s("td",za,u(o(t)("dashboard.No bank data")),1)]))])])]),F.value.length>4?(C(),x("button",{key:0,class:"more-info",type:"button",onClick:e[0]||(e[0]=l=>W.value=!W.value)},[b(u(W.value?o(t)("dashboard.Show less"):o(t)("dashboard.More info"))+" ",1),n(r,{name:W.value?"fa fa-caret-up":"fa fa-caret-down"},null,8,["name"])])):fe("",!0)]),s("aside",Ra,[s("div",Ya,[s("div",Oa,u(o(t)("dashboard.Customer Summary")),1),s("dl",null,[(C(!0),x(R,null,H(Me.value,l=>(C(),x(R,{key:l.label},[s("dt",null,u(l.label)+":",1),s("dd",null,u(l.value),1)],64))),128))])]),n(d,{class:"create-button",type:"success",onClick:Ye},{default:i(()=>[b(u(o(t)("dashboard.Create New Transaction")),1)]),_:1})])]),n(T,{class:"webhook-alert",type:"warning",closable:!0,"show-icon":""},{title:i(()=>[s("strong",null,u(o(t)("dashboard.Webhook enabled")),1)]),default:i(()=>[s("p",null,u(o(t)("dashboard.Webhook hint")),1)]),_:1}),s("section",Wa,[s("div",Ha,[s("div",La,[s("label",null,u(o(t)("dashboard.Start Date"))+":",1),n(g,{modelValue:D.startDate,"onUpdate:modelValue":e[1]||(e[1]=l=>D.startDate=l),type:"date","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),s("label",null,u(o(t)("dashboard.End Date"))+":",1),n(g,{modelValue:D.endDate,"onUpdate:modelValue":e[2]||(e[2]=l=>D.endDate=l),type:"date","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),n(d,{onClick:Ke},{default:i(()=>[b(u(o(t)("Search")),1)]),_:1}),n(d,{onClick:Ze},{default:i(()=>[b(u(o(t)("dashboard.Today")),1)]),_:1})]),s("div",Ea,[s("span",null,u(o(t)("dashboard.Date of data"))+": "+u(xe.value),1),s("b",null,[b(u(o(t)("dashboard.Total Deposit / IN"))+": ",1),s("em",null,"AUD "+u(M(De.value)),1)]),s("b",null,[b(u(o(t)("dashboard.Total Withdraw / OUT"))+": ",1),s("em",null,"AUD "+u(M(Ue.value)),1)])])]),n(U,{data:de.value,border:"",size:"small",class:"transaction-table","row-class-name":Qe},{default:i(()=>[n(h,{prop:"createdBy",label:o(t)("dashboard.Created by"),width:"110"},null,8,["label"]),n(h,{prop:"createdTime",label:o(t)("dashboard.Created Time"),width:"170"},null,8,["label"]),n(h,{label:o(t)("dashboard.Category"),width:"100"},{default:i(({row:l})=>[b(u(Be(l.categoryId)),1)]),_:1},8,["label"]),n(h,{prop:"username",label:o(t)("dashboard.Username"),width:"110"},null,8,["label"]),n(h,{prop:"remark",label:o(t)("dashboard.Remark"),"min-width":"205"},null,8,["label"]),n(h,{prop:"bank",label:o(t)("dashboard.Bank"),"min-width":"165"},null,8,["label"]),n(h,{label:o(t)("dashboard.Type"),width:"95"},{default:i(({row:l})=>[b(u(Fe(l.typeId)),1)]),_:1},8,["label"]),n(h,{label:o(t)("dashboard.Amount (AUD)"),width:"130",align:"right"},{default:i(({row:l})=>[s("strong",{class:te(l.flow==="in"?"amount-in":"amount-out")},u(M(l.amount)),3)]),_:1},8,["label"]),n(h,{label:o(t)("dashboard.Label"),width:"100"},{default:i(({row:l})=>[b(u(Pe(l.labelId)),1)]),_:1},8,["label"]),n(h,{label:o(t)("dashboard.Game Ticket"),"min-width":"140"},{default:i(({row:l})=>[(C(!0),x(R,null,H(l.ticket,(S,la)=>(C(),x("div",{key:`${S}-${la}`},u(S),1))),128))]),_:1},8,["label"]),n(h,{label:o(t)("dashboard.Action"),fixed:"right",width:"180"},{default:i(({row:l})=>[n(d,{link:"",type:"primary",size:"small",onClick:S=>je(l)},{default:i(()=>[b(u(o(t)("dashboard.History")),1)]),_:2},1032,["onClick"]),n(d,{link:"",type:"primary",size:"small",onClick:S=>Oe(l)},{default:i(()=>[b(u(o(t)("Edit")),1)]),_:2},1032,["onClick"]),n(d,{link:"",type:"danger",size:"small",onClick:S=>Xe(l)},{default:i(()=>[b(u(o(t)("Delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"]),s("div",ja,[n(ea,{"current-page":k.currentPage,"onUpdate:currentPage":e[3]||(e[3]=l=>k.currentPage=l),background:"",layout:"prev, pager, next",total:k.count,"page-size":k.pageSize,onCurrentChange:Je},null,8,["current-page","total","page-size"])])]),n(ee,{modelValue:_.visible,"onUpdate:modelValue":e[15]||(e[15]=l=>_.visible=l),title:Ie.value,width:"680px"},{footer:i(()=>[n(d,{type:"primary",loading:_.loading,onClick:He},{default:i(()=>[b(u(o(t)("Confirm")),1)]),_:1},8,["loading"]),n(d,{onClick:e[14]||(e[14]=l=>_.visible=!1)},{default:i(()=>[b(u(o(t)("Cancel")),1)]),_:1})]),default:i(()=>[n(he,{model:m,"label-width":"145px"},{default:i(()=>[n(V,{label:o(t)("dashboard.Date & Time")},{default:i(()=>[n(g,{modelValue:m.time,"onUpdate:modelValue":e[4]||(e[4]=l=>m.time=l),type:"datetime","value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue"]),n(be,{modelValue:m.timeMode,"onUpdate:modelValue":e[5]||(e[5]=l=>m.timeMode=l),class:"inline-mode"},{default:i(()=>[n(me,{value:"Auto"},{default:i(()=>[b(u(o(t)("dashboard.Auto")),1)]),_:1}),n(me,{value:"Manual"},{default:i(()=>[b(u(o(t)("dashboard.Manual")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Category")},{default:i(()=>[n(q,{modelValue:m.category,"onUpdate:modelValue":e[6]||(e[6]=l=>m.category=l)},{default:i(()=>[n(P,{label:o(t)("dashboard.Customer"),value:1},null,8,["label"]),n(P,{label:o(t)("dashboard.Other Adjust"),value:2},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Type")},{default:i(()=>[n(be,{modelValue:m.type,"onUpdate:modelValue":e[7]||(e[7]=l=>m.type=l)},{default:i(()=>[n(X,{value:1},{default:i(()=>[b(u(o(t)("dashboard.Deposit")),1)]),_:1}),n(X,{value:2},{default:i(()=>[b(u(o(t)("dashboard.Withdraw")),1)]),_:1}),n(X,{value:3},{default:i(()=>e[28]||(e[28]=[b("IN")])),_:1}),n(X,{value:4},{default:i(()=>e[29]||(e[29]=[b("OUT")])),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Username")},{default:i(()=>[n(p,{modelValue:m.username,"onUpdate:modelValue":e[8]||(e[8]=l=>m.username=l),disabled:_.mode==="edit",placeholder:o(t)("dashboard.Username placeholder")},null,8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Remark")},{default:i(()=>[n(p,{modelValue:m.remark,"onUpdate:modelValue":e[9]||(e[9]=l=>m.remark=l),placeholder:o(t)("dashboard.Optional")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Amount (AUD)")},{default:i(()=>[n(pe,{modelValue:m.amount,"onUpdate:modelValue":e[10]||(e[10]=l=>m.amount=l),min:0,precision:2},null,8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Bank")},{default:i(()=>[n(q,{modelValue:m.bank,"onUpdate:modelValue":e[11]||(e[11]=l=>m.bank=l),placeholder:o(t)("dashboard.Optional select")},{default:i(()=>[(C(!0),x(R,null,H(F.value,l=>(C(),le(P,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Label")},{default:i(()=>[n(q,{modelValue:m.label,"onUpdate:modelValue":e[12]||(e[12]=l=>m.label=l),placeholder:o(t)("dashboard.Optional select")},{default:i(()=>[n(P,{label:o(t)("dashboard.First Deposit"),value:1},null,8,["label"]),n(P,{label:o(t)("dashboard.Unclaim"),value:2},null,8,["label"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Game Ticket Auto")},{default:i(()=>[n(aa,{modelValue:m.ticketAuto,"onUpdate:modelValue":e[13]||(e[13]=l=>m.ticketAuto=l)},{default:i(()=>[b(u(o(t)("dashboard.Auto generate ticket")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),n(ee,{modelValue:N.visible,"onUpdate:modelValue":e[17]||(e[17]=l=>N.visible=l),title:o(t)("dashboard.Transaction Edit History"),width:"720px"},{footer:i(()=>[n(d,{onClick:e[16]||(e[16]=l=>N.visible=!1)},{default:i(()=>[b(u(o(t)("Cancel")),1)]),_:1})]),default:i(()=>[s("p",Ga,u(o(t)("dashboard.History retention note")),1),ia((C(),le(U,{data:N.rows,border:"",size:"small","empty-text":o(t)("dashboard.No Record")},{default:i(()=>[n(h,{prop:"id",label:o(t)("dashboard.Tx ID"),width:"100"},null,8,["label"]),n(h,{prop:"editedBy",label:o(t)("dashboard.Edit By"),width:"120"},null,8,["label"]),n(h,{prop:"editedTime",label:o(t)("dashboard.Edit Time"),width:"170"},null,8,["label"]),n(h,{label:o(t)("dashboard.Changes")},{default:i(({row:l})=>[b(u(Ee(l)),1)]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[ta,N.loading]])]),_:1},8,["modelValue","title"]),n(ee,{modelValue:I.visible,"onUpdate:modelValue":e[23]||(e[23]=l=>I.visible=l),title:o(t)("dashboard.Bank Transfer"),width:"560px"},{footer:i(()=>[n(d,{type:"primary",loading:I.loading,onClick:qe},{default:i(()=>[b(u(o(t)("Confirm")),1)]),_:1},8,["loading"]),n(d,{onClick:e[22]||(e[22]=l=>I.visible=!1)},{default:i(()=>[b(u(o(t)("Cancel")),1)]),_:1})]),default:i(()=>[n(he,{model:w,"label-width":"125px"},{default:i(()=>[n(V,{label:o(t)("dashboard.Transfer (From)")},{default:i(()=>[n(p,{modelValue:w.fromName,"onUpdate:modelValue":e[18]||(e[18]=l=>w.fromName=l),disabled:""},null,8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Transfer (To)")},{default:i(()=>[n(q,{modelValue:w.bankTo,"onUpdate:modelValue":e[19]||(e[19]=l=>w.bankTo=l),placeholder:o(t)("dashboard.Select Bank")},{default:i(()=>[(C(!0),x(R,null,H(F.value,l=>(C(),le(P,{key:l.id,label:l.name,value:l.id,disabled:l.id===w.bankFrom},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Amount")},{default:i(()=>[n(pe,{modelValue:w.money,"onUpdate:modelValue":e[20]||(e[20]=l=>w.money=l),min:0,precision:2},null,8,["modelValue"])]),_:1},8,["label"]),n(V,{label:o(t)("dashboard.Remark")},{default:i(()=>[n(p,{modelValue:w.remark,"onUpdate:modelValue":e[21]||(e[21]=l=>w.remark=l),placeholder:o(t)("dashboard.Optional")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])}}}),Ka=ca(qa,[["__scopeId","data-v-6fc92eea"]]);export{Ka as default}; diff --git a/public/assets/design-Cz2vUaWq.js b/public/assets/design-B6fEOA36.js similarity index 99% rename from public/assets/design-Cz2vUaWq.js rename to public/assets/design-B6fEOA36.js index 3ba84ba..22cdb8d 100644 --- a/public/assets/design-Cz2vUaWq.js +++ b/public/assets/design-B6fEOA36.js @@ -1 +1 @@ -import{B as We,a9 as Qe,a8 as Ce,a as ke,o as Xe,n as re,aC as we,I as F,X as ie,C as s,D as y,G as m,H as d,P as c,u as n,O as p,V as w,U as h,W as S,_ as T,Z as C,Y as P,ac as Ze,$ as el,a6 as $,p as j,a7 as ll,as as I,ag as Ve,z as R}from"./vue-DweYBrEc.js";import{x as tl,e as al,N as ol,ao as rl,ap as il,a6 as A,aq as Pe,y as nl,_ as dl}from"./index-fNs72j9w.js";import{S as _e,B as Te}from"./index-CgMrKa77.js";import{f as U,s as k,d as Ne,t as D,g as ne,a as sl,u as cl,b as ul,c as ml,e as De,h as fl,p as pl,i as bl}from"./index-Dhh2_3z1.js";import{F as g}from"./index-BlEwok4a.js";import{u as gl}from"./terminal-B3G_hUkG.js";import{b as x,a as yl}from"./validate-CEOscgyN.js";import"./index-DMA3A9_B.js";import"./index-CLJRKiC0.js";const hl={class:"default-main"},Fl={class:"header-config-box"},vl={class:"header"},Sl={class:"header-item-box"},Cl={class:"header-right"},kl={key:0,class:"header-senior-config-box"},wl={class:"header-senior-config-form"},Vl={class:"default-sort-field-box"},Pl=["onClick","data-id"],_l={class:"design-field"},Tl={class:"design-field"},Nl={class:"design-field-right"},Dl={key:0,class:"design-field-empty"},Ul={class:"field-config ba-scroll-style"},xl={key:0,class:"design-field-empty"},Ll={class:"field-inline"},Il={class:"field-inline"},Rl={class:"field-inline"},Al={class:"ba-operate-form",style:"width: calc(100% - 80px)"},Kl={class:"block-help"},Gl={class:"block-help"},El={style:"width: calc(100% - 88px)"},ql={class:"confirm-generate-dialog-body"},Bl={class:"confirm-generate-dialog-footer"},Ml={class:"design-timeline-box"},$l={class:"design-change-tips"},jl={key:1,class:"design-change-tips"},zl={class:"confirm-generate-dialog-footer"},Ol=We({__name:"design",setup(Hl){Qe(t=>({"1bb2fb2c":e.error.tableName?"70px":"60px","6e828e72":e.draggingField?"1px dashed var(--el-color-primary)":e.fields.length?"none":"1px dashed var(--el-border-color)"}));let de=1;const{t:r}=tl.useI18n(),z=al(),E=gl(),O=Ce("formRef"),q=ol(),se=Ce("designWindowRef"),e=ke({loading:{init:!1,generate:!1,remoteSelect:!1},sync:0,table:{name:"",comment:"",quickSearchField:[],defaultSortField:"",formFields:[],columnFields:[],defaultSortType:"desc",generateRelativePath:"",isCommonModel:0,modelFile:"",controllerFile:"",validateFile:"",webViewsDir:"",databaseConnection:"",designChange:[],rebuild:"No"},fields:[],activateField:-1,fieldCollapseName:["common","base","senior"],remoteSelectPre:{show:!1,index:-1,fieldList:[],modelFileList:[],controllerFileList:[],loading:!1,hideDelField:!1,form:{table:"",pk:"",label:"",joinField:[],sourceConfigType:"crud",remoteUrl:"",modelFile:"",controllerFile:"",primaryTableAlias:""}},showHeaderSeniorConfig:!1,confirmGenerate:{show:!1,menu:!1,table:!1,controller:!1},draggingField:!1,showDesignChangeLog:!1,error:{tableName:"",fieldName:null,fieldNameDuplication:null}}),Ue=t=>{e.activateField=t},xe=t=>{let l=null;for(const i in U){const f=A(U[i],"designType",t);if(f!==!1){l=I(U[i][f]);break}}if(!l||!ce(l,e.activateField))return!1;const o=I(e.fields[e.activateField]);o.designType=t;for(const i in o.table)o.table[i]=o.table[i].value;for(const i in o.form)o.form[i]=o.form[i].value;e.fields[e.activateField]=K(o),e.fields[e.activateField].uuid=o.uuid,Ve.confirm(r("crud.crud.Reset generate type attr"),r("Reminder"),{confirmButtonText:r("Confirm")+r("Reset"),cancelButtonText:r("crud.crud.Design efficiency"),type:"warning",closeOnClickModal:!1}).then(()=>{_(),ue(e.fields[e.activateField].uuid);const i=e.fields[e.activateField].name;e.fields[e.activateField]=K(l),e.fields[e.activateField].name=i,l.primaryKey&&(e.table.quickSearchField.push(e.fields[e.activateField].uuid),e.table.defaultSortField||(e.table.defaultSortField=e.fields[e.activateField].uuid)),l.designType=="weigh"&&(e.table.defaultSortField=e.fields[e.activateField].uuid),["remoteSelect","remoteSelects"].includes(l.designType)&&Y(e.activateField,!0),l.formBuildExclude||e.table.formFields.push(e.fields[e.activateField].uuid),l.tableBuildExclude||e.table.columnFields.push(e.fields[e.activateField].uuid)}).catch(()=>{})},H=(t,l)=>{const o=e.fields[l].name;e.fields[l].name=t,G({type:"change-field-name",index:e.activateField,oldName:o,newName:t})},ce=(t,l=-1)=>t.primaryKey===!0&&e.fields.find((i,f)=>l>-1&&f==l?!1:i.primaryKey)?(R({type:"error",message:r("crud.crud.There can only be one primary key field")}),!1):!0,Le=t=>{e.error.fieldName&&(e.error.fieldName.close(),e.error.fieldName=null);for(const l in e.fields)if(!yl(e.fields[l].name)){let o=r("crud.crud.Field name is invalid It starts with a letter or underscore and cannot contain any character other than letters, digits, or underscores",{field:e.fields[l].name});return R({type:"error",message:o}),!1}return!0},Ie=t=>{e.error.fieldNameDuplication&&(e.error.fieldNameDuplication.close(),e.error.fieldNameDuplication=null);for(const l in e.fields){let o=0;for(const i in e.fields)if(e.fields[l].name==e.fields[i].name&&o++,o>1){let f=r("crud.crud.Field name duplication",{field:e.fields[l].name});return R({type:"error",message:f}),!1}}return!0},_=()=>{G({type:"change-field-attr",index:e.activateField,oldName:e.fields[e.activateField].name,newName:""})},ue=t=>{t==e.table.defaultSortField&&(e.table.defaultSortField="");for(const l in D){const o=e.table[D[l]].findIndex(i=>i==t);o!=-1&&e.table[D[l]].splice(o,1)}},me=t=>{if(e.fields[t]){if(e.activateField=-1,ue(e.fields[t].uuid),G({type:"del-field",oldName:e.fields[t].name,newName:""}),e.fields[t].designType=="weigh"){const l=e.fields.find(o=>["pk","spk"].includes(o.designType));l&&(e.table.defaultSortField=l.uuid)}e.fields.splice(t,1)}},Y=(t,l=!1)=>{e.remoteSelectPre.show=!0,e.remoteSelectPre.loading=!0,e.remoteSelectPre.index=t,e.remoteSelectPre.hideDelField=l,e.fields[t]&&e.fields[t].form["remote-table"].value&&(e.remoteSelectPre.form.table=e.fields[t].form["remote-table"].value,e.remoteSelectPre.form.pk=e.fields[t].form["remote-pk"].value,e.remoteSelectPre.form.label=e.fields[t].form["remote-field"].value,e.remoteSelectPre.form.controllerFile=e.fields[t].form["remote-controller"].value,e.remoteSelectPre.form.modelFile=e.fields[t].form["remote-model"].value,e.remoteSelectPre.form.remoteUrl=e.fields[t].form["remote-url"].value,e.remoteSelectPre.form.sourceConfigType=e.fields[t].form["remote-source-config-type"].value,e.remoteSelectPre.form.primaryTableAlias=e.fields[t].form["remote-primary-table-alias"].value,e.remoteSelectPre.form.joinField=e.fields[t].form["relation-fields"].value.split(","),Pe(e.fields[t].form["remote-table"].value,!0,e.table.databaseConnection).then(o=>{const i={};for(const f in o.data.fieldList)i[f]=(f?f+" - ":"")+o.data.fieldList[f];e.remoteSelectPre.fieldList=i}),(j(e.remoteSelectPre.modelFileList)||j(e.remoteSelectPre.controllerFileList))&&ne(e.fields[t].form["remote-table"].value).then(o=>{e.remoteSelectPre.modelFileList=o.data.modelFileList,e.remoteSelectPre.controllerFileList=o.data.controllerFileList})),e.remoteSelectPre.loading=!1},Re=(t,l)=>{if(["remoteSelect","remoteSelects"].includes(l.designType))return Y(t)},J=()=>{e.confirmGenerate.show=!1},W=()=>{e.loading.generate=!0;const t=I(e.fields);for(const o in t){for(const i in t[o].table)t[o].table[i]=t[o].table[i].value;for(const i in t[o].form)t[o].form[i]=t[o].form[i].value}const l=I(e.table);if(l.defaultSortField){const o=A(e.fields,"uuid",l.defaultSortField);o!==!1&&(l.defaultSortField=e.fields[o].name)}for(const o in D){const i=[],f=l[D[o]];for(const v in f){const b=A(e.fields,"uuid",f[v]);b!==!1&&i.push(e.fields[b].name)}l[D[o]]=i}sl({type:k.type,table:l,fields:t}).then(o=>{const i=()=>{const f=e.table.webViewsDir.replace(/^web/,".");E.toggle(!0),E.addTask("npx.prettier",!1,f,()=>{E.toggle(!1),E.toggleDot(!0),re(()=>{R({type:"error",message:r("crud.crud.Vite hot warning")})})})};e.sync>0&&z.crud.syncedUpdate==="yes"||e.sync==0&&z.crud.syncType=="automatic"?cl({logs:[{...o.data.crudLog,public:z.crud.syncAutoPublic==="yes"?1:0,newLog:1}],save:1}).then(f=>{ul({syncIds:f.data.syncIds}).finally(()=>{i()})}).catch(()=>{i()}):i()}).finally(()=>{e.loading.generate=!1,J()})},Ae=()=>{if(!Le()||!Ie())return;let t="";if(e.fields.findIndex(o=>o.primaryKey)===-1&&(t=r("crud.crud.Please design the primary key field!")),e.table.name||(t=r("crud.crud.Please enter the data table name!")),e.error.tableName&&(t=r("crud.crud.Please enter the correct table name!")),t){R({type:"error",message:t});return}e.loading.generate=!0,ml({table:e.table.name,connection:e.table.databaseConnection,webViewsDir:e.table.webViewsDir,controllerFile:e.table.controllerFile}).then(()=>{W()}).catch(o=>{e.loading.generate=!1,o.code==-1?(e.confirmGenerate.menu=o.data.menu,e.confirmGenerate.table=o.data.table,e.confirmGenerate.controller=o.data.controller,fe()||e.confirmGenerate.controller||e.confirmGenerate.menu?e.confirmGenerate.show=!0:W()):R({type:"error",message:o.msg})})},fe=()=>e.confirmGenerate.table&&(k.type=="create"||e.table.rebuild=="Yes"),Ke=()=>{if(!e.table.name&&!e.table.comment&&!e.fields.length)return De("start");Ve.confirm(r("crud.crud.It is irreversible to give up the design Are you sure you want to give up?"),r("Reminder"),{confirmButtonText:r("crud.crud.give up"),cancelButtonText:r("Cancel"),type:"warning"}).then(()=>{De("start")}).catch(()=>{})},K=t=>{t=I(t);const l=I(Ne[t.designType]);for(const o in t.form)l.form[o]&&(l.form[o].value=t.form[o]),o=="image-multi"&&t.form[o]&&(l.table.render=fl("render","images"));for(const o in t.table)l.table[o]&&(l.table[o].value=t.table[o]);return t.form=l.form,t.table=l.table,t.uuid=nl(),t},pe=t=>{if(_(),["enum","set"].includes(e.fields[e.activateField].type)){if(!t){e.fields[e.activateField].dataType=`${e.fields[e.activateField].type}()`;return}t=t.replaceAll(":",":"),t=t.replaceAll(",",",");let l=t.split(":");l[1]&&(l=l[1].split(","),l=l.map(o=>{if(!o)return"";let i=o.split("=");return i[0]&&i[1]?`'${i[0]}'`:""}).filter(o=>o!=""),e.fields[e.activateField].dataType=`${e.fields[e.activateField].type}(${l.join(",")})`)}},Ge=()=>{if(Q(),!!["db","sql","log"].includes(k.type)){if(e.loading.init=!0,k.type=="log"){pl(k.startData.logId,k.startData.logType).then(t=>{const l=t.data.fields;for(const o in l){const i=K(l[o]);typeof i.defaultType>"u"&&(i.default&&["none","null","empty string"].includes(i.default)?(i.defaultType=i.default.toUpperCase(),i.default=""):i.defaultType="INPUT"),e.fields.push(i)}if(t.data.table.defaultSortField){const o=A(e.fields,"name",t.data.table.defaultSortField);o!==!1&&(t.data.table.defaultSortField=e.fields[o].uuid)}for(const o in D){const i=[],f=t.data.table[D[o]];for(const v in f){const b=A(e.fields,"name",f[v]);b!==!1&&i.push(e.fields[b].uuid)}t.data.table[D[o]]=i}e.sync=t.data.sync,e.table=t.data.table,Q(),t.data.table.empty&&(e.table.rebuild="Yes"),e.table.isCommonModel=parseInt(t.data.table.isCommonModel),e.table.databaseConnection=t.data.table.databaseConnection?t.data.table.databaseConnection:""}).finally(()=>{e.loading.init=!1});return}bl({type:k.type,table:k.startData.table,sql:k.startData.sql,connection:k.startData.databaseConnection}).then(t=>{let l=[];for(const o in t.data.columns){const i=K(t.data.columns[o]);["id","update_time","create_time","updatetime","createtime"].includes(i.name)||e.table.formFields.push(i.uuid),["textarea","file","files","editor","password","array"].includes(i.designType)||e.table.columnFields.push(i.uuid),i.designType=="pk"&&(e.table.defaultSortField=i.uuid,e.table.quickSearchField.push(i.uuid)),i.designType=="weigh"&&(e.table.defaultSortField=i.uuid),l.push(i)}e.fields=l,e.table.comment=t.data.comment,e.table.databaseConnection=k.startData.databaseConnection,t.data.empty&&(e.table.rebuild="Yes"),k.type=="db"&&k.startData.table&&(e.table.name=k.startData.table,B(k.startData.table))}).finally(()=>{e.loading.init=!1})}},be=t=>A(e.fields,"name",t)!==!1?(t+=de,de++,be(t)):t;Xe(()=>{Ge();const t=_e.create(se.value,{group:"design-field",animation:200,filter:".design-field-empty",onAdd:l=>{var f,v;const o=(v=(f=l.originalEvent)==null?void 0:f.dataTransfer)==null?void 0:v.getData("name"),i=U[o];if(i&&i[l.oldIndex]){const b=K(i[l.oldIndex]);if(b.primaryKey)if(ce(b))e.table.quickSearchField.push(b.uuid),e.table.defaultSortField||(e.table.defaultSortField=b.uuid);else return l.item.remove();b.designType=="weigh"&&(e.table.defaultSortField=b.uuid),b.name=be(b.name),e.fields.splice(l.newIndex,0,b),G({type:"add-field",index:l.newIndex,newName:b.name,oldName:"",after:l.newIndex===0?"FIRST FIELD":e.fields[l.newIndex-1].name}),["remoteSelect","remoteSelects"].includes(b.designType)&&Y(l.newIndex,!0),b.formBuildExclude||e.table.formFields.push(b.uuid),b.tableBuildExclude||e.table.columnFields.push(b.uuid)}l.item.remove(),re(()=>{t.sort(we(e.fields.length).map(b=>b.toString()))})},onEnd:l=>{const o=e.fields[l.oldIndex];e.fields.splice(l.oldIndex,1),e.fields.splice(l.newIndex,0,o),G({type:"change-field-order",index:l.newIndex,newName:"",oldName:o.name,after:l.newIndex===0?"FIRST FIELD":e.fields[l.newIndex-1].name}),re(()=>{t.sort(we(e.fields.length).map(i=>i.toString()))})}});q.value.forEach((l,o)=>{_e.create(l,{sort:!1,group:{name:"design-field",pull:"clone",put:!1},animation:200,setData:i=>{i.setData("name",Object.keys(U)[o])},onStart:()=>{e.draggingField=!0},onEnd:()=>{e.draggingField=!1}})})});const Ee=t=>{if(!t)return e.error.tableName="";/^[a-z_][a-z0-9_]*$/.test(t)?(e.error.tableName="",B(t)):e.error.tableName=r("crud.crud.Use lower case underlined for table names"),Q()},Q=()=>{e.table.rebuild="No",e.table.designChange=[]},B=t=>{t&&ne(t,e.table.isCommonModel).then(l=>{e.table.modelFile=l.data.modelFile,e.table.controllerFile=l.data.controllerFile,e.table.validateFile=l.data.validateFile,e.table.webViewsDir=l.data.webViewsDir,e.table.generateRelativePath=t.replaceAll("/","\\")})},qe=()=>{B(e.table.generateRelativePath)},Be=()=>{e.remoteSelectPre.form.table&&(X(["table"]),e.loading.remoteSelect=!0,Pe(e.remoteSelectPre.form.table,!0,e.table.databaseConnection).then(t=>{e.remoteSelectPre.form.pk=t.data.pk;const l=["name","title","username","nickname"];for(const i in t.data.fieldList)if(l.includes(i)){e.remoteSelectPre.form.label=i,e.remoteSelectPre.form.joinField.push(i);break}const o={};for(const i in t.data.fieldList)o[i]=(i?i+" - ":"")+t.data.fieldList[i];e.remoteSelectPre.fieldList=o}).finally(()=>{e.loading.remoteSelect=!1}),ne(e.remoteSelectPre.form.table).then(t=>{e.remoteSelectPre.modelFileList=t.data.modelFileList,e.remoteSelectPre.controllerFileList=t.data.controllerFileList,Object.keys(t.data.modelFileList).includes(t.data.modelFile)&&(e.remoteSelectPre.form.modelFile=t.data.modelFile),Object.keys(t.data.controllerFileList).includes(t.data.controllerFile)&&(e.remoteSelectPre.form.controllerFile=t.data.controllerFile)}))},ge=()=>{const t=()=>{if(e.fields[e.remoteSelectPre.index].name=="remote_select"){const l=e.remoteSelectPre.form.table+(e.fields[e.remoteSelectPre.index].designType=="remoteSelect"?"_id":"_ids");H(l,e.remoteSelectPre.index)}e.fields[e.remoteSelectPre.index].form["remote-table"].value=e.remoteSelectPre.form.table,e.fields[e.remoteSelectPre.index].form["remote-pk"].value=e.remoteSelectPre.form.pk,e.fields[e.remoteSelectPre.index].form["remote-field"].value=e.remoteSelectPre.form.label,e.fields[e.remoteSelectPre.index].form["remote-controller"].value=e.remoteSelectPre.form.controllerFile,e.fields[e.remoteSelectPre.index].form["remote-model"].value=e.remoteSelectPre.form.modelFile,e.fields[e.remoteSelectPre.index].form["remote-url"].value=e.remoteSelectPre.form.remoteUrl,e.fields[e.remoteSelectPre.index].form["remote-source-config-type"].value=e.remoteSelectPre.form.sourceConfigType,e.fields[e.remoteSelectPre.index].form["remote-primary-table-alias"].value=e.remoteSelectPre.form.primaryTableAlias,e.fields[e.remoteSelectPre.index].form["relation-fields"].value=e.fields[e.remoteSelectPre.index].designType=="remoteSelect"?e.remoteSelectPre.form.joinField.join(","):e.remoteSelectPre.form.label,e.remoteSelectPre.index=-1,e.remoteSelectPre.show=!1,X()};O.value&&O.value.validate(l=>{l&&t()})},ye=()=>{e.remoteSelectPre.show=!1,X(),e.remoteSelectPre.index!==-1&&e.remoteSelectPre.hideDelField&&me(e.remoteSelectPre.index)},X=(t=[])=>{for(const l in e.remoteSelectPre.form)t.includes(l)||(l=="joinField"?e.remoteSelectPre.form[l]=[]:l=="sourceConfigType"?e.remoteSelectPre.form[l]="crud":e.remoteSelectPre.form[l]="")},Me=ke({table:[x({name:"required",title:r("crud.crud.remote-table")})],pk:[x({name:"required",title:r("crud.crud.Drop down value field")})],label:[x({name:"required",title:r("crud.crud.Drop down label field")})],joinField:[x({name:"required",title:r("crud.crud.Fields displayed in the table")})],controllerFile:[x({name:"required",title:r("crud.crud.Controller position")})],modelFile:[x({name:"required",title:r("crud.crud.Data Model Location")})],remoteUrl:[x({name:"required",title:r("crud.crud.remote-url")})]}),G=t=>{if(k.type=="create")return;let l=!0;if(t.type=="change-field-name"){for(const o in e.table.designChange)e.table.designChange[o].type=="change-field-attr"&&t.oldName==e.table.designChange[o].oldName&&(e.table.designChange[o].oldName=t.newName),e.table.designChange[o].type=="change-field-order"&&t.oldName==e.table.designChange[o].oldName&&(e.table.designChange[o].oldName=t.newName),e.table.designChange[o].after==t.oldName&&(e.table.designChange[o].after=t.newName);for(const o in e.table.designChange){if(e.table.designChange[o].type=="add-field"&&e.table.designChange[o].newName==t.oldName){e.table.designChange[o].newName=t.newName,l=!1;break}if(e.table.designChange[o].type=="change-field-name"&&e.table.designChange[o].newName==t.oldName){t.oldName=e.table.designChange[o].oldName,e.table.designChange[o]=t,e.table.designChange[o].newName==e.table.designChange[o].oldName&&e.table.designChange.splice(o,1),l=!1;break}}}else if(t.type=="del-field"){let o=!1;e.table.designChange=e.table.designChange.filter(i=>{o=i.type=="add-field"&&i.newName==t.oldName;const f=i.type=="change-field-attr"&&i.oldName==t.oldName,v=i.type=="change-field-order"&&i.oldName==t.oldName;return!o&&!f&&!v}),e.table.designChange=e.table.designChange.filter(i=>{const f=i.type=="change-field-name"&&i.newName==t.oldName;return f&&(t.oldName=i.oldName),!f}),o&&(l=!1);for(const i in e.table.designChange)if(e.table.designChange[i].type=="del-field"&&e.table.designChange[i].oldName==t.oldName){l=!1;break}}else if(t.type=="change-field-attr")for(const o in e.table.designChange){if(e.table.designChange[o].type=="change-field-attr"&&e.table.designChange[o].oldName==t.oldName){l=!1;break}if(e.table.designChange[o].type=="add-field"&&e.table.designChange[o].newName==t.oldName){l=!1;break}}else if(t.type=="change-field-order")for(const o in e.table.designChange){if(e.table.designChange[o].type=="add-field"&&e.table.designChange[o].newName==t.oldName){e.table.designChange[o].after=t.after,l=!1;break}if(e.table.designChange[o].type=="change-field-order"&&e.table.designChange[o].oldName==t.oldName){e.table.designChange[o]=t,l=!1;break}}t.sync=!0,l&&e.table.designChange.push(t)},$e=t=>{switch(t.type){case"add-field":return r("crud.crud.Add field")+" "+t.newName;case"change-field-attr":return r("crud.crud.Modify field properties")+" "+t.oldName;case"change-field-name":return r("crud.crud.Modify field name")+" "+t.oldName+" => "+t.newName;case"del-field":return r("crud.crud.Delete field")+" "+t.oldName;case"change-field-order":return r("crud.crud.Modify field order")+" "+t.oldName+" => "+(t.after=="FIRST FIELD"?r("crud.crud.First field"):t.after+" "+r("crud.crud.After"));default:return r("Unknown")}},je=t=>{let l="";switch(t){case"change-field-name":l="warning";break;case"del-field":l="danger";break;case"add-field":l="primary";break;case"change-field-attr":l="success";break;case"change-field-order":l="info";break;default:l="success";break}return l};return(t,l)=>{const o=F("el-link"),i=F("el-button"),f=F("el-row"),v=F("el-option"),b=F("el-select"),N=F("el-form-item"),he=F("el-checkbox"),Fe=F("el-input"),Z=F("Icon"),ee=F("el-collapse-item"),ze=F("el-collapse"),le=F("el-col"),M=F("el-divider"),ve=F("el-form"),Oe=F("el-text"),Se=F("el-scrollbar"),te=F("el-dialog"),ae=F("el-alert"),He=F("el-timeline-item"),Ye=F("el-timeline"),L=ie("blur"),oe=ie("loading"),Je=ie("drag");return s(),y("div",hl,[m("div",Fl,[d(f,{class:"header-box"},{default:c(()=>[m("div",vl,[m("div",Sl,[d(g,{class:"mr-20 table-name-item",label:n(r)("crud.log.table_name"),modelValue:e.table.name,"onUpdate:modelValue":l[0]||(l[0]=a=>e.table.name=a),type:"string",placeholder:n(r)("crud.crud.Name of the data table"),"input-attr":{onChange:Ee},error:e.error.tableName},null,8,["label","modelValue","placeholder","input-attr","error"]),d(g,{class:"table-comment-item",label:n(r)("crud.crud.Data Table Notes"),modelValue:e.table.comment,"onUpdate:modelValue":l[1]||(l[1]=a=>e.table.comment=a),type:"string",placeholder:n(r)("crud.crud.For example: `user table` will be generated into `user management`")},null,8,["label","modelValue","placeholder"])]),m("div",Cl,[n(k).type!="create"?(s(),p(o,{key:0,onClick:l[2]||(l[2]=a=>e.showDesignChangeLog=!0),class:"design-change-log",type:"primary"},{default:c(()=>[w(h(n(r)("crud.crud.Table design change")),1)]),_:1})):S("",!0),T((s(),p(i,{type:"primary",loading:e.loading.generate,onClick:Ae},{default:c(()=>[w(h(n(r)("crud.crud.Generate CRUD code")),1)]),_:1},8,["loading"])),[[L]]),T((s(),p(i,{onClick:Ke,type:"danger"},{default:c(()=>[w(h(n(r)("crud.crud.give up")),1)]),_:1})),[[L]])])])]),_:1}),d(Ze,{name:e.showHeaderSeniorConfig?"el-zoom-in-top":"el-zoom-in-bottom"},{default:c(()=>[e.showHeaderSeniorConfig?(s(),y("div",kl,[m("div",wl,[d(N,{"label-width":140,label:n(r)("crud.crud.Table Quick Search Fields")},{default:c(()=>[d(b,{clearable:!0,multiple:!0,class:"w100",modelValue:e.table.quickSearchField,"onUpdate:modelValue":l[3]||(l[3]=a=>e.table.quickSearchField=a),placement:"bottom"},{default:c(()=>[(s(!0),y(C,null,P(e.fields,(a,u)=>(s(),p(v,{key:u+a.uuid,label:a.name+(a.comment?"-"+a.comment:a.title),value:a.uuid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),m("div",Vl,[d(N,{"label-width":140,class:"default-sort-field mr-20",label:n(r)("crud.crud.Table Default Sort Fields")},{default:c(()=>[d(b,{clearable:!0,modelValue:e.table.defaultSortField,"onUpdate:modelValue":l[4]||(l[4]=a=>e.table.defaultSortField=a),placement:"bottom"},{default:c(()=>[(s(!0),y(C,null,P(e.fields,(a,u)=>(s(),p(v,{key:u+a.uuid,label:a.name+(a.comment?"-"+a.comment:a.title),value:a.uuid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),d(g,{class:"default-sort-field-type",label:n(r)("crud.crud.sort order"),modelValue:e.table.defaultSortType,"onUpdate:modelValue":l[5]||(l[5]=a=>e.table.defaultSortType=a),type:"select","input-attr":{content:{desc:n(r)("crud.crud.sort order desc"),asc:n(r)("crud.crud.sort order asc")}}},null,8,["label","modelValue","input-attr"])]),d(N,{"label-width":140,label:n(r)("crud.crud.Fields as Table Columns")},{default:c(()=>[d(b,{clearable:!0,multiple:!0,class:"w100",modelValue:e.table.columnFields,"onUpdate:modelValue":l[6]||(l[6]=a=>e.table.columnFields=a),placement:"bottom"},{default:c(()=>[(s(!0),y(C,null,P(e.fields,(a,u)=>(s(),p(v,{key:u+a.uuid,label:a.name+(a.comment?"-"+a.comment:a.title),value:a.uuid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),d(N,{"label-width":140,label:n(r)("crud.crud.Fields as form items")},{default:c(()=>[d(b,{clearable:!0,multiple:!0,class:"w100",modelValue:e.table.formFields,"onUpdate:modelValue":l[7]||(l[7]=a=>e.table.formFields=a),placement:"bottom"},{default:c(()=>[(s(!0),y(C,null,P(e.fields,(a,u)=>(s(),p(v,{key:u+a.uuid,label:a.name+(a.comment?"-"+a.comment:a.title),value:a.uuid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),d(g,{label:n(r)("crud.crud.The relative path to the generated code"),modelValue:e.table.generateRelativePath,"onUpdate:modelValue":l[8]||(l[8]=a=>e.table.generateRelativePath=a),type:"string","label-width":140,"block-help":n(r)("crud.crud.For quick combination code generation location, please fill in the relative path"),"input-attr":{onChange:B}},null,8,["label","modelValue","block-help","input-attr"]),d(g,{label:n(r)("crud.crud.Generated Controller Location"),modelValue:e.table.controllerFile,"onUpdate:modelValue":l[9]||(l[9]=a=>e.table.controllerFile=a),type:"string","label-width":140},null,8,["label","modelValue"]),d(N,{label:n(r)("crud.crud.Generated Data Model Location"),"label-width":140},{default:c(()=>[d(Fe,{modelValue:e.table.modelFile,"onUpdate:modelValue":l[11]||(l[11]=a=>e.table.modelFile=a),type:"string"},{append:c(()=>[d(he,{onChange:qe,modelValue:e.table.isCommonModel,"onUpdate:modelValue":l[10]||(l[10]=a=>e.table.isCommonModel=a),label:n(r)("crud.crud.Common model"),size:"small","true-value":1,"false-value":0},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),d(g,{label:n(r)("crud.crud.Generated Validator Location"),modelValue:e.table.validateFile,"onUpdate:modelValue":l[12]||(l[12]=a=>e.table.validateFile=a),type:"string","label-width":140},null,8,["label","modelValue"]),d(g,{label:n(r)("crud.crud.WEB end view directory"),modelValue:e.table.webViewsDir,"onUpdate:modelValue":l[13]||(l[13]=a=>e.table.webViewsDir=a),type:"string","label-width":140},null,8,["label","modelValue"]),d(g,{label:n(r)("Database connection"),modelValue:e.table.databaseConnection,"onUpdate:modelValue":l[14]||(l[14]=a=>e.table.databaseConnection=a),type:"remoteSelect","label-width":140,"block-help":n(r)("Database connection help"),"input-attr":{pk:"key",field:"key",remoteUrl:n(rl)}},null,8,["label","modelValue","block-help","input-attr"])])])):S("",!0)]),_:1},8,["name"]),m("div",{onClick:l[15]||(l[15]=a=>e.showHeaderSeniorConfig=!e.showHeaderSeniorConfig),class:"header-senior-config"},[m("span",null,h(n(r)("crud.crud.Advanced Configuration")),1),d(Z,{class:"senior-config-arrow-icon",size:"14",color:"var(--el-text-color-primary)",name:e.showHeaderSeniorConfig?"el-icon-ArrowUp":"el-icon-ArrowDown"},null,8,["name"])])]),T((s(),p(f,{class:"fields-box",gutter:20},{default:c(()=>[d(le,{xs:24,span:6},{default:c(()=>[d(ze,{class:"field-collapse",modelValue:e.fieldCollapseName,"onUpdate:modelValue":l[16]||(l[16]=a=>e.fieldCollapseName=a)},{default:c(()=>[d(ee,{title:n(r)("crud.crud.Common Fields"),name:"common"},{default:c(()=>[m("div",{class:"field-box",ref:n(q).set},[(s(!0),y(C,null,P(n(U).common,(a,u)=>(s(),y("div",{key:u,class:"field-item"},[m("span",null,h(a.title),1)]))),128))],512)]),_:1},8,["title"]),d(ee,{title:n(r)("crud.crud.Base Fields"),name:"base"},{default:c(()=>[m("div",{class:"field-box",ref:n(q).set},[(s(!0),y(C,null,P(n(U).base,(a,u)=>(s(),y("div",{key:u,class:"field-item"},[m("span",null,h(a.title),1)]))),128))],512)]),_:1},8,["title"]),d(ee,{title:n(r)("crud.crud.Advanced Fields"),name:"senior"},{default:c(()=>[m("div",{class:"field-box",ref:n(q).set},[(s(!0),y(C,null,P(n(U).senior,(a,u)=>(s(),y("div",{key:u,class:"field-item"},[m("span",null,h(a.title),1)]))),128))],512)]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1}),d(le,{xs:24,span:12},{default:c(()=>[m("div",{ref_key:"designWindowRef",ref:se,class:"design-window ba-scroll-style"},[(s(!0),y(C,null,P(e.fields,(a,u)=>(s(),y("div",{key:u,class:el([u===e.activateField?"activate":"","design-field-box"]),onClick:V=>Ue(u),"data-id":u},[m("div",_l,[m("span",null,h(n(r)("crud.crud.Field Name"))+":",1),d(Te,{onPointerdown:l[17]||(l[17]=$(()=>{},["stop"])),class:"design-field-name-input","model-value":a.name,type:"string",attr:{size:"small",onInput:V=>H(V,u)}},null,8,["model-value","attr"])]),m("div",Tl,[m("span",null,h(n(r)("crud.crud.field comment"))+":",1),d(Te,{onPointerdown:l[18]||(l[18]=$(()=>{},["stop"])),class:"design-field-name-comment",modelValue:a.comment,"onUpdate:modelValue":V=>a.comment=V,type:"string",attr:{size:"small",onChange:pe}},null,8,["modelValue","onUpdate:modelValue","attr"])]),m("div",Nl,[["remoteSelect","remoteSelects"].includes(a.designType)?T((s(),p(i,{key:0,onClick:$(V=>Re(u,a),["stop"]),type:"primary",size:"small",circle:""},{default:c(()=>[d(Z,{color:"var(--el-color-white)",size:"15",name:"fa fa-pencil icon"})]),_:2},1032,["onClick"])),[[L]]):S("",!0),T((s(),p(i,{onClick:$(V=>me(u),["stop"]),type:"danger",size:"small",circle:""},{default:c(()=>[d(Z,{color:"var(--el-color-white)",size:"15",name:"fa fa-trash"})]),_:2},1032,["onClick"])),[[L]])])],10,Pl))),128)),!e.fields.length&&!e.draggingField?(s(),y("div",Dl,h(n(r)("crud.crud.Drag the left element here to start designing CRUD")),1)):S("",!0)],512)]),_:1}),d(le,{xs:24,span:6},{default:c(()=>[m("div",Ul,[e.activateField===-1?(s(),y("div",xl,h(n(r)("crud.crud.Please select a field from the left first")),1)):(s(),y("div",{key:"activate-field-"+e.activateField},[d(ve,{"label-position":"top"},{default:c(()=>[d(M,{"content-position":"left"},{default:c(()=>[w(h(n(r)("crud.crud.Common")),1)]),_:1}),d(N,{label:n(r)("crud.crud.Generate type")},{default:c(()=>[d(b,{onChange:l[19]||(l[19]=a=>xe(a)),class:"w100","model-value":e.fields[e.activateField].designType,placement:"bottom"},{default:c(()=>[(s(!0),y(C,null,P(n(Ne),(a,u)=>(s(),p(v,{key:u,label:a.name,value:u},null,8,["label","value"]))),128))]),_:1},8,["model-value"])]),_:1},8,["label"]),d(g,{label:n(r)("crud.crud.Field comments (CRUD dictionary)"),type:"textarea","input-attr":{rows:2,onChange:pe},placeholder:n(r)("crud.crud.The field comment will be used as the CRUD dictionary, and will be identified as the field title before the colon, and as the data dictionary after the colon"),modelValue:e.fields[e.activateField].comment,"onUpdate:modelValue":l[20]||(l[20]=a=>e.fields[e.activateField].comment=a)},null,8,["label","input-attr","placeholder","modelValue"]),d(M,{"content-position":"left"},{default:c(()=>[w(h(n(r)("crud.crud.Field Properties")),1)]),_:1}),d(g,{label:n(r)("crud.crud.Field Name"),type:"string","model-value":e.fields[e.activateField].name,"input-attr":{onInput:a=>H(a,e.activateField)}},null,8,["label","model-value","input-attr"]),e.fields[e.activateField].dataType?(s(),p(g,{key:0,label:n(r)("crud.crud.Field Type"),"input-attr":{onChange:_},type:"textarea",modelValue:e.fields[e.activateField].dataType,"onUpdate:modelValue":l[21]||(l[21]=a=>e.fields[e.activateField].dataType=a)},null,8,["label","input-attr","modelValue"])):(s(),y(C,{key:1},[d(g,{label:n(r)("crud.crud.Field Type"),"input-attr":{onChange:_},type:"string",modelValue:e.fields[e.activateField].type,"onUpdate:modelValue":l[22]||(l[22]=a=>e.fields[e.activateField].type=a)},null,8,["label","input-attr","modelValue"]),m("div",Ll,[d(g,{label:n(r)("crud.crud.length"),type:"number",modelValue:e.fields[e.activateField].length,"onUpdate:modelValue":l[23]||(l[23]=a=>e.fields[e.activateField].length=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"]),d(g,{label:n(r)("crud.crud.decimal point"),type:"number",modelValue:e.fields[e.activateField].precision,"onUpdate:modelValue":l[24]||(l[24]=a=>e.fields[e.activateField].precision=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"])])],64)),d(N,{label:n(r)("crud.crud.Field Defaults")},{default:c(()=>[d(b,{modelValue:e.fields[e.activateField].defaultType,"onUpdate:modelValue":l[25]||(l[25]=a=>e.fields[e.activateField].defaultType=a)},{default:c(()=>[d(v,{label:"手动输入",value:"INPUT"}),d(v,{label:"EMPTY STRING(空字符串)",value:"EMPTY STRING"}),d(v,{label:"NULL",value:"NULL"}),d(v,{label:"无(不设默认值)",value:"NONE"})]),_:1},8,["modelValue"]),e.fields[e.activateField].defaultType=="INPUT"?(s(),p(Fe,{key:0,placeholder:n(r)("crud.crud.Please input the default value"),type:"text",modelValue:e.fields[e.activateField].default,"onUpdate:modelValue":l[26]||(l[26]=a=>e.fields[e.activateField].default=a),onChange:_,class:"default-input"},null,8,["placeholder","modelValue"])):S("",!0)]),_:1},8,["label"]),m("div",Il,[d(g,{class:"form-item-position-right",label:n(r)("crud.state.Primary key"),type:"switch",modelValue:e.fields[e.activateField].primaryKey,"onUpdate:modelValue":l[27]||(l[27]=a=>e.fields[e.activateField].primaryKey=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"]),d(g,{class:"form-item-position-right",label:n(r)("crud.crud.Auto increment"),type:"switch",modelValue:e.fields[e.activateField].autoIncrement,"onUpdate:modelValue":l[28]||(l[28]=a=>e.fields[e.activateField].autoIncrement=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"])]),m("div",Rl,[d(g,{class:"form-item-position-right",label:n(r)("crud.crud.Unsigned"),type:"switch",modelValue:e.fields[e.activateField].unsigned,"onUpdate:modelValue":l[29]||(l[29]=a=>e.fields[e.activateField].unsigned=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"]),d(g,{class:"form-item-position-right",label:n(r)("crud.crud.Allow NULL"),type:"switch",modelValue:e.fields[e.activateField].null,"onUpdate:modelValue":l[30]||(l[30]=a=>e.fields[e.activateField].null=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"])]),n(j)(e.fields[e.activateField].table)?S("",!0):(s(),y(C,{key:2},[d(M,{"content-position":"left"},{default:c(()=>[w(h(n(r)("crud.crud.Field Table Properties")),1)]),_:1}),(s(!0),y(C,null,P(e.fields[e.activateField].table,(a,u)=>(s(),p(g,{key:u,label:t.$t("crud.crud."+u),type:a.type,modelValue:e.fields[e.activateField].table[u].value,"onUpdate:modelValue":V=>e.fields[e.activateField].table[u].value=V,placeholder:e.fields[e.activateField].table[u].placeholder??"","input-attr":{content:e.fields[e.activateField].table[u].options??{},...e.fields[e.activateField].table[u].attr??{}}},null,8,["label","type","modelValue","onUpdate:modelValue","placeholder","input-attr"]))),128))],64)),n(j)(e.fields[e.activateField].form)?S("",!0):(s(),y(C,{key:3},[d(M,{"content-position":"left"},{default:c(()=>[w(h(n(r)("crud.crud.Field Form Properties")),1)]),_:1}),(s(!0),y(C,null,P(e.fields[e.activateField].form,(a,u)=>(s(),y(C,{key:u},[a.type!="hidden"?(s(),p(g,{key:0,label:t.$t("crud.crud."+u),type:a.type,modelValue:e.fields[e.activateField].form[u].value,"onUpdate:modelValue":V=>e.fields[e.activateField].form[u].value=V,placeholder:e.fields[e.activateField].form[u].placeholder??"","input-attr":{content:e.fields[e.activateField].form[u].options??{},...e.fields[e.activateField].form[u].attr??{}}},null,8,["label","type","modelValue","onUpdate:modelValue","placeholder","input-attr"])):S("",!0)],64))),128))],64))]),_:1})]))])]),_:1})]),_:1})),[[oe,e.loading.init]]),d(te,{onClose:ye,class:"ba-operate-dialog","model-value":e.remoteSelectPre.show,title:n(r)("crud.crud.Remote drop-down association information"),"close-on-click-modal":!1,"destroy-on-close":!0,onKeyup:ll(ge,["enter"])},{footer:c(()=>[m("div",El,[d(i,{onClick:ye},{default:c(()=>[w(h(t.$t("Cancel")),1)]),_:1}),T((s(),p(i,{onClick:ge,type:"primary"},{default:c(()=>[w(h(t.$t("Save")),1)]),_:1})),[[L]])])]),default:c(()=>[d(Se,{"max-height":"60vh"},{default:c(()=>[m("div",Al,[e.remoteSelectPre.index!=-1&&e.fields[e.remoteSelectPre.index]?T((s(),p(ve,{key:0,ref_key:"formRef",ref:O,model:e.remoteSelectPre.form,rules:Me,"label-position":"right","label-width":"160px"},{default:c(()=>[(s(),p(g,{label:n(r)("crud.crud.Associated Data Table"),modelValue:e.remoteSelectPre.form.table,"onUpdate:modelValue":l[31]||(l[31]=a=>e.remoteSelectPre.form.table=a),type:"remoteSelect",key:e.table.databaseConnection,"input-attr":{pk:"table",field:"comment",params:{connection:e.table.databaseConnection,samePrefix:1,excludeTable:["area","token","captcha","admin_group_access","config","admin_log","user_money_log","user_score_log"]},remoteUrl:n(il),onChange:Be},prop:"table"},null,8,["label","modelValue","input-attr"])),T((s(),y("div",null,[(s(),p(g,{prop:"pk",type:"select",label:n(r)("crud.crud.Drop down value field"),modelValue:e.remoteSelectPre.form.pk,"onUpdate:modelValue":l[32]||(l[32]=a=>e.remoteSelectPre.form.pk=a),placeholder:n(r)("crud.crud.Please select the value field of the select component"),key:"select-value"+JSON.stringify(e.remoteSelectPre.fieldList),"input-attr":{content:e.remoteSelectPre.fieldList}},null,8,["label","modelValue","placeholder","input-attr"])),(s(),p(g,{prop:"label",type:"select",label:n(r)("crud.crud.Drop down label field"),modelValue:e.remoteSelectPre.form.label,"onUpdate:modelValue":l[33]||(l[33]=a=>e.remoteSelectPre.form.label=a),placeholder:n(r)("crud.crud.Please select the label field of the select component"),key:"select-label"+JSON.stringify(e.remoteSelectPre.fieldList),"input-attr":{content:e.remoteSelectPre.fieldList}},null,8,["label","modelValue","placeholder","input-attr"])),e.fields[e.remoteSelectPre.index].designType=="remoteSelect"?(s(),p(g,{prop:"joinField",type:"selects",label:n(r)("crud.crud.Fields displayed in the table"),modelValue:e.remoteSelectPre.form.joinField,"onUpdate:modelValue":l[34]||(l[34]=a=>e.remoteSelectPre.form.joinField=a),placeholder:n(r)("crud.crud.Please select the fields displayed in the table"),key:"join-field"+JSON.stringify(e.remoteSelectPre.fieldList),"input-attr":{content:e.remoteSelectPre.fieldList}},null,8,["label","modelValue","placeholder","input-attr"])):S("",!0),d(g,{label:n(r)("crud.crud.Data source configuration type"),modelValue:e.remoteSelectPre.form.sourceConfigType,"onUpdate:modelValue":l[35]||(l[35]=a=>e.remoteSelectPre.form.sourceConfigType=a),type:"radio","input-attr":{border:!0,content:{crud:n(r)("crud.crud.Fast configuration with generated controllers and models"),custom:n(r)("crud.crud.Custom configuration")}}},null,8,["label","modelValue","input-attr"]),e.remoteSelectPre.form.sourceConfigType=="crud"?(s(),p(g,{prop:"controllerFile",type:"select",label:n(r)("crud.crud.Controller position"),modelValue:e.remoteSelectPre.form.controllerFile,"onUpdate:modelValue":l[36]||(l[36]=a=>e.remoteSelectPre.form.controllerFile=a),placeholder:n(r)("crud.crud.Please select the controller of the data table"),key:"controller-file"+JSON.stringify(e.remoteSelectPre.controllerFileList),"input-attr":{content:e.remoteSelectPre.controllerFileList},"block-help":n(r)("crud.crud.The remote pull-down will request the corresponding controller to obtain data, so it is recommended that you create the CRUD of the associated table")},null,8,["label","modelValue","placeholder","input-attr","block-help"])):S("",!0),(s(),p(g,{prop:e.remoteSelectPre.form.sourceConfigType=="crud"?"modelFile":"",type:"select",label:n(r)("crud.crud.Data Model Location"),modelValue:e.remoteSelectPre.form.modelFile,"onUpdate:modelValue":l[37]||(l[37]=a=>e.remoteSelectPre.form.modelFile=a),placeholder:n(r)("crud.crud.Please select the data model location of the data table"),key:"model-file"+JSON.stringify(e.remoteSelectPre.modelFileList),"input-attr":{content:e.remoteSelectPre.modelFileList},"block-help":e.remoteSelectPre.form.sourceConfigType=="crud"?"":n(r)("crud.crud.If it is left blank, the model of the associated table will be generated automatically If the table already has a model, it is recommended to select it to avoid repeated generation")},null,8,["prop","label","modelValue","placeholder","input-attr","block-help"])),e.table.databaseConnection&&e.remoteSelectPre.form.modelFile?(s(),p(N,{key:2,label:n(r)("Database connection")},{default:c(()=>[d(Oe,{size:"large",type:"danger"},{default:c(()=>[w(h(e.table.databaseConnection),1)]),_:1}),m("div",Kl,[m("div",null,h(n(r)("crud.crud.Check model class",{connection:e.table.databaseConnection})),1),m("div",null,h(n(r)("crud.crud.There is no connection attribute in model class")),1)])]),_:1},8,["label"])):S("",!0),e.remoteSelectPre.form.sourceConfigType=="custom"?(s(),p(g,{key:3,prop:"remoteUrl",label:n(r)("crud.crud.api url"),type:"string",modelValue:e.remoteSelectPre.form.remoteUrl,"onUpdate:modelValue":l[38]||(l[38]=a=>e.remoteSelectPre.form.remoteUrl=a),placeholder:n(r)("crud.crud.api url example")},null,8,["label","modelValue","placeholder"])):S("",!0),e.remoteSelectPre.form.sourceConfigType=="custom"?(s(),p(g,{key:4,label:n(r)("crud.crud.remote-primary-table-alias"),type:"string",modelValue:e.remoteSelectPre.form.primaryTableAlias,"onUpdate:modelValue":l[39]||(l[39]=a=>e.remoteSelectPre.form.primaryTableAlias=a),"block-help":n(r)("crud.crud.If the remote interface query involves associated query of multiple tables, enter the alias of the primary data table here")},{append:c(()=>[w("."+h(e.remoteSelectPre.form.pk),1)]),_:1},8,["label","modelValue","block-help"])):S("",!0),d(N,{label:n(r)("Reminder")},{default:c(()=>[m("div",Gl,h(n(r)("crud.crud.Design remote select tips")),1)]),_:1},8,["label"])])),[[oe,e.loading.remoteSelect]])]),_:1},8,["model","rules"])),[[oe,e.remoteSelectPre.loading]]):S("",!0)])]),_:1})]),_:1},8,["model-value","title"]),d(te,{onClose:J,class:"ba-operate-dialog confirm-generate-dialog","model-value":e.confirmGenerate.show,title:n(r)("crud.crud.Confirm CRUD code generation")},{footer:c(()=>[m("div",Bl,[d(i,{onClick:J},{default:c(()=>[w(h(t.$t("Cancel")),1)]),_:1}),T((s(),p(i,{loading:e.loading.generate,onClick:W,type:"primary"},{default:c(()=>[w(h(n(r)("crud.crud.Continue building")),1)]),_:1},8,["loading"])),[[L]])])]),default:c(()=>[m("div",ql,[e.confirmGenerate.controller?(s(),p(ae,{key:0,title:n(r)("crud.crud.The controller already exists Continuing to generate will automatically overwrite the existing code!"),center:"",type:"error"},null,8,["title"])):S("",!0),fe()?(s(),p(ae,{key:1,title:n(r)("crud.crud.The data table already exists Continuing to generate will automatically delete the original table and create a new one!"),class:"mt-10",center:"",type:"error"},null,8,["title"])):S("",!0),e.confirmGenerate.menu?(s(),p(ae,{key:2,title:n(r)("crud.crud.The menu rule with the same name already exists The menu and permission node will not be created in this generation"),class:"mt-10",center:"",type:"error"},null,8,["title"])):S("",!0)])]),_:1},8,["model-value","title"]),d(te,{class:"ba-operate-dialog design-change-log-dialog",width:"20%",modelValue:e.showDesignChangeLog,"onUpdate:modelValue":l[42]||(l[42]=a=>e.showDesignChangeLog=a)},{header:c(()=>[T((s(),y("div",null,[w(h(n(r)("crud.crud.Data table design changes preview")),1)])),[[Je,[".design-change-log-dialog",".el-dialog__header"]]])]),footer:c(()=>[m("div",zl,[d(i,{onClick:l[41]||(l[41]=a=>e.showDesignChangeLog=!1)},{default:c(()=>[w(h(n(r)("Confirm")),1)]),_:1})])]),default:c(()=>[d(Se,{"max-height":"400px"},{default:c(()=>[e.table.designChange.length?(s(),y(C,{key:0},[d(Ye,{class:"design-change-log-timeline"},{default:c(()=>[(s(!0),y(C,null,P(e.table.designChange,(a,u)=>(s(),p(He,{key:u,type:je(a.type),hollow:!0,"hide-timestamp":!0},{default:c(()=>[m("div",Ml,[d(he,{modelValue:a.sync,"onUpdate:modelValue":V=>a.sync=V,label:$e(a),size:"small"},null,8,["modelValue","onUpdate:modelValue","label"])])]),_:2},1032,["type"]))),128))]),_:1}),m("span",$l,h(n(r)("crud.crud.designChangeTips")),1)],64)):(s(),y("div",jl,"暂无表设计变更")),d(g,{label:n(r)("crud.crud.tableReBuild"),class:"rebuild-form-item",modelValue:e.table.rebuild,"onUpdate:modelValue":l[40]||(l[40]=a=>e.table.rebuild=a),type:"radio","input-attr":{border:!0,content:{No:n(r)("crud.crud.No"),Yes:n(r)("crud.crud.Yes")}},"block-help":n(r)("crud.crud.tableReBuildBlockHelp")},null,8,["label","modelValue","input-attr","block-help"])]),_:1})]),_:1},8,["modelValue"])])}}}),at=dl(Ol,[["__scopeId","data-v-578789f2"]]);export{at as default}; +import{B as We,a9 as Qe,a8 as Ce,a as ke,o as Xe,n as re,aC as we,I as F,X as ie,C as s,D as y,G as m,H as d,P as c,u as n,O as p,V as w,U as h,W as S,_ as T,Z as C,Y as P,ac as Ze,$ as el,a6 as $,p as j,a7 as ll,as as I,ag as Ve,z as R}from"./vue-DweYBrEc.js";import{x as tl,e as al,N as ol,ao as rl,ap as il,a6 as A,aq as Pe,y as nl,_ as dl}from"./index-BIzd9_wD.js";import{S as _e,B as Te}from"./index-BQ-QT2OB.js";import{f as U,s as k,d as Ne,t as D,g as ne,a as sl,u as cl,b as ul,c as ml,e as De,h as fl,p as pl,i as bl}from"./index-BHv-glTv.js";import{F as g}from"./index-Uyc56W3P.js";import{u as gl}from"./terminal-Czj_5HRs.js";import{b as x,a as yl}from"./validate-DJPb9IIE.js";import"./index-DdhozyMV.js";import"./index-BJWGSl1I.js";const hl={class:"default-main"},Fl={class:"header-config-box"},vl={class:"header"},Sl={class:"header-item-box"},Cl={class:"header-right"},kl={key:0,class:"header-senior-config-box"},wl={class:"header-senior-config-form"},Vl={class:"default-sort-field-box"},Pl=["onClick","data-id"],_l={class:"design-field"},Tl={class:"design-field"},Nl={class:"design-field-right"},Dl={key:0,class:"design-field-empty"},Ul={class:"field-config ba-scroll-style"},xl={key:0,class:"design-field-empty"},Ll={class:"field-inline"},Il={class:"field-inline"},Rl={class:"field-inline"},Al={class:"ba-operate-form",style:"width: calc(100% - 80px)"},Kl={class:"block-help"},Gl={class:"block-help"},El={style:"width: calc(100% - 88px)"},ql={class:"confirm-generate-dialog-body"},Bl={class:"confirm-generate-dialog-footer"},Ml={class:"design-timeline-box"},$l={class:"design-change-tips"},jl={key:1,class:"design-change-tips"},zl={class:"confirm-generate-dialog-footer"},Ol=We({__name:"design",setup(Hl){Qe(t=>({"1bb2fb2c":e.error.tableName?"70px":"60px","6e828e72":e.draggingField?"1px dashed var(--el-color-primary)":e.fields.length?"none":"1px dashed var(--el-border-color)"}));let de=1;const{t:r}=tl.useI18n(),z=al(),E=gl(),O=Ce("formRef"),q=ol(),se=Ce("designWindowRef"),e=ke({loading:{init:!1,generate:!1,remoteSelect:!1},sync:0,table:{name:"",comment:"",quickSearchField:[],defaultSortField:"",formFields:[],columnFields:[],defaultSortType:"desc",generateRelativePath:"",isCommonModel:0,modelFile:"",controllerFile:"",validateFile:"",webViewsDir:"",databaseConnection:"",designChange:[],rebuild:"No"},fields:[],activateField:-1,fieldCollapseName:["common","base","senior"],remoteSelectPre:{show:!1,index:-1,fieldList:[],modelFileList:[],controllerFileList:[],loading:!1,hideDelField:!1,form:{table:"",pk:"",label:"",joinField:[],sourceConfigType:"crud",remoteUrl:"",modelFile:"",controllerFile:"",primaryTableAlias:""}},showHeaderSeniorConfig:!1,confirmGenerate:{show:!1,menu:!1,table:!1,controller:!1},draggingField:!1,showDesignChangeLog:!1,error:{tableName:"",fieldName:null,fieldNameDuplication:null}}),Ue=t=>{e.activateField=t},xe=t=>{let l=null;for(const i in U){const f=A(U[i],"designType",t);if(f!==!1){l=I(U[i][f]);break}}if(!l||!ce(l,e.activateField))return!1;const o=I(e.fields[e.activateField]);o.designType=t;for(const i in o.table)o.table[i]=o.table[i].value;for(const i in o.form)o.form[i]=o.form[i].value;e.fields[e.activateField]=K(o),e.fields[e.activateField].uuid=o.uuid,Ve.confirm(r("crud.crud.Reset generate type attr"),r("Reminder"),{confirmButtonText:r("Confirm")+r("Reset"),cancelButtonText:r("crud.crud.Design efficiency"),type:"warning",closeOnClickModal:!1}).then(()=>{_(),ue(e.fields[e.activateField].uuid);const i=e.fields[e.activateField].name;e.fields[e.activateField]=K(l),e.fields[e.activateField].name=i,l.primaryKey&&(e.table.quickSearchField.push(e.fields[e.activateField].uuid),e.table.defaultSortField||(e.table.defaultSortField=e.fields[e.activateField].uuid)),l.designType=="weigh"&&(e.table.defaultSortField=e.fields[e.activateField].uuid),["remoteSelect","remoteSelects"].includes(l.designType)&&Y(e.activateField,!0),l.formBuildExclude||e.table.formFields.push(e.fields[e.activateField].uuid),l.tableBuildExclude||e.table.columnFields.push(e.fields[e.activateField].uuid)}).catch(()=>{})},H=(t,l)=>{const o=e.fields[l].name;e.fields[l].name=t,G({type:"change-field-name",index:e.activateField,oldName:o,newName:t})},ce=(t,l=-1)=>t.primaryKey===!0&&e.fields.find((i,f)=>l>-1&&f==l?!1:i.primaryKey)?(R({type:"error",message:r("crud.crud.There can only be one primary key field")}),!1):!0,Le=t=>{e.error.fieldName&&(e.error.fieldName.close(),e.error.fieldName=null);for(const l in e.fields)if(!yl(e.fields[l].name)){let o=r("crud.crud.Field name is invalid It starts with a letter or underscore and cannot contain any character other than letters, digits, or underscores",{field:e.fields[l].name});return R({type:"error",message:o}),!1}return!0},Ie=t=>{e.error.fieldNameDuplication&&(e.error.fieldNameDuplication.close(),e.error.fieldNameDuplication=null);for(const l in e.fields){let o=0;for(const i in e.fields)if(e.fields[l].name==e.fields[i].name&&o++,o>1){let f=r("crud.crud.Field name duplication",{field:e.fields[l].name});return R({type:"error",message:f}),!1}}return!0},_=()=>{G({type:"change-field-attr",index:e.activateField,oldName:e.fields[e.activateField].name,newName:""})},ue=t=>{t==e.table.defaultSortField&&(e.table.defaultSortField="");for(const l in D){const o=e.table[D[l]].findIndex(i=>i==t);o!=-1&&e.table[D[l]].splice(o,1)}},me=t=>{if(e.fields[t]){if(e.activateField=-1,ue(e.fields[t].uuid),G({type:"del-field",oldName:e.fields[t].name,newName:""}),e.fields[t].designType=="weigh"){const l=e.fields.find(o=>["pk","spk"].includes(o.designType));l&&(e.table.defaultSortField=l.uuid)}e.fields.splice(t,1)}},Y=(t,l=!1)=>{e.remoteSelectPre.show=!0,e.remoteSelectPre.loading=!0,e.remoteSelectPre.index=t,e.remoteSelectPre.hideDelField=l,e.fields[t]&&e.fields[t].form["remote-table"].value&&(e.remoteSelectPre.form.table=e.fields[t].form["remote-table"].value,e.remoteSelectPre.form.pk=e.fields[t].form["remote-pk"].value,e.remoteSelectPre.form.label=e.fields[t].form["remote-field"].value,e.remoteSelectPre.form.controllerFile=e.fields[t].form["remote-controller"].value,e.remoteSelectPre.form.modelFile=e.fields[t].form["remote-model"].value,e.remoteSelectPre.form.remoteUrl=e.fields[t].form["remote-url"].value,e.remoteSelectPre.form.sourceConfigType=e.fields[t].form["remote-source-config-type"].value,e.remoteSelectPre.form.primaryTableAlias=e.fields[t].form["remote-primary-table-alias"].value,e.remoteSelectPre.form.joinField=e.fields[t].form["relation-fields"].value.split(","),Pe(e.fields[t].form["remote-table"].value,!0,e.table.databaseConnection).then(o=>{const i={};for(const f in o.data.fieldList)i[f]=(f?f+" - ":"")+o.data.fieldList[f];e.remoteSelectPre.fieldList=i}),(j(e.remoteSelectPre.modelFileList)||j(e.remoteSelectPre.controllerFileList))&&ne(e.fields[t].form["remote-table"].value).then(o=>{e.remoteSelectPre.modelFileList=o.data.modelFileList,e.remoteSelectPre.controllerFileList=o.data.controllerFileList})),e.remoteSelectPre.loading=!1},Re=(t,l)=>{if(["remoteSelect","remoteSelects"].includes(l.designType))return Y(t)},J=()=>{e.confirmGenerate.show=!1},W=()=>{e.loading.generate=!0;const t=I(e.fields);for(const o in t){for(const i in t[o].table)t[o].table[i]=t[o].table[i].value;for(const i in t[o].form)t[o].form[i]=t[o].form[i].value}const l=I(e.table);if(l.defaultSortField){const o=A(e.fields,"uuid",l.defaultSortField);o!==!1&&(l.defaultSortField=e.fields[o].name)}for(const o in D){const i=[],f=l[D[o]];for(const v in f){const b=A(e.fields,"uuid",f[v]);b!==!1&&i.push(e.fields[b].name)}l[D[o]]=i}sl({type:k.type,table:l,fields:t}).then(o=>{const i=()=>{const f=e.table.webViewsDir.replace(/^web/,".");E.toggle(!0),E.addTask("npx.prettier",!1,f,()=>{E.toggle(!1),E.toggleDot(!0),re(()=>{R({type:"error",message:r("crud.crud.Vite hot warning")})})})};e.sync>0&&z.crud.syncedUpdate==="yes"||e.sync==0&&z.crud.syncType=="automatic"?cl({logs:[{...o.data.crudLog,public:z.crud.syncAutoPublic==="yes"?1:0,newLog:1}],save:1}).then(f=>{ul({syncIds:f.data.syncIds}).finally(()=>{i()})}).catch(()=>{i()}):i()}).finally(()=>{e.loading.generate=!1,J()})},Ae=()=>{if(!Le()||!Ie())return;let t="";if(e.fields.findIndex(o=>o.primaryKey)===-1&&(t=r("crud.crud.Please design the primary key field!")),e.table.name||(t=r("crud.crud.Please enter the data table name!")),e.error.tableName&&(t=r("crud.crud.Please enter the correct table name!")),t){R({type:"error",message:t});return}e.loading.generate=!0,ml({table:e.table.name,connection:e.table.databaseConnection,webViewsDir:e.table.webViewsDir,controllerFile:e.table.controllerFile}).then(()=>{W()}).catch(o=>{e.loading.generate=!1,o.code==-1?(e.confirmGenerate.menu=o.data.menu,e.confirmGenerate.table=o.data.table,e.confirmGenerate.controller=o.data.controller,fe()||e.confirmGenerate.controller||e.confirmGenerate.menu?e.confirmGenerate.show=!0:W()):R({type:"error",message:o.msg})})},fe=()=>e.confirmGenerate.table&&(k.type=="create"||e.table.rebuild=="Yes"),Ke=()=>{if(!e.table.name&&!e.table.comment&&!e.fields.length)return De("start");Ve.confirm(r("crud.crud.It is irreversible to give up the design Are you sure you want to give up?"),r("Reminder"),{confirmButtonText:r("crud.crud.give up"),cancelButtonText:r("Cancel"),type:"warning"}).then(()=>{De("start")}).catch(()=>{})},K=t=>{t=I(t);const l=I(Ne[t.designType]);for(const o in t.form)l.form[o]&&(l.form[o].value=t.form[o]),o=="image-multi"&&t.form[o]&&(l.table.render=fl("render","images"));for(const o in t.table)l.table[o]&&(l.table[o].value=t.table[o]);return t.form=l.form,t.table=l.table,t.uuid=nl(),t},pe=t=>{if(_(),["enum","set"].includes(e.fields[e.activateField].type)){if(!t){e.fields[e.activateField].dataType=`${e.fields[e.activateField].type}()`;return}t=t.replaceAll(":",":"),t=t.replaceAll(",",",");let l=t.split(":");l[1]&&(l=l[1].split(","),l=l.map(o=>{if(!o)return"";let i=o.split("=");return i[0]&&i[1]?`'${i[0]}'`:""}).filter(o=>o!=""),e.fields[e.activateField].dataType=`${e.fields[e.activateField].type}(${l.join(",")})`)}},Ge=()=>{if(Q(),!!["db","sql","log"].includes(k.type)){if(e.loading.init=!0,k.type=="log"){pl(k.startData.logId,k.startData.logType).then(t=>{const l=t.data.fields;for(const o in l){const i=K(l[o]);typeof i.defaultType>"u"&&(i.default&&["none","null","empty string"].includes(i.default)?(i.defaultType=i.default.toUpperCase(),i.default=""):i.defaultType="INPUT"),e.fields.push(i)}if(t.data.table.defaultSortField){const o=A(e.fields,"name",t.data.table.defaultSortField);o!==!1&&(t.data.table.defaultSortField=e.fields[o].uuid)}for(const o in D){const i=[],f=t.data.table[D[o]];for(const v in f){const b=A(e.fields,"name",f[v]);b!==!1&&i.push(e.fields[b].uuid)}t.data.table[D[o]]=i}e.sync=t.data.sync,e.table=t.data.table,Q(),t.data.table.empty&&(e.table.rebuild="Yes"),e.table.isCommonModel=parseInt(t.data.table.isCommonModel),e.table.databaseConnection=t.data.table.databaseConnection?t.data.table.databaseConnection:""}).finally(()=>{e.loading.init=!1});return}bl({type:k.type,table:k.startData.table,sql:k.startData.sql,connection:k.startData.databaseConnection}).then(t=>{let l=[];for(const o in t.data.columns){const i=K(t.data.columns[o]);["id","update_time","create_time","updatetime","createtime"].includes(i.name)||e.table.formFields.push(i.uuid),["textarea","file","files","editor","password","array"].includes(i.designType)||e.table.columnFields.push(i.uuid),i.designType=="pk"&&(e.table.defaultSortField=i.uuid,e.table.quickSearchField.push(i.uuid)),i.designType=="weigh"&&(e.table.defaultSortField=i.uuid),l.push(i)}e.fields=l,e.table.comment=t.data.comment,e.table.databaseConnection=k.startData.databaseConnection,t.data.empty&&(e.table.rebuild="Yes"),k.type=="db"&&k.startData.table&&(e.table.name=k.startData.table,B(k.startData.table))}).finally(()=>{e.loading.init=!1})}},be=t=>A(e.fields,"name",t)!==!1?(t+=de,de++,be(t)):t;Xe(()=>{Ge();const t=_e.create(se.value,{group:"design-field",animation:200,filter:".design-field-empty",onAdd:l=>{var f,v;const o=(v=(f=l.originalEvent)==null?void 0:f.dataTransfer)==null?void 0:v.getData("name"),i=U[o];if(i&&i[l.oldIndex]){const b=K(i[l.oldIndex]);if(b.primaryKey)if(ce(b))e.table.quickSearchField.push(b.uuid),e.table.defaultSortField||(e.table.defaultSortField=b.uuid);else return l.item.remove();b.designType=="weigh"&&(e.table.defaultSortField=b.uuid),b.name=be(b.name),e.fields.splice(l.newIndex,0,b),G({type:"add-field",index:l.newIndex,newName:b.name,oldName:"",after:l.newIndex===0?"FIRST FIELD":e.fields[l.newIndex-1].name}),["remoteSelect","remoteSelects"].includes(b.designType)&&Y(l.newIndex,!0),b.formBuildExclude||e.table.formFields.push(b.uuid),b.tableBuildExclude||e.table.columnFields.push(b.uuid)}l.item.remove(),re(()=>{t.sort(we(e.fields.length).map(b=>b.toString()))})},onEnd:l=>{const o=e.fields[l.oldIndex];e.fields.splice(l.oldIndex,1),e.fields.splice(l.newIndex,0,o),G({type:"change-field-order",index:l.newIndex,newName:"",oldName:o.name,after:l.newIndex===0?"FIRST FIELD":e.fields[l.newIndex-1].name}),re(()=>{t.sort(we(e.fields.length).map(i=>i.toString()))})}});q.value.forEach((l,o)=>{_e.create(l,{sort:!1,group:{name:"design-field",pull:"clone",put:!1},animation:200,setData:i=>{i.setData("name",Object.keys(U)[o])},onStart:()=>{e.draggingField=!0},onEnd:()=>{e.draggingField=!1}})})});const Ee=t=>{if(!t)return e.error.tableName="";/^[a-z_][a-z0-9_]*$/.test(t)?(e.error.tableName="",B(t)):e.error.tableName=r("crud.crud.Use lower case underlined for table names"),Q()},Q=()=>{e.table.rebuild="No",e.table.designChange=[]},B=t=>{t&&ne(t,e.table.isCommonModel).then(l=>{e.table.modelFile=l.data.modelFile,e.table.controllerFile=l.data.controllerFile,e.table.validateFile=l.data.validateFile,e.table.webViewsDir=l.data.webViewsDir,e.table.generateRelativePath=t.replaceAll("/","\\")})},qe=()=>{B(e.table.generateRelativePath)},Be=()=>{e.remoteSelectPre.form.table&&(X(["table"]),e.loading.remoteSelect=!0,Pe(e.remoteSelectPre.form.table,!0,e.table.databaseConnection).then(t=>{e.remoteSelectPre.form.pk=t.data.pk;const l=["name","title","username","nickname"];for(const i in t.data.fieldList)if(l.includes(i)){e.remoteSelectPre.form.label=i,e.remoteSelectPre.form.joinField.push(i);break}const o={};for(const i in t.data.fieldList)o[i]=(i?i+" - ":"")+t.data.fieldList[i];e.remoteSelectPre.fieldList=o}).finally(()=>{e.loading.remoteSelect=!1}),ne(e.remoteSelectPre.form.table).then(t=>{e.remoteSelectPre.modelFileList=t.data.modelFileList,e.remoteSelectPre.controllerFileList=t.data.controllerFileList,Object.keys(t.data.modelFileList).includes(t.data.modelFile)&&(e.remoteSelectPre.form.modelFile=t.data.modelFile),Object.keys(t.data.controllerFileList).includes(t.data.controllerFile)&&(e.remoteSelectPre.form.controllerFile=t.data.controllerFile)}))},ge=()=>{const t=()=>{if(e.fields[e.remoteSelectPre.index].name=="remote_select"){const l=e.remoteSelectPre.form.table+(e.fields[e.remoteSelectPre.index].designType=="remoteSelect"?"_id":"_ids");H(l,e.remoteSelectPre.index)}e.fields[e.remoteSelectPre.index].form["remote-table"].value=e.remoteSelectPre.form.table,e.fields[e.remoteSelectPre.index].form["remote-pk"].value=e.remoteSelectPre.form.pk,e.fields[e.remoteSelectPre.index].form["remote-field"].value=e.remoteSelectPre.form.label,e.fields[e.remoteSelectPre.index].form["remote-controller"].value=e.remoteSelectPre.form.controllerFile,e.fields[e.remoteSelectPre.index].form["remote-model"].value=e.remoteSelectPre.form.modelFile,e.fields[e.remoteSelectPre.index].form["remote-url"].value=e.remoteSelectPre.form.remoteUrl,e.fields[e.remoteSelectPre.index].form["remote-source-config-type"].value=e.remoteSelectPre.form.sourceConfigType,e.fields[e.remoteSelectPre.index].form["remote-primary-table-alias"].value=e.remoteSelectPre.form.primaryTableAlias,e.fields[e.remoteSelectPre.index].form["relation-fields"].value=e.fields[e.remoteSelectPre.index].designType=="remoteSelect"?e.remoteSelectPre.form.joinField.join(","):e.remoteSelectPre.form.label,e.remoteSelectPre.index=-1,e.remoteSelectPre.show=!1,X()};O.value&&O.value.validate(l=>{l&&t()})},ye=()=>{e.remoteSelectPre.show=!1,X(),e.remoteSelectPre.index!==-1&&e.remoteSelectPre.hideDelField&&me(e.remoteSelectPre.index)},X=(t=[])=>{for(const l in e.remoteSelectPre.form)t.includes(l)||(l=="joinField"?e.remoteSelectPre.form[l]=[]:l=="sourceConfigType"?e.remoteSelectPre.form[l]="crud":e.remoteSelectPre.form[l]="")},Me=ke({table:[x({name:"required",title:r("crud.crud.remote-table")})],pk:[x({name:"required",title:r("crud.crud.Drop down value field")})],label:[x({name:"required",title:r("crud.crud.Drop down label field")})],joinField:[x({name:"required",title:r("crud.crud.Fields displayed in the table")})],controllerFile:[x({name:"required",title:r("crud.crud.Controller position")})],modelFile:[x({name:"required",title:r("crud.crud.Data Model Location")})],remoteUrl:[x({name:"required",title:r("crud.crud.remote-url")})]}),G=t=>{if(k.type=="create")return;let l=!0;if(t.type=="change-field-name"){for(const o in e.table.designChange)e.table.designChange[o].type=="change-field-attr"&&t.oldName==e.table.designChange[o].oldName&&(e.table.designChange[o].oldName=t.newName),e.table.designChange[o].type=="change-field-order"&&t.oldName==e.table.designChange[o].oldName&&(e.table.designChange[o].oldName=t.newName),e.table.designChange[o].after==t.oldName&&(e.table.designChange[o].after=t.newName);for(const o in e.table.designChange){if(e.table.designChange[o].type=="add-field"&&e.table.designChange[o].newName==t.oldName){e.table.designChange[o].newName=t.newName,l=!1;break}if(e.table.designChange[o].type=="change-field-name"&&e.table.designChange[o].newName==t.oldName){t.oldName=e.table.designChange[o].oldName,e.table.designChange[o]=t,e.table.designChange[o].newName==e.table.designChange[o].oldName&&e.table.designChange.splice(o,1),l=!1;break}}}else if(t.type=="del-field"){let o=!1;e.table.designChange=e.table.designChange.filter(i=>{o=i.type=="add-field"&&i.newName==t.oldName;const f=i.type=="change-field-attr"&&i.oldName==t.oldName,v=i.type=="change-field-order"&&i.oldName==t.oldName;return!o&&!f&&!v}),e.table.designChange=e.table.designChange.filter(i=>{const f=i.type=="change-field-name"&&i.newName==t.oldName;return f&&(t.oldName=i.oldName),!f}),o&&(l=!1);for(const i in e.table.designChange)if(e.table.designChange[i].type=="del-field"&&e.table.designChange[i].oldName==t.oldName){l=!1;break}}else if(t.type=="change-field-attr")for(const o in e.table.designChange){if(e.table.designChange[o].type=="change-field-attr"&&e.table.designChange[o].oldName==t.oldName){l=!1;break}if(e.table.designChange[o].type=="add-field"&&e.table.designChange[o].newName==t.oldName){l=!1;break}}else if(t.type=="change-field-order")for(const o in e.table.designChange){if(e.table.designChange[o].type=="add-field"&&e.table.designChange[o].newName==t.oldName){e.table.designChange[o].after=t.after,l=!1;break}if(e.table.designChange[o].type=="change-field-order"&&e.table.designChange[o].oldName==t.oldName){e.table.designChange[o]=t,l=!1;break}}t.sync=!0,l&&e.table.designChange.push(t)},$e=t=>{switch(t.type){case"add-field":return r("crud.crud.Add field")+" "+t.newName;case"change-field-attr":return r("crud.crud.Modify field properties")+" "+t.oldName;case"change-field-name":return r("crud.crud.Modify field name")+" "+t.oldName+" => "+t.newName;case"del-field":return r("crud.crud.Delete field")+" "+t.oldName;case"change-field-order":return r("crud.crud.Modify field order")+" "+t.oldName+" => "+(t.after=="FIRST FIELD"?r("crud.crud.First field"):t.after+" "+r("crud.crud.After"));default:return r("Unknown")}},je=t=>{let l="";switch(t){case"change-field-name":l="warning";break;case"del-field":l="danger";break;case"add-field":l="primary";break;case"change-field-attr":l="success";break;case"change-field-order":l="info";break;default:l="success";break}return l};return(t,l)=>{const o=F("el-link"),i=F("el-button"),f=F("el-row"),v=F("el-option"),b=F("el-select"),N=F("el-form-item"),he=F("el-checkbox"),Fe=F("el-input"),Z=F("Icon"),ee=F("el-collapse-item"),ze=F("el-collapse"),le=F("el-col"),M=F("el-divider"),ve=F("el-form"),Oe=F("el-text"),Se=F("el-scrollbar"),te=F("el-dialog"),ae=F("el-alert"),He=F("el-timeline-item"),Ye=F("el-timeline"),L=ie("blur"),oe=ie("loading"),Je=ie("drag");return s(),y("div",hl,[m("div",Fl,[d(f,{class:"header-box"},{default:c(()=>[m("div",vl,[m("div",Sl,[d(g,{class:"mr-20 table-name-item",label:n(r)("crud.log.table_name"),modelValue:e.table.name,"onUpdate:modelValue":l[0]||(l[0]=a=>e.table.name=a),type:"string",placeholder:n(r)("crud.crud.Name of the data table"),"input-attr":{onChange:Ee},error:e.error.tableName},null,8,["label","modelValue","placeholder","input-attr","error"]),d(g,{class:"table-comment-item",label:n(r)("crud.crud.Data Table Notes"),modelValue:e.table.comment,"onUpdate:modelValue":l[1]||(l[1]=a=>e.table.comment=a),type:"string",placeholder:n(r)("crud.crud.For example: `user table` will be generated into `user management`")},null,8,["label","modelValue","placeholder"])]),m("div",Cl,[n(k).type!="create"?(s(),p(o,{key:0,onClick:l[2]||(l[2]=a=>e.showDesignChangeLog=!0),class:"design-change-log",type:"primary"},{default:c(()=>[w(h(n(r)("crud.crud.Table design change")),1)]),_:1})):S("",!0),T((s(),p(i,{type:"primary",loading:e.loading.generate,onClick:Ae},{default:c(()=>[w(h(n(r)("crud.crud.Generate CRUD code")),1)]),_:1},8,["loading"])),[[L]]),T((s(),p(i,{onClick:Ke,type:"danger"},{default:c(()=>[w(h(n(r)("crud.crud.give up")),1)]),_:1})),[[L]])])])]),_:1}),d(Ze,{name:e.showHeaderSeniorConfig?"el-zoom-in-top":"el-zoom-in-bottom"},{default:c(()=>[e.showHeaderSeniorConfig?(s(),y("div",kl,[m("div",wl,[d(N,{"label-width":140,label:n(r)("crud.crud.Table Quick Search Fields")},{default:c(()=>[d(b,{clearable:!0,multiple:!0,class:"w100",modelValue:e.table.quickSearchField,"onUpdate:modelValue":l[3]||(l[3]=a=>e.table.quickSearchField=a),placement:"bottom"},{default:c(()=>[(s(!0),y(C,null,P(e.fields,(a,u)=>(s(),p(v,{key:u+a.uuid,label:a.name+(a.comment?"-"+a.comment:a.title),value:a.uuid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),m("div",Vl,[d(N,{"label-width":140,class:"default-sort-field mr-20",label:n(r)("crud.crud.Table Default Sort Fields")},{default:c(()=>[d(b,{clearable:!0,modelValue:e.table.defaultSortField,"onUpdate:modelValue":l[4]||(l[4]=a=>e.table.defaultSortField=a),placement:"bottom"},{default:c(()=>[(s(!0),y(C,null,P(e.fields,(a,u)=>(s(),p(v,{key:u+a.uuid,label:a.name+(a.comment?"-"+a.comment:a.title),value:a.uuid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),d(g,{class:"default-sort-field-type",label:n(r)("crud.crud.sort order"),modelValue:e.table.defaultSortType,"onUpdate:modelValue":l[5]||(l[5]=a=>e.table.defaultSortType=a),type:"select","input-attr":{content:{desc:n(r)("crud.crud.sort order desc"),asc:n(r)("crud.crud.sort order asc")}}},null,8,["label","modelValue","input-attr"])]),d(N,{"label-width":140,label:n(r)("crud.crud.Fields as Table Columns")},{default:c(()=>[d(b,{clearable:!0,multiple:!0,class:"w100",modelValue:e.table.columnFields,"onUpdate:modelValue":l[6]||(l[6]=a=>e.table.columnFields=a),placement:"bottom"},{default:c(()=>[(s(!0),y(C,null,P(e.fields,(a,u)=>(s(),p(v,{key:u+a.uuid,label:a.name+(a.comment?"-"+a.comment:a.title),value:a.uuid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),d(N,{"label-width":140,label:n(r)("crud.crud.Fields as form items")},{default:c(()=>[d(b,{clearable:!0,multiple:!0,class:"w100",modelValue:e.table.formFields,"onUpdate:modelValue":l[7]||(l[7]=a=>e.table.formFields=a),placement:"bottom"},{default:c(()=>[(s(!0),y(C,null,P(e.fields,(a,u)=>(s(),p(v,{key:u+a.uuid,label:a.name+(a.comment?"-"+a.comment:a.title),value:a.uuid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),d(g,{label:n(r)("crud.crud.The relative path to the generated code"),modelValue:e.table.generateRelativePath,"onUpdate:modelValue":l[8]||(l[8]=a=>e.table.generateRelativePath=a),type:"string","label-width":140,"block-help":n(r)("crud.crud.For quick combination code generation location, please fill in the relative path"),"input-attr":{onChange:B}},null,8,["label","modelValue","block-help","input-attr"]),d(g,{label:n(r)("crud.crud.Generated Controller Location"),modelValue:e.table.controllerFile,"onUpdate:modelValue":l[9]||(l[9]=a=>e.table.controllerFile=a),type:"string","label-width":140},null,8,["label","modelValue"]),d(N,{label:n(r)("crud.crud.Generated Data Model Location"),"label-width":140},{default:c(()=>[d(Fe,{modelValue:e.table.modelFile,"onUpdate:modelValue":l[11]||(l[11]=a=>e.table.modelFile=a),type:"string"},{append:c(()=>[d(he,{onChange:qe,modelValue:e.table.isCommonModel,"onUpdate:modelValue":l[10]||(l[10]=a=>e.table.isCommonModel=a),label:n(r)("crud.crud.Common model"),size:"small","true-value":1,"false-value":0},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),d(g,{label:n(r)("crud.crud.Generated Validator Location"),modelValue:e.table.validateFile,"onUpdate:modelValue":l[12]||(l[12]=a=>e.table.validateFile=a),type:"string","label-width":140},null,8,["label","modelValue"]),d(g,{label:n(r)("crud.crud.WEB end view directory"),modelValue:e.table.webViewsDir,"onUpdate:modelValue":l[13]||(l[13]=a=>e.table.webViewsDir=a),type:"string","label-width":140},null,8,["label","modelValue"]),d(g,{label:n(r)("Database connection"),modelValue:e.table.databaseConnection,"onUpdate:modelValue":l[14]||(l[14]=a=>e.table.databaseConnection=a),type:"remoteSelect","label-width":140,"block-help":n(r)("Database connection help"),"input-attr":{pk:"key",field:"key",remoteUrl:n(rl)}},null,8,["label","modelValue","block-help","input-attr"])])])):S("",!0)]),_:1},8,["name"]),m("div",{onClick:l[15]||(l[15]=a=>e.showHeaderSeniorConfig=!e.showHeaderSeniorConfig),class:"header-senior-config"},[m("span",null,h(n(r)("crud.crud.Advanced Configuration")),1),d(Z,{class:"senior-config-arrow-icon",size:"14",color:"var(--el-text-color-primary)",name:e.showHeaderSeniorConfig?"el-icon-ArrowUp":"el-icon-ArrowDown"},null,8,["name"])])]),T((s(),p(f,{class:"fields-box",gutter:20},{default:c(()=>[d(le,{xs:24,span:6},{default:c(()=>[d(ze,{class:"field-collapse",modelValue:e.fieldCollapseName,"onUpdate:modelValue":l[16]||(l[16]=a=>e.fieldCollapseName=a)},{default:c(()=>[d(ee,{title:n(r)("crud.crud.Common Fields"),name:"common"},{default:c(()=>[m("div",{class:"field-box",ref:n(q).set},[(s(!0),y(C,null,P(n(U).common,(a,u)=>(s(),y("div",{key:u,class:"field-item"},[m("span",null,h(a.title),1)]))),128))],512)]),_:1},8,["title"]),d(ee,{title:n(r)("crud.crud.Base Fields"),name:"base"},{default:c(()=>[m("div",{class:"field-box",ref:n(q).set},[(s(!0),y(C,null,P(n(U).base,(a,u)=>(s(),y("div",{key:u,class:"field-item"},[m("span",null,h(a.title),1)]))),128))],512)]),_:1},8,["title"]),d(ee,{title:n(r)("crud.crud.Advanced Fields"),name:"senior"},{default:c(()=>[m("div",{class:"field-box",ref:n(q).set},[(s(!0),y(C,null,P(n(U).senior,(a,u)=>(s(),y("div",{key:u,class:"field-item"},[m("span",null,h(a.title),1)]))),128))],512)]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1}),d(le,{xs:24,span:12},{default:c(()=>[m("div",{ref_key:"designWindowRef",ref:se,class:"design-window ba-scroll-style"},[(s(!0),y(C,null,P(e.fields,(a,u)=>(s(),y("div",{key:u,class:el([u===e.activateField?"activate":"","design-field-box"]),onClick:V=>Ue(u),"data-id":u},[m("div",_l,[m("span",null,h(n(r)("crud.crud.Field Name"))+":",1),d(Te,{onPointerdown:l[17]||(l[17]=$(()=>{},["stop"])),class:"design-field-name-input","model-value":a.name,type:"string",attr:{size:"small",onInput:V=>H(V,u)}},null,8,["model-value","attr"])]),m("div",Tl,[m("span",null,h(n(r)("crud.crud.field comment"))+":",1),d(Te,{onPointerdown:l[18]||(l[18]=$(()=>{},["stop"])),class:"design-field-name-comment",modelValue:a.comment,"onUpdate:modelValue":V=>a.comment=V,type:"string",attr:{size:"small",onChange:pe}},null,8,["modelValue","onUpdate:modelValue","attr"])]),m("div",Nl,[["remoteSelect","remoteSelects"].includes(a.designType)?T((s(),p(i,{key:0,onClick:$(V=>Re(u,a),["stop"]),type:"primary",size:"small",circle:""},{default:c(()=>[d(Z,{color:"var(--el-color-white)",size:"15",name:"fa fa-pencil icon"})]),_:2},1032,["onClick"])),[[L]]):S("",!0),T((s(),p(i,{onClick:$(V=>me(u),["stop"]),type:"danger",size:"small",circle:""},{default:c(()=>[d(Z,{color:"var(--el-color-white)",size:"15",name:"fa fa-trash"})]),_:2},1032,["onClick"])),[[L]])])],10,Pl))),128)),!e.fields.length&&!e.draggingField?(s(),y("div",Dl,h(n(r)("crud.crud.Drag the left element here to start designing CRUD")),1)):S("",!0)],512)]),_:1}),d(le,{xs:24,span:6},{default:c(()=>[m("div",Ul,[e.activateField===-1?(s(),y("div",xl,h(n(r)("crud.crud.Please select a field from the left first")),1)):(s(),y("div",{key:"activate-field-"+e.activateField},[d(ve,{"label-position":"top"},{default:c(()=>[d(M,{"content-position":"left"},{default:c(()=>[w(h(n(r)("crud.crud.Common")),1)]),_:1}),d(N,{label:n(r)("crud.crud.Generate type")},{default:c(()=>[d(b,{onChange:l[19]||(l[19]=a=>xe(a)),class:"w100","model-value":e.fields[e.activateField].designType,placement:"bottom"},{default:c(()=>[(s(!0),y(C,null,P(n(Ne),(a,u)=>(s(),p(v,{key:u,label:a.name,value:u},null,8,["label","value"]))),128))]),_:1},8,["model-value"])]),_:1},8,["label"]),d(g,{label:n(r)("crud.crud.Field comments (CRUD dictionary)"),type:"textarea","input-attr":{rows:2,onChange:pe},placeholder:n(r)("crud.crud.The field comment will be used as the CRUD dictionary, and will be identified as the field title before the colon, and as the data dictionary after the colon"),modelValue:e.fields[e.activateField].comment,"onUpdate:modelValue":l[20]||(l[20]=a=>e.fields[e.activateField].comment=a)},null,8,["label","input-attr","placeholder","modelValue"]),d(M,{"content-position":"left"},{default:c(()=>[w(h(n(r)("crud.crud.Field Properties")),1)]),_:1}),d(g,{label:n(r)("crud.crud.Field Name"),type:"string","model-value":e.fields[e.activateField].name,"input-attr":{onInput:a=>H(a,e.activateField)}},null,8,["label","model-value","input-attr"]),e.fields[e.activateField].dataType?(s(),p(g,{key:0,label:n(r)("crud.crud.Field Type"),"input-attr":{onChange:_},type:"textarea",modelValue:e.fields[e.activateField].dataType,"onUpdate:modelValue":l[21]||(l[21]=a=>e.fields[e.activateField].dataType=a)},null,8,["label","input-attr","modelValue"])):(s(),y(C,{key:1},[d(g,{label:n(r)("crud.crud.Field Type"),"input-attr":{onChange:_},type:"string",modelValue:e.fields[e.activateField].type,"onUpdate:modelValue":l[22]||(l[22]=a=>e.fields[e.activateField].type=a)},null,8,["label","input-attr","modelValue"]),m("div",Ll,[d(g,{label:n(r)("crud.crud.length"),type:"number",modelValue:e.fields[e.activateField].length,"onUpdate:modelValue":l[23]||(l[23]=a=>e.fields[e.activateField].length=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"]),d(g,{label:n(r)("crud.crud.decimal point"),type:"number",modelValue:e.fields[e.activateField].precision,"onUpdate:modelValue":l[24]||(l[24]=a=>e.fields[e.activateField].precision=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"])])],64)),d(N,{label:n(r)("crud.crud.Field Defaults")},{default:c(()=>[d(b,{modelValue:e.fields[e.activateField].defaultType,"onUpdate:modelValue":l[25]||(l[25]=a=>e.fields[e.activateField].defaultType=a)},{default:c(()=>[d(v,{label:"手动输入",value:"INPUT"}),d(v,{label:"EMPTY STRING(空字符串)",value:"EMPTY STRING"}),d(v,{label:"NULL",value:"NULL"}),d(v,{label:"无(不设默认值)",value:"NONE"})]),_:1},8,["modelValue"]),e.fields[e.activateField].defaultType=="INPUT"?(s(),p(Fe,{key:0,placeholder:n(r)("crud.crud.Please input the default value"),type:"text",modelValue:e.fields[e.activateField].default,"onUpdate:modelValue":l[26]||(l[26]=a=>e.fields[e.activateField].default=a),onChange:_,class:"default-input"},null,8,["placeholder","modelValue"])):S("",!0)]),_:1},8,["label"]),m("div",Il,[d(g,{class:"form-item-position-right",label:n(r)("crud.state.Primary key"),type:"switch",modelValue:e.fields[e.activateField].primaryKey,"onUpdate:modelValue":l[27]||(l[27]=a=>e.fields[e.activateField].primaryKey=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"]),d(g,{class:"form-item-position-right",label:n(r)("crud.crud.Auto increment"),type:"switch",modelValue:e.fields[e.activateField].autoIncrement,"onUpdate:modelValue":l[28]||(l[28]=a=>e.fields[e.activateField].autoIncrement=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"])]),m("div",Rl,[d(g,{class:"form-item-position-right",label:n(r)("crud.crud.Unsigned"),type:"switch",modelValue:e.fields[e.activateField].unsigned,"onUpdate:modelValue":l[29]||(l[29]=a=>e.fields[e.activateField].unsigned=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"]),d(g,{class:"form-item-position-right",label:n(r)("crud.crud.Allow NULL"),type:"switch",modelValue:e.fields[e.activateField].null,"onUpdate:modelValue":l[30]||(l[30]=a=>e.fields[e.activateField].null=a),"input-attr":{onChange:_}},null,8,["label","modelValue","input-attr"])]),n(j)(e.fields[e.activateField].table)?S("",!0):(s(),y(C,{key:2},[d(M,{"content-position":"left"},{default:c(()=>[w(h(n(r)("crud.crud.Field Table Properties")),1)]),_:1}),(s(!0),y(C,null,P(e.fields[e.activateField].table,(a,u)=>(s(),p(g,{key:u,label:t.$t("crud.crud."+u),type:a.type,modelValue:e.fields[e.activateField].table[u].value,"onUpdate:modelValue":V=>e.fields[e.activateField].table[u].value=V,placeholder:e.fields[e.activateField].table[u].placeholder??"","input-attr":{content:e.fields[e.activateField].table[u].options??{},...e.fields[e.activateField].table[u].attr??{}}},null,8,["label","type","modelValue","onUpdate:modelValue","placeholder","input-attr"]))),128))],64)),n(j)(e.fields[e.activateField].form)?S("",!0):(s(),y(C,{key:3},[d(M,{"content-position":"left"},{default:c(()=>[w(h(n(r)("crud.crud.Field Form Properties")),1)]),_:1}),(s(!0),y(C,null,P(e.fields[e.activateField].form,(a,u)=>(s(),y(C,{key:u},[a.type!="hidden"?(s(),p(g,{key:0,label:t.$t("crud.crud."+u),type:a.type,modelValue:e.fields[e.activateField].form[u].value,"onUpdate:modelValue":V=>e.fields[e.activateField].form[u].value=V,placeholder:e.fields[e.activateField].form[u].placeholder??"","input-attr":{content:e.fields[e.activateField].form[u].options??{},...e.fields[e.activateField].form[u].attr??{}}},null,8,["label","type","modelValue","onUpdate:modelValue","placeholder","input-attr"])):S("",!0)],64))),128))],64))]),_:1})]))])]),_:1})]),_:1})),[[oe,e.loading.init]]),d(te,{onClose:ye,class:"ba-operate-dialog","model-value":e.remoteSelectPre.show,title:n(r)("crud.crud.Remote drop-down association information"),"close-on-click-modal":!1,"destroy-on-close":!0,onKeyup:ll(ge,["enter"])},{footer:c(()=>[m("div",El,[d(i,{onClick:ye},{default:c(()=>[w(h(t.$t("Cancel")),1)]),_:1}),T((s(),p(i,{onClick:ge,type:"primary"},{default:c(()=>[w(h(t.$t("Save")),1)]),_:1})),[[L]])])]),default:c(()=>[d(Se,{"max-height":"60vh"},{default:c(()=>[m("div",Al,[e.remoteSelectPre.index!=-1&&e.fields[e.remoteSelectPre.index]?T((s(),p(ve,{key:0,ref_key:"formRef",ref:O,model:e.remoteSelectPre.form,rules:Me,"label-position":"right","label-width":"160px"},{default:c(()=>[(s(),p(g,{label:n(r)("crud.crud.Associated Data Table"),modelValue:e.remoteSelectPre.form.table,"onUpdate:modelValue":l[31]||(l[31]=a=>e.remoteSelectPre.form.table=a),type:"remoteSelect",key:e.table.databaseConnection,"input-attr":{pk:"table",field:"comment",params:{connection:e.table.databaseConnection,samePrefix:1,excludeTable:["area","token","captcha","admin_group_access","config","admin_log","user_money_log","user_score_log"]},remoteUrl:n(il),onChange:Be},prop:"table"},null,8,["label","modelValue","input-attr"])),T((s(),y("div",null,[(s(),p(g,{prop:"pk",type:"select",label:n(r)("crud.crud.Drop down value field"),modelValue:e.remoteSelectPre.form.pk,"onUpdate:modelValue":l[32]||(l[32]=a=>e.remoteSelectPre.form.pk=a),placeholder:n(r)("crud.crud.Please select the value field of the select component"),key:"select-value"+JSON.stringify(e.remoteSelectPre.fieldList),"input-attr":{content:e.remoteSelectPre.fieldList}},null,8,["label","modelValue","placeholder","input-attr"])),(s(),p(g,{prop:"label",type:"select",label:n(r)("crud.crud.Drop down label field"),modelValue:e.remoteSelectPre.form.label,"onUpdate:modelValue":l[33]||(l[33]=a=>e.remoteSelectPre.form.label=a),placeholder:n(r)("crud.crud.Please select the label field of the select component"),key:"select-label"+JSON.stringify(e.remoteSelectPre.fieldList),"input-attr":{content:e.remoteSelectPre.fieldList}},null,8,["label","modelValue","placeholder","input-attr"])),e.fields[e.remoteSelectPre.index].designType=="remoteSelect"?(s(),p(g,{prop:"joinField",type:"selects",label:n(r)("crud.crud.Fields displayed in the table"),modelValue:e.remoteSelectPre.form.joinField,"onUpdate:modelValue":l[34]||(l[34]=a=>e.remoteSelectPre.form.joinField=a),placeholder:n(r)("crud.crud.Please select the fields displayed in the table"),key:"join-field"+JSON.stringify(e.remoteSelectPre.fieldList),"input-attr":{content:e.remoteSelectPre.fieldList}},null,8,["label","modelValue","placeholder","input-attr"])):S("",!0),d(g,{label:n(r)("crud.crud.Data source configuration type"),modelValue:e.remoteSelectPre.form.sourceConfigType,"onUpdate:modelValue":l[35]||(l[35]=a=>e.remoteSelectPre.form.sourceConfigType=a),type:"radio","input-attr":{border:!0,content:{crud:n(r)("crud.crud.Fast configuration with generated controllers and models"),custom:n(r)("crud.crud.Custom configuration")}}},null,8,["label","modelValue","input-attr"]),e.remoteSelectPre.form.sourceConfigType=="crud"?(s(),p(g,{prop:"controllerFile",type:"select",label:n(r)("crud.crud.Controller position"),modelValue:e.remoteSelectPre.form.controllerFile,"onUpdate:modelValue":l[36]||(l[36]=a=>e.remoteSelectPre.form.controllerFile=a),placeholder:n(r)("crud.crud.Please select the controller of the data table"),key:"controller-file"+JSON.stringify(e.remoteSelectPre.controllerFileList),"input-attr":{content:e.remoteSelectPre.controllerFileList},"block-help":n(r)("crud.crud.The remote pull-down will request the corresponding controller to obtain data, so it is recommended that you create the CRUD of the associated table")},null,8,["label","modelValue","placeholder","input-attr","block-help"])):S("",!0),(s(),p(g,{prop:e.remoteSelectPre.form.sourceConfigType=="crud"?"modelFile":"",type:"select",label:n(r)("crud.crud.Data Model Location"),modelValue:e.remoteSelectPre.form.modelFile,"onUpdate:modelValue":l[37]||(l[37]=a=>e.remoteSelectPre.form.modelFile=a),placeholder:n(r)("crud.crud.Please select the data model location of the data table"),key:"model-file"+JSON.stringify(e.remoteSelectPre.modelFileList),"input-attr":{content:e.remoteSelectPre.modelFileList},"block-help":e.remoteSelectPre.form.sourceConfigType=="crud"?"":n(r)("crud.crud.If it is left blank, the model of the associated table will be generated automatically If the table already has a model, it is recommended to select it to avoid repeated generation")},null,8,["prop","label","modelValue","placeholder","input-attr","block-help"])),e.table.databaseConnection&&e.remoteSelectPre.form.modelFile?(s(),p(N,{key:2,label:n(r)("Database connection")},{default:c(()=>[d(Oe,{size:"large",type:"danger"},{default:c(()=>[w(h(e.table.databaseConnection),1)]),_:1}),m("div",Kl,[m("div",null,h(n(r)("crud.crud.Check model class",{connection:e.table.databaseConnection})),1),m("div",null,h(n(r)("crud.crud.There is no connection attribute in model class")),1)])]),_:1},8,["label"])):S("",!0),e.remoteSelectPre.form.sourceConfigType=="custom"?(s(),p(g,{key:3,prop:"remoteUrl",label:n(r)("crud.crud.api url"),type:"string",modelValue:e.remoteSelectPre.form.remoteUrl,"onUpdate:modelValue":l[38]||(l[38]=a=>e.remoteSelectPre.form.remoteUrl=a),placeholder:n(r)("crud.crud.api url example")},null,8,["label","modelValue","placeholder"])):S("",!0),e.remoteSelectPre.form.sourceConfigType=="custom"?(s(),p(g,{key:4,label:n(r)("crud.crud.remote-primary-table-alias"),type:"string",modelValue:e.remoteSelectPre.form.primaryTableAlias,"onUpdate:modelValue":l[39]||(l[39]=a=>e.remoteSelectPre.form.primaryTableAlias=a),"block-help":n(r)("crud.crud.If the remote interface query involves associated query of multiple tables, enter the alias of the primary data table here")},{append:c(()=>[w("."+h(e.remoteSelectPre.form.pk),1)]),_:1},8,["label","modelValue","block-help"])):S("",!0),d(N,{label:n(r)("Reminder")},{default:c(()=>[m("div",Gl,h(n(r)("crud.crud.Design remote select tips")),1)]),_:1},8,["label"])])),[[oe,e.loading.remoteSelect]])]),_:1},8,["model","rules"])),[[oe,e.remoteSelectPre.loading]]):S("",!0)])]),_:1})]),_:1},8,["model-value","title"]),d(te,{onClose:J,class:"ba-operate-dialog confirm-generate-dialog","model-value":e.confirmGenerate.show,title:n(r)("crud.crud.Confirm CRUD code generation")},{footer:c(()=>[m("div",Bl,[d(i,{onClick:J},{default:c(()=>[w(h(t.$t("Cancel")),1)]),_:1}),T((s(),p(i,{loading:e.loading.generate,onClick:W,type:"primary"},{default:c(()=>[w(h(n(r)("crud.crud.Continue building")),1)]),_:1},8,["loading"])),[[L]])])]),default:c(()=>[m("div",ql,[e.confirmGenerate.controller?(s(),p(ae,{key:0,title:n(r)("crud.crud.The controller already exists Continuing to generate will automatically overwrite the existing code!"),center:"",type:"error"},null,8,["title"])):S("",!0),fe()?(s(),p(ae,{key:1,title:n(r)("crud.crud.The data table already exists Continuing to generate will automatically delete the original table and create a new one!"),class:"mt-10",center:"",type:"error"},null,8,["title"])):S("",!0),e.confirmGenerate.menu?(s(),p(ae,{key:2,title:n(r)("crud.crud.The menu rule with the same name already exists The menu and permission node will not be created in this generation"),class:"mt-10",center:"",type:"error"},null,8,["title"])):S("",!0)])]),_:1},8,["model-value","title"]),d(te,{class:"ba-operate-dialog design-change-log-dialog",width:"20%",modelValue:e.showDesignChangeLog,"onUpdate:modelValue":l[42]||(l[42]=a=>e.showDesignChangeLog=a)},{header:c(()=>[T((s(),y("div",null,[w(h(n(r)("crud.crud.Data table design changes preview")),1)])),[[Je,[".design-change-log-dialog",".el-dialog__header"]]])]),footer:c(()=>[m("div",zl,[d(i,{onClick:l[41]||(l[41]=a=>e.showDesignChangeLog=!1)},{default:c(()=>[w(h(n(r)("Confirm")),1)]),_:1})])]),default:c(()=>[d(Se,{"max-height":"400px"},{default:c(()=>[e.table.designChange.length?(s(),y(C,{key:0},[d(Ye,{class:"design-change-log-timeline"},{default:c(()=>[(s(!0),y(C,null,P(e.table.designChange,(a,u)=>(s(),p(He,{key:u,type:je(a.type),hollow:!0,"hide-timestamp":!0},{default:c(()=>[m("div",Ml,[d(he,{modelValue:a.sync,"onUpdate:modelValue":V=>a.sync=V,label:$e(a),size:"small"},null,8,["modelValue","onUpdate:modelValue","label"])])]),_:2},1032,["type"]))),128))]),_:1}),m("span",$l,h(n(r)("crud.crud.designChangeTips")),1)],64)):(s(),y("div",jl,"暂无表设计变更")),d(g,{label:n(r)("crud.crud.tableReBuild"),class:"rebuild-form-item",modelValue:e.table.rebuild,"onUpdate:modelValue":l[40]||(l[40]=a=>e.table.rebuild=a),type:"radio","input-attr":{border:!0,content:{No:n(r)("crud.crud.No"),Yes:n(r)("crud.crud.Yes")}},"block-help":n(r)("crud.crud.tableReBuildBlockHelp")},null,8,["label","modelValue","input-attr","block-help"])]),_:1})]),_:1},8,["modelValue"])])}}}),at=dl(Ol,[["__scopeId","data-v-578789f2"]]);export{at as default}; diff --git a/public/assets/domainStatus-Dsjiy17z.js b/public/assets/domainStatus-Cbp3s0ew.js similarity index 98% rename from public/assets/domainStatus-Dsjiy17z.js rename to public/assets/domainStatus-Cbp3s0ew.js index b50696a..8397301 100644 --- a/public/assets/domainStatus-Dsjiy17z.js +++ b/public/assets/domainStatus-Cbp3s0ew.js @@ -1,4 +1,4 @@ -import{x as j,_ as F}from"./index-fNs72j9w.js";import{B as O,a as H,b as u,o as J,_ as W,D as f,G as a,U as i,u as r,H as d,P as p,Z as k,Y as I,O as $,W as G,I as _,X as P,a0 as R,C as c,V as b,ah as h}from"./vue-DweYBrEc.js";import{d as X,s as Y}from"./embed-B0Gwp2fv.js";const Z={class:"default-main domain-status-page"},q={class:"setting-grid"},K={class:"panel setting-panel"},Q={class:"panel-title"},ee={class:"panel-body setting-form"},oe={class:"form-row"},te={class:"form-row textarea-row"},ae={class:"form-row template-row"},le={class:"color-grid"},ne={class:"panel embed-panel"},se={class:"panel-title"},ie={class:"panel-body"},re={class:"panel domain-panel"},de={class:"panel-title"},me={class:"domain-list"},w=`{ +import{x as j,_ as F}from"./index-BIzd9_wD.js";import{B as O,a as H,b as u,o as J,_ as W,D as f,G as a,U as i,u as r,H as d,P as p,Z as k,Y as I,O as $,W as G,I as _,X as P,a0 as R,C as c,V as b,ah as h}from"./vue-DweYBrEc.js";import{d as X,s as Y}from"./embed-DFo9NHr7.js";const Z={class:"default-main domain-status-page"},q={class:"setting-grid"},K={class:"panel setting-panel"},Q={class:"panel-title"},ee={class:"panel-body setting-form"},oe={class:"form-row"},te={class:"form-row textarea-row"},ae={class:"form-row template-row"},le={class:"color-grid"},ne={class:"panel embed-panel"},se={class:"panel-title"},ie={class:"panel-body"},re={class:"panel domain-panel"},de={class:"panel-title"},me={class:"domain-list"},w=`{ "hideDomain": [ "domain1.com", "domain2.com" diff --git a/public/assets/embed-B0Gwp2fv.js b/public/assets/embed-DFo9NHr7.js similarity index 93% rename from public/assets/embed-B0Gwp2fv.js rename to public/assets/embed-DFo9NHr7.js index de6a02c..25b7ffa 100644 --- a/public/assets/embed-B0Gwp2fv.js +++ b/public/assets/embed-DFo9NHr7.js @@ -1 +1 @@ -import{c as t}from"./index-fNs72j9w.js";function a(e){return t({url:"/admin/embed.Embed/gameRtp",method:"get",params:e})}function m(e){return t({url:"/admin/embed.Embed/addGame",method:"post",data:e},{showSuccessMessage:!0})}function d(e){return t({url:"/admin/embed.Embed/editGame",method:"post",data:e},{showSuccessMessage:!0})}function r(e){return t({url:"/admin/embed.Embed/del",method:"post",data:e},{showSuccessMessage:!0})}function n(e){return t({url:"/admin/embed.Embed/saveGameRtp",method:"post",data:e},{showSuccessMessage:!0})}function u(){return t({url:"/admin/embed.Embed/domainStatus",method:"get"})}function o(e){return t({url:"/admin/embed.Embed/saveDomain",method:"post",data:e},{showSuccessMessage:!0})}function i(){return t({url:"/admin/embed.Embed/partnership",method:"get"})}function c(e){return t({url:"/admin/embed.Embed/savePartnershipSet",method:"post",data:e},{showSuccessMessage:!0})}export{n as a,m as b,r as c,u as d,d as e,c as f,a as g,i as p,o as s}; +import{c as t}from"./index-BIzd9_wD.js";function a(e){return t({url:"/admin/embed.Embed/gameRtp",method:"get",params:e})}function m(e){return t({url:"/admin/embed.Embed/addGame",method:"post",data:e},{showSuccessMessage:!0})}function d(e){return t({url:"/admin/embed.Embed/editGame",method:"post",data:e},{showSuccessMessage:!0})}function r(e){return t({url:"/admin/embed.Embed/del",method:"post",data:e},{showSuccessMessage:!0})}function n(e){return t({url:"/admin/embed.Embed/saveGameRtp",method:"post",data:e},{showSuccessMessage:!0})}function u(){return t({url:"/admin/embed.Embed/domainStatus",method:"get"})}function o(e){return t({url:"/admin/embed.Embed/saveDomain",method:"post",data:e},{showSuccessMessage:!0})}function i(){return t({url:"/admin/embed.Embed/partnership",method:"get"})}function c(e){return t({url:"/admin/embed.Embed/savePartnershipSet",method:"post",data:e},{showSuccessMessage:!0})}export{n as a,m as b,r as c,u as d,d as e,c as f,a as g,i as p,o as s}; diff --git a/public/assets/footer-BVqCE-pu.js b/public/assets/footer-CcT0pnWv.js similarity index 96% rename from public/assets/footer-BVqCE-pu.js rename to public/assets/footer-CcT0pnWv.js index ded83b3..f370748 100644 --- a/public/assets/footer-BVqCE-pu.js +++ b/public/assets/footer-CcT0pnWv.js @@ -1 +1 @@ -import{D as J,_ as O}from"./darkSwitch-CMn1l1Tk.js";import{p as Y,B as F,I as h,X as j,C as a,D as L,Y as q,Z as B,u as n,_ as R,O as l,P as r,H as p,W as b,V as M,U as f,$ as H,N as K,a0 as G,a as Q,a1 as X,G as k,n as ee}from"./vue-DweYBrEc.js";import{d as ne,r as te,b as Z,u as V,a as T,c as oe,s as ae,_ as A,e as se,l as re,f as le,g as ie,h as ue}from"./index-fNs72j9w.js";import{h as ce,o as P}from"./router-BSeika6K.js";import{t as de}from"./useDark-DHNZxxpN.js";const me="/api/index/";function fe($,y){ne(()=>{if(te.currentRoute.value.meta.initialize===!1)return;const c=Z(),s=V();if(!c.isLogin()&&s.initialize||c.isLogin()&&s.userInitialize)return;const d=T();oe({url:me+"index",method:"get",params:{requiredLogin:y?1:0}}).then(t=>{ce(t.data.rules,t.data.menus),s.dataFill(t.data.site),d.setStatus(t.data.openMemberCenter),Y(t.data.userInfo)||(c.dataFill(t.data.userInfo),s.setUserInitialize(!0)),t.data.openMemberCenter||d.setLayoutMode("Disable"),s.setInitialize(!0),ae(),typeof $=="function"&&$(t)})},200)()}const pe=F({__name:"menuSub",props:{menus:{default:()=>[]},showIcon:{type:Boolean,default:!1}},setup($){const y=$,c=s=>{var d;s.path=="/"||((d=s.meta)==null?void 0:d.type)=="menu_dir"||P(s)};return(s,d)=>{const t=h("Icon"),_=h("el-sub-menu"),U=h("el-menu-item"),g=j("blur");return a(!0),L(B,null,q(y.menus,(u,D)=>{var x,C;return a(),L(B,{key:D},[n(Y)(u.children)?R((a(),l(U,{key:1,onClick:m=>n(P)(u),index:"column-"+((C=u.meta)==null?void 0:C.id),class:H(u.name.replace(/[\/]/g,"-"))},{title:r(()=>{var m;return[M(f((m=u.meta)==null?void 0:m.title),1)]}),default:r(()=>{var m;return[s.showIcon?(a(),l(t,{key:0,name:(m=u.meta)==null?void 0:m.icon,color:"var(--el-text-color-primary)"},null,8,["name"])):b("",!0)]}),_:2},1032,["onClick","index","class"])),[[g]]):R((a(),l(_,{key:0,onClick:m=>c(u),index:`column-${(x=u.meta)==null?void 0:x.id}`},{title:r(()=>{var m,S;return[s.showIcon?(a(),l(t,{key:0,name:(m=u.meta)==null?void 0:m.icon,color:"var(--el-text-color-primary)"},null,8,["name"])):b("",!0),M(" "+f((S=u.meta)==null?void 0:S.title),1)]}),default:r(()=>[p(E,{menus:u.children,"show-icon":s.showIcon},null,8,["menus","show-icon"])]),_:2},1032,["onClick","index"])),[[g]])],64)}),128)}}}),E=A(pe,[["__scopeId","data-v-46fce36e"]]),he={class:"header-user-box"},ve=["src"],_e=F({__name:"menu",props:{showIcon:{type:Boolean,default:!1}},setup($){const y=K(),c=G(),s=se(),d=Z(),t=V(),_=T(),U=$,g=Q({activeMenu:""}),u=e=>{if(e.path=="/")return g.activeMenu="index";const o=S(e);o?g.activeMenu="column-"+o:e.path.startsWith("/user")&&(g.activeMenu="user")},D=e=>{if(x(t.headNav,e)||x(_.state.navUserMenus,e)||x(_.state.viewRoutes,e)){const o=g.activeMenu;g.activeMenu="",ee(()=>{g.activeMenu=o})}},x=(e,o)=>o.indexOf("language-switch")===0||o=="theme-switch"?!0:C(e,o),C=(e,o)=>{var i,w,N;for(const v in e){if(`column-${(i=e[v].meta)==null?void 0:i.id}`==o)return((w=e[v].meta)==null?void 0:w.menu_type)=="link";if((N=e[v].children)!=null&&N.length)return C(e[v].children,o)}return!1},m=(e,o)=>{var w,N;let i=!1;for(const v in e){if((w=e[v].meta)!=null&&w.id&&e[v].path==o.fullPath)return e[v].meta.id;if(e[v].children&&((N=e[v].children)!=null&&N.length)&&(i=m(e[v].children,o),i!==!1))return i}return i},S=e=>{const o=m(t.headNav,e);if(o!==!1)return o;const i=m(_.state.navUserMenus,e);return i!==!1?i:m(_.state.viewRoutes,e)};return u(y),X(e=>{u(e)}),(e,o)=>{const i=h("Icon"),w=h("el-menu-item"),N=h("el-sub-menu"),v=h("el-menu"),z=j("blur");return a(),l(v,{ref_key:"layoutMenuRef",ref:re,"default-active":g.activeMenu,onSelect:D},{default:r(()=>[R((a(),l(w,{onClick:o[0]||(o[0]=I=>n(c).push({name:"/"})),index:"index"},{title:r(()=>[M(f(e.$t("Home")),1)]),default:r(()=>[U.showIcon?(a(),l(i,{key:0,name:"fa fa-home",color:"var(--el-text-color-primary)"})):b("",!0)]),_:1})),[[z]]),p(E,{menus:n(t).headNav,"show-icon":e.showIcon},null,8,["menus","show-icon"]),n(_).state.open?(a(),L(B,{key:0},[n(d).isLogin()?R((a(),l(N,{key:0,onClick:o[3]||(o[3]=I=>e.$attrs.mode=="vertical"?"":n(c).push({name:"user"})),index:"user-box"},{title:r(()=>[k("div",he,[k("img",{class:H(["header-user-avatar",e.$attrs.mode=="vertical"?"icon-header-user-avatar":""]),src:n(le)(n(d).avatar?n(d).avatar:"/static/images/avatar.png"),alt:""},null,10,ve),M(" "+f(n(d).nickname),1)])]),default:r(()=>[R((a(),l(w,{onClick:o[1]||(o[1]=I=>n(c).push({name:"user"})),index:"user"},{default:r(()=>[e.showIcon?(a(),l(i,{key:0,name:"fa fa-user-circle",color:"var(--el-text-color-primary)"})):b("",!0),M(" "+f(e.$t("Member Center")),1)]),_:1})),[[z]]),p(E,{menus:n(_).state.navUserMenus,"show-icon":e.showIcon},null,8,["menus","show-icon"]),p(E,{menus:n(_).state.viewRoutes,"show-icon":e.showIcon},null,8,["menus","show-icon"]),R((a(),l(w,{onClick:o[2]||(o[2]=I=>n(d).logout()),index:"user-logout"},{default:r(()=>[e.showIcon?(a(),l(i,{key:0,name:"fa fa-sign-out",color:"var(--el-text-color-primary)"})):b("",!0),M(" "+f(e.$t("Logout login")),1)]),_:1})),[[z]])]),_:1})),[[z]]):R((a(),l(w,{key:1,onClick:o[4]||(o[4]=I=>n(c).push({name:"user"})),index:"user"},{default:r(()=>[e.showIcon?(a(),l(i,{key:0,name:"fa fa-user-circle",color:"var(--el-text-color-primary)"})):b("",!0),M(" "+f(e.$t("Member Center")),1)]),_:1})),[[z]]),R((a(),l(N,{index:"language-switch",class:"language-switch"},{title:r(()=>[e.showIcon?(a(),l(i,{key:0,name:"local-lang",color:"var(--el-text-color-primary)"})):b("",!0),M(" "+f(e.$t("Language")),1)]),default:r(()=>[(a(!0),L(B,null,q(n(s).lang.langArray,I=>(a(),l(w,{onClick:be=>n(ie)(I.name),key:I.name,index:"language-switch-"+I.value,class:"language-switch"},{default:r(()=>[e.showIcon?(a(),l(i,{key:0,name:"fa fa-circle-o",color:"var(--el-text-color-primary)"})):b("",!0),M(" "+f(I.value),1)]),_:2},1032,["onClick","index"]))),128))]),_:1})),[[z]]),p(w,{index:"theme-switch",class:H(["theme-switch",e.$attrs.mode+"-theme-switch"])},{default:r(()=>[p(J,{onClick:o[5]||(o[5]=I=>n(de)())})]),_:1},8,["class"])],64)):b("",!0)]),_:1},8,["default-active"])}}}),W=A(_e,[["__scopeId","data-v-0f4fb637"]]),ge={class:"site-name"},we={class:"header-row"},ke={class:"site-name"},ye=F({__name:"header",setup($){const y=G(),c=V(),s=T();return X(()=>{s.toggleMenuExpand(!1)}),fe(),(d,t)=>{const _=h("Icon"),U=h("el-scrollbar"),g=h("el-col"),u=h("el-row"),D=h("el-drawer"),x=h("el-header");return a(),l(x,{class:"header"},{default:r(()=>[p(u,{justify:"center"},{default:r(()=>[p(g,{class:"header-row",xs:24,sm:24,md:16},{default:r(()=>[k("div",{onClick:t[0]||(t[0]=C=>n(y).push({name:"/"})),class:"header-logo"},[t[5]||(t[5]=k("img",{src:O},null,-1)),k("span",ge,f(n(c).siteName),1)]),n(s).state.menuExpand?b("",!0):(a(),L("div",{key:0,onClick:t[1]||(t[1]=C=>n(s).toggleMenuExpand(!0)),class:"user-menus-expand hidden-md-and-up"},[p(_,{name:"fa fa-indent",color:"var(--el-color-primary)",size:"20"})])),p(U,{ref_key:"layoutMenuScrollbarRef",ref:ue,class:"hidden-sm-and-down"},{default:r(()=>[p(W,{class:"frontend-header-menu",ellipsis:!1,mode:"horizontal"})]),_:1},512)]),_:1})]),_:1}),p(D,{class:"ba-aside-drawer","append-to-body":!0,modelValue:n(s).state.menuExpand,"onUpdate:modelValue":t[4]||(t[4]=C=>n(s).state.menuExpand=C),"with-header":!1,direction:"ltr",size:n(s).state.shrink?"70%":"40%"},{default:r(()=>[k("div",we,[k("div",{onClick:t[2]||(t[2]=C=>n(y).push({name:"/"})),class:"header-logo"},[t[6]||(t[6]=k("img",{src:O},null,-1)),k("span",ke,f(n(c).siteName),1)]),k("div",{onClick:t[3]||(t[3]=C=>n(s).toggleMenuExpand(!1)),class:"user-menus-expand hidden-md-and-up"},[p(_,{name:"fa fa-dedent",color:"var(--el-color-primary)",size:"20"})])]),p(W,{"show-icon":!0,mode:"vertical"})]),_:1},8,["modelValue","size"])]),_:1})}}}),ze=A(ye,[["__scopeId","data-v-47a66cae"]]),Ce={href:"http://beian.miit.gov.cn/"},Ie=F({__name:"footer",setup($){const y=V();return(c,s)=>{const d=h("el-footer");return a(),l(d,{class:"footer"},{default:r(()=>[k("div",null,[M(" Copyright @ 2020~"+f(new Date().getFullYear())+" "+f(n(y).siteName)+" "+f(c.$t("Copyright"))+" ",1),k("a",Ce,f(n(y).recordNumber),1)])]),_:1})}}}),Ue=A(Ie,[["__scopeId","data-v-ff7303bf"]]);export{Ue as F,ze as H,fe as i}; +import{D as J,_ as O}from"./darkSwitch-BvKBTcdV.js";import{p as Y,B as F,I as h,X as j,C as a,D as L,Y as q,Z as B,u as n,_ as R,O as l,P as r,H as p,W as b,V as M,U as f,$ as H,N as K,a0 as G,a as Q,a1 as X,G as k,n as ee}from"./vue-DweYBrEc.js";import{d as ne,r as te,b as Z,u as V,a as T,c as oe,s as ae,_ as A,e as se,l as re,f as le,g as ie,h as ue}from"./index-BIzd9_wD.js";import{h as ce,o as P}from"./router-pzoktSrS.js";import{t as de}from"./useDark-B4Meiz4f.js";const me="/api/index/";function fe($,y){ne(()=>{if(te.currentRoute.value.meta.initialize===!1)return;const c=Z(),s=V();if(!c.isLogin()&&s.initialize||c.isLogin()&&s.userInitialize)return;const d=T();oe({url:me+"index",method:"get",params:{requiredLogin:y?1:0}}).then(t=>{ce(t.data.rules,t.data.menus),s.dataFill(t.data.site),d.setStatus(t.data.openMemberCenter),Y(t.data.userInfo)||(c.dataFill(t.data.userInfo),s.setUserInitialize(!0)),t.data.openMemberCenter||d.setLayoutMode("Disable"),s.setInitialize(!0),ae(),typeof $=="function"&&$(t)})},200)()}const pe=F({__name:"menuSub",props:{menus:{default:()=>[]},showIcon:{type:Boolean,default:!1}},setup($){const y=$,c=s=>{var d;s.path=="/"||((d=s.meta)==null?void 0:d.type)=="menu_dir"||P(s)};return(s,d)=>{const t=h("Icon"),_=h("el-sub-menu"),U=h("el-menu-item"),g=j("blur");return a(!0),L(B,null,q(y.menus,(u,D)=>{var x,C;return a(),L(B,{key:D},[n(Y)(u.children)?R((a(),l(U,{key:1,onClick:m=>n(P)(u),index:"column-"+((C=u.meta)==null?void 0:C.id),class:H(u.name.replace(/[\/]/g,"-"))},{title:r(()=>{var m;return[M(f((m=u.meta)==null?void 0:m.title),1)]}),default:r(()=>{var m;return[s.showIcon?(a(),l(t,{key:0,name:(m=u.meta)==null?void 0:m.icon,color:"var(--el-text-color-primary)"},null,8,["name"])):b("",!0)]}),_:2},1032,["onClick","index","class"])),[[g]]):R((a(),l(_,{key:0,onClick:m=>c(u),index:`column-${(x=u.meta)==null?void 0:x.id}`},{title:r(()=>{var m,S;return[s.showIcon?(a(),l(t,{key:0,name:(m=u.meta)==null?void 0:m.icon,color:"var(--el-text-color-primary)"},null,8,["name"])):b("",!0),M(" "+f((S=u.meta)==null?void 0:S.title),1)]}),default:r(()=>[p(E,{menus:u.children,"show-icon":s.showIcon},null,8,["menus","show-icon"])]),_:2},1032,["onClick","index"])),[[g]])],64)}),128)}}}),E=A(pe,[["__scopeId","data-v-46fce36e"]]),he={class:"header-user-box"},ve=["src"],_e=F({__name:"menu",props:{showIcon:{type:Boolean,default:!1}},setup($){const y=K(),c=G(),s=se(),d=Z(),t=V(),_=T(),U=$,g=Q({activeMenu:""}),u=e=>{if(e.path=="/")return g.activeMenu="index";const o=S(e);o?g.activeMenu="column-"+o:e.path.startsWith("/user")&&(g.activeMenu="user")},D=e=>{if(x(t.headNav,e)||x(_.state.navUserMenus,e)||x(_.state.viewRoutes,e)){const o=g.activeMenu;g.activeMenu="",ee(()=>{g.activeMenu=o})}},x=(e,o)=>o.indexOf("language-switch")===0||o=="theme-switch"?!0:C(e,o),C=(e,o)=>{var i,w,N;for(const v in e){if(`column-${(i=e[v].meta)==null?void 0:i.id}`==o)return((w=e[v].meta)==null?void 0:w.menu_type)=="link";if((N=e[v].children)!=null&&N.length)return C(e[v].children,o)}return!1},m=(e,o)=>{var w,N;let i=!1;for(const v in e){if((w=e[v].meta)!=null&&w.id&&e[v].path==o.fullPath)return e[v].meta.id;if(e[v].children&&((N=e[v].children)!=null&&N.length)&&(i=m(e[v].children,o),i!==!1))return i}return i},S=e=>{const o=m(t.headNav,e);if(o!==!1)return o;const i=m(_.state.navUserMenus,e);return i!==!1?i:m(_.state.viewRoutes,e)};return u(y),X(e=>{u(e)}),(e,o)=>{const i=h("Icon"),w=h("el-menu-item"),N=h("el-sub-menu"),v=h("el-menu"),z=j("blur");return a(),l(v,{ref_key:"layoutMenuRef",ref:re,"default-active":g.activeMenu,onSelect:D},{default:r(()=>[R((a(),l(w,{onClick:o[0]||(o[0]=I=>n(c).push({name:"/"})),index:"index"},{title:r(()=>[M(f(e.$t("Home")),1)]),default:r(()=>[U.showIcon?(a(),l(i,{key:0,name:"fa fa-home",color:"var(--el-text-color-primary)"})):b("",!0)]),_:1})),[[z]]),p(E,{menus:n(t).headNav,"show-icon":e.showIcon},null,8,["menus","show-icon"]),n(_).state.open?(a(),L(B,{key:0},[n(d).isLogin()?R((a(),l(N,{key:0,onClick:o[3]||(o[3]=I=>e.$attrs.mode=="vertical"?"":n(c).push({name:"user"})),index:"user-box"},{title:r(()=>[k("div",he,[k("img",{class:H(["header-user-avatar",e.$attrs.mode=="vertical"?"icon-header-user-avatar":""]),src:n(le)(n(d).avatar?n(d).avatar:"/static/images/avatar.png"),alt:""},null,10,ve),M(" "+f(n(d).nickname),1)])]),default:r(()=>[R((a(),l(w,{onClick:o[1]||(o[1]=I=>n(c).push({name:"user"})),index:"user"},{default:r(()=>[e.showIcon?(a(),l(i,{key:0,name:"fa fa-user-circle",color:"var(--el-text-color-primary)"})):b("",!0),M(" "+f(e.$t("Member Center")),1)]),_:1})),[[z]]),p(E,{menus:n(_).state.navUserMenus,"show-icon":e.showIcon},null,8,["menus","show-icon"]),p(E,{menus:n(_).state.viewRoutes,"show-icon":e.showIcon},null,8,["menus","show-icon"]),R((a(),l(w,{onClick:o[2]||(o[2]=I=>n(d).logout()),index:"user-logout"},{default:r(()=>[e.showIcon?(a(),l(i,{key:0,name:"fa fa-sign-out",color:"var(--el-text-color-primary)"})):b("",!0),M(" "+f(e.$t("Logout login")),1)]),_:1})),[[z]])]),_:1})),[[z]]):R((a(),l(w,{key:1,onClick:o[4]||(o[4]=I=>n(c).push({name:"user"})),index:"user"},{default:r(()=>[e.showIcon?(a(),l(i,{key:0,name:"fa fa-user-circle",color:"var(--el-text-color-primary)"})):b("",!0),M(" "+f(e.$t("Member Center")),1)]),_:1})),[[z]]),R((a(),l(N,{index:"language-switch",class:"language-switch"},{title:r(()=>[e.showIcon?(a(),l(i,{key:0,name:"local-lang",color:"var(--el-text-color-primary)"})):b("",!0),M(" "+f(e.$t("Language")),1)]),default:r(()=>[(a(!0),L(B,null,q(n(s).lang.langArray,I=>(a(),l(w,{onClick:be=>n(ie)(I.name),key:I.name,index:"language-switch-"+I.value,class:"language-switch"},{default:r(()=>[e.showIcon?(a(),l(i,{key:0,name:"fa fa-circle-o",color:"var(--el-text-color-primary)"})):b("",!0),M(" "+f(I.value),1)]),_:2},1032,["onClick","index"]))),128))]),_:1})),[[z]]),p(w,{index:"theme-switch",class:H(["theme-switch",e.$attrs.mode+"-theme-switch"])},{default:r(()=>[p(J,{onClick:o[5]||(o[5]=I=>n(de)())})]),_:1},8,["class"])],64)):b("",!0)]),_:1},8,["default-active"])}}}),W=A(_e,[["__scopeId","data-v-0f4fb637"]]),ge={class:"site-name"},we={class:"header-row"},ke={class:"site-name"},ye=F({__name:"header",setup($){const y=G(),c=V(),s=T();return X(()=>{s.toggleMenuExpand(!1)}),fe(),(d,t)=>{const _=h("Icon"),U=h("el-scrollbar"),g=h("el-col"),u=h("el-row"),D=h("el-drawer"),x=h("el-header");return a(),l(x,{class:"header"},{default:r(()=>[p(u,{justify:"center"},{default:r(()=>[p(g,{class:"header-row",xs:24,sm:24,md:16},{default:r(()=>[k("div",{onClick:t[0]||(t[0]=C=>n(y).push({name:"/"})),class:"header-logo"},[t[5]||(t[5]=k("img",{src:O},null,-1)),k("span",ge,f(n(c).siteName),1)]),n(s).state.menuExpand?b("",!0):(a(),L("div",{key:0,onClick:t[1]||(t[1]=C=>n(s).toggleMenuExpand(!0)),class:"user-menus-expand hidden-md-and-up"},[p(_,{name:"fa fa-indent",color:"var(--el-color-primary)",size:"20"})])),p(U,{ref_key:"layoutMenuScrollbarRef",ref:ue,class:"hidden-sm-and-down"},{default:r(()=>[p(W,{class:"frontend-header-menu",ellipsis:!1,mode:"horizontal"})]),_:1},512)]),_:1})]),_:1}),p(D,{class:"ba-aside-drawer","append-to-body":!0,modelValue:n(s).state.menuExpand,"onUpdate:modelValue":t[4]||(t[4]=C=>n(s).state.menuExpand=C),"with-header":!1,direction:"ltr",size:n(s).state.shrink?"70%":"40%"},{default:r(()=>[k("div",we,[k("div",{onClick:t[2]||(t[2]=C=>n(y).push({name:"/"})),class:"header-logo"},[t[6]||(t[6]=k("img",{src:O},null,-1)),k("span",ke,f(n(c).siteName),1)]),k("div",{onClick:t[3]||(t[3]=C=>n(s).toggleMenuExpand(!1)),class:"user-menus-expand hidden-md-and-up"},[p(_,{name:"fa fa-dedent",color:"var(--el-color-primary)",size:"20"})])]),p(W,{"show-icon":!0,mode:"vertical"})]),_:1},8,["modelValue","size"])]),_:1})}}}),ze=A(ye,[["__scopeId","data-v-47a66cae"]]),Ce={href:"http://beian.miit.gov.cn/"},Ie=F({__name:"footer",setup($){const y=V();return(c,s)=>{const d=h("el-footer");return a(),l(d,{class:"footer"},{default:r(()=>[k("div",null,[M(" Copyright @ 2020~"+f(new Date().getFullYear())+" "+f(n(y).siteName)+" "+f(c.$t("Copyright"))+" ",1),k("a",Ce,f(n(y).recordNumber),1)])]),_:1})}}}),Ue=A(Ie,[["__scopeId","data-v-ff7303bf"]]);export{Ue as F,ze as H,fe as i}; diff --git a/public/assets/gameRtp--LqSVQxO.js b/public/assets/gameRtp-D9_K6WW6.js similarity index 89% rename from public/assets/gameRtp--LqSVQxO.js rename to public/assets/gameRtp-D9_K6WW6.js index b595d30..1d0972a 100644 --- a/public/assets/gameRtp--LqSVQxO.js +++ b/public/assets/gameRtp-D9_K6WW6.js @@ -1,4 +1,4 @@ -import{B as Re,a as B,b as c,l as J,o as Ce,D as T,G as i,U as s,u as r,H as o,P as d,Z as X,Y as K,a7 as he,_ as Ve,I as b,X as xe,C as U,V as f,O as we,ah as x,ag as W}from"./vue-DweYBrEc.js";import{x as ke,_ as Ue}from"./index-fNs72j9w.js";import{g as Ie,a as Be,b as Te,e as Ae,c as Se}from"./embed-B0Gwp2fv.js";const Ee={class:"default-main game-rtp-page"},Ne={class:"setting-grid"},qe={class:"panel setting-panel"},De={class:"panel-title"},Me={class:"panel-body setting-form"},Oe={class:"form-row"},ze={class:"form-row"},Ge={class:"form-row"},Pe={class:"form-hint"},Fe={class:"form-row"},je={class:"form-hint"},Le={class:"form-row textarea-row"},$e={class:"form-row"},He={class:"form-row"},Je={class:"color-grid"},Xe={class:"panel embed-panel"},Ke={class:"panel-title"},We={class:"panel-body"},Ye={class:"panel data-panel"},Ze={class:"panel-title"},Qe={class:"filter-bar"},et={class:"filter-field"},tt={class:"filter-field"},at={class:"filter-actions"},lt={class:"table-wrap"},ot=["href"],rt={class:"table-footer"},nt={class:"bottom-actions"},Y=`{ +import{B as Re,a as B,b as c,l as J,o as Ce,D as T,G as i,U as s,u as r,H as o,P as d,Z as X,Y as K,a7 as he,_ as Ve,I as f,X as xe,C as U,V as b,O as we,ah as x,ag as W}from"./vue-DweYBrEc.js";import{x as ke,_ as Ue}from"./index-BIzd9_wD.js";import{g as Ie,a as Be,b as Te,e as Ae,c as Se}from"./embed-DFo9NHr7.js";const Ee={class:"default-main game-rtp-page"},Ne={class:"setting-grid"},qe={class:"panel setting-panel"},De={class:"panel-title"},Me={class:"panel-body setting-form"},Oe={class:"form-row"},ze={class:"form-row"},Ge={class:"form-row"},Pe={class:"form-hint"},Fe={class:"form-row"},je={class:"form-hint"},Le={class:"form-row textarea-row"},$e={class:"form-row"},He={class:"form-row"},Je={class:"color-grid"},Xe={class:"panel embed-panel"},Ke={class:"panel-title"},We={class:"panel-body"},Ye={class:"panel data-panel"},Ze={class:"panel-title"},Qe={class:"filter-bar"},et={class:"filter-field"},tt={class:"filter-field"},at={class:"filter-actions"},lt={class:"table-wrap"},ot=["href"],rt={class:"table-footer"},nt={class:"bottom-actions"},Y=`{ "customGameRTP": [ {"max": 99, "min": 95, "gameId": 153}, {"max": 80, "min": 60, "gameId": 723} @@ -8,7 +8,7 @@ import{B as Re,a as B,b as c,l as J,o as Ce,D as T,G as i,U as s,u as r,H as o,P "MG888H52": "MEGA888 H5" } }`,it=Re({name:"embed/gameRtp",__name:"gameRtp",setup(st){const{t}=ke.useI18n(),n=B({autoRtp:1,autoAmount:'{"max":"90","min":"30"}',frequency:"10",providerDisplay:"",customConfig:"",headerImage:"",textColor:"#ffffff",baseColor:"#045bb9",outlineColor:"#000000",buttonTextColor:"#ffffff",buttonBgColor:"#1c202a",progressBgColor:"#5f5f5f"}),Z=[{key:"textColor",label:"embed.gameRtp.textColor"},{key:"baseColor",label:"embed.gameRtp.baseColor"},{key:"outlineColor",label:"embed.gameRtp.outlineColor"},{key:"buttonTextColor",label:"embed.gameRtp.buttonTextColor"},{key:"buttonBgColor",label:"embed.gameRtp.buttonBgColor"},{key:"progressBgColor",label:"embed.gameRtp.progressBgColor"}],A=c(""),S=c(`
- + + - +