diff --git a/package-lock.json b/package-lock.json
index a4d23b9..5b802c6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -18,7 +18,8 @@
"vue": "^3.5.13",
"vue-countup-v3": "^1.4.2",
"vue-echarts": "^7.0.3",
- "vue-router": "^4.4.5"
+ "vue-router": "^4.4.5",
+ "vue3-seamless-scroll": "^2.0.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
@@ -3368,6 +3369,14 @@
"url": "https://opencollective.com/webpack"
}
},
+ "node_modules/throttle-debounce": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-5.0.0.tgz",
+ "integrity": "sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg==",
+ "engines": {
+ "node": ">=12.22"
+ }
+ },
"node_modules/tinyglobby": {
"version": "0.2.10",
"resolved": "https://registry.npmmirror.com/tinyglobby/-/tinyglobby-0.2.10.tgz",
@@ -3887,6 +3896,14 @@
"vue": "^3.2.0"
}
},
+ "node_modules/vue3-seamless-scroll": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/vue3-seamless-scroll/-/vue3-seamless-scroll-2.0.1.tgz",
+ "integrity": "sha512-mI3BaDU3pjcPUhVSw3/xNKdfPBDABTi/OdZaZqKysx4cSdNfGRbVvGNDzzptBbJ5S7imv5T55l6x/SqgnxKreg==",
+ "dependencies": {
+ "throttle-debounce": "5.0.0"
+ }
+ },
"node_modules/watchpack": {
"version": "2.4.2",
"resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.2.tgz",
diff --git a/package.json b/package.json
index 428687c..fcb01d6 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,8 @@
"vue": "^3.5.13",
"vue-countup-v3": "^1.4.2",
"vue-echarts": "^7.0.3",
- "vue-router": "^4.4.5"
+ "vue-router": "^4.4.5",
+ "vue3-seamless-scroll": "^2.0.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
diff --git a/src/assets/images/legend-item-blue.png b/src/assets/images/legend-item-blue.png
new file mode 100644
index 0000000..5ad5dc9
Binary files /dev/null and b/src/assets/images/legend-item-blue.png differ
diff --git a/src/assets/images/legend-item-green.png b/src/assets/images/legend-item-green.png
new file mode 100644
index 0000000..08a4bcf
Binary files /dev/null and b/src/assets/images/legend-item-green.png differ
diff --git a/src/assets/images/legend-item-orange.png b/src/assets/images/legend-item-orange.png
new file mode 100644
index 0000000..a5c4158
Binary files /dev/null and b/src/assets/images/legend-item-orange.png differ
diff --git a/src/components/CoreVideo/index.vue b/src/components/CoreVideo/index.vue
index 40456cd..0008466 100644
--- a/src/components/CoreVideo/index.vue
+++ b/src/components/CoreVideo/index.vue
@@ -8,6 +8,7 @@
:style="{ backgroundImage: `url(${index == 0 ? primary : error})` }"
v-for="(item, index) in list"
:key="index"
+ @click.shop="handleItem(item)"
>
@@ -149,7 +149,15 @@
const homeData = inject('homeData')
- let count = ref(69459)
+ const visitorInfo = computed(() => {
+ if (homeData.value) return homeData.value?.visitorInfo.data
+ return {
+ total_count_this_year: 0,
+ total_count_today: 0,
+ total_count_today_within_three_hours: 0
+ }
+ })
+
let spotList = ref([])
let list = ref([
@@ -180,7 +188,6 @@
let res1 = await getBaiduMapCrowdedApi({
nodeId: res.data[0].nodeid
})
- console.log(res1, 'res1')
}
watch(
@@ -200,7 +207,7 @@
arr.push(new BMapGL.Point(j[0], j[1]))
})
var polyline = new BMapGL.Polyline(arr, {
- strokeColor: '#1EBA29',
+ strokeColor: '#38DBFF',
strokeWeight: 4,
strokeOpacity: 0.8
})
@@ -280,7 +287,7 @@
position: absolute;
top: vw(20);
left: vw(20);
- z-index: 99999;
+ z-index: 99;
.alarm-item {
width: vw(110);
height: vh(40);
@@ -303,7 +310,7 @@
position: absolute;
bottom: vw(20);
left: vw(20);
- z-index: 99999;
+ z-index: 999;
}
.spot-list {
display: flex;
diff --git a/src/views/home/components/box-3.vue b/src/views/home/components/box-3.vue
index 24bfe79..be851f1 100644
--- a/src/views/home/components/box-3.vue
+++ b/src/views/home/components/box-3.vue
@@ -2,51 +2,36 @@
-
-
![]()
+
+
-
-
{{ item.label }}
+
+
路段总数
+
+
+
+
![]()
+
+
+
+
![]()
+
+
+
+
![]()
+
-
@@ -54,37 +39,21 @@
:width="250"
:height="150"
:config="{ legend: false }"
- :data="[
- {
- name: '企业数',
- data: [64, 159, 112, 86, 151, 131, 118, 232, 23, 64, 159, 112, 86, 151, 131, 118]
- }
- ]"
- :xAxisData="[
- '12-16 10:00',
- '12-16 14:00',
- '12-16 16:00',
- '12-16 22:00',
- '12-17 02:00',
- '12-17 06:00',
- '12-17 10:00',
- '12-17 14:00',
- '12-17 16:00',
- '12-16 22:00',
- '12-18 02:00',
- '12-18 06:00',
- '12-8 10:00',
- '12-18 14:00',
- '12-18 16:00',
- '12-18 20:00'
- ]"
+ :data="congestionData"
+ :xAxisData="congestionXAxisData"
/>
+
@@ -127,11 +96,11 @@
-
-
+
+
@@ -199,15 +168,24 @@
空余
-
-
{{ item.name }}
-
{{ item.started_count }}辆
-
{{ item.not_started_count }}辆
-
+
+
{{ item.name }}
+
{{ item.started_count }}辆
+
{{ item.not_started_count }}辆
+
+
@@ -226,15 +204,24 @@
空余
-
-
{{ item.name }}
-
{{ item.started_count }}辆
-
{{ item.not_started_count }}辆
-
+
+
{{ item.name }}
+
{{ item.started_count }}辆
+
{{ item.not_started_count }}辆
+
+
@@ -279,7 +266,8 @@
diff --git a/src/views/home/components/jam-duration.vue b/src/views/home/components/jam-duration.vue
new file mode 100644
index 0000000..39ac439
--- /dev/null
+++ b/src/views/home/components/jam-duration.vue
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/home/components/jam.vue b/src/views/home/components/jam.vue
deleted file mode 100644
index fbef9aa..0000000
--- a/src/views/home/components/jam.vue
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/home/components/ticket.vue b/src/views/home/components/ticket.vue
index 418542f..b4b14ec 100644
--- a/src/views/home/components/ticket.vue
+++ b/src/views/home/components/ticket.vue
@@ -1,18 +1,6 @@
@@ -20,6 +8,13 @@
import { fitChartSize } from '@/utils/dataUtil'
import { useEchart } from '@/hooks/echart'
+ let props = defineProps({
+ list: {
+ type: Array,
+ default: () => []
+ }
+ })
+
const { id, setOption } = useEchart()
const homeData = inject('homeData')
@@ -29,9 +24,9 @@
let params = null
watch(
- () => homeData.value?.userPortrait?.channel,
+ () => props.list,
(val) => {
- if (val) init()
+ if (val.length > 0) init()
},
{
immediate: true
@@ -39,11 +34,12 @@
)
const setSeries = () => {
- return homeData.value?.userPortrait?.channel.map((item, index) => {
+ return props.list.map((item, index) => {
return {
name: item.name,
- clockwise: false,
type: 'pie',
+ clockwise: false,
+ silent: true,
radius: [`${x * (index + 1)}%`, `${y + index * 15}%`],
center: ['50%', '40%'],
label: { show: false },
@@ -73,20 +69,22 @@
show: true,
x: 'center',
y: 'bottom',
- itemHeight: fitChartSize(8),
- itemWidth: fitChartSize(8),
- itemGap: fitChartSize(20),
+ itemHeight: fitChartSize(12),
+ itemWidth: fitChartSize(12),
+ itemGap: fitChartSize(10),
formatter: function (name) {
- return '{title|' + name + '}'
+ let obj = props.list.find((item) => item.name == name)
+ return '{name|' + name + '} {value|' + obj?.value + '}{value|%}'
},
textStyle: {
rich: {
- title: {
+ name: {
color: '#fff',
fontSize: fitChartSize(14)
},
value: {
color: '#00D5F6',
+ fontWeight: 600,
fontSize: fitChartSize(14)
}
}
diff --git a/src/views/sentiment/index.vue b/src/views/sentiment/index.vue
index 9f72b5e..b771a86 100644
--- a/src/views/sentiment/index.vue
+++ b/src/views/sentiment/index.vue
@@ -24,8 +24,8 @@