|
@@ -97,16 +97,19 @@ const multLineXdatas = ref([])
|
|
const { model, fetchModel, items, onOptionInit } = useCompareFilter()
|
|
const { model, fetchModel, items, onOptionInit } = useCompareFilter()
|
|
|
|
|
|
const { fetch, result: allResult, loading } = useFetch('getCompareList')
|
|
const { fetch, result: allResult, loading } = useFetch('getCompareList')
|
|
-const result = (allResult?.value || []).filter((item) => {
|
|
|
|
- if (
|
|
|
|
- !fetchModel.value.markingGroupNumber ||
|
|
|
|
- fetchModel.value.markingGroupNumber?.length === 0 ||
|
|
|
|
- (Array.isArray(fetchModel.value.markingGroupNumber) && fetchModel.value.markingGroupNumber.includes(undefined))
|
|
|
|
- ) {
|
|
|
|
- return item
|
|
|
|
- } else {
|
|
|
|
- return fetchModel.value.markingGroupNumber.includes(item.markingGroupNumber)
|
|
|
|
- }
|
|
|
|
|
|
+const result = computed(() => {
|
|
|
|
+ let groups = (allResult.value?.groups || []).filter((item: any) => {
|
|
|
|
+ if (
|
|
|
|
+ !fetchModel.value.markingGroupNumber ||
|
|
|
|
+ fetchModel.value.markingGroupNumber?.length === 0 ||
|
|
|
|
+ (Array.isArray(fetchModel.value.markingGroupNumber) && fetchModel.value.markingGroupNumber.includes(undefined))
|
|
|
|
+ ) {
|
|
|
|
+ return item
|
|
|
|
+ } else {
|
|
|
|
+ return fetchModel.value.markingGroupNumber.includes(item.markingGroupNumber)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ return { columns: allResult.value?.columns || [], groups }
|
|
})
|
|
})
|
|
const averageDatas = computed(() => {
|
|
const averageDatas = computed(() => {
|
|
if (result.value) {
|
|
if (result.value) {
|
|
@@ -233,13 +236,11 @@ const columns2: any = computed(() => {
|
|
const multipleSelection = ref<any[]>([])
|
|
const multipleSelection = ref<any[]>([])
|
|
const handleSelectionChange = (val: any[]) => {
|
|
const handleSelectionChange = (val: any[]) => {
|
|
multipleSelection.value = val
|
|
multipleSelection.value = val
|
|
- console.log('multipleSelection.value:', multipleSelection.value)
|
|
|
|
}
|
|
}
|
|
const rowChartOptions = computed(() => {
|
|
const rowChartOptions = computed(() => {
|
|
if (!curRow.value) {
|
|
if (!curRow.value) {
|
|
return {}
|
|
return {}
|
|
} else {
|
|
} else {
|
|
- console.log('curRow.value:', curRow.value)
|
|
|
|
if (dataType.value !== 'segmentScores') {
|
|
if (dataType.value !== 'segmentScores') {
|
|
const { dateItems } = curRow.value
|
|
const { dateItems } = curRow.value
|
|
const xData = dateItems.map((v: any) => v.date)
|
|
const xData = dateItems.map((v: any) => v.date)
|
|
@@ -403,9 +404,8 @@ const multLineChartOptions = computed(() => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
const onSearch = () => {
|
|
const onSearch = () => {
|
|
- console.log('search')
|
|
|
|
fetch({ ...fetchModel.value, markingGroupNumber: undefined }).then((res) => {
|
|
fetch({ ...fetchModel.value, markingGroupNumber: undefined }).then((res) => {
|
|
- console.log('rrr', result.value)
|
|
|
|
|
|
+ console.log('rrr', allResult.value, result.value)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
onOptionInit(onSearch)
|
|
onOptionInit(onSearch)
|