湖里大屏(环境管理):实时数据 今日报警模块 接口对接
This commit is contained in:
parent
2c32007920
commit
5d9e24ae9b
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts4';
|
import echarts from 'echarts4';
|
||||||
|
// import { getRealTimeDustNoiseDataApi } from "@/assets/js/api/environmentManage";
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@ -72,8 +73,43 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.createCenterChart();
|
this.createCenterChart();
|
||||||
|
// this.getRealTimeDustNoiseData();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
//获取环境设备详情数据
|
||||||
|
// getRealTimeDustNoiseData() {
|
||||||
|
// let data = {
|
||||||
|
// deviceId: this.currentDevDetail.deviceId,
|
||||||
|
// projectSn: this.projectSn,
|
||||||
|
// };
|
||||||
|
// console.log(data);
|
||||||
|
// getRealTimeDustNoiseDataApi(data).then((res) => {
|
||||||
|
// console.log(res);
|
||||||
|
// if (res.code == 200) {
|
||||||
|
// console.log(res.result)
|
||||||
|
// if (res.result) {
|
||||||
|
// this.plantCap = res.result;
|
||||||
|
// } else {
|
||||||
|
// this.plantCap = {
|
||||||
|
// crc: "--",
|
||||||
|
// humidity: "--",
|
||||||
|
// noise: "--",
|
||||||
|
// plateHumidity: "--",
|
||||||
|
// plateTemperature: "--",
|
||||||
|
// pm10: "--",
|
||||||
|
// pm25: "--",
|
||||||
|
// pressure: "--",
|
||||||
|
// temperature: "--",
|
||||||
|
// tsp: "--",
|
||||||
|
// voltage: "--",
|
||||||
|
// winddirectionName: "--",
|
||||||
|
// windspeed: "--",
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
// // this.createCenterChart();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// },
|
||||||
//环境监测实时数据--图表
|
//环境监测实时数据--图表
|
||||||
createCenterChart() {
|
createCenterChart() {
|
||||||
let centerChart = echarts.init(this.$refs.centerChart);
|
let centerChart = echarts.init(this.$refs.centerChart);
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from "echarts4";
|
import echarts from "echarts4";
|
||||||
|
import {selectEnvironmentAlarmCountTotalApi} from "@/assets/js/api/dataBoard"
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@ -18,13 +19,26 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
alarmData:{
|
||||||
|
totalAlarm:'',
|
||||||
|
noiseNum:'',
|
||||||
|
pm25Num:'',
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.initMyChart();
|
this.countTotal();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
countTotal(){
|
||||||
|
selectEnvironmentAlarmCountTotalApi({
|
||||||
|
sn: this.$store.state.projectSn,
|
||||||
|
}).then((res) => {
|
||||||
|
this.alarmData=res.result
|
||||||
|
// console.log('报警统计',res.result);
|
||||||
|
this.initMyChart();
|
||||||
|
});
|
||||||
|
},
|
||||||
initMyChart() {
|
initMyChart() {
|
||||||
const myChart = echarts.init(this.$refs.myChart);
|
const myChart = echarts.init(this.$refs.myChart);
|
||||||
const option = {
|
const option = {
|
||||||
@ -32,7 +46,7 @@ export default {
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
x: '29%',
|
x: '29%',
|
||||||
y: '38%',
|
y: '38%',
|
||||||
text:'27',
|
text:this.alarmData.totalAlarm,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
@ -91,8 +105,8 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{ value: 13, name: "扬尘噪声报警 : 13" },
|
{ value: this.alarmData.noiseNum, name: `扬尘噪声报警 : ${this.alarmData.noiseNum}`},
|
||||||
{ value: 14, name: "PM2.5超标报警 : 14" },
|
{ value: this.alarmData.pm25Num, name: `PM2.5超标报警 : ${this.alarmData.pm25Num}`},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@ -372,6 +372,7 @@ export default {
|
|||||||
let json = this.addEditForm;
|
let json = this.addEditForm;
|
||||||
json.inspectUser = json.inspectUser.join(",");
|
json.inspectUser = json.inspectUser.join(",");
|
||||||
json.createUser = this.$store.state.userInfo.userId;
|
json.createUser = this.$store.state.userInfo.userId;
|
||||||
|
console.log('--------新增参数',json)
|
||||||
addinspectTaskRecordApi(json).then((result) => {
|
addinspectTaskRecordApi(json).then((result) => {
|
||||||
this.$message.success("添加成功!");
|
this.$message.success("添加成功!");
|
||||||
this.checkDaterange = [];
|
this.checkDaterange = [];
|
||||||
@ -387,6 +388,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadList() {
|
loadList() {
|
||||||
|
console.log('------查询条件',this.searchForm)
|
||||||
getinspectTaskRecordListApi(this.searchForm).then((result) => {
|
getinspectTaskRecordListApi(this.searchForm).then((result) => {
|
||||||
this.rocordList = result.result.records;
|
this.rocordList = result.result.records;
|
||||||
this.pageTotal = result.result.total;
|
this.pageTotal = result.result.total;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user