Commit f62e1b08 authored by yaqizhang's avatar yaqizhang

详情

parent e3551d44
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
<el-form-item label="设备编号:" prop="deviceCode"> <el-form-item label="设备编号:" prop="deviceCode">
<font>{{form.deviceCode}}</font> <font>{{form.deviceCode}}</font>
</el-form-item> </el-form-item>
<el-form-item label="设备信息:" prop="alarmId">
<font>{{form.alarmId}}</font>
</el-form-item>
</el-form> </el-form>
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;margin-left: 50px;"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;margin-left: 50px;">
<el-form-item label="报警类型:" prop="alarmType"> <el-form-item label="报警类型:" prop="alarmType">
...@@ -46,8 +49,13 @@ ...@@ -46,8 +49,13 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;margin-left: 50px;"> <el-form ref="form" v-model="form" :rules="rules" label-width="100px" style="float: left;margin-left: 50px;">
<el-form-item label="工单编号:" prop="orderId">
<font>{{form.orderId}}</font>
</el-form-item>
<el-form-item label="处理状态:" prop="dealStatus"> <el-form-item label="处理状态:" prop="dealStatus">
<font v-if="form.dealStatus == 1">不需要处理</font> <font v-if="form.orderId == null || form.orderId == ''">未生成工单</font>
<font v-if="(form.dealStatus == null || form.dealStatus == '') && form.orderId != null && form.orderId != ''">未处理</font>
<font v-if="form.dealStatus == 1">不需处理</font>
<font v-if="form.dealStatus == 2">已处理完成</font> <font v-if="form.dealStatus == 2">已处理完成</font>
<font v-if="form.dealStatus == 3">未处理完成</font> <font v-if="form.dealStatus == 3">未处理完成</font>
</el-form-item> </el-form-item>
...@@ -188,7 +196,7 @@ export default { ...@@ -188,7 +196,7 @@ export default {
devices: null, devices: null,
// 巡检员列表 // 巡检员列表
inspector: [], inspector: [],
alermId:'', alarmId:'',
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
......
...@@ -177,7 +177,7 @@ export default { ...@@ -177,7 +177,7 @@ export default {
this.$router.push({ this.$router.push({
path: '/realtimeData/realtimedetail', path: '/realtimeData/realtimedetail',
query:{ query:{
orderId : row.orderId deviceReportDataId : row.deviceReportDataId
} }
}) //带参跳转 }) //带参跳转
}, },
......
<template> <template>
<div class="app-container detail" style="background-color: rgb(238, 241, 245);"> <div class="app-container detail" style="background-color: rgb(238, 241, 245);">
<div style="padding-top: 10px;background: #fff;height: 100%;"> <div style="padding-top: 10px;background: #fff;height: 100%;">
<div> <div>
<div style="width: 5%;height: 45px;margin-left: 20px;" @click="$router.go(-1)"> <div style="width: 5%;height: 45px;margin-left: 20px;" @click="$router.go(-1)">
<el-button <el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
size="medium" </el-button>
type="text" <div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png"
style="font-size: 18px; color: rgb(7, 63, 112);float: left;" style="width: 25px;" alt=""></div>
>返回</el-button>
<div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png" style="width: 25px;" alt=""></div>
</div>
</div> </div>
</div>
<div style="width: 100%;height: 350px;padding: 10px;height: 300px;">
<div style="width: 66.6%;float: left;height: 100%;">
<el-table :data="dataListdetail1" style="width: 100%">
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceCode" />
<el-table-column label="设备类型" align="center" prop="deviceType">
<template slot-scope="scope">
<span v-if="scope.row.deviceType == '3'">流量计</span>
<span v-if="scope.row.deviceType == '4'">压力表</span>
</template>
</el-table-column>
<el-table-column label="标况累计量" align="center" prop="standardConditionAccumulation" />
</el-table>
<el-table :data="dataListdetail2" style="width: 100%;margin-top: 20px;">
<el-table-column label="工况累计量" align="center" prop="workingConditionAccumulation" />
<el-table-column label="剩余量" align="center" prop="residualQuantity" />
<el-table-column label="标况流量" align="center" prop="standardConditionFlow" />
<el-table-column label="工况流量" align="center" prop="workingConditionFlow" />
</el-table>
<el-table :data="dataListdetail3" style="width: 100%;margin-top: 20px;">
<el-table-column label="温度" align="center" prop="temperature" />
<el-table-column label="压力" align="center" prop="pressure" />
<el-table-column label="上报时间" align="center" prop="reportTime" />
<el-table-column label="设备状态" align="center" prop="deviceStatus">
</el-table-column>
</el-table>
<div style="width: 100%;height: 350px;padding: 10px;height: 300px;">
<div style="width: 66.6%;float: left;height: 100%;"> </div>
<el-table <div id="marbox"
:data="tableData" style="width: 33%;height: 350px; border: 1px solid rgb(218, 213, 213);float: right;margin-top: -45px;">
style="width: 100%"> <div style="width: 100%;height: 100%" id="container"></div>
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<el-table
:data="tableData"
style="width: 100%;margin-top: 20px;">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
<el-table
:data="tableData"
style="width: 100%;margin-top: 20px;">
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="地址">
</el-table-column>
</el-table>
</div>
<div id="marbox" style="width: 33%;height: 350px; border: 1px solid rgb(218, 213, 213);float: right;margin-top: -45px;">
<div style="width: 100%;height: 100%" id="container"></div>
</div>
</div> </div>
</div>
<div style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;"> <div style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;">
<div id="main1" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div> <div id="main1" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div>
<div id="main2" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div> <div id="main2" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div>
</div> </div>
...@@ -84,34 +59,29 @@ ...@@ -84,34 +59,29 @@
<div id="main3" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div> <div id="main3" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div>
<div id="main4" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div> <div id="main4" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;"></div>
</div> </div>
</div>
</div> </div>
</template>
<script> </div>
</template>
<script>
import { listBasicsInfo, getBasicsInfo, delBasicsInfo, addBasicsInfo, updateBasicsInfo, exportBasicsInfo } from "@/api/workOrder/basicsInfo"; import { realtimeData, getData } from "@/api/dataMonitoring/reportData";
import { deviceTree } from "@/api/device/deviceInfo"; import { deviceTree } from "@/api/device/deviceInfo";
import gaodeMap from "utils/gaodeMap.js"; import gaodeMap from "utils/gaodeMap.js";
import {map, DEVICE_TYPE} from "utils/gaodeMap.js"; import { map, DEVICE_TYPE } from "utils/gaodeMap.js";
import { inspectorList } from "@/api/system/user"; import { inspectorList } from "@/api/system/user";
import echarts from 'echarts'; import echarts from 'echarts';
// Vue.prototype.$echarts = echarts; // Vue.prototype.$echarts = echarts;
export default { export default {
name: "BasicsInfo", name: "RealtimeData",
components: { components: {
}, },
data() { data() {
return { return {
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},],
inspector: [], inspector: [],
isDisplay:false, isDisplay: false,
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
disabled: false, disabled: false,
...@@ -122,6 +92,8 @@ export default { ...@@ -122,6 +92,8 @@ export default {
exportLoading: false, exportLoading: false,
// 选中数组 // 选中数组
ids: [], ids: [],
// 设备监控表格数据
dataListdetail: [],
// 非单个禁用 // 非单个禁用
single: true, single: true,
// 非多个禁用 // 非多个禁用
...@@ -139,7 +111,7 @@ export default { ...@@ -139,7 +111,7 @@ export default {
open: false, open: false,
// 工单状态字典 // 工单状态字典
typeOptions: [], typeOptions: [],
pickerOptions:[], pickerOptions: [],
// 工单类型字典 // 工单类型字典
ordertypeOptions: [], ordertypeOptions: [],
// 设备树选项 // 设备树选项
...@@ -167,578 +139,558 @@ export default { ...@@ -167,578 +139,558 @@ export default {
remarks: null remarks: null
}, },
// 表单参数 // 表单参数
form: {}, form: [],
activity: {}, activity: {},
// 表单校验 // 表单校验
rules: { rules: {
}, },
active : 0, active: 0,
orderId : "", deviceReportDataId: "",
showAndHide : false showAndHide: false,
dataListdetail1: [],
dataListdetail2: [],
dataListdetail3: [],
}; };
}, },
created() { created() {
// 如果是跳转来的,则接受初始化参数 // 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数 // this.user_id = this.$route.query.id; //详细信息页接收参数
this.orderId = this.$route.query.orderId; this.deviceReportDataId = this.$route.query.deviceReportDataId;
this.getList(); // this.getList();
this.getDicts("t_order_status").then(response => { this.getDicts("t_order_status").then(response => {
this.typeOptions = response.data; this.typeOptions = response.data;
}); });
this.getDicts("t_order_type").then(response => { this.getDicts("t_order_type").then(response => {
this.ordertypeOptions = response.data; this.ordertypeOptions = response.data;
}); });
this.getBasicsInfo(); // this.getData();
}, },
mounted(){ mounted() {
let gaoMap = new gaodeMap("石家庄"); let gaoMap = new gaodeMap("石家庄");
this.gaoMap = gaoMap; this.gaoMap = gaoMap;
this.getBasicsInfo(); this.getData();
this.initData(); this.initData();
this.drawPieChart(); this.drawPieChart();
this.main3(); this.main3();
this.main4(); this.main4();
}, },
methods: { methods: {
getInspectorList(){ getInspectorList() {
this.loading = true; this.loading = true;
inspectorList().then(response => { inspectorList().then(response => {
this.inspector = response.data; this.inspector = response.data;
this.loading = false; this.loading = false;
}); });
}, },
// getMap() { // getMap() {
// var myChart = this.$echarts.init(document.getElementById('map')) // var myChart = this.$echarts.init(document.getElementById('map'))
// let option = { // let option = {
// xAxis: { // xAxis: {
// type: 'category', // type: 'category',
// // data: this.dataX, // // data: this.dataX,
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
// boundaryGap: false, //控制日期是否在中间显示 // boundaryGap: false, //控制日期是否在中间显示
// axisLabel: { // axisLabel: {
// show: true, //是否显示日期 // show: true, //是否显示日期
// interval: 0, //强制显示全部 // rotate: 40,//倾斜的角度 // interval: 0, //强制显示全部 // rotate: 40,//倾斜的角度
// textStyle: { // textStyle: {
// color: '#000', //日期的颜色 // color: '#000', //日期的颜色
// fontSize: 12 //字体的大小 // fontSize: 12 //字体的大小
// } // }
// }, // },
// axisLine: { // axisLine: {
// lineStyle: { // lineStyle: {
// color: '#ccc' // x轴的颜色 // color: '#ccc' // x轴的颜色
// } // }
// } // }
// }, // },
// yAxis: { // yAxis: {
// type: 'value', // type: 'value',
// axisLabel: { // axisLabel: {
// formatter: '{value}', // formatter: '{value}',
// textStyle: { // textStyle: {
// color: '#000' //数字的颜色 // color: '#000' //数字的颜色
// }, // },
// inside: false //控制数据是否在内侧还是外侧显示 // inside: false //控制数据是否在内侧还是外侧显示
// }, // },
// axisLine: { // axisLine: {
// lineStyle: { // lineStyle: {
// color: '#ccc' // 折线的颜色 // color: '#ccc' // 折线的颜色
// } // }
// } // }
// }, // },
// series: [ // series: [
// { // {
// // data: this.dataY, // // data: this.dataY,
// data: [820, 932, 901, 934, 1290, 1330, 1320], // data: [820, 932, 901, 934, 1290, 1330, 1320],
// type: 'line', // type: 'line',
// symbol: 'circle', //是否显示实心的折线圆点 // symbol: 'circle', //是否显示实心的折线圆点
// smooth: true, //让折线有弧度 // smooth: true, //让折线有弧度
// symbolSize: 7, //折线圆点的大小 // symbolSize: 7, //折线圆点的大小
// itemStyle: { // itemStyle: {
// normal: { // normal: {
// color: '#efc883', //折线点的颜色 // color: '#efc883', //折线点的颜色
// lineStyle: { // lineStyle: {
// color: '#efc883' //折线的颜色 // color: '#efc883' //折线的颜色
// }, // },
// label: { show: true } //是否在折线点上显示数字 // label: { show: true } //是否在折线点上显示数字
// } // }
// } // }
// } // }
// ] // ]
// } // }
// myChart.setOption(option) // myChart.setOption(option)
// }, // },
initData() { initData() {
// 基于准备好的dom,初始化echarts实例 // 基于准备好的dom,初始化echarts实例
var myChart1 = echarts.init(document.getElementById('main1')); var myChart1 = echarts.init(document.getElementById('main1'));
// let that=this; // let that=this;
// var getData1 = []; // var getData1 = [];
// var getData2 = []; // var getData2 = [];
// METHOD.axiosGet( // METHOD.axiosGet(
// this, // this,
// `/enterpriseInfo/getNumberByRegulation`, // `/enterpriseInfo/getNumberByRegulation`,
// function(res) { // function(res) {
// if (res.code === 0) { // if (res.code === 0) {
// //先进行赋值 // //先进行赋值
// for(let i=0; i<res.data.result.length; i++) { // for(let i=0; i<res.data.result.length; i++) {
// var obj = new Object(); // var obj = new Object();
// var arr = new Object(); // var arr = new Object();
// // obj.name = res.data.result[i].name; // // obj.name = res.data.result[i].name;
// // obj.value = res.data.result[i].number; // // obj.value = res.data.result[i].number;
// obj.name = res.data.result[i].type; // obj.name = res.data.result[i].type;
// obj.value = res.data.result[i].number; // obj.value = res.data.result[i].number;
// arr = res.data.result[i].type; // arr = res.data.result[i].type;
// getData1[i] = obj; // getData1[i] = obj;
// getData2[i] = arr; // getData2[i] = arr;
// } // }
// myChart1.setOption({ // myChart1.setOption({
// legend: { // legend: {
// data: getData2, // data: getData2,
// }, // },
// series:[{ // series:[{
// data: getData1, // data: getData1,
// }] // }]
// }) // })
// } // }
// }); // });
// 绘制图表 // 绘制图表
myChart1.setOption({ myChart1.setOption({
title: { title: {
text: '折线图堆叠' text: '折线图堆叠'
}, },
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
}, },
legend: { legend: {
data: ['标况累积量', '工况累积量'] data: ['标况累积量', '工况累积量']
},
xAxis: {
type: 'category',
// data: this.dataX,
data: ['23', '44', '77', '34', '56', '88', '38','68','55','99','44','33'],
boundaryGap: false, //控制日期是否在中间显示
axisLabel: {
show: true, //是否显示日期
interval: 0, //强制显示全部 // rotate: 40,//倾斜的角度
textStyle: {
color: '#000', //日期的颜色
fontSize: 12 //字体的大小
}
}, },
axisLine: { xAxis: {
lineStyle: { type: 'category',
color: '#ccc' // x轴的颜色 // data: this.dataX,
} data: ['23', '44', '77', '34', '56', '88', '38', '68', '55', '99', '44', '33'],
} boundaryGap: false, //控制日期是否在中间显示
}, axisLabel: {
yAxis: { show: true, //是否显示日期
type: 'value', interval: 0, //强制显示全部 // rotate: 40,//倾斜的角度
axisLabel: { textStyle: {
formatter: '{value}', color: '#000', //日期的颜色
textStyle: { fontSize: 12 //字体的大小
color: '#000' //数字的颜色 }
}, },
inside: false //控制数据是否在内侧还是外侧显示 axisLine: {
}, lineStyle: {
axisLine: { color: '#ccc' // x轴的颜色
lineStyle: {
color: '#ccc' // 折线的颜色
}
}
},
series: [
{
// data: this.dataY,
name:'工况累计量',
data: [820, 232, 901, 534, 1290, 330, 1320, 345, 654, 189, 980, 234],
type: 'line',
symbol: 'circle', //是否显示实心的折线圆点
smooth: true, //让折线有弧度
symbolSize: 7, //折线圆点的大小
itemStyle: {
normal: {
color: '#efc883', //折线点的颜色
lineStyle: {
color: '#efc883' //折线的颜色
},
label: { show: true } //是否在折线点上显示数字
} }
} }
}, },
{ yAxis: {
// data: this.dataY, type: 'value',
name:'工况累计量', axisLabel: {
data: [500, 600, 700, 300, 1100, 130, 1200, 820, 932, 901, 934, 1290], formatter: '{value}',
type: 'line', textStyle: {
symbol: 'circle', //是否显示实心的折线圆点 color: '#000' //数字的颜色
smooth: true, //让折线有弧度 },
symbolSize: 7, //折线圆点的大小 inside: false //控制数据是否在内侧还是外侧显示
itemStyle: { },
normal: { axisLine: {
color: '#053B6A', //折线点的颜色 lineStyle: {
lineStyle: { color: '#ccc' // 折线的颜色
color: '#053B6A' //折线的颜色
},
label: { show: true } //是否在折线点上显示数字
} }
} }
} },
] series: [
}); {
// data: this.dataY,
}, name: '工况累计量',
drawPieChart(){ data: [820, 232, 901, 534, 1290, 330, 1320, 345, 654, 189, 980, 234],
// 基于准备好的dom,初始化echarts实例 type: 'line',
var myChart2 = echarts.init(document.getElementById('main2')); symbol: 'circle', //是否显示实心的折线圆点
// let that=this; smooth: true, //让折线有弧度
// var getData1 = []; symbolSize: 7, //折线圆点的大小
// var getData2 = []; itemStyle: {
// METHOD.axiosGet( normal: {
// this, color: '#efc883', //折线点的颜色
// `/enterpriseGoods/getNumberByEnterprise`, lineStyle: {
// function(res) { color: '#efc883' //折线的颜色
// if (res.code === 0) { },
// //先进行赋值 label: { show: true } //是否在折线点上显示数字
// for(let i=0; i<res.data.result.length; i++) {
// var obj = new Object();
// var arr = new Object();
// // obj = res.data.result[i].number;
// // arr = res.data.result[i].type;
// obj = res.data.result[i].number;
// arr = res.data.result[i].name;
// getData1[i] = obj;
// getData2[i] = arr;
// }
// myChart2.setOption({
// xAxis: {
// data: getData2,
// },
// series:[{
// data: getData1,
// }]
// })
// }
// });
// 绘制图表
myChart2.setOption({
// color:['rgb(8,252,7)','rgb(255,168,0)','rgb(0,121,254)','rgb(0,255,251)','rgb(3,120,251)','rgb(0,200,251)'],
xAxis: {
type: 'category',
// data: this.dataX,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
boundaryGap: false, //控制日期是否在中间显示
axisLabel: {
show: true, //是否显示日期
interval: 0, //强制显示全部 // rotate: 40,//倾斜的角度
textStyle: {
color: '#000', //日期的颜色
fontSize: 12 //字体的大小
}
},
axisLine: {
lineStyle: {
color: '#ccc' // x轴的颜色
}
}
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#000' //数字的颜色
},
inside: false //控制数据是否在内侧还是外侧显示
},
axisLine: {
lineStyle: {
color: '#ccc' // 折线的颜色
}
} }
}, }
series: [ },
{ {
// data: this.dataY, // data: this.dataY,
data: [820, 932, 901, 934, 1290, 1330, 1320], name: '工况累计量',
type: 'line', data: [500, 600, 700, 300, 1100, 130, 1200, 820, 932, 901, 934, 1290],
symbol: 'circle', //是否显示实心的折线圆点 type: 'line',
smooth: true, //让折线有弧度 symbol: 'circle', //是否显示实心的折线圆点
symbolSize: 7, //折线圆点的大小 smooth: true, //让折线有弧度
itemStyle: { symbolSize: 7, //折线圆点的大小
normal: { itemStyle: {
color: '#efc883', //折线点的颜色 normal: {
lineStyle: { color: '#053B6A', //折线点的颜色
color: '#efc883' //折线的颜色 lineStyle: {
}, color: '#053B6A' //折线的颜色
label: { show: true } //是否在折线点上显示数字 },
} label: { show: true } //是否在折线点上显示数字
}
},
{
// data: this.dataY,
data: [500, 600, 700, 300, 1100, 130, 1200],
type: 'line',
symbol: 'circle', //是否显示实心的折线圆点
smooth: true, //让折线有弧度
symbolSize: 7, //折线圆点的大小
itemStyle: {
normal: {
color: '#053B6A', //折线点的颜色
lineStyle: {
color: '#053B6A' //折线的颜色
},
label: { show: true } //是否在折线点上显示数字
}
}
} }
] }
});
},
main3() {
// 基于准备好的dom,初始化echarts实例
var myChart3 = echarts.init(document.getElementById('main3'));
// let that=this;
// var getData1 = [];
// var getData2 = [];
// METHOD.axiosGet(
// this,
// `/enterpriseInfo/getNumberByRegulation`,
// function(res) {
// if (res.code === 0) {
// //先进行赋值
// for(let i=0; i<res.data.result.length; i++) {
// var obj = new Object();
// var arr = new Object();
// // obj.name = res.data.result[i].name;
// // obj.value = res.data.result[i].number;
// obj.name = res.data.result[i].type;
// obj.value = res.data.result[i].number;
// arr = res.data.result[i].type;
// getData1[i] = obj;
// getData2[i] = arr;
// }
// myChart1.setOption({
// legend: {
// data: getData2,
// },
// series:[{
// data: getData1,
// }]
// })
// }
// });
// 绘制图表
myChart3.setOption({
xAxis: {
type: 'category',
// data: this.dataX,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
boundaryGap: false, //控制日期是否在中间显示
axisLabel: {
show: true, //是否显示日期
interval: 0, //强制显示全部 // rotate: 40,//倾斜的角度
textStyle: {
color: '#000', //日期的颜色
fontSize: 12 //字体的大小
}
},
axisLine: {
lineStyle: {
color: '#ccc' // x轴的颜色
} }
} ]
}, });
yAxis: {
type: 'value', },
axisLabel: { drawPieChart() {
formatter: '{value}', // 基于准备好的dom,初始化echarts实例
textStyle: { var myChart2 = echarts.init(document.getElementById('main2'));
color: '#000' //数字的颜色 // let that=this;
// var getData1 = [];
// var getData2 = [];
// METHOD.axiosGet(
// this,
// `/enterpriseGoods/getNumberByEnterprise`,
// function(res) {
// if (res.code === 0) {
// //先进行赋值
// for(let i=0; i<res.data.result.length; i++) {
// var obj = new Object();
// var arr = new Object();
// // obj = res.data.result[i].number;
// // arr = res.data.result[i].type;
// obj = res.data.result[i].number;
// arr = res.data.result[i].name;
// getData1[i] = obj;
// getData2[i] = arr;
// }
// myChart2.setOption({
// xAxis: {
// data: getData2,
// },
// series:[{
// data: getData1,
// }]
// })
// }
// });
// 绘制图表
myChart2.setOption({
// color:['rgb(8,252,7)','rgb(255,168,0)','rgb(0,121,254)','rgb(0,255,251)','rgb(3,120,251)','rgb(0,200,251)'],
xAxis: {
type: 'category',
// data: this.dataX,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
boundaryGap: false, //控制日期是否在中间显示
axisLabel: {
show: true, //是否显示日期
interval: 0, //强制显示全部 // rotate: 40,//倾斜的角度
textStyle: {
color: '#000', //日期的颜色
fontSize: 12 //字体的大小
}
}, },
inside: false //控制数据是否在内侧还是外侧显示 axisLine: {
}, lineStyle: {
axisLine: { color: '#ccc' // x轴的颜色
lineStyle: { }
color: '#ccc' // 折线的颜色
} }
} },
}, yAxis: {
series: [ type: 'value',
{ axisLabel: {
// data: this.dataY, formatter: '{value}',
data: [820, 932, 901, 934, 1290, 1330, 1320], textStyle: {
type: 'line', color: '#000' //数字的颜色
symbol: 'circle', //是否显示实心的折线圆点 },
smooth: true, //让折线有弧度 inside: false //控制数据是否在内侧还是外侧显示
symbolSize: 7, //折线圆点的大小 },
itemStyle: { axisLine: {
normal: { lineStyle: {
color: '#efc883', //折线点的颜色 color: '#ccc' // 折线的颜色
lineStyle: {
color: '#efc883' //折线的颜色
},
label: { show: true } //是否在折线点上显示数字
} }
} }
}, },
{ series: [
// data: this.dataY, {
data: [500, 600, 700, 300, 1100, 130, 1200], // data: this.dataY,
type: 'line', data: [820, 932, 901, 934, 1290, 1330, 1320],
symbol: 'circle', //是否显示实心的折线圆点 type: 'line',
smooth: true, //让折线有弧度 symbol: 'circle', //是否显示实心的折线圆点
symbolSize: 7, //折线圆点的大小 smooth: true, //让折线有弧度
itemStyle: { symbolSize: 7, //折线圆点的大小
normal: { itemStyle: {
color: '#053B6A', //折线点的颜色 normal: {
lineStyle: { color: '#efc883', //折线点的颜色
color: '#053B6A' //折线的颜色 lineStyle: {
}, color: '#efc883' //折线的颜色
label: { show: true } //是否在折线点上显示数字 },
label: { show: true } //是否在折线点上显示数字
}
}
},
{
// data: this.dataY,
data: [500, 600, 700, 300, 1100, 130, 1200],
type: 'line',
symbol: 'circle', //是否显示实心的折线圆点
smooth: true, //让折线有弧度
symbolSize: 7, //折线圆点的大小
itemStyle: {
normal: {
color: '#053B6A', //折线点的颜色
lineStyle: {
color: '#053B6A' //折线的颜色
},
label: { show: true } //是否在折线点上显示数字
}
} }
} }
} ]
] });
}); },
main3() {
}, // 基于准备好的dom,初始化echarts实例
main4() { var myChart3 = echarts.init(document.getElementById('main3'));
// 基于准备好的dom,初始化echarts实例 // let that=this;
var myChart4 = echarts.init(document.getElementById('main4')); // var getData1 = [];
// let that=this; // var getData2 = [];
// var getData1 = []; // METHOD.axiosGet(
// var getData2 = []; // this,
// METHOD.axiosGet( // `/enterpriseInfo/getNumberByRegulation`,
// this, // function(res) {
// `/enterpriseInfo/getNumberByRegulation`, // if (res.code === 0) {
// function(res) { // //先进行赋值
// if (res.code === 0) { // for(let i=0; i<res.data.result.length; i++) {
// //先进行赋值 // var obj = new Object();
// for(let i=0; i<res.data.result.length; i++) { // var arr = new Object();
// var obj = new Object(); // // obj.name = res.data.result[i].name;
// var arr = new Object(); // // obj.value = res.data.result[i].number;
// // obj.name = res.data.result[i].name; // obj.name = res.data.result[i].type;
// // obj.value = res.data.result[i].number; // obj.value = res.data.result[i].number;
// obj.name = res.data.result[i].type; // arr = res.data.result[i].type;
// obj.value = res.data.result[i].number; // getData1[i] = obj;
// arr = res.data.result[i].type; // getData2[i] = arr;
// getData1[i] = obj; // }
// getData2[i] = arr; // myChart1.setOption({
// } // legend: {
// myChart1.setOption({ // data: getData2,
// legend: { // },
// data: getData2, // series:[{
// }, // data: getData1,
// series:[{ // }]
// data: getData1, // })
// }] // }
// }) // });
// }
// }); // 绘制图表
myChart3.setOption({
// 绘制图表 xAxis: {
myChart4.setOption({ type: 'category',
xAxis: { // data: this.dataX,
type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
// data: this.dataX, boundaryGap: false, //控制日期是否在中间显示
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], axisLabel: {
boundaryGap: false, //控制日期是否在中间显示 show: true, //是否显示日期
axisLabel: { interval: 0, //强制显示全部 // rotate: 40,//倾斜的角度
show: true, //是否显示日期 textStyle: {
interval: 0, //强制显示全部 // rotate: 40,//倾斜的角度 color: '#000', //日期的颜色
textStyle: { fontSize: 12 //字体的大小
color: '#000', //日期的颜色 }
fontSize: 12 //字体的大小 },
axisLine: {
lineStyle: {
color: '#ccc' // x轴的颜色
}
} }
}, },
axisLine: { yAxis: {
lineStyle: { type: 'value',
color: '#ccc' // x轴的颜色 axisLabel: {
} formatter: '{value}',
} textStyle: {
}, color: '#000' //数字的颜色
yAxis: { },
type: 'value', inside: false //控制数据是否在内侧还是外侧显示
axisLabel: {
formatter: '{value}',
textStyle: {
color: '#000' //数字的颜色
}, },
inside: false //控制数据是否在内侧还是外侧显示 axisLine: {
lineStyle: {
color: '#ccc' // 折线的颜色
}
}
}, },
axisLine: { series: [
lineStyle: { {
color: '#ccc' // 折线的颜色 // data: this.dataY,
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
symbol: 'circle', //是否显示实心的折线圆点
smooth: true, //让折线有弧度
symbolSize: 7, //折线圆点的大小
itemStyle: {
normal: {
color: '#efc883', //折线点的颜色
lineStyle: {
color: '#efc883' //折线的颜色
},
label: { show: true } //是否在折线点上显示数字
}
}
},
{
// data: this.dataY,
data: [500, 600, 700, 300, 1100, 130, 1200],
type: 'line',
symbol: 'circle', //是否显示实心的折线圆点
smooth: true, //让折线有弧度
symbolSize: 7, //折线圆点的大小
itemStyle: {
normal: {
color: '#053B6A', //折线点的颜色
lineStyle: {
color: '#053B6A' //折线的颜色
},
label: { show: true } //是否在折线点上显示数字
}
}
} }
} ]
}, });
series: [
{ },
// data: this.dataY, main4() {
data: [820, 932, 901, 934, 1290, 1330, 1320], // 基于准备好的dom,初始化echarts实例
type: 'line', var myChart4 = echarts.init(document.getElementById('main4'));
symbol: 'circle', //是否显示实心的折线圆点 // let that=this;
smooth: true, //让折线有弧度 // var getData1 = [];
symbolSize: 7, //折线圆点的大小 // var getData2 = [];
itemStyle: { // METHOD.axiosGet(
normal: { // this,
color: '#efc883', //折线点的颜色 // `/enterpriseInfo/getNumberByRegulation`,
lineStyle: { // function(res) {
color: '#efc883' //折线的颜色 // if (res.code === 0) {
}, // //先进行赋值
label: { show: true } //是否在折线点上显示数字 // for(let i=0; i<res.data.result.length; i++) {
// var obj = new Object();
// var arr = new Object();
// // obj.name = res.data.result[i].name;
// // obj.value = res.data.result[i].number;
// obj.name = res.data.result[i].type;
// obj.value = res.data.result[i].number;
// arr = res.data.result[i].type;
// getData1[i] = obj;
// getData2[i] = arr;
// }
// myChart1.setOption({
// legend: {
// data: getData2,
// },
// series:[{
// data: getData1,
// }]
// })
// }
// });
// 绘制图表
myChart4.setOption({
xAxis: {
type: 'category',
// data: this.dataX,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
boundaryGap: false, //控制日期是否在中间显示
axisLabel: {
show: true, //是否显示日期
interval: 0, //强制显示全部 // rotate: 40,//倾斜的角度
textStyle: {
color: '#000', //日期的颜色
fontSize: 12 //字体的大小
}
},
axisLine: {
lineStyle: {
color: '#ccc' // x轴的颜色
} }
} }
}, },
{ yAxis: {
// data: this.dataY, type: 'value',
data: [500, 600, 700, 300, 1100, 130, 1200], axisLabel: {
type: 'line', formatter: '{value}',
symbol: 'circle', //是否显示实心的折线圆点 textStyle: {
smooth: true, //让折线有弧度 color: '#000' //数字的颜色
symbolSize: 7, //折线圆点的大小 },
itemStyle: { inside: false //控制数据是否在内侧还是外侧显示
normal: { },
color: '#053B6A', //折线点的颜色 axisLine: {
lineStyle: { lineStyle: {
color: '#053B6A' //折线的颜色 color: '#ccc' // 折线的颜色
},
label: { show: true } //是否在折线点上显示数字
} }
} }
} },
] series: [
}); {
// data: this.dataY,
}, data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
// 点击按钮显示隐藏 symbol: 'circle', //是否显示实心的折线圆点
changeDisplay(e){ smooth: true, //让折线有弧度
this.isDisplay = !this.isDisplay symbolSize: 7, //折线圆点的大小
let $timeline = this.$refs.timeline; itemStyle: {
if(!this.showAndHide){ normal: {
for(let i = 0; i< $timeline.$children.length; i++){ color: '#efc883', //折线点的颜色
if(i>1){ lineStyle: {
$timeline.$children[i].$el.style.display = "block"; color: '#efc883' //折线的颜色
} },
} label: { show: true } //是否在折线点上显示数字
this.showAndHide = true; }
}else{ }
for(let i = 0; i< $timeline.$children.length; i++){ },
if(i>1){ {
$timeline.$children[i].$el.style.display = "none"; // data: this.dataY,
data: [500, 600, 700, 300, 1100, 130, 1200],
type: 'line',
symbol: 'circle', //是否显示实心的折线圆点
smooth: true, //让折线有弧度
symbolSize: 7, //折线圆点的大小
itemStyle: {
normal: {
color: '#053B6A', //折线点的颜色
lineStyle: {
color: '#053B6A' //折线的颜色
},
label: { show: true } //是否在折线点上显示数字
}
}
} }
} ]
this.showAndHide = false; });
}
//$timeline.toggleRowExpansion(row,true)
}, },
handleRemove(file) { handleRemove(file) {
console.log(file); console.log(file);
}, },
...@@ -750,31 +702,39 @@ export default { ...@@ -750,31 +702,39 @@ export default {
console.log(file); console.log(file);
}, },
/** 查询工单基础信息列表 */ /** 查询工单基础信息列表 */
getList() { // getList() {
this.loading = true; // this.loading = true;
listBasicsInfo(this.queryParams).then(response => { // realtimeData(this.queryParams).then(response => {
this.basicsInfoList = response.rows; // this.dataListdetail = response.rows;
this.total = response.total; // this.total = response.total;
this.loading = false; // this.loading = false;
}); // console.log("this.dataListdetail",this.dataListdetail)
}, // });
getBasicsInfo (){ // },
getBasicsInfo(this.orderId).then(response =>{ getData() {
this.form = response.data; getData(this.deviceReportDataId).then(response => {
const { deviceName, deviceCode, deviceType,standardConditionAccumulation,
workingConditionAccumulation,residualQuantity,standardConditionFlow,workingConditionFlow,temperature,pressure,reportTime,deviceStatus } = response.data;
const obj1 = {deviceName,deviceCode,deviceType,standardConditionAccumulation};
const obj2 = {workingConditionAccumulation,residualQuantity,standardConditionFlow,workingConditionFlow};
const obj3 = {temperature,pressure,reportTime,deviceStatus};
this.dataListdetail1.push(obj1);
this.dataListdetail2.push(obj2);
this.dataListdetail3.push(obj3);
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
if(this.form.deviceInfoList.length>0){ if (this.form.deviceInfoList.length > 0) {
this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]); this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude, this.form.deviceInfoList[0].latitude]);
} }
for(var i = 0; i < this.form.deviceInfoList.length; i++){ for (var i = 0; i < this.form.deviceInfoList.length; i++) {
let obj = this.form.deviceInfoList[i]; let obj = this.form.deviceInfoList[i];
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj) this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, obj)
} }
if(this.form.orderType == '1') { if (this.form.orderType == '1') {
// 获取设备列表树 // 获取设备列表树
let data = { let data = {
key1:this.form.deviceInfoList, key1: this.form.deviceInfoList,
key2:this.form.pipeList key2: this.form.pipeList
}; };
deviceTree(data).then(response => { deviceTree(data).then(response => {
this.deviceOptions[0].childList = response.data; this.deviceOptions[0].childList = response.data;
...@@ -782,180 +742,73 @@ export default { ...@@ -782,180 +742,73 @@ export default {
} }
}); });
}, },
// 筛选节点
// filterNode(value, data) {
// if (!value) return true;
// return data.label.indexOf(value) !== -1;
// },
// 节点单击事件
handleNodeClick(data) {
},
// 取消按钮
cancel() {
this.open = false;
// this.reset();
},
// 表单重置
reset() {
this.form = {
orderId: null,
orderType: null,
orderName: null,
orderStatus: "0",
createTime: null,
appointInspector: null,
allotTime: null,
actualInspector: null,
actualTime: null,
remarks: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.orderId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加工单基础信息";
},
/** 归档按钮操作 */
handleFinish(res) {
// this.reset();
getBasicsInfo(res).then(response => {
this.form = response.data;
this.open = true;
this.title = "工单信息归档";
});
},
/** 修改按钮操作 */
handleUpdate(res) {
// this.reset();
this.getInspectorList();
getBasicsInfo(this.orderId).then(response => {
this.form = response.data;
this.open = true;
this.title = "工单信息修改";
});
},
/** 提交按钮 */
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.orderStatus == '0') {
updateBasicsInfo(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else if(this.form.orderStatus == '2'){
updateOrderStatus(this.form).then(response => {
this.msgSuccess("操作成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const orderIds = row.orderId || this.ids;
this.$confirm('是否确认删除工单基础信息编号为"' + orderIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delBasicsInfo(orderIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有工单基础信息数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportBasicsInfo(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
} }
} }
</script> </script>
<style> <style>
.el-tree-node__content{ .el-tree-node__content {
width: 150px; width: 150px;
} }
.el-divider--horizontal {
display: block; .el-divider--horizontal {
height: 1px; display: block;
width: 100%; height: 1px;
margin: 20px 0; width: 100%;
} margin: 20px 0;
.feedbackTime-div{ }
float: left;margin-left: 150px;margin-top: 10px;
} .feedbackTime-div {
.feedbackTime{ float: left;
height: 120px; margin-left: 150px;
width: 120px; margin-top: 10px;
float: left; }
margin-left: 15px;
margin-top: 5px; .feedbackTime {
margin-bottom: 15px; height: 120px;
display: flex; width: 120px;
justify-content: center; float: left;
align-items: center; margin-left: 15px;
} margin-top: 5px;
.el-card__body { margin-bottom: 15px;
padding: 5px 20px 20px 20px; display: flex;
} justify-content: center;
.detail .el-form{ align-items: center;
width: 20%; }
}
.detail .el-form-item{ .el-card__body {
margin-bottom: 0px; padding: 5px 20px 20px 20px;
} }
.el-tree{
margin-top: 5px; .detail .el-form {
} width: 20%;
.avatar-uploader{ }
width: 25%;
float: left; .detail .el-form-item {
} margin-bottom: 0px;
.avatar-uploader .el-upload { }
.el-tree {
margin-top: 5px;
}
.avatar-uploader {
width: 25%;
float: left;
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.avatar-uploader .el-upload:hover { .avatar-uploader .el-upload:hover {
border-color: #409EFF; border-color: #409EFF;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
...@@ -964,13 +817,15 @@ export default { ...@@ -964,13 +817,15 @@ export default {
line-height: 178px; line-height: 178px;
text-align: center; text-align: center;
} }
.avatar { .avatar {
width: 178px; width: 178px;
height: 178px; height: 178px;
display: block; display: block;
} }
li{
li {
font-size: 15px; font-size: 15px;
font-weight: 900; font-weight: 900;
} }
</style> </style>
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<el-table-column label="上报时间" align="center" prop="reportTime" /> <el-table-column label="上报时间" align="center" prop="reportTime" />
<el-table-column label="设备状态" align="center" prop="deviceStatus" > <el-table-column label="设备状态" align="center" prop="deviceStatus" >
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
v-hasPermi="['system:data:export']" v-hasPermi="['system:data:export']"
>详情</el-button> >详情</el-button>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<pagination <pagination
......
...@@ -253,7 +253,6 @@ export default { ...@@ -253,7 +253,6 @@ export default {
getInspectionPlan(this.planId).then(response =>{ getInspectionPlan(this.planId).then(response =>{
this.form = response.data; this.form = response.data;
this.active = parseInt(response.data.orderStatus) + 1; this.active = parseInt(response.data.orderStatus) + 1;
console.log(this.form,2222222222222222)
if(this.form.deviceInfoList.length>0){ if(this.form.deviceInfoList.length>0){
this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]); this.gaoMap.resetMapCenter([this.form.deviceInfoList[0].longitude,this.form.deviceInfoList[0].latitude]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment