123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- <template>
- <div class="wind-site">
- <div class="page-common-body">
- <div class="page-common-body-router">
- <router-view />
- </div>
- <div class="page-common-body-menu">
- <div class="page-common-body-menu-box">
- <div class="page-common-body-menu-border left top"></div>
- <div class="page-common-body-menu-border left bottom"></div>
- <div class="page-common-body-menu-border right top"></div>
- <div class="page-common-body-menu-border right bottom"></div>
- <router-link
- v-for="(menuData, index) of menuDatas"
- :key="index"
- :to="menuData.path"
- >
- <div
- class="page-common-body-menu-item"
- @click="clickMenu(index)"
- :class="{ active: activeIndex == index }"
- >
- <span
- class="svg-icon"
- :class="
- activeIndex == index ? 'svg-icon-yellow' : 'svg-icon-green'
- "
- >
- <SvgIcon :svgid="menuData.icon"></SvgIcon>
- </span>
- </div>
- </router-link>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import SvgIcon from "@com/coms/icon/svg-icon.vue";
- export default {
- // 名称
- name: "WindSite",
- // 使用组件
- components: {
- SvgIcon,
- },
- // 数据
- data() {
- return {
- activeIndex: 0,
- menuDatas: [
- // {
- // icon: "svg-s场站监视",
- // path: "/monitor/windsite/home",
- // text: "场站监视",
- // },
- {
- icon: "svg-s指标列表",
- path: "/monitor/windsite/draughtfanlist",
- text: "指标列表",
- },
- // {
- // icon: "svg-agc",
- // path: "/monitor/windsite/matrix",
- // text: "指标列表",
- // },
- // {
- // icon: "svg-agc",
- // path: "/monitor/windsite/lightmatrix",
- // text: "指标列表",
- // },
- // {
- // icon: "svg-intranet-involvement",
- // path: "/monitor/windsite/box",
- // text: "指标列表",
- // },
- // {
- // icon: "svg-matrix",
- // path: "/monitor/windsite/info",
- // text: "指标列表",
- // },
- {
- icon: "svg-s测风塔",
- path: "/monitor/windsite/tower",
- text: "测风塔",
- },
- // {
- // icon: "svg-easy-compass",
- // path: "/monitor/windsite/Inverter-Info",
- // text: "测风塔",
- // },
- // {
- // icon: "svg-easy-compass",
- // path: "/monitor/windsite/map",
- // text: "测风塔",
- // },
- // {
- // icon: "svg-easy-compass",
- // path: "/monitor/windsite/map1",
- // text: "测风塔",
- // },
- {
- icon: "svg-matrix",
- path: "/monitor/windsite/matrix",
- text: "矩阵",
- },
- {
- icon: "svg-s总貌",
- path: "/monitor/windsite/generalappearance",
- text: "总貌图",
- },
- {
- icon: "svg-s升压站",
- path: "/monitor/windsite/boosterstation",
- text: "升压站",
- },
- // {
- // icon: "svg-s地图",
- // path: "/monitor/windsite/map",
- // text: "地图",
- // },
- ],
- };
- },
- // 函数
- methods: {
- clickMenu: function (index) {
- this.activeIndex = index;
- this.$store.dispatch("changeModuleName", this.menuDatas[index].text);
- },
- },
- created() {
- this.menuDatas.forEach((ele) => {
- ele.path = ele.path + "/" + this.$route.params.wpId;
- });
- },
- mounted() {},
- watch: {
- $route(res) {
- this.menuDatas.forEach((ele) => {
- let tempEle = ele.path.split("/");
- if (
- tempEle[tempEle.length - 1].indexOf("FDC") !== -1 ||
- tempEle[tempEle.length - 1].indexOf("GDC") !== -1
- ) {
- tempEle[tempEle.length - 1] = res.params.wpId;
- ele.path = tempEle.toString().replace(/,/g, "/");
- }
- });
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .wind-site {
- .page-common-body {
- display: flex;
- flex-direction: row;
- margin-top: 0.741vh;
- .page-common-body-router {
- overflow: auto;
- overflow-x: hidden;
- height: calc(100vh - 7.037vh);
- flex: 1 1 auto;
- }
- .page-common-body-menu {
- width: 7.407vh;
- padding: 0 1.481vh 1.481vh 1.481vh;
- .page-common-body-menu-box {
- border: 0.093vh solid @darkgray;
- background-color: fade(@darkgray, 30%);
- padding: 2.222vh 0.185vh;
- position: relative;
- .page-common-body-menu-border {
- position: absolute;
- width: 0.37vh;
- height: 0.37vh;
- background-color: @write;
- border-radius: 50%;
- &.left {
- left: -0.185vh;
- }
- &.right {
- right: -0.185vh;
- }
- &.top {
- top: -0.185vh;
- }
- &.bottom {
- bottom: -0.185vh;
- }
- }
- .page-common-body-menu-item {
- border: 0.093vh solid fade(@green, 40%);
- width: 3.889vh;
- height: 3.889vh;
- border-radius: 0.278vh;
- margin-top: 0.741vh;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- a {
- line-height: 0;
- }
- // &:first-child {
- // margin-top: 0;
- // }
- &.active {
- border-color: fade(@yellow, 40%);
- position: relative;
- &::after {
- content: "";
- width: calc(100% - 0.37vh);
- height: calc(100% - 0.37vh);
- position: absolute;
- border: 0.093vh solid @yellow;
- box-shadow: 0 0 0.37vh @yellow;
- top: 0.093vh;
- left: 0.093vh;
- }
- }
- }
- }
- }
- }
- }
- </style>
|