На тест
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: [],
|
||||
tooltips: true
|
||||
}
|
||||
,
|
||||
// {
|
||||
// label: 'CRR',
|
||||
// backgroundColor: 'blue',
|
||||
// borderColor: 'blue',
|
||||
// borderWidth: 3,
|
||||
// cubicInterpolationMode: 'monotone',
|
||||
// data: [],
|
||||
// customlabel: [],
|
||||
// tooltips: true
|
||||
// }
|
||||
]
|
||||
}
|
||||
arrforline()
|
||||
@@ -124,6 +135,7 @@ export default {
|
||||
// }, {})
|
||||
|
||||
Object.entries(props.dataLineChart).forEach(e => {
|
||||
console.log(e,' e');
|
||||
const [key, value] = e
|
||||
arrlines.value.datasets[0].data.push(value.count)
|
||||
arrlines.value.datasets[1].data.push(value.unic.length)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
fixed-header
|
||||
density="comfortable"
|
||||
hover
|
||||
class="cursor-default h-0 "
|
||||
class="cursor-default h-0 text-caption"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -34,47 +34,69 @@
|
||||
:key="key"
|
||||
|
||||
>
|
||||
|
||||
<td class="text-left ">{{key}}</td>
|
||||
<td >
|
||||
<tooltip-text
|
||||
<v-tooltip
|
||||
v-if="val.now.unique.length>0"
|
||||
:text="modelrating?val.now.unique.length:val.now.countall"
|
||||
location="bottom"
|
||||
>
|
||||
<template v-slot:tooltip>
|
||||
<v-row
|
||||
no-gutters v-for="n in val.now.unique"
|
||||
:key="n"
|
||||
>
|
||||
<v-col>
|
||||
{{n}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
<template v-slot:activator="{ props }">
|
||||
<span v-bind="props" class="cursor-help font-weight-medium text-subtitle-2" :class="getColorNow(modelrating?val.now.unique.length:val.now.countall) ">
|
||||
{{modelrating?val.now.unique.length:val.now.countall}}
|
||||
</span>
|
||||
</template>
|
||||
</tooltip-text>
|
||||
<span v-else>
|
||||
<v-row
|
||||
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
|
||||
</span>
|
||||
</td>
|
||||
<td >
|
||||
<tooltip-text
|
||||
<td>
|
||||
<v-tooltip
|
||||
v-if="val.year.unique.length>0"
|
||||
:text="modelrating?val.year.unique.length:val.year.countall"
|
||||
location="bottom"
|
||||
>
|
||||
<template v-slot:tooltip>
|
||||
<v-row
|
||||
no-gutters
|
||||
v-for="n in val.year.unique"
|
||||
:key="n"
|
||||
>
|
||||
<v-col>
|
||||
{{n}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
<template v-slot:activator="{ props }">
|
||||
<span
|
||||
v-bind="props"
|
||||
class="cursor-help font-weight-medium text-subtitle-2"
|
||||
:class="modelrating?getColorNow(val.year.unique.length):getColorAll(val.year.countall)">
|
||||
{{modelrating?val.year.unique.length:val.year.countall}}
|
||||
</span>
|
||||
</template>
|
||||
</tooltip-text>
|
||||
<span v-else>
|
||||
<v-row
|
||||
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
|
||||
</span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -101,8 +123,23 @@ export default {
|
||||
setup() {
|
||||
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 {
|
||||
modelrating
|
||||
modelrating,
|
||||
getColorAll,
|
||||
getColorNow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
item-value="user.fio"
|
||||
show-expand
|
||||
|
||||
class="h-0 table_top_user"
|
||||
class="h-0 cursor-default "
|
||||
:sort-by="[{ key: 'info.count', order: 'desc' }]"
|
||||
density="compact"
|
||||
>
|
||||
@@ -57,7 +57,7 @@
|
||||
:headers="subtable"
|
||||
:items="item.tooltip"
|
||||
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"
|
||||
:sort-by="[{ key: 'count', order: 'desc' }]"
|
||||
>
|
||||
@@ -81,19 +81,19 @@
|
||||
</template>
|
||||
</tr>
|
||||
</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 }">
|
||||
<span :class="'text-'+getColor2(value) " class="font-weight-medium">
|
||||
<span :class="'text-'+getColor2(value) " class="font-weight-medium text-subtitle-2">
|
||||
{{ value }}
|
||||
</span>
|
||||
</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-card>
|
||||
|
||||
@@ -160,10 +160,11 @@ export default {
|
||||
maxWidth: '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: 'count', width: '20%', maxWidth: '20%'
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
@@ -209,7 +210,5 @@ export default {
|
||||
text-align: start!important;
|
||||
}
|
||||
|
||||
.table_top_user .v-data-table__td {
|
||||
padding: 0!important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -17,11 +17,13 @@
|
||||
<portal-traffic :traffic=dataAttendance />
|
||||
</v-col>
|
||||
<v-col>
|
||||
|
||||
<line-chart :dataLineChart="dataLineChart"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class="w100 ">
|
||||
|
||||
<v-row no-gutters class="h-100 gap">
|
||||
<v-col class="flex-column d-flex">
|
||||
<v-row no-gutters class="flex-column gap" >
|
||||
|
||||
Reference in new issue
Block a user