index.vue 19.7 KB
Newer Older
纪泽龙's avatar
纪泽龙 committed
1 2
<!--
 * @Author: your name
纪泽龙's avatar
纪泽龙 committed
3
 * @Date: 2022-01-11 13:44:17
纪泽龙's avatar
纪泽龙 committed
4
 * @LastEditTime: 2022-08-31 14:20:03
纪泽龙's avatar
纪泽龙 committed
5
 * @LastEditors: 纪泽龙 jizelong@qq.com
纪泽龙's avatar
纪泽龙 committed
6
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
纪泽龙's avatar
纪泽龙 committed
7
 * @FilePath: /test/hello-world/src/views/Home.vue
纪泽龙's avatar
纪泽龙 committed
8 9
-->
<template>
纪泽龙's avatar
纪泽龙 committed
10
  <div class="home bigwindow">
纪泽龙's avatar
纪泽龙 committed
11
    <div class="goSystem" @click="$router.push('/index')">进入管理系统</div>
纪泽龙's avatar
纪泽龙 committed
12
    <div id="map"></div>
纪泽龙's avatar
纪泽龙 committed
13
    <!-- <Center :show="show" :centerData="centerData" /> -->
纪泽龙's avatar
纪泽龙 committed
14 15
    <UserCenter
      :title="centerTitle"
16
      :show="userCenterShow"
纪泽龙's avatar
纪泽龙 committed
17 18 19 20 21 22
      ref="userCenter"
      :detcetorList="detcetorList"
      :userId="centerUserId"
      :total="centerTotal"
      :pageSize="20"
    />
23 24 25 26 27 28 29 30 31
    <OtherCenter
      :title="centerTitle"
      :show="otherCenterShow"
      ref="otherCenter"
      :detcetorList="detcetorList"
      :userId="centerUserId"
      :total="centerTotal"
      :pageSize="20"
    />
yaqizhang's avatar
yaqizhang committed
32
    <PipeColor />
yaqizhang's avatar
yaqizhang committed
33
    <!-- 底部按钮 -->
纪泽龙's avatar
纪泽龙 committed
34
    <div class="home-div">
35
      <img src="@/assets/mapinages/bottombanner.png" alt="" style="" />
纪泽龙's avatar
纪泽龙 committed
36 37 38
      <div class="listingsSty fangy">
        <div
          @click="allCompany"
39
          :class="selarr.length == companyLength ? 'active' : ''"
纪泽龙's avatar
纪泽龙 committed
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
          class="firsty"
        >
          全部
        </div>
        <div
          class="firsty"
          :class="selarr.indexOf(item.val) >= 0 ? 'active' : ''"
          v-for="(item, index) in typeList"
          :key="item.val"
          @click="sel(index, item)"
        >
          {{ item.name }}
        </div>
      </div>
    </div>
yaqizhang's avatar
yaqizhang committed
55 56

    <!-- 设备按钮 -->
57 58
    <div
      :class="{
纪泽龙's avatar
纪泽龙 committed
59 60
        'typelist-div': windowInnerWidth > 1300,
        'typelist-divZ': windowInnerWidth < 1300,
61 62
      }"
    >
纪泽龙's avatar
纪泽龙 committed
63 64 65 66 67 68 69 70 71 72 73 74
      <div
        class="list"
        v-for="(item, index) in arr"
        :key="index"
        :class="selarr1.indexOf(item.val) >= 0 ? 'active' : ''"
        @click="sel1(index, item)"
      >
        <img
          :src="item.imgurl"
          style="margin-top: 2px; float: left; margin-right: 3px"
        />
        {{ item.name }}
yaqizhang's avatar
yaqizhang committed
75
      </div>
纪泽龙's avatar
纪泽龙 committed
76
    </div>
yaqizhang's avatar
yaqizhang committed
77

纪泽龙's avatar
纪泽龙 committed
78 79 80 81 82 83 84 85 86
    <!-- 弹框 -->
    <div
      id=""
      style="position: fixed; top: 0; right: 0; width: 100px; height: 100px"
    >
      <!-- <markerInfoWindow></markerInfoWindow> -->
    </div>

    <!-- 头部 -->
纪泽龙's avatar
纪泽龙 committed
87
    <div class="banner-test" :style="{height:windowInnerWidth>1300?'85px':'70px'}">
纪泽龙's avatar
纪泽龙 committed
88
      <!-- <dv-decoration-5 style="width:100%;height:100%;" /> -->
yaqizhang's avatar
yaqizhang committed
89
      <img src="@/assets/mapinages/tb.png" alt="" />
纪泽龙's avatar
纪泽龙 committed
90 91 92
    </div>

    <!-- 左边 -->
93 94
    <div
      class="leftbar"
纪泽龙's avatar
纪泽龙 committed
95
      :style="{ width: windowInnerWidth > 1300 ? '470px' : '300px' }"
96
    >
纪泽龙's avatar
纪泽龙 committed
97
      <leftBar v-if="windowInnerWidth > 1300" ref="mychild2"></leftBar>
纪泽龙's avatar
纪泽龙 committed
98
      <leftBarZ v-else ref="mychild2"></leftBarZ>
纪泽龙's avatar
纪泽龙 committed
99 100
    </div>
    <!-- 右边 -->
101 102
    <div
      class="rightbar"
纪泽龙's avatar
纪泽龙 committed
103
      :style="{ width: windowInnerWidth > 1300 ? '470px' : '300px' }"
104
    >
纪泽龙's avatar
纪泽龙 committed
105
      <rightBar v-if="windowInnerWidth > 1300" ref="mychild"></rightBar>
106
      <rightBarZ v-else ref="mychild"></rightBarZ>
纪泽龙's avatar
纪泽龙 committed
107 108 109 110 111 112 113 114
    </div>

    <!-- 左上角天气 -->
    <div
      class="weather"
      style="
        position: fixed;
        top: 0;
yaqizhang's avatar
yaqizhang committed
115 116
        margin-top: 10px;
        margin-left: 15px;
纪泽龙's avatar
纪泽龙 committed
117 118 119 120 121 122 123 124
        left: 0;
        z-index: 999;
        height: 50px;
      "
    >
      <!-- <iframe src="../../static/weather.html" frameborder="0"></iframe> -->
      <iframe
        scrolling="no"
yaqizhang's avatar
yaqizhang committed
125
        src="https://tianqiapi.com/api.php?style=tz&skin=pitaya&color=339CC9"
纪泽龙's avatar
纪泽龙 committed
126
        frameborder="0"
yaqizhang's avatar
yaqizhang committed
127
        width="450"
yaqizhang's avatar
yaqizhang committed
128
        height="30"
纪泽龙's avatar
纪泽龙 committed
129 130 131 132 133 134 135 136 137 138 139 140
        allowtransparency="true"
      ></iframe>
      <!-- <iframe scrolling="no" src="https://yiketianqi.com/api.php?style=ty&skin=pitaya" frameborder="0" width="300" height="75" allowtransparency="true"></iframe> -->
    </div>

    <!-- 右上角时间 -->
    <div
      class="right-time"
      style="
        position: fixed;
        top: 0;
        margin-top: 10px;
yaqizhang's avatar
yaqizhang committed
141
        margin-right: 15px;
纪泽龙's avatar
纪泽龙 committed
142 143
        right: 0;
        z-index: 999;
yaqizhang's avatar
yaqizhang committed
144
        width: 200px;
纪泽龙's avatar
纪泽龙 committed
145
        height: 50px;
纪泽龙's avatar
纪泽龙 committed
146
        color: #339cc9;
纪泽龙's avatar
纪泽龙 committed
147 148
      "
    >
纪泽龙's avatar
纪泽龙 committed
149
      <div style="height: 20px; width: 100%; float: right; font-size: 14px">
yaqizhang's avatar
yaqizhang committed
150
        {{ nowDate }}&nbsp;{{ nowtime }}&nbsp;{{ nowweek }}
纪泽龙's avatar
纪泽龙 committed
151 152
      </div>
    </div>
纪泽龙's avatar
纪泽龙 committed
153 154 155 156
  </div>
</template>

<script>
纪泽龙's avatar
纪泽龙 committed
157 158
// @ is an alias to /src
import { EditorMap } from "@/utils/mapClass/map";
159
import { mapGetters, mapActions } from "vuex";
纪泽龙's avatar
纪泽龙 committed
160 161
import { listDetectorInfo } from "@/api/detector/detectorInfo";
import { detectorUserList } from "@/api/detector/detectorUser";
纪泽龙's avatar
纪泽龙 committed
162 163 164 165 166 167 168
import {
  pipeData,
  tiaoyaxiang,
  famen,
  changzhan,
  jiankong,
  user,
169
  alarmtime,
纪泽龙's avatar
纪泽龙 committed
170
} from "@/utils/mapClass/config.js";
171 172 173 174 175 176 177
import {
  getPipe,
  getTyx,
  getFm,
  getCz,
  getVideo,
  getUser,
178
  getEnterprise,
纪泽龙's avatar
纪泽龙 committed
179
  userAlarm,
180
  getTcqDevice,
181
} from "@/api/bigWindow/getDevice";
纪泽龙's avatar
纪泽龙 committed
182 183
import Line from "@/components/bigWindow/Line.vue";
import VideoView from "@/components/bigWindow/VideoView.vue";
184 185
import Device from "@/components/bigWindow/Device.vue";
import Cz from "@/components/bigWindow/Cz.vue";
纪泽龙's avatar
纪泽龙 committed
186 187
import User from "@/components/bigWindow/User.vue";
import Center from "@/components/bigWindow/Center.vue";
纪泽龙's avatar
纪泽龙 committed
188
import UserCenter from "@/components/bigWindow/UserCenter.vue";
189
import OtherCenter from "@/components/bigWindow/OtherCenter.vue";
190
import Company from "@/components/bigWindow/Company.vue";
纪泽龙's avatar
纪泽龙 committed
191 192 193 194
import PipeColor from "@/components/bigWindow/PipeColor.vue";

// import markerInfoWindow from './components/markerInfoWindow.vue'
import leftBar from "@/components/bigWindow/leftBar.vue";
纪泽龙's avatar
纪泽龙 committed
195
import leftBarZ from "@/components/bigWindow/leftBarZ.vue";
纪泽龙's avatar
纪泽龙 committed
196
import rightBar from "@/components/bigWindow/rightBar.vue";
197
import rightBarZ from "@/components/bigWindow/rightBarZ.vue";
纪泽龙's avatar
纪泽龙 committed
198
export default {
纪泽龙's avatar
纪泽龙 committed
199 200 201
  name: "Home",
  components: {
    leftBar,
纪泽龙's avatar
纪泽龙 committed
202
    leftBarZ,
纪泽龙's avatar
纪泽龙 committed
203
    rightBar,
204
    rightBarZ,
205
    // Center,
纪泽龙's avatar
纪泽龙 committed
206
    UserCenter,
207
    OtherCenter,
纪泽龙's avatar
纪泽龙 committed
208 209 210 211 212 213
    PipeColor,
  },
  data() {
    return {
      map: null,
      show: false,
纪泽龙's avatar
纪泽龙 committed
214
      // centerData: null,
纪泽龙's avatar
纪泽龙 committed
215 216 217 218 219 220 221 222 223 224 225
      selarr: [1, 2, 3],
      weather: "",
      lower: "",
      higher: "",
      nowDate: "",
      nowweek: "",
      nowtime: "", // 当前日期

      typeList: [
        {
          val: 1,
yaqizhang's avatar
yaqizhang committed
226
          name: "中燃翔科",
纪泽龙's avatar
纪泽龙 committed
227 228 229 230 231 232 233 234 235 236
        },
        {
          val: 2,
          name: "中诚然气",
        },
        {
          val: 3,
          name: "中燃韵科",
        },
      ],
纪泽龙's avatar
纪泽龙 committed
237 238 239 240 241 242
      //      2:"调压箱",
      // 3:"阀门",
      // 4:"厂站",
      // 5:"监控",
      // 6:"用户",
      arr: [
yaqizhang's avatar
yaqizhang committed
243
        {
纪泽龙's avatar
纪泽龙 committed
244 245 246 247
          val: 2,
          ischeck: false,
          imgurl: require("@/assets/image/tyxsub.svg"),
          name: "调压箱",
yaqizhang's avatar
yaqizhang committed
248 249
        },
        {
纪泽龙's avatar
纪泽龙 committed
250 251 252 253
          val: 3,
          ischeck: false,
          imgurl: require("@/assets/image/fmjsub.svg"),
          name: "阀门井",
yaqizhang's avatar
yaqizhang committed
254 255
        },
        {
纪泽龙's avatar
纪泽龙 committed
256 257 258
          val: 4,
          ischeck: false,
          imgurl: require("@/assets/image/czsub.svg"),
纪泽龙's avatar
纪泽龙 committed
259
          name: "场 站",
yaqizhang's avatar
yaqizhang committed
260 261
        },
        {
纪泽龙's avatar
纪泽龙 committed
262 263 264 265
          val: 6,
          ischeck: false,
          imgurl: require("@/assets/image/usersub.svg"),
          name: "用 户",
yaqizhang's avatar
yaqizhang committed
266 267
        },
        {
纪泽龙's avatar
纪泽龙 committed
268 269 270 271 272
          val: 5,
          ischeck: false,
          imgurl: require("@/assets/image/jksub.svg"),
          name: "监 控",
        },
yaqizhang's avatar
yaqizhang committed
273
      ],
纪泽龙's avatar
纪泽龙 committed
274 275 276 277 278
      selarr1: [],
      // 用户的center数据
      detcetorList: [],
      centerUserId: null,
      centerTotal: null,
279
      userCenterShow: false,
纪泽龙's avatar
纪泽龙 committed
280
      centerTitle: "",
纪泽龙's avatar
纪泽龙 committed
281

282 283
      // 其他设备的center数据
      // 除了这个值,用来显示隐藏,其他值与user共用
284
      otherCenterShow: false,
285

纪泽龙's avatar
纪泽龙 committed
286 287
      // 报警轮询timer
      alarmTimer: null,
288
      windowInnerWidth: 0,
纪泽龙's avatar
纪泽龙 committed
289 290
    };
  },
yaqizhang's avatar
yaqizhang committed
291

292 293 294 295 296 297
  computed: {
    ...mapGetters(["company", "systemSetting"]),
    companyLength() {
      return this.typeList.length;
    },
  },
纪泽龙's avatar
纪泽龙 committed
298 299
  watch: {
    selarr(newValue) {
300
      if (newValue.length == this.companyLength) {
纪泽龙's avatar
纪泽龙 committed
301 302
        // this.$refs.mychild.choice(0);
        // this.$refs.mychild2.choice(0);
纪泽龙's avatar
纪泽龙 committed
303 304 305
      }
    },
  },
纪泽龙's avatar
纪泽龙 committed
306 307 308
  created() {
    this.windowInnerWidth = window.innerWidth;
  },
309
  async mounted() {
310 311 312 313 314 315 316 317
    // console.log(99999999999999)
    //   getPipe().then(res=>{
    //   console.log("成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功",res)
    // }).catch(res=>{
    //   console.log(123)
    // })
    // return;
    const path = eval(this.systemSetting.map_center);
纪泽龙's avatar
纪泽龙 committed
318 319 320
    this.map = new EditorMap(
      "map",
      {
321
        center: path,
纪泽龙's avatar
纪泽龙 committed
322
        mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
纪泽龙's avatar
纪泽龙 committed
323
        zoom: 14.5,
纪泽龙's avatar
纪泽龙 committed
324 325 326
      },
      this
    );
327 328 329
    // 这是测试,用本地数据
    if (this.systemSetting.prod_test === "test") {
      this.addPipeLine(pipeData, Line);
330 331 332
      this.addDevice(tiaoyaxiang, Device);
      this.addDevice(famen, Device);
      this.addDevice(changzhan, Cz);
333 334 335 336 337 338 339 340 341 342
      this.addDevice(user, User);
      this.addDevice(jiankong, VideoView);
    } else {
      // 调用状态管理器方法获取公司信息每次都要调取,因为每次进来都是更新的
      this.GetCompany();
      this.typeList = this.company.map((item) => ({
        val: item.conpanyId,
        name: item.companyName,
      }));
      this.selarr = this.company.map((item) => item.conpanyId);
纪泽龙's avatar
纪泽龙 committed
343 344
      this.selarr1 = this.arr.map((item) => item.val);
      this.arr.forEach((item) => (item.ischeck = true));
345

346
      // getPipe() getTyx() getFm() getCz() getVideo() getUser()
347
      await this.goMap(getEnterprise, this.addDevice, Company);
348
      this.goMap(getPipe, this.addPipeLine, Line);
349 350 351
      this.goMap(getTyx, this.addDevice, Device);
      this.goMap(getFm, this.addDevice, Device);
      this.goMap(getCz, this.addDevice, Cz);
352
      this.goMap(getVideo, this.addDevice, VideoView);
353

纪泽龙's avatar
纪泽龙 committed
354 355 356 357 358 359 360
      // 用户要等一下 因为有报警数据
      this.goMap(detectorUserList, this.addDevice, User).then((res) => {
        // 先查一下,然后开启定时器
        this.userAlarm();
        this.alarmTimer = setInterval(() => {
          this.userAlarm();
          // console.log("查询报警");
361
        }, alarmtime);
纪泽龙's avatar
纪泽龙 committed
362
      });
363
    }
纪泽龙's avatar
纪泽龙 committed
364
    this.currentTime();
365
    this.$refs.mychild.choice(this.selarr);
366
    this.$refs.mychild2.choice(this.selarr);
纪泽龙's avatar
纪泽龙 committed
367 368
  },
  methods: {
369 370 371 372 373
    ...mapActions({
      GetCompany: "bigWindowCompany/GetCompany",
    }),
    // 管道上图
    addPipeLine(data, component) {
纪泽龙's avatar
纪泽龙 committed
374
      console.log("zzzzzzsssssxxxxzxzxzxzxzxzxz");
纪泽龙's avatar
纪泽龙 committed
375

376 377
      for (let comp in data) {
        data[comp].forEach((pipe) => {
纪泽龙's avatar
纪泽龙 committed
378
          console.log(pipe);
379
          this.map.addPipeLine(pipe, component);
纪泽龙's avatar
纪泽龙 committed
380 381 382 383 384 385 386 387 388 389 390
        });
      }
    },
    // 设备上图
    addDevice(data, component) {
      for (let comp in data) {
        data[comp].forEach((pipe) => {
          this.map.addDevice(pipe, component);
        });
      }
    },
391
    goMap(httpFunc, addFunc, component) {
纪泽龙's avatar
纪泽龙 committed
392
      return httpFunc().then((res) => {
393
        // 给用户加icontype
纪泽龙's avatar
纪泽龙 committed
394 395 396 397
        if (res.data && !res.data[0].iconType) {
          res.data.forEach((item) => {
            item.iconType = 6;
          });
纪泽龙's avatar
纪泽龙 committed
398
        }
399 400 401 402
        // 根据数据格式不同,赋值不同,如果是个数组,就用res,如果不是就用res.data
        let config = {};
        if (Array.isArray(res)) {
          config = { data: res };
403
          // 给视频设备的conpanyType变成null,因为视频不受企业控制
纪泽龙's avatar
纪泽龙 committed
404 405
          if (res[0].iconType == 5) {
            res.forEach((item) => {
纪泽龙's avatar
纪泽龙 committed
406
              item.companyType = null;
纪泽龙's avatar
纪泽龙 committed
407
            });
纪泽龙's avatar
纪泽龙 committed
408
          }
409 410 411
        } else {
          config = { data: res.data };
        }
412
        console.log("reresresresresresresresresress", config);
413

414
        addFunc(config, component);
纪泽龙's avatar
纪泽龙 committed
415 416 417 418 419 420 421 422 423 424 425 426 427 428
        return config.iconType;
      });
    },
    userAlarm() {
      userAlarm().then((res) => {
        console.log("报警", res.data);
        if (res.data.length > 0) {
          // 报警
          res.data.forEach((item) => {
            this.map.deviceAlarm(item);
          });
          // 看看谁告消警
        }
        this.map.relieveAlarm(res.data);
429 430 431
      });
    },

纪泽龙's avatar
纪泽龙 committed
432
    myCenterShow(boolean) {
纪泽龙's avatar
纪泽龙 committed
433 434
      this.show = boolean;
    },
纪泽龙's avatar
纪泽龙 committed
435 436 437 438 439
    // centerDataFunc(centerData) {
    //   this.centerData = centerData;
    //   console.log(centerData);
    //   this.show = true;
    // },
纪泽龙's avatar
纪泽龙 committed
440 441

    allCompany() {
442
      if (this.selarr.length == this.companyLength) {
纪泽龙's avatar
纪泽龙 committed
443 444
        this.selarr = [];
      } else {
445
        this.selarr = this.company.map((item) => item.conpanyId);
纪泽龙's avatar
纪泽龙 committed
446 447
      }

448 449
      // this.map.companyFilter(this.selarr);
      this.map.allfilter(this.selarr, this.selarr1);
纪泽龙's avatar
纪泽龙 committed
450
      this.map.infowindowClose();
纪泽龙's avatar
纪泽龙 committed
451
      this.show = false;
452
      this.$refs.mychild2.choice(this.selarr);
453
      this.$refs.mychild.choice(this.selarr);
纪泽龙's avatar
纪泽龙 committed
454 455
    },
    sel(index, item) {
纪泽龙's avatar
纪泽龙 committed
456 457
      this.map.infowindowClose();
      this.show = false;
纪泽龙's avatar
纪泽龙 committed
458 459 460 461
      const ind = this.selarr.indexOf(item.val);
      if (ind >= 0) {
        this.selarr.splice(ind, 1);
        if (item.val == 3) {
纪泽龙's avatar
纪泽龙 committed
462 463
          // this.$refs.mychild.choice(1);
          // this.$refs.mychild2.choice(1);
纪泽龙's avatar
纪泽龙 committed
464
        } else {
纪泽龙's avatar
纪泽龙 committed
465 466
          // this.$refs.mychild.choice(item.val + 1);
          // this.$refs.mychild2.choice(item.val + 1);
纪泽龙's avatar
纪泽龙 committed
467 468 469
        }
      } else {
        this.selarr.push(item.val);
纪泽龙's avatar
纪泽龙 committed
470 471
        // this.$refs.mychild.choice(item.val);
        // this.$refs.mychild2.choice(item.val);
纪泽龙's avatar
纪泽龙 committed
472
      }
纪泽龙's avatar
纪泽龙 committed
473 474
      // this.map.companyFilter(this.selarr);
      this.map.allfilter(this.selarr, this.selarr1);
475
      this.$refs.mychild2.choice(this.selarr);
476
      this.$refs.mychild.choice(this.selarr);
纪泽龙's avatar
纪泽龙 committed
477
    },
yaqizhang's avatar
yaqizhang committed
478

纪泽龙's avatar
纪泽龙 committed
479 480 481 482 483 484
    sel1(index, item) {
      const ind = this.selarr1.indexOf(item.val);
      if (ind >= 0) {
        this.selarr1.splice(ind, 1);
      } else {
        this.selarr1.push(item.val);
yaqizhang's avatar
yaqizhang committed
485
      }
纪泽龙's avatar
纪泽龙 committed
486
      this.map.allfilter(this.selarr, this.selarr1);
yaqizhang's avatar
yaqizhang committed
487
    },
纪泽龙's avatar
纪泽龙 committed
488
    //用户的设备center
489
    getDetectorInfoList(httpFunc, queryParams, title) {
纪泽龙's avatar
纪泽龙 committed
490
      console.log(queryParams);
491 492
      return httpFunc(queryParams).then((res) => {
        // console.log("queryParams", res);
纪泽龙's avatar
纪泽龙 committed
493 494 495 496 497 498
        if (res.code == 200) {
          this.detcetorList = res.rows;
          this.centerUserId = queryParams.userId;
          // 总数据
          this.centerTotal = res.total;
          // this.$refs.userCenter.fade = "fade";
499
          this.otherCenterShow = false;
500
          this.userCenterShow = true;
纪泽龙's avatar
纪泽龙 committed
501 502 503 504 505 506
          this.centerTitle = title;
          // 传递回去
          return res.code;
        }
      });
    },
507 508 509 510 511
    // 调压箱,阀门,场站睇下的设备
    getTcqDevice(queryParams, title) {
      console.log(queryParams);
      return getTcqDevice(queryParams).then((res) => {
        // console.log("queryParams", res);
512
        console.log("resresresresreszzzzzzzzzzzzzzz", res);
513

514 515 516 517 518 519
        this.detcetorList = res;
        this.centerUserId = queryParams.devId;
        // 总数据
        this.centerTotal = res.length;
        // this.$refs.userCenter.fade = "fade";
        this.userCenterShow = false;
520

521 522 523 524
        this.otherCenterShow = true;
        this.centerTitle = title;
        // 传递回去
        return res.code;
525 526
      });
    },
纪泽龙's avatar
纪泽龙 committed
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554
    currentTime() {
      setInterval(() => {
        this.formatDate();
      }, 1000);
    },
    formatDate() {
      let date = new Date();
      let year = date.getFullYear(); // 年
      let month = date.getMonth() + 1; // 月
      let day = date.getDate(); // 日
      let week = date.getDay(); // 星期
      let weekArr = [
        "星期日",
        "星期一",
        "星期二",
        "星期三",
        "星期四",
        "星期五",
        "星期六",
      ];
      let hour = date.getHours(); // 时
      hour = hour < 10 ? "0" + hour : hour; // 如果只有一位,则前面补零
      let minute = date.getMinutes(); // 分
      minute = minute < 10 ? "0" + minute : minute; // 如果只有一位,则前面补零
      let second = date.getSeconds(); // 秒
      second = second < 10 ? "0" + second : second; // 如果只有一位,则前面补零
      this.nowtime = `${hour}:${minute}:${second}`;
      this.nowweek = `${weekArr[week]}`;
yaqizhang's avatar
yaqizhang committed
555
      this.nowDate = `${year}${month}${day}`;
纪泽龙's avatar
纪泽龙 committed
556 557 558 559 560 561
    },
  },
  // 销毁定时器
  beforeDestroy() {
    if (this.formatDate) {
      clearInterval(this.formatDate); // 在Vue实例销毁前,清除时间定时器
纪泽龙's avatar
纪泽龙 committed
562
    }
563
    // 报警
纪泽龙's avatar
纪泽龙 committed
564 565 566
    if (this.alarmTimer) {
      clearInterval(this.alarmTimer);
    }
纪泽龙's avatar
纪泽龙 committed
567 568
  },
};
纪泽龙's avatar
纪泽龙 committed
569 570
</script>
<style lang="scss" scoped>
纪泽龙's avatar
纪泽龙 committed
571 572 573 574
.home {
  position: relative;
  height: 100vh;
}
纪泽龙's avatar
纪泽龙 committed
575 576 577
.goSystem {
  position: fixed;
  z-index: 9999;
yaqizhang's avatar
yaqizhang committed
578 579 580
  top: 50px;
  right: 20px;
  font-size: 14px;
纪泽龙's avatar
纪泽龙 committed
581 582
  color: #18baff;
  cursor: pointer;
yaqizhang's avatar
yaqizhang committed
583
  padding: 3px 5px;
纪泽龙's avatar
纪泽龙 committed
584 585
  border: 1px solid #339cc9;
  color: #339cc9;
纪泽龙's avatar
纪泽龙 committed
586
  &:hover {
纪泽龙's avatar
纪泽龙 committed
587 588
    background-color: #053b6a;
    color: #2cd5db;
纪泽龙's avatar
纪泽龙 committed
589 590
  }
}
纪泽龙's avatar
纪泽龙 committed
591 592 593 594 595
#map {
  position: absolute;
  top: 0px;
  bottom: 0;
  width: 100%;
纪泽龙's avatar
纪泽龙 committed
596
}
纪泽龙's avatar
纪泽龙 committed
597 598
.banner-test {
  width: 100%;
yaqizhang's avatar
yaqizhang committed
599
  height: 85px;
纪泽龙's avatar
纪泽龙 committed
600 601 602 603 604 605 606 607 608 609
  position: relative;
  top: 0;
  z-index: 999;
}
.banner-test img {
  width: 100%;
  height: 100%;
}

.leftbar {
纪泽龙's avatar
纪泽龙 committed
610 611 612
  width: 300px;
  overflow: hidden;
  height: calc(100vh - 85px);
纪泽龙's avatar
纪泽龙 committed
613
  position: fixed;
614
  top: 85px;
纪泽龙's avatar
纪泽龙 committed
615
  left: 0;
yaqizhang's avatar
yaqizhang committed
616
  background: #112238;
纪泽龙's avatar
纪泽龙 committed
617 618
}
.rightbar {
yaqizhang's avatar
yaqizhang committed
619
  width: 470px;
620 621
  height: calc(100vh - 85px);

纪泽龙's avatar
纪泽龙 committed
622
  position: fixed;
623 624
  top: 85px;

纪泽龙's avatar
纪泽龙 committed
625
  right: 0;
yaqizhang's avatar
yaqizhang committed
626
  background: #112238;
纪泽龙's avatar
纪泽龙 committed
627 628
}
.home-div {
yaqizhang's avatar
yaqizhang committed
629
  width: 50%;
纪泽龙's avatar
纪泽龙 committed
630 631 632
  height: 70px;
  position: fixed;
  bottom: 0;
yaqizhang's avatar
yaqizhang committed
633
  margin-left: 25%;
634 635 636 637 638 639 640
  // z-index: 1000;
  img {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: -1;
  }
纪泽龙's avatar
纪泽龙 committed
641 642 643
}
.listingsSty {
  /* height: 25px; */
644
  // position: fixed;
纪泽龙's avatar
纪泽龙 committed
645
  /* border: 1px solid #fff; */
646 647 648 649 650 651
  margin-left: 25%;
  width: 50%;
  display: flex;
  justify-content: space-between;
  padding-top: 25px;
  // font-family: 'arialbd';
纪泽龙's avatar
纪泽龙 committed
652 653
}
.firsty {
654 655
  // width: 15%;
  min-width: 80px;
纪泽龙's avatar
纪泽龙 committed
656 657 658 659 660
  height: 35px;
  text-align: center;
  line-height: 35px;
  /* border: 1px solid #fff; */
  color: #fff;
yaqizhang's avatar
yaqizhang committed
661
  font-size: 16px;
662 663
  // float: left;
  // margin-left: 8%;
纪泽龙's avatar
纪泽龙 committed
664
  cursor: pointer;
yaqizhang's avatar
yaqizhang committed
665
  // font-family: 'arialbd';
纪泽龙's avatar
纪泽龙 committed
666 667
}
.active {
yaqizhang's avatar
yaqizhang committed
668 669 670 671 672
  color: #2ee7e7;
  background: url(../../assets/mapinages/background.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  font-size: 18px;
纪泽龙's avatar
纪泽龙 committed
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707

  /*position:relative;*/
  /*&::after{
    width: 80px;
    height: 50px;
    z-index: -1;
    content: " ";
    position: absolute;
    top: -7px;
    left: 50%;
    margin-left:-40px;
    background: url(/img/bac1.0ec28f27.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    color: aquamarine;
  }*/
}
.weather-icon {
  float: left;
  width: 30px !important;
  height: 30px !important;
  margin-top: 10px !important;
  margin-left: 10px !important;
  padding-right: 5px;
}
.tttt {
  background-image: -webkit-linear-gradient(
    bottom,
    rgb(134, 185, 233),
    #ffffff
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
纪泽龙's avatar
纪泽龙 committed
708
.typelist-div {
709
  width: 465px;
yaqizhang's avatar
yaqizhang committed
710 711 712
  height: 50px;
  z-index: 9999;
  position: fixed;
yaqizhang's avatar
yaqizhang committed
713 714
  top: 0;
  margin-top: 120px;
715
  right: 470px;
716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737
  .list {
    z-index: 9999;
    float: left;
    margin-left: 15px;
    color: #fff;
    line-height: auto;
    text-align: center;
    background: linear-gradient(86deg, #112238 0%, #086187 62%, #112238 100%);
    box-shadow: inset 0px 1px 2px 1px #125c9b;
    font-size: 15px;
    padding: 5px 7px;
    cursor: pointer;
    line-height: 26px;
  }
  .list.active {
    background: linear-gradient(86deg, #112238 0%, #32a3d3 62%, #112238 100%);
    box-shadow: inset 0px 1px 2px 1px #125c9b;
    font-size: 14px;
  }
  .list img {
    width: 22px;
  }
yaqizhang's avatar
yaqizhang committed
738
}
739 740 741
.typelist-divZ {
  width: 400px;
  // height: 30px;
742
  z-index: 9998;
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768
  position: fixed;
  top: 85px;
  left: 50%;
  margin-left: -200px;
  .list {
    float: left;
    margin-left: 15px;
    color: #fff;
    line-height: auto;
    text-align: center;
    background: linear-gradient(86deg, #112238 0%, #086187 62%, #112238 100%);
    box-shadow: inset 0px 1px 2px 1px #125c9b;
    font-size: 10px;
    padding: 5px 7px;
    cursor: pointer;
    margin-bottom: 5px;
    // line-height: 30px;
  }
  .list.active {
    background: linear-gradient(86deg, #112238 0%, #32a3d3 62%, #112238 100%);
    box-shadow: inset 0px 1px 2px 1px #125c9b;
    font-size: 10px;
  }
  .list img {
    width: 15px;
  }
769
}
yaqizhang's avatar
yaqizhang committed
770
</style>