mower-ng/ui/dist/assets/RecordLine.js
2024-11-25 11:58:42 +08:00

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 p,s as G,bC as y,by as u,bw as o,bv as l,bt as r,F as K,bD as Q,bo as e,bu as f,bI as U,bE as W,bJ as Y,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(i,c){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),de=[ce];var pe=C.default=(0,m.defineComponent)({name:"ArrowsDiagonalMinimize2",render:function(i,c){return(0,m.openBlock)(),(0,m.createElementBlock)("svg",ie,de)}}),$={};Object.defineProperty($,"__esModule",{value:!0});const n=w,ue={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},_e=(0,n.createElementVNode)("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[(0,n.createElementVNode)("path",{d:"M7 8l-4 4l4 4"}),(0,n.createElementVNode)("path",{d:"M17 8l4 4l-4 4"}),(0,n.createElementVNode)("path",{d:"M3 12h18"})],-1),me=[_e];var he=$.default=(0,n.defineComponent)({name:"ArrowsHorizontal",render:function(i,c){return(0,n.openBlock)(),(0,n.createElementBlock)("svg",ue,me)}});const ge={class:"line-outer-container"},fe={__name:"RecordLine",setup(h){const i=N(),{getMoodRatios:c}=i;V.register(j,D,L,P,R,O,H,I,T,F,q,J);const d=p(-1),t=p([]),g=p([]);G(async()=>{g.value=await c(),t.value=new Array(g.value.length).fill(100)});const B=p({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(a){t.value[a]==100?t.value[a]=300:t.value[a]==300?t.value[a]=700:t.value[a]=100}return(a,v)=>{const k=ee,b=te,E=ne,A=oe;return r(),y("div",null,[v[0]||(v[0]=u("h1",{class:"page-title"},"干员心情折线表",-1)),o(A,{"x-gap":12,"y-gap":8,collapsed:!1,cols:"1 s:1 m:2 l:3 xl:4 2xl:5",responsive:"screen"},{default:l(()=>[(r(!0),y(K,null,Q(e(g),(x,s)=>(r(),f(E,{key:s,class:U(["report-card",{"report-card-expand":e(d)==s}])},{default:l(()=>[u("h2",null,W(x.groupName),1),u("div",ge,[u("div",{class:"line-inner-container",style:Y({width:e(t)[s]+"%"})},[o(e(X),{data:x.moodData,options:e(B)},null,8,["data","options"])],4)]),o(b,{class:"toggle toggle-size",size:"small",onClick:z=>d.value=e(d)==-1?s:-1,focusable:!1},{icon:l(()=>[o(k,null,{default:l(()=>[e(d)==s?(r(),f(e(pe),{key:0})):(r(),f(e(re),{key:1}))]),_:2},1024)]),_:2},1032,["onClick"]),o(b,{class:"toggle toggle-width",size:"small",onClick:z=>S(s),focusable:!1},{icon:l(()=>[o(k,null,{default:l(()=>[o(e(he))]),_:1})]),_:2},1032,["onClick"])]),_:2},1032,["class"]))),128))]),_:1})])}}},ye=Z(fe,[["__scopeId","data-v-1d70fb0d"]]);export{ye as default};