10 changed files with 6421 additions and 109 deletions
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,842 @@ |
|||
<!-- |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-06-27 14:50:32 |
|||
@ 备注: 维度与计量字段 |
|||
--> |
|||
<script lang="ts" setup> |
|||
import type { CollapseIconPositionType } from "element-plus"; |
|||
import { useDesignEchartsStore } from "@/store/DesignForm/designForm"; |
|||
import { dimMeaInfo, filterInfo } from "@/api/chart/type"; |
|||
const store = useDesignEchartsStore() as any; //自定义表单存储器 |
|||
|
|||
const props = defineProps({ |
|||
isShow: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
dimMeaType: { |
|||
type: Number, |
|||
default: 1, |
|||
}, |
|||
dimAry: { |
|||
type: Array, |
|||
default() { |
|||
return []; |
|||
}, |
|||
}, |
|||
meaAry: { |
|||
type: Array, |
|||
default() { |
|||
return []; |
|||
}, |
|||
}, |
|||
sunDimAry: { |
|||
type: Array, |
|||
default() { |
|||
return []; |
|||
}, |
|||
}, |
|||
sunMeaAry: { |
|||
type: Array, |
|||
default() { |
|||
return []; |
|||
}, |
|||
}, |
|||
}); |
|||
const drawTitle = ref(""); |
|||
const leftPick = ref<CollapseIconPositionType>("right"); |
|||
const checkDimList = ref<any>([]); |
|||
const checkMeaList = ref<any>([]); |
|||
//获取当前激活的项目 |
|||
const controlData = computed(() => { |
|||
return store.controlAttr; |
|||
}); |
|||
const emits = defineEmits(["update:isShow"]); |
|||
const openClose = computed({ |
|||
get: () => { |
|||
switch (props.dimMeaType) { |
|||
case 2: |
|||
drawTitle.value = "添加度量"; |
|||
break; |
|||
case 3: |
|||
drawTitle.value = "添加过滤器"; |
|||
break; |
|||
case 4: |
|||
drawTitle.value = "添加查询条件"; |
|||
break; |
|||
default: |
|||
drawTitle.value = "添加维度"; |
|||
|
|||
break; |
|||
} |
|||
huanyuan(); |
|||
return props.isShow; |
|||
}, |
|||
set: (newVal: any) => { |
|||
emits("update:isShow", newVal); |
|||
}, |
|||
}); |
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-06-27 14:39:42 |
|||
@ 功能: 关闭 |
|||
*/ |
|||
const handleClose = () => { |
|||
emits("update:isShow", false); |
|||
}; |
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-06-27 15:52:20 |
|||
@ 功能: 返回时间题目 |
|||
*/ |
|||
const timeTitle = (field: dimMeaInfo, typ: string) => { |
|||
return field.title + "(" + typ + ")"; |
|||
}; |
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-06-27 15:52:20 |
|||
@ 功能: 返回时间值 |
|||
*/ |
|||
const timeVal = (field: dimMeaInfo, typ: string) => { |
|||
return field.field + "|#$#|" + typ; |
|||
}; |
|||
|
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-06-30 08:34:44 |
|||
@ 功能: 维度组装 |
|||
*/ |
|||
const dimMakecont = (val: number) => { |
|||
console.log("维度组装-------->",checkDimList.value) |
|||
if (Array.isArray(checkDimList.value)) { |
|||
let fieldAry = new Array(); |
|||
checkDimList.value.forEach((item: any) => { |
|||
let valAry = item.split("|#$#|"); |
|||
|
|||
if (Array.isArray(valAry) && valAry.length > 1) { |
|||
switch (val) { |
|||
case 3: |
|||
break; |
|||
case 4: |
|||
break; |
|||
default: |
|||
props.dimAry.forEach((itemDim) => { |
|||
if (itemDim.field == valAry[0]) { |
|||
let isNew = true; |
|||
if ( |
|||
Array.isArray(controlData.value.x) && |
|||
controlData.value.x.length > 0 |
|||
) { |
|||
controlData.value.x.forEach((xItem: any) => { |
|||
if (xItem.field == item) { |
|||
isNew = false; |
|||
fieldAry.push(xItem); |
|||
} |
|||
}); |
|||
} |
|||
if (isNew) { |
|||
fieldAry.push({ |
|||
title: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
type: itemDim.type, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
timeType: valAry[valAry.length - 1], |
|||
sort: 1, |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
} else { |
|||
switch (val) { |
|||
case 3: |
|||
break; |
|||
case 4: |
|||
break; |
|||
default: |
|||
props.dimAry.forEach((itemDim) => { |
|||
console.log("维度组装-----1------->", itemDim.field == item, itemDim, item); |
|||
if (itemDim.field == item) { |
|||
let isNew = true; |
|||
if ( |
|||
Array.isArray(controlData.value.x) && |
|||
controlData.value.x.length > 0 |
|||
) { |
|||
controlData.value.x.forEach((xItem: any) => { |
|||
if (xItem.field == item) { |
|||
isNew = false; |
|||
fieldAry.push(xItem); |
|||
} |
|||
}); |
|||
} |
|||
if (isNew) { |
|||
fieldAry.push({ |
|||
title: itemDim.title, |
|||
type: itemDim.type, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title, |
|||
timeType: "", |
|||
sort: 1, |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
controlData.value.x = fieldAry; |
|||
console.log("维度组装", controlData.value); |
|||
} |
|||
//子表维度 |
|||
if(Array.isArray(checkListsund.value)){ |
|||
let sunFieldAry = new Array(); |
|||
|
|||
|
|||
if (Array.isArray(props.sunDimAry.value) && props.sunDimAry.value> 1){ |
|||
console.log("子维度组装-----2------->", props.sunDimAry); |
|||
}else{ |
|||
console.log("子维度组装-----3------->", props.sunDimAry); |
|||
console.log("子维度组装-----3------->", controlData.value.xsun); |
|||
} |
|||
|
|||
|
|||
checkListsund.value.forEach((item: any) => { |
|||
|
|||
}) |
|||
} |
|||
}; |
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-06-30 14:21:28 |
|||
@ 功能: 组装度量 |
|||
*/ |
|||
const meaMakecont = (val: number) => { |
|||
// "组装度量--->", |
|||
// Array.isArray(checkMeaList.value), |
|||
// checkMeaList.value.length, |
|||
// checkMeaList.value |
|||
// ); |
|||
console.log("组装度量--------->",checkMeaList.value) |
|||
if (Array.isArray(checkMeaList.value) && checkMeaList.value.length > 0) { |
|||
let fieldAry = new Array(); |
|||
checkMeaList.value.forEach((item: any) => { |
|||
let valAry = item.split("|#$#|"); |
|||
if (Array.isArray(valAry) && valAry.length > 1) { |
|||
switch (val) { |
|||
case 3: |
|||
break; |
|||
case 4: |
|||
break; |
|||
default: |
|||
props.meaAry.forEach((itemDim) => { |
|||
if (itemDim.field == valAry[0]) { |
|||
let isNew = true; |
|||
if ( |
|||
Array.isArray(controlData.value.y) && |
|||
controlData.value.y.length > 0 |
|||
) { |
|||
controlData.value.y.forEach((yItem: any) => { |
|||
if (yItem.field == item) { |
|||
isNew = false; |
|||
fieldAry.push(yItem); |
|||
} |
|||
}); |
|||
} |
|||
if (isNew) { |
|||
fieldAry.push({ |
|||
title: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
type: itemDim.type, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
timeType: valAry[valAry.length - 1], |
|||
sort: 1, |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
} else { |
|||
switch (val) { |
|||
case 3: |
|||
break; |
|||
case 4: |
|||
break; |
|||
default: |
|||
props.meaAry.forEach((itemDim) => { |
|||
console.log("维度组装-----1------->", itemDim.field == item, itemDim, item); |
|||
if (itemDim.field == item) { |
|||
let isNew = true; |
|||
if ( |
|||
Array.isArray(controlData.value.y) && |
|||
controlData.value.y.length > 0 |
|||
) { |
|||
controlData.value.y.forEach((xItem: any) => { |
|||
if (xItem.field == item) { |
|||
isNew = false; |
|||
fieldAry.push(xItem); |
|||
} |
|||
}); |
|||
} |
|||
if (isNew) { |
|||
fieldAry.push({ |
|||
title: itemDim.title, |
|||
type: itemDim.type, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title, |
|||
timeType: "", |
|||
sort: 1, |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
controlData.value.y = fieldAry; |
|||
} |
|||
}; |
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-07-03 09:34:59 |
|||
@ 功能: 组装过滤器 |
|||
*/ |
|||
const meaDimCont = () => { |
|||
console.log("维度数据--->", checkDimList.value, props.dimAry); |
|||
console.log("量度数据--->", checkMeaList.value); |
|||
let fieldAry = new Array(); |
|||
if (Array.isArray(checkDimList.value) && checkDimList.value.length > 0) { |
|||
checkDimList.value.forEach((item: any) => { |
|||
let valAry = item.split("|#$#|"); |
|||
if (Array.isArray(valAry) && valAry.length > 1) { |
|||
props.dimAry.forEach((itemDim) => { |
|||
if (itemDim.field == valAry[0]) { |
|||
fieldAry.push({ |
|||
lable: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
type: 3, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
timeType: valAry[valAry.length - 1], |
|||
sort: 1, |
|||
conditions: "", |
|||
method: 1, |
|||
modality: 1, |
|||
modalityList: [], |
|||
startTime: "", |
|||
endTime: "", |
|||
meadim: 1, |
|||
}); |
|||
} |
|||
}); |
|||
} else { |
|||
props.dimAry.forEach((itemDim) => { |
|||
if (itemDim.field == item) { |
|||
fieldAry.push({ |
|||
lable: itemDim.title, |
|||
type: itemDim.type, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title, |
|||
timeType: "", |
|||
sort: 1, |
|||
conditions: "", |
|||
method: 1, |
|||
modality: 1, |
|||
modalityList: [], |
|||
startTime: "", |
|||
endTime: "", |
|||
meadim: 1, |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
let fieldMeaAry = new Array(); |
|||
if (Array.isArray(checkMeaList.value) && checkMeaList.value.length > 0) { |
|||
checkMeaList.value.forEach((item: any) => { |
|||
let valAry = item.split("|#$#|"); |
|||
if (Array.isArray(valAry) && valAry.length > 1) { |
|||
props.meaAry.forEach((itemDim) => { |
|||
if (itemDim.field == valAry[0]) { |
|||
fieldMeaAry.push({ |
|||
lable: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
type: 3, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
timeType: valAry[valAry.length - 1], |
|||
sort: 1, |
|||
conditions: "", |
|||
method: 1, |
|||
modality: 1, |
|||
modalityList: [], |
|||
startTime: "", |
|||
endTime: "", |
|||
meadim: 2, |
|||
}); |
|||
} |
|||
}); |
|||
} else { |
|||
props.meaAry.forEach((itemDim) => { |
|||
if (itemDim.field == item) { |
|||
fieldMeaAry.push({ |
|||
lable: itemDim.title, |
|||
type: itemDim.type, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title, |
|||
timeType: "", |
|||
sort: 1, |
|||
conditions: "", |
|||
method: 1, |
|||
modality: 1, |
|||
modalityList: [], |
|||
startTime: "", |
|||
endTime: "", |
|||
meadim: 2, |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
console.log("量度数据-23-->", fieldAry); |
|||
console.log("量度数据--34->", fieldMeaAry); |
|||
|
|||
controlData.value.filter.splice(0, controlData.value.filter.length); |
|||
console.log("量度数据--55->", controlData.value.filter); |
|||
controlData.value.filter.push(...fieldAry, ...fieldMeaAry); |
|||
console.log("量度数据--66->", controlData.value.filter); |
|||
}; |
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-07-07 14:07:17 |
|||
@ 功能: 组装搜索条件 |
|||
*/ |
|||
const searchList = () => { |
|||
let fieldAry = new Array(); |
|||
if (Array.isArray(checkDimList.value) && checkDimList.value.length > 0) { |
|||
checkDimList.value.forEach((item: any) => { |
|||
let valAry = item.split("|#$#|"); |
|||
if (Array.isArray(valAry) && valAry.length > 1) { |
|||
props.dimAry.forEach((itemDim) => { |
|||
if (itemDim.field == valAry[0]) { |
|||
fieldAry.push({ |
|||
lable: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
type: itemDim.type, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
timeType: valAry[valAry.length - 1], |
|||
sort: 1, |
|||
isTime: true, |
|||
value: "", |
|||
startTime: "", |
|||
endTime: "", |
|||
coor: "Y", |
|||
}); |
|||
} |
|||
}); |
|||
} else { |
|||
props.dimAry.forEach((itemDim) => { |
|||
if (itemDim.field == item) { |
|||
fieldAry.push({ |
|||
lable: itemDim.title, |
|||
type: itemDim.type, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title, |
|||
timeType: "", |
|||
sort: 1, |
|||
isTime: false, |
|||
value: "", |
|||
startTime: "", |
|||
endTime: "", |
|||
coor: "Y", |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
let fieldMeaAry = new Array(); |
|||
if (Array.isArray(checkMeaList.value) && checkMeaList.value.length > 0) { |
|||
checkMeaList.value.forEach((item: any) => { |
|||
let valAry = item.split("|#$#|"); |
|||
if (Array.isArray(valAry) && valAry.length > 1) { |
|||
props.meaAry.forEach((itemDim) => { |
|||
if (itemDim.field == valAry[0]) { |
|||
fieldMeaAry.push({ |
|||
lable: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
type: 3, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title + "(" + valAry[valAry.length - 1] + ")", |
|||
timeType: valAry[valAry.length - 1], |
|||
sort: 1, |
|||
isTime: true, |
|||
value: "", |
|||
startTime: "", |
|||
endTime: "", |
|||
coor: "X", |
|||
}); |
|||
} |
|||
}); |
|||
} else { |
|||
props.meaAry.forEach((itemDim) => { |
|||
if (itemDim.field == item) { |
|||
fieldMeaAry.push({ |
|||
lable: itemDim.title, |
|||
type: itemDim.type, |
|||
field: itemDim.field, |
|||
options: itemDim.options, |
|||
oldTitle: itemDim.title, |
|||
timeType: "", |
|||
sort: 1, |
|||
isTime: false, |
|||
value: "", |
|||
startTime: "", |
|||
endTime: "", |
|||
coor: "X", |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
console.log("量度数据-23-->", fieldAry); |
|||
console.log("量度数据--34->", fieldMeaAry); |
|||
controlData.value.search.factor.splice(0, controlData.value.search.factor.length); |
|||
console.log("量度数据--55->", controlData.value.search.factor); |
|||
controlData.value.search.factor.push(...fieldAry, ...fieldMeaAry); |
|||
console.log("量度数据--66->", controlData.value.search); |
|||
}; |
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-06-27 16:12:49 |
|||
@ 功能: 确定选择 |
|||
*/ |
|||
const pickDimMeaSet = () => { |
|||
console.log("确定选择", props.dimMeaType); |
|||
console.log( |
|||
"确定选择----------checkListsunduLiang-------------->", |
|||
checkListsunduLiang.value |
|||
); |
|||
console.log( |
|||
"确定选择----------checkListsund-------------->", |
|||
checkListsund.value |
|||
); |
|||
|
|||
switch (props.dimMeaType) { |
|||
case 2: |
|||
drawTitle.value = "添加度量"; |
|||
meaMakecont(props.dimMeaType); |
|||
break; |
|||
case 3: |
|||
drawTitle.value = "添加过滤器"; |
|||
meaDimCont(); |
|||
break; |
|||
case 4: |
|||
drawTitle.value = "添加查询条件"; |
|||
searchList(); |
|||
break; |
|||
default: |
|||
drawTitle.value = "添加维度"; |
|||
dimMakecont(props.dimMeaType); |
|||
break; |
|||
} |
|||
makeSunTableStruct() |
|||
handleClose(); |
|||
}; |
|||
|
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-08-27 10:20:38 |
|||
@ 功能: 组装子表数据结构 |
|||
*/ |
|||
const makeSunTableStruct = () => { |
|||
if(checkListsund.value&& checkListsund.value.length>0){ |
|||
checkListsund.value.forEach((item:any)=>{ |
|||
console.log("组装子表数据结构--->",item) |
|||
}) |
|||
} |
|||
if(checkListsunduLiang.value&& checkListsunduLiang.value.length>0){ |
|||
checkListsunduLiang.value.forEach((item:any)=>{ |
|||
console.log("组装子表数据结构-checkListsunduLiang-->",item) |
|||
}) |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-06-30 14:28:37 |
|||
@ 功能: 初始化加载 |
|||
*/ |
|||
onMounted(() => { |
|||
huanyuan(); |
|||
}); |
|||
|
|||
/** |
|||
@ 作者: 秦东 |
|||
@ 时间: 2025-06-30 15:45:56 |
|||
@ 功能: 还原数据 |
|||
*/ |
|||
const huanyuan = () => { |
|||
switch (props.dimMeaType) { |
|||
case 2: |
|||
checkMeaList.value.splice(0, checkMeaList.value.length); |
|||
if ( |
|||
controlData.value.y && |
|||
Array.isArray(controlData.value.y) && |
|||
controlData.value.y.length > 0 |
|||
) { |
|||
controlData.value.y.forEach((item: any) => { |
|||
if (item.timeType != "") { |
|||
checkMeaList.value.push(timeVal(item, item.timeType)); |
|||
} else { |
|||
checkMeaList.value.push(item.field); |
|||
} |
|||
}); |
|||
} |
|||
break; |
|||
case 3: |
|||
checkMeaList.value.splice(0, checkMeaList.value.length); |
|||
checkDimList.value.splice(0, checkDimList.value.length); |
|||
if ( |
|||
controlData.value.filter && |
|||
Array.isArray(controlData.value.filter) && |
|||
controlData.value.filter.length > 0 |
|||
) { |
|||
controlData.value.filter.forEach((item: any) => { |
|||
if (item.meadim == 1) { |
|||
if (item.timeType != "") { |
|||
checkDimList.value.push(timeVal(item, item.timeType)); |
|||
} else { |
|||
checkDimList.value.push(item.field); |
|||
} |
|||
} else { |
|||
if (item.timeType != "") { |
|||
checkMeaList.value.push(timeVal(item, item.timeType)); |
|||
} else { |
|||
checkMeaList.value.push(item.field); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
break; |
|||
case 4: |
|||
drawTitle.value = "添加查询条件"; |
|||
checkMeaList.value.splice(0, checkMeaList.value.length); |
|||
checkDimList.value.splice(0, checkDimList.value.length); |
|||
if ( |
|||
controlData.value.search.factor && |
|||
Array.isArray(controlData.value.search.factor) && |
|||
controlData.value.search.factor.length > 0 |
|||
) { |
|||
controlData.value.search.factor.forEach((item: any) => { |
|||
if (item.meadim == 1) { |
|||
if (item.timeType != "") { |
|||
checkDimList.value.push(timeVal(item, item.timeType)); |
|||
} else { |
|||
checkDimList.value.push(item.field); |
|||
} |
|||
} else { |
|||
if (item.timeType != "") { |
|||
checkMeaList.value.push(timeVal(item, item.timeType)); |
|||
} else { |
|||
checkMeaList.value.push(item.field); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
break; |
|||
default: |
|||
checkDimList.value.splice(0, checkDimList.value.length); |
|||
if ( |
|||
controlData.value.x && |
|||
Array.isArray(controlData.value.x) && |
|||
controlData.value.x.length > 0 |
|||
) { |
|||
controlData.value.x.forEach((item: any) => { |
|||
if (item.timeType != "") { |
|||
checkDimList.value.push(timeVal(item, item.timeType)); |
|||
} else { |
|||
checkDimList.value.push(item.field); |
|||
} |
|||
}); |
|||
} |
|||
break; |
|||
} |
|||
}; |
|||
//维度变化设定 |
|||
const weiduBianhua = () => { |
|||
console.log("------------------->", checkDimList.value); |
|||
checkDimList.value = checkDimList.value.slice(-1); |
|||
console.log("------------------->", checkDimList.value); |
|||
return false; |
|||
}; |
|||
//度量变化 |
|||
const duliangBianhua = () => { |
|||
// console.log("------------------->", checkMeaList.value); |
|||
// console.log("------------------->", controlData.value.type); |
|||
if (controlData.value.type == "barRace") { |
|||
checkMeaList.value = checkMeaList.value.slice(-1); |
|||
} |
|||
}; |
|||
const checkListsund = ref([]); |
|||
const checkListsunduLiang = ref([]); |
|||
</script> |
|||
<template> |
|||
<el-drawer |
|||
v-model="openClose" |
|||
:title="drawTitle" |
|||
direction="rtl" |
|||
:before-close="handleClose" |
|||
> |
|||
<div class="drawBodyBox"> |
|||
<el-divider |
|||
v-if="props.dimMeaType == 3 || props.dimMeaType == 4" |
|||
content-position="left" |
|||
>维度</el-divider |
|||
> |
|||
{{ checkDimList }} |
|||
<el-checkbox-group |
|||
v-if="props.dimMeaType == 1 || props.dimMeaType == 3 || props.dimMeaType == 4" |
|||
v-model="checkDimList" |
|||
@change="weiduBianhua" |
|||
> |
|||
<div v-for="(item, index) in props.dimAry"> |
|||
|
|||
<el-checkbox v-if="item.type == 1" :label="item.title" :value="item.field" /> |
|||
<el-collapse v-if="item.type == 3" :expand-icon-position="leftPick"> |
|||
<el-collapse-item :title="item.title" :name="index"> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'ymdhms')" |
|||
:value="timeVal(item, 'ymdhms')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'year')" |
|||
:value="timeVal(item, 'year')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'month')" |
|||
:value="timeVal(item, 'month')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'day')" |
|||
:value="timeVal(item, 'day')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'hour')" |
|||
:value="timeVal(item, 'hour')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'minute')" |
|||
:value="timeVal(item, 'minute')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'second')" |
|||
:value="timeVal(item, 'second')" |
|||
/> |
|||
</el-collapse-item> |
|||
</el-collapse> |
|||
</div> |
|||
</el-checkbox-group> |
|||
|
|||
<el-divider |
|||
v-if="(props.dimMeaType == 3 || props.dimMeaType == 4) " |
|||
content-position="left" |
|||
>子表</el-divider |
|||
> |
|||
<el-tabs v-if="props.dimMeaType != 2" type="border-card"> |
|||
<el-tab-pane v-for="(item, index) in props.sunMeaAry" :label="item.tableName" :key="index"> |
|||
<el-checkbox-group v-model="checkListsund"> |
|||
<div v-for="(iv, idx) in item.tableUnit"> |
|||
<el-checkbox :value="iv" :label="iv.title" size="large" :key="idx" /> |
|||
</div> |
|||
</el-checkbox-group> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
|
|||
<el-divider |
|||
v-if="props.dimMeaType == 3 || props.dimMeaType == 4" |
|||
content-position="left" |
|||
>度量</el-divider |
|||
> |
|||
|
|||
<el-checkbox-group |
|||
v-if="props.dimMeaType == 2 || props.dimMeaType == 3 || props.dimMeaType == 4" |
|||
v-model="checkMeaList" |
|||
@change="duliangBianhua" |
|||
> |
|||
<div v-for="(item, index) in props.meaAry"> |
|||
<el-checkbox v-if="item.type == 2" :label="item.title" :value="item.field" /> |
|||
<el-collapse v-if="item.type == 3" :expand-icon-position="leftPick"> |
|||
<el-collapse-item :title="item.title" :name="index"> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'ymdhms')" |
|||
:value="timeVal(item, 'ymdhms')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'year')" |
|||
:value="timeVal(item, 'year')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'onth')" |
|||
:value="timeVal(item, 'onth')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'day')" |
|||
:value="timeVal(item, 'day')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'hour')" |
|||
:value="timeVal(item, 'hour')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'minute')" |
|||
:value="timeVal(item, 'minute')" |
|||
/> |
|||
<el-checkbox |
|||
:label="timeTitle(item, 'second')" |
|||
:value="timeVal(item, 'second')" |
|||
/> |
|||
</el-collapse-item> |
|||
</el-collapse> |
|||
</div> |
|||
</el-checkbox-group> |
|||
<el-divider |
|||
v-if="(props.dimMeaType == 3 || props.dimMeaType == 4) " |
|||
content-position="left" |
|||
>子表</el-divider |
|||
> |
|||
<el-tabs v-if="props.dimMeaType != 1 " type="border-card"> |
|||
<el-tab-pane v-for="(item, index) in props.sunDimAry" :label="item.tableName" :key="index"> |
|||
<el-checkbox-group v-model="checkListsunduLiang"> |
|||
<div v-for="(iv, idx) in item.tableUnit"> |
|||
<el-checkbox :value="iv" :label="iv.title" size="large" :key="idx" /> |
|||
</div> |
|||
</el-checkbox-group> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
|
|||
<el-button class="drawBut" type="primary" @click="pickDimMeaSet()">确定</el-button> |
|||
</div> |
|||
</el-drawer> |
|||
</template> |
|||
<style lang="scss" scoped> |
|||
.drawBodyBox { |
|||
padding: 0 10px; |
|||
} |
|||
.drawBut { |
|||
width: 100%; |
|||
margin-top: 20px; |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue