2019-05-12

<div class="wromdiv">

  <Layout style="height: 100%" class="main">

    <div class="headwrom">

<div class="head">

  <div class="head-right-icon">

    <i class="icon icon-news">

    <i class="icon icon-delet">

    <i class="icon icon-next">

          <div class="left-nav">

            <Menu active-key="1-2" theme="dark" :open-keys="['1']">

              <Submenu key="1" class="submenuclss">

                <template slot="title">

                  <i class="iconnav navicon-fx">


                 


                  <span class="span-fx">防汛总览

                <Menu-item key="1-1" @click.native="$router.push('/prevention')">巡视任务

                <Menu-item key="1-2" @click.native="$router.push('/problem')">发现问题

                <Menu-item key="1-3" @click.native="$router.push('/situation')">上报汛情

                <Menu-item key="1-4" @click.native="$router.push('/Overflow')">溢水警告

                <Menu-item key="1-5" @click.native="$router.push('/flood')">防汛报表

            <Menu active-key="1-2" theme="dark" width="auto" :open-keys="['1']">

              <Submenu key="2" class="submenuclss">

                <template slot="title">

                  <i class="iconnav navicon-rw">


                 


              <span class="span-zy">

                任务

                <Menu-item key="2-1">1

                <Menu-item key="2-2">2

            <Menu active-key="1-2" theme="dark" width="auto" :open-keys="['1']">

              <Submenu key="3" class="submenuclss">

                <template slot="title">


                  <i class="iconnav navicon-zy">



                <span class="span-zy">资源

                <Menu-item key="3-1">1

                <Menu-item key="3-2">2



 


 


 

            <Menu active-key="1-2" theme="dark" width="auto" :open-keys="['1']">

              <Submenu key="4" class="submenuclss" >

                <template slot="title">


                  <i class="iconone icon-qx">



                  <span class="span-zy" @click.native="$router.push('/Cloudy')">多云转晴


                  <span class="span-zy">1-11°C

























            <Sider hide-trigger collapsible :collapsed-width="64" v-model="collapsed" class="left-sider" :style="{overflow: 'hidden'}">


















      <Content class="main-content-con">

        <Layout class="main-layout-con">




          <Content class="content-wrapper">

            <keep-alive :include="cacheList">

            <ABackTop :height="100" :bottom="80" :right="50" container=".content-wrapper">

import SideMenufrom './components/side-menu'

import HeaderBarfrom './components/header-bar'

import TagsNavfrom './components/tags-nav'

import Userfrom './components/user'

import ABackTopfrom './components/a-back-top'

import Fullscreenfrom './components/fullscreen'

import Languagefrom './components/language'

import ErrorStorefrom './components/error-store'

import { mapMutations, mapActions, mapGetters }from 'vuex'

import { getNewTagList, routeEqual }from '@/libs/util'

import routersfrom '@/router/routers'

// import minLogo from '@/assets/images/logo-min.jpg'

// import maxLogo from '@/assets/images/logo.jpg'

import './main.less'

export default {

name:'Main',

  components: {

// 左侧导航组件

// SideMenu,

// 头部组件

// HeaderBar,

// Language,

// tab导航

// TagsNav,

    Fullscreen,

    ErrorStore,

// 登录组件

//    User,

    ABackTop

},

  data () {

return {

collapsed:false,

      // minLogo,

// maxLogo,

      isFullscreen:false

    }

},

  computed: {

...mapGetters([

'errorCount'

    ]),

    tagNavList () {

return this.$store.state.app.tagNavList

    },

    tagRouter () {

return this.$store.state.app.tagRouter

    },

    userAvatar () {

return this.$store.state.user.avatarImgPath

    },

    cacheList () {

const list = ['ParentView', ...this.tagNavList.length ?this.tagNavList.filter(item => !(item.meta && item.meta.notCache)).map(item => item.name) : []]

return list

},

    menuList () {

return this.$store.getters.menuList

    },

    local () {

return this.$store.state.app.local

    },

    hasReadErrorPage () {

return this.$store.state.app.hasReadErrorPage

    },

    unreadCount () {

return this.$store.state.user.unreadCount

    }

},

  methods: {

info () {

this.$Message.info('这是一条普通的提醒');

    },

    ...mapMutations([

'setBreadCrumb',

      'setTagNavList',

      'addTag',

      'setLocal',

      'setHomeRoute',

      'closeTag'

    ]),

    ...mapActions([

'handleLogin',

      'getUnreadMessageCount'

    ]),

    turnToPage (route) {

let { name, params, query } = {}

if (typeof route ==='string') name = route

else {

name = route.name

        params = route.params

        query = route.query

      }

if (name.indexOf('isTurnByHref_') > -1) {

window.open(name.split('_')[1])

return

      }

this.$router.push({

name,

        params,

        query

})

},

    handleCollapsedChange (state) {

this.collapsed = state

},

    handleCloseTag (res, type, route) {

if (type !=='others') {

if (type ==='all') {

this.turnToPage(this.$config.homeName)

}else {

if (routeEqual(this.$route, route)) {

this.closeTag(route)

}

}

}

this.setTagNavList(res)

},

    handleClick (item) {

this.turnToPage(item)

}

},

  watch: {

'$route' (newRoute) {

const { name, query, params, meta } = newRoute

this.addTag({

route: { name, query, params, meta },

        type:'push'

      })

this.setBreadCrumb(newRoute)

this.setTagNavList(getNewTagList(this.tagNavList, newRoute))

this.$refs.sideMenu.updateOpenName(newRoute.name)

}

},

  mounted () {

/**

    * @description 初始化设置面包屑导航和标签导航

*/

    this.setTagNavList()

this.setHomeRoute(routers)

const { name, params, query, meta } =this.$route

    this.addTag({

route: { name, params, query, meta }

})

this.setBreadCrumb(this.$route)

// 设置初始语言

    this.setLocal(this.$i18n.locale)

// 如果当前打开页面不在标签栏中,跳到homeName页

    if (!this.tagNavList.find(item => item.name ===this.$route.name)) {

this.$router.push({

name:this.$config.homeName

      })

}

// 获取未读消息条数

    this.getUnreadMessageCount()

}

}

<style scoped>

  .submenuclss{

position:relative;

    left:1px;

  }

/*.ivu-menu-submenu-title:hover{*/

/*background: white;*/

/*}*/

  .ivu-icon{

opacity:0;

  }

.foot-span{

position:relative;

    top:350px;

    left:30px;

  }

.submenuclss{

position:relative;

  left:10px;

}

/*@import '../../css/index.css';*/

/*左侧导航*/

  .wromdiv{

background:url(../../image/bg-box_03.png)no-repeat center;

  }

.left-nav{

height:2000px;

    background:url(../../image/bg-box_03.png)no-repeat center;

  }

dd{

color:white;

  text-align:center;

}

dl{

margin:50px;

  }

.iconnav{

display:inline-block;

    vertical-align:middle;

  }

.navicon-fx{

background:url(../../image/iconbig-overview.png)no-repeat;

width:82px;

    height:82px;

  }

.navicon-rw{

background:url(../../image/iconbig-task.png)no-repeat;

    width:80px;

    height:80px;

  }

.navicon-zy{

background:url(../../image/iconbig-resource.png)no-repeat;

    width:79px;

    height:78px;

  }

.span-fx{

font-size:20px;

  }

.span-zy{

font-size:20px;

  position:relative;

  left:10px;

}

/*头部*/

  .head-right-icon{

text-align:right;

    height:48px;

    line-height:48px;

  }

.iconone{

display:inline-block;

    vertical-align:middle;

  }

.icon-qx{

background:url(../../image/weather-icon1.png)no-repeat;

    width:80px;

    height:95px;

  }

.icon{

display:inline-block;

    vertical-align:middle;

    margin-right:40px;

  }

.icon-news{

background:url(../../image/head-icon1.png)no-repeat;

    width:37px;

    height:32px;

  }

.icon-delet{

background:url(../../image/head-icon2.png)no-repeat;

    width:37px;

    height:32px;

    margin-top:10px;

  }

.icon-next{

background:url(../../image/head-icon3.png)no-repeat;

    width:37px;

    height:32px;

    margin-top:16px;

  }

.headwrom{

height:94px;

    background:url(../../image/bg-box_03.png)no-repeat center;

    background-size:auto;

    width:100%;

    /*position: absolute;*/

/*top: 10px;*/

  }

/*@import '../../css/index.css';*/

  .head{

height:94px;

    background:url(../../image/head_01.png)no-repeat center;

    background-size:auto;

    width:100%;

    /*position: absolute;*/

/*top: 10px;*/

  }

</style>

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 220,492评论 6 513
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 94,048评论 3 396
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 166,927评论 0 358
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 59,293评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 68,309评论 6 397
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 52,024评论 1 308
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,638评论 3 420
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,546评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 46,073评论 1 319
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 38,188评论 3 340
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,321评论 1 352
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,998评论 5 347
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,678评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,186评论 0 23
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,303评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,663评论 3 375
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,330评论 2 358

推荐阅读更多精彩内容

  • # AI项目展示页接口文档 *** ###1.项目页banner图接口 1.接口地址:http://www.ais...
    codefood阅读 205评论 0 0
  • Vue面试题整理 1、vue的优点是什么? 低耦合。视图(View)可以独立于Model变化和修改,一个ViewM...
    问_道阅读 131评论 0 0
  • “as delectable as peach and plum and as cold as frost and...
    泥巴叔叔阅读 187评论 0 1
  • Correctness AdapterViewChildren Summary: AdapterViews can...
    MarcusMa阅读 8,870评论 0 6
  • 我喜欢这样 坐在草地上 冬儿坐在背后 背后是阳光 我有一个问题想问你 他轻轻地问 问吧 我轻轻地说
    老实道士阅读 147评论 0 0