doum
2025-09-19 e14264130d54c85706e063ddf6b090b5c2dd4edc
最新版本541200007
已修改5个文件
428 ■■■■ 文件已修改
admin/src/components/common/CommonHeader.vue 286 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/system/menu/OperaMenuWindow.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/main.js 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/store/index.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/system/menu.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/common/CommonHeader.vue
@@ -2,56 +2,35 @@
  <div class="common-header">
    <div class="header">
      <div class="logo">
        <div class="title"> <img src="@/assets/system.png" alt="" />{{sysConfig.subtitle || title }}</div>
        <div class="title">{{ title }}</div>
        <div class="list">
            <div  :class="index==currentIndex?'item active':'item'" v-for="(item,index) in topMenuList.list" :key="item.id"  @click="getHeaderNav(item,index)" :index="index">{{item.label}}
              <div v-if="index==currentIndex" class="linellae"></div>
            </div>
          <div class="item active">
            <div>服务中心</div>
            <div class="linellae"></div>
          </div>
          <div  class="item" v-for="(item,index) in topMenuList.list" :key="item.id"  @click="getHeaderNav(item)" :index="index">{{item.label}}</div>
<!--          <div class="item" @click="getHeaderNav('0')">安防中心</div>
          <div class="item" @click="getHeaderNav('1')">消控中心</div>
          <div class="item" @click="getHeaderNav('2')">能管中心</div>
          <div class="item" @click="getHeaderNav('7')">后勤中心</div>
          <div class="item" @click="getHeaderNav('3')">驾驶舱</div>-->
          <!-- <div class="item" @click="handleTest">测试</div> -->
        </div>
        <!-- <div class="title-en">Diagnosis of Intelligent Manufacturing Integrated Service Platfrom</div> -->
      </div>
      <div class="user">
          <div class="user-search">
              <div class="user-search-left">
                <span>全部</span>
                  <img src="@/assets/icons/xl.png" alt="">
              </div>
              <div class="user-search-right">
                  <input type="text" placeholder="请输入" />
                  <img src="@/assets/icons/sousuo.png" alt="">
              </div>
          </div>
          <div class="user-images">
<!--              <img src="@/assets/icons/ic_1.jpg" alt="">-->
<!--              <img src="@/assets/icons/ic_2.png" alt="">-->
              <img src="@/assets/icons/ic_3.jpg" alt="">
              <img src="@/assets/icons/ic_4.jpg" alt="">
              <img src="@/assets/icons/ic_5.jpg" alt="">
<!--              <img src="@/assets/icons/ic_6.jpg" alt="">-->
              <img src="@/assets/icons/ic_7.jpg" alt="">
<!--              <img src="@/assets/icons/ic_8.jpg" alt="">-->
          </div>
          <el-dropdown v-if="isLogined" trigger="click">
            <span class="el-dropdown-link" style="cursor: pointer; color: rgba(255,255,255,.56);">
              {{ userInfo | displayName }}
              <i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item @click.native="changePwd">修改密码</el-dropdown-item>
              <el-dropdown-item @click.native="logout">退出登录</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
<!--        <el-dropdown v-if="isLogined" trigger="click">-->
<!--          <span class="el-dropdown-link">-->
<!--            &lt;!&ndash; <img v-if="userInfo != null" :src="userInfo.avatar == null ? `${require('@/assets/avatar/man.png')}` : userInfo.avatar" alt="">{{userInfo | displayName}}<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i> &ndash;&gt;-->
<!--            <img v-if="userInfo != null" style="width: 30px !important" src="@/assets/avatar/man.png" alt="" />{{-->
<!--              userInfo | displayName-->
<!--            }}<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
<!--          </span>-->
<!--          <el-dropdown-menu slot="dropdown">-->
<!--            <el-dropdown-item @click.native="changePwd">修改密码</el-dropdown-item>-->
<!--            <el-dropdown-item @click.native="logout">退出登录</el-dropdown-item>-->
<!--          </el-dropdown-menu>-->
<!--        </el-dropdown>-->
        <el-dropdown v-if="isLogined" trigger="click">
          <span class="el-dropdown-link">
            <!-- <img v-if="userInfo != null" :src="userInfo.avatar == null ? `${require('@/assets/avatar/man.png')}` : userInfo.avatar" alt="">{{userInfo | displayName}}<i class="el-icon-arrow-down el-icon--right"></i> -->
            <img v-if="userInfo != null" style="width: 30px !important" src="@/assets/avatar/man.png" alt="" />{{
              userInfo | displayName
            }}<i class="el-icon-arrow-down el-icon--right"></i>
          </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item @click.native="changePwd">修改密码</el-dropdown-item>
            <el-dropdown-item @click.native="logout">退出登录</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </div>
    </div>
    <!-- 修改密码 -->
@@ -65,7 +44,7 @@
            show-password></el-input>
        </el-form-item>
        <el-form-item label="新密码" prop="newPwd" required>
          <el-input v-model="changePwdData.form.newPwd" type="password" placeholder="请输入新密码,至少包括数字、大写字母、小写字母、特殊字符中的三种字符,且至少8位数"
          <el-input v-model="changePwdData.form.newPwd" type="password" placeholder="请输入新密码,密码需包含字母、数字及特殊字符中的至少两种"
            maxlength="20" show-password></el-input>
        </el-form-item>
        <!-- <div style="font-size: 12px;color:#999999">密码需包含字母、数字及特殊字符中的至少两种</div> -->
@@ -81,7 +60,7 @@
<script>
import { mapState, mapMutations } from 'vuex'
import GlobalAlertWindow from './GlobalAlertWindow'
import { getSystemConfig, logout, updatePwd } from '@/api/system/common'
import { logout, updatePwd } from '@/api/system/common'
import { getAppHeaderNav } from '@/api'
export default {
  name: 'CommonHeader',
@@ -128,13 +107,13 @@
    }
  },
  computed: {
    ...mapState(['menuData', 'userInfo', 'topMenuList', 'currentIndex', 'sysConfig'])
    ...mapState(['menuData', 'userInfo', 'topMenuList'])
    // title () {
    //   return this.$route.meta.title
    // }
  },
  created () {
    this.getSystemConfig()
  },
  mounted () {
    // needChangePwd 0 : 默认密码需要修改,1 不需要
@@ -155,7 +134,7 @@
    }
  },
  methods: {
    ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent', 'setCurrentIndex', 'setSysconfig']),
    ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo']),
    // 修改密码
    changePwd () {
      this.visible.changePwd = true
@@ -163,68 +142,36 @@
        this.$refs.changePwdDataForm.resetFields()
      })
    },
    getSystemConfig () {
      if (!this.sysConfig.subTitle) {
        getSystemConfig()
          .then((res) => {
            if (res && res.subtitle) {
              this.setSysconfig(res)
            }
          })
      }
    },
    validatePassword (rule, value, callback) {
      if (!value) {
        callback(new Error('请输入密码'))
      } else {
        // const lengthValid = /^.{6,20}$/.test(value)
        // const hasLetter = /[a-zA-Z]/.test(value)
        // const hasNumber = /[0-9]/.test(value)
        // const hasSpecial = /[!@#$%^&*(),.?":{}|<>]/.test(value)
        //
        // const typesCount = [hasLetter, hasNumber, hasSpecial].filter(Boolean).length
        //
        // if (!lengthValid) {
        //   callback(new Error('密码长度需为6到20个字符'))
        // } else if (typesCount < 2) {
        //   callback(new Error('密码需包含字母、数字及特殊字符中的至少两种'))
        // } else {
        //   callback() // 验证通过
        // }
        let typeCount = 0
        if (/[a-z]/.test(value)) typeCount++ // 小写字母
        if (/[A-Z]/.test(value)) typeCount++ // 大写字母
        if (/\d/.test(value)) typeCount++ // 数字
        if (/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(value)) typeCount++ // 特殊字符
        if (typeCount >= 3) {
          callback()
        const lengthValid = /^.{6,20}$/.test(value)
        const hasLetter = /[a-zA-Z]/.test(value)
        const hasNumber = /[0-9]/.test(value)
        const hasSpecial = /[!@#$%^&*(),.?":{}|<>]/.test(value)
        const typesCount = [hasLetter, hasNumber, hasSpecial].filter(Boolean).length
        if (!lengthValid) {
          callback(new Error('密码长度需为6到20个字符'))
        } else if (typesCount < 2) {
          callback(new Error('密码需包含字母、数字及特殊字符中的至少两种'))
        } else {
          callback(new Error('至少包括数字、大写字母、小写字母、特殊字符中的三种字符,且至少8位数'))
          callback() // 验证通过
        }
      }
    },
    getHeaderNav (item, index) {
      this.setCurrentIndex(index)
      if (item.linkType === 0) {
        this.setTopMenuCurrent(item)
      } else {
        if (item.url && item.url === 'goHKAF' && item.params != null) {
          this.getHKAFHeaderNav(item.params, item.label)
        } else if (item.url && item.url.indexOf('http') === 0) {
          window.open(item.url, '_blank')
        }
    getHeaderNav (item) {
      if (item.url && item.url === 'goHKAF' && item.params != null) {
        this.getHKAFHeaderNav(item.params)
      } else if (item.url && item.url.indexOf('http') === 0) {
        window.open(item.url, '_blank')
      }
    },
    getHKAFHeaderNav (type, label) {
    getHKAFHeaderNav (type) {
      getAppHeaderNav(type).then(res => {
        if (label === '安防中心') {
          const openWindow = window.open(res, '_blank')
          // setTimeout(() => {
          //   openWindow.close()
          // }, 7 * 1000)
        } else {
          window.open(res, '_blank')
        }
        window.open(res, '_blank')
      })
    },
    handleTest () {
@@ -310,9 +257,8 @@
          newPwd: this.changePwdData.form.newPwd
        })
          .then(() => {
            console.log('修改成功')
            this.$tip.apiSuccess('修改成功')
            // this.$store.commit('setUserInfo', { needChangePwd: 1 })
            this.$store.commit('setUserInfo', { needChangePwd: 1 })
            this.visible.changePwd = false
          })
          .catch(e => {
@@ -344,37 +290,36 @@
@import "@/assets/style/variables.scss";
.common-header {
  background-color: #1E7FFF;
  background-color: #2080f7;
}
.list {
  flex: 1;
  display: flex;
  align-items: center;
  margin-left: 60px;
  margin-top: 10px;
  .item {
    margin-right: 40px;
    font-size: 16px;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    .item {
      margin-right: 24px;
      font-size: 16px;
      font-weight: 400;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      height: 49px;
      cursor: pointer;
    justify-content: flex-start;
    height: 40px;
    cursor: pointer;
      .linellae {
        width: 64px;
        height: 2px;
        background: #FFFFFF;
      }
    .linellae {
      width: 64px;
      height: 2px;
      background: #FFFFFF;
    }
  }
    .active {
      font-weight: 500;
    }
  .active {
    font-weight: 500;
  }
}
.header {
@@ -389,7 +334,7 @@
    box-sizing: border-box;
    min-width: 360px;
    height: 56px;
    padding: 10px 12px;
    padding: 10px 30px;
    // flex-shrink: 0;
    line-height: 36px;
    font-size: 22px;
@@ -399,18 +344,7 @@
    align-items: center;
    .title {
      display: flex;
      color: rgb(255, 255, 255);
      font-size: 18px;
      font-weight: 700;
      font-family: "Microsoft Yahei", "sans-serif", "segoe UI", "PingFang SC", arial, Helvetica;
      //font-size: 18px;
      //width: 320px;
      img{
        width:auto ;
        height: 32px;
        margin-right: 5px;
      }
      width: 240px;
    }
    // display: inline;
@@ -422,83 +356,15 @@
  }
  .user {
    /*width: 152px;*/
    width: 212px;
    box-sizing: border-box;
    height: 56px;
    padding-right: 25px;
    /*background: url("../../assets/images/top_ic_bolang@2x.png") no-repeat;*/
    background: url("../../assets/images/top_ic_bolang@2x.png") no-repeat;
    flex-shrink: 0;
    text-align: right;
    display: flex;
    align-items: center;
    .user-search {
        width: 346px;
        height: 32px;
        border-radius: 30px;
        border: 1px solid rgba(255,255,255,.56);
        margin-right: 15px;
        display: flex;
        align-items: center;
        .user-search-left {
            flex-shrink: 0;
            width: 106px;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            span {
                font-size: 14px;
                font-weight: 400;
                color: rgba(255,255,255,.56);
                margin-right: 10px;
            }
            img {
                top: 0;
                margin: 0;
                width: 20px;
                height: 16px;
            }
        }
        .user-search-right {
            flex: 1;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding-right: 10px;
            box-sizing: border-box;
            input {
                flex: 1;
                height: 100%;
                font-size: 14px;
                font-weight: 400;
                color: rgba(255,255,255,.56);
                border: none;
                outline: none;
                background-color: rgba(0,0,0,0);
                &::placeholder {
                    color: rgba(255,255,255,.56);
                }
            }
            img {
                top: 0;
                margin: 0;
                width: 20px;
                height: 20px;
            }
        }
    }
    .user-images {
        height: 100%;
        display: flex;
        align-items: center;
        img {
            top: 0 !important;
            width: 18px;
            height: 18px;
            margin-right: 12px;
        }
    }
    cursor: pointer;
    .el-dropdown {
      top: 2px;
      color: #fff;
admin/src/components/system/menu/OperaMenuWindow.vue
@@ -20,6 +20,7 @@
      <el-form-item label="携带参数" prop="params">
        <el-input v-model="form.params" placeholder="请输入携带参数" v-trim maxlength="200"/>
      </el-form-item>
      <el-form-item label="图标" prop="icon" class="form-item-icon" v-if="form.type !== 1">
      <el-form-item label="菜单类型" prop="linkType" >
        <el-radio-group v-model="form.linkType">
          <el-radio :label="0" :value="0" >内部菜单</el-radio>
@@ -66,6 +67,7 @@
        icon: '',
        type: '',
        linkType: 0,
        type: '',
        remark: ''
      },
      // 验证规则
admin/src/main.js
@@ -15,7 +15,6 @@
import preventReClick from '@/directives/directive'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
Vue.component('treeselect', Treeselect)
Vue.use(preventReClick)
@@ -38,7 +37,7 @@
  router,
  store,
  computed: {
    ...mapState(['userInfo', 'homePage','topMenuCurrent','menuData'])
    ...mapState(['userInfo', 'homePage'])
  },
  watch: {
    async userInfo () {
@@ -46,16 +45,10 @@
        return
      }
      await this.initRoutes()
    },
    async topMenuCurrent () {
      if (this.topMenuCurrent == null) {
        return
      }
      await this.chagneRoutes()
    }
  },
  methods: {
    ...mapMutations(['switchCollapseMenu', 'setCurrentIndex', 'setHomePage', 'setTopMenuCurrent', 'setTopMenuCurrent','cleartagsview']),
    ...mapMutations(['switchCollapseMenu', 'setHomePage']),
    // 初始化本地配置
    initLocalConfig () {
      // 菜单状态配置
@@ -81,40 +74,17 @@
      await fetchMenuTree()
        .then(allmenus => {
          // 添加菜单
          var menus = allmenus.filter(item => {
            return item.type !== 1
          })
          var topList = allmenus.filter(item => {
            return item.type === 1
          })
          console.log(topList)
          storeMenus.push.apply(storeMenus, menus)
          storeTopMenus.push.apply(storeTopMenus, topList)
          var topCurrent = null
          var tlist =[]
          topList.forEach(item => {
            if (item.linkType === 0 ) {
              if (topCurrent == null) {
                topCurrent = item
              }
              tlist.push(...item.children)
            }
          })
          if (this.$route.query && this.$route.query.menuparams) {
            let menu = topList.filter(item => item.params === this.$route.query.menuparams)
            this.setTopMenuCurrent(menu[0])
            this.setCurrentIndex(topList.findIndex(obj => obj.params === this.$route.query.menuparams))
          } else {
            this.setTopMenuCurrent(topCurrent)
            this.setCurrentIndex(0)
          }
          // console.log(topList)
          // var menus = []
          // topList.forEach(item => {
          //   console.log(topCurrent.id, item.id)
          //   if (item.id == this.topMenuCurrent.id) {
          //     menus = item.children
          //   }
          // })
          console.log('menus', this.menuData.list)
          storeMenus.push.apply(storeMenus, this.menuData.list)
          // 添加路由
          this.__addRouters(tlist)
          this.__addRouters(storeMenus)
          // 404
          router.addRoute({
            path: '*',
@@ -127,9 +97,7 @@
            redirect: this.homePage.url
          })
          // 路由加载完成后,如果访问的是/,跳转至动态识别的首页
          if (this.$route.query && this.$route.query.menuparams) {
            this.$router.push(topList.filter(item => item.params === this.$route.query.menuparams)[0].homeUrl)
          } else if (this.$route.path === '/') {
          if (this.$route.path === '/') {
            this.$router.push(this.homePage.url)
          }
        })
@@ -139,16 +107,6 @@
        .finally(() => {
          this.loading = false
        })
    },
    async chagneRoutes () {
      // 重置菜单
      this.cleartagsview('/index')
      console.log('menus', this.menuData.list)
      // 添加路由
      // this.__addRouters(this.menuData.list)
      if(this.topMenuCurrent.homeUrl){
        await this.$router.push({path: this.topMenuCurrent.homeUrl, query: {}})
      }
    },
    // 新建路由
    __addRouters (routes, parents = []) {
admin/src/store/index.js
@@ -1,13 +1,11 @@
import Vue from 'vue'
import Vuex from 'vuex'
import router from '../router'
Vue.use(Vuex)
const state = {
  // 登录用户信息
  userInfo: null,
  tableHeightNew: 300,
  sysConfig: { title: '', subtitle: '' },
  primaryColor: '#2080f7',
  // 首页
  homePage: null,
@@ -18,8 +16,6 @@
    // 是否收起
    collapse: false
  },
  topMenuCurrent: {
  },
  topMenuList: {
    // 菜单列表
    list: [],
@@ -29,21 +25,10 @@
  // tags数组
  tags: [],
  // tagsview标签显示隐藏
  isCollapse: false,
  // 顶部菜单索引
  currentIndex: 0
  isCollapse: false
}
const mutations = {
  // 设置顶部菜单索引
  setCurrentIndex (state, index) {
    console.log('设置顶部菜单索引', index)
    state.currentIndex = index
  },
  setSysconfig (state, config) {
    state.sysConfig = { title: config.title || '', subtitle: config.subtitle || '' }
    document.title =  state.sysConfig.title+ state.sysConfig.subtitle
  },
  // 切换菜单状态
  switchCollapseMenu (state, value) {
    if (value != null) {
@@ -71,22 +56,8 @@
  setHomePage (state, homePage) {
    state.homePage = homePage
  },
  // 设置首页路由信息
  setTopMenuCurrent (state, current) {
    console.log('setTopMenuCurrent', current)
    if (current.id !== state.topMenuCurrent.id) {
      state.topMenuList.list.forEach(item => {
        console.log(item.id, item.id)
        if (current.id == item.id) {
          state.topMenuCurrent = current
          state.menuData.list = item.children
        }
      })
    }
  },
  // 重置菜单
  resetMenus: (state) => {
    state.topMenuId = null
    state.menuData.list = []
  },
  //  tags
@@ -95,7 +66,7 @@
    // findindex找角标,循环判断一下,如果等于那么就代表有相同的,就不必添加,如果找不到那就是-1.就添加
    // state.tags = [{ ...val, keepAlive: false }]
    const result = state.tags.findIndex(item => item.index === val.index)
    if (result === -1) {
      if (result === -1) {
      state.tags.push({ ...val, keepAlive: false })
    } else {
      state.tags[result] = { ...val, keepAlive: false }
admin/src/views/system/menu.vue
@@ -11,7 +11,7 @@
    <!-- 表格和分页 -->
    <template v-slot:table-wrap>
      <ul class="toolbar" v-permissions="['system:menu:create', 'system:menu:delete', 'system:menu:sort']">
        <li><el-button type="primary" @click="$refs.operaMenuWindow.open(activeType==0?'新建一级菜单':'新建顶部导航菜单',null,null,activeType)" icon="el-icon-plus" v-permissions="['system:menu:create']">新建</el-button></li>
        <li><el-button type="primary" @click="$refs.operaMenuWindow.open(activeGroup==0?'新建一级菜单':'新建顶部导航菜单',null,null,activeGroup)" icon="el-icon-plus" v-permissions="['system:menu:create']">新建</el-button></li>
        <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['system:menu:delete']">删除</el-button></li>
        <li><el-button @click="sort('top')" :loading="isWorking.sort" icon="el-icon-sort-up" v-permissions="['system:menu:sort']">上移</el-button></li>
        <li><el-button @click="sort('bottom')" :loading="isWorking.sort" icon="el-icon-sort-down" v-permissions="['system:menu:sort']">下移</el-button></li>
@@ -35,14 +35,9 @@
            <template v-else>未设置</template>
          </template>
        </el-table-column>
        <el-table-column prop="path" label="访问路径" show-tooltip-when-overflow min-width="200px"></el-table-column>
        <el-table-column prop="path" label="访问路径" show-tooltip-when-overflow min-width="220px"></el-table-column>
        <el-table-column prop="params" label="参数" min-width="120px"></el-table-column>
        <el-table-column prop="linkType" label="菜单类型" min-width="80px">
          <template slot-scope="{row}">
            {{row.linkType == 1 ? '外部系统' : '内部系统'}}
          </template>
        </el-table-column>
        <el-table-column prop="remark" label="备注" min-width="150px" show-tooltip-when-overflow></el-table-column>
        <el-table-column prop="remark" label="备注" min-width="120px"></el-table-column>
        <el-table-column prop="createUser" label="创建人" min-width="100px">
          <template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template>
        </el-table-column>
@@ -63,8 +58,8 @@
          fixed="right"
        >
          <template slot-scope="{row}">
            <el-button type="text" icon="el-icon-edit" @click="$refs.operaMenuWindow.open('编辑菜单', row,null,activeType)" v-permissions="['system:menu:update']">编辑</el-button>
            <el-button v-if="activeGroup !== 1" type="text" icon="el-icon-plus" @click="$refs.operaMenuWindow.open('新建子菜单', null, row,activeType)" v-permissions="['system:menu:create']">新建子菜单</el-button>
            <el-button type="text" icon="el-icon-edit" @click="$refs.operaMenuWindow.open('编辑菜单', row,null,activeGroup)" v-permissions="['system:menu:update']">编辑</el-button>
            <el-button v-if="activeGroup !== 1" type="text" icon="el-icon-plus" @click="$refs.operaMenuWindow.open('新建子菜单', null, row,activeGroup)" v-permissions="['system:menu:create']">新建子菜单</el-button>
            <el-button v-if="!row.fixed" type="text" icon="el-icon-delete" @click="deleteById(row)" v-permissions="['system:menu:delete']">删除</el-button>
          </template>
        </el-table-column>
@@ -87,10 +82,8 @@
  data () {
    return {
      // 是否正在处理中
      activeGroup: -1,
      activeType: 1,
      topMenuId:null,
      groupList:[{id:-1,name: "顶部导航配置",type:1},{id:-2,name: "系统左侧菜单",type:0}],
      activeGroup: 0,
      groupList:[{id:0,name: "服务中心菜单"},{id:1,name: "顶部导航配置"}],
      isWorking: {
        sort: false
      }
@@ -99,36 +92,14 @@
  methods: {
    groupClick(item){
      this.activeGroup = item.id
      this.activeType = item.type
      this.handlePageChange();
    },
    // 查询数据
    handlePageChange () {
      this.isWorking.search = true
      fetchTree({type: this.activeType == 1?this.activeType:null})
      fetchTree({type: this.activeGroup})
        .then(records => {
          if(this.activeType === 1){
            this.tableData.list = records
            this.groupList = [{id:-1,name: "顶部导航配置",type:1}]
            var tops = []
            this.tableData.list.forEach(item=>{
              if(item.linkType !== 1){
                tops.push({id:item.id,name: item.name,type:0})
              }
            })
            if(tops.length){
              this.groupList.push(...tops)
            }else {
              this.groupList.push({id:0,name: "系统左侧菜单",type:0})
            }
          }else{
            //如果是内部菜单
            records.forEach(item =>{
              if(item.id === this.activeGroup){
                this.tableData.list =item.children
              }
            })
          }
          this.tableData.list = records
        })
        .catch(e => {
          this.$tip.apiFailed(e)