Изменение для crr
This commit is contained in:
1 parent
f183ccae5e
commit
a6042e7f7e
3 files changed
+47
-5
No files matched your search
@@ -0,0 +1,35 @@
|
||||
### Шаблон страницы
|
||||
|
||||
Пример использования верстки
|
||||
|
||||
```
|
||||
<v-row no-gutters class="gap flex-column">
|
||||
<v-col lg=2 class='bg-red w100'>
|
||||
1
|
||||
</v-col>
|
||||
<v-col class="d-flex flex-column">
|
||||
<v-row no-gutters class="gap">
|
||||
<v-col lg=9 class="d-flex flex-column">
|
||||
<v-row no-gutters class="gap flex-column">
|
||||
<v-col class=" d-flex flex-column">
|
||||
<v-row no-gutters class="gap">
|
||||
<v-col class="bg-green">1</v-col>
|
||||
<v-col class="bg-orange">2</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class=" d-flex flex-column">
|
||||
<v-row no-gutters class="gap">
|
||||
<v-col class="bg-purple">1</v-col>
|
||||
<v-col class="bg-green">2</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class="bg-yellow">2</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col lg=2 class="bg-grey w100">
|
||||
3
|
||||
</v-col>
|
||||
</v-row>
|
||||
```
|
||||
@@ -10,9 +10,9 @@
|
||||
<script>
|
||||
// import lineGraph from '@/components/graph/line-graph.vue'
|
||||
import moment from 'moment'
|
||||
import {computed, onMounted, ref, watch } from 'vue'
|
||||
import {computed,ref} from 'vue'
|
||||
import { usePortalFilterStore } from '@/store/AboutPortalFilter'
|
||||
import {formatComa, splitname} from '@/utils/universal_functions'
|
||||
import {formatComa, formatDash} from '@/utils/universal_functions'
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
CategoryScale,
|
||||
@@ -189,7 +189,7 @@ export default {
|
||||
}
|
||||
})
|
||||
fullper.value= [...props.period.before, ...arr]
|
||||
console.log(fullper.value, 'fullper.valuefullper.valuefullper.valuefullper.value');
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -199,12 +199,20 @@ export default {
|
||||
|
||||
|
||||
const crrfunc = (date)=>{
|
||||
let crr
|
||||
// console.log(new Date(date), formatDash(filterStore.date_period.enddate), 'new Date(date) ==filterStore.date_period.enddate');
|
||||
|
||||
|
||||
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 bothuser = new Set([...baseunic].filter(element => crrunic.has(element)))
|
||||
if (date ==formatDash(filterStore.date_period.enddate)) {
|
||||
let nCrrAbountPortalPage = bothuser.size*100/baseunic.size
|
||||
|
||||
}
|
||||
return baseunic.size ==0?0:bothuser.size*100/baseunic.size
|
||||
}
|
||||
|
||||
const
|
||||
|
||||
const unicperson = (arr) => {
|
||||
|
||||
|
||||
@@ -214,7 +214,6 @@ setup(){
|
||||
|
||||
let bothuser = new Set([...periodusers].filter(element => beforperiodusers.has(element)))
|
||||
cardtotal.value.crr.data = bothuser.size*100/beforperiodusers.size
|
||||
console.log(bothuser, beforperiodusers ,'1111111111111')
|
||||
sumtraffic(traffic)
|
||||
dataLineChart.value = traffic
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user