На тест
This commit is contained in:
1 parent
c4863cb065
commit
7b0413ef4d
4 files changed
+94
-44
No files matched your search
@@ -51,6 +51,17 @@ export default {
|
|||||||
customlabel: [],
|
customlabel: [],
|
||||||
tooltips: true
|
tooltips: true
|
||||||
}
|
}
|
||||||
|
,
|
||||||
|
// {
|
||||||
|
// label: 'CRR',
|
||||||
|
// backgroundColor: 'blue',
|
||||||
|
// borderColor: 'blue',
|
||||||
|
// borderWidth: 3,
|
||||||
|
// cubicInterpolationMode: 'monotone',
|
||||||
|
// data: [],
|
||||||
|
// customlabel: [],
|
||||||
|
// tooltips: true
|
||||||
|
// }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
arrforline()
|
arrforline()
|
||||||
@@ -124,6 +135,7 @@ export default {
|
|||||||
// }, {})
|
// }, {})
|
||||||
|
|
||||||
Object.entries(props.dataLineChart).forEach(e => {
|
Object.entries(props.dataLineChart).forEach(e => {
|
||||||
|
console.log(e,' e');
|
||||||
const [key, value] = e
|
const [key, value] = e
|
||||||
arrlines.value.datasets[0].data.push(value.count)
|
arrlines.value.datasets[0].data.push(value.count)
|
||||||
arrlines.value.datasets[1].data.push(value.unic.length)
|
arrlines.value.datasets[1].data.push(value.unic.length)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
fixed-header
|
fixed-header
|
||||||
density="comfortable"
|
density="comfortable"
|
||||||
hover
|
hover
|
||||||
class="cursor-default h-0 "
|
class="cursor-default h-0 text-caption"
|
||||||
>
|
>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -34,47 +34,69 @@
|
|||||||
:key="key"
|
:key="key"
|
||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<td class="text-left ">{{key}}</td>
|
<td class="text-left ">{{key}}</td>
|
||||||
<td >
|
<td >
|
||||||
<tooltip-text
|
<v-tooltip
|
||||||
v-if="val.now.unique.length>0"
|
v-if="val.now.unique.length>0"
|
||||||
:text="modelrating?val.now.unique.length:val.now.countall"
|
location="bottom"
|
||||||
>
|
>
|
||||||
<template v-slot:tooltip>
|
<template v-slot:activator="{ props }">
|
||||||
<v-row
|
<span v-bind="props" class="cursor-help font-weight-medium text-subtitle-2" :class="getColorNow(modelrating?val.now.unique.length:val.now.countall) ">
|
||||||
no-gutters v-for="n in val.now.unique"
|
{{modelrating?val.now.unique.length:val.now.countall}}
|
||||||
:key="n"
|
</span>
|
||||||
>
|
|
||||||
<v-col>
|
|
||||||
{{n}}
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
</template>
|
||||||
</tooltip-text>
|
<v-row
|
||||||
<span v-else>
|
no-gutters
|
||||||
|
>
|
||||||
|
<v-col>
|
||||||
|
<v-row
|
||||||
|
no-gutters v-for="n in val.now.unique"
|
||||||
|
:key="n"
|
||||||
|
>
|
||||||
|
<v-col>
|
||||||
|
{{n}}
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-tooltip>
|
||||||
|
<span class='font-weight-regular text-subtitle-2' v-else>
|
||||||
0
|
0
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td >
|
<td>
|
||||||
<tooltip-text
|
<v-tooltip
|
||||||
v-if="val.year.unique.length>0"
|
v-if="val.year.unique.length>0"
|
||||||
:text="modelrating?val.year.unique.length:val.year.countall"
|
location="bottom"
|
||||||
>
|
>
|
||||||
<template v-slot:tooltip>
|
<template v-slot:activator="{ props }">
|
||||||
<v-row
|
<span
|
||||||
no-gutters
|
v-bind="props"
|
||||||
v-for="n in val.year.unique"
|
class="cursor-help font-weight-medium text-subtitle-2"
|
||||||
:key="n"
|
:class="modelrating?getColorNow(val.year.unique.length):getColorAll(val.year.countall)">
|
||||||
>
|
{{modelrating?val.year.unique.length:val.year.countall}}
|
||||||
<v-col>
|
</span>
|
||||||
{{n}}
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
</template>
|
||||||
</tooltip-text>
|
<v-row
|
||||||
<span v-else>
|
no-gutters
|
||||||
|
>
|
||||||
|
<v-col>
|
||||||
|
<v-row
|
||||||
|
no-gutters v-for="n in val.year.unique"
|
||||||
|
:key="n"
|
||||||
|
>
|
||||||
|
<v-col>
|
||||||
|
{{n}}
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-tooltip>
|
||||||
|
<span class='font-weight-regular text-subtitle-2' v-else>
|
||||||
0
|
0
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -101,8 +123,23 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
const modelrating = ref(false)
|
const modelrating = ref(false)
|
||||||
|
|
||||||
|
const getColorAll = (pages) => {
|
||||||
|
|
||||||
|
if (pages > 100) return 'text-green'
|
||||||
|
else if (pages > 50) return 'text-orange'
|
||||||
|
else return 'text-red'
|
||||||
|
}
|
||||||
|
|
||||||
|
const getColorNow = (pages) => {
|
||||||
|
if (pages > 10) return 'text-green'
|
||||||
|
else if (pages > 5) return 'text-orange'
|
||||||
|
else return 'text-red'
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
modelrating
|
modelrating,
|
||||||
|
getColorAll,
|
||||||
|
getColorNow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
item-value="user.fio"
|
item-value="user.fio"
|
||||||
show-expand
|
show-expand
|
||||||
|
|
||||||
class="h-0 table_top_user"
|
class="h-0 cursor-default "
|
||||||
:sort-by="[{ key: 'info.count', order: 'desc' }]"
|
:sort-by="[{ key: 'info.count', order: 'desc' }]"
|
||||||
density="compact"
|
density="compact"
|
||||||
>
|
>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
:headers="subtable"
|
:headers="subtable"
|
||||||
:items="item.tooltip"
|
:items="item.tooltip"
|
||||||
items-per-page=-1
|
items-per-page=-1
|
||||||
class="subtable cursor-default px-3 bg-grey-lighten-5"
|
class="subtable cursor-default px-3 bg-grey-lighten-5 text-caption"
|
||||||
density="compact"
|
density="compact"
|
||||||
:sort-by="[{ key: 'count', order: 'desc' }]"
|
:sort-by="[{ key: 'count', order: 'desc' }]"
|
||||||
>
|
>
|
||||||
@@ -81,19 +81,19 @@
|
|||||||
</template>
|
</template>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:item.count="{ value }">
|
|
||||||
|
|
||||||
<span :class="'text-'+getColor(value) " class="font-weight-medium">
|
|
||||||
{{ value }}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-slot:item.unic="{ value }">
|
<template v-slot:item.unic="{ value }">
|
||||||
<span :class="'text-'+getColor2(value) " class="font-weight-medium">
|
<span :class="'text-'+getColor2(value) " class="font-weight-medium text-subtitle-2">
|
||||||
{{ value }}
|
{{ value }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot:item.count="{ value }">
|
||||||
|
|
||||||
|
<span :class="'text-'+getColor(value) " class="font-weight-medium text-subtitle-2">
|
||||||
|
{{ value }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</v-data-table>
|
</v-data-table>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
@@ -160,10 +160,11 @@ export default {
|
|||||||
maxWidth: '60%',
|
maxWidth: '60%',
|
||||||
minWidth: '60%',
|
minWidth: '60%',
|
||||||
},
|
},
|
||||||
{ title: 'всего', align: 'center', key: 'count', width: '20%', maxWidth: '20%'
|
|
||||||
},
|
|
||||||
{ title: 'уникальных', align: 'center', key: 'unic', width: '20%', maxWidth: '20%'
|
{ title: 'уникальных', align: 'center', key: 'unic', width: '20%', maxWidth: '20%'
|
||||||
},
|
},
|
||||||
|
{ title: 'всего', align: 'center', key: 'count', width: '20%', maxWidth: '20%'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
@@ -209,7 +210,5 @@ export default {
|
|||||||
text-align: start!important;
|
text-align: start!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table_top_user .v-data-table__td {
|
|
||||||
padding: 0!important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -17,11 +17,13 @@
|
|||||||
<portal-traffic :traffic=dataAttendance />
|
<portal-traffic :traffic=dataAttendance />
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col>
|
<v-col>
|
||||||
|
|
||||||
<line-chart :dataLineChart="dataLineChart"/>
|
<line-chart :dataLineChart="dataLineChart"/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="w100 ">
|
<v-col class="w100 ">
|
||||||
|
|
||||||
<v-row no-gutters class="h-100 gap">
|
<v-row no-gutters class="h-100 gap">
|
||||||
<v-col class="flex-column d-flex">
|
<v-col class="flex-column d-flex">
|
||||||
<v-row no-gutters class="flex-column gap" >
|
<v-row no-gutters class="flex-column gap" >
|
||||||
|
|||||||
Reference in new issue
Block a user