1 |
- import{X as o}from"./index.4e34480b.js";import{u as i}from"./vue.9083513e.js";function c(n,t){const a={},e={legend:{selected:{}},yAxis:[],series:[]};for(const s of t)a[s.color]=s;for(const s of n.series){const r=s.itemStyle.color,d=a[r];d?(e.series.push({id:s.id,name:d.label,encode:{y:d.metric}}),e.yAxis.push({id:s.id,name:d.label,show:!0})):e.yAxis.push({id:s.id,show:!1})}for(const s of Object.keys(n.legend.selected))o.findIndexOf(t,r=>r.label===s)===-1?e.legend.selected[s]=!1:e.legend.selected[s]=!0;return e}function m(n){const t={};for(const a in n){const e=i(n[a]);a==="currentDate"?(e.dailyStartDate&&e.dailyTime&&(t.data_start_date=e.dailyStartDate,t.data_end_date=e.dailyTime),e.weekStartDate&&e.weekEndDate&&(t.data_start_date=e.weekStartDate,t.data_end_date=e.weekEndDate),e.startDate&&e.endDate&&(t.data_start_date=e.startDate,t.data_end_date=e.endDate)):a==="taskIds"?t.task_ids=e:t[a]=e}return t}function u(n){const t={};for(const a in n){const e=i(n[a]);a==="monthCurrentDate"?(t.month_start_date=e.startDate,t.month_end_date=e.endDate):a==="taskIds"?t.task_ids=e:t[a]=e}return t}export{c as b,u as m,m as p};
|