From e7e900f122b4bbf3ff481f7d6472d075ca8bcf12 Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:30:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B7=D0=B0=D0=BB?= =?UTF-8?q?=D0=B8=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/UI/aboutportal/line-chart.vue | 38 +--- .../components/UI/aboutportal/line-chart2.vue | 179 ------------------ .../components/UI/aboutportal/rating-page.vue | 12 +- .../components/UI/aboutportal/top-user.vue | 47 +++-- .../src/components/UI/feedback/star-like.vue | 2 +- 5 files changed, 42 insertions(+), 236 deletions(-) delete mode 100644 src/front/src/components/UI/aboutportal/line-chart2.vue diff --git a/src/front/src/components/UI/aboutportal/line-chart.vue b/src/front/src/components/UI/aboutportal/line-chart.vue index b67fa9f3c..0c2a56a10 100644 --- a/src/front/src/components/UI/aboutportal/line-chart.vue +++ b/src/front/src/components/UI/aboutportal/line-chart.vue @@ -89,7 +89,7 @@ export default { data: [], func: (val)=>{return val.unic.length}, datakey: "unic", - hidden: true, + customlabel: [], tooltips: true, yAxisID: 'y' @@ -104,7 +104,7 @@ export default { data: [], func: (val, key)=>{ return parseFloat(crrfunc(key).toFixed(2)) }, - + hidden: true, datakey: "crr", customlabel: [], tooltips: true, @@ -193,11 +193,8 @@ export default { - - // const data = ref(datachanged.value) 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 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 = { - // layout: { - // padding: 20 - // }, + plugins: { 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: { padding: { diff --git a/src/front/src/components/UI/aboutportal/line-chart2.vue b/src/front/src/components/UI/aboutportal/line-chart2.vue deleted file mode 100644 index 705680d1e..000000000 --- a/src/front/src/components/UI/aboutportal/line-chart2.vue +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/front/src/components/UI/aboutportal/rating-page.vue b/src/front/src/components/UI/aboutportal/rating-page.vue index bcd8a8ad7..629b41111 100644 --- a/src/front/src/components/UI/aboutportal/rating-page.vue +++ b/src/front/src/components/UI/aboutportal/rating-page.vue @@ -33,13 +33,13 @@ - + - + {{value}} @@ -51,7 +51,7 @@ no-gutters v-for="n in item.now.unic" :key="n" > - + {{n}} @@ -274,8 +274,12 @@ export default { } .mytable tr { - font-size: 12px; + font-size: 13px; } +.mytable i{ + font-size: 10px; +} + .myleft { float: left; diff --git a/src/front/src/components/UI/aboutportal/top-user.vue b/src/front/src/components/UI/aboutportal/top-user.vue index cbe5cbea1..e70fcc57e 100644 --- a/src/front/src/components/UI/aboutportal/top-user.vue +++ b/src/front/src/components/UI/aboutportal/top-user.vue @@ -16,7 +16,7 @@ show-expand class="h-0 cursor-default bg-grey_white" :sort-by="[{ key: 'info.count', order: 'desc' }]" - density="compact" + density="comfortable" > @@ -28,8 +28,10 @@ + - + + + {{ column.tooltip }} + + + + + - - - - - {{ value }} - - - - - - {{ value }} - + + + {{ value }} + + + + + {{ value }} + + + + @@ -163,7 +171,7 @@ export default { 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, @@ -178,8 +186,9 @@ export default { unic: 1 }] }) + console.log(res, 'ind----------------------') } - + else { let ob =res[ind] ob.info.count += e.count, @@ -198,7 +207,7 @@ export default { } else { - ob.tooltip[indt].unic += e.count + ob.tooltip[indt].count += e.count ob.tooltip[indt].unic += 1 } } @@ -237,9 +246,9 @@ export default { maxWidth: '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%' }, diff --git a/src/front/src/components/UI/feedback/star-like.vue b/src/front/src/components/UI/feedback/star-like.vue index d346ae378..4b14f13ca 100644 --- a/src/front/src/components/UI/feedback/star-like.vue +++ b/src/front/src/components/UI/feedback/star-like.vue @@ -38,7 +38,7 @@ > - +