Просмотр исходного кода

头像显示问题修改,高级查询修改

lidie 1 год назад
Родитель
Сommit
8dc0af8cc3

+ 9 - 0
.eslintrc.js

@@ -1,4 +1,5 @@
 module.exports = {
+
   root: true,
   parserOptions: {
     parser: 'babel-eslint',
@@ -26,6 +27,14 @@ module.exports = {
   ],
   // add your custom rules here
   // it is base on https://github.com/vuejs/eslint-config-vue
+  extends: [
+    // add more generic rulesets here, such as:
+    // 'eslint:recommended',
+    // 'plugin:vue/vue3-recommended',
+    // "prettier",
+    'plugin:vue/recommended',// Use this if you are using Vue.js 2.x.
+    'prettier',
+  ],
   rules: {
     'vue/max-attributes-per-line': [2, {
       'singleline': 10,

+ 1 - 0
package.json

@@ -63,6 +63,7 @@
     "compression-webpack-plugin": "^5.0.1",
     "cross-env": "^7.0.2",
     "eslint": "^7.7.0",
+    "eslint-config-prettier": "^9.1.0",
     "eslint-plugin-vue": "^6.2.2",
     "increase-memory-limit": "1.0.7",
     "less-loader": "^6.2.0",

+ 7 - 7
src/router/index.js

@@ -38,7 +38,7 @@ const whiteList = ['/login', '/register', '/forget', '/authredirect']
  * 路由拦截
  * 权限验证
  */
-router.beforeEach(async(to, from, next) => {
+router.beforeEach(async (to, from, next) => {
   // 进度条
   NProgress.start()
   // 这里将cookie里是否存有token作为验证是否登录的条件
@@ -63,7 +63,7 @@ router.beforeEach(async(to, from, next) => {
         })
       } else { // 动态改变权限,判断是否有菜单权限,或者刷新页面
         if (to.matched.length === 0) { // 不能匹配的路由
-          return next({ path: '401', replace: true, query: { noGoBack: true }})
+          return next({ path: '401', replace: true, query: { noGoBack: true } })
         } else {
           next()
         }
@@ -92,22 +92,22 @@ router.beforeEach(async(to, from, next) => {
         }
       })
     } else {
-    // 判断refresh tonken是否过期
+      // 判断refresh tonken是否过期
       const refreshToken = getRefreshToken()
       if (util.isNotEmpty(refreshToken)) {
-      // 刷新tonken
+        // 刷新tonken
         await store.dispatch('ibps/account/refreshToken').then(() => {
           next()
         }).catch((err) => {
           console.error(err)
         })
       } else {
-      // 在免登录白名单,直接进入
+        // 在免登录白名单,直接进入
         if (whiteList.indexOf(to.path) !== -1) {
           next()
         } else {
-        // 没有登录的时候跳转到登录界面
-        // 携带上登陆成功之后需要跳转的页面完整路径
+          // 没有登录的时候跳转到登录界面
+          // 携带上登陆成功之后需要跳转的页面完整路径
           next({
             name: 'login',
             query: {

+ 1 - 0
src/views/platform/bpmn/my-draft/index.vue

@@ -181,6 +181,7 @@
        * 高级查询
        */
       onMoreSearch(params) {
+        console.log("params", params, this.typeId);
         if (this.$utils.isNotEmpty(this.typeId)) {
           params['Q^type_id_^SL'] = this.typeId
         }

+ 1 - 2
src/views/platform/my/change-password.vue

@@ -61,8 +61,7 @@
       // 获取用户头像
       avatar() {
         let str = "/file/getImage?attachmentId="
-        // const photo = this.info && this.info.employee ? this.info.employee.photo : null
-        const photo = this.info && this.info.employee ? (this.info.employee.photo == '' ? this.info.employee.photo : (str + this.info.employee.photo)) : null
+        const photo = this.info && this.info.employee ? (/^\d+$/.test(this.info.employee.photo) ? (str + this.info.employee.photo) : this.info.employee.photo) : null
         if (this.$utils.isEmpty(photo)) {
           return this.errorImage
         }

+ 3 - 5
src/views/platform/my/index.vue

@@ -77,7 +77,7 @@
       const { userId, userList = [], deptList = [], menus, userInfo } = this.$store.getters
       const t1 = deptList.find(i => i.positionId === first) || {}
       const t2 = deptList.find(i => i.positionId === second) || {}
-      console.log(first, second, deptList)
+      // console.log(first, second, deptList)
       const locationName = second ? t1.positionName + t2.positionName : t1.positionName
       return {
         defaultImage: defaultImage,
@@ -91,9 +91,8 @@
         'info'
       ]),
       avatar() {
-        let str = "/file/getImage?attachmentId="
-        // const photo = this.info && this.info.employee ? (str + this.info.employee.photo) : null
-        const photo = this.info && this.info.employee ? (this.info.employee.photo == '' ? this.info.employee.photo : (str + this.info.employee.photo)) : null
+        const str = "/file/getImage?attachmentId="
+        const photo = this.info && this.info.employee ? (/^\d+$/.test(this.info.employee.photo) ? (str + this.info.employee.photo) : this.info.employee.photo) : null
         if (this.$utils.isEmpty(photo)) {
           return this.errorImage
         }
@@ -106,7 +105,6 @@
         return this.info && this.info.user ? this.info.user.fullname : ''
       },
       org() {
-        console.log(this.locationName, 'this.locationNamethis.locationName')
         return this.locationName
       },
       position() {

+ 117 - 111
src/views/platform/my/user-info.vue

@@ -7,7 +7,8 @@
       <van-field label="头像" :size="size" class="photoPic">
         <template #right-icon>
           <van-uploader :deletable="false" :preview-full-image="false" :after-read="afterRead">
-            <van-image v-show="$utils.isNotEmpty(employee)" :src="getImage(employee.photo)" width="50" height="50" round />
+            <van-image v-show="$utils.isNotEmpty(employee)" :src="getImage(employee.photo)" width="50" height="50"
+              round />
           </van-uploader>
         </template>
       </van-field>
@@ -19,9 +20,10 @@
         <van-image v-show="$utils.isNotEmpty(employee)" slot="right-icon" :src="getImage(employee.photo)"
           :error-icon="defaultImage" width="50" height="50" round />
       </van-cell> -->
-      <van-cell :value="employee.orgName" title="单位名称" :size="size" :value-class="className" :title-class="tClassName" />
+      <van-cell :value="employee.orgName" title="单位名称" :size="size" :value-class="className"
+        :title-class="tClassName" />
       <van-field v-model="employee.name" label="客户姓名" :size="size" clearable />
-      <van-field :value="employee.gender=='male'?'男':'女'" label="性别" :size="size" clearable />
+      <van-field :value="employee.gender==='male'?'男':'女'" label="性别" :size="size" clearable />
       <van-field v-model="employee.mobile" label="手机号" :size="size" clearable />
       <van-field v-model="employee.qq" label="邮箱" :size="size" clearable />
       <van-field v-model="employee.address" label="地址" :size="size" clearable />
@@ -34,123 +36,127 @@
 </template>
 
 <script>
-import { changeUserInfo } from '@/api/platform/org/user'
-import { load } from '@/api/platform/org/employee'
-import { getFile } from '@/utils/image'
-import defaultImage from '@/assets/images/logo/lc.png'
-import navbar from '@/mixins/navbar'
-import { uploadFile, getImage } from '@/api/platform/file/attachment'
+  import { changeUserInfo } from '@/api/platform/org/user'
+  import { load } from '@/api/platform/org/employee'
+  import { getFile } from '@/utils/image'
+  import defaultImage from '@/assets/images/logo/lc.png'
+  import navbar from '@/mixins/navbar'
+  import { uploadFile, getImage } from '@/api/platform/file/attachment'
 
-export default {
-  filters: {
-    sexFilter(sex) {
-      if (sex === 'male') {
-        return '男'
-      } else if (sex === 'female') {
-        return '女'
-      } else {
-        return ''
-      }
-    }
-  },
-  mixins: [navbar],
-  data() {
-    return {
-      trueFile: null,
-      imgId: '',
-      loading: false,
-      employee: {
-        name: '',
-        gender: '',
-        wcAccount: '',
-        account: '',
-        mobile: '',
-        orgName: '',
-        qq: '',
-        address: '',
-        // wcAccount: '',
-        org: '',
-        position: '',
-        photo: ''
-      },
-      defaultImage: defaultImage,
-      size: 'large',
-      className: 'my-user-info_size',
-      tClassName: 'ibps-flex-c',
-      roleList: []
-    }
-  },
-  created() {
-    this.loading = false
-    // 获取用户信息
-    load({
-      employeeId: this.$store.getters.userId
-    }).then(response => {
-      this.loading = true
-      const data = response.data
-      const variables = response.variables
-      // 设置用户信息
-      this.employee = data || {}
-      const pos = []
-      if (this.employee.photo === '') {
-        this.getPhotoImage(this.employee.photo)
-      }
-      this.roleList = variables ? variables.partyRoles.length > 0 ? variables.partyRoles : [] : []
-      const positions = variables ? variables.partyPositions : []
-      if (this.$utils.isNotEmpty(positions)) {
-        for (var i = 0; i < positions.length; i++) {
-          pos.push(positions[i].name)
+  export default {
+    filters: {
+      sexFilter(sex) {
+        if (sex === 'male') {
+          return '男'
+        } else if (sex === 'female') {
+          return '女'
+        } else {
+          return ''
         }
       }
-      this.employee.position = pos.join(',')
-    }).catch(e => {
-      this.loading = true
-      console.error(e)
-    })
-  },
-  methods: {
-    getPhotoImage(photo) {
-      if (this.$utils.isNotEmpty(photo)) {
-        return getFile(photo)
-      } else {
-        return defaultImage
-      }
-    },
-    // 更换头像
-    afterRead(file) {
-      this.trueFile = file.file
-      uploadFile(file.file).then(res => {
-        console.log(res)
-        const url = getImage(res.data.id)
-        console.log(url)
-        this.employee.photo = res.data.id
-        console.log(this.employee.photo)
-      })
     },
-    updateInfu() {
-      const arr = {
-        attrValueVoList: [],
-        positionVoList: [],
-        roleVoList: this.roleList,
-        userGroupPoList: [],
-        partyEmployeePo: this.employee,
-        user: this.employee
+    mixins: [navbar],
+    data() {
+      return {
+        trueFile: null,
+        imgId: '',
+        loading: false,
+        employee: {
+          name: '',
+          gender: '',
+          wcAccount: '',
+          account: '',
+          mobile: '',
+          orgName: '',
+          qq: '',
+          address: '',
+          // wcAccount: '',
+          org: '',
+          position: '',
+          photo: ''
+        },
+        defaultImage: defaultImage,
+        size: 'large',
+        className: 'my-user-info_size',
+        tClassName: 'ibps-flex-c',
+        roleList: []
       }
-      console.log(arr)
-      changeUserInfo(arr).then(res2 => {
-        this.$toast('更新个人信息成功!')
-      }).catch(err => {
-        console.log('输出错误信息', err)
+    },
+    created() {
+      this.loading = false
+      // 获取用户信息
+      load({
+        employeeId: this.$store.getters.userId
+      }).then(response => {
+        this.loading = true
+        const data = response.data
+        const variables = response.variables
+        // 设置用户信息
+        this.employee = data || {}
+        const pos = []
+        if (this.employee.photo === '') {
+          this.getPhotoImage(this.employee.photo)
+        }
+        this.roleList = variables ? variables.partyRoles.length > 0 ? variables.partyRoles : [] : []
+        const positions = variables ? variables.partyPositions : []
+        if (this.$utils.isNotEmpty(positions)) {
+          for (var i = 0; i < positions.length; i++) {
+            pos.push(positions[i].name)
+          }
+        }
+        this.employee.position = pos.join(',')
+      }).catch(e => {
+        this.loading = true
+        console.error(e)
       })
     },
-    getImage(id) {
-      if (id === '') {
-        return defaultImage
+    methods: {
+      getPhotoImage(photo) {
+        if (this.$utils.isNotEmpty(photo)) {
+          return getFile(photo)
+        } else {
+          return defaultImage
+        }
+      },
+      // 更换头像
+      afterRead(file) {
+        this.trueFile = file.file
+        uploadFile(file.file).then(res => {
+          const url = getImage(res.data.id)
+          this.employee.photo = res.data.id
+        })
+      },
+      updateInfu() {
+        const arr = {
+          attrValueVoList: [],
+          positionVoList: [],
+          roleVoList: this.roleList,
+          userGroupPoList: [],
+          partyEmployeePo: this.employee,
+          user: this.employee
+        }
+        // console.log(arr)
+        changeUserInfo(arr).then(res2 => {
+          this.$toast('更新个人信息成功!')
+        }).catch(err => {
+          console.log('错误信息', err)
+        })
+      },
+      getImage(id) {
+        if (id === '') {
+          return defaultImage
+        }
+        if (/^\d+$/.test(id)) {
+          return getImage(id)
+        } else {
+          return getFile(id)
+
+        }
+
+        // return getImage(id)
       }
-      return getImage(id)
     }
   }
-}
 </script>
 <style lang="scss" scoped>
   .my-user-info {
@@ -181,4 +187,4 @@ export default {
       font-size: 16px;
     }
   }
-</style>
+</style>

+ 284 - 330
src/views/system/dashboard/index.vue

@@ -8,10 +8,7 @@
     <!--幻灯片-->
     <div class="dashboard-swipe ">
       <van-swipe :autoplay="11000">
-        <van-swipe-item
-          v-for="(swipe, index) in swipes"
-          :key="index"
-        >
+        <van-swipe-item v-for="(swipe, index) in swipes" :key="index">
           <img v-lazy="swipe.image||blankImage">
         </van-swipe-item>
       </van-swipe>
@@ -20,36 +17,15 @@
     <!--通知-->
     <template v-if="noticeList && noticeList.length > 0">
       <div class="dashboard-notice" style="height: 52px;background: #F3F3F3;">
-        <van-swipe
-          :autoplay="6000"
-          :height="44"
-          :show-indicators="false"
-          :initial-swipe="initialNotice()"
-          style="height:44px;"
-          vertical
-        >
-          <van-swipe-item
-            v-for="(notice, index) in noticeList"
-            :key="index"
-          >
-            <van-notice-bar
-              background="#ffffff"
-              style="height:44px;"
-              color="#979797"
-              mode="link"
-              @click="onNotice(notice)"
-            >
+        <van-swipe :autoplay="6000" :height="44" :show-indicators="false" :initial-swipe="initialNotice()"
+          style="height:44px;" vertical>
+          <van-swipe-item v-for="(notice, index) in noticeList" :key="index">
+            <van-notice-bar background="#ffffff" style="height:44px;" color="#979797" mode="link"
+              @click="onNotice(notice)">
               <span class="ibps-pl-10"> {{ notice.title }}</span>
               <template #left-icon>
-                <ibps-avatar
-                  icon="volume-o"
-                  bg-color="#3396FB"
-                  color="#ffffff"
-                  radius="8"
-                  width="24"
-                  height="24"
-                  icon-size="12"
-                />
+                <ibps-avatar icon="volume-o" bg-color="#3396FB" color="#ffffff" radius="8" width="24" height="24"
+                  icon-size="12" />
               </template>
             </van-notice-bar>
           </van-swipe-item>
@@ -62,24 +38,12 @@
 
     <!--栏目-->
     <template v-if="dashboards && dashboards.length >0">
-      <van-collapse
-        v-model="activeDashboards"
-        :border="false"
-      >
-        <van-collapse-item
-          v-for="(dashboard,index) in dashboards"
-          :key="dashboard[aliasKey]+index"
-          :name="dashboard[aliasKey]"
-          :border="false"
-          :is-link="false"
-        >
+      <van-collapse v-model="activeDashboards" :border="false">
+        <van-collapse-item v-for="(dashboard,index) in dashboards" :key="dashboard[aliasKey]+index"
+          :name="dashboard[aliasKey]" :border="false" :is-link="false">
           <template #title>
             <h2 class="menus-title">
-              <van-icon
-                :name="dashboard.icon"
-                :color="dashboard.iconBgColor"
-                class-prefix="ibps-icon"
-              />
+              <van-icon :name="dashboard.icon" :color="dashboard.iconBgColor" class-prefix="ibps-icon" />
               {{ getText(dashboard) }}
               <span class="icon-wrapper">
                 <van-icon :name="getIcon(dashboard.alias) ?'arrow-down':'arrow-up'" class="icon-displacement" />
@@ -87,23 +51,11 @@
             </h2>
           </template>
           <van-grid :column-num="4" :border="false" class="avatar-grid">
-            <van-grid-item
-              v-for="menu in dashboard[childrenKey]"
-              :key="menu[aliasKey]"
-              :badge="getBadge(menu)"
-              :text="getText(menu)"
-              @click.native="onClick(menu)"
-            >
+            <van-grid-item v-for="menu in dashboard[childrenKey]" :key="menu[aliasKey]" :badge="getBadge(menu)"
+              :text="getText(menu)" @click.native="onClick(menu)">
               <template #icon>
-                <ibps-avatar
-                  :icon="menu.icon"
-                  :text="getText(menu)"
-                  :bg-color="menu.iconBgColor"
-                  :color="menu.iconFontColor"
-                  icon-prefix="ibps-icon"
-                  radius="17"
-                  class="ibps-mb-10 avatar-layout"
-                />
+                <ibps-avatar :icon="menu.icon" :text="getText(menu)" :bg-color="menu.iconBgColor"
+                  :color="menu.iconFontColor" icon-prefix="ibps-icon" radius="17" class="ibps-mb-10 avatar-layout" />
               </template>
 
             </van-grid-item>
@@ -112,24 +64,13 @@
       </van-collapse>
     </template>
     <div v-else>
-      <van-empty
-        v-if="emptyData"
-        :type="resultType"
-        :description="resultMessage"
-      />
+      <van-empty v-if="emptyData" :type="resultType" :description="resultMessage" />
       <!--骨架屏-->
       <template v-else>
-        <div
-          v-for="i in 8"
-          :key="i"
-          class="van-hairline--bottom dashboard-menus empty-data van-skeleton--animate"
-        >
+        <div v-for="i in 8" :key="i" class="van-hairline--bottom dashboard-menus empty-data van-skeleton--animate">
           <h2 class="menus-title">&nbsp;</h2>
           <van-grid :column-num="4" :border="false">
-            <van-grid-item
-              v-for="j in 8"
-              :key="j"
-            >
+            <van-grid-item v-for="j in 8" :key="j">
               <template #icon>
                 <div class="avatar avatar--rounded">&nbsp;</div>
               </template>
@@ -142,119 +83,95 @@
       </template>
     </div>
 
-    <notice-dialog
-      :id="noticeId"
-      :visible="noticeVisible"
-      readonly
-      @close="visible => noticeVisible = visible"
-    />
+    <notice-dialog :id="noticeId" :visible="noticeVisible" readonly @close="visible => noticeVisible = visible" />
   </div>
 </template>
 <script>
-import Vue from 'vue'
-import { getMenuData, getInfoCount } from '@/api/platform/auth/appres'
-import { queryPageList } from '@/api/platform/system/news'
-import ActionUtils from '@/utils/action'
-// import navbar from '@/mixins/navbar'
-import { Lazyload } from 'vant'
-Vue.use(Lazyload)
-import TreeUtils from '@/utils/tree'
-import i18n from '@/utils/i18n' // Internationalization 国际化
-import IbpsAvatar from '@/components/ibps-avatar'
-import NoticeDialog from '@/views/platform/notice/edit'
-// 透明图片
-const BLANK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
-export default {
-  name: 'dashboard',
-  // mixins: [navbar],
-  components: {
-    IbpsAvatar,
-    NoticeDialog
-  },
-  data() {
-    const { userInfo } = this.$store.getters
-    return {
-      userInfo,
-      idKey: 'id',
-      aliasKey: 'alias',
-      labelKey: 'name',
-      parentIdKey: 'parentId',
-      childrenKey: 'children',
-      urlKey: 'defaultUrl',
-      dashboards: [],
-      emptyData: false,
-      resultType: 'empty',
-      resultMessage: '没有应用,请联系管理员',
-      countInfo: {}, // 右上角图标
-      swipes: [],
-      blankImage: BLANK,
-
-      noticeList: [],
-      emptyNoticeData: false,
-      activeDashboards: [],
-      noticeVisible: false,
-      noticeId: ''
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    getIcon(data) {
-      return this.activeDashboards.includes(data)
-    },
-    changeIcon(data) {
-      console.info(data, this.activeDashboards)
+  import Vue from 'vue'
+  import { getMenuData, getInfoCount } from '@/api/platform/auth/appres'
+  import { queryPageList } from '@/api/platform/system/news'
+  import ActionUtils from '@/utils/action'
+  // import navbar from '@/mixins/navbar'
+  import { Lazyload } from 'vant'
+  Vue.use(Lazyload)
+  import TreeUtils from '@/utils/tree'
+  import i18n from '@/utils/i18n' // Internationalization 国际化
+  import IbpsAvatar from '@/components/ibps-avatar'
+  import NoticeDialog from '@/views/platform/notice/edit'
+  // 透明图片
+  const BLANK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
+  export default {
+    name: 'dashboard',
+    // mixins: [navbar],
+    components: {
+      IbpsAvatar,
+      NoticeDialog
     },
-    svgName(name) {
-      return `#${name}`
-    },
-    getImage(menu) {
-      if (menu.iconType === 'image') {
-        return menu.icon
+    data() {
+      const { userInfo } = this.$store.getters
+      return {
+        userInfo,
+        idKey: 'id',
+        aliasKey: 'alias',
+        labelKey: 'name',
+        parentIdKey: 'parentId',
+        childrenKey: 'children',
+        urlKey: 'defaultUrl',
+        dashboards: [],
+        emptyData: false,
+        resultType: 'empty',
+        resultMessage: '没有应用,请联系管理员',
+        countInfo: {}, // 右上角图标
+        swipes: [],
+        blankImage: BLANK,
+
+        noticeList: [],
+        emptyNoticeData: false,
+        activeDashboards: [],
+        noticeVisible: false,
+        noticeId: ''
       }
-      return
-    },
-    getText(menu) {
-      return i18n.generateTitle(menu[this.aliasKey], menu[this.labelKey])
     },
-    getBadge(menu) {
-      const info = this.countInfo[menu[this.aliasKey]]
-      if (this.$utils.isNotEmpty(info)) { return info > 99 ? '99+' : info === '0' ? '' : info }
+    created() {
+      this.loadData()
     },
-    loadData() {
-      this.loadMenus()
-      this.loadCountInfo()
-      this.loadNotice()
-    },
-    loadMenus() {
-      this.swipes = [{}]
-      this.swipes = [
-        { image: './images/swipes/banner1.png' },
-        { image: './images/swipes/banner2.png' },
-        { image: './images/swipes/banner3.png' }
-      ]
-      if (this.userInfo.employee.jiNengZhiCheng !== 'inside' && this.userInfo.employee.isSuper === 'N') {
-        this.dashboards = []
-        if (this.$utils.isNotEmpty(this.dashboards)) {
-          const activeDashboards = []
-          this.dashboards.forEach((d) => {
-            activeDashboards.push(d[this.aliasKey])
-          })
-          this.activeDashboards = activeDashboards
+    methods: {
+      getIcon(data) {
+        return this.activeDashboards.includes(data)
+      },
+      changeIcon(data) {
+        console.info(data, this.activeDashboards)
+      },
+      svgName(name) {
+        return `#${name}`
+      },
+      getImage(menu) {
+        if (menu.iconType === 'image') {
+          return menu.icon
         }
-        this.emptyData = !(this.dashboards.length > 0)
-      } else {
-        getMenuData().then(response => {
-          const data = response.data
-          const listData = data.filter((d) => {
-            return d.id !== '0'
-          })
-          this.dashboards = TreeUtils.transformToTreeFormat(listData, {
-            idKey: this.idKey,
-            parentIdKey: this.parentIdKey,
-            childrenKey: this.childrenKey
-          })
+        return
+      },
+      getText(menu) {
+        return i18n.generateTitle(menu[this.aliasKey], menu[this.labelKey])
+      },
+      getBadge(menu) {
+        const info = this.countInfo[menu[this.aliasKey]]
+        if (this.$utils.isNotEmpty(info)) { return info > 99 ? '99+' : info === '0' ? '' : info }
+      },
+      loadData() {
+        this.loadMenus()
+        this.loadCountInfo()
+        this.loadNotice()
+      },
+      loadMenus() {
+        this.swipes = [{}]
+        this.swipes = [
+          { image: './images/swipes/banner1.png' },
+          { image: './images/swipes/banner2.png' },
+          { image: './images/swipes/banner3.png' }
+        ]
+        if (this.userInfo.employee.jiNengZhiCheng !== 'inside' && this.userInfo.employee.isSuper === 'N') {
+          this.dashboards = []
           if (this.$utils.isNotEmpty(this.dashboards)) {
             const activeDashboards = []
             this.dashboards.forEach((d) => {
@@ -262,179 +179,216 @@ export default {
             })
             this.activeDashboards = activeDashboards
           }
-          this.emptyData = !(listData.length > 0)
-        }).catch((e) => {
-          this.emptyData = true
-          this.resultType = 'error'
-          this.resultMessage = e.message
-        })
-      }
-    },
-    loadCountInfo() {
-      getInfoCount().then(response => {
-        const data = response.data
-        const countInfo = {}
-        data.forEach((d) => {
-          countInfo[d.alias] = d.dataText
-        })
-        this.countInfo = countInfo
-      }).catch((e) => {
-      })
-    },
-
-    loadNotice() {
-      this.emptyNoticeData = false
-      const params = ActionUtils.formatParams({ status: 'publish' }, { page: 1, limit: 5 })
-      queryPageList(params).then(response => {
-        this.noticeList = response.data.dataResult
-        this.emptyNoticeData = !(this.noticeList.length > 0)
-      }).catch((e) => {
-        this.emptyNoticeData = true
-      })
-    },
-    initialNotice() {
-      return Math.floor((Math.random() * this.noticeList.length))
-    },
-    onClick(menu) {
-      const url = menu[this.urlKey]
-      if (this.$utils.isNotEmpty(url)) {
-        if (/^https:\/\/|http:\/\//.test(url)) {
-          this.$utils.open(url)
+          this.emptyData = !(this.dashboards.length > 0)
         } else {
-          this.$router.push({ path: url })
-        }
-      } else {
-        // 判断是否有下级菜单如果有
-        if (this.$utils.isNotEmpty(menu.children)) {
-          this.$router.push({
-            name: 'next-menu',
-            params: {
-              title: menu.name,
-              menus: menu.children
+          getMenuData().then(response => {
+            const data = response.data
+            const listData = data.filter((d) => {
+              return d.id !== '0'
+            })
+            this.dashboards = TreeUtils.transformToTreeFormat(listData, {
+              idKey: this.idKey,
+              parentIdKey: this.parentIdKey,
+              childrenKey: this.childrenKey
+            })
+            if (this.$utils.isNotEmpty(this.dashboards)) {
+              const activeDashboards = []
+              this.dashboards.forEach((d) => {
+                activeDashboards.push(d[this.aliasKey])
+              })
+              this.activeDashboards = activeDashboards
             }
+            this.emptyData = !(listData.length > 0)
+          }).catch((e) => {
+            this.emptyData = true
+            this.resultType = 'error'
+            this.resultMessage = e.message
           })
-        } else {
-          this.$notify({
-            type: 'danger',
-            message: '未配置菜单的url路径,请在PC后台配置!'
+        }
+      },
+      loadCountInfo() {
+        getInfoCount().then(response => {
+          const data = response.data
+          const countInfo = {}
+          data.forEach((d) => {
+            countInfo[d.alias] = d.dataText
           })
+          this.countInfo = countInfo
+        }).catch((e) => {
+        })
+      },
+
+      loadNotice() {
+        this.emptyNoticeData = false
+        const params = ActionUtils.formatParams({ status: 'publish' }, { page: 1, limit: 5 })
+        queryPageList(params).then(response => {
+          this.noticeList = response.data.dataResult
+          this.emptyNoticeData = !(this.noticeList.length > 0)
+        }).catch((e) => {
+          this.emptyNoticeData = true
+        })
+      },
+      initialNotice() {
+        return Math.floor((Math.random() * this.noticeList.length))
+      },
+      onClick(menu) {
+        const url = (menu.alias == "myTest" ? "/bpmn/myTest/index" : menu[this.urlKey])
+        // const url =  menu[this.urlKey]
+        console.log("url", url);
+        if (this.$utils.isNotEmpty(url)) {
+          if (/^https:\/\/|http:\/\//.test(url)) {
+            this.$utils.open(url)
+          } else {
+            this.$router.push({ path: url })
+          }
+        } else {
+          // 判断是否有下级菜单如果有
+          if (this.$utils.isNotEmpty(menu.children)) {
+            this.$router.push({
+              name: 'next-menu',
+              params: {
+                title: menu.name,
+                menus: menu.children
+              }
+            })
+          } else {
+            this.$notify({
+              type: 'danger',
+              message: '未配置菜单的url路径,请在PC后台配置!'
+            })
+          }
         }
+      },
+      onNotice(item) {
+        this.noticeId = item.id
+        this.noticeVisible = true
+        // this.$router.push({
+        //   name: 'noticeDetail',
+        //   query: {
+        //     id: item.id
+        //   }
+        // })
       }
-    },
-    onNotice(item) {
-      this.noticeId = item.id
-      this.noticeVisible = true
-      // this.$router.push({
-      //   name: 'noticeDetail',
-      //   query: {
-      //     id: item.id
-      //   }
-      // })
     }
   }
-}
 </script>
 <style lang="scss">
-.dashboard {
-  .dashboard-menus{
-    margin: 0 15px;
-  }
-
-  .menus-title{
-    margin: 0;
-    font-weight: 600;
-    font-size: 14px;
-  }
-  .van-grid-item__text{
-    overflow: hidden;
-    text-overflow: ellipsis;
-    display: -webkit-box;
-    -webkit-line-clamp: 1;
-    -webkit-box-orient: vertical;
-  }
-  /**滚屏 */
-  .dashboard-swipe {
-    .van-swipe {
-      cursor: pointer;
+  .dashboard {
+    .dashboard-menus {
+      margin: 0 15px;
     }
-    .van-swipe-item {
-      color: #fff;
-      font-size: 20px;
-      text-align: center;
-      line-height: 120px
-    }
-    .van-swipe-item:nth-child(even) {
-      background-color: #f7f7f7;
-      background: -webkit-linear-gradient(#f7f7f7, #f0f7fb);
+
+    .menus-title {
+      margin: 0;
+      font-weight: 600;
+      font-size: 14px;
     }
-    .van-swipe-item:nth-child(odd) {
-      background-color: #f0f7fb;
-      background: -webkit-linear-gradient(#f0f7fb, #f7f7f7);
+
+    .van-grid-item__text {
+      overflow: hidden;
+      text-overflow: ellipsis;
+      display: -webkit-box;
+      -webkit-line-clamp: 1;
+      -webkit-box-orient: vertical;
     }
-    .van-swipe img {
+
+    /**滚屏 */
+    .dashboard-swipe {
+      .van-swipe {
+        cursor: pointer;
+      }
+
+      .van-swipe-item {
+        color: #fff;
+        font-size: 20px;
+        text-align: center;
+        line-height: 120px
+      }
+
+      .van-swipe-item:nth-child(even) {
+        background-color: #f7f7f7;
+        background: -webkit-linear-gradient(#f7f7f7, #f0f7fb);
+      }
+
+      .van-swipe-item:nth-child(odd) {
+        background-color: #f0f7fb;
+        background: -webkit-linear-gradient(#f0f7fb, #f7f7f7);
+      }
+
+      .van-swipe img {
         width: 100%;
         height: 180px;
         display: block;
         box-sizing: border-box;
         pointer-events: none;
+      }
     }
-  }
-  /**公告 */
-  .dashboard-notice{
-    .van-swipe-item {
+
+    /**公告 */
+    .dashboard-notice {
+      .van-swipe-item {
         text-align: center;
         line-height: 36px
+      }
+
+      .van-swipe-item:nth-child(even) {
+        background-color: #f7f7f7;
+        background: -webkit-linear-gradient(#f7f7f7, #f0f7fb);
+      }
+
+      .van-swipe-item:nth-child(odd) {
+        background-color: #f0f7fb;
+        background: -webkit-linear-gradient(#f0f7fb, #f7f7f7);
+      }
     }
-    .van-swipe-item:nth-child(even) {
-      background-color: #f7f7f7;
-      background: -webkit-linear-gradient(#f7f7f7, #f0f7fb);
-    }
-    .van-swipe-item:nth-child(odd) {
-      background-color: #f0f7fb;
-      background: -webkit-linear-gradient(#f0f7fb, #f7f7f7);
+
+    .dashboard-notice__empty {
+      width: 100%;
+      height: 36px;
+      background-color: #f2f3f5;
     }
-  }
 
-  .dashboard-notice__empty{
-    width: 100%;
-    height: 36px;
-    background-color: #f2f3f5;
-  }
-  .empty-data{
-    .menus-title {
-      background-color: #f7f7f7;
-      background: -webkit-linear-gradient(#f7f7f7, #f0f7fb);
-      width: 70px;
-      margin:10px;
-      height: 16px;
+    .empty-data {
+      .menus-title {
+        background-color: #f7f7f7;
+        background: -webkit-linear-gradient(#f7f7f7, #f0f7fb);
+        width: 70px;
+        margin: 10px;
+        height: 16px;
+      }
+
+      .avatar {
+        width: 48px;
+        height: 48px;
+        background: #f9f9f9;
+        margin-bottom: 5px;
+        border-radius: 12px;
+      }
+
+      .title {
+        width: 48px;
+        height: 16px;
+        background: #f9f9f9;
+      }
     }
-    .avatar{
-      width: 48px;
-      height: 48px;
-      background: #f9f9f9;
-      margin-bottom:5px ;
-      border-radius: 12px;
+
+    .avatar-grid {
+      margin: -12px -16px;
     }
-    .title{
-      width: 48px;
-      height: 16px;
-      background: #f9f9f9;
+
+    .avatar-layout {
+      height: 50px;
+      width: 50px;
     }
-  }
-  .avatar-grid{
-    margin: -12px -16px;
-  }
-  .avatar-layout{
-    height: 50px;
-    width: 50px;
-  }
-  .icon-wrapper{
-    position: relative;
-    margin-left: 5px;
-    .icon-displacement{
-      position: absolute;
-      top: 1px;
+
+    .icon-wrapper {
+      position: relative;
+      margin-left: 5px;
+
+      .icon-displacement {
+        position: absolute;
+        top: 1px;
+      }
     }
   }
-}
-</style>
+</style>