diff --git a/src/api/largeScreen.js b/src/api/largeScreen.js
index 8069cf2..da9aab2 100644
--- a/src/api/largeScreen.js
+++ b/src/api/largeScreen.js
@@ -14,3 +14,10 @@ export const getLargeScreenInfo = () => {
method: 'get'
})
}
+// 风压echarts数据
+export const getEchartsInfo = (equipmentId) => {
+ return request({
+ url: `/tunnel/large/screen/echarts/wind/pressure/${equipmentId}`,
+ method: 'get'
+ })
+}
diff --git a/src/components/content/fanInfo/FanInfo.vue b/src/components/content/fanInfo/FanInfo.vue
index 0a36b88..51c17c2 100644
--- a/src/components/content/fanInfo/FanInfo.vue
+++ b/src/components/content/fanInfo/FanInfo.vue
@@ -293,7 +293,9 @@ input[type="number"] {
}
#fan_info {
- height: 795px;
+ min-height: 547px;
+ max-height: 795px;
+ height: 547px;
width: 830px;
position: absolute;
z-index: 100;
@@ -321,7 +323,7 @@ input[type="number"] {
height: calc(100% - 30px);
.fan-item {
- height: 33.3%;
+ height: 50%;
display: flex;
font-size: 14px;
diff --git a/src/components/content/transducerList/TransducerList.vue b/src/components/content/transducerList/TransducerList.vue
index 75ea00b..3c58a62 100644
--- a/src/components/content/transducerList/TransducerList.vue
+++ b/src/components/content/transducerList/TransducerList.vue
@@ -125,10 +125,12 @@ const getBasicData = (data) => {
#transducer-list {
color: rgb(226, 26, 26);
position: absolute;
- top: 1015px;
+ //top: 1015px;
+ top: 760px;
left: 70px;
width: 830px;
- height: 928px;
+ //height: 928px;
+ height: 620px;
background-image: url(@/assets/images/transducer/bg.png);
padding: 0 30px;
box-sizing: border-box;
diff --git a/src/components/content/usedEle/UsedEle.vue b/src/components/content/usedEle/UsedEle.vue
index b4ceec9..a239ce8 100644
--- a/src/components/content/usedEle/UsedEle.vue
+++ b/src/components/content/usedEle/UsedEle.vue
@@ -187,7 +187,8 @@ const getImageUrl = (name) => {
height: 90px;
color: aliceblue;
position: absolute;
- top: 1980px;
+ //top: 1980px;
+ top: 1420px;
left: 68px;
background-image: url(../../../assets/images/usedEle/bg.png);
padding: 21px 62px 35px 62px;
diff --git a/src/components/content/windPressure/WindPressureList.vue b/src/components/content/windPressure/WindPressureList.vue
index 498c9b0..fff9c05 100644
--- a/src/components/content/windPressure/WindPressureList.vue
+++ b/src/components/content/windPressure/WindPressureList.vue
@@ -2,7 +2,7 @@
风压
-
+
@@ -30,6 +30,7 @@
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
@@ -40,6 +41,7 @@ const selectTimeButton = ref(2);
const isVisited = ref(false);
let myEcharts = reactive({});
const wpList = ref([]);
+const chartData=ref()
watch(() => props.list, (now) => {
wpList.value.forEach(item=>{
now.forEach(newItem=>{
@@ -53,14 +55,23 @@ watch(() => props.list, (now) => {
watch(() => props.winData, (now) => {
getScreenInfo(now.windPressureSensorList)
}, {deep: true});
-const handleOpenChart = (index) => {
- console.log('用电量弹窗')
- isVisited.value = true
- windSort.value=index
- nextTick(() => {
- initChart()
+
+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)
+ })
+ }
})
}
+
+const handleOpenChart = (item,index) => {
+ getWindInfo(item.equipmentId)
+ windSort.value=index
+}
const timeSelect = (index) => {
console.log('选择时间', index)
if(index===0){
@@ -89,7 +100,7 @@ const getScreenInfo = (now) => {
/**
* 初始化echarts实例方法
*/
-const initChart = () => {
+const initChart = (type,values) => {
//3.初始化container容器
myEcharts = echarts.init(document.getElementById('container'));
//5.传入数据
@@ -123,7 +134,8 @@ const initChart = () => {
//X轴
xAxis: {
type: 'category',
- data: ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00','07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00','19:00', '20:00', '21:00', '22:00', '23:00','24:00'],
+ // data: ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00','07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00','19:00', '20:00', '21:00', '22:00', '23:00','24:00'],
+ data: type,
axisLabel: {
textStyle: {
fontSize: 45,
@@ -144,7 +156,8 @@ const initChart = () => {
//配置项
series: [
{
- data: [56, 12, 89, 34, 71, 43, 67, 20, 98, 72, 19, 61, 3, 85, 47, 92, 17, 76, 69, 25, 31, 49, 81, 63],
+ // data: [56, 12, 89, 34, 71, 43, 67, 20, 98, 72, 19, 61, 3, 85, 47, 92, 17, 76, 69, 25, 31, 49, 81, 63],
+ data: values,
type: 'line',
smooth: true,
symbolSize: 24,
diff --git a/src/views/tunnel/index.vue b/src/views/tunnel/index.vue
index 74d1705..4d519af 100644
--- a/src/views/tunnel/index.vue
+++ b/src/views/tunnel/index.vue
@@ -67,7 +67,7 @@ import { getToken } from "@/utils/auth";
import { useAuthStore } from "@/store/userstore.js";
import { getLargeScreen, getLargeScreenInfo } from "@/api/largeScreen";
import { ElMessageBox } from "element-plus";
-
+import {getUserInfo} from "@/api/login";
const authStore = useAuthStore();
const router = useRouter();
const selectIndex = ref(-1);
@@ -75,7 +75,7 @@ const showFan = ref(false);
const drawerLeft = ref(true);
const drawerRight = ref(true);
const currentSite = ref("松江站");
-const currentUser = ref("admin");
+const currentUser = ref("");
const currentDate = ref(dateFormat());
const tunnelBtn = ref();
const tunnelList = ref([]);
@@ -97,10 +97,16 @@ onMounted(() => {
nextTick(() => {
showFan.value = true;
});
+ getUser()
getOtherInfo()
getScreenInfo();
});
+const getUser=()=>{
+ getUserInfo().then(res=>{
+ currentUser.value=res.data.user.userName
+ })
+}
const getOtherInfo = async () => {
await getLargeScreenInfo().then((res) => {
if (res?.code === 1000) {