@@ -260,7 +265,6 @@
height: 100%;
}
}
-
.monitor {
width: vw(405);
margin-right: vw(8);
@@ -351,7 +355,6 @@
background-image: url('@/assets/images/title-4.png');
background-size: 100% 100%;
}
-
:deep(.el-select__wrapper) {
background: linear-gradient(270deg, rgba(8, 41, 86, 0.16) 0%, #0b61b4 100%);
border: none;
@@ -361,10 +364,6 @@
font-size: vw(14);
color: #fff;
}
- .line-chart {
- width: 100%;
- height: vh(200);
- }
.box-1 {
margin-top: vh(120);
width: vw(800);
diff --git a/src/views/scenic/components/box-1.vue b/src/views/scenic/components/box-1.vue
index daa7c56..59a533b 100644
--- a/src/views/scenic/components/box-1.vue
+++ b/src/views/scenic/components/box-1.vue
@@ -35,7 +35,9 @@
-
@@ -304,12 +311,11 @@
import shipIcon from '@/assets/images/ship.png'
import age from './age'
- import top from './top'
import jam from './jam'
- import ticket from './ticket'
import TrafficFlow from './traffic-flow'
import BigCarShipMap from './big-car-ship-map'
import countup from 'vue-countup-v3'
+
import { useMap } from '@/hooks/map'
import { useScenicStore } from '@/stores/scenic'
@@ -522,6 +528,7 @@
height: vw(74);
}
.car-item {
+ flex: 1;
display: flex;
flex-direction: column;
align-items: center;
@@ -544,6 +551,7 @@
.suffix {
font-size: vw(12);
color: #02f9fa;
+ margin-bottom: vw(4);
}
}
.sum {
diff --git a/src/views/scenic/components/ticket.vue b/src/views/scenic/components/ticket.vue
deleted file mode 100644
index 17b9745..0000000
--- a/src/views/scenic/components/ticket.vue
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/src/views/scenic/index.vue b/src/views/scenic/index.vue
index 8f63be7..d9d9af2 100644
--- a/src/views/scenic/index.vue
+++ b/src/views/scenic/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -18,13 +18,13 @@
`${mode == 'dev' ? socketBaseUrl : proSocketBaseUrl}/ws/scenic-spot`
)
- let id = ref('')
+ let scenicSpotId = ref('')
watch(
- () => [isConnected.value, id.value],
+ () => [isConnected.value, scenicSpotId.value],
(val) => {
if (val[0] && val[1]) {
- sendMessage(JSON.stringify({ action: 'start', type: '', scenicSpotId: id.value }))
+ sendMessage(JSON.stringify({ action: 'start', type: '', scenicSpotId: scenicSpotId.value }))
}
},
{ immediate: true }
@@ -34,7 +34,6 @@
() => dataRes.value,
(val) => {
if (val) {
- console.log(val, '景区接受消息')
switch (val.type) {
case 'wordkOrderlist':
scenicStore.setWordkOrderList(val.data)
@@ -73,8 +72,7 @@
let scenicChange = null
onMounted(() => {
scenicChange = PubSub.subscribe('scenicChange', (msg, data) => {
- id.value = data.scenicSpotId
- console.log(id.value, 'id.value')
+ scenicSpotId.value = data.scenicSpotId
})
})
onUnmounted(() => {
diff --git a/src/views/traffic/components/box-2.vue b/src/views/traffic/components/box-2.vue
index d7a26dc..5b74b25 100644
--- a/src/views/traffic/components/box-2.vue
+++ b/src/views/traffic/components/box-2.vue
@@ -81,7 +81,7 @@
diff --git a/src/views/traffic/components/traffic-jam.vue b/src/views/traffic/components/traffic-jam.vue
index e4384bf..39ba311 100644
--- a/src/views/traffic/components/traffic-jam.vue
+++ b/src/views/traffic/components/traffic-jam.vue
@@ -22,7 +22,7 @@
watch(
() => props.series,
(val) => {
- if (val.length > 0) {
+ if (val.length) {
setTimeout(() => {
init()
}, 1000)
@@ -34,20 +34,7 @@
let params = null
const getSeriesData = () => {
- let colorMap = {
- 1: '#00C000',
- 2: '#FFA700',
- 3: '#FFO000',
- 4: '#B50000'
- }
- return props.series.map((item) => {
- return {
- value: item,
- itemStyle: {
- color: colorMap[item]
- }
- }
- })
+ return props.series
}
const getXAxisData = () => {
return props.data
@@ -63,9 +50,8 @@
containLabel: true
},
xAxis: {
- boundaryGap: false,
type: 'category',
- data: getXAxisData(),
+ boundaryGap: false,
axisTick: {
show: false
},
@@ -77,7 +63,8 @@
axisLabel: {
fontSize: fitChartSize(12),
color: 'rgba(255,255,255,0.9)'
- }
+ },
+ data: getXAxisData()
},
yAxis: {
type: 'value',
@@ -97,9 +84,6 @@
series: [
{
type: 'bar',
- emphasis: {
- opacity: 1
- },
data: getSeriesData(),
barWidth: fitChartSize(40),
label: {
@@ -110,12 +94,23 @@
formatter: (res) => {
let valueMap = {
1: '畅通',
- 2: '高疑似事件拥堵',
- 3: '异常拥堵',
- 4: '常规拥堵'
+ 2: '缓行',
+ 3: '拥堵',
+ 4: '严重拥堵'
}
return valueMap[res.value]
}
+ },
+ itemStyle: {
+ color: (res) => {
+ let colorMap = {
+ 1: '#00c000',
+ 2: '#ffa700',
+ 3: '#ff0000',
+ 4: '#b50000'
+ }
+ return colorMap[res.value]
+ }
}
}
]