You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
9.6 KiB
2 lines
9.6 KiB
|
4 months ago
|
import{d as Z,ge as j,r as _,y as N,G as z,a as h,c as T,b as A,q as J,H as M,$ as b,h as g,I as x,f as k,F as $,g as S,e as y,L as K,dZ as O,eS as W,eT as I,d_ as m,ab as D,aQ as ee,_ as le}from"./index-e450010e.js";const ae={class:"drawBodyBox"},te=Z({__name:"dimMea",props:{isShow:{type:Boolean,default:!1},dimMeaType:{type:Number,default:1},dimAry:{type:Array,default(){return[]}},meaAry:{type:Array,default(){return[]}}},emits:["update:isShow"],setup(U,{emit:F}){const G=j(),s=U,v=_(""),V=_("right"),d=_([]),n=_([]),o=N(()=>G.controlAttr),C=F,E=N({get:()=>{switch(s.dimMeaType){case 2:v.value="添加度量";break;case 3:v.value="添加过滤器";break;case 4:v.value="添加查询条件";break;default:v.value="添加维度";break}return L(),s.isShow},set:a=>{C("update:isShow",a)}}),B=()=>{C("update:isShow",!1)},f=(a,r)=>a.title+"("+r+")",i=(a,r)=>a.field+"|#$#|"+r,P=a=>{if(Array.isArray(d.value)){let r=new Array;d.value.forEach(u=>{let l=u.split("|#$#|");if(Array.isArray(l)&&l.length>1)switch(a){case 3:break;case 4:break;default:s.dimAry.forEach(e=>{if(e.field==l[0]){let p=!0;Array.isArray(o.value.x)&&o.value.x.length>0&&o.value.x.forEach(c=>{c.field==u&&(p=!1,r.push(c))}),p&&r.push({title:e.title+"("+l[l.length-1]+")",type:e.type,field:e.field,options:e.options,oldTitle:e.title+"("+l[l.length-1]+")",timeType:l[l.length-1],sort:1})}})}else switch(a){case 3:break;case 4:break;default:s.dimAry.forEach(e=>{if(console.log("维度组装-----1------->",e.field==u,e,u),e.field==u){let p=!0;Array.isArray(o.value.x)&&o.value.x.length>0&&o.value.x.forEach(c=>{c.field==u&&(p=!1,r.push(c))}),p&&r.push({title:e.title,type:e.type,field:e.field,options:e.options,oldTitle:e.title,timeType:"",sort:1})}})}}),o.value.x=r,console.log("维度组装",o.value)}},X=a=>{if(Array.isArray(n.value)&&n.value.length>0){let r=new Array;n.value.forEach(u=>{let l=u.split("|#$#|");if(Array.isArray(l)&&l.length>1)switch(a){case 3:break;case 4:break;default:s.meaAry.forEach(e=>{if(e.field==l[0]){let p=!0;Array.isArray(o.value.y)&&o.value.y.length>0&&o.value.y.forEach(c=>{c.field==u&&(p=!1,r.push(c))}),p&&r.push({title:e.title+"("+l[l.length-1]+")",type:e.type,field:e.field,options:e.options,oldTitle:e.title+"("+l[l.length-1]+")",timeType:l[l.length-1],sort:1})}})}else switch(a){case 3:break;case 4:break;default:s.meaAry.forEach(e=>{if(console.log("维度组装-----1------->",e.field==u,e,u),e.field==u){let p=!0;Array.isArray(o.value.y)&&o.value.y.length>0&&o.value.y.forEach(c=>{c.field==u&&(p=!1,r.push(c))}),p&&r.push({title:e.title,type:e.type,field:e.field,options:e.options,oldTitle:e.title,timeType:"",sort:1})}})}}),o.value.y=r}},Y=()=>{console.log("维度数据--->",d.value,s.dimAry),console.log("量度数据--->",n.value);let a=new Array;Array.isArray(d.value)&&d.value.length>0&&d.value.forEach(u=>{let l=u.split("|#$#|");Array.isArray(l)&&l.length>1?s.dimAry.forEach(e=>{e.field==l[0]&&a.push({lable:e.title+"("+l[l.length-1]+")",type:3,field:e.field,options:e.options,oldTitle:e.title+"("+l[l.length-1]+")",timeType:l[l.length-1],sort:1,conditions:"",method:1,modality:1,modalityList:[],startTime:"",endTime:"",meadim:1})}):s.dimAry.forEach(e=>{e.field==u&&a.push({lable:e.title,type:e.type,field:e.field,options:e.options,oldTitle:e.title,timeType:"",sort:1,conditions:"",method:1,modality:1,modalityList:[],startTime:"",endTime:"",meadim:1})})});let r=new Array;Array.isArray(n.value)&&n.value.length>0&&n.value.forEach(u=>{let l=u.split("|#$#|");Array.isArray(l)&&l.length>1?s.meaAry.forEach(e=>{e.field==l[0]&&r.push({lable:e.title+"("+l[l.length-1]+")",type:3,field:e.field,options:e.options,oldTitle:e.title+"("+l[l.length-1]+")",timeType:l[l.length-1],sort:1,conditions:"",method:1,modality:1,modalityList:[],startTime:"",endTime:"",meadim:2})}):s.meaAry.forEach(e=>{e.field==u&&r.push({lable:e.title,type:e.type,field:e.field,options:e.options,oldTitle:e.title,timeType:"",sort:1,conditions:"",method:1,modality:1,modalityList:[],startTime:"",endTime:"",meadim:2})})}),console.log("量度数据-23-->",a),console.log("量度数据--34->
|