Перезалить
This commit is contained in:
1 parent
8bca4cf566
commit
e7e900f122
5 files changed
+40
-234
No files matched your search
@@ -89,7 +89,7 @@ export default {
|
|||||||
data: [],
|
data: [],
|
||||||
func: (val)=>{return val.unic.length},
|
func: (val)=>{return val.unic.length},
|
||||||
datakey: "unic",
|
datakey: "unic",
|
||||||
hidden: true,
|
|
||||||
customlabel: [],
|
customlabel: [],
|
||||||
tooltips: true,
|
tooltips: true,
|
||||||
yAxisID: 'y'
|
yAxisID: 'y'
|
||||||
@@ -104,7 +104,7 @@ export default {
|
|||||||
data: [],
|
data: [],
|
||||||
func: (val, key)=>{ return parseFloat(crrfunc(key).toFixed(2))
|
func: (val, key)=>{ return parseFloat(crrfunc(key).toFixed(2))
|
||||||
},
|
},
|
||||||
|
hidden: true,
|
||||||
datakey: "crr",
|
datakey: "crr",
|
||||||
customlabel: [],
|
customlabel: [],
|
||||||
tooltips: true,
|
tooltips: true,
|
||||||
@@ -193,11 +193,8 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const data = ref(datachanged.value)
|
|
||||||
const crrfunc = (date)=>{
|
const crrfunc = (date)=>{
|
||||||
//
|
|
||||||
// let h = new Date('2024-01-20') >=moment(new Date(date)).subtract(between.value*2, 'd')
|
|
||||||
let baseunic = unicperson(fullper.value.filter(e => new Date(e.visitdate) >=moment(new Date(date)).subtract(between.value*2, 'd') && new Date(e.visitdate) <= moment(new Date(date)).subtract(between.value, 'd')))
|
let baseunic = unicperson(fullper.value.filter(e => new Date(e.visitdate) >=moment(new Date(date)).subtract(between.value*2, 'd') && new Date(e.visitdate) <= moment(new Date(date)).subtract(between.value, 'd')))
|
||||||
let crrunic = unicperson(fullper.value.filter(e => new Date(e.visitdate) >=moment(new Date(date)).subtract(between.value, 'd') && new Date(e.visitdate) <= new Date(date)))
|
let crrunic = unicperson(fullper.value.filter(e => new Date(e.visitdate) >=moment(new Date(date)).subtract(between.value, 'd') && new Date(e.visitdate) <= new Date(date)))
|
||||||
|
|
||||||
@@ -224,20 +221,8 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// watch(()=>data.value,()=>{
|
|
||||||
// console.log(linear.value)
|
|
||||||
// if(linear.value!==null) {
|
|
||||||
|
|
||||||
// console.log(linear.value.chart);
|
|
||||||
// // linear.value.chart.destroy()
|
|
||||||
// linear.value.chart.render(data.value, options)
|
|
||||||
// }
|
|
||||||
// }, {deep:true})
|
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
// layout: {
|
|
||||||
// padding: 20
|
|
||||||
// },
|
|
||||||
plugins: {
|
plugins: {
|
||||||
|
|
||||||
datalabels: {
|
datalabels: {
|
||||||
@@ -255,20 +240,7 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// tooltip: {
|
|
||||||
// displayColors: false,
|
|
||||||
// callbacks: {
|
|
||||||
// label: function(context) {
|
|
||||||
// let label = context.dataset.label || '';
|
|
||||||
// if (context.datasetIndex==1) {
|
|
||||||
// if (context.parsed.y !== null) {
|
|
||||||
// label =arrlines.value.datasets[1].customlabel[context.dataIndex];
|
|
||||||
// }
|
|
||||||
// return label
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
layout: {
|
layout: {
|
||||||
padding: {
|
padding: {
|
||||||
|
|||||||
@@ -1,179 +0,0 @@
|
|||||||
<template>
|
|
||||||
|
|
||||||
<v-card class="h-100 ">
|
|
||||||
<line-graph :data="data" :options="options"/>
|
|
||||||
</v-card>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import lineGraph from '@/components/graph/line-graph.vue'
|
|
||||||
import {computed } from 'vue'
|
|
||||||
import {formatComa, splitname} from '@/utils/universal_functions'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
lineGraph,
|
|
||||||
},
|
|
||||||
|
|
||||||
props: {
|
|
||||||
dataLineChart: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {}
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
setup(props, {emit}) {
|
|
||||||
|
|
||||||
const arrlines = {}
|
|
||||||
|
|
||||||
const data = computed({
|
|
||||||
get() {
|
|
||||||
arrlines.value = {
|
|
||||||
labels: [],
|
|
||||||
datasets: [
|
|
||||||
{
|
|
||||||
label: 'Открыто страниц',
|
|
||||||
backgroundColor: '#C62828',
|
|
||||||
borderColor: '#C62828',
|
|
||||||
borderWidth: 3,
|
|
||||||
cubicInterpolationMode: 'monotone',
|
|
||||||
data: [],
|
|
||||||
|
|
||||||
tooltips: false
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Активные пользователи',
|
|
||||||
backgroundColor: 'teal',
|
|
||||||
borderColor: 'teal',
|
|
||||||
borderWidth: 3,
|
|
||||||
cubicInterpolationMode: 'monotone',
|
|
||||||
data: [],
|
|
||||||
hidden: true,
|
|
||||||
customlabel: [],
|
|
||||||
tooltips: true
|
|
||||||
}
|
|
||||||
,
|
|
||||||
{
|
|
||||||
label: 'CRR',
|
|
||||||
backgroundColor: '#673AB7',
|
|
||||||
borderColor: '#673AB7',
|
|
||||||
borderWidth: 3,
|
|
||||||
cubicInterpolationMode: 'monotone',
|
|
||||||
data: [],
|
|
||||||
hidden: true,
|
|
||||||
customlabel: [],
|
|
||||||
tooltips: true
|
|
||||||
}
|
|
||||||
,
|
|
||||||
{
|
|
||||||
label: 'BR',
|
|
||||||
backgroundColor: '#283593',
|
|
||||||
borderColor: '#283593',
|
|
||||||
borderWidth: 3,
|
|
||||||
cubicInterpolationMode: 'monotone',
|
|
||||||
data: [],
|
|
||||||
hidden: true,
|
|
||||||
customlabel: [],
|
|
||||||
tooltips: true
|
|
||||||
}
|
|
||||||
,
|
|
||||||
{
|
|
||||||
label: 'PPV',
|
|
||||||
backgroundColor: '#EF9A9A',
|
|
||||||
borderColor: '#EF9A9A',
|
|
||||||
borderWidth: 3,
|
|
||||||
cubicInterpolationMode: 'monotone',
|
|
||||||
data: [],
|
|
||||||
hidden: true,
|
|
||||||
customlabel: [],
|
|
||||||
tooltips: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
arrforline()
|
|
||||||
return arrlines.value
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
plugins: {
|
|
||||||
datalabels: {
|
|
||||||
color: 'grey',
|
|
||||||
align: 'top',
|
|
||||||
display: 'auto'
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
labels: {
|
|
||||||
color: 'grey',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
displayColors: false,
|
|
||||||
callbacks: {
|
|
||||||
label: function(context) {
|
|
||||||
let label = context.dataset.label || '';
|
|
||||||
if (context.datasetIndex==1) {
|
|
||||||
if (context.parsed.y !== null) {
|
|
||||||
label =arrlines.value.datasets[1].customlabel[context.dataIndex];
|
|
||||||
}
|
|
||||||
return label
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
scales: {
|
|
||||||
x: {
|
|
||||||
grid: {
|
|
||||||
color: 'white',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
y: {
|
|
||||||
ticks: {
|
|
||||||
stepSize: 10
|
|
||||||
},
|
|
||||||
offset: true,
|
|
||||||
grid: {
|
|
||||||
color: 'white',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
responsive: true,
|
|
||||||
maintainAspectRatio: false
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const arrforline=() => {
|
|
||||||
|
|
||||||
Object.entries(props.dataLineChart).forEach(e => {
|
|
||||||
const [key, value] = e
|
|
||||||
arrlines.value.datasets[0].data.push(value.count)
|
|
||||||
arrlines.value.datasets[1].data.push(value.unic.length)
|
|
||||||
arrlines.value.datasets[2].data.push(value.crr)
|
|
||||||
arrlines.value.datasets[3].data.push(value.br)
|
|
||||||
arrlines.value.datasets[4].data.push(value.ppv)
|
|
||||||
arrlines.value.labels.push(formatComa(key))
|
|
||||||
arrlines.value.datasets[1].customlabel.push(props.dataLineChart[key].unic)
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
data,
|
|
||||||
options,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
canvas {
|
|
||||||
flex: 1!important
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -33,13 +33,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:item.now="{ value, item }">
|
<template v-slot:item.now="{ value, item }">
|
||||||
<span class="font-weight-medium text-subtitle-2">
|
<span class="font-weight-medium text-subtitle-2 ">
|
||||||
<v-tooltip
|
<v-tooltip
|
||||||
v-if="value>0"
|
v-if="value>0"
|
||||||
location="bottom"
|
location="bottom"
|
||||||
>
|
>
|
||||||
<template v-slot:activator="{ props }">
|
<template v-slot:activator="{ props }">
|
||||||
<span v-bind="props" :class="'untot'=='уникальные'?getColorTooday1(value):getColorTooday2(value) " class="cursor-help font-weight-medium text-subtitle-1 " >
|
<span v-bind="props" :class="'untot'=='уникальные'?getColorTooday1(value):getColorTooday2(value) " class="cursor-help font-weight-medium text-subtitle-1 " >
|
||||||
{{value}}
|
{{value}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
no-gutters v-for="n in item.now.unic"
|
no-gutters v-for="n in item.now.unic"
|
||||||
:key="n"
|
:key="n"
|
||||||
>
|
>
|
||||||
<v-col>
|
<v-col >
|
||||||
{{n}}
|
{{n}}
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -274,8 +274,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mytable tr {
|
.mytable tr {
|
||||||
font-size: 12px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
.mytable i{
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.myleft {
|
.myleft {
|
||||||
float: left;
|
float: left;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
show-expand
|
show-expand
|
||||||
class="h-0 cursor-default bg-grey_white"
|
class="h-0 cursor-default bg-grey_white"
|
||||||
:sort-by="[{ key: 'info.count', order: 'desc' }]"
|
:sort-by="[{ key: 'info.count', order: 'desc' }]"
|
||||||
density="compact"
|
density="comfortable"
|
||||||
>
|
>
|
||||||
<template v-slot:item.user="{ value }">
|
<template v-slot:item.user="{ value }">
|
||||||
|
|
||||||
@@ -28,8 +28,10 @@
|
|||||||
|
|
||||||
<template v-slot:headers="{ columns, isSorted, getSortIcon, toggleSort }">
|
<template v-slot:headers="{ columns, isSorted, getSortIcon, toggleSort }">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<template v-for="column in columns" :key="column.key">
|
<template v-for="column in columns" :key="column.key">
|
||||||
<td class="pa-0">
|
<td class="pa-0 py-2 pb-3" >
|
||||||
|
|
||||||
<v-tooltip location="top" v-if="column.title!=''">
|
<v-tooltip location="top" v-if="column.title!=''">
|
||||||
<template v-slot:activator="{ props }">
|
<template v-slot:activator="{ props }">
|
||||||
<v-btn
|
<v-btn
|
||||||
@@ -46,17 +48,23 @@
|
|||||||
<v-icon size="x-small"></v-icon>
|
<v-icon size="x-small"></v-icon>
|
||||||
</template>
|
</template>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<span>{{ column.tooltip }} </span>
|
<span>{{ column.tooltip }} </span>
|
||||||
</v-tooltip>
|
</v-tooltip>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:expanded-row="{ columns, item }">
|
<template v-slot:expanded-row="{ columns, item }">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td :colspan="columns.length">
|
<td :colspan="columns.length">
|
||||||
|
|
||||||
<v-card class="my-2 elevation-0" color='grey'>
|
<v-card class="my-2 elevation-0" color='grey'>
|
||||||
<v-divider/>
|
<v-divider/>
|
||||||
<v-data-table
|
<v-data-table
|
||||||
@@ -88,19 +96,19 @@
|
|||||||
</template>
|
</template>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot:item.count="{ value }">
|
||||||
|
<span :class="'text-'+getColor2(value) " class="font-weight-medium text-subtitle-2">
|
||||||
<template v-slot:item.unic="{ value }">
|
{{ value }}
|
||||||
<span :class="'text-'+getColor(value) " class="font-weight-medium text-subtitle-2">
|
</span>
|
||||||
{{ value }}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
<template v-slot:item.count="{ value }">
|
|
||||||
|
|
||||||
<span :class="'text-'+getColor2(value) " class="font-weight-medium text-subtitle-2">
|
|
||||||
{{ value }}
|
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item.unic="{ 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>
|
||||||
|
|
||||||
@@ -178,6 +186,7 @@ export default {
|
|||||||
unic: 1
|
unic: 1
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
|
console.log(res, 'ind----------------------')
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
@@ -198,7 +207,7 @@ export default {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
ob.tooltip[indt].unic += e.count
|
ob.tooltip[indt].count += e.count
|
||||||
ob.tooltip[indt].unic += 1
|
ob.tooltip[indt].unic += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -237,9 +246,9 @@ export default {
|
|||||||
maxWidth: '60%',
|
maxWidth: '60%',
|
||||||
minWidth: '60%',
|
minWidth: '60%',
|
||||||
},
|
},
|
||||||
{ title: 'уникальных', align: 'center', key: 'count', width: '20%', maxWidth: '20%'
|
{ 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%'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
>
|
>
|
||||||
<template v-slot:filling_feedback>
|
<template v-slot:filling_feedback>
|
||||||
|
|
||||||
<div v-if="criteria.length!=0">
|
<div v-if="criteria.length!=0" class="pt-4">
|
||||||
<v-row
|
<v-row
|
||||||
|
|
||||||
class="align-center flex-column scoreheight gap mt-n2"
|
class="align-center flex-column scoreheight gap mt-n2"
|
||||||
|
|||||||
Reference in new issue
Block a user