2024-11-15 汽车吊-履带吊

This commit is contained in:
Rain 2024-11-15 16:03:04 +08:00
parent 3e10f6e04c
commit 8886d8308b
9 changed files with 1696 additions and 377 deletions

View File

@ -0,0 +1,65 @@
import http from "@/api";
const BASEURL = import.meta.env.VITE_API_URL;
// 汽车吊
// 列表查询
export const gettrucklist = (params: {}) => {
return http.post(BASEURL + `/xmgl/truckCrane/list`, params);
};
// 列表查询单条
export const gettruckqueryById = (params: {}) => {
return http.post(BASEURL + `/xmgl/truckCrane/queryById`, params);
};
// 查询最新状态
export const gettruckdata = (params: {}) => {
return http.post(BASEURL + `/xmgl/truckCraneCurrentData/getNewData`, params);
};
// 设备情况汇总
export const gettruckstat = (params: {}) => {
return http.post(BASEURL + `/xmgl/truckCrane/onlineStat`, params);
};
// 设备报警分析
export const gettruckAlam = (params: {}) => {
return http.post(BASEURL + `/xmgl/truckCraneAlarm/alarmStat`, params);
};
// 图表分析
export const gettruckend = (params: {}) => {
return http.post(BASEURL + `/xmgl/truckCraneCurrentData/windSpeedTrend`, params);
};
// 履带吊
// 列表查询
export const getcrawlist = (params: {}) => {
return http.post(BASEURL + `/xmgl/crawlerCrane/list`, params);
};
// 列表查询单条
export const getcrawqueryById = (params: {}) => {
return http.post(BASEURL + `/xmgl/crawlerCrane/queryById`, params);
};
// 查询最新状态
export const getcrawdata = (params: {}) => {
return http.post(BASEURL + `/xmgl/crawlerCraneCurrentData/getNewData`, params);
};
// 设备情况汇总
export const getcrawstat = (params: {}) => {
return http.post(BASEURL + `/xmgl/crawlerCrane/onlineStat`, params);
};
// 设备报警分析
export const getcrawAlam = (params: {}) => {
return http.post(BASEURL + `/xmgl/crawlerCraneAlarm/alarmStat`, params);
};
// 图表分析
export const getcrawend = (params: {}) => {
return http.post(BASEURL + `/xmgl/crawlerCraneCurrentData/windSpeedTrend`, params);
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -5,16 +5,96 @@
<script setup lang="ts">
import * as echarts from "echarts";
import { onMounted, ref } from "vue";
import { getExceedSpeedTrend } from "@/api/modules/vehicle";
import { gettruckend } from "@/api/modules/cathangCrane";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
let y = ref([150, 230, 224, 218, 135, 147, 260]);
let x = ref(["09.24", "09.25", "09.26", "09.27", "09.28", "09.29", "09.30"]);
let x = ref();
const servedata = ref([
{
name: "暂无数据",
type: "line",
data: [0, 0, 0, 0],
// 线
smooth: true,
//
showSymbol: true,
lineStyle: {
width: 3,
color: "#42b2f1"
},
itemStyle: {
color: "#0368FF"
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(32, 102, 179, 0.4)"
},
{
offset: 1,
color: "rgba(55, 167, 232, 0.4)"
}
])
}
}
]);
onMounted(async () => {
await ongetExceedSpeedTrend();
await ongetExceedSpeedTrend(1);
});
const ongetExceedSpeedTrend = async item => {
const res: any = await gettruckend({
projectSn: store.sn,
selectType: item
});
console.log("一周内统计", res);
if (res.result.length > 0) {
x.value = res.result[0].windSpeed.map(v => v.dayTitle);
console.log("======x.value======", x.value);
servedata.value = res.result.map(item => {
return {
name: item.deviceName,
type: "line",
data: item.windSpeed.map(v => v.windSpeed),
// 线
smooth: true,
//
showSymbol: true,
lineStyle: {
width: 3,
color: "#42b2f1"
},
itemStyle: {
color: "#0368FF"
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(32, 102, 179, 0.4)"
},
{
offset: 1,
color: "rgba(55, 167, 232, 0.4)"
}
])
}
};
});
} else {
x.value = ["00", "00", "00", "00"];
// servedata.value = [];
}
const chartContainer = echarts.init(document.getElementById("charttrackContainer"));
const option = {
//
@ -22,23 +102,11 @@ onMounted(async () => {
//
trigger: "axis",
//
backgroundColor: "#2561d7",
backgroundColor: "rgba(173, 198, 255, 0.50)",
//
borderWidth: 0,
//
borderColor: "#ccc",
formatter: function (params) {
console.log("params", params);
// params
let result = "";
params.forEach(function (item) {
console.log("item", item);
result += "日期" + item.axisValue + "<br/>" + item.seriesName + ": " + item.value;
});
return result;
},
//
textStyle: {
color: "#fff"
@ -76,11 +144,12 @@ onMounted(async () => {
itemWidth: 13,
itemHeight: 3,
right: "10%",
top: 0
top: 0,
type: servedata.value.length > 5 ? "scroll" : ""
},
xAxis: {
type: "category",
data: x,
data: x.value,
boundaryGap: false,
axisTick: {
show: false
@ -105,6 +174,26 @@ onMounted(async () => {
}
}
},
dataZoom: {
type: "slider", //
show: true, // ,
startValue: 0, //
endValue: 6, //
height: 6, //
bottom: 0, //
showDetail: false, //
showDataShadow: false, //
fillerColor: "#6fd7f6", //
borderColor: "transparent", //
zoomLock: true, //
brushSelect: false, //
//
handleStyle: {
//
opacity: 0
// borderRadius: 20
}
},
yAxis: {
type: "value",
splitNumber: 5,
@ -132,87 +221,43 @@ onMounted(async () => {
}
}
},
series: [
{
name: "履带吊",
type: "line",
stack: "Total",
areaStyle: {},
emphasis: {
// focus: 'series'
},
data: y,
// 线
smooth: true,
//
showSymbol: true,
lineStyle: {
width: 3,
color: "#42b2f1"
},
itemStyle: {
color: "#0368FF"
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(32, 102, 179, 0.4)"
},
{
offset: 1,
color: "rgba(55, 167, 232, 0.4)"
}
])
}
},
{
name: "履带吊测试",
type: "line",
stack: "Total",
areaStyle: {},
emphasis: {
// focus: 'series'
},
data: y,
// 线
smooth: true,
//
showSymbol: true,
lineStyle: {
width: 3,
color: "#42b2f1"
},
itemStyle: {
color: "#0368FF"
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(32, 102, 179, 0.4)"
},
{
offset: 1,
color: "rgba(55, 167, 232, 0.4)"
}
])
}
}
]
series: servedata.value
// {
// name: "",
// type: "line",
// data: y,
// // 线
// smooth: true,
// //
// showSymbol: true,
// lineStyle: {
// width: 3,
// color: "#42b2f1"
// },
// itemStyle: {
// color: "#0368FF"
// },
// areaStyle: {
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// {
// offset: 0,
// color: "rgba(32, 102, 179, 0.4)"
// },
// {
// offset: 1,
// color: "rgba(55, 167, 232, 0.4)"
// }
// ])
// }
// }
};
chartContainer.setOption(option);
});
const ongetExceedSpeedTrend = async () => {
const res: any = await getExceedSpeedTrend({
projectSn: store.sn
});
console.log("一周内统计", res);
y = res.result.map(item => item.y);
x = res.result.map(item => item.x);
};
// 便访
defineExpose({
ongetExceedSpeedTrend
});
</script>
<style>

File diff suppressed because it is too large Load Diff

View File

@ -271,17 +271,8 @@ let adminName = ref("" as any);
let menuList = ref([
{
moduleName: "综合管理",
// modulePath: "/projectOverview",
modulePath: "/trackCrane",
modulePath: "/projectOverview",
menuList: [
{
menuName: "汽车吊监测",
companyPath: "/cathangCrane"
},
{
menuName: "履带吊监测",
companyPath: "/trackCrane"
},
{
menuName: "工程概况",
companyPath: "/projectOverview"
@ -293,7 +284,7 @@ let menuList = ref([
{
menuName: "双碳管理",
companyPath: "/projectioter"
},
}
// {
// menuName: "-1",
// companyPath: "/projectOverviewer"
@ -462,6 +453,14 @@ let menuList = ref([
menuName: "塔吊监测",
companyPath: "/towerCraneMonitoring"
},
{
menuName: "汽车吊监测",
companyPath: "/cathangCrane"
},
{
menuName: "履带吊监测",
companyPath: "/trackCrane"
},
{
menuName: "升降机监测",
companyPath: "/elevatorMonitoring"
@ -663,10 +662,10 @@ onMounted(async () => {
if (COMPANY === "ztsyj") {
menuList.value = ZTSYJMenu;
}
if(COMPANY === "xnyzhjj") {
if (COMPANY === "xnyzhjj") {
menuList.value = XNYZHJJMenu;
}
if(COMPANY === "allxm") {
if (COMPANY === "allxm") {
menuList.value = ALLXMMenu;
}
console.log("配置菜单", menuList.value);
@ -760,7 +759,7 @@ function jumpBgd() {
window.location.replace("http://182.90.224.237:15551/#/login?token=" + store.token);
} else if (COMPANY === "scwc") {
window.location.replace("http://192.168.9.249:9809/#/login?token=" + store.token);
} else if (COMPANY === "xnyzhjj") {
} else if (COMPANY === "xnyzhjj") {
window.location.replace("http://121.37.106.37:9809/#/login?token=" + store.token);
} else if (envList.includes(COMPANY)) {
window.location.replace(BASEURL + "/#/login?token=" + store.token);

View File

@ -5,16 +5,96 @@
<script setup lang="ts">
import * as echarts from "echarts";
import { onMounted, ref } from "vue";
import { getExceedSpeedTrend } from "@/api/modules/vehicle";
import { getcrawend } from "@/api/modules/cathangCrane";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
let y = ref([150, 230, 224, 218, 135, 147, 260]);
let x = ref(["09.24", "09.25", "09.26", "09.27", "09.28", "09.29", "09.30"]);
let x = ref();
const servedata = ref([
{
name: "暂无数据",
type: "line",
data: [0, 0, 0, 0],
// 线
smooth: true,
//
showSymbol: true,
lineStyle: {
width: 3,
color: "#42b2f1"
},
itemStyle: {
color: "#0368FF"
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(32, 102, 179, 0.4)"
},
{
offset: 1,
color: "rgba(55, 167, 232, 0.4)"
}
])
}
}
]);
onMounted(async () => {
await ongetExceedSpeedTrend();
await ongetExceedSpeedTrend(1);
});
const ongetExceedSpeedTrend = async item => {
const res: any = await getcrawend({
projectSn: store.sn,
selectType: item
});
console.log("一周内统计", res);
if (res.result.length > 0) {
x.value = res.result[0].windSpeed.map(v => v.dayTitle);
console.log("======x.value======", x.value);
servedata.value = res.result.map(item => {
return {
name: item.deviceName,
type: "line",
data: item.windSpeed.map(v => v.windSpeed),
// 线
smooth: true,
//
showSymbol: true,
lineStyle: {
width: 3,
color: "#42b2f1"
},
itemStyle: {
color: "#0368FF"
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(32, 102, 179, 0.4)"
},
{
offset: 1,
color: "rgba(55, 167, 232, 0.4)"
}
])
}
};
});
} else {
x.value = ["00", "00", "00", "00"];
// servedata.value = [];
}
const chartContainer = echarts.init(document.getElementById("charttrackContainer"));
const option = {
//
@ -22,23 +102,11 @@ onMounted(async () => {
//
trigger: "axis",
//
backgroundColor: "#2561d7",
backgroundColor: "rgba(173, 198, 255, 0.50)",
//
borderWidth: 0,
//
borderColor: "#ccc",
formatter: function (params) {
console.log("params", params);
// params
let result = "";
params.forEach(function (item) {
console.log("item", item);
result += "日期" + item.axisValue + "<br/>" + item.seriesName + ": " + item.value;
});
return result;
},
//
textStyle: {
color: "#fff"
@ -76,11 +144,12 @@ onMounted(async () => {
itemWidth: 13,
itemHeight: 3,
right: "10%",
top: 0
top: 0,
type: servedata.value.length > 5 ? "scroll" : ""
},
xAxis: {
type: "category",
data: x,
data: x.value,
boundaryGap: false,
axisTick: {
show: false
@ -105,6 +174,26 @@ onMounted(async () => {
}
}
},
dataZoom: {
type: "slider", //
show: true, // ,
startValue: 0, //
endValue: 6, //
height: 6, //
bottom: 0, //
showDetail: false, //
showDataShadow: false, //
fillerColor: "#6fd7f6", //
borderColor: "transparent", //
zoomLock: true, //
brushSelect: false, //
//
handleStyle: {
//
opacity: 0
// borderRadius: 20
}
},
yAxis: {
type: "value",
splitNumber: 5,
@ -132,87 +221,42 @@ onMounted(async () => {
}
}
},
series: [
{
name: "履带吊",
type: "line",
stack: "Total",
areaStyle: {},
emphasis: {
// focus: 'series'
},
data: y,
// 线
smooth: true,
//
showSymbol: true,
lineStyle: {
width: 3,
color: "#42b2f1"
},
itemStyle: {
color: "#0368FF"
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(32, 102, 179, 0.4)"
},
{
offset: 1,
color: "rgba(55, 167, 232, 0.4)"
}
])
}
},
{
name: "履带吊测试",
type: "line",
stack: "Total",
areaStyle: {},
emphasis: {
// focus: 'series'
},
data: y,
// 线
smooth: true,
//
showSymbol: true,
lineStyle: {
width: 3,
color: "#42b2f1"
},
itemStyle: {
color: "#0368FF"
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(32, 102, 179, 0.4)"
},
{
offset: 1,
color: "rgba(55, 167, 232, 0.4)"
}
])
}
}
]
series: servedata.value
// {
// name: "",
// type: "line",
// data: y,
// // 线
// smooth: true,
// //
// showSymbol: true,
// lineStyle: {
// width: 3,
// color: "#42b2f1"
// },
// itemStyle: {
// color: "#0368FF"
// },
// areaStyle: {
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// {
// offset: 0,
// color: "rgba(32, 102, 179, 0.4)"
// },
// {
// offset: 1,
// color: "rgba(55, 167, 232, 0.4)"
// }
// ])
// }
// }
};
chartContainer.setOption(option);
});
const ongetExceedSpeedTrend = async () => {
const res: any = await getExceedSpeedTrend({
projectSn: store.sn
});
console.log("一周内统计", res);
y = res.result.map(item => item.y);
x = res.result.map(item => item.x);
};
defineExpose({
ongetExceedSpeedTrend
});
</script>
<style>

File diff suppressed because it is too large Load Diff