<template>
  <div class="w-full h-full charginfo-index">
    <div class="charglink" @click="toSf">养护工作台</div>
    <!-- <div class="chargtoptext">全部高速公路</div> -->
    <div class="chargselect">
      <way-filter />
    </div>
    <div class="curbuss-left">
      <div class="curbuss-left-t">
        <main-data></main-data>
      </div>
      <div class="curbuss-left-c">
        <patrInspection></patrInspection>
      </div>
      <div class="curbuss-left-b">
        <disease></disease>
      </div>
    </div>
    <div class="curbuss-right">
      <div class="curbuss-right-t">
        <specdaily-curing></specdaily-curing>
      </div>
      <div class="curbuss-right-b">
        <work-task></work-task>
      </div>
    </div>
  </div>
</template>

<script>
// 养护业务主数据
import mainData from "./component/mainData.vue";
// 巡查巡检
import patrInspection from "./component/patrInspection.vue";
// 病害
import disease from "./component/disease.vue";
// 专项/日常养护
import specdailyCuring from "./component/specdailyCuring.vue";
// 养护工单和任务
import workTask from "./component/workTask.vue";
// 组织机构下拉
import WayFilter from "@/components/wayFilter/index.vue";
import { getLinke } from '@/api/chargeInfo.js';
import { generateKey } from "@/api/operation";
export default {
  components: {
    mainData,
    patrInspection,
    disease,
    specdailyCuring,
    workTask,
    WayFilter
  },
  data() {
    return {
      link: ''
    }
  },
  async mounted() {
    const data = await getLinke()
    const arr = data.msgContent.filter(item => item.sysCode == 'HY')
    this.link = arr[0].url
  },
  methods: {
    toSf() {
      generateKey().then((res) => {
        window.open(`http://183.64.175.153:8888/fvue/login?tokenKey=${res.data}`);
      });
    }
  }
}
</script>

<style lang="scss" scoped>
@import "~/styles/viewport-convert.scss";
div {
  box-sizing: border-box;
}
.charginfo-index {
  background: url("@/assets/images/ChargeInfo/charginfobg.png");
  background-size: 100% 100%;
  padding-top: 55px;
  padding-bottom: 40px;
  display: flex;
}
.charglink {
  position: absolute;
  top: 10px;
  right: 285px;
  width: 96px;
  height: 34px;
  background: url("@/assets/images/ChargeInfo/sfgzttz.png");
  background-size: 100% 100%;
  font-size: 13px;
  text-align: center;
  line-height: 34px;
  z-index: 999;
  cursor: pointer;
}
.chargtoptext {
  position: absolute;
  top: 15px;
  right: 380px;
  font-size: 16px;
  font-family: "TRENDS";
}
.chargselect {
  position: absolute;
  top: 2px;
  left: 10px;
  z-index: 999;
}
.curbuss-left {
  width: vw(1061);
  height: 100%;
}
.curbuss-right {
  width: vw(850);
  height: 100%;
}
.curbuss-left-t {
  width: 100%;
  height: vh(170);
}
.curbuss-left-c {
  width: 100%;
  height: vh(400);
}
.curbuss-left-b {
  width: 100%;
  height: vh(390);
}
.curbuss-right-t {
  width: 100%;
  height: vh(570);
}
.curbuss-right-b {
  width: 100%;
  height: vh(400);
}
</style>
