Статистика
This commit is contained in:
1 parent
04e6458376
commit
f9cd0e1f14
3 files changed
+60
-14
No files matched your search
Generated
+8
-8
@@ -12,7 +12,7 @@
|
||||
"@vuelidate/core": "^2.0.3",
|
||||
"@vuelidate/validators": "^2.0.3",
|
||||
"axios": "^1.4.0",
|
||||
"chart.js": "^4.4.0",
|
||||
"chart.js": "^4.4.1",
|
||||
"date-fns": "^2.30.0",
|
||||
"express-vue": "^5.12.0",
|
||||
"moment": "^2.29.4",
|
||||
@@ -21,7 +21,7 @@
|
||||
"v-tooltip": "^2.1.3",
|
||||
"vue": "^3.2.0",
|
||||
"vue-cal": "^4.8.1",
|
||||
"vue-chartjs": "^5.2.0",
|
||||
"vue-chartjs": "^5.3.0",
|
||||
"vue-jwt-decode": "^0.1.0",
|
||||
"vue-router": "^4.0.0",
|
||||
"vue3-autocounter": "^1.0.6",
|
||||
@@ -7354,9 +7354,9 @@
|
||||
"integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA=="
|
||||
},
|
||||
"node_modules/chart.js": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.0.tgz",
|
||||
"integrity": "sha512-vQEj6d+z0dcsKLlQvbKIMYFHd3t8W/7L2vfJIbYcfyPcRx92CsHqECpueN8qVGNlKyDcr5wBrYAYKnfu/9Q1hQ==",
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.1.tgz",
|
||||
"integrity": "sha512-C74QN1bxwV1v2PEujhmKjOZ7iUM4w6BWs23Md/6aOZZSlwMzeCIDGuZay++rBgChYru7/+QFeoQW0fQoP534Dg==",
|
||||
"dependencies": {
|
||||
"@kurkle/color": "^0.3.0"
|
||||
},
|
||||
@@ -21492,9 +21492,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vue-chartjs": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.2.0.tgz",
|
||||
"integrity": "sha512-d3zpKmGZr2OWHQ1xmxBcAn5ShTG917+/UCLaSpaCDDqT0U7DBsvFzTs69ZnHCgKoXT55GZDW8YEj9Av+dlONLA==",
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.3.0.tgz",
|
||||
"integrity": "sha512-8XqX0JU8vFZ+WA2/knz4z3ThClduni2Nm0BMe2u0mXgTfd9pXrmJ07QBI+WAij5P/aPmPMX54HCE1seWL37ZdQ==",
|
||||
"peerDependencies": {
|
||||
"chart.js": "^4.1.1",
|
||||
"vue": "^3.0.0-0 || ^2.7.0"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"@vuelidate/core": "^2.0.3",
|
||||
"@vuelidate/validators": "^2.0.3",
|
||||
"axios": "^1.4.0",
|
||||
"chart.js": "^4.4.0",
|
||||
"chart.js": "^4.4.1",
|
||||
"date-fns": "^2.30.0",
|
||||
"express-vue": "^5.12.0",
|
||||
"moment": "^2.29.4",
|
||||
@@ -23,7 +23,7 @@
|
||||
"v-tooltip": "^2.1.3",
|
||||
"vue": "^3.2.0",
|
||||
"vue-cal": "^4.8.1",
|
||||
"vue-chartjs": "^5.2.0",
|
||||
"vue-chartjs": "^5.3.0",
|
||||
"vue-jwt-decode": "^0.1.0",
|
||||
"vue-router": "^4.0.0",
|
||||
"vue3-autocounter": "^1.0.6",
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="bg-red">
|
||||
2
|
||||
1
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class="d-flex flex-column ">
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="bg-blue">
|
||||
2
|
||||
<!-- <Line :data="data" :options="options" /> -->
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
@@ -53,9 +53,52 @@
|
||||
import { ref, computed } from 'vue'
|
||||
import {getfromserver, pagecounter, splitname} from '@/utils/universal_functions'
|
||||
import moment from 'moment'
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
PointElement,
|
||||
LineElement,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend
|
||||
} from 'chart.js'
|
||||
import { Line } from 'vue-chartjs'
|
||||
import * as chartConfig from './chartConfig.js'
|
||||
|
||||
ChartJS.register(
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
PointElement,
|
||||
LineElement,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend
|
||||
)
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Line
|
||||
},
|
||||
|
||||
setup(){
|
||||
|
||||
const data = {
|
||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Data One',
|
||||
backgroundColor: '#f87979',
|
||||
data: [40, 39, 10, 40, 39, 80, 40]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
const options = {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false
|
||||
}
|
||||
|
||||
const visiting = ref([])
|
||||
const previousWeekStart = moment().subtract(1, 'weeks').startOf('week'); // начало предыдущей недели
|
||||
const previousWeekEnd = moment().subtract(1, 'weeks').endOf('week'); // конец предыдущей недели
|
||||
@@ -131,7 +174,7 @@ setup(){
|
||||
console.log(Object.keys(acc).length, 'item------------');
|
||||
|
||||
|
||||
if (Object.keys(acc).length <3) { // выводит 0, затем 1, затем 2
|
||||
if (Object.keys(acc).length <4) {
|
||||
|
||||
|
||||
|
||||
@@ -186,7 +229,10 @@ setup(){
|
||||
visiting,
|
||||
countvis,
|
||||
countgrupp,
|
||||
activuser
|
||||
activuser,
|
||||
chartConfig,
|
||||
data,
|
||||
options
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user