diff --git a/package.json b/package.json
index de7ad43..d26d073 100644
--- a/package.json
+++ b/package.json
@@ -36,13 +36,15 @@
"path-to-regexp": "6.2.0",
"pinia": "2.0.22",
"screenfull": "6.0.0",
+ "spark-md5": "^3.0.2",
"vform3-builds": "3.0.8",
"vue": "3.2.45",
"vue-cropper": "1.0.3",
"vue-echarts": "^6.7.1",
"vue-i18n": "9.2.2",
"vue-router": "4.1.4",
- "vue-types": "^5.0.3"
+ "vue-types": "^5.0.3",
+ "vue3-seamless-scroll": "^2.0.1"
},
"devDependencies": {
"@iconify/json": "^2.2.40",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2ea73d4..183569f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -62,6 +62,9 @@ dependencies:
screenfull:
specifier: 6.0.0
version: 6.0.0
+ spark-md5:
+ specifier: ^3.0.2
+ version: 3.0.2
vform3-builds:
specifier: 3.0.8
version: 3.0.8
@@ -83,6 +86,9 @@ dependencies:
vue-types:
specifier: ^5.0.3
version: 5.1.1(vue@3.2.45)
+ vue3-seamless-scroll:
+ specifier: ^2.0.1
+ version: 2.0.1
devDependencies:
'@iconify/json':
@@ -745,8 +751,8 @@ packages:
vue-i18n:
optional: true
dependencies:
- '@intlify/message-compiler': 10.0.0-alpha.2
- '@intlify/shared': 10.0.0-alpha.2
+ '@intlify/message-compiler': 10.0.0-alpha.3
+ '@intlify/shared': 10.0.0-alpha.3
jsonc-eslint-parser: 1.4.1
source-map: 0.6.1
vue-i18n: 9.2.2(vue@3.2.45)
@@ -768,11 +774,11 @@ packages:
dependencies:
'@intlify/shared': 9.2.2
- /@intlify/message-compiler@10.0.0-alpha.2:
- resolution: {integrity: sha512-OGwttsMwB2BUzhZLraoAfAqcza5UyLMEU013ort3LbmdE6ke/pFONFyxjNQdmFWzW2K868AIVgwx4zo8lbmhjg==}
+ /@intlify/message-compiler@10.0.0-alpha.3:
+ resolution: {integrity: sha512-WjM1KAl5enpOfprfVAJ3FzwACmizZFPgyV0sn+QXoWH8BG2ahVkf7uVEqQH0mvUr2rKKaScwpzhH3wZ5F7ZdPw==}
engines: {node: '>= 16'}
dependencies:
- '@intlify/shared': 10.0.0-alpha.2
+ '@intlify/shared': 10.0.0-alpha.3
source-map-js: 1.0.2
dev: true
@@ -783,8 +789,8 @@ packages:
'@intlify/shared': 9.2.2
source-map: 0.6.1
- /@intlify/shared@10.0.0-alpha.2:
- resolution: {integrity: sha512-pWlpsC3IqkDuIH/5bNlyyiUbAXYymeNXkznORzPWT3qpAe8MazPOm14wMHGn/wESCdB5b9txQson4+CH0ym1hQ==}
+ /@intlify/shared@10.0.0-alpha.3:
+ resolution: {integrity: sha512-fi2q48i+C6sSCAt3vOj/9LD3tkr1wcvLt+ifZEHrpPiwHCyKLDYGp5qBNUHUBBA/iqFTeWdtHUbHE9z9OeTXkw==}
engines: {node: '>= 16'}
dev: true
@@ -808,7 +814,7 @@ packages:
optional: true
dependencies:
'@intlify/bundle-utils': 4.0.0(vue-i18n@9.2.2)
- '@intlify/shared': 10.0.0-alpha.2
+ '@intlify/shared': 10.0.0-alpha.3
'@rollup/pluginutils': 4.2.1
'@vue/compiler-sfc': 3.2.45
debug: 4.3.4
@@ -4524,6 +4530,10 @@ packages:
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
deprecated: Please use @jridgewell/sourcemap-codec instead
+ /spark-md5@3.0.2:
+ resolution: {integrity: sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==}
+ dev: false
+
/split-string@3.1.0:
resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==}
engines: {node: '>=0.10.0'}
@@ -4695,6 +4705,11 @@ packages:
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
dev: true
+ /throttle-debounce@5.0.0:
+ resolution: {integrity: sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg==}
+ engines: {node: '>=12.22'}
+ dev: false
+
/tinybench@2.6.0:
resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==}
dev: true
@@ -5332,6 +5347,12 @@ packages:
vue: 3.2.45
dev: false
+ /vue3-seamless-scroll@2.0.1:
+ resolution: {integrity: sha512-mI3BaDU3pjcPUhVSw3/xNKdfPBDABTi/OdZaZqKysx4cSdNfGRbVvGNDzzptBbJ5S7imv5T55l6x/SqgnxKreg==}
+ dependencies:
+ throttle-debounce: 5.0.0
+ dev: false
+
/vue@3.2.45:
resolution: {integrity: sha512-9Nx/Mg2b2xWlXykmCwiTUCWHbWIj53bnkizBxKai1g61f2Xit700A1ljowpTIM11e3uipOeiPcSqnmBg6gyiaA==}
dependencies:
diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue
index d8ed32b..4eedf1e 100644
--- a/src/components/ImageUpload/index.vue
+++ b/src/components/ImageUpload/index.vue
@@ -1,42 +1,29 @@
-
-
-
-
-
-
-
-
- 请上传
-
- 大小不超过 {{ fileSize }}MB
-
-
- 格式为 {{ fileType.join("/") }}
-
- 的文件
-
+
+
+
+
+
+
+
+
+ 请上传
+
+ 大小不超过 {{ fileSize }}MB
+
+
+ 格式为 {{ fileType.join("/") }}
+
+ 的文件
+
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/src/views/index.vue b/src/views/index.vue
index 2656867..24a7054 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -3,53 +3,28 @@
-
+
+
@@ -66,7 +41,7 @@
- 总访客数
+ 总用户数
2000
@@ -75,8 +50,109 @@
-
-
+
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+ 总测评数
+ 2000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+ 总预警数
+ 2000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+ 总干预数
+ 2000
+
+
+
+
+
+
+
+
@@ -104,50 +180,346 @@ use([
GridComponent
]);
+function getGreeting() {
+ // 获取当前时间
+ let timeNow = new Date();
+ // 获取当前小时
+ let hours = timeNow.getHours();
+ // 设置默认文字
+ let state = ``;
+ // 判断当前时间段
+ if (hours >= 0 && hours <= 10) {
+ state = `早上好, ${userStore.nickname}`;
+ } else if (hours > 10 && hours <= 14) {
+ state = `中午好, ${userStore.nickname}`;
+ } else if (hours > 14 && hours <= 18) {
+ state = `下午好, ${userStore.nickname}`;
+ } else if (hours > 18 && hours <= 24) {
+ state = `晚上好, ${userStore.nickname}`;
+ }
+ return state;
+}
+
+const leftPieOption = ref({
+ title: {
+ text: '预警统计',
+ subtext: '严重度',
+ x: 'center',
+ y: '40%',
+ textStyle: {
+ color: '#95989D',
+ fontSize: 20,
+ lineHeight: 10,
+ },
+ subtextStyle: {
+ color: '#95989D',
+ fontSize: 16,
+ lineHeight: 10,
+ },
+ },
+ tooltip: {
+ trigger: 'item',
+ formatter: "{b} : {c} ({d}%)"
+ },
+
+ visualMap: {
+ show: false,
+ min: 500,
+ max: 600,
+ inRange: {
+ //colorLightness: [0, 1]
+ }
+ },
+ series: [{
+ name: '访问来源',
+ type: 'pie',
+ radius: ['50%', '70%'],
+ center: ['50%', '50%'],
+ color: ['rgb(131,249,103)', '#FBFE27', '#FE5050', '#1DB7E5'], //'#FBFE27','rgb(11,228,96)','#FE5050'
+ data: [{
+ "value": 1924,
+ "name": "字段名称1"
+ }, {
+ "value": 1055,
+ "name": "字段名称2"
+ }, {
+ "value": 1532,
+ "name": "字段名称3"
+ }
+ ].sort(function (a, b) {
+ return a.value - b.value
+ }),
+ roseType: 'radius',
+
+ label: {
+ normal: {
+ formatter: ['{c|{c}万}', '{b|{b}}'].join('\n'),
+ rich: {
+ c: {
+ color: '#95989D',
+ fontSize: 20,
+ fontWeight: 'bold',
+ lineHeight: 5
+ },
+ b: {
+ color: '#95989D',
+ fontSize: 14,
+ height: 44
+ },
+ },
+ }
+ },
+ labelLine: {
+ normal: {
+ lineStyle: {
+ color: 'rgb(98,137,169)',
+ },
+ smooth: 0.2,
+ length: 10,
+ length2: 20,
+
+ }
+ }
+ }]
+})
+
+const centerBarOption = ref({
+ title: {
+ text: '年级统计',
+ x: 'right',
+ y: '1%',
+ textStyle: {
+ color: '#95989D',
+ fontSize: 20,
+ lineHeight: 10,
+ }
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: { // 坐标轴指示器,坐标轴触发有效
+ type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
+ }
+ },
+ legend: {
+ data: ['字段1', '字段2', '字段3'],
+ right: 'center',
+ top: 0,
+ textStyle: {
+ color: "#95989D"
+ },
+ itemWidth: 12,
+ itemHeight: 10,
+ // itemGap: 35
+ },
+ grid: {
+ left: '0',
+ right: '20',
+ bottom: '0',
+ top: '15%',
+ containLabel: true
+ },
+ xAxis: {
+ type: 'category',
+ data: ['字段1', '字段2', '字段3', '字段3', '字段4', '字段5', '字段6', '字段7', '字段8', '字段9'],
+ axisLine: {
+ lineStyle: {
+ color: '#95989D'
+ }
+ },
+ axisLabel: {
+ //rotate:-90,
+ formatter: function (value: any) { return value.split("").join("\n"); },
+ textStyle: {
+ color: '#95989D',
+ fontSize: 14,
+ },
+ lineStyle: {
+ color: '#95989D',
+ }
+ }
+ },
+
+ yAxis: {
+ type: 'value',
+ splitNumber: 4,
+ axisTick: { show: false },
+ splitLine: {
+ show: true,
+ lineStyle: {
+ color: '#95989D'
+ }
+ },
+ axisLabel: {
+ textStyle: {
+ color: '#95989D',
+ fontSize: 14,
+ }
+ },
+ axisLine: { show: false },
+ },
+
+ series: [{
+ name: '字段1',
+ type: 'bar',
+ stack: 'a',
+ barWidth: '30', barGap: 0,
+ itemStyle: {
+ normal: {
+ color: '#8bd46e',
+ }
+ },
+ data: [331, 497, 440, 81, 163, 366, 57, 188, 172, 2295]
+ },
+ {
+ name: '字段2',
+ type: 'bar',
+ stack: 'a',
+ barWidth: '30', barGap: 0,
+ itemStyle: {
+ normal: {
+ color: '#f5804d',
+ barBorderRadius: 0,
+ }
+ },
+ data: [48, -97, 56, -59, 90, 98, 64, 61, -8, 253]
+ },
+ {
+ name: '字段3',
+ type: 'bar',
+ stack: 'a',
+ barWidth: '30', barGap: 0,
+ itemStyle: {
+ normal: {
+ color: '#248ff7',
+ barBorderRadius: 0,
+ }
+ },
+ data: [-13, -21, -112, 5, 0, -5, 72, -3, 8, -69]
+ }
+ ]
+})
+
+const rightBarOption = ref({
+ title: {
+ text: '量表使用次数',
+ x: 'center',
+ y: '1%',
+ textStyle: {
+ color: '#95989D',
+ fontSize: 20,
+ lineHeight: 10,
+ }
+ },
+ grid: {
+ left: '2%',
+ top: '5%',
+ right: '5%',
+ bottom: '0%',
+ containLabel: true
+ },
+ xAxis: [{
+ show: false,
+ }],
+ yAxis: [{
+ axisTick: 'none',
+ axisLine: 'none',
+ offset: '7',
+ axisLabel: {
+ textStyle: {
+ color: '#95989D',
+ fontSize: '14',
+ }
+ },
+ data: ['字段1', '字段2', '字段3', '字段4', '字段5', '字段6', '字段7', '字段8', '字段9']
+
+ }, {
+ axisTick: 'none',
+ axisLine: 'none',
+ axisLabel: {
+ textStyle: {
+ color: '#95989D',
+ fontSize: '14',
+ }
+ },
+ data: [1514, 1619, 1623, 1968, 2158, 2456, 3506, 4664, 8390]
+
+ }, {
+ name: '单位:件',
+ nameGap: '50',
+ nameTextStyle: {
+ color: 'rgba(255,255,255,.6)',
+ fontSize: '16',
+ },
+ axisLine: {
+ lineStyle: {
+ color: 'rgba(0,0,0,0)'
+ }
+ },
+ data: [],
+ }],
+ series: [{
+ name: '条',
+ type: 'bar',
+ yAxisIndex: 0,
+ data: [25, 30, 34, 40, 43, 48, 52, 56, 70],
+ label: {
+ normal: {
+ show: true,
+ position: 'right',
+ formatter: function (param: any) {
+ return param.value + '%';
+ },
+ textStyle: {
+ color: 'rgba(255,255,255,.8)',
+ fontSize: '12',
+ }
+ }
+ },
+ barWidth: 15,
+ itemStyle: {
+ normal: {
+ color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
+ offset: 0,
+ color: '#03c893'
+ },
+ {
+ offset: 1,
+ color: '#0091ff'
+ }
+ ]),
+ barBorderRadius: 15,
+ }
+ },
+ z: 2
+ }, {
+ name: '白框',
+ type: 'bar',
+ yAxisIndex: 1,
+ barGap: '-100%',
+ data: [99.5, 99.5, 99.5, 99.5, 99.5, 99.5, 99.5, 99.5, 99.5, 99.5],
+ barWidth: 15,
+ itemStyle: {
+ normal: {
+ color: 'rgba(0,0,0,.2)',
+ barBorderRadius: 15,
+ }
+ },
+ z: 1
+ }]
+});
+
+
+
// import { initWebSocket } from '@/utils/websocket';
// onMounted(() => {
// let protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://'
// initWebSocket(protocol + window.location.host + import.meta.env.VITE_APP_BASE_API + "/resource/websocket");
// });
-const option = ref({
- title: {
- text: '图表统计',
- left: 'center'
- },
- tooltip: {
- trigger: 'item'
- },
- series: [
- {
- name: 'Access From',
- type: 'pie',
- radius: '50%',
- data: [
- { value: 1048, name: 'Search Engine' },
- { value: 735, name: 'Direct' },
- { value: 580, name: 'Email' },
- { value: 484, name: 'Union Ads' },
- { value: 300, name: 'Video Ads' }
- ],
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }
- ]
-})