统计分析
This commit is contained in:
parent
4a8bce3b04
commit
0ea9ce926e
@ -79,7 +79,7 @@
|
||||
:data="attrTableData"
|
||||
ref="attributeTableRef"
|
||||
@select="selectTable"
|
||||
@selectAll="selectAllTable"
|
||||
@selectAll="selectTable"
|
||||
row-key="id"
|
||||
class="attrtable"
|
||||
>
|
||||
@ -271,30 +271,18 @@ const initSelect = () => {
|
||||
const multipleSelection: any = ref([])
|
||||
|
||||
const selectTable = (section: any) => {
|
||||
const defaultCode = multipleSelection.value.map((item: any) => item.attributeCode)
|
||||
const addSection = section
|
||||
.filter((item: any) => !defaultCode.includes(item.attributeCode))
|
||||
.map((item: any) => {
|
||||
return {
|
||||
attributeName: item.attributeName,
|
||||
attributeCode: item.attributeCode,
|
||||
unit: item.unit,
|
||||
}
|
||||
})
|
||||
multipleSelection.value = [...multipleSelection.value, ...addSection]
|
||||
}
|
||||
const selectAllTable = (section: any) => {
|
||||
const defaultCode = multipleSelection.value.map((item: any) => item.attributeCode)
|
||||
const addSection = section
|
||||
.filter((item: any) => !defaultCode.includes(item.attributeCode))
|
||||
.map((item: any) => {
|
||||
return {
|
||||
attributeName: item.attributeName,
|
||||
attributeCode: item.attributeCode,
|
||||
unit: item.unit,
|
||||
}
|
||||
})
|
||||
multipleSelection.value = [...multipleSelection.value, ...addSection]
|
||||
const allCode = attrTableData.value.map((item: any) => {
|
||||
return item.attributeCode
|
||||
})
|
||||
const extraCode = multipleSelection.value.filter((item: any) => !allCode.includes(item.attributeCode))
|
||||
const setionMap = section.map((item: any) => {
|
||||
return {
|
||||
attributeName: item.attributeName,
|
||||
attributeCode: item.attributeCode,
|
||||
unit: item.unit,
|
||||
}
|
||||
})
|
||||
multipleSelection.value = [...extraCode, ...setionMap]
|
||||
}
|
||||
const attrTableData = ref([])
|
||||
|
||||
@ -364,6 +352,7 @@ const getDateRange = (type: 'week' | 'month') => {
|
||||
|
||||
const openMeasure = () => {
|
||||
showMeasure.value = true
|
||||
pageSetting.current = 1
|
||||
}
|
||||
|
||||
const handleSelectionChange1 = (val: any) => {
|
||||
|
Loading…
Reference in New Issue
Block a user