Популярные страницы
This commit is contained in:
1 parent
acc7176bfc
commit
ca052a8dbf
3 files changed
+136
-24
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<v-card class="h-100 ">
|
<v-card class="h-100 pa-5">
|
||||||
<!-- <line-graph v-if="data!==null" :data="data" ref ='linear' :options="options"/> -->
|
<!-- <line-graph v-if="data!==null" :data="data" ref ='linear' :options="options"/> -->
|
||||||
<Line v-if="data!==null" :data="data" ref ='linear' :options="options" />
|
<Line v-if="data!==null" :data="data" ref ='linear' :options="options" />
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -102,9 +102,9 @@ export default {
|
|||||||
borderWidth: 3,
|
borderWidth: 3,
|
||||||
cubicInterpolationMode: 'monotone',
|
cubicInterpolationMode: 'monotone',
|
||||||
data: [],
|
data: [],
|
||||||
func: (val, key)=>{ return crrfunc(key)
|
func: (val, key)=>{ return parseFloat(crrfunc(key).toFixed(2))
|
||||||
},
|
},
|
||||||
hidden: true,
|
|
||||||
datakey: "crr",
|
datakey: "crr",
|
||||||
customlabel: [],
|
customlabel: [],
|
||||||
tooltips: true,
|
tooltips: true,
|
||||||
@@ -167,7 +167,7 @@ export default {
|
|||||||
// console.log(res.labels,"datat");
|
// console.log(res.labels,"datat");
|
||||||
}
|
}
|
||||||
// res.datasets[1].data=[]
|
// res.datasets[1].data=[]
|
||||||
|
console.log(res,"reeeees");
|
||||||
return res
|
return res
|
||||||
}})
|
}})
|
||||||
|
|
||||||
@@ -196,16 +196,16 @@ export default {
|
|||||||
|
|
||||||
// const data = ref(datachanged.value)
|
// const data = ref(datachanged.value)
|
||||||
const crrfunc = (date)=>{
|
const crrfunc = (date)=>{
|
||||||
// console.log(fullper.value, 'fullper');
|
//
|
||||||
// let h = new Date('2024-01-20') >=moment(new Date(date)).subtract(between.value*2, 'd')
|
// 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)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let bothuser = new Set([...baseunic].filter(element => crrunic.has(element)))
|
let bothuser = new Set([...baseunic].filter(element => crrunic.has(element)))
|
||||||
console.log(bothuser,"currun");
|
console.log(baseunic.size,bothuser.size, 'fullper');
|
||||||
return bothuser.size*100/baseunic.size
|
return baseunic.size ==0?0:bothuser.size*100/baseunic.size
|
||||||
}
|
}
|
||||||
|
|
||||||
const unicperson = (arr) => {
|
const unicperson = (arr) => {
|
||||||
@@ -215,9 +215,24 @@ export default {
|
|||||||
return new Set(arrnew)
|
return new Set(arrnew)
|
||||||
}
|
}
|
||||||
|
|
||||||
const data=computed({get() {return JSON.parse(JSON.stringify(dataf.value))
|
const data=computed({get() {
|
||||||
|
|
||||||
|
return JSON.parse(JSON.stringify(dataf.value))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const linear=ref(null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 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 = {
|
||||||
plugins: {
|
plugins: {
|
||||||
@@ -275,6 +290,9 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const arrforline=() => {
|
// const arrforline=() => {
|
||||||
// console.log(props.dataLineChart);
|
// console.log(props.dataLineChart);
|
||||||
// for (let [key, val] of Object.entries) {}
|
// for (let [key, val] of Object.entries) {}
|
||||||
@@ -291,7 +309,7 @@ export default {
|
|||||||
|
|
||||||
// // console.log(props.dataLineChart,'dataYear2 -------------');
|
// // console.log(props.dataLineChart,'dataYear2 -------------');
|
||||||
// }
|
// }
|
||||||
// const linear=ref(null)
|
|
||||||
// watch(()=>props.dataLineChart,(newValue, oldValue)=>{
|
// watch(()=>props.dataLineChart,(newValue, oldValue)=>{
|
||||||
// if (linear.value!==null) {
|
// if (linear.value!==null) {
|
||||||
// renderChart(data.value, options)
|
// renderChart(data.value, options)
|
||||||
@@ -302,7 +320,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
data,
|
data,
|
||||||
options,
|
options,
|
||||||
// linear
|
linear
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<v-data-table-virtual
|
<v-data-table-virtual
|
||||||
v-model:expanded="expanded"
|
v-model:expanded="expanded"
|
||||||
:headers="dessertHeaders"
|
:headers="dessertHeaders"
|
||||||
:items="activusers"
|
:items="dataActivusers"
|
||||||
item-value="user.fio"
|
item-value="user.fio"
|
||||||
show-expand
|
show-expand
|
||||||
|
|
||||||
@@ -109,12 +109,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { spravURL } from '@/utils/axios-api'
|
import { spravURL } from '@/utils/axios-api'
|
||||||
import {checkremote} from '@/utils/universal_functions'
|
import {checkremote} from '@/utils/universal_functions'
|
||||||
import listUser from '@/components/UI//fiousercard/listUser.vue'
|
import listUser from '@/components/UI//fiousercard/listUser.vue'
|
||||||
import PatternCard from '@/components/UI/aboutportal/pattern-card.vue'
|
import PatternCard from '@/components/UI/aboutportal/pattern-card.vue'
|
||||||
|
import {splitname} from '@/utils/universal_functions'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
listUser,
|
listUser,
|
||||||
@@ -131,7 +131,40 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setup() {
|
setup(props) {
|
||||||
|
|
||||||
|
const dataActivusers = computed({
|
||||||
|
get() {
|
||||||
|
let res = []
|
||||||
|
|
||||||
|
props.activusers.forEach((e) => {
|
||||||
|
|
||||||
|
let ind = res.findIndex(el => el.user.id == e.user.id)
|
||||||
|
if (ind == -1) {
|
||||||
|
res.push({user: e.user,
|
||||||
|
info: {
|
||||||
|
count: e.count,
|
||||||
|
session:new Set([e.visitdate]),
|
||||||
|
pages: 1
|
||||||
|
},
|
||||||
|
tooltip: [{
|
||||||
|
namegapes: e.pages,
|
||||||
|
count: e.count,
|
||||||
|
unic: 1
|
||||||
|
}]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// console.log(ind, 'e');
|
||||||
|
})
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const expanded = ref([])
|
const expanded = ref([])
|
||||||
|
|
||||||
@@ -191,7 +224,7 @@ export default {
|
|||||||
spravURL,
|
spravURL,
|
||||||
expanded,
|
expanded,
|
||||||
dessertHeaders,
|
dessertHeaders,
|
||||||
|
dataActivusers,
|
||||||
subtable,
|
subtable,
|
||||||
getColor,
|
getColor,
|
||||||
getColor2,
|
getColor2,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<v-col lg=8>
|
<v-col lg=8>
|
||||||
|
|
||||||
<line-chart
|
<line-chart
|
||||||
|
:key = "`${filterStore.date_period.startdate}-${filterStore.date_period.enddate}`"
|
||||||
:dataLineChart="dataLineChart"
|
:dataLineChart="dataLineChart"
|
||||||
:period="{before:alldata.beforperiod,period:alldata.period}"
|
:period="{before:alldata.beforperiod,period:alldata.period}"
|
||||||
:filter = filter
|
:filter = filter
|
||||||
@@ -30,7 +30,9 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="w100 ">
|
<v-col class="w100 ">
|
||||||
|
<!-- -------------------------------------------------------------- -->
|
||||||
|
<my-helper :pretext="alldata.period"/>
|
||||||
|
<!-- -------------------------------------------------------------- -->
|
||||||
<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" >
|
||||||
@@ -44,10 +46,10 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
<v-col lg=4 class="d-flex flex-column ">
|
<v-col lg=4 class="d-flex flex-column ">
|
||||||
|
|
||||||
<!-- <top-user
|
<top-user
|
||||||
:activusers = dataActivusers
|
:activusers = alldata.period
|
||||||
|
|
||||||
/> -->
|
/>
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col lg=2 class="d-flex flex-column">
|
<v-col lg=2 class="d-flex flex-column">
|
||||||
@@ -98,6 +100,64 @@ export default {
|
|||||||
|
|
||||||
setup(){
|
setup(){
|
||||||
|
|
||||||
|
const dataActivusers = [
|
||||||
|
{
|
||||||
|
"user": {
|
||||||
|
"id": 107,
|
||||||
|
"login": "9966-00-107",
|
||||||
|
"post": "Старший специалист 1 разряда",
|
||||||
|
"fio": "Гришина И.С."
|
||||||
|
},
|
||||||
|
"info": {
|
||||||
|
"count": 8909,
|
||||||
|
"session": 37,
|
||||||
|
"pages": 90
|
||||||
|
},
|
||||||
|
"tooltip": [
|
||||||
|
{
|
||||||
|
"namepages": "О портале",
|
||||||
|
"count": 8424,
|
||||||
|
"unic": 35
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"namepages": "Портал МИ ФНС России по ЦОД №2",
|
||||||
|
"count": 376,
|
||||||
|
"unic": 24
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"namepages": "Отдел кадров и безопасности",
|
||||||
|
"count": 11,
|
||||||
|
"unic": 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"namepages": "Лента новостей",
|
||||||
|
"count": 43,
|
||||||
|
"unic": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"namepages": "Об инспекции",
|
||||||
|
"count": 22,
|
||||||
|
"unic": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"namepages": "Часто задаваемые вопросы",
|
||||||
|
"count": 17,
|
||||||
|
"unic": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"namepages": "Безопасность",
|
||||||
|
"count": 8,
|
||||||
|
"unic": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"namepages": "Разделы безопасности",
|
||||||
|
"count": 8,
|
||||||
|
"unic": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
const dataLineChart = ref({})
|
const dataLineChart = ref({})
|
||||||
const cardtotal = ref(
|
const cardtotal = ref(
|
||||||
{
|
{
|
||||||
@@ -494,7 +554,7 @@ setup(){
|
|||||||
alldata,
|
alldata,
|
||||||
cardtotal,
|
cardtotal,
|
||||||
dataLineChart,
|
dataLineChart,
|
||||||
|
filterStore,
|
||||||
// visiting,
|
// visiting,
|
||||||
// pages_count,
|
// pages_count,
|
||||||
// visitionreduce,
|
// visitionreduce,
|
||||||
@@ -507,7 +567,8 @@ setup(){
|
|||||||
// dataIndicators,
|
// dataIndicators,
|
||||||
// dataChart,
|
// dataChart,
|
||||||
// feedback,
|
// feedback,
|
||||||
filter: ref('d')
|
filter: ref('d'),
|
||||||
|
dataActivusers
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user