Browse Source

基础信息配置中对于人员权限配置和工作流程配置页面进行地址跳转;搭建移动端所需框架及其UI组件库,将移动端代码适配PC端代码适配(进行中);

SunZehao 2 years ago
parent
commit
c1ae3ae8a6
5 changed files with 553 additions and 505 deletions
  1. 23 3
      package-lock.json
  2. 1 0
      package.json
  3. 3 1
      src/main.js
  4. 11 3
      src/views/Login.vue
  5. 515 498
      src/views/homePage.vue

+ 23 - 3
package-lock.json

@@ -1776,6 +1776,16 @@
         "@types/node": "*"
       }
     },
+    "@vant/popperjs": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.3.0.tgz",
+      "integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
+    },
+    "@vant/use": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/@vant/use/-/use-1.5.1.tgz",
+      "integrity": "sha512-Zxd7lDz/LliVYEQi3PR9a8CQa/kGCVzF0u9hqDMaTlgXlbG0wHMFPllrcG0ThR6bfs8xrYVuSFM9pJn6HSoUGQ=="
+    },
     "@vue/babel-helper-vue-jsx-merge-props": {
       "version": "1.2.1",
       "resolved": "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
@@ -4978,7 +4988,7 @@
     },
     "estree-walker": {
       "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+      "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
       "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
     },
     "esutils": {
@@ -6788,7 +6798,7 @@
     },
     "magic-string": {
       "version": "0.25.9",
-      "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
+      "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz",
       "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
       "requires": {
         "sourcemap-codec": "^1.4.8"
@@ -9204,7 +9214,7 @@
     },
     "sourcemap-codec": {
       "version": "1.4.8",
-      "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
+      "resolved": "https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
       "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA=="
     },
     "spdx-correct": {
@@ -9917,6 +9927,16 @@
         "spdx-expression-parse": "^3.0.0"
       }
     },
+    "vant": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmjs.org/vant/-/vant-4.5.0.tgz",
+      "integrity": "sha512-MK7TlTvp+n0HRFAi7SoRZwTt1pquJ2aUa8nQ899Mf+x9gi8OLYrMFqEQX+l1e4Cl4RO0vD1Q5w9rs4+Wehesog==",
+      "requires": {
+        "@vant/popperjs": "^1.3.0",
+        "@vant/use": "^1.5.1",
+        "@vue/shared": "^3.0.0"
+      }
+    },
     "vary": {
       "version": "1.1.2",
       "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz",

+ 1 - 0
package.json

@@ -22,6 +22,7 @@
     "jszip": "^3.10.1",
     "monaco-editor": "^0.27.0",
     "monaco-editor-webpack-plugin": "^4.2.0",
+    "vant": "^4.5.0",
     "vue": "^3.2.45",
     "vue-router": "^4.1.5",
     "vuedraggable": "^4.1.0",

+ 3 - 1
src/main.js

@@ -3,8 +3,10 @@ import App from './App.vue'
 // import httpss from './api/http.js'
 import router from './router'
 import ElementPlus from 'element-plus'
+import Vant from 'vant'
 import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
 import 'element-plus/dist/index.css'
+import 'vant/lib/index.css';
 import './assets/css/icon.css'
 import './assets/font/iconfont.css'
 import './api/permission' //路由守卫
@@ -21,4 +23,4 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 app.config.globalProperties.$utils = utils;
 app.config.globalProperties.$echarts = echarts;
 app.config.globalProperties.$axios = axios;
-app.use(router).use(store).use(ElementPlus, { size: 'small',locale: zhCn }).mount('#app')
+app.use(router).use(store).use(Vant).use(ElementPlus, { size: 'small',locale: zhCn }).mount('#app')

+ 11 - 3
src/views/Login.vue

@@ -34,12 +34,18 @@
                 </div> -->
     </div>
     <div v-else>
-        <div>cesMobile</div>
+        <div>
+            <van-tabbar v-model="vantActive">
+                <van-tabbar-item icon="home-o">标签</van-tabbar-item>
+                <van-tabbar-item icon="search">标签</van-tabbar-item>
+                <van-tabbar-item icon="friends-o">标签</van-tabbar-item>
+                <van-tabbar-item icon="setting-o">标签</van-tabbar-item>
+            </van-tabbar>
+        </div>
     </div>
 </template>
 
 <script>
-import { setToken } from '@/api/auth'
 import { ElMessage } from "element-plus";
 import { loginApi, apiGetCodeByToken, apiGetUserMsg, apiGetPrivilegesOfCurrentUserAll } from '../api/api'
 export default {
@@ -53,7 +59,9 @@ export default {
             loading:false,
             loginText: '',
             loginLoading: false,
-            isMobile: window.localStorage.getItem('isMobile')
+            isMobile: window.localStorage.getItem('isMobile'),
+
+            vantActive: 0
         }
     },
     created() {

+ 515 - 498
src/views/homePage.vue

@@ -2,15 +2,8 @@
     <div class="homePage">
         <div class="frameMain" :style="allHeight">
             <div class="menuList">
-                <el-menu
-                :default-active="$route.path"
-                router
-                :unique-opened="true"
-                :default-openeds="openeds"
-                @select="handleNodeClick"
-                text-color="#fff"
-                background-color="#184FB4"
-                active-text-color="#fff">
+                <el-menu :default-active="$route.path" router :unique-opened="true" :default-openeds="openeds"
+                    @select="handleNodeClick" text-color="#fff" background-color="#184FB4" active-text-color="#fff">
                     <!-- 引入组件 -->
                     <menu-tree :menuData="forecastDatas"></menu-tree>
                 </el-menu>
@@ -18,23 +11,15 @@
             <div class="homeMain" :style="mainHeight">
                 <div class="homeMain_tag">
                     <div style="width: 90%;overflow: hidden;">
-                        <el-tag
-                            v-for="tag in routeTags"
-                            :key="tag.index"
-                            closable
-                            size="large"
-                            class="tagArr"
-                            effect="dark"
-                            :type="tag.index === $route.path ? '': 'info'"
-                            @close="handleClose(tag)"
-                            @click="handleShowPage(tag)"
-                        >
+                        <el-tag v-for="tag in routeTags" :key="tag.index" closable size="large" class="tagArr"
+                            effect="dark" :type="tag.index === $route.path ? '': 'info'" @close="handleClose(tag)"
+                            @click="handleShowPage(tag)">
                             <span>{{ tag.name }}</span>
                         </el-tag>
                     </div>
                     <div class="settingMsg">
                         <span>{{userName}}</span>
-                        <img :src="closeBtn" @click="closeSys" >
+                        <img :src="closeBtn" @click="closeSys">
                     </div>
                 </div>
                 <div class="mainMessage" :style="$route.path === '/home' ? '': 'padding: 0 10px;'">
@@ -46,528 +31,560 @@
 </template>
 
 <script>
-import MenuTree from '../components/menuTreeconfig.vue'
-import homeImg from '../assets/menuImg/home.png'
-import taskImg from '../assets/menuImg/task.png'
-import yewuImg from '../assets/menuImg/yewu.png'
-import tixiImg from '../assets/menuImg/tixi.png'
-import zhishikuImg from '../assets/menuImg/zhishiku.png'
-import quanxianImg from '../assets/menuImg/quanxian.png'
-import tonggaoImg from '../assets/menuImg/tonggao.png'
-import benbuImg from '../assets/menuImg/benbu.png'
-import renyuanImg from '../assets/menuImg/renyuan.png'
-import closeBtn from '../assets/getwayImg/closeBtn.png'
+    import MenuTree from '../components/menuTreeconfig.vue'
+    import homeImg from '../assets/menuImg/home.png'
+    import taskImg from '../assets/menuImg/task.png'
+    import yewuImg from '../assets/menuImg/yewu.png'
+    import tixiImg from '../assets/menuImg/tixi.png'
+    import zhishikuImg from '../assets/menuImg/zhishiku.png'
+    import quanxianImg from '../assets/menuImg/quanxian.png'
+    import tonggaoImg from '../assets/menuImg/tonggao.png'
+    import benbuImg from '../assets/menuImg/benbu.png'
+    import renyuanImg from '../assets/menuImg/renyuan.png'
+    import closeBtn from '../assets/getwayImg/closeBtn.png'
 
-import { getToken, removeToken } from '../api/auth'
-import {apiPostremoveByToken, apiGetMenuData} from '../api/api'
-export default {
-    components: {MenuTree},
-    // inject: ['reload'],
-    data() {
-        return {
-            forecastDatas: [],
-            expendData: ['0'],
-            openeds:[],
-            routeTags: [],
-            defaultProps: {
-                children: 'children',
-                label: 'label',
-            },
-            closeBtn: closeBtn,
-            userName: ''
-        }
-    },
-    created(){
-        this.getMenuData()
-        // this.forecastDatas = [
-        //     {
-        //         index: '/home',
-        //         name: '考评首页',
-        //         img: homeImg
-        //     },
-        //     {
-        //         index: '/taskCenter',
-        //         name: '任务中心',
-        //         img: taskImg
-        //     },
-        //     {
-        //         index: '/notification',
-        //         name: '通告管理',
-        //         img: tonggaoImg
-        //     },
-        //     {
-        //         index: '1',
-        //         name: '考评体系配置',
-        //         img: tixiImg,
-        //         children: [
-        //             {
-        //                 index: '/evaluationSystem/evaluationIndex',
-        //                 name: '考评指标管理',
-        //             },
-        //             {
-        //                 index: '/evaluationSystem/evaluationRules',
-        //                 name: '考评规则配置',
-        //             },
-        //             {
-        //                 index: '/evaluationSystem/company',
-        //                 name: '单位权重配置',
-        //             },
-        //             {
-        //                 index: '/baseInfomation/moreBrand',
-        //                 name: '单位营业收入',
-        //             },
-        //             {
-        //                 index: '/evaluationSystem/achievementK',
-        //                 name: '业绩考核系数配置',
-        //             },
-        //             {
-        //                 index: '/evaluationSystem/partyBuildingK',
-        //                 name: '党建考核系数配置',
-        //             },
-        //             {
-        //                 index: '/evaluationSystem/department',
-        //                 name: '部门考评配置',
-        //             },
-        //             {
-        //                 index: '/evaluationSystem/personnel',
-        //                 name: '人员考评配置',
-        //             },
-        //         ]
-        //     },
-        //     {
-        //         index: '2',
-        //         name: '单位考评业务',
-        //         img: yewuImg,
-        //         children: [
-        //             {
-        //                 index: '/assessment/evaluationStart',
-        //                 name: '单位考评目标启动',
-        //             },
-        //             {
-        //                 index: '/assessment/evaluationAmendment',
-        //                 name: '单位考评目标修订',
-        //             },
-        //             {
-        //                 index: '/assessment/evaluationMonth',
-        //                 name: '单位月度考评'
-        //             },
-        //             {
-        //                 index: '/assessment/evaluationQuarter',
-        //                 name: '单位季度考评'
-        //             },
-        //             {
-        //                 index: '/assessment/evaluationYear',
-        //                 name: '单位年度考评'
-        //             },
-        //             {
-        //                 index: '/assessment/evaluationBenchmarkingIndic',
-        //                 name: '考评对标分析'
-        //             },
-        //             {
-        //                 index: '/assessment/evaluationWarning',
-        //                 name: '考评预警'
-        //             },
-        //             {
-        //                 index: '',
-        //                 name: '单位考评评级'
-        //             },
-        //             {
-        //                 index: '',
-        //                 name: '考评监督管理'
-        //             },
-        //             {
-        //                 index: '/assessment/evaluationReport',
-        //                 name: '考评报告'
-        //             },
-        //             {
-        //                 index: '',
-        //                 name: '单位考核结果应用'
-        //             }
-        //         ]
-        //     },
-        //     {
-        //         index: '3',
-        //         name: '本部考评业务',
-        //         img: benbuImg,
-        //         children: [
-        //             {
-        //                 index: '/assessment/evaluationDeptStart',
-        //                 name: '业绩指标计划',
-        //             },
-        //             {
-        //                 index: '/assessment/evaluationDeptBusiness',
-        //                 name: '业绩指标考评'
-        //             },
-        //             {
-        //                 index: '/assessment/evaluationDeptRating',
-        //                 name: '部门考评评级'
-        //             },
-        //             {
-        //                 index: '/assessment/assessmentApplication',
-        //                 name: '绩效结果考核申报'
-        //             }
-        //         ]
-        //     },
-        //     {
-        //         index: '5',
-        //         name: '基础信息配置',
-        //         img: quanxianImg,
-        //         children: [
-        //             {
-        //                 index: '',
-        //                 href: '',
-        //                 name: '人员权限配置',
-        //             },
-        //             {
-        //                 index: '',
-        //                 name: '工作流程配置',
-        //             }
-        //         ]
-        //     },
-        //     {
-        //         index: '6',
-        //         name: '对标考评知识库',
-        //         img: zhishikuImg,
-        //         children: [
-        //             {
-        //                 index: '/evaluationknowledge/scoringRules',
-        //                 name: '考评得分规则',
-        //             },
-        //             {
-        //                 name: '考评评级规则',
-        //             },
-        //             {
-        //                 index: '/evaluationknowledge/earlyWarningRule',
-        //                 name: '考评预警规则',
-        //             }
-        //         ]
-        //     },
-        // ]
-        if (window.sessionStorage.getItem('routeTags')) {
-            this.routeTags = JSON.parse(window.sessionStorage.getItem('routeTags'))
-            if (this.$route?.path === '/') {
-                this.$router.push({ path: this.routeTags[0].index})
-            }
-        } else {
-            this.routeTags = [
-                {
-                    index: '/home',
-                    name: '考评首页'
-                }
-            ]
-            this.$router.push({ path: this.routeTags[0].index})
-            window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
-        }
-        if (window.sessionStorage.getItem('user')) {
-            let obj = JSON.parse(window.sessionStorage.getItem('user'))
-            this.userName = obj.name
-        }
-    },
-    mounted() {
-        
-    },
-    computed:{
-        mainHeight() {
-            return {
-                // 'height': document.documentElement.clientHeight-50 + 'px'
-                'height': '100vh'
-            }
+    import {
+        getToken,
+        removeToken
+    } from '../api/auth'
+    import {
+        apiPostremoveByToken,
+        apiGetMenuData
+    } from '../api/api'
+    export default {
+        components: {
+            MenuTree
         },
-        allHeight() {
+        // inject: ['reload'],
+        data() {
             return {
-                'width': '100%',
-                // 'height': document.documentElement.clientHeight-40 + 'px'
-                'height': '100vh'
+                forecastDatas: [],
+                expendData: ['0'],
+                openeds: [],
+                routeTags: [],
+                defaultProps: {
+                    children: 'children',
+                    label: 'label',
+                },
+                closeBtn: closeBtn,
+                userName: ''
             }
         },
-        viewHeight() {
-            return {
-                'width': '100%',
-                // 'height': document.documentElement.clientHeight-40 + 'px'
-                'height': '91vh'
-            }
-        }
-    },
-    methods:{
-        // 获取菜单数据
-        getMenuData() {
-            let that = this
-            apiGetMenuData().then(datas =>{
-                if (datas && datas.data) {
-                    let arr = []
-                    for(let i =0; i<datas.data.length; i++) {
-                        let item = datas.data[i]
-                        let obj = {
-                            index: item.href,
-                            name: item.name
+        created() {
+            // this.getMenuData()
+            this.forecastDatas = [{
+                    index: '/home',
+                    name: '考评首页',
+                    img: homeImg
+                },
+                {
+                    index: '/taskCenter',
+                    name: '任务中心',
+                    img: taskImg
+                },
+                {
+                    index: '/notification',
+                    name: '通告管理',
+                    img: tonggaoImg
+                },
+                {
+                    index: '1',
+                    name: '考评体系配置',
+                    img: tixiImg,
+                    children: [{
+                            index: '/evaluationSystem/evaluationIndex',
+                            name: '考评指标管理',
+                        },
+                        {
+                            index: '/evaluationSystem/evaluationRules',
+                            name: '考评规则配置',
+                        },
+                        {
+                            index: '/evaluationSystem/company',
+                            name: '单位权重配置',
+                        },
+                        {
+                            index: '/baseInfomation/moreBrand',
+                            name: '单位营业收入',
+                        },
+                        {
+                            index: '/evaluationSystem/achievementK',
+                            name: '业绩考核系数配置',
+                        },
+                        {
+                            index: '/evaluationSystem/partyBuildingK',
+                            name: '党建考核系数配置',
+                        },
+                        {
+                            index: '/evaluationSystem/department',
+                            name: '部门考评配置',
+                        },
+                        {
+                            index: '/evaluationSystem/personnel',
+                            name: '人员考评配置',
+                        },
+                    ]
+                },
+                {
+                    index: '2',
+                    name: '单位考评业务',
+                    img: yewuImg,
+                    children: [{
+                            index: '/assessment/evaluationStart',
+                            name: '单位考评目标启动',
+                        },
+                        {
+                            index: '/assessment/evaluationAmendment',
+                            name: '单位考评目标修订',
+                        },
+                        {
+                            index: '/assessment/evaluationMonth',
+                            name: '单位月度考评'
+                        },
+                        {
+                            index: '/assessment/evaluationQuarter',
+                            name: '单位季度考评'
+                        },
+                        {
+                            index: '/assessment/evaluationYear',
+                            name: '单位年度考评'
+                        },
+                        {
+                            index: '/assessment/evaluationBenchmarkingIndic',
+                            name: '考评对标分析'
+                        },
+                        {
+                            index: '/assessment/evaluationWarning',
+                            name: '考评预警'
+                        },
+                        {
+                            index: '',
+                            name: '单位考评评级'
+                        },
+                        {
+                            index: '/assessment/evaluationReport',
+                            name: '考评报告'
+                        },
+                    ]
+                },
+                {
+                    index: '3',
+                    name: '本部考评业务',
+                    img: benbuImg,
+                    children: [{
+                            index: '/assessment/evaluationDeptStart',
+                            name: '业绩指标计划',
+                        },
+                        {
+                            index: '/assessment/evaluationDeptBusiness',
+                            name: '业绩指标考评'
+                        },
+                        {
+                            index: '/assessment/evaluationDeptRating',
+                            name: '部门考评评级'
+                        },
+                        {
+                            index: '/assessment/assessmentApplication',
+                            name: '绩效结果考核申报'
                         }
-                        if (item.name === '考评首页') {
-                            obj.img = homeImg
-                        } else if(item.name === '任务中心') {
-                            obj.img = taskImg
-                        } else if(item.name === '通告管理') {
-                            obj.img = tonggaoImg
-                        } else if(item.name === '考评体系配置') {
-                            obj.img = tixiImg
-                            obj.children = that.changeMenuData(item.children)
-                        } else if(item.name === '单位考评业务') {
-                            obj.img = yewuImg
-                            obj.children = that.changeMenuData(item.children)
-                        } else if(item.name === '本部考评业务') {
-                            obj.img = benbuImg
-                            obj.children = that.changeMenuData(item.children)
-                        } else if(item.name === '本部人员考评') {
-                            obj.img = renyuanImg
-                            obj.children = that.changeMenuData(item.children)
-                        } else if(item.name === '基础信息配置') {
-                            obj.img = quanxianImg
-                            obj.children = that.changeMenuData(item.children)
-                        } else if(item.name === '对标考评知识库') {
-                            obj.img = zhishikuImg
-                            obj.children = that.changeMenuData(item.children)
+                    ]
+                },
+                {
+                    index: '5',
+                    name: '基础信息配置',
+                    img: quanxianImg,
+                    children: [{
+                            index: '',
+                            href: '',
+                            name: '人员权限配置',
+                        },
+                        {
+                            index: '',
+                            name: '工作流程配置',
                         }
-                        arr.push(obj)
-                    }
-                    that.forecastDatas = arr
-                }
-            })
-        },
-        changeMenuData(data) {
-            let childArr = []
-            data.forEach(item =>{
-                let obj = {
-                    index: item.href,
-                    name: item.name
+                    ]
+                },
+                {
+                    index: '6',
+                    name: '对标考评知识库',
+                    img: zhishikuImg,
+                    children: [{
+                            index: '/evaluationknowledge/scoringRules',
+                            name: '考评得分规则',
+                        },
+                        {
+                            name: '考评评级规则',
+                        },
+                        {
+                            index: '/evaluationknowledge/earlyWarningRule',
+                            name: '考评预警规则',
+                        }
+                    ]
+                },
+            ]
+            if (window.sessionStorage.getItem('routeTags')) {
+                this.routeTags = JSON.parse(window.sessionStorage.getItem('routeTags'))
+                if (this.$route?.path === '/') {
+                    this.$router.push({
+                        path: this.routeTags[0].index
+                    })
                 }
-                childArr.push(obj)
-            })
-            return childArr
-        },
-        getBac(val) {
-            let strWea = ''
-            debugger
-            if (val) {
-                strWea = 'changeBacksty'
             } else {
-                strWea = 'defaultBacksty'
+                this.routeTags = [{
+                    index: '/home',
+                    name: '考评首页'
+                }]
+                this.$router.push({
+                    path: this.routeTags[0].index
+                })
+                window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
             }
-            return strWea
-        },
-        changeRoute(item) {
-            if (item.index) {
-                this.$router.push({ path: item.index})
+            if (window.sessionStorage.getItem('user')) {
+                let obj = JSON.parse(window.sessionStorage.getItem('user'))
+                this.userName = obj.name
             }
         },
-        closeSys() {
-            let that = this
-            apiPostremoveByToken(window.localStorage.getItem('token')).then(datas =>{
-                if (datas.code === 200) {
-                    // removeToken('token')
-                    // removeToken('code')
-                    // removeToken('purview')
-                    window.localStorage.removeItem('code')
-                    window.localStorage.removeItem('purview')
-                    window.localStorage.removeItem('token')
-                    window.sessionStorage.clear()
-                    that.$router.push({ path: "/login"})
+        mounted() {
+
+        },
+        computed: {
+            mainHeight() {
+                return {
+                    // 'height': document.documentElement.clientHeight-50 + 'px'
+                    'height': '100vh'
                 }
-            })
+            },
+            allHeight() {
+                return {
+                    'width': '100%',
+                    // 'height': document.documentElement.clientHeight-40 + 'px'
+                    'height': '100vh'
+                }
+            },
+            viewHeight() {
+                return {
+                    'width': '100%',
+                    // 'height': document.documentElement.clientHeight-40 + 'px'
+                    'height': '91vh'
+                }
+            }
         },
-        handleNodeClick(index, indexPath) {
-            if (indexPath) {
-                this.forecastDatas.forEach(it =>{
-                    if (it.index !== '') {
-                        if (it.index === indexPath[0]) {
-                            if (!it.children) {
-                                let showM = 0
-                                this.routeTags.forEach(item =>{
-                                    if (item.name === it.name) {
-                                        showM++
-                                    }
-                                })
-                                if (showM === 0) {
-                                    let obj = {
-                                        index: it.index,
-                                        name: it.name
+        methods: {
+            // 获取菜单数据
+            getMenuData() {
+                let that = this
+                apiGetMenuData().then(datas => {
+                    if (datas && datas.data) {
+                        let arr = []
+                        for (let i = 0; i < datas.data.length; i++) {
+                            let item = datas.data[i]
+                            let obj = {
+                                index: item.href,
+                                name: item.name
+                            }
+                            if (item.name === '考评首页') {
+                                obj.img = homeImg
+                            } else if (item.name === '任务中心') {
+                                obj.img = taskImg
+                            } else if (item.name === '通告管理') {
+                                obj.img = tonggaoImg
+                            } else if (item.name === '考评体系配置') {
+                                obj.img = tixiImg
+                                obj.children = that.changeMenuData(item.children)
+                            } else if (item.name === '单位考评业务') {
+                                obj.img = yewuImg
+                                obj.children = that.changeMenuData(item.children)
+                            } else if (item.name === '本部考评业务') {
+                                obj.img = benbuImg
+                                obj.children = that.changeMenuData(item.children)
+                            } else if (item.name === '本部人员考评') {
+                                obj.img = renyuanImg
+                                obj.children = that.changeMenuData(item.children)
+                            } else if (item.name === '基础信息配置') {
+                                obj.img = quanxianImg
+                                obj.children = that.changeMenuData(item.children)
+                            } else if (item.name === '对标考评知识库') {
+                                obj.img = zhishikuImg
+                                obj.children = that.changeMenuData(item.children)
+                            }
+                            arr.push(obj)
+                        }
+                        that.forecastDatas = arr
+                    }
+                })
+            },
+            changeMenuData(data) {
+                let childArr = []
+                data.forEach(item => {
+                    let obj = {
+                        index: item.href,
+                        name: item.name
+                    }
+                    childArr.push(obj)
+                })
+                return childArr
+            },
+            getBac(val) {
+                let strWea = ''
+                debugger
+                if (val) {
+                    strWea = 'changeBacksty'
+                } else {
+                    strWea = 'defaultBacksty'
+                }
+                return strWea
+            },
+            changeRoute(item) {
+                if (item.index) {
+                    this.$router.push({
+                        path: item.index
+                    })
+                }
+            },
+            closeSys() {
+                let that = this
+                apiPostremoveByToken(window.localStorage.getItem('token')).then(datas => {
+                    if (datas.code === 200) {
+                        // removeToken('token')
+                        // removeToken('code')
+                        // removeToken('purview')
+                        window.localStorage.removeItem('code')
+                        window.localStorage.removeItem('purview')
+                        window.localStorage.removeItem('token')
+                        window.sessionStorage.clear()
+                        that.$router.push({
+                            path: "/login"
+                        })
+                    }
+                })
+            },
+            handleNodeClick(index, indexPath) {
+                if (indexPath) {
+                    this.forecastDatas.forEach(it => {
+                        if (it.index !== '') {
+                            if (it.index === indexPath[0]) {
+                                if (!it.children) {
+                                    let showM = 0
+                                    this.routeTags.forEach(item => {
+                                        if (item.name === it.name) {
+                                            showM++
+                                        }
+                                    })
+                                    if (showM === 0) {
+                                        let obj = {
+                                            index: it.index,
+                                            name: it.name
+                                        }
+                                        this.routeTags.push(obj)
                                     }
-                                    this.routeTags.push(obj)
-                                }
-                            } else {
-                                it.children.forEach(iv =>{
-                                    if (iv.index !== '') {
-                                        if (iv.index === indexPath[1]) {
-                                            let showM = 0
-                                            this.routeTags.forEach(item =>{
-                                                if (item.name === iv.name) {
-                                                    showM++
+                                } else {
+                                    it.children.forEach(iv => {
+                                        if (iv.index !== '') {
+                                            if (iv.index === indexPath[1]) {
+                                                let showM = 0
+                                                this.routeTags.forEach(item => {
+                                                    if (item.name === iv.name) {
+                                                        showM++
+                                                    }
+                                                })
+                                                if (showM === 0) {
+                                                    this.routeTags.push(iv)
                                                 }
-                                            })
-                                            if (showM === 0) {
-                                                this.routeTags.push(iv)
                                             }
                                         }
-                                    }
-                                })
+                                    })
+                                }
                             }
                         }
-                    }
+                    })
+                    window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
+                }
+            },
+            handleClose(tag) {
+                if (this.routeTags.length > 1) {
+                    this.routeTags.splice(this.routeTags.indexOf(tag), 1)
+                    this.$router.push({
+                        path: this.routeTags[this.routeTags.length - 1].index
+                    })
+                    window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
+                }
+            },
+            handleShowPage(tag) {
+                this.$router.push({
+                    path: tag.index
                 })
-                window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
             }
-        },
-        handleClose(tag) {
-            if (this.routeTags.length > 1) {
-                this.routeTags.splice(this.routeTags.indexOf(tag), 1)
-                this.$router.push({ path: this.routeTags[this.routeTags.length-1].index})
-                window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
-            }
-        },
-        handleShowPage(tag) {
-            this.$router.push({ path: tag.index})
         }
     }
-}
 </script>
 
 <style lang="less">
-.homePage{
-    display: flex;
-    .leftMenu{
-        width: 70px;
-        .logoSty{
-            padding: 10px 0 0 10px;
-            img{
-                width: 35px;
-                height: 35px;
-            }
-        }
-        .firstLevel{
-            margin-top: 30px;
-            .firstLevel_icon{
-                margin-bottom: 30px;
-                cursor: pointer;
-                .firstLevel_img{
+    .homePage {
+        display: flex;
+
+        .leftMenu {
+            width: 70px;
+
+            .logoSty {
+                padding: 10px 0 0 10px;
+
+                img {
                     width: 35px;
-                    height: 37px;
-                    text-align: center;
-                    border-radius: 5px;
-                    position: relative;
-                    left: 10px;
-                    img{
-                        position: relative;
-                        top: 6px;
-                        width: 20px;
-                        height: 20px;
-                    }
-                    &:hover{
-                        background: rgba(255,255,255,.2);
-                    }
-                }
-                .changeBacksty{
-                    background: rgba(255,255,255,.2);
-                }
-                .defaultBacksty{
-                    background: rgba(255,255,255,0);
-                }
-                .firstLevel_title{
-                    margin-left: 5px;
-                    span{
-                        font-size: 12px;
-                        color: #fff;
-                    }
+                    height: 35px;
                 }
             }
-        }
-    }
-    .frameMain{
-        // background: #f3f7f8;
-        border-radius: 30px;
-        display: flex;
-        .menuList{
-            width: 13vw;
-            height: 100vh;
-            background-color: #184FB4;
-            .el-menu{
-                .el-sub-menu{
-                    .el-menu--inline{
-                        .el-menu-item{
-                            height: 30px;
-                            margin-bottom: 10px;
-                            border-radius: 15px 0 0 15px;
-                            width: 90%;
+
+            .firstLevel {
+                margin-top: 30px;
+
+                .firstLevel_icon {
+                    margin-bottom: 30px;
+                    cursor: pointer;
+
+                    .firstLevel_img {
+                        width: 35px;
+                        height: 37px;
+                        text-align: center;
+                        border-radius: 5px;
+                        position: relative;
+                        left: 10px;
+
+                        img {
                             position: relative;
-                            left: 12%;
-                            padding-left: 15px;
+                            top: 6px;
+                            width: 20px;
+                            height: 20px;
                         }
-                        .el-menu-item:hover, .el-menu-item.is-active{
-                            background-color: #fff;
-                            border-radius: 15px 0 0 15px;
-                            color: #2778FF;
-                            width: 90%;
-                            position: relative;
-                            left: 12%;
-                            padding-left: 15px;
+
+                        &:hover {
+                            background: rgba(255, 255, 255, .2);
                         }
-                        .el-sub-menu__title:hover{
-                            background-color: #1063CB !important;
+                    }
+
+                    .changeBacksty {
+                        background: rgba(255, 255, 255, .2);
+                    }
+
+                    .defaultBacksty {
+                        background: rgba(255, 255, 255, 0);
+                    }
+
+                    .firstLevel_title {
+                        margin-left: 5px;
+
+                        span {
+                            font-size: 12px;
+                            color: #fff;
                         }
                     }
                 }
             }
         }
-        .homeMain{
-            width: 86vw;
-            .homeMain_tag{
-                height:60px;
-                border-bottom: 1px solid #D6DBEA;
-                display: flex;
-                .tagArr{
-                    height: 33px;
-                    margin-left: 10px;
-                    cursor: pointer;
-                    position: relative;
-                    top: 28px;
-                }
-                .el-tag--dark{
-                    background-color: #184FB4;
-                    border: 1px solid #184FB4;
-                }
-                .el-tag--info{
-                    background-color: #E6EBF5;
-                    border: 1px solid #E6EBF5;
-                    color: #9DA5BE;
-                    .el-tag__close{
-                        color: #9DA5BE;
+
+        .frameMain {
+            // background: #f3f7f8;
+            border-radius: 30px;
+            display: flex;
+
+            .menuList {
+                width: 13vw;
+                height: 100vh;
+                background-color: #184FB4;
+
+                .el-menu {
+                    .el-sub-menu {
+                        .el-menu--inline {
+                            .el-menu-item {
+                                height: 30px;
+                                margin-bottom: 10px;
+                                border-radius: 15px 0 0 15px;
+                                width: 90%;
+                                position: relative;
+                                left: 12%;
+                                padding-left: 15px;
+                            }
+
+                            .el-menu-item:hover,
+                            .el-menu-item.is-active {
+                                background-color: #fff;
+                                border-radius: 15px 0 0 15px;
+                                color: #2778FF;
+                                width: 90%;
+                                position: relative;
+                                left: 12%;
+                                padding-left: 15px;
+                            }
+
+                            .el-sub-menu__title:hover {
+                                background-color: #1063CB !important;
+                            }
+                        }
                     }
                 }
-                .settingMsg{
-                    width: 10%;
-                    padding-top:20px;
-                    span{
-                        // width: 80%;
-                        // display: inline-block;
+            }
+
+            .homeMain {
+                width: 86vw;
+
+                .homeMain_tag {
+                    height: 60px;
+                    border-bottom: 1px solid #D6DBEA;
+                    display: flex;
+
+                    .tagArr {
+                        height: 33px;
+                        margin-left: 10px;
+                        cursor: pointer;
                         position: relative;
-                        top: -5px;
-                        font-size: 18px;
-                        font-family: '微软雅黑';
-                        font-weight: bold;
-                        color: #171e28;
+                        top: 28px;
                     }
-                    img{
-                        position: relative;
-                        left: 10px;
-                        cursor:pointer
+
+                    .el-tag--dark {
+                        background-color: #184FB4;
+                        border: 1px solid #184FB4;
+                    }
+
+                    .el-tag--info {
+                        background-color: #E6EBF5;
+                        border: 1px solid #E6EBF5;
+                        color: #9DA5BE;
+
+                        .el-tag__close {
+                            color: #9DA5BE;
+                        }
+                    }
+
+                    .settingMsg {
+                        width: 10%;
+                        padding-top: 20px;
+
+                        span {
+                            // width: 80%;
+                            // display: inline-block;
+                            position: relative;
+                            top: -5px;
+                            font-size: 18px;
+                            font-family: '微软雅黑';
+                            font-weight: bold;
+                            color: #171e28;
+                        }
+
+                        img {
+                            position: relative;
+                            left: 10px;
+                            cursor: pointer
+                        }
                     }
                 }
-            }
-            .mainMessage{
-                width: 100%;
-                height: 91vh;
-                // padding: 0 10px;
-                // background: #fff;
-                border-radius: 20px;
+
+                .mainMessage {
+                    width: 100%;
+                    height: 91vh;
+                    // padding: 0 10px;
+                    // background: #fff;
+                    border-radius: 20px;
+                }
             }
         }
     }
-}
 </style>