На заливку
This commit is contained in:
1 parent
6ccbaae9e9
commit
f38ed176e9
7 files changed
+135
-43
No files matched your search
@@ -90,7 +90,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'
|
||||||
@@ -105,7 +105,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,
|
||||||
@@ -156,6 +156,7 @@ export default {
|
|||||||
res = arrlines
|
res = arrlines
|
||||||
res.labels=[]
|
res.labels=[]
|
||||||
|
|
||||||
|
res.datasets.forEach((e) => {e.data =[]})
|
||||||
for(let [key,val] of Object.entries(props.dataLineChart))
|
for(let [key,val] of Object.entries(props.dataLineChart))
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -199,20 +200,25 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
const crrfunc = (date)=>{
|
const crrfunc = (date)=>{
|
||||||
// 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 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)))
|
||||||
|
|
||||||
if (date ==formatDash(filterStore.date_period.enddate)) {
|
if (date ==formatDash(filterStore.date_period.enddate)) {
|
||||||
let nCrrAbountPortalPage = bothuser.size*100/baseunic.size
|
|
||||||
|
editCRR(bothuser.size*100/baseunic.size)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return baseunic.size ==0?0:bothuser.size*100/baseunic.size
|
return baseunic.size ==0?0:bothuser.size*100/baseunic.size
|
||||||
}
|
}
|
||||||
|
|
||||||
const
|
const editCRR = (val) => {
|
||||||
|
|
||||||
|
emit('getCRR', val)
|
||||||
|
}
|
||||||
|
|
||||||
const unicperson = (arr) => {
|
const unicperson = (arr) => {
|
||||||
|
|
||||||
@@ -240,6 +246,12 @@ export default {
|
|||||||
display: 'auto'
|
display: 'auto'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
|
onHover: (event, chartElement) => {
|
||||||
|
event.native.target.style.cursor ='pointer' ;
|
||||||
|
},
|
||||||
|
onLeave: (event, chartElement) => {
|
||||||
|
event.native.target.style.cursor ='default' ;
|
||||||
|
},
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
labels: {
|
labels: {
|
||||||
color: 'grey',
|
color: 'grey',
|
||||||
@@ -247,9 +259,22 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// hover: {
|
||||||
|
// onHover: function(e) {
|
||||||
|
// var point = this.getElementAtEvent(e);
|
||||||
|
|
||||||
|
// if (point.length) e.native.target.style.cursor = 'pointer';
|
||||||
|
// else e.native.target.style.cursor = 'default';
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
layout: {
|
layout: {
|
||||||
padding: {
|
padding: {
|
||||||
@@ -305,4 +330,8 @@ export default {
|
|||||||
canvas {
|
canvas {
|
||||||
flex: 1!important
|
flex: 1!important
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chartjs-legend {
|
||||||
|
cursor: pointer
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -142,7 +142,7 @@ let res = {
|
|||||||
// res.before.user=res.period.user
|
// res.before.user=res.period.user
|
||||||
res.proc.today = parseFloat(((res.user.today.length * 100) / props.alldata.staff).toFixed(2))
|
res.proc.today = parseFloat(((res.user.today.length * 100) / props.alldata.staff).toFixed(2))
|
||||||
res.proc.period = parseFloat(((res.user.period.length * 100) / props.alldata.staff).toFixed(2))
|
res.proc.period = parseFloat(((res.user.period.length * 100) / props.alldata.staff).toFixed(2))
|
||||||
res.proc.tooltip =`% от штата (${props.alldata.staff} сотрудников не конец выбранного периода)`
|
// res.proc.tooltip =`% от штата (${props.alldata.staff} сотрудников не конец выбранного периода)`
|
||||||
let data1 = moment(filterStore.date_period.enddate)
|
let data1 = moment(filterStore.date_period.enddate)
|
||||||
let data2 = moment(filterStore.date_period.startdate)
|
let data2 = moment(filterStore.date_period.startdate)
|
||||||
let between = data1.diff(data2, 'days') + 1
|
let between = data1.diff(data2, 'days') + 1
|
||||||
|
|||||||
@@ -22,6 +22,9 @@
|
|||||||
:datedefault = "filterStore.date_period.enddate"
|
:datedefault = "filterStore.date_period.enddate"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-caption font-weight-regular">
|
||||||
|
({{nStaff}} человек в штате)
|
||||||
|
</div>
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -34,6 +37,16 @@ export default {
|
|||||||
DateSelect
|
DateSelect
|
||||||
},
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
nStaff: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
// alldata: {
|
||||||
|
// type: Object,
|
||||||
|
// default: () => {return {period: [], staff: 0}}
|
||||||
|
// },
|
||||||
|
},
|
||||||
setup(){
|
setup(){
|
||||||
|
|
||||||
const filterStore = usePortalFilterStore()
|
const filterStore = usePortalFilterStore()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<template v-slot:filling_feedback>
|
<template v-slot:filling_feedback>
|
||||||
<div v-if="rating.length!=0" class="pt-1">
|
<div v-if="rating.length!=0" class="pt-1">
|
||||||
<v-row no-gutters>
|
<v-row no-gutters>
|
||||||
<v-col class="text-subtitle-1 bg-blue-grey-lighten-5 font-weight-bold">
|
<v-col class="text-h4 font-weight-medium">
|
||||||
{{avgcriteria}}
|
{{avgcriteria}}
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -18,14 +18,23 @@
|
|||||||
:key = key
|
:key = key
|
||||||
>
|
>
|
||||||
<v-col lg=1 class="text-subtitle-1 font-weight-regular cursor-default w100 pa-0">
|
<v-col lg=1 class="text-subtitle-1 font-weight-regular cursor-default w100 pa-0">
|
||||||
<v-icon
|
<v-tooltip
|
||||||
size="small"
|
:text=x.name
|
||||||
:color="x.color"
|
location="left"
|
||||||
:icon="x.ico"
|
>
|
||||||
/>
|
<template v-slot:activator="{ props }">
|
||||||
{{x.name}}
|
<v-icon
|
||||||
</v-col>
|
class="pb-4 pr-3"
|
||||||
<v-col lg=2 class=" w100 pa-0 ">
|
v-bind="props"
|
||||||
|
size="small"
|
||||||
|
:color="x.color"
|
||||||
|
:icon="x.ico"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</v-tooltip>
|
||||||
|
|
||||||
|
<!-- {{x.name}} -->
|
||||||
|
|
||||||
<v-rating
|
<v-rating
|
||||||
v-model="x.ratings"
|
v-model="x.ratings"
|
||||||
:hover="typeof(key) == 'number'"
|
:hover="typeof(key) == 'number'"
|
||||||
|
|||||||
@@ -215,26 +215,13 @@
|
|||||||
<v-row class="flex-grow-0" v-if="accountStore.user.is_staff">
|
<v-row class="flex-grow-0" v-if="accountStore.user.is_staff">
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-list nav density active-class="noneoutline">
|
<v-list nav density active-class="noneoutline">
|
||||||
<v-list-item v-for="(x, key) in supperuser"
|
<default-portal-menu-list :aMenuItem="supperuser"/>
|
||||||
:key="key"
|
<div v-if="baseURL=='http://127.0.0.1:8000/'">
|
||||||
:title="x.name"
|
<default-portal-menu-list :aMenuItem="oRasrab"/>
|
||||||
:value="x.name"
|
</div>
|
||||||
:href="x.link"
|
|
||||||
:target="x.link?'_blank':''"
|
|
||||||
slim
|
|
||||||
class="text-blue-grey-lighten-1"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<v-icon :icon="x.ico" size="x_small"/>
|
|
||||||
<v-tooltip
|
|
||||||
v-if="rail"
|
|
||||||
activator="parent"
|
|
||||||
location="top"
|
|
||||||
>
|
|
||||||
{{ x.name }}
|
|
||||||
</v-tooltip>
|
|
||||||
</template>
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -309,6 +296,7 @@ import { clearAxios } from '@/utils/axios-api'
|
|||||||
import { baseURL } from '@/utils/axios-api'
|
import { baseURL } from '@/utils/axios-api'
|
||||||
import VcardUser from '@/components/UI/fiousercard/vcardUser.vue'
|
import VcardUser from '@/components/UI/fiousercard/vcardUser.vue'
|
||||||
import PageCounter from '../../components/UI/defaultportal/page-counter.vue'
|
import PageCounter from '../../components/UI/defaultportal/page-counter.vue'
|
||||||
|
import DefaultPortalMenuList from './DefaultPortalMenuList.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
@@ -317,7 +305,8 @@ export default {
|
|||||||
OnlineUsers,
|
OnlineUsers,
|
||||||
CardLike,
|
CardLike,
|
||||||
VcardUser,
|
VcardUser,
|
||||||
PageCounter
|
PageCounter,
|
||||||
|
DefaultPortalMenuList
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [uf],
|
mixins: [uf],
|
||||||
@@ -375,6 +364,9 @@ export default {
|
|||||||
link: baseURL+'admin'
|
link: baseURL+'admin'
|
||||||
|
|
||||||
},
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
const oRasrab = [
|
||||||
{
|
{
|
||||||
name: 'Gitt',
|
name: 'Gitt',
|
||||||
ico: 'mdi-github',
|
ico: 'mdi-github',
|
||||||
@@ -387,6 +379,9 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
// ]
|
||||||
|
|
||||||
const navigations = [
|
const navigations = [
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -482,7 +477,7 @@ export default {
|
|||||||
imageSrc,
|
imageSrc,
|
||||||
LikeDialog,
|
LikeDialog,
|
||||||
scrimg,
|
scrimg,
|
||||||
|
oRasrab,
|
||||||
rail,
|
rail,
|
||||||
showTooltip,
|
showTooltip,
|
||||||
menuTruncated,
|
menuTruncated,
|
||||||
@@ -490,7 +485,8 @@ export default {
|
|||||||
alert,
|
alert,
|
||||||
burl,
|
burl,
|
||||||
supperuser,
|
supperuser,
|
||||||
closeinfo
|
closeinfo,
|
||||||
|
baseURL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<v-list-item
|
||||||
|
v-for="(x, key) in aMenuItem"
|
||||||
|
:key="key"
|
||||||
|
:title="x.name"
|
||||||
|
:value="x.name"
|
||||||
|
:href="x.link"
|
||||||
|
:target="x.link?'_blank':''"
|
||||||
|
slim
|
||||||
|
class="text-blue-grey-lighten-1"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<v-icon :icon="x.ico" size="x_small"/>
|
||||||
|
<v-tooltip
|
||||||
|
v-if="rail"
|
||||||
|
activator="parent"
|
||||||
|
location="top"
|
||||||
|
>
|
||||||
|
{{ x.name }}
|
||||||
|
</v-tooltip>
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
aMenuItem: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -11,7 +11,8 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
<v-row v-else no-gutters class="gap ma-1 flex-column">
|
<v-row v-else no-gutters class="gap ma-1 flex-column">
|
||||||
<v-col class="d-flex flex-column w100 pa-0 flex-grow-0">
|
<v-col class="d-flex flex-column w100 pa-0 flex-grow-0">
|
||||||
<toolbar-filter/>
|
<toolbar-filter :nStaff=alldata.staff />
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="d-flex " >
|
<v-col class="d-flex " >
|
||||||
<v-row no-gutters class="gap" >
|
<v-row no-gutters class="gap" >
|
||||||
@@ -22,7 +23,6 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="flex-column d-flex w100">
|
<v-col class="flex-column d-flex w100">
|
||||||
<v-row no-gutters class="flex-column gap" >
|
<v-row no-gutters class="flex-column gap" >
|
||||||
<my-helper :pretext= "alldata.beforperiod" />
|
|
||||||
<v-col v-for="x in cardtotal" :key=x>
|
<v-col v-for="x in cardtotal" :key=x>
|
||||||
<card-total :indicator=x />
|
<card-total :indicator=x />
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
:dataLineChart="dataLineChart"
|
:dataLineChart="dataLineChart"
|
||||||
:period="{before:alldata.beforperiod,period:alldata.period}"
|
:period="{before:alldata.beforperiod,period:alldata.period}"
|
||||||
:filter = filter
|
:filter = filter
|
||||||
|
@getCRR = "getCRR"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class=" d-flex flex-column">
|
<v-col class=" d-flex flex-column">
|
||||||
@@ -212,12 +213,16 @@ setup(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let bothuser = new Set([...periodusers].filter(element => beforperiodusers.has(element)))
|
|
||||||
cardtotal.value.crr.data = bothuser.size*100/beforperiodusers.size
|
|
||||||
sumtraffic(traffic)
|
sumtraffic(traffic)
|
||||||
dataLineChart.value = traffic
|
dataLineChart.value = traffic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getCRR = (val) => {
|
||||||
|
|
||||||
|
cardtotal.value.crr.data = val
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
const sumtraffic= (data) => {
|
const sumtraffic= (data) => {
|
||||||
|
|
||||||
let ob = {brtot:0, ppvtot: 0, unictot: 0, pagetot: 0}
|
let ob = {brtot:0, ppvtot: 0, unictot: 0, pagetot: 0}
|
||||||
@@ -252,7 +257,7 @@ setup(){
|
|||||||
cardtotal,
|
cardtotal,
|
||||||
dataLineChart,
|
dataLineChart,
|
||||||
filterStore,
|
filterStore,
|
||||||
|
getCRR,
|
||||||
filter: ref('d'),
|
filter: ref('d'),
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user