index.vue 23.7 KB
Newer Older
1
<template>
yaqizhang's avatar
yaqizhang committed
2 3
  <div class="app-container detail" style="background-color: rgb(238, 241, 245);">
    <div style="padding-top: 10px;background: #fff;height: 100%;">
4

yaqizhang's avatar
yaqizhang committed
5
      <el-row>
yaqizhang's avatar
yaqizhang committed
6
        <el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;">
yaqizhang's avatar
yaqizhang committed
7 8 9 10 11 12 13
          <div style="height: 45px;" @click="$router.go(-1)">
            <el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
            </el-button>
            <div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png" style="width: 25px;" alt=""></div>
          </div>
        </el-col>
      </el-row>
yaqizhang's avatar
yaqizhang committed
14 15
      <el-row style="width: 100%;height: 40px;">
        <el-col :span="24" style="margin-bottom: -10px;">
yaqizhang's avatar
yaqizhang committed
16 17 18 19 20
          <div style="">
            <ul><li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">实时数据详情</li></ul>
          </div>
        </el-col>
      </el-row>
yaqizhang's avatar
yaqizhang committed
21 22 23 24 25 26 27 28 29 30 31 32
      <el-row>
        <el-col :span="16" style="padding: 10px;">
          <div style="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>
33
              <el-table-column label="标况累计量(m³)" align="center" prop="standardConditionAccumulation" />
yaqizhang's avatar
yaqizhang committed
34
            </el-table>
35

yaqizhang's avatar
yaqizhang committed
36
            <el-table :data="dataListdetail2" style="width: 100%;margin-top: 20px;">
37 38 39 40
              <el-table-column label="工况累计量(m³)" align="center" prop="workingConditionAccumulation" />
              <el-table-column label="剩余量(m³)" align="center" prop="residualQuantity" />
              <el-table-column label="标况流量(m³/h)" align="center" prop="standardConditionFlow" />
              <el-table-column label="工况流量(m³/h)" align="center" prop="workingConditionFlow" />
yaqizhang's avatar
yaqizhang committed
41
            </el-table>
42 43


yaqizhang's avatar
yaqizhang committed
44
            <el-table :data="dataListdetail3" style="width: 100%;margin-top: 20px;">
45 46
              <el-table-column label="温度(℃)" align="center" prop="temperature" />
              <el-table-column label="压力(KPa)" align="center" prop="pressure" />
47
              <el-table-column label="上报时间" align="center" prop="createTime" />
yaqizhang's avatar
yaqizhang committed
48 49 50 51 52 53 54 55 56 57 58
              <el-table-column label="设备状态" align="center" prop="deviceStatus">
              </el-table-column>
            </el-table>
          </div>
        </el-col>
        <el-col :span="8" style="padding: 10px;padding-left: 0px;">
          <div id="marbox" style="height: 350px; border: 1px solid rgb(218, 213, 213);margin-top: -45px;">
            <div style="width: 100%;height: 100%" id="container"></div>
          </div>
        </el-col>
      </el-row>
yaqizhang's avatar
yaqizhang committed
59

60

61

yaqizhang's avatar
yaqizhang committed
62 63 64 65 66 67 68
      <template v-if="$route.query.deviceType !='0'">
        <el-row  v-if="form.deviceType != '4'">
          <el-col :span="12" style="padding: 10px;">
            <div id="main1" style="height:300px;background-color: rgb(247 247 247);padding: 5px;">
              <div v-if = "form.deviceReportDataList == null" class="div-null">
                <p>暂无数据</p>
              </div>
yaqizhang's avatar
yaqizhang committed
69
            </div>
yaqizhang's avatar
yaqizhang committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
          </el-col>
          <el-col :span="12" style="padding: 10px;">
            <div id="main2" style="height:300px;background-color: rgb(247 247 247);padding: 5px;">
              <div v-if = "form.deviceReportDataList == null" class="div-null">
                <p>暂无数据</p>
              </div>
            </div>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12" style="padding: 10px;" v-if="form.deviceType != '4'">
            <div id="main3" style="height:300px;background-color: rgb(247 247 247);padding: 5px;">
              <div v-if = "form.deviceReportDataList == null" class="div-null">
                <p>暂无数据</p>
              </div>
            </div>
          </el-col>
          <el-col :span="12" style="padding: 10px;">
            <div id="main4" style="margin-left: 5px;height:300px;background-color: rgb(247 247 247);padding: 5px;">
              <div v-if = "form.deviceReportDataList == null" class="div-null">
                <p>暂无数据</p>
              </div>
            </div>
          </el-col>
        </el-row>
        <!-- <div v-if="form.deviceType != '4'" style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;"> -->
96 97


yaqizhang's avatar
yaqizhang committed
98
      <!-- </div> -->
99 100


yaqizhang's avatar
yaqizhang committed
101
        <!-- <div style="height: 320px;width: 100%;padding: 10px;margin-top: 10px;"> -->
102 103


yaqizhang's avatar
yaqizhang committed
104 105
        <!-- </div> -->
      </template>
yaqizhang's avatar
yaqizhang committed
106

107 108


109 110
    </div>

yaqizhang's avatar
yaqizhang committed
111 112 113 114
  </div>
</template>

<script>
115

yaqizhang's avatar
yaqizhang committed
116
  import { realtimeData, getData } from "@/api/dataMonitoring/reportData";
117 118
  import { deviceTree } from "@/api/device/deviceInfo";
  import gaodeMap from "utils/gaodeMap.js";
yaqizhang's avatar
yaqizhang committed
119
  import { map, DEVICE_TYPE } from "utils/gaodeMap.js";
120 121
  import { inspectorList } from "@/api/system/user";
  import echarts from 'echarts';
yaqizhang's avatar
yaqizhang committed
122
  //   Vue.prototype.$echarts = echarts;
123

yaqizhang's avatar
yaqizhang committed
124 125
  export default {
    name: "RealtimeData",
126 127 128 129
    components: {
    },
    data() {
      return {
yaqizhang's avatar
yaqizhang committed
130
        order_list:[],
131
        inspector: [],
yaqizhang's avatar
yaqizhang committed
132
        isDisplay: false,
133 134 135 136 137 138 139 140 141 142
        dialogImageUrl: '',
        dialogVisible: false,
        disabled: false,
        imageUrl: '',
        // 遮罩层
        loading: true,
        // 导出遮罩层
        exportLoading: false,
        // 选中数组
        ids: [],
yaqizhang's avatar
yaqizhang committed
143 144
        // 设备监控表格数据
        dataListdetail: [],
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: true,
        // 总条数
        total: 0,
        // 工单基础信息表格数据
        basicsInfoList: [],
        // feedbackList: [],
        // 弹出层标题
        title: "",
        // 是否显示弹出层
        open: false,
        // 工单状态字典
        typeOptions: [],
yaqizhang's avatar
yaqizhang committed
162
        pickerOptions: [],
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
        // 工单类型字典
        ordertypeOptions: [],
        // 设备树选项
        deviceOptions: [
          {
            label: "设备列表",
            childList: []
          }
        ],
        defaultProps: {
          children: "childList",
          label: "label"
        },
        // 查询参数
        queryParams: {
          pageNum: 1,
          pageSize: 10,
          orderType: null,
          orderName: null,
          orderStatus: null,
          appointInspector: null,
          allotTime: null,
          actualInspector: null,
          actualTime: null,
          remarks: null
        },
        // 表单参数
yaqizhang's avatar
yaqizhang committed
190
        form: [],
191 192 193 194
        activity: {},
        // 表单校验
        rules: {
        },
yaqizhang's avatar
yaqizhang committed
195
        active: 0,
yaqizhang's avatar
yaqizhang committed
196
        deviceId: "",
yaqizhang's avatar
yaqizhang committed
197 198 199 200
        showAndHide: false,
        dataListdetail1: [],
        dataListdetail2: [],
        dataListdetail3: [],
201 202
      };
    },
yaqizhang's avatar
yaqizhang committed
203

204 205 206
    created() {
      // 如果是跳转来的,则接受初始化参数
      // this.user_id = this.$route.query.id; //详细信息页接收参数
yaqizhang's avatar
yaqizhang committed
207
      this.deviceId = +this.$route.query.deviceId;
yaqizhang's avatar
yaqizhang committed
208
      // this.getList();
209 210 211 212 213 214
      this.getDicts("t_order_status").then(response => {
        this.typeOptions = response.data;
      });
      this.getDicts("t_order_type").then(response => {
        this.ordertypeOptions = response.data;
      });
yaqizhang's avatar
yaqizhang committed
215
      // this.getData();
216
    },
yaqizhang's avatar
yaqizhang committed
217
    mounted() {
yaqizhang's avatar
yaqizhang committed
218 219
      // let gaoMap = new gaodeMap("石家庄");
      // this.gaoMap = gaoMap;
yaqizhang's avatar
yaqizhang committed
220
      this.getData();
221 222
    },
    methods: {
yaqizhang's avatar
yaqizhang committed
223
      getInspectorList() {
224 225 226 227 228
        this.loading = true;
        inspectorList().then(response => {
          this.inspector = response.data;
          this.loading = false;
        });
yaqizhang's avatar
yaqizhang committed
229

230
      },
231

yaqizhang's avatar
yaqizhang committed
232
      initData(getData1, getData2, getData3) {
yaqizhang's avatar
yaqizhang committed
233 234
        // 基于准备好的dom,初始化echarts实例
        var myChart1 = echarts.init(document.getElementById('main1'));
235

yaqizhang's avatar
yaqizhang committed
236 237 238 239

        // 绘制图表
        myChart1.setOption({
          title: {
240
            text: '标况流量、工况流量(近两小时)'
yaqizhang's avatar
yaqizhang committed
241 242
          },
          tooltip: {
243
            trigger: 'axis'
yaqizhang's avatar
yaqizhang committed
244 245
          },
          legend: {
246 247
            data: ['标况流量', '工况流量'],
            right: 80,
248
          },
yaqizhang's avatar
yaqizhang committed
249 250
          xAxis: {
            type: 'category',
251
            triggerEvent: true,
yaqizhang's avatar
yaqizhang committed
252
            // data: this.dataX,
yaqizhang's avatar
yaqizhang committed
253 254
            // data: ['23', '44', '77', '34', '56', '88', '38', '68', '55', '99', '44', '33'],
            data: getData3,
yaqizhang's avatar
yaqizhang committed
255 256 257
            boundaryGap: false, //控制日期是否在中间显示
            axisLabel: {
              show: true, //是否显示日期
258 259
              interval: 'auto', //强制显示全部 
              rotate: 40,//倾斜的角度
yaqizhang's avatar
yaqizhang committed
260 261
              textStyle: {
                color: '#000', //日期的颜色
262
                fontSize: 10 //字体的大小
yaqizhang's avatar
yaqizhang committed
263
              }
264
            },
yaqizhang's avatar
yaqizhang committed
265 266 267
            axisLine: {
              lineStyle: {
                color: '#ccc' // x轴的颜色
268 269 270
              }
            }
          },
yaqizhang's avatar
yaqizhang committed
271 272 273 274 275 276 277 278 279 280 281 282
          yAxis: {
            type: 'value',
            axisLabel: {
              formatter: '{value}',
              textStyle: {
                color: '#000' //数字的颜色
              },
              inside: false //控制数据是否在内侧还是外侧显示
            },
            axisLine: {
              lineStyle: {
                color: '#ccc' // 折线的颜色
283 284
              }
            }
yaqizhang's avatar
yaqizhang committed
285 286 287 288
          },
          series: [
            {
              // data: this.dataY,
yaqizhang's avatar
yaqizhang committed
289 290 291
              name: '标况流量',
              // data: [820, 232, 901, 534, 1290, 330, 1320, 345, 654, 189, 980, 234],
              data: getData1,
yaqizhang's avatar
yaqizhang committed
292 293 294 295 296 297 298 299 300 301
              type: 'line',
              symbol: 'circle', //是否显示实心的折线圆点
              smooth: true, //让折线有弧度
              symbolSize: 7, //折线圆点的大小
              itemStyle: {
                normal: {
                  color: '#efc883', //折线点的颜色
                  lineStyle: {
                    color: '#efc883' //折线的颜色
                  },
302
                  // label: { show: true } //是否在折线点上显示数字
303
                }
yaqizhang's avatar
yaqizhang committed
304 305 306 307
              }
            },
            {
              // data: this.dataY,
yaqizhang's avatar
yaqizhang committed
308 309 310
              name: '工况流量',
              // data: [500, 600, 700, 300, 1100, 130, 1200, 820, 932, 901, 934, 1290],
              data: getData2,
yaqizhang's avatar
yaqizhang committed
311 312 313 314 315 316 317 318 319 320
              type: 'line',
              symbol: 'circle', //是否显示实心的折线圆点
              smooth: true, //让折线有弧度
              symbolSize: 7, //折线圆点的大小
              itemStyle: {
                normal: {
                  color: '#053B6A', //折线点的颜色
                  lineStyle: {
                    color: '#053B6A' //折线的颜色
                  },
321
                  // label: { show: true } //是否在折线点上显示数字
322
                }
yaqizhang's avatar
yaqizhang committed
323
              }
324
            }
yaqizhang's avatar
yaqizhang committed
325 326 327 328
          ]
        });

      },
yaqizhang's avatar
yaqizhang committed
329 330 331


      drawPieChart(getData4, getData5, getData3) {
yaqizhang's avatar
yaqizhang committed
332 333
        // 基于准备好的dom,初始化echarts实例
        var myChart2 = echarts.init(document.getElementById('main2'));
334

yaqizhang's avatar
yaqizhang committed
335 336
        // 绘制图表
        myChart2.setOption({
yaqizhang's avatar
yaqizhang committed
337
          title: {
338
            text: '标况累积量、工况累积量(近两小时)'
yaqizhang's avatar
yaqizhang committed
339 340 341 342 343
          },
          tooltip: {
            trigger: 'axis'
          },
          legend: {
344 345
            data: ['标况累积量', '工况累积量'],
            right: 80,
yaqizhang's avatar
yaqizhang committed
346
          },
yaqizhang's avatar
yaqizhang committed
347 348 349
          xAxis: {
            type: 'category',
            // data: this.dataX,
yaqizhang's avatar
yaqizhang committed
350
            data: getData3,
yaqizhang's avatar
yaqizhang committed
351 352 353
            boundaryGap: false, //控制日期是否在中间显示
            axisLabel: {
              show: true, //是否显示日期
354 355
              interval: 'auto', //强制显示全部 
              rotate: 40,//倾斜的角度
yaqizhang's avatar
yaqizhang committed
356 357
              textStyle: {
                color: '#000', //日期的颜色
358
                fontSize: 10 //字体的大小
yaqizhang's avatar
yaqizhang committed
359
              }
360
            },
yaqizhang's avatar
yaqizhang committed
361 362 363 364
            axisLine: {
              lineStyle: {
                color: '#ccc' // x轴的颜色
              }
365
            }
yaqizhang's avatar
yaqizhang committed
366 367 368 369 370 371 372 373 374 375 376 377 378
          },
          yAxis: {
            type: 'value',
            axisLabel: {
              formatter: '{value}',
              textStyle: {
                color: '#000' //数字的颜色
              },
              inside: false //控制数据是否在内侧还是外侧显示
            },
            axisLine: {
              lineStyle: {
                color: '#ccc' // 折线的颜色
379 380 381
              }
            }
          },
yaqizhang's avatar
yaqizhang committed
382 383 384
          series: [
            {
              // data: this.dataY,
yaqizhang's avatar
yaqizhang committed
385
              name: '标况累积量',
yaqizhang's avatar
yaqizhang committed
386
              data: getData4,
yaqizhang's avatar
yaqizhang committed
387 388 389 390 391 392 393 394 395 396
              type: 'line',
              symbol: 'circle', //是否显示实心的折线圆点
              smooth: true, //让折线有弧度
              symbolSize: 7, //折线圆点的大小
              itemStyle: {
                normal: {
                  color: '#efc883', //折线点的颜色
                  lineStyle: {
                    color: '#efc883' //折线的颜色
                  },
397
                  // label: { show: true } //是否在折线点上显示数字
yaqizhang's avatar
yaqizhang committed
398 399 400 401 402
                }
              }
            },
            {
              // data: this.dataY,
yaqizhang's avatar
yaqizhang committed
403
              name: '工况累积量',
yaqizhang's avatar
yaqizhang committed
404
              data: getData5,
yaqizhang's avatar
yaqizhang committed
405 406 407 408 409 410 411 412 413 414
              type: 'line',
              symbol: 'circle', //是否显示实心的折线圆点
              smooth: true, //让折线有弧度
              symbolSize: 7, //折线圆点的大小
              itemStyle: {
                normal: {
                  color: '#053B6A', //折线点的颜色
                  lineStyle: {
                    color: '#053B6A' //折线的颜色
                  },
415
                  // label: { show: true } //是否在折线点上显示数字
yaqizhang's avatar
yaqizhang committed
416
                }
417 418
              }
            }
yaqizhang's avatar
yaqizhang committed
419 420 421
          ]
        });
      },
yaqizhang's avatar
yaqizhang committed
422
      main3(getData6, getData3) {
yaqizhang's avatar
yaqizhang committed
423 424
        // 基于准备好的dom,初始化echarts实例
        var myChart3 = echarts.init(document.getElementById('main3'));
425

yaqizhang's avatar
yaqizhang committed
426 427 428

        // 绘制图表
        myChart3.setOption({
yaqizhang's avatar
yaqizhang committed
429
          title: {
430
            text: '温度(近两小时)'
yaqizhang's avatar
yaqizhang committed
431 432 433 434 435
          },
          tooltip: {
            trigger: 'axis'
          },
          legend: {
436 437
            data: ['温度'],
            right: 80,
yaqizhang's avatar
yaqizhang committed
438
          },
yaqizhang's avatar
yaqizhang committed
439 440 441
          xAxis: {
            type: 'category',
            // data: this.dataX,
yaqizhang's avatar
yaqizhang committed
442
            data: getData3,
yaqizhang's avatar
yaqizhang committed
443 444 445
            boundaryGap: false, //控制日期是否在中间显示
            axisLabel: {
              show: true, //是否显示日期
446 447
              // interval: 0, //强制显示全部 
              rotate: 40,//倾斜的角度
yaqizhang's avatar
yaqizhang committed
448 449
              textStyle: {
                color: '#000', //日期的颜色
450
                fontSize: 10 //字体的大小
yaqizhang's avatar
yaqizhang committed
451 452 453 454 455 456
              }
            },
            axisLine: {
              lineStyle: {
                color: '#ccc' // x轴的颜色
              }
457 458
            }
          },
yaqizhang's avatar
yaqizhang committed
459 460 461 462 463 464 465 466
          yAxis: {
            type: 'value',
            axisLabel: {
              formatter: '{value}',
              textStyle: {
                color: '#000' //数字的颜色
              },
              inside: false //控制数据是否在内侧还是外侧显示
467
            },
yaqizhang's avatar
yaqizhang committed
468 469 470 471 472
            axisLine: {
              lineStyle: {
                color: '#ccc' // 折线的颜色
              }
            }
473
          },
yaqizhang's avatar
yaqizhang committed
474 475 476
          series: [
            {
              // data: this.dataY,
yaqizhang's avatar
yaqizhang committed
477
              name: '温度',
yaqizhang's avatar
yaqizhang committed
478
              data: getData6,
yaqizhang's avatar
yaqizhang committed
479 480 481 482 483 484 485 486 487 488
              type: 'line',
              symbol: 'circle', //是否显示实心的折线圆点
              smooth: true, //让折线有弧度
              symbolSize: 7, //折线圆点的大小
              itemStyle: {
                normal: {
                  color: '#efc883', //折线点的颜色
                  lineStyle: {
                    color: '#efc883' //折线的颜色
                  },
489
                  // label: { show: true } //是否在折线点上显示数字
yaqizhang's avatar
yaqizhang committed
490 491
                }
              }
492
            }
yaqizhang's avatar
yaqizhang committed
493 494 495 496
          ]
        });

      },
yaqizhang's avatar
yaqizhang committed
497
      main4(getData7, getData3) {
yaqizhang's avatar
yaqizhang committed
498 499 500 501 502
        // 基于准备好的dom,初始化echarts实例
        var myChart4 = echarts.init(document.getElementById('main4'));

        // 绘制图表
        myChart4.setOption({
yaqizhang's avatar
yaqizhang committed
503
          title: {
504
            text: '压力(近两小时)'
yaqizhang's avatar
yaqizhang committed
505 506 507 508 509
          },
          tooltip: {
            trigger: 'axis'
          },
          legend: {
510 511
            data: ['压力'],
            right: 80,
yaqizhang's avatar
yaqizhang committed
512
          },
yaqizhang's avatar
yaqizhang committed
513 514 515
          xAxis: {
            type: 'category',
            // data: this.dataX,
yaqizhang's avatar
yaqizhang committed
516
            data: getData3,
yaqizhang's avatar
yaqizhang committed
517 518 519
            boundaryGap: false, //控制日期是否在中间显示
            axisLabel: {
              show: true, //是否显示日期
520 521
              // interval: 0, //强制显示全部 
              rotate: 40,//倾斜的角度
yaqizhang's avatar
yaqizhang committed
522 523
              textStyle: {
                color: '#000', //日期的颜色
524
                fontSize: 10 //字体的大小
yaqizhang's avatar
yaqizhang committed
525 526 527 528 529
              }
            },
            axisLine: {
              lineStyle: {
                color: '#ccc' // x轴的颜色
530 531 532
              }
            }
          },
yaqizhang's avatar
yaqizhang committed
533 534 535 536 537 538 539 540 541 542 543 544
          yAxis: {
            type: 'value',
            axisLabel: {
              formatter: '{value}',
              textStyle: {
                color: '#000' //数字的颜色
              },
              inside: false //控制数据是否在内侧还是外侧显示
            },
            axisLine: {
              lineStyle: {
                color: '#ccc' // 折线的颜色
545 546
              }
            }
yaqizhang's avatar
yaqizhang committed
547 548 549 550
          },
          series: [
            {
              // data: this.dataY,
yaqizhang's avatar
yaqizhang committed
551
              name: '压力',
yaqizhang's avatar
yaqizhang committed
552
              data: getData7,
yaqizhang's avatar
yaqizhang committed
553 554 555 556 557 558 559 560 561 562
              type: 'line',
              symbol: 'circle', //是否显示实心的折线圆点
              smooth: true, //让折线有弧度
              symbolSize: 7, //折线圆点的大小
              itemStyle: {
                normal: {
                  color: '#efc883', //折线点的颜色
                  lineStyle: {
                    color: '#efc883' //折线的颜色
                  },
563
                  // label: { show: true } //是否在折线点上显示数字
yaqizhang's avatar
yaqizhang committed
564 565
                }
              }
566
            }
yaqizhang's avatar
yaqizhang committed
567 568
          ]
        });
569 570 571 572

      },


yaqizhang's avatar
yaqizhang committed
573

574 575 576 577 578 579 580 581 582 583
      handleRemove(file) {
        console.log(file);
      },
      handlePictureCardPreview(file) {
        this.dialogImageUrl = file.url;
        this.dialogVisible = true;
      },
      handleDownload(file) {
        console.log(file);
      },
584

yaqizhang's avatar
yaqizhang committed
585
      getData() {
yaqizhang's avatar
yaqizhang committed
586 587
        getData(this.deviceId).then(response => {
          const { deviceName, deviceCode, deviceType, standardConditionAccumulation,
588
            workingConditionAccumulation, residualQuantity, standardConditionFlow, workingConditionFlow, temperature, pressure, createTime, deviceStatus } = response.data;
yaqizhang's avatar
yaqizhang committed
589 590
          const obj1 = { deviceName, deviceCode, deviceType, standardConditionAccumulation };
          const obj2 = { workingConditionAccumulation, residualQuantity, standardConditionFlow, workingConditionFlow };
591
          const obj3 = { temperature, pressure, createTime, deviceStatus };
yaqizhang's avatar
yaqizhang committed
592 593 594
          this.dataListdetail1.push(obj1);
          this.dataListdetail2.push(obj2);
          this.dataListdetail3.push(obj3);
yaqizhang's avatar
yaqizhang committed
595
          this.form = response.data;
yaqizhang's avatar
yaqizhang committed
596
          this.active = parseInt(response.data.orderStatus) + 1;
597
          let gaoMap = new gaodeMap(process.env.VUE_APP_MAP_CENTER,[this.form.longitude, this.form.latitude]);
yaqizhang's avatar
yaqizhang committed
598
          this.gaoMap = gaoMap;
yaqizhang's avatar
yaqizhang committed
599 600 601 602 603 604 605 606 607 608 609 610 611 612
          if("1" == deviceType){
            this.gaoMap.addMarker(DEVICE_TYPE.REGEULATORBOX, this.form,"false")
          }
          if("2" == deviceType){
            this.gaoMap.addMarker(DEVICE_TYPE.VALUEWELL, this.form,"false")
          }
          if("3" == deviceType){
            this.gaoMap.addMarker(DEVICE_TYPE.FLOWMETER, this.form,"false")
          }
          if("4" == deviceType){
            this.gaoMap.addMarker(DEVICE_TYPE.PRESSUREGAGE, this.form,"false")
          }
          
        
yaqizhang's avatar
yaqizhang committed
613 614 615 616 617 618 619 620 621 622 623 624

          var getData1 = [];
          var getData2 = [];
          var getData3 = [];
          var getData4 = [];
          var getData5 = [];
          var getData6 = [];
          var getData7 = [];
          //先进行赋值
          for (let i = 0; i < this.form.deviceReportDataList.length; i++) {
            getData1.push( this.form.deviceReportDataList[i].standardConditionFlow)
            getData2.push(this.form.deviceReportDataList[i].workingConditionFlow)
625
            getData3.push(this.dateFtt("hh:mm:ss",new Date(this.form.deviceReportDataList[i].createTime)))
yaqizhang's avatar
yaqizhang committed
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643
            getData4.push(this.form.deviceReportDataList[i].standardConditionAccumulation)
            getData5.push(this.form.deviceReportDataList[i].workingConditionAccumulation)
            getData6.push(this.form.deviceReportDataList[i].temperature)
            getData7.push(this.form.deviceReportDataList[i].pressure)


          }
          this.initData(getData1, getData2, getData3);
          this.drawPieChart(getData4, getData5, getData3);
          this.main3(getData6, getData3);
          this.main4(getData7, getData3);
          console.log(this.form.deviceReportDataList)
          console.log("getData1",getData1)
          console.log("getData2",getData2)
          console.log("getData3",getData3)



644 645 646



647

yaqizhang's avatar
yaqizhang committed
648
          if (this.form.orderType == '1') {
649 650
            // 获取设备列表树
            let data = {
yaqizhang's avatar
yaqizhang committed
651 652
              key1: this.form.deviceInfoList,
              key2: this.form.pipeList
653 654 655 656 657 658 659
            };
            deviceTree(data).then(response => {
              this.deviceOptions[0].childList = response.data;
            });
          }
        });
      },
660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676
      dateFtt(fmt,date) { //author: meizz 
          var o = { 
          "M+" : date.getMonth()+1,     //月份 
          "d+" : date.getDate(),     //日 
          "h+" : date.getHours(),     //小时 
          "m+" : date.getMinutes(),     //分 
          "s+" : date.getSeconds(),     //秒 
          "q+" : Math.floor((date.getMonth()+3)/3), //季度 
          "S" : date.getMilliseconds()    //毫秒 
          }; 
          if(/(y+)/.test(fmt)) 
          fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length)); 
          for(var k in o) 
          if(new RegExp("("+ k +")").test(fmt)) 
          fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); 
          return fmt; 
      }
677 678 679

    }
  }
yaqizhang's avatar
yaqizhang committed
680 681
</script>
<style>
yaqizhang's avatar
yaqizhang committed
682 683 684 685 686 687
  .div-null{
    width: 100%;
    height: 300px;
    text-align: center;
    line-height: 250px;
  }
yaqizhang's avatar
yaqizhang committed
688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738
  .el-tree-node__content {
    width: 150px;
  }

  .el-divider--horizontal {
    display: block;
    height: 1px;
    width: 100%;
    margin: 20px 0;
  }

  .feedbackTime-div {
    float: left;
    margin-left: 150px;
    margin-top: 10px;
  }

  .feedbackTime {
    height: 120px;
    width: 120px;
    float: left;
    margin-left: 15px;
    margin-top: 5px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .el-card__body {
    padding: 5px 20px 20px 20px;
  }

  .detail .el-form {
    width: 20%;
  }

  .detail .el-form-item {
    margin-bottom: 0px;
  }

  .el-tree {
    margin-top: 5px;
  }

  .avatar-uploader {
    width: 25%;
    float: left;
  }

  .avatar-uploader .el-upload {
739 740 741 742 743 744
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
yaqizhang's avatar
yaqizhang committed
745

746 747 748
  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }
yaqizhang's avatar
yaqizhang committed
749

750 751 752 753 754 755 756 757
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
  }
yaqizhang's avatar
yaqizhang committed
758

759 760 761 762 763
  .avatar {
    width: 178px;
    height: 178px;
    display: block;
  }
yaqizhang's avatar
yaqizhang committed
764 765

  li {
766 767 768
    font-size: 15px;
    font-weight: 900;
  }
769
</style>