按钮级别的新版本,多级别的组织架构
loulijun2021
2023-08-02 f2587f2104ea44568171de5b3ec844868fb6224b
1.角色权限完善
已添加1个文件
已修改4个文件
524 ■■■■ 文件已修改
src/api/basicSettings.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/styles/global.css 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/debounceAndThrottle.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicSettings/roleList.vue 448 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basicSettings.js
@@ -26,6 +26,14 @@
    params: data
  })
}
// è§’色权限提交
export function RolePermissionSava(data) {
  return request({
    url: 'BasicSetting/RolePermissionSava',
    method: 'post',
    data
  })
}
// ç»„织架构新增编辑
// export function AddUpdateOrganization(data) {
src/styles/global.css
@@ -116,6 +116,15 @@
  font-size: 26px !important;
}
.el-button{
  height: 34px ;
  display: flex !important;
  align-items: center;
  justify-content: center;
}
/*
定义滚动条高宽及背景
高宽分别对应横竖滚动条的尺寸
src/utils/debounceAndThrottle.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
// èŠ‚æµæ˜¯æŒ‡:让其在第一次触发事件
// é˜²æŠ–是指:让其在最后一次触发事件
// fn对应的时间处理函数,delay间隔时间,immediate第一次是否立即执行
// é˜²æŠ–
const debounce = function(fn, delay, immediate) {
  let timer = null
  return function() {
    const that = this
    const arg = arguments
    if (timer) {
      clearTimeout(timer)
    }
    if (immediate) {
      const bool = !timer
      timer = setTimeout(() => {
        timer = null
      }, delay)
      if (bool) {
        fn.apply(that, arg)
      }
    } else {
      timer = setTimeout(() => {
        timer = null
        fn.apply(that, arg)
      }, delay)
    }
  }
}
// èŠ‚æµ
const throttle = function(fn, delay, immediate) {
  let timer = null
  return function() {
    const that = this
    const arg = arguments
    if (immediate) {
      if (!timer) {
        timer = setTimeout(() => {
          timer = null
        }, delay)
        fn.apply(that, arg)
      }
    } else {
      if (!timer) {
        timer = setTimeout(() => {
          timer = null
          fn.apply(that, arg)
        }, delay)
      }
    }
  }
}
export { debounce, throttle }
src/views/basicSettings/roleList.vue
@@ -1,93 +1,80 @@
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div class="bodyTopButtonGroup" style="justify-content: space-between">
        <el-button v-waves type="primary" icon="el-icon-circle-plus-outline">新增</el-button>
        <el-button v-waves icon="el-icon-download">导入</el-button>
      </div>
      <div class="bodyTopFormGroup">
        <el-form
          ref="form"
          :model="form"
          label-width="100px"
          inline
          style="display: flex;"
        >
          <div class="elForm">
            <el-form-item label="母件编码" style=" display: flex;">
              <el-input v-model="form.OrgCode" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="母件名称" style=" display: flex;">
              <el-input v-model="form.OrgName" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="母件规格" style=" display: flex;">
              <el-input v-model="form.OrgName" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="版本编号" style=" display: flex;">
              <el-input v-model="form.OrgName" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="创建人员" style=" display: flex;">
              <el-input v-model="form.UserName" style="width: 200px" placeholder="请输入" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="创建日期" style=" display: flex;">
              <el-date-picker
                v-model="form.createdate"
                style="width: 200px"
                type="date"
                placeholder="选择日期"
              />
            </el-form-item>
          </div>
          <div
            class="bodySearchReset"
            :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
          >
            <el-button v-waves type="primary" icon="el-icon-search">查询</el-button>
            <el-button v-waves type="info" icon="el-icon-refresh">重置</el-button>
          </div>
        </el-form>
        <div
          class="bodyTopFormExpand"
        >
          <svg-icon
            v-show="mouseHoverType==='mouseout'"
            style="cursor: pointer"
            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
            @mouseenter="mouseHoverType=$event.type"
          />
          <svg-icon
            v-show="mouseHoverType==='mouseenter'"
            style="cursor: pointer"
            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
            @click="isExpandForm=!isExpandForm"
            @mouseout="mouseHoverType=$event.type"
          />
        </div>
      </div>
      <div
        class="elTableDiv"
      >
        <div style="width: 300px;">
        <div style="width: 300px;background:#fff">
          <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;">
            <div style="display: flex;">
              <div
                style="width: 5px;height: 100%;border-radius: 5px;"
                :style="{background:$store.state.settings.theme}"
              />
              <div style="margin-left: 8px;">角色名称</div>
            </div>
            <div style="margin-right:10px">
              <i class="el-icon-plus" style="cursor: pointer;color: #999" @click="rolePlusClick" />
            </div>
          </div>
          <el-tree
            ref="treeLeftRef"
            style="padding: 10px;"
            :style="{height:isExpandForm?tableHeight:(tableHeight+105)+'px'}"
            style="padding: 10px;overflow: scroll"
            :style="{height:(tableHeight-20)+'px'}"
            :data="treeLeft"
            node-key="code"
            highlight-current
            :props="defaultPropsLeft"
            :default-expand-all="true"
            :expand-on-click-node="false"
            @node-click="treeLeftNodeClick"
          />
          >
            <span slot-scope="{ node, data }" class="custom-tree-node">
              <span v-if="!data.isEdit">{{ node.label }}</span>
              <input
                v-if="data.isEdit"
                :ref="data.code"
                v-model="node.label"
                type="text"
                @click.stop
                @blur="roleSave(data)"
                @keyup.enter="roleSave(data)"
              >
              <span v-if="!data.isEdit">
                <i
                  v-if="data.code!=='000'"
                  class="el-icon-edit"
                  style="margin-right:10px;color: #999"
                  @click.stop="val=>roleEditClick(val,node,data)"
                />
                <i
                  v-if="data.code!=='000'"
                  class="el-icon-delete"
                  style="margin-right: 4px;color: #999"
                  @click.stop="val=>roleDeleteClick(val,node,data)"
                />
              </span>
            </span>
          </el-tree>
        </div>
        <div
          style="margin-left: 15px;width:100%;"
          style="margin-left: 15px;width:100%;position: relative"
        >
          <el-button
            style="position: absolute;right: 15px;z-index:1;top:3px"
            type="primary"
            @click="saveClick"
          >保 å­˜</el-button>
          <el-tabs v-model="activeName" type="border-card">
            <el-tab-pane label="PC端" name="PC端">
              <div style="display: flex;">
@@ -96,14 +83,14 @@
                  ref="scrollLeft"
                  style="border-right: 1px solid rgba(0,0,0,0.2);width: 200px;
                  overflow-y: auto;overflow-x:hidden;"
                  :style="{height:isExpandForm?tableHeight:(tableHeight+35)+'px',}"
                  :style="{height:(tableHeight-40)+'px'}"
                  @scroll="scrollLeftScroll()"
                  @mouseover="changeScrollLeftFlag('left')"
                  @mouseover="isScroll='left'"
                >
                  <div style=" ">
                    <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> èœå•权限
                  </div>
                  <!--                  :style="{height:isExpandForm?tableHeight:(tableHeight+15)+'px',}"-->
                  <el-tree
                    ref="treeCenterRef"
                    style="padding-top: 10px;width: 199px;"
@@ -122,9 +109,9 @@
                <div
                  ref="scrollCenter"
                  style="border-right: 1px solid rgba(0,0,0,0.2);width: 600px;padding-left: 10px;overflow-y: auto"
                  :style="{height:isExpandForm?tableHeight:(tableHeight+35)+'px',}"
                  :style="{height:(tableHeight-40)+'px'}"
                  @scroll="scrollCenterScroll()"
                  @mouseover="changeScrollLeftFlag('center')"
                  @mouseover="isScroll='center'"
                >
                  <div style=" ">
                    <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> æŒ‰é’®æƒé™
@@ -155,8 +142,8 @@
                        <el-checkbox
                          v-for="i in it.itemButton"
                          :key="i"
                          :label="i"
                          :key="i.code"
                          :label="i.name"
                          style="display:flex;align-items: center"
                        />
                      </el-checkbox-group>
@@ -169,9 +156,9 @@
                <div
                  ref="scrollRight"
                  style="width: 360px;padding-left: 10px;overflow-y: auto"
                  :style="{height:isExpandForm?tableHeight:(tableHeight+35)+'px',}"
                  :style="{height:(tableHeight-40)+'px',}"
                  @scroll="scrollRightScroll()"
                  @mouseover="changeScrollLeftFlag('right')"
                  @mouseover="isScroll='right'"
                >
                  <div style=" ">
                    <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> æ•°æ®æƒé™
@@ -201,9 +188,9 @@
                      >
                        <el-radio
                          v-for="i in it.itemData"
                          :key="i"
                          :key="i.code"
                          style="display:flex;align-items: center"
                          :label="i"
                          :label="i.name"
                        />
                      </el-radio-group>
                    </div>
@@ -228,42 +215,26 @@
</template>
<script>
import Pagination from '@/components/Pagination'
import ImportPicker from '@/components/ImportPicker'
import elDragDialog from '@/directive/el-drag-dialog'
import waves from '@/directive/waves'
import {
  RolePermissionSava,
  RolePermissionSearchRole,
  RolePermissionSearchRoleMenu,
  RolePermissionSearchRoleMenuButton
} from '@/api/basicSettings'
import arrayToTree from 'array-to-tree'
import { throttle } from '@/utils/debounceAndThrottle'
export default {
  name: 'Zzjg',
  components: {
    Pagination, ImportPicker
  },
  directives: { elDragDialog, waves },
  name: 'RoleList',
  directives: { waves },
  data() {
    return {
      mouseHoverType: 'mouseout',
      isExpandForm: false,
      mainHeight: 0,
      tableHeight: 0,
      form: {
        OrgCode: '', // ç»„织架构代码
        OrgName: '', // ç»„织架构名称
        OrgType: '', // ç»„织类型
        UserName: '', // åˆ›å»ºäººå‘˜
        createdate: '',
        prop: 'lm_date', // æŽ’序字段
        order: 'desc', // æŽ’序字段
        page: 1, // ç¬¬å‡ é¡µ
        rows: 20 // æ¯é¡µå¤šå°‘条
      },
      treeLeft: [],
      treeCenter: [],
      treeLeft: [], // å·¦ä¾§æ ‘
      treeCenter: [], // ä¸­é—´æ ‘
      defaultPropsLeft: {
        children: 'roles',
        label: 'name'
@@ -285,6 +256,20 @@
    }
  },
  watch: {
    treeLeft: {
      handler(newValue, oldValue) {
        newValue[0].roles.forEach(i => {
          if (i.isEdit) {
            this.$nextTick(() => {
              this.$refs[i.code].focus()
            })
          }
        })
      },
      deep: true
    }
  },
  created() {
    this.getRolePermissionSearchRole()
@@ -298,7 +283,12 @@
    // èŽ·å–è§’è‰²æƒé™æŸ¥è¯¢è§’è‰²
    async getRolePermissionSearchRole() {
      const { data: res } = await RolePermissionSearchRole()
      res[0].roles.forEach(i => {
        i.isEdit = false
      })
      this.treeLeft = res
      if (res.length > 0) {
        this.$nextTick(() => { // é»˜è®¤é€‰ä¸­ç¬¬ä¸€ä¸ª
          this.$refs.treeLeftRef.setCurrentKey(res[0].roles[0].code) // é»˜è®¤é€‰ä¸­èŠ‚ç‚¹ç¬¬ä¸€ä¸ª
@@ -327,12 +317,11 @@
      this.menuCheckedCodeArr = []
      // console.log(this.allButtonData, 213)
      result.forEach(item => {
        if (item.children && item.children.length) {
          item.children.forEach(it => {
            // æŒ‰é’®æƒé™å›žæ˜¾
            const buttonAll = this.allButtonData.tButton.filter(j => j.menucode === it.code).map(j => j.name)
            const buttonAll = this.allButtonData.tButton.filter(j => j.menucode === it.code)
            const buttonChecked = this.allButtonData.tButton.filter(j =>
              j.menucode === it.code && j.flag === 'Y'
            ).map(j => j.name)
@@ -340,11 +329,11 @@
            it.checkedButton = buttonChecked
            // æ•°æ®æƒé™å›žæ˜¾
            const dataAll = this.allButtonData.tData.filter(j => j.menucode === it.code).map(j => j.name)
            const dataChecked = this.allButtonData.tData.filter(j => j.menucode === it.code && j.flag === 'Y').name
            // console.log(dataAll, dataChecked, 2)
            const dataAll = this.allButtonData.tData.filter(j => j.menucode === it.code)
            const dataChecked = this.allButtonData.tData.filter(j => j.menucode === it.code && j.flag === 'Y')
            it.itemData = dataAll
            it.checkedData = dataChecked
            it.checkedData = dataChecked.length > 0 ? dataChecked[0].name : []
            // ç”¨ä½œèœå•勾选回显
            if (it.flag === 'Y') {
@@ -356,22 +345,20 @@
        }
      })
      console.log(JSON.parse(JSON.stringify(result)), 8)
      // console.log(JSON.parse(JSON.stringify(result)), 8)
      this.treeCenter = [
        { code: '-1', name: '全部', flag: result.every(i => i.flag === 'Y') ? 'Y' : 'N', children: result }
      ]
      // this.buttonIsChecked = result.every(i => i.flag === 'Y')
      this.handleCheckedButtonChange('', '', true)
      this.handleCheckedDataChange('', '', true)
      // console.log(this.menuCheckedCodeArr, 2)
      this.$nextTick(() => {
        this.$refs.treeCenterRef.setCheckedKeys(this.menuCheckedCodeArr)
      })
      this.$forceUpdate()
      // console.log(this.treeCenter[0].children)
    },
    // å·¦è¾¹æ»šåŠ¨æ¡æ»‘åŠ¨æ—¶
@@ -395,15 +382,6 @@
        this.$refs.scrollCenter.scrollTop = this.$refs.scrollRight.scrollTop
      }
    },
    resize() {
    },
    changeScrollLeftFlag(val) {
      this.isScroll = val
    },
    // å…¨é€‰æ”¹å˜
    handleCheckAllChange(val, belong) {
      const checkedKeys = this.$refs.treeCenterRef.getCheckedKeys()
@@ -414,7 +392,7 @@
            item.children.forEach(it => {
              if (checkedKeys.includes(it.code)) {
                if (belong === 'button') {
                  it.checkedButton = it.itemButton
                  it.checkedButton = it.itemButton.map(i => i.name)
                }
                if (belong === 'data') {
                  it.checkedData = '全部'
@@ -439,8 +417,6 @@
          }
        })
      }
      // console.log(this.treeCenter[0].children, 20)
    },
    // å•个按钮改变
    handleCheckedButtonChange(value, code, flag) {
@@ -470,7 +446,6 @@
      this.buttonIsChecked = count === childrenLength
      this.$forceUpdate()
    },
    // èŽ·å–æ ‘å½¢èŠ‚ç‚¹node
    getLeftTreeNode(data, Node, VueComponent) {
      // console.log(data, Node, VueComponent, 2221)
@@ -488,7 +463,7 @@
      }
      this.$forceUpdate()
    },
    // å¤„理树形勾选
    // å¤„理中间树形勾选
    handleTreeCenterCheck(obj, { checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys }) {
      // console.log(obj, checkedNodes, checkedKeys, halfCheckedNodes, halfCheckedKeys, '加多宝')
@@ -504,9 +479,10 @@
        }
      }
    },
    // å¤„理树形选中值改变
    // å¤„理中间树形选中值改变
    handleTreeCenterCheckChange(obj, selfChecked, selfChildrenTreeCheck) {
      // console.log(obj, selfChecked, selfChildrenTreeCheck, '王老吉')
      obj.flag = selfChecked ? 'Y' : 'N'
      if (!selfChildrenTreeCheck) {
        if (!selfChecked) {
          this.treeCenter[0].children.forEach(item => {
@@ -523,24 +499,22 @@
        }
      }
    },
    // å•选框按钮改变
    handleCheckedDataChange(value, code, flag) {
      // console.log(value, code)
      if (flag) {
      if (!flag) {
        this.menuCheckedCodeArr.push(code)
        this.menuCheckedCodeArr = [...new Set(this.menuCheckedCodeArr)]
        this.$refs.treeCenterRef.setCheckedKeys(this.menuCheckedCodeArr)
      }
      // è¿™é‡Œæ˜¯åˆ¤æ–­å…¨é€‰radio æ˜¯å¦é€‰ä¸­
      let count = 0
      let childrenLength = 0
      this.treeCenter[0].children.forEach(item => {
        if (item.children && item.children.length) {
          item.children.forEach(it => {
            if (it.checkedData) {
            if (it.checkedData.length > 0) {
              count++
            }
            if (it.itemData.length > 0) {
@@ -551,145 +525,107 @@
      })
      // console.log(count, childrenLength, 9)
      this.dataIsChecked = count === childrenLength
      // console.log(JSON.parse(JSON.stringify(this.treeCenter[0].children)))
      this.$forceUpdate()
    },
    async  treeLeftNodeClick(obj, Node, VueComponent) {
      // this.menuCheckedCodeArr = []
      await this.getRolePermissionSearchRoleMenuButton(obj.code)
      await this.getRolePermissionSearchRoleMenu(obj.code)
    // è§’色切换
    async treeLeftNodeClick(obj, Node, VueComponent) {
      if (obj.code !== '000') {
        await this.getRolePermissionSearchRoleMenuButton(obj.code)
        await this.getRolePermissionSearchRoleMenu(obj.code)
      }
    },
    // è§’色名称新增
    rolePlusClick() {
      this.treeLeft[0].roles.push({ code: 1234, name: '', isEdit: true })
    },
    // è§’色名称修改
    roleEditClick(self, node, data) {
      // console.log(self, node, data)
      this.treeLeft[0].roles.forEach(i => {
        i.isEdit = false
      })
      data.isEdit = !data.isEdit
    },
    // è§’色名称删除
    roleDeleteClick(self, node, data) {
      // console.log(self, node, data)
      // this.treeLeft[0].roles.forEach((item, index) => {
      //   if (item.code === data.code) {
      //     this.treeLeft[0].roles.splice(index, 1) // æš‚时先写成前端删除,后期调用接口删除
      //   }
      // })
    },
    // è§’色名称保存   é‡‡ç”¨é˜²æŠ–形式
    roleSave: throttle(function(data) {
      data.isEdit = false
      console.log('执行了!')
    }, 1000, true),
    // é¡µé¢å‹¾é€‰å¥½ä¿å­˜äº‹ä»¶
    saveClick() {
      // console.log(this.treeCenter)
      const rolecode = this.$refs.treeLeftRef.getCurrentKey()
      const roleMenu = []
      const roleButton = []
      const roleData = []
      this.treeCenter[0].children.forEach((item, index) => {
        if (item.children && item.children.length) {
          item.children.forEach((it, ind) => {
            if (it.flag === 'Y') {
              roleMenu.push({ rolecode, menucode: it.code })
              if (it.itemButton && it.itemButton.length && it.checkedButton.length > 0) {
                it.itemButton.forEach(i => {
                  if (it.checkedButton.includes(i.name)) {
                    roleButton.push({ rolecode, buttoncode: i.code })
                  }
                })
              }
              if (it.checkedData && it.checkedData.length) {
                roleData.push({ rolecode, datacode: it.itemData.find(i => i.name === it.checkedData).code })
              }
            }
          })
        }
      })
      // console.log(roleMenu)
      // console.log(roleButton)
      // console.log(roleData)
      const data = {
        roleMenu, roleButton, roleData
      }
      RolePermissionSava(data).then(res => {
        if (res.code === '200') {
          const rolename = this.treeLeft[0].roles.find(i => i.code === rolecode).name
          this.$notify.success(rolename + '的角色权限提交成功!')
          this.getRolePermissionSearchRoleMenuButton(rolecode)
          this.getRolePermissionSearchRoleMenu(rolecode)
        }
        this.$forceUpdate()
      })
    },
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 255
        // this.$refs.tableDataRef.doLayout()
        this.tableHeight = this.mainHeight - 50
      })
    }
  }
}
</script>
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-button--text {
  font-size: 14px;
  cursor: pointer;
}
.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline {
  margin-right: 15px;
}
::v-deep .el-button--primary, .el-button--default, .el-button--info {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 15px;
}
::v-deep .el-button--primary {
  //background-color: $main_color !important;
}
::v-deep .el-button--default {
  background-color: #f8f8fa;
  border: none;
}
::v-deep .el-input__inner {
  height: 34px;
  line-height: 34px;
  //color: #a7a7a7;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .dialogVisibleRoles .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .importPickerClass .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
<style scoped lang="scss">
.custom-tree-node {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
::v-deep .el-table::before {
  height: 0;
}
::v-deep .el-table__body-wrapper {
  background-color: #f8f8fa;
}
::v-deep .el-table__body .el-table__row.hover-row td {
  background-color: #eaecef;
}
::v-deep .el-form--inline .el-form-item__label {
  color: #a7a7a7;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-select__caret {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tableFixed {
  ::v-deep .el-table__fixed-right {
    height: 100% !important;
  }
  ::v-deep .el-table__fixed {
    height: 100% !important;
  }
}
</style>
<style>
.el-table .custom-row {
  background: #f8f8fa;
  font-size: 14px;
  padding-right: 8px;
}
</style>
src/views/login/index.vue
@@ -103,7 +103,7 @@
        <el-button
          :loading="loading"
          type="primary"
          style="width:100%;margin-top:20px;letter-spacing: 10px"
          style="width:100%;margin-top:30px;letter-spacing: 10px;height: 40px;"
          @click.native.prevent="handleLogin"
        >登录
        </el-button>
@@ -245,7 +245,7 @@
      }
      const res = await ForcedOffline(data)
      if (res.code === '200') {
        this.$message.success('强制下线成功!')
        this.$notify.success('强制下线成功!')
        this.dialogVisible = false
        this.$router.push({ path: this.redirect || '/' })
        // await this.handleLogin()