На заливку
This commit is contained in:
1 parent
6ccbaae9e9
commit
f38ed176e9
7 files changed
+140
-48
No files matched your search
@@ -90,7 +90,7 @@ export default {
|
||||
data: [],
|
||||
func: (val)=>{return val.unic.length},
|
||||
datakey: "unic",
|
||||
hidden: true,
|
||||
|
||||
customlabel: [],
|
||||
tooltips: true,
|
||||
yAxisID: 'y'
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
data: [],
|
||||
func: (val, key)=>{ return parseFloat(crrfunc(key).toFixed(2))
|
||||
},
|
||||
|
||||
hidden: true,
|
||||
datakey: "crr",
|
||||
customlabel: [],
|
||||
tooltips: true,
|
||||
@@ -155,11 +155,12 @@ export default {
|
||||
if (Object.keys(props.dataLineChart).length>0){
|
||||
res = arrlines
|
||||
res.labels=[]
|
||||
|
||||
|
||||
res.datasets.forEach((e) => {e.data =[]})
|
||||
for(let [key,val] of Object.entries(props.dataLineChart))
|
||||
|
||||
{
|
||||
|
||||
|
||||
res.datasets.forEach((e) => {
|
||||
e.data.push(e.func(val,key))
|
||||
|
||||
@@ -199,20 +200,25 @@ export default {
|
||||
|
||||
|
||||
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 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
|
||||
|
||||
editCRR(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) => {
|
||||
|
||||
@@ -222,7 +228,7 @@ export default {
|
||||
}
|
||||
|
||||
const data=computed({get() {
|
||||
|
||||
|
||||
return JSON.parse(JSON.stringify(dataf.value))
|
||||
}
|
||||
})
|
||||
@@ -240,16 +246,35 @@ export default {
|
||||
display: 'auto'
|
||||
},
|
||||
legend: {
|
||||
onHover: (event, chartElement) => {
|
||||
event.native.target.style.cursor ='pointer' ;
|
||||
},
|
||||
onLeave: (event, chartElement) => {
|
||||
event.native.target.style.cursor ='default' ;
|
||||
},
|
||||
position: 'bottom',
|
||||
labels: {
|
||||
color: 'grey',
|
||||
align: 'right',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 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: {
|
||||
padding: {
|
||||
@@ -305,4 +330,8 @@ export default {
|
||||
canvas {
|
||||
flex: 1!important
|
||||
}
|
||||
|
||||
.chartjs-legend {
|
||||
cursor: pointer
|
||||
}
|
||||
</style>
|
||||
@@ -142,7 +142,7 @@ let res = {
|
||||
// res.before.user=res.period.user
|
||||
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.tooltip =`% от штата (${props.alldata.staff} сотрудников не конец выбранного периода)`
|
||||
// res.proc.tooltip =`% от штата (${props.alldata.staff} сотрудников не конец выбранного периода)`
|
||||
let data1 = moment(filterStore.date_period.enddate)
|
||||
let data2 = moment(filterStore.date_period.startdate)
|
||||
let between = data1.diff(data2, 'days') + 1
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
:datedefault = "filterStore.date_period.enddate"
|
||||
/>
|
||||
</div>
|
||||
<div class="text-caption font-weight-regular">
|
||||
({{nStaff}} человек в штате)
|
||||
</div>
|
||||
</v-toolbar>
|
||||
</template>
|
||||
|
||||
@@ -34,6 +37,16 @@ export default {
|
||||
DateSelect
|
||||
},
|
||||
|
||||
props: {
|
||||
nStaff: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
// alldata: {
|
||||
// type: Object,
|
||||
// default: () => {return {period: [], staff: 0}}
|
||||
// },
|
||||
},
|
||||
setup(){
|
||||
|
||||
const filterStore = usePortalFilterStore()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<template v-slot:filling_feedback>
|
||||
<div v-if="rating.length!=0" class="pt-1">
|
||||
<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}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -18,14 +18,23 @@
|
||||
:key = key
|
||||
>
|
||||
<v-col lg=1 class="text-subtitle-1 font-weight-regular cursor-default w100 pa-0">
|
||||
<v-icon
|
||||
size="small"
|
||||
:color="x.color"
|
||||
:icon="x.ico"
|
||||
/>
|
||||
{{x.name}}
|
||||
</v-col>
|
||||
<v-col lg=2 class=" w100 pa-0 ">
|
||||
<v-tooltip
|
||||
:text=x.name
|
||||
location="left"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-icon
|
||||
class="pb-4 pr-3"
|
||||
v-bind="props"
|
||||
size="small"
|
||||
:color="x.color"
|
||||
:icon="x.ico"
|
||||
/>
|
||||
</template>
|
||||
</v-tooltip>
|
||||
|
||||
<!-- {{x.name}} -->
|
||||
|
||||
<v-rating
|
||||
v-model="x.ratings"
|
||||
:hover="typeof(key) == 'number'"
|
||||
|
||||
@@ -215,26 +215,13 @@
|
||||
<v-row class="flex-grow-0" v-if="accountStore.user.is_staff">
|
||||
<v-col>
|
||||
<v-list nav density active-class="noneoutline">
|
||||
<v-list-item v-for="(x, key) in supperuser"
|
||||
: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>
|
||||
<default-portal-menu-list :aMenuItem="supperuser"/>
|
||||
<div v-if="baseURL=='http://127.0.0.1:8000/'">
|
||||
<default-portal-menu-list :aMenuItem="oRasrab"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</v-list>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -309,6 +296,7 @@ import { clearAxios } from '@/utils/axios-api'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import VcardUser from '@/components/UI/fiousercard/vcardUser.vue'
|
||||
import PageCounter from '../../components/UI/defaultportal/page-counter.vue'
|
||||
import DefaultPortalMenuList from './DefaultPortalMenuList.vue'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -317,7 +305,8 @@ export default {
|
||||
OnlineUsers,
|
||||
CardLike,
|
||||
VcardUser,
|
||||
PageCounter
|
||||
PageCounter,
|
||||
DefaultPortalMenuList
|
||||
},
|
||||
|
||||
mixins: [uf],
|
||||
@@ -374,7 +363,10 @@ export default {
|
||||
ico: 'mdi-wrench',
|
||||
link: baseURL+'admin'
|
||||
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
const oRasrab = [
|
||||
{
|
||||
name: 'Gitt',
|
||||
ico: 'mdi-github',
|
||||
@@ -387,6 +379,9 @@ export default {
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
// ]
|
||||
|
||||
const navigations = [
|
||||
|
||||
{
|
||||
@@ -482,7 +477,7 @@ export default {
|
||||
imageSrc,
|
||||
LikeDialog,
|
||||
scrimg,
|
||||
|
||||
oRasrab,
|
||||
rail,
|
||||
showTooltip,
|
||||
menuTruncated,
|
||||
@@ -490,7 +485,8 @@ export default {
|
||||
alert,
|
||||
burl,
|
||||
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-else no-gutters class="gap ma-1 flex-column">
|
||||
<v-col class="d-flex flex-column w100 pa-0 flex-grow-0">
|
||||
<toolbar-filter/>
|
||||
<toolbar-filter :nStaff=alldata.staff />
|
||||
|
||||
</v-col>
|
||||
<v-col class="d-flex " >
|
||||
<v-row no-gutters class="gap" >
|
||||
@@ -22,7 +23,6 @@
|
||||
</v-col>
|
||||
<v-col class="flex-column d-flex w100">
|
||||
<v-row no-gutters class="flex-column gap" >
|
||||
<my-helper :pretext= "alldata.beforperiod" />
|
||||
<v-col v-for="x in cardtotal" :key=x>
|
||||
<card-total :indicator=x />
|
||||
</v-col>
|
||||
@@ -38,6 +38,7 @@
|
||||
:dataLineChart="dataLineChart"
|
||||
:period="{before:alldata.beforperiod,period:alldata.period}"
|
||||
:filter = filter
|
||||
@getCRR = "getCRR"
|
||||
/>
|
||||
</v-col>
|
||||
<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)
|
||||
dataLineChart.value = traffic
|
||||
}
|
||||
|
||||
const getCRR = (val) => {
|
||||
|
||||
cardtotal.value.crr.data = val
|
||||
|
||||
}
|
||||
|
||||
const sumtraffic= (data) => {
|
||||
|
||||
let ob = {brtot:0, ppvtot: 0, unictot: 0, pagetot: 0}
|
||||
@@ -252,7 +257,7 @@ setup(){
|
||||
cardtotal,
|
||||
dataLineChart,
|
||||
filterStore,
|
||||
|
||||
getCRR,
|
||||
filter: ref('d'),
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user