diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue
index 830452c..be5161a 100644
--- a/src/components/content/airInfo/AirInfo.vue
+++ b/src/components/content/airInfo/AirInfo.vue
@@ -179,6 +179,18 @@ const initChart = () => {
fontSize: 40
}
},
+ toolbox: {
+ show: false,
+ right: 10,
+ feature: {
+ dataZoom: {
+ yAxisIndex: 'none'
+ }
+ }
+ },
+ dataZoom: [{
+ type: 'inside'
+ }],
//X轴
xAxis: {
type: 'category',
@@ -259,6 +271,18 @@ const initAirChart = () => {
fontSize: 40
}
},
+ toolbox: {
+ show: false,
+ right: 10,
+ feature: {
+ dataZoom: {
+ yAxisIndex: 'none'
+ }
+ }
+ },
+ dataZoom: [{
+ type: 'inside'
+ }],
//X轴
xAxis: {
type: 'category',
diff --git a/src/components/content/badGasInfo/BadGasInfo.vue b/src/components/content/badGasInfo/BadGasInfo.vue
index 9bc46d3..37dc796 100644
--- a/src/components/content/badGasInfo/BadGasInfo.vue
+++ b/src/components/content/badGasInfo/BadGasInfo.vue
@@ -160,6 +160,18 @@ const initChart = () => {
fontSize: 40
}
},
+ toolbox: {
+ show: false,
+ right: 10,
+ feature: {
+ dataZoom: {
+ yAxisIndex: 'none'
+ }
+ }
+ },
+ dataZoom: [{
+ type: 'inside'
+ }],
//X轴
xAxis: {
type: "category",
diff --git a/src/components/content/usedEle/UsedEle.vue b/src/components/content/usedEle/UsedEle.vue
index a239ce8..b6edf70 100644
--- a/src/components/content/usedEle/UsedEle.vue
+++ b/src/components/content/usedEle/UsedEle.vue
@@ -131,6 +131,18 @@ const initChart = () => {
fontSize: 40
}
},
+ toolbox: {
+ show: false,
+ right: 10,
+ feature: {
+ dataZoom: {
+ yAxisIndex: 'none'
+ }
+ }
+ },
+ dataZoom: [{
+ type: 'inside'
+ }],
//X轴
xAxis: {
type: 'category',
diff --git a/src/components/content/windPressure/WindPressureList.vue b/src/components/content/windPressure/WindPressureList.vue
index fff9c05..243d419 100644
--- a/src/components/content/windPressure/WindPressureList.vue
+++ b/src/components/content/windPressure/WindPressureList.vue
@@ -2,7 +2,8 @@
风压
-
+
@@ -31,21 +32,22 @@ import WindPressureItem from "./childComps/WindPressureItem.vue";
import TimeRangeBtn from "@/components/timeRangeBtn/index.vue"
import * as echarts from 'echarts';
import {getEchartsInfo} from "../../../api/largeScreen";
+
const props = defineProps({
list: Array,
winData: Array
});
-const windSort=ref(1)
+const windSort = ref(1)
const timeList = ref(["年", "月", "日"]);
const selectTimeButton = ref(2);
const isVisited = ref(false);
let myEcharts = reactive({});
const wpList = ref([]);
-const chartData=ref()
+const chartData = ref()
watch(() => props.list, (now) => {
- wpList.value.forEach(item=>{
- now.forEach(newItem=>{
- if(item.equipmentId === newItem.equipmentId){
+ wpList.value.forEach(item => {
+ now.forEach(newItem => {
+ if (item.equipmentId === newItem.equipmentId) {
item.value = newItem.value
}
})
@@ -56,38 +58,38 @@ watch(() => props.winData, (now) => {
getScreenInfo(now.windPressureSensorList)
}, {deep: true});
-const getWindInfo=(equipmentId)=>{
- getEchartsInfo(equipmentId).then(res=>{
- console.log('res-wind',res)
- if(res?.code===1000){
+const getWindInfo = (equipmentId) => {
+ getEchartsInfo(equipmentId).then(res => {
+ console.log('res-wind', res)
+ if (res?.code === 1000) {
isVisited.value = true
nextTick(() => {
- initChart(res.data.dates,res.data.values)
+ initChart(res.data.dates, res.data.values)
})
}
})
}
-const handleOpenChart = (item,index) => {
+const handleOpenChart = (item, index) => {
getWindInfo(item.equipmentId)
- windSort.value=index
+ windSort.value = index
}
const timeSelect = (index) => {
console.log('选择时间', index)
- if(index===0){
+ if (index === 0) {
console.log('--年')
- }else if(index===1){
+ } else if (index === 1) {
console.log('--月')
- }else if(index===2){
+ } else if (index === 2) {
console.log('--日')
}
};
-const getScreenInfo = (now) => {
+const getScreenInfo = (now) => {
let windPressureObj = {}
let windPressureArr = []
now.map(item => {
windPressureObj = {
- equipmentId:item.equipmentId,
+ equipmentId: item.equipmentId,
max: 120,
value: item.value,
point: item.valueThreshold,
@@ -100,7 +102,7 @@ const getScreenInfo = (now) => {
/**
* 初始化echarts实例方法
*/
-const initChart = (type,values) => {
+const initChart = (type, values) => {
//3.初始化container容器
myEcharts = echarts.init(document.getElementById('container'));
//5.传入数据
@@ -131,6 +133,18 @@ const initChart = (type,values) => {
fontSize: 40
}
},
+ toolbox: {
+ show: false,
+ right: 10,
+ feature: {
+ dataZoom: {
+ yAxisIndex: 'none'
+ }
+ }
+ },
+ dataZoom: [{
+ type: 'inside'
+ }],
//X轴
xAxis: {
type: 'category',
@@ -163,7 +177,7 @@ const initChart = (type,values) => {
symbolSize: 24,
lineStyle: {
width: 5
- }
+ },
}
]
}