1 line
3.7 KiB
JavaScript
1 line
3.7 KiB
JavaScript
import{u as N,C as V,a as j,L as D,T as L,b as P,P as R,c as O,p as H,d as I,e as T,f as F,A as q,g as J,h as X}from"./record.js";import{bm as w,br as Z,r as u,s as G,bC as y,by as d,bw as t,bv as s,bt as l,F as K,bD as Q,bu as v,bI as U,bE as W,bJ as Y,bo as p,aX as ee,b3 as te}from"./_plugin-vue_export-helper.js";import{b as oe,_ as ne}from"./Grid.js";import"./main.js";import"./get-slot.js";var M={};Object.defineProperty(M,"__esModule",{value:!0});const _=w,ae={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},se=(0,_.createStaticVNode)('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 4h4v4"></path><path d="M14 10l6-6"></path><path d="M8 20H4v-4"></path><path d="M4 20l6-6"></path></g>',1),le=[se];var re=M.default=(0,_.defineComponent)({name:"ArrowsDiagonal",render:function(r,i){return(0,_.openBlock)(),(0,_.createElementBlock)("svg",ae,le)}}),C={};Object.defineProperty(C,"__esModule",{value:!0});const m=w,ie={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ce=(0,m.createStaticVNode)('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 10h-4V6"></path><path d="M20 4l-6 6"></path><path d="M6 14h4v4"></path><path d="M10 14l-6 6"></path></g>',1),ue=[ce];var de=C.default=(0,m.defineComponent)({name:"ArrowsDiagonalMinimize2",render:function(r,i){return(0,m.openBlock)(),(0,m.createElementBlock)("svg",ie,ue)}}),$={};Object.defineProperty($,"__esModule",{value:!0});const o=w,pe={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},_e=(0,o.createElementVNode)("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[(0,o.createElementVNode)("path",{d:"M7 8l-4 4l4 4"}),(0,o.createElementVNode)("path",{d:"M17 8l4 4l-4 4"}),(0,o.createElementVNode)("path",{d:"M3 12h18"})],-1),me=[_e];var he=$.default=(0,o.defineComponent)({name:"ArrowsHorizontal",render:function(r,i){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",pe,me)}});const ge={class:"line-outer-container"},ve={__name:"RecordLine",setup(h){const r=N(),{getMoodRatios:i}=r;V.register(j,D,L,P,R,O,H,I,T,F,q,J);const c=u(-1),e=u([]),g=u([]);G(async()=>{g.value=await i(),e.value=new Array(g.value.length).fill(100)});const B=u({responsive:!0,maintainAspectRatio:!1,scales:{x:{autoSkip:!0,type:"time",time:{unit:"day"}},y:{beginAtZero:!0,ticks:{min:0,max:24,stepSize:4}}},plugins:{datalabels:{display:!1}}});function S(n){e.value[n]==100?e.value[n]=300:e.value[n]==300?e.value[n]=700:e.value[n]=100}return(n,f)=>{const k=ee,b=te,E=ne,A=oe;return l(),y("div",null,[f[0]||(f[0]=d("h1",{class:"page-title"},"干员心情折线表",-1)),t(A,{"x-gap":12,"y-gap":8,collapsed:!1,cols:"1 s:1 m:2 l:3 xl:4 2xl:5",responsive:"screen"},{default:s(()=>[(l(!0),y(K,null,Q(g.value,(x,a)=>(l(),v(E,{key:a,class:U(["report-card",{"report-card-expand":c.value==a}])},{default:s(()=>[d("h2",null,W(x.groupName),1),d("div",ge,[d("div",{class:"line-inner-container",style:Y({width:e.value[a]+"%"})},[t(p(X),{data:x.moodData,options:B.value},null,8,["data","options"])],4)]),t(b,{class:"toggle toggle-size",size:"small",onClick:z=>c.value=c.value==-1?a:-1,focusable:!1},{icon:s(()=>[t(k,null,{default:s(()=>[c.value==a?(l(),v(p(de),{key:0})):(l(),v(p(re),{key:1}))]),_:2},1024)]),_:2},1032,["onClick"]),t(b,{class:"toggle toggle-width",size:"small",onClick:z=>S(a),focusable:!1},{icon:s(()=>[t(k,null,{default:s(()=>[t(p(he))]),_:1})]),_:2},1032,["onClick"])]),_:2},1032,["class"]))),128))]),_:1})])}}},ye=Z(ve,[["__scopeId","data-v-25048cec"]]);export{ye as default};
|