mirror of
https://github.com/KarolChang/jm-expense-vue-ts.git
synced 2024-12-25 03:08:35 +00:00
deploy: config
This commit is contained in:
parent
cbd53d7051
commit
9a58d59a19
@ -1 +1 @@
|
||||
import{r as v}from"./record.2f186259.js";import{g as D,d as c}from"./dateFormat.a9df66b7.js";import{S as y}from"./Spinner.33b65f67.js";import{_ as g,d as k}from"./dateFilter.a11ea60c.js";import{_ as B}from"./index.c104fbd6.js";import{e as S,x as u,f as F,C as Y,o as s,g as r,j as A,m as d,h as t,F as b,k as x,t as a,p as w,A as C,B as E}from"./vendor.961f4417.js";const I=l=>(C("data-v-252006ce"),l=l(),E(),l),L={key:0},M={key:0,class:"table table-striped table-info table-hover"},R=I(()=>t("thead",null,[t("tr",null,[t("th",{scope:"col"},"\u9805\u76EE"),t("th",{scope:"col"},"\u5546\u5BB6"),t("th",{scope:"col"},"\u91D1\u984D"),t("th",{scope:"col"},"\u65E5\u671F"),t("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u8005"),t("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u6642\u9593"),t("th",{scope:"col",id:"column-item"},"\u66F4\u65B0\u6642\u9593")])],-1)),N={id:"column-item"},j={id:"column-item"},O={id:"column-item"},P={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},V=S({setup(l){const m=u(!0),o=u([]),i=u({searchMode:"\u6708\u4EFD",filter:{year:0,month:0,startDate:"",finishDate:""}}),h=async function(){try{const{data:n}=await v.getAll();o.value=n.data.filter(_=>_.isClosed===!0),i.value.filter={year:c(o.value[0].date).year(),month:c(o.value[0].date).month()+1,startDate:c(o.value[0].date).startOf("month").format("YYYY-MM-DD"),finishDate:c(o.value[0].date).endOf("month").format("YYYY-MM-DD")},m.value=!1}catch(n){console.error("error",n)}},p=F(()=>k(i.value,o.value));return h(),Y("dateFilterData",i),(n,_)=>m.value?(s(),w(y,{key:1})):(s(),r("div",L,[A(g),d(p).length?(s(),r("table",M,[R,t("tbody",null,[(s(!0),r(b,null,x(d(p),(e,f)=>(s(),r("tr",{key:f},[t("td",null,a(e.item),1),t("td",null,a(e.merchant),1),t("td",null,a(e.amount),1),t("td",null,a(new Date(e.date).toLocaleDateString()+" "+d(D)(e.date)),1),t("td",N,a(e.User.displayName),1),t("td",j,a(new Date(e.createdAt).toLocaleString()),1),t("td",O,a(new Date(e.updatedAt).toLocaleString()),1)]))),128))])])):(s(),r("img",P))]))}});var J=B(V,[["__scopeId","data-v-252006ce"]]);export{J as default};
|
||||
import{r as v}from"./record.0fa6aed5.js";import{g as D,d as c}from"./dateFormat.a9df66b7.js";import{S as y}from"./Spinner.80e7cf17.js";import{_ as g,d as k}from"./dateFilter.a11ea60c.js";import{_ as B}from"./index.ce021ef5.js";import{e as S,x as u,f as F,C as Y,o as s,g as r,j as A,m as d,h as t,F as b,k as x,t as a,p as w,A as C,B as E}from"./vendor.961f4417.js";const I=l=>(C("data-v-252006ce"),l=l(),E(),l),L={key:0},M={key:0,class:"table table-striped table-info table-hover"},R=I(()=>t("thead",null,[t("tr",null,[t("th",{scope:"col"},"\u9805\u76EE"),t("th",{scope:"col"},"\u5546\u5BB6"),t("th",{scope:"col"},"\u91D1\u984D"),t("th",{scope:"col"},"\u65E5\u671F"),t("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u8005"),t("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u6642\u9593"),t("th",{scope:"col",id:"column-item"},"\u66F4\u65B0\u6642\u9593")])],-1)),N={id:"column-item"},j={id:"column-item"},O={id:"column-item"},P={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},V=S({setup(l){const m=u(!0),o=u([]),i=u({searchMode:"\u6708\u4EFD",filter:{year:0,month:0,startDate:"",finishDate:""}}),h=async function(){try{const{data:n}=await v.getAll();o.value=n.data.filter(_=>_.isClosed===!0),i.value.filter={year:c(o.value[0].date).year(),month:c(o.value[0].date).month()+1,startDate:c(o.value[0].date).startOf("month").format("YYYY-MM-DD"),finishDate:c(o.value[0].date).endOf("month").format("YYYY-MM-DD")},m.value=!1}catch(n){console.error("error",n)}},p=F(()=>k(i.value,o.value));return h(),Y("dateFilterData",i),(n,_)=>m.value?(s(),w(y,{key:1})):(s(),r("div",L,[A(g),d(p).length?(s(),r("table",M,[R,t("tbody",null,[(s(!0),r(b,null,x(d(p),(e,f)=>(s(),r("tr",{key:f},[t("td",null,a(e.item),1),t("td",null,a(e.merchant),1),t("td",null,a(e.amount),1),t("td",null,a(new Date(e.date).toLocaleDateString()+" "+d(D)(e.date)),1),t("td",N,a(e.User.displayName),1),t("td",j,a(new Date(e.createdAt).toLocaleString()),1),t("td",O,a(new Date(e.updatedAt).toLocaleString()),1)]))),128))])])):(s(),r("img",P))]))}});var J=B(V,[["__scopeId","data-v-252006ce"]]);export{J as default};
|
@ -1,4 +1,4 @@
|
||||
import{b as f,c as v,d as b,T as s,C as B}from"./index.c104fbd6.js";import{r as C}from"./record.2f186259.js";import{e as w,K as h,i as F,o as y,g as E,h as D,S as x}from"./vendor.961f4417.js";var g={push(t){return f.post("/push",t)}};const A=async t=>{try{const u={to:["Ub3557f7c812e4e78293959fe4fccd414","Ue5746fb7f35d2322a698d62dc9c9a21d"],messages:{type:"text",text:t}};await g.push(u)}catch(u){console.error("error",u)}},R=w({props:{view:null},setup(t){const u=t,o=v(),i=h(),d=F("refetchRecords"),m=async()=>{try{const{value:e}=await b.fire({title:"\u65B0\u589E\u8CC7\u6599",html:`
|
||||
import{b as f,c as v,d as b,T as s,C as B}from"./index.ce021ef5.js";import{r as C}from"./record.0fa6aed5.js";import{e as w,K as h,i as F,o as y,g as E,h as D,S as x}from"./vendor.961f4417.js";var g={push(t){return f.post("/push",t)}};const A=async t=>{try{const u={to:["Ub3557f7c812e4e78293959fe4fccd414","Ue5746fb7f35d2322a698d62dc9c9a21d"],messages:{type:"text",text:t}};await g.push(u)}catch(u){console.error("error",u)}},R=w({props:{view:null},setup(t){const u=t,o=v(),i=h(),d=F("refetchRecords"),m=async()=>{try{const{value:e}=await b.fire({title:"\u65B0\u589E\u8CC7\u6599",html:`
|
||||
<div class="d-flex mb-2">
|
||||
<div class="col-auto me-3">
|
||||
<label for="swal-item" class="col-form-label">\u9805\u76EE</label>
|
@ -1,4 +1,4 @@
|
||||
import{e as F,i as y,o as m,g as v,S as I,x as C,p as P,w as O,h as t,j as w,n as M,k as L,F as S,t as E,P as T,m as g,l as z,f as D,U as Y,y as N,V as J,C as $,R as q,T as G}from"./vendor.961f4417.js";import{a as b,_ as U,d as R,T as h,R as K,c as j}from"./index.c104fbd6.js";import{d as V,g as Q}from"./dateFormat.a9df66b7.js";import{S as W}from"./Spinner.33b65f67.js";import{_ as X,d as Z}from"./dateFilter.a11ea60c.js";var k={expense:{getAll(){return b.get("/expense/all")},getOne(i){return b.get(`/expense/${i}`)},create(i){return b.post("/expense/create",i)},edit(i,o){return b.put(`/expense/edit/${i}`,o)},delete(i){return b.delete(`/expense/delete/${i}`)}},category:{getAll(){return b.get("/category/all")},getOne(i){return b.get(`/category/${i}`)},create(i){return b.post("/category/create",i)},edit(i,o){return b.put(`/category/edit/${i}`,o)},delete(i){return b.delete(`/category/delete/${i}`)}}};const ee=F({setup(i){const o=y("refetchCategories"),u=async()=>{try{const{value:a}=await R.fire({title:"\u65B0\u589E\u985E\u5225",html:`
|
||||
import{e as F,i as y,o as m,g as v,S as I,x as C,p as P,w as O,h as t,j as w,n as M,k as L,F as S,t as E,P as T,m as g,l as z,f as D,U as Y,y as N,V as J,C as $,R as q,T as G}from"./vendor.961f4417.js";import{a as b,_ as U,d as R,T as h,R as K,c as j}from"./index.ce021ef5.js";import{d as V,g as Q}from"./dateFormat.a9df66b7.js";import{S as W}from"./Spinner.80e7cf17.js";import{_ as X,d as Z}from"./dateFilter.a11ea60c.js";var k={expense:{getAll(){return b.get("/expense/all")},getOne(i){return b.get(`/expense/${i}`)},create(i){return b.post("/expense/create",i)},edit(i,o){return b.put(`/expense/edit/${i}`,o)},delete(i){return b.delete(`/expense/delete/${i}`)}},category:{getAll(){return b.get("/category/all")},getOne(i){return b.get(`/category/${i}`)},create(i){return b.post("/category/create",i)},edit(i,o){return b.put(`/category/edit/${i}`,o)},delete(i){return b.delete(`/category/delete/${i}`)}}};const ee=F({setup(i){const o=y("refetchCategories"),u=async()=>{try{const{value:a}=await R.fire({title:"\u65B0\u589E\u985E\u5225",html:`
|
||||
<div class="d-flex mb-2">
|
||||
<div class="col-auto me-3">
|
||||
<label for="swal-name" class="col-form-label">\u7A2E\u985E</label>
|
@ -1,3 +1,3 @@
|
||||
import{_ as B}from"./index.c104fbd6.js";import{e as $,x as h,o as u,g as n,h as e,t as a,F as p,k as f,n as y,A as x,B as A,p as F,P as E}from"./vendor.961f4417.js";const D=d=>(x("data-v-275901cc"),d=d(),A(),d),S={key:0,class:"container"},w={class:"row"},N={class:"col col-sm-6"},R={class:"d-flex justify-content-center mb-3"},I={class:"num-block"},W={class:"num-block"},j={class:"num-block"},G={class:"num-block"},T={class:"d-flex flex-wrap justify-content-center"},M=["onClick"],O={class:"d-flex justify-content-center mb-3"},K={class:"col col-sm-6"},U=D(()=>e("h4",{class:"text-center"},"GUESS RECORDS",-1)),V={class:"list-group"},z={class:"d-flex align-items-center"},L=$({setup(d){const v=Array.from({length:10},(l,t)=>t),o=[];for(let l=0;l<4;l++){const t=Math.floor(Math.random()*v.length);o.push(v[t]),v.splice(t,1)}console.log("answer",o);const s=h([]),_=h(Array(10)),r=h([]),k=h(!1),b=l=>{if(s.value.length>=4)return alert("\u6578\u5B57\u5DF2\u6EFF\uFF01");if(s.value.includes(l))return alert("\u6578\u5B57\u91CD\u8907\uFF01");s.value.push(l)},g=()=>{if(console.log("enterClick"),s.value.length!==4)return alert("\u6578\u5B57\u672A\u9054\u56DB\u4F4D\uFF01");let l=0;if(s.value.forEach((t,i)=>{t===o[i]?(_.value[t]="success",l+=1):o.includes(t)?_.value[t]="warning":_.value[t]="secondary"}),r.value.push({number:s.value,status:[..._.value]}),l===4)return k.value=!0,alert(`\u606D\u559C\u7B54\u5C0D\uFF01\u4F60\u771F\u5E78\u904B~
|
||||
import{_ as B}from"./index.ce021ef5.js";import{e as $,x as h,o as u,g as n,h as e,t as a,F as p,k as f,n as y,A as x,B as A,p as F,P as E}from"./vendor.961f4417.js";const D=d=>(x("data-v-275901cc"),d=d(),A(),d),S={key:0,class:"container"},w={class:"row"},N={class:"col col-sm-6"},R={class:"d-flex justify-content-center mb-3"},I={class:"num-block"},W={class:"num-block"},j={class:"num-block"},G={class:"num-block"},T={class:"d-flex flex-wrap justify-content-center"},M=["onClick"],O={class:"d-flex justify-content-center mb-3"},K={class:"col col-sm-6"},U=D(()=>e("h4",{class:"text-center"},"GUESS RECORDS",-1)),V={class:"list-group"},z={class:"d-flex align-items-center"},L=$({setup(d){const v=Array.from({length:10},(l,t)=>t),o=[];for(let l=0;l<4;l++){const t=Math.floor(Math.random()*v.length);o.push(v[t]),v.splice(t,1)}console.log("answer",o);const s=h([]),_=h(Array(10)),r=h([]),k=h(!1),b=l=>{if(s.value.length>=4)return alert("\u6578\u5B57\u5DF2\u6EFF\uFF01");if(s.value.includes(l))return alert("\u6578\u5B57\u91CD\u8907\uFF01");s.value.push(l)},g=()=>{if(console.log("enterClick"),s.value.length!==4)return alert("\u6578\u5B57\u672A\u9054\u56DB\u4F4D\uFF01");let l=0;if(s.value.forEach((t,i)=>{t===o[i]?(_.value[t]="success",l+=1):o.includes(t)?_.value[t]="warning":_.value[t]="secondary"}),r.value.push({number:s.value,status:[..._.value]}),l===4)return k.value=!0,alert(`\u606D\u559C\u7B54\u5C0D\uFF01\u4F60\u771F\u5E78\u904B~
|
||||
\u7E3D\u6B21\u6578:${r.value.length}\u6B21`);s.value=[]},c=()=>{s.value=[],r.value=[],_.value=Array(10),k.value=!1};return(l,t)=>k.value?(u(),n("img",{key:1,src:"https://i.imgur.com/OmkEpSv.jpg",alt:"",class:"img-fluid",onClick:c})):(u(),n("div",S,[e("div",w,[e("div",N,[e("div",R,[e("div",I,a(s.value[0]),1),e("div",W,a(s.value[1]),1),e("div",j,a(s.value[2]),1),e("div",G,a(s.value[3]),1)]),e("div",T,[(u(!0),n(p,null,f(_.value,(i,m)=>(u(),n("div",{key:m,onClick:C=>b(m),class:y(`num-btn bg-${i||"light"}`)},a(m),11,M))),128))]),e("div",O,[k.value?(u(),n("div",{key:0,class:"btn-customer reset-btn",onClick:c},"RESET")):(u(),n(p,{key:1},[e("div",{class:"btn-customer back-btn col-6",onClick:t[0]||(t[0]=i=>s.value.pop())},"BACK"),e("div",{class:"btn-customer enter-btn col-6",onClick:g},"ENTER")],64))])]),e("div",K,[U,e("ul",V,[(u(!0),n(p,null,f(r.value,(i,m)=>(u(),n("li",{class:"list-group-item mx-auto",key:m},[e("div",z,[(u(!0),n(p,null,f(i.number,C=>(u(),n("div",{class:y("num-block bg-"+i.status[C]),key:C},a(C),3))),128))])]))),128))])])])]))}});var P=B(L,[["__scopeId","data-v-275901cc"]]);const q=d=>(x("data-v-92108812"),d=d(),A(),d),H={key:0,class:"container"},J={class:"row"},Q={class:"col col-sm-6"},X={class:"d-flex justify-content-center mb-3"},Y={class:"num-block"},Z={class:"num-block"},ee={class:"num-block"},se={class:"num-block"},te={class:"d-flex flex-wrap justify-content-center"},ue=["onClick"],le={class:"d-flex justify-content-center mb-3"},ne={class:"col col-sm-6"},ce=q(()=>e("h4",{class:"text-center"},"GUESS RECORDS",-1)),oe={class:"list-group"},ae={class:"d-flex align-items-center"},re={class:"ms-2"},ie=$({setup(d){const v=Array.from({length:10},(c,l)=>l),o=[];for(let c=0;c<4;c++){const l=Math.floor(Math.random()*v.length);o.push(v[l]),v.splice(l,1)}console.log("answer",o);const s=h([]),_=h([]),r=h(!1),k=c=>{if(s.value.length>=4)return alert("\u6578\u5B57\u5DF2\u6EFF\uFF01");if(s.value.includes(c))return alert("\u6578\u5B57\u91CD\u8907\uFF01");s.value.push(c)},b=()=>{if(console.log("enterClick"),s.value.length!==4)return alert("\u6578\u5B57\u672A\u9054\u56DB\u4F4D\uFF01");let c=0,l=0;if(s.value.forEach((t,i)=>{t===o[i]?c+=1:o.includes(t)&&(l+=1)}),_.value.push({number:s.value,status:`${c?c+"A":""}${l?l+"B":""}`}),c===4)return r.value=!0,alert(`\u606D\u559C\u7B54\u5C0D\uFF01\u4F60\u771F\u5E78\u904B~
|
||||
\u7E3D\u6B21\u6578:${_.value.length}\u6B21`);s.value=[]},g=()=>{s.value=[],_.value=[],r.value=!1};return(c,l)=>r.value?(u(),n("img",{key:1,src:"https://i.imgur.com/OmkEpSv.jpg",alt:"",class:"img-fluid",onClick:g})):(u(),n("div",H,[e("div",J,[e("div",Q,[e("div",X,[e("div",Y,a(s.value[0]),1),e("div",Z,a(s.value[1]),1),e("div",ee,a(s.value[2]),1),e("div",se,a(s.value[3]),1)]),e("div",te,[(u(),n(p,null,f(10,t=>e("div",{key:t,onClick:i=>k(t-1),class:"num-btn"},a(t-1),9,ue)),64))]),e("div",le,[r.value?(u(),n("div",{key:0,class:"btn-customer reset-btn",onClick:g},"RESET")):(u(),n(p,{key:1},[e("div",{class:"btn-customer back-btn col-6",onClick:l[0]||(l[0]=t=>s.value.pop())},"BACK"),e("div",{class:"btn-customer enter-btn col-6",onClick:b},"ENTER")],64))])]),e("div",ne,[ce,e("ul",oe,[(u(!0),n(p,null,f(_.value,(t,i)=>(u(),n("li",{class:"list-group-item mx-auto",key:i},[e("div",ae,[(u(!0),n(p,null,f(t.number,m=>(u(),n("div",{class:y("num-block bg-"+t.status[m]),key:m},a(m),3))),128)),e("h3",re,a(t.status),1)])]))),128))])])])]))}});var _e=B(ie,[["__scopeId","data-v-92108812"]]);const de={class:"d-flex justify-content-center m-2 mb-5"},ve=["onClick"],me=$({setup(d){const v=h(["\u731C\u6578\u5B57(Wordle)","\u731C\u6578\u5B57(AB)"]),o=h("\u731C\u6578\u5B57(Wordle)");return(s,_)=>(u(),n("div",null,[e("div",de,[(u(!0),n(p,null,f(v.value,(r,k)=>(u(),n("button",{key:k,type:"button",class:y(`btn btn-${o.value!==r?"outline-":""}danger me-2`),onClick:b=>o.value=r},a(r),11,ve))),128))]),o.value==="\u731C\u6578\u5B57(Wordle)"?(u(),F(P,{key:0})):E("",!0),o.value==="\u731C\u6578\u5B57(AB)"?(u(),F(_e,{key:1})):E("",!0)]))}});var ke=B(me,[["__scopeId","data-v-56bac710"]]);export{ke as default};
|
@ -1 +1 @@
|
||||
var A=Object.defineProperty;var x=(u,a,s)=>a in u?A(u,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[a]=s;var v=(u,a,s)=>(x(u,typeof a!="symbol"?a+"":a,s),s);import{r as B}from"./record.2f186259.js";import{_ as C,l as k}from"./CreateRecordModalButton.5a2991ad.js";import{C as M}from"./index.c104fbd6.js";import{S as E}from"./Spinner.33b65f67.js";import{e as S,x as h,o as F,g as N,h as t,j as P,t as r,O as w,p as V,l as D}from"./vendor.961f4417.js";const Y={key:0},$={class:"d-flex mb-3",style:{width:"100vw"}},I={class:"list-group list-group-checkable"},U={class:"list-group-item py-3 mb-3"},j={class:"row"},z={class:"col-7 text-start"},H=D(" \u672C\u6708\u7E3D\u984D \uFF04"),L={class:"progress mt-2",style:{height:"20px"}},O=["aria-valuenow"],R={class:"col-5 text-start"},T={class:"list-group-item py-3 mb-3"},q={class:"row"},G={class:"col-7 text-start"},J=D(" \u4E0A\u6708\u7E3D\u984D \uFF04"),K={class:"progress mt-2",style:{height:"20px"}},Q=["aria-valuenow"],W={class:"col-5 text-start"},ot=S({setup(u){class a{constructor(){v(this,"total");v(this,"closedAmount");v(this,"rate")}}const s=h(!0),p=h([]),o=h(new a),l=h(new a),y=async function(){try{const{data:e}=await B.getAll();p.value=e.data;const n=new Date().getFullYear(),c=new Date().getMonth()+1;o.value=f(n,c),l.value=f(c-1===0?n-1:n,c-1===0?12:c-1),s.value=!1}catch(e){console.error("error",e)}},f=(e,n)=>{var g;const c=(g=p.value)==null?void 0:g.filter(i=>new Date(i.date).getFullYear()===e&&new Date(i.date).getMonth()+1===n);let d=0,_=0;for(let i of c)d+=i.amount,i.isClosed===!0&&(_+=i.amount);let m;return d===0?m=0:m=Math.round(_/d)*100,{total:d,closedAmount:_,rate:m}};y();const b=async()=>{try{const e={to:["Ub3557f7c812e4e78293959fe4fccd414","Ue5746fb7f35d2322a698d62dc9c9a21d"],messages:{type:"text",text:"\u5361\u6BD4\u89BA\u5F97\u4FC3\u54AA\uFF01"}};await k.push(e),M("Speak","\u6309\u6211\u4E86 \u4F60\u662F\u7B28\u86CB")}catch(e){console.error("error",e)}};return(e,n)=>s.value?(F(),V(E,{key:1})):(F(),N("div",Y,[t("div",$,[P(C,{view:"Home",class:"me-3"}),t("button",{type:"button",class:"btn btn-danger me-3",onClick:b},"\u7B28\u86CB\u624D\u6309\u6211")]),t("div",I,[t("label",U,[t("div",j,[t("div",z,[t("h5",null,[H,t("strong",null,r(o.value.total),1)]),t("div",L,[t("div",{class:"progress-bar",role:"progressbar",style:w(`width: ${o.value.rate}%`),"aria-valuenow":o.value.rate,"aria-valuemin":"0","aria-valuemax":"100"},r(o.value.rate)+"% ",13,O)])]),t("div",R,[t("div",null,"\u672A\u7D50\u7B97\uFF04 "+r(o.value.total-o.value.closedAmount),1),t("div",null,"\u5DF2\u7D50\u7B97\uFF04 "+r(o.value.closedAmount),1)])])]),t("label",T,[t("div",q,[t("div",G,[t("h5",null,[J,t("strong",null,r(l.value.total),1)]),t("div",K,[t("div",{class:"progress-bar",role:"progressbar",style:w(`width: ${l.value.rate}%`),"aria-valuenow":l.value.rate,"aria-valuemin":"0","aria-valuemax":"100"},r(l.value.rate)+"% ",13,Q)])]),t("div",W,[t("div",null,"\u672A\u7D50\u7B97\uFF04 "+r(l.value.total-l.value.closedAmount),1),t("div",null,"\u5DF2\u7D50\u7B97\uFF04 "+r(l.value.closedAmount),1)])])])])]))}});export{ot as default};
|
||||
var A=Object.defineProperty;var x=(u,a,s)=>a in u?A(u,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[a]=s;var v=(u,a,s)=>(x(u,typeof a!="symbol"?a+"":a,s),s);import{r as B}from"./record.0fa6aed5.js";import{_ as C,l as k}from"./CreateRecordModalButton.d09f1946.js";import{C as M}from"./index.ce021ef5.js";import{S as E}from"./Spinner.80e7cf17.js";import{e as S,x as h,o as F,g as N,h as t,j as P,t as r,O as w,p as V,l as D}from"./vendor.961f4417.js";const Y={key:0},$={class:"d-flex mb-3",style:{width:"100vw"}},I={class:"list-group list-group-checkable"},U={class:"list-group-item py-3 mb-3"},j={class:"row"},z={class:"col-7 text-start"},H=D(" \u672C\u6708\u7E3D\u984D \uFF04"),L={class:"progress mt-2",style:{height:"20px"}},O=["aria-valuenow"],R={class:"col-5 text-start"},T={class:"list-group-item py-3 mb-3"},q={class:"row"},G={class:"col-7 text-start"},J=D(" \u4E0A\u6708\u7E3D\u984D \uFF04"),K={class:"progress mt-2",style:{height:"20px"}},Q=["aria-valuenow"],W={class:"col-5 text-start"},ot=S({setup(u){class a{constructor(){v(this,"total");v(this,"closedAmount");v(this,"rate")}}const s=h(!0),p=h([]),o=h(new a),l=h(new a),y=async function(){try{const{data:e}=await B.getAll();p.value=e.data;const n=new Date().getFullYear(),c=new Date().getMonth()+1;o.value=f(n,c),l.value=f(c-1===0?n-1:n,c-1===0?12:c-1),s.value=!1}catch(e){console.error("error",e)}},f=(e,n)=>{var g;const c=(g=p.value)==null?void 0:g.filter(i=>new Date(i.date).getFullYear()===e&&new Date(i.date).getMonth()+1===n);let d=0,_=0;for(let i of c)d+=i.amount,i.isClosed===!0&&(_+=i.amount);let m;return d===0?m=0:m=Math.round(_/d)*100,{total:d,closedAmount:_,rate:m}};y();const b=async()=>{try{const e={to:["Ub3557f7c812e4e78293959fe4fccd414","Ue5746fb7f35d2322a698d62dc9c9a21d"],messages:{type:"text",text:"\u5361\u6BD4\u89BA\u5F97\u4FC3\u54AA\uFF01"}};await k.push(e),M("Speak","\u6309\u6211\u4E86 \u4F60\u662F\u7B28\u86CB")}catch(e){console.error("error",e)}};return(e,n)=>s.value?(F(),V(E,{key:1})):(F(),N("div",Y,[t("div",$,[P(C,{view:"Home",class:"me-3"}),t("button",{type:"button",class:"btn btn-danger me-3",onClick:b},"\u7B28\u86CB\u624D\u6309\u6211")]),t("div",I,[t("label",U,[t("div",j,[t("div",z,[t("h5",null,[H,t("strong",null,r(o.value.total),1)]),t("div",L,[t("div",{class:"progress-bar",role:"progressbar",style:w(`width: ${o.value.rate}%`),"aria-valuenow":o.value.rate,"aria-valuemin":"0","aria-valuemax":"100"},r(o.value.rate)+"% ",13,O)])]),t("div",R,[t("div",null,"\u672A\u7D50\u7B97\uFF04 "+r(o.value.total-o.value.closedAmount),1),t("div",null,"\u5DF2\u7D50\u7B97\uFF04 "+r(o.value.closedAmount),1)])])]),t("label",T,[t("div",q,[t("div",G,[t("h5",null,[J,t("strong",null,r(l.value.total),1)]),t("div",K,[t("div",{class:"progress-bar",role:"progressbar",style:w(`width: ${l.value.rate}%`),"aria-valuenow":l.value.rate,"aria-valuemin":"0","aria-valuemax":"100"},r(l.value.rate)+"% ",13,Q)])]),t("div",W,[t("div",null,"\u672A\u7D50\u7B97\uFF04 "+r(l.value.total-l.value.closedAmount),1),t("div",null,"\u5DF2\u7D50\u7B97\uFF04 "+r(l.value.closedAmount),1)])])])])]))}});export{ot as default};
|
@ -1 +1 @@
|
||||
import{e as C,K as f,q as g,x as d,o as h,g as v,h as o,m as B,y as p,z as m,L as w,A as E,B as b,M as y}from"./vendor.961f4417.js";import{_ as F}from"./logo2.e884e5c2.js";import{_ as A,T as i}from"./index.c104fbd6.js";const l=u=>(E("data-v-cd2950d6"),u=u(),b(),u),x={class:"m-auto",style:{width:"70vw"}},I=l(()=>o("img",{src:F,alt:"",width:"150",height:"150"},null,-1)),k=l(()=>o("h1",{class:"h3 mb-3 fw-normal"},"\u81ED\u5EFA\u55B5\u8A18\u5E33 Login",-1)),D={class:"form-floating"},K=l(()=>o("label",{for:"email-login"},"\u4FE1\u7BB1",-1)),L={class:"form-floating"},M=["onKeyup"],S=l(()=>o("label",{for:"password-login"},"\u5BC6\u78BC",-1)),T=C({setup(u){const r=f(),_=g(),n=d(""),a=d(""),c=()=>{if(!n.value||!a.value)return i.fire({icon:"warning",title:"\u4FE1\u7BB1\u3001\u5BC6\u78BC\u70BA\u5FC5\u586B\u9078\u9805\uFF01"});y(_,n.value,a.value).then(s=>{const e=s.user;i.fire({icon:"success",title:`\u6B61\u8FCE[${e.displayName}]\u9032\u5165\u8C6C\u8C6C\u4E16\u754C\u{1F437}`}),r.push({name:"Home"})}).catch(s=>{const e=s.code,t=s.message;console.log("error",e,t),i.fire({icon:"error",title:"\u8C6C\u8C6C\u4E16\u754C\u4E0D\u6B61\u8FCE\u4F60 \u2620\uFE0F"})})};return(s,e)=>(h(),v("div",null,[o("button",{class:"btn btn-info register-btn",type:"button",onClick:e[0]||(e[0]=t=>B(r).push({name:"Register"}))},"\u524D\u5F80\u8A3B\u518A"),o("div",x,[o("form",null,[I,k,o("div",D,[p(o("input",{type:"email",class:"form-control",id:"email-login","onUpdate:modelValue":e[1]||(e[1]=t=>n.value=t),autocomplete:"on"},null,512),[[m,n.value]]),K]),o("div",L,[p(o("input",{type:"password",class:"form-control",id:"password-login","onUpdate:modelValue":e[2]||(e[2]=t=>a.value=t),autocomplete:"on",onKeyup:w(c,["enter"])},null,40,M),[[m,a.value]]),S]),o("button",{class:"w-100 btn btn-lg mt-3",type:"button",onClick:c,style:{color:"white","background-color":"coral"}}," \u9032\u5165\u8C6C\u8C6C\u4E16\u754C ")])])]))}});var U=A(T,[["__scopeId","data-v-cd2950d6"]]);export{U as default};
|
||||
import{e as C,K as f,q as g,x as d,o as h,g as v,h as o,m as B,y as p,z as m,L as w,A as E,B as b,M as y}from"./vendor.961f4417.js";import{_ as F}from"./logo2.e884e5c2.js";import{_ as A,T as i}from"./index.ce021ef5.js";const l=u=>(E("data-v-cd2950d6"),u=u(),b(),u),x={class:"m-auto",style:{width:"70vw"}},I=l(()=>o("img",{src:F,alt:"",width:"150",height:"150"},null,-1)),k=l(()=>o("h1",{class:"h3 mb-3 fw-normal"},"\u81ED\u5EFA\u55B5\u8A18\u5E33 Login",-1)),D={class:"form-floating"},K=l(()=>o("label",{for:"email-login"},"\u4FE1\u7BB1",-1)),L={class:"form-floating"},M=["onKeyup"],S=l(()=>o("label",{for:"password-login"},"\u5BC6\u78BC",-1)),T=C({setup(u){const r=f(),_=g(),n=d(""),a=d(""),c=()=>{if(!n.value||!a.value)return i.fire({icon:"warning",title:"\u4FE1\u7BB1\u3001\u5BC6\u78BC\u70BA\u5FC5\u586B\u9078\u9805\uFF01"});y(_,n.value,a.value).then(s=>{const e=s.user;i.fire({icon:"success",title:`\u6B61\u8FCE[${e.displayName}]\u9032\u5165\u8C6C\u8C6C\u4E16\u754C\u{1F437}`}),r.push({name:"Home"})}).catch(s=>{const e=s.code,t=s.message;console.log("error",e,t),i.fire({icon:"error",title:"\u8C6C\u8C6C\u4E16\u754C\u4E0D\u6B61\u8FCE\u4F60 \u2620\uFE0F"})})};return(s,e)=>(h(),v("div",null,[o("button",{class:"btn btn-info register-btn",type:"button",onClick:e[0]||(e[0]=t=>B(r).push({name:"Register"}))},"\u524D\u5F80\u8A3B\u518A"),o("div",x,[o("form",null,[I,k,o("div",D,[p(o("input",{type:"email",class:"form-control",id:"email-login","onUpdate:modelValue":e[1]||(e[1]=t=>n.value=t),autocomplete:"on"},null,512),[[m,n.value]]),K]),o("div",L,[p(o("input",{type:"password",class:"form-control",id:"password-login","onUpdate:modelValue":e[2]||(e[2]=t=>a.value=t),autocomplete:"on",onKeyup:w(c,["enter"])},null,40,M),[[m,a.value]]),S]),o("button",{class:"w-100 btn btn-lg mt-3",type:"button",onClick:c,style:{color:"white","background-color":"coral"}}," \u9032\u5165\u8C6C\u8C6C\u4E16\u754C ")])])]))}});var U=A(T,[["__scopeId","data-v-cd2950d6"]]);export{U as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{_ as e}from"./index.c104fbd6.js";import{o as t,g as o,h as r}from"./vendor.961f4417.js";const s={},c=r("img",{src:"https://www.lifewire.com/thmb/-zkZkHWjYJ1eAIRKzvAksPDMrzg=/3000x2000/filters:no_upscale():max_bytes(150000):strip_icc()/404-not-found-error-explained-2622936-Final-fde7be1b7e2e499c9f039d97183e7f52.jpg",alt:"404",style:{height:"70vh",width:"70vw"}},null,-1),n=[c];function a(i,_){return t(),o("div",null,n)}var f=e(s,[["render",a]]);export{f as default};
|
||||
import{_ as e}from"./index.ce021ef5.js";import{o as t,g as o,h as r}from"./vendor.961f4417.js";const s={},c=r("img",{src:"https://www.lifewire.com/thmb/-zkZkHWjYJ1eAIRKzvAksPDMrzg=/3000x2000/filters:no_upscale():max_bytes(150000):strip_icc()/404-not-found-error-explained-2622936-Final-fde7be1b7e2e499c9f039d97183e7f52.jpg",alt:"404",style:{height:"70vh",width:"70vw"}},null,-1),n=[c];function a(i,_){return t(),o("div",null,n)}var f=e(s,[["render",a]]);export{f as default};
|
@ -1,4 +1,4 @@
|
||||
import{r as h}from"./record.2f186259.js";import{g as S}from"./dateFormat.a9df66b7.js";import{_ as y,c as b,d as R,T as _}from"./index.c104fbd6.js";import{S as I}from"./Spinner.33b65f67.js";import{p as E,_ as U}from"./CreateRecordModalButton.5a2991ad.js";import{e as D,i as k,o as r,g as m,S as N,F as B,j as x,h as o,t as v,x as C,C as M,k as L,n as j,p as F,m as $,P as T,A as O,B as P}from"./vendor.961f4417.js";const z=D({props:{record:null},setup(d){const p=d,n=b(),a=k("refetchRecords"),u=async()=>{try{const e=p.record,{value:l}=await R.fire({title:"\u8CC7\u6599\u7DE8\u8F2F",html:`
|
||||
import{r as h}from"./record.0fa6aed5.js";import{g as S}from"./dateFormat.a9df66b7.js";import{_ as y,c as b,d as R,T as _}from"./index.ce021ef5.js";import{S as I}from"./Spinner.80e7cf17.js";import{p as E,_ as U}from"./CreateRecordModalButton.d09f1946.js";import{e as D,i as k,o as r,g as m,S as N,F as B,j as x,h as o,t as v,x as C,C as M,k as L,n as j,p as F,m as $,P as T,A as O,B as P}from"./vendor.961f4417.js";const z=D({props:{record:null},setup(d){const p=d,n=b(),a=k("refetchRecords"),u=async()=>{try{const e=p.record,{value:l}=await R.fire({title:"\u8CC7\u6599\u7DE8\u8F2F",html:`
|
||||
<div class="d-flex mb-2">
|
||||
<div class="col-auto me-3">
|
||||
<label for="swal-item" class="col-form-label">\u9805\u76EE</label>
|
@ -1 +1 @@
|
||||
import{e as _,K as f,x as g,o as v,g as h,h as e,m as B,y as l,z as i,A as w,B as F}from"./vendor.961f4417.js";import{_ as b}from"./logo2.e884e5c2.js";import{_ as y,F as C,T as n,u as p}from"./index.c104fbd6.js";const u=a=>(w("data-v-0e827606"),a=a(),F(),a),U={class:"m-auto",style:{width:"70vw"}},A=u(()=>e("img",{src:b,alt:"",width:"150",height:"150"},null,-1)),D=u(()=>e("h1",{class:"h3 mb-3 fw-normal"},"\u81ED\u5EFA\u55B5\u8A18\u5E33 Register",-1)),R={class:"form-floating"},x=u(()=>e("label",{for:"name-register"},"\u540D\u7A31",-1)),E={class:"form-floating"},I=u(()=>e("label",{for:"photoUrl-register"},"\u5927\u982D\u8CBC(url)",-1)),L={class:"form-floating"},N=u(()=>e("label",{for:"email-register"},"\u4FE1\u7BB1",-1)),k={class:"form-floating"},V=u(()=>e("label",{for:"password-register"},"\u5BC6\u78BC",-1)),S=_({setup(a){const d=f(),t=g(new C),m=async()=>{try{const{displayName:r,email:o,password:s}=t.value;if(!r||!o||!s)return n.fire({icon:"warning",title:"\u540D\u7A31\u3001\u4FE1\u7BB1\u3001\u5BC6\u78BC\u70BA\u5FC5\u586B\u9078\u9805\uFF01"});if(s.length<6)return n.fire({icon:"warning",title:"\u5BC6\u78BC\u81F3\u5C11\u89816\u4F4D\uFF01"});const{data:c}=await p.user.firebase_email_register(t.value);await p.user.create({email:t.value.email,displayName:t.value.displayName,photoURL:t.value.photoURL,firebaseUid:c.data.uid}),n.fire({icon:"success",title:"\u8A3B\u518A\u6210\u529F\uFF01"}),d.push({name:"Login"})}catch(r){console.error("error",r),n.fire({icon:"error",title:"\u8A3B\u518A\u5931\u6557\uFF01"})}};return(r,o)=>(v(),h("div",null,[e("button",{class:"btn btn-info login-btn",type:"button",onClick:o[0]||(o[0]=s=>B(d).push({name:"Login"}))},"\u524D\u5F80\u767B\u5165"),e("div",U,[e("form",null,[A,D,e("div",R,[l(e("input",{type:"text",class:"form-control",id:"name-register","onUpdate:modelValue":o[1]||(o[1]=s=>t.value.displayName=s),autocomplete:"on"},null,512),[[i,t.value.displayName]]),x]),e("div",E,[l(e("input",{type:"url",class:"form-control",id:"photoUrl-register","onUpdate:modelValue":o[2]||(o[2]=s=>t.value.photoURL=s),autocomplete:"on"},null,512),[[i,t.value.photoURL]]),I]),e("div",L,[l(e("input",{type:"email",class:"form-control",id:"email-register","onUpdate:modelValue":o[3]||(o[3]=s=>t.value.email=s),autocomplete:"on"},null,512),[[i,t.value.email]]),N]),e("div",k,[l(e("input",{type:"password",class:"form-control",id:"password-register","onUpdate:modelValue":o[4]||(o[4]=s=>t.value.password=s),autocomplete:"on"},null,512),[[i,t.value.password]]),V]),e("button",{class:"w-100 btn btn-lg mt-3",type:"button",onClick:m,style:{color:"white","background-color":"mediumaquamarine"}}," \u53D6\u5F97\u9032\u5165\u8C6C\u8C6C\u4E16\u754C\u7684\u9580\u7968 ")])])]))}});var K=y(S,[["__scopeId","data-v-0e827606"]]);export{K as default};
|
||||
import{e as _,K as f,x as g,o as v,g as h,h as e,m as B,y as l,z as i,A as w,B as F}from"./vendor.961f4417.js";import{_ as b}from"./logo2.e884e5c2.js";import{_ as y,F as C,T as n,u as p}from"./index.ce021ef5.js";const u=a=>(w("data-v-0e827606"),a=a(),F(),a),U={class:"m-auto",style:{width:"70vw"}},A=u(()=>e("img",{src:b,alt:"",width:"150",height:"150"},null,-1)),D=u(()=>e("h1",{class:"h3 mb-3 fw-normal"},"\u81ED\u5EFA\u55B5\u8A18\u5E33 Register",-1)),R={class:"form-floating"},x=u(()=>e("label",{for:"name-register"},"\u540D\u7A31",-1)),E={class:"form-floating"},I=u(()=>e("label",{for:"photoUrl-register"},"\u5927\u982D\u8CBC(url)",-1)),L={class:"form-floating"},N=u(()=>e("label",{for:"email-register"},"\u4FE1\u7BB1",-1)),k={class:"form-floating"},V=u(()=>e("label",{for:"password-register"},"\u5BC6\u78BC",-1)),S=_({setup(a){const d=f(),t=g(new C),m=async()=>{try{const{displayName:r,email:o,password:s}=t.value;if(!r||!o||!s)return n.fire({icon:"warning",title:"\u540D\u7A31\u3001\u4FE1\u7BB1\u3001\u5BC6\u78BC\u70BA\u5FC5\u586B\u9078\u9805\uFF01"});if(s.length<6)return n.fire({icon:"warning",title:"\u5BC6\u78BC\u81F3\u5C11\u89816\u4F4D\uFF01"});const{data:c}=await p.user.firebase_email_register(t.value);await p.user.create({email:t.value.email,displayName:t.value.displayName,photoURL:t.value.photoURL,firebaseUid:c.data.uid}),n.fire({icon:"success",title:"\u8A3B\u518A\u6210\u529F\uFF01"}),d.push({name:"Login"})}catch(r){console.error("error",r),n.fire({icon:"error",title:"\u8A3B\u518A\u5931\u6557\uFF01"})}};return(r,o)=>(v(),h("div",null,[e("button",{class:"btn btn-info login-btn",type:"button",onClick:o[0]||(o[0]=s=>B(d).push({name:"Login"}))},"\u524D\u5F80\u767B\u5165"),e("div",U,[e("form",null,[A,D,e("div",R,[l(e("input",{type:"text",class:"form-control",id:"name-register","onUpdate:modelValue":o[1]||(o[1]=s=>t.value.displayName=s),autocomplete:"on"},null,512),[[i,t.value.displayName]]),x]),e("div",E,[l(e("input",{type:"url",class:"form-control",id:"photoUrl-register","onUpdate:modelValue":o[2]||(o[2]=s=>t.value.photoURL=s),autocomplete:"on"},null,512),[[i,t.value.photoURL]]),I]),e("div",L,[l(e("input",{type:"email",class:"form-control",id:"email-register","onUpdate:modelValue":o[3]||(o[3]=s=>t.value.email=s),autocomplete:"on"},null,512),[[i,t.value.email]]),N]),e("div",k,[l(e("input",{type:"password",class:"form-control",id:"password-register","onUpdate:modelValue":o[4]||(o[4]=s=>t.value.password=s),autocomplete:"on"},null,512),[[i,t.value.password]]),V]),e("button",{class:"w-100 btn btn-lg mt-3",type:"button",onClick:m,style:{color:"white","background-color":"mediumaquamarine"}}," \u53D6\u5F97\u9032\u5165\u8C6C\u8C6C\u4E16\u754C\u7684\u9580\u7968 ")])])]))}});var K=y(S,[["__scopeId","data-v-0e827606"]]);export{K as default};
|
@ -1 +1 @@
|
||||
import{_ as s}from"./index.c104fbd6.js";import{o as _,g as c,A as t,B as a,h as o}from"./vendor.961f4417.js";const n={},r=e=>(t("data-v-3833833e"),e=e(),a(),e),d={class:"spinner"},i=r(()=>o("div",{class:"bouncing-loader"},[o("div"),o("div"),o("div")],-1)),p=[i];function v(e,l){return _(),c("div",d,p)}var f=s(n,[["render",v],["__scopeId","data-v-3833833e"]]);export{f as S};
|
||||
import{_ as s}from"./index.ce021ef5.js";import{o as _,g as c,A as t,B as a,h as o}from"./vendor.961f4417.js";const n={},r=e=>(t("data-v-3833833e"),e=e(),a(),e),d={class:"spinner"},i=r(()=>o("div",{class:"bouncing-loader"},[o("div"),o("div"),o("div")],-1)),p=[i];function v(e,l){return _(),c("div",d,p)}var f=s(n,[["render",v],["__scopeId","data-v-3833833e"]]);export{f as S};
|
File diff suppressed because one or more lines are too long
1
assets/index.ce021ef5.js
Normal file
1
assets/index.ce021ef5.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
var e="/jm-expense-vue-ts/assets/logo2.c2cebf1e.png";export{e as _};
|
||||
var s="/assets/logo2.c2cebf1e.png";export{s as _};
|
||||
|
@ -1 +1 @@
|
||||
import{a as r}from"./index.c104fbd6.js";var l={getAll(){return r.get("/record/all")},getOne(e){return r.get(`/record/${e}`)},create(e){return r.post("/record/create",e)},edit(e,t){return r.put(`/record/edit/${e}`,t)},delete(e){return r.delete(`/record/delete/${e}`)},close(e){return r.put("/close",e)},getLogs(){return r.get("/log/all")}};export{l as r};
|
||||
import{a as r}from"./index.ce021ef5.js";var l={getAll(){return r.get("/record/all")},getOne(e){return r.get(`/record/${e}`)},create(e){return r.post("/record/create",e)},edit(e,t){return r.put(`/record/edit/${e}`,t)},delete(e){return r.delete(`/record/delete/${e}`)},close(e){return r.put("/close",e)},getLogs(){return r.get("/log/all")}};export{l as r};
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico" /> -->
|
||||
<link rel="icon" href="/jm-expense-vue-ts/assets/favicon.90f8b31e.ico" />
|
||||
<link rel="icon" href="/assets/favicon.90f8b31e.ico" />
|
||||
<!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> -->
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
|
||||
@ -11,9 +11,9 @@
|
||||
<!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
|
||||
<title>JM Expense</title>
|
||||
<script src="https://kit.fontawesome.com/ccfd93e9a7.js" crossorigin="anonymous"></script>
|
||||
<script type="module" crossorigin src="/jm-expense-vue-ts/assets/index.c104fbd6.js"></script>
|
||||
<link rel="modulepreload" href="/jm-expense-vue-ts/assets/vendor.961f4417.js">
|
||||
<link rel="stylesheet" href="/jm-expense-vue-ts/assets/index.3a274c7c.css">
|
||||
<script type="module" crossorigin src="/assets/index.ce021ef5.js"></script>
|
||||
<link rel="modulepreload" href="/assets/vendor.961f4417.js">
|
||||
<link rel="stylesheet" href="/assets/index.ce026788.css">
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
Loading…
Reference in New Issue
Block a user