zhaoke il y a 2 ans
Parent
commit
1da666342c

+ 0 - 79
src/api/Account.js

@@ -1,79 +0,0 @@
-/*
- * @Author: Badguy
- * @Date: 2022-02-14 09:37:11
- * @LastEditTime: 2022-02-24 14:47:46
- * @LastEditors: Please set LastEditors
- * @Description: 账户管理api
- * have a nice day!
- */
-import request from '@/utils/request-4a'
-
-// 账号列表查询
-export function GetAccountList (params) {
-  return request({
-    url: '/api/fs4a/GetUserList/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-// 账号状态变更
-export function ChangeUserStatus (params) {
-  return request({
-    url: '/api/fs4a/ChangeUserStatus/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-// 账号删除
-export function delAccount (params) {
-  return request({
-    url: '/api/fs4a/DeleteUser/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-// 账号新增保存
-export function addAccount (params) {
-  return request({
-    url: '/api/fs4a/SaveUser/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-// 账号详情查询
-export function getAccountDetails (params) {
-  return request({
-    url: '/api/fs4a/GetUserDetails/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-// 账号编辑保存
-export function editAccount (params) {
-  return request({
-    url: '/api/fs4a/EditUser/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-// 根据登录后ID及USERTYPE查询拥有权限
-export function getAuthListByUser (params) {
-  return request({
-    url: '/api/fs4a/GetAuthListByUser/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}

+ 0 - 89
src/api/AccountGroup.js

@@ -1,89 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2022-02-21 14:01:21
- * @LastEditTime: 2022-02-21 14:03:21
- * @LastEditors: your name
- * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- * @FilePath: \CABaggageData\src\api\AccountGroup.js
- */
-import request from '@/utils/request-4a'
-
-// 账号组树查询
-export function GetGroupTree (params) {
-  return request({
-    url: '/api/fs4a/GetGroupTree/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//账号组新增
-export function SaveGroup (params) {
-  return request({
-    url: '/api/fs4a/SaveGroup/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//账号组删除
-export function DeleteGroup (params) {
-  return request({
-    url: '/api/fs4a/DeleteGroup/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//账号组详情
-export function GetGroupDetails (params) {
-  return request({
-    url: '/api/fs4a/GetGroupDetails/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//账号组修改状态
-export function ChangeGroupStatus (params) {
-  return request({
-    url: '/api/fs4a/ChangeGroupStatus/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-// 根据账号组获取权限树
-export function GetAuthTreeByGroup (params) {
-  return request({
-    url: '/api/fs4a/GetAuthTreeByGroup/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-// 修改保存账号组
-export function EditGroup (params) {
-  return request({
-    url: '/api/fs4a/EditGroup/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//根据账号组获取角色
-export function GetRoleByGroup (params) {
-  return request({
-    url: '/api/fs4a/GetRoleByGroup/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}

+ 0 - 210
src/api/apiAuthority.js

@@ -1,210 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-12-21 09:22:04
- * @LastEditTime: 2022-02-21 14:03:31
- * @LastEditors: Please set LastEditors
- * @Description: 权限项管理
- * @FilePath: \Foshan4A2.0\src\api\apiAuthority.js
- */
-import request from '@/utils/request-4a'
-
-//权限树查询
-export function GetAuthTree (params) {
-  return request({
-    url: '/api/fs4a/GetAuthTree/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//应用新增保存
-export function SaveApp (params) {
-  return request({
-    url: '/api/fs4a/SaveApp/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//应用详情查询
-export function GetAppDetails (params) {
-  return request({
-    url: '/api/fs4a/GetAppDetails/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//应用修改保存
-export function EditApp (params) {
-  return request({
-    url: '/api/fs4a/EditApp/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//应用状态变更
-export function UpdateAppStatus (params) {
-  return request({
-    url: '/api/fs4a/UpdateAppStatus/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//应用删除
-export function DeleteApp (params) {
-  return request({
-    url: '/api/fs4a/DeleteApp/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-
-//权限项修改保存
-export function EditAuth (params) {
-  return request({
-    url: '/api/fs4a/EditAuth/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//权限详情查询
-export function GetAuthDetails (params) {
-  return request({
-    url: '/api/fs4a/GetAuthDetails/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//根据权限获取授权规则
-export function GetAuthTo (params) {
-  return request({
-    url: '/api/fs4a/GetAuthTo/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//权限项新增保存
-export function SaveAuth (params) {
-  return request({
-    url: '/api/fs4a/SaveAuth/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//权限项删除
-export function DeleteAuth (params) {
-  return request({
-    url: '/api/fs4a/DeleteAuth/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//权限状态变更
-export function UpdateAuthStatus (params) {
-  return request({
-    url: '/api/fs4a/UpdateAuthStatus/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//角色新增保存
-export function SaveRole (params) {
-  return request({
-    url: '/api/fs4a/SaveRole/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//角色列表查询
-export function QueryRole (params) {
-  return request({
-    url: '/api/fs4a/QueryRole/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//账号列表查询
-export function GetUserList (params) {
-  return request({
-    url: '/api/fs4a/GetUserList/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//角色明细查询
-export function RoleDetails (params) {
-  return request({
-    url: '/api/fs4a/RoleDetails/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//角色权限列表
-export function RoleAuths (params) {
-  return request({
-    url: '/api/fs4a/RoleAuths/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//角色删除
-export function DeleteRole (params) {
-  return request({
-    url: '/api/fs4a/DeleteRole/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//角色编辑保存
-export function EditRole (params) {
-  return request({
-    url: '/api/fs4a/EditRole/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//角色状态变更
-export function UpdateStatus (params) {
-  return request({
-    url: '/api/fs4a/UpdateStatus/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}

+ 0 - 72
src/api/apiHome.js

@@ -1,72 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-12-20 10:26:41
- * @LastEditTime: 2022-02-21 15:05:19
- * @LastEditors: Please set LastEditors
- * @Description: 首页接口
- * @FilePath: \Foshan4A2.0\src\api\apiHome.js
- */
-import request from '@/utils/request-4a'
-
-//接入系统信息
-export function GetOthSystem (params) {
-  return request({
-    url: '/api/fs4a/GetOthSystem/v1',
-    method: 'post',
-    data: params
-  })
-}
-
-//账号信息分析
-export function GetUserAna (params) {
-  return request({
-    url: '/api/fs4a/GetUserAna/v1',
-    method: 'post',
-    data: params
-  })
-}
-
-//职员信息分析
-export function GetOfficerAna (params) {
-  return request({
-    url: '/api/fs4a/GetOfficerAna/v1',
-    method: 'post',
-    data: params
-  })
-}
-
-//角色信息分析
-export function GetRoleAna (params) {
-  return request({
-    url: '/api/fs4a/GetRoleAna/v1',
-    method: 'post',
-    data: params
-  })
-}
-
-//权限信息分析
-export function GetAuthAna (params) {
-  return request({
-    url: '/api/fs4a/GetAuthAna/v1',
-    method: 'post',
-    data: params
-  })
-}
-
-//修改密码
-export function EditPwd (params) {
-  return request({
-    url: '/api/fs4a/EditPwd/v1',
-    method: 'post',
-    data: params
-  })
-}
-
-//锁屏验证
-export function SsoLogin (params) {
-  return request({
-    url: '/api/fs4a/SsoLogin/v1',
-    method: 'post',
-    data: params
-  })
-}

+ 0 - 64
src/api/apidataCollection.js

@@ -1,64 +0,0 @@
-/*
- * @Author: zk
- * @Date: 2021-12-17 13:33:03
- * @LastEditTime: 2021-12-17 17:33:58
- * @LastEditors: Please set LastEditors
- * @Description: 采集调度管理api接口
- * @FilePath: \CABaggageData\src\api\apidataCollection.js
- */
-import request from '@/utils/request'
-
-//采集调度管理-新增/修改
-export function IbmmqSave (params) {
-  return request({
-    url: '/baggageDC/openApi/IbmmqSave',
-    method: 'post',
-    data:params
-  })
-}
-
-//采集调度管理-数据采集
-export function IbmmqQuery (params) {
-  return request({
-    url: '/baggageDC/openApi/IbmmqQuery',
-    method: 'post',
-    data:params
-  })
-}
-
-//获取调度列表
-export function DataCollectQuery (params) {
-  return request({
-    url: '/baggageDC/openApi/DataCollectQuery',
-    method: 'Post',
-    data:params
-  })
-}
-
-//创建调度
-export function DataCollectSave (params) {
-  return request({
-    url: '/baggageDC/openApi/DataCollectSave',
-    method: 'Post',
-    data:params
-  })
-}
-
-//删除调度
-export function DataCollectDelete (params) {
-  return request({
-    url: '/baggageDC/openApi/DataCollectDelete',
-    method: 'Post',
-    data:params
-  })
-}
-
-//采集调度控制服务
-export function managerScheduling (params) {
-  return request({
-    url: '/baggageDC/openApi/managerScheduling',
-    method: 'Post',
-    data:params
-  })
-}
-

+ 16 - 16
src/api/login.js

@@ -6,57 +6,57 @@
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \CABaggageData\src\api\login.js
  */
-import request from '@/utils/request-4a'
+import request from '@/utils/request-new'
 
-//获取动态验证码
-export function GetCheckCode (params) {
+//获取权限
+export function getAuth (params) {
     return request({
-        url: '/api/fs4a/GetCheckCode/v1',
+        url: '/foxlibc/getAuth',
         method: 'post',
         data: params
     })
 }
 
 //登录
-export function login (params) {
+export function signIn (params) {
     return request({
-        url: '/api/fs4a/Login/v1',
+        url: '/foxlibc/sign-in',
         method: 'post',
         data: params
     })
 }
 
 //登出
-export function loginUp (params) {
+export function loginOut (params) {
     return request({
-        url: '/api/fs4a/Logout/v1',
+        url: '/foxlibc/loginOut',
         method: 'post',
         data: params
     })
 }
 
-//忘记密
-export function changePassword (params) {
+//获取验证
+export function getVCode (params) {
     return request({
-        url: '/api/fs4a/ForgetPwd/v1',
+        url: '/foxlibc/getVCode',
         method: 'post',
         data: params
     })
 }
 
-//权限获取
-export function permission (params) {
+//重置token
+export function refreshToken (params) {
     return request({
-        url: '/api/fs4a/GetAuth/v1',
+        url: '/foxlibc/refreshToken',
         method: 'post',
         data: params
     })
 }
 
 //token
-export function gettoken (params) {
+export function getToken (params) {
     return request({
-        url: '/api/4A/GetToken',
+        url: '/foxlibc/getToken',
         method: 'post',
         data: params,
         istoken: true

+ 0 - 203
src/api/postInterface.js

@@ -1,203 +0,0 @@
-import request from '@/utils/request-4a'
-
-//岗位列表查询
-export function postList (params) {
-    return request({
-        url: '/api/fs4a/GetJobList/v1',
-        method: 'post',
-        data: params
-    })
-}
-
-//组织树查询
-export function tissueTreeList (params) {
-    return request({
-        url: '/api/fs4a/GetOrganTree/v1',
-        method: 'post',
-        data: params,
-    })
-}
-//组织树状态
-export function tissueTreeStart (params) {
-    return request({
-        url: '/api/fs4a/ChangeOrganStatus/v1',
-        method: 'post',
-        data: params,
-    })
-}
-//职员查询
-export function staffList (params) {
-    return request({
-        url: '/api/fs4a/GetOfficerList/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-//职员状态
-export function staffStart (params) {
-    return request({
-        url: '/api/fs4a/ChangeOfficerStatus/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-//删除职员
-export function staffListele (params) {
-    return request({
-        url: '/api/fs4a/DeleteOfficer/v1',
-        method: 'post',
-        data: params,
-    })
-}
-//新增岗位
-export function newPostUp (params) {
-    return request({
-        url: '/api/fs4a/SaveJob/v1',
-        method: 'post',
-        data: params,
-    })
-}
-//岗位状态
-export function PostSatrt (params) {
-    return request({
-        url: '/api/fs4a/ChangeJobStatus/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-//编辑岗位
-export function PostSatrtmod (params) {
-    return request({
-        url: '/api/fs4a/EditJob/v1',
-        method: 'post',
-        data: params,
-    })
-}
-//删除岗位
-export function PostUpele (params) {
-    return request({
-        url: '/api/fs4a/DeleteJob/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-
-//新增组织
-export function newOrgan (params) {
-    return request({
-        url: '/api/fs4a/SaveOrgan/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-//编辑组织
-export function newOrganmod (params) {
-    return request({
-        url: '/api/fs4a/EditOrgan/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-
-//组织详情
-export function newOrganall (params) {
-    return request({
-        url: '/api/fs4a/GetOrganDetails/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-
-//新增职员
-export function newstaff (params) {
-    return request({
-        url: '/api/fs4a/SaveOfficer/v1',
-        method: 'post',
-        data: params,
-    })
-}
-//职员详情
-export function Staffdetails (params) {
-    return request({
-        url: '/api/fs4a/GetOfficerDetails/v1',
-        method: 'post',
-        data: params,
-    })
-}
-//编辑职员
-export function newstaffmod (params) {
-    return request({
-        url: '/api/fs4a/EditOfficer/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-//根据组织获取权限
-export function organizationUptree (params) {
-    return request({
-        url: '/api/fs4a/GetAuthTreeByOrgan/v1',
-        method: 'post',
-        data: params,
-    })
-}
-//根据岗位获取权限
-export function postUptree (params) {
-    return request({
-        url: '/api/fs4a/GetAuthTreeByJob/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-//岗位详情
-export function jbdetails (params) {
-    return request({
-        url: '/api/fs4a/GetJobDetails/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-//根据岗位获取角色
-export function jbdetpop (params) {
-    return request({
-        url: '/api/fs4a/GetRoleByJob/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-//组织获取角色
-export function organpop (params) {
-    return request({
-        url: '/api/fs4a/GetRoleByOrgan/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-//组织删除
-export function organele (params) {
-    return request({
-        url: '/api/fs4a/DeleteOrgan/v1',
-        method: 'post',
-        data: params,
-    })
-}
-
-//根据组织查询岗位列表
-export function organgitpost (params) {
-    return request({
-        url: '/api/fs4a/GetJobListByOrgan/v1',
-        method: 'post',
-        data: params,
-    })
-}

+ 0 - 70
src/api/systemConfiguration.js

@@ -1,70 +0,0 @@
-import request from '@/utils/request-4a'
-
-//登录策略详情查询
-export function GetTacDetails (params) {
-  return request({
-    url: '/api/fs4a/GetTacDetails/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-//登录策略列表查询
-export function GetTacList (params) {
-  return request({
-    url: '/api/fs4a/GetTacList/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//登录策略新增
-export function SaveTac (params) {
-  return request({
-    url: '/api/fs4a/SaveTac/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//登录策略编辑
-export function EditTac (params) {
-  return request({
-    url: '/api/fs4a/EditTac/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//登录策略删除
-export function DeleteTac (params) {
-  return request({
-    url: '/api/fs4a/DeleteTac/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//获取系统基础设置
-export function GetSystemSet (params) {
-  return request({
-    url: '/api/fs4a/GetSystemSet/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}
-
-//保存系统基础设置
-export function SaveSystemSet (params) {
-  return request({
-    url: '/api/fs4a/SaveSystemSet/v1',
-    method: 'post',
-    data: params,
-    proxy: true
-  })
-}

BIN
src/assets/analysis/bg_a.png


BIN
src/assets/analysis/bg_b.png


BIN
src/assets/analysis/ic_change_statistical.png


BIN
src/assets/analysis/ic_luggage_statistical.png


BIN
src/assets/analysis/ic_time_statistical.png


BIN
src/assets/analysis/pic_triangle_conner.png


+ 14 - 10
src/layout/index.vue

@@ -116,17 +116,21 @@ export default {
     },
     //退出系统-确定
     async outQd () {
-      if (this.name == '匿名用户') {
-        removeToken();
-        sessionStorage.clear();
-        this.$store.dispatch("app/toggleOutflag", false);
-        this.$router.push(`/login`);
-        location.reload();
+      const res = await this.$store.dispatch("user/logout");
+      const that = this
+      if (res) {
+        that.$store.dispatch("app/toggleOutflag", false);
+        this.$message({
+          type: 'success',
+          message: '退出登录成功',
+          duration: 1000,
+          onClose: () => {
+            sessionStorage.removeItem("userName");
+            that.$router.push(`/login`);
+          }
+        })
       } else {
-        sessionStorage.removeItem("userName");
-        this.$store.dispatch("app/toggleOutflag", false);
-        const res = await this.$store.dispatch("user/logout");
-        this.$router.push(`/login`);
+        this.$message.error('退出登录失败')
       }
     },
     //修改密码

+ 30 - 106
src/store/modules/user.js

@@ -1,8 +1,8 @@
-import { login, loginUp } from '@/api/newLogin'
 import { getToken, setToken, removeToken, setUserId, TokenKey } from '@/utils/auth'
 import { resetRouter } from '@/router'
 import { Query } from '@/api/dataIntegration'
-import { isValue } from "@/utils/validate";
+import { isValue } from "@/utils/validate"
+import { getAuth, signIn, loginOut } from '@/api/login'
 const getDefaultState = () => {
   return {
     token: getToken(),
@@ -63,17 +63,17 @@ const actions = {
   // user login
   login ({ commit }, userInfo) {
     return new Promise((resolve, reject) => {
-      login(userInfo)
+      signIn(userInfo)
         .then(response => {
           if (response.code == 0 && isValue(response.returnData)) {
-            const { date, token, userid } = response.returnData
-            commit('SET_TOKEN', token)
+            const { user_token, user_id } = response.returnData
+            commit('SET_TOKEN', user_token)
             commit('SET_UserType', 1)
-            commit('SET_UserId', userid)
+            commit('SET_UserId', user_id)
             setToken('userName', userInfo.username)
-            setToken(TokenKey, token)
-            setUserId(userid)
-            setToken('userid', userid)
+            setToken(TokenKey, user_token)
+            setUserId(user_id)
+            setToken('userid', user_id)
             resolve(true)
           } else {
             reject(false)
@@ -85,82 +85,11 @@ const actions = {
     })
   },
 
-  // get user info
-  getInfo ({ commit, state }) {
-    return new Promise((resolve, reject) => {
-      Query({
-        id: DATACONTENT_ID.loginId,
-        dataContent: [getToken('userid')]
-      })
-        .then(res => {
-          if (res.code == 0) {
-            const { listValues } = res.returnData
-            const datas = listValues
-            if (datas && datas.length) {
-              const arrs = []
-              for (const item of datas) {
-                if (item.ident) {
-                  arrs.push(item.ident)
-                }
-              }
-              // arrs.push('transit');
-              sessionStorage.setItem('userAuthList', JSON.stringify(arrs))
-              setTimeout(() => {
-                const data = {
-                  roles: arrs,
-                  introduction: '',
-                  avatar: '',
-                  name: getToken('userName'),
-                  token: state.token
-                }
-
-                const { name, avatar, roles } = data
-
-                commit('SET_NAME', name)
-                commit('SET_AVATAR', avatar)
-                commit('SET_ROLES', roles ? roles : ['admin'])
-                commit('SET_UserPoewrList', roles ? roles : ['admin'])
-                resolve(data)
-              }, 100)
-            } else {
-              sessionStorage.setItem('userAuthList', [])
-              setTimeout(() => {
-                const data = {
-                  roles: state.userPoewrList,
-                  introduction: '',
-                  avatar: '',
-                  name: getToken('userName'),
-                  token: state.token
-                }
-
-                const { name, avatar, roles } = data
-
-                commit('SET_NAME', name)
-                commit('SET_AVATAR', avatar)
-                commit('SET_ROLES', roles ? roles : ['admin'])
-                commit('SET_UserPoewrList', roles ? roles : ['admin'])
-                resolve(data)
-              }, 100)
-            }
-          } else {
-            reject(res.returnData)
-          }
-        })
-        .catch(err => {
-          reject(err)
-        })
-    })
-  },
-
   getMenuInfo ({ commit }) {
     return new Promise((resolve, reject) => {
-      Query({
-        serviceId: SERVICE_ID.sysMenuId,
-        dataContent: {
-          user_id: '',
-        },
-        page: 1,
-        pageSize: 9999
+      getAuth({
+        user_id: getToken('userid'),
+        user_token: getToken(TokenKey)
       })
         .then((res) => {
           if (res.code == 0 && isValue(res.returnData)) {
@@ -177,31 +106,26 @@ const actions = {
   },
 
   // user logout
-  logout ({ commit, state }) {
+  logout ({ commit }) {
     return new Promise((resolve, reject) => {
-      loginUp().then(result => {
-        // sessionStorage.removeItem("userName");
-        // sessionStorage.removeItem("UserType");
-        // sessionStorage.removeItem("User_Id");
-        sessionStorage.clear()
-        removeToken() // must remove  token  first
-        removeToken('codeToken')
-        removeToken('systemSet')
-        removeToken('userid')
-        resetRouter()
-        commit('RESET_STATE')
-        commit('SET_ROLES', [])
-        resolve()
+      loginOut({
+        user_id: getToken('userid'),
+        user_token: getToken(TokenKey)
+      }).then(result => {
+        if (result) {
+          sessionStorage.clear()
+          removeToken() // must remove  token  first
+          removeToken('codeToken')
+          removeToken('systemSet')
+          removeToken('userid')
+          resetRouter()
+          commit('RESET_STATE')
+          commit('SET_ROLES', [])
+          resolve(true)
+        } else {
+          reject(false)
+        }
       })
-
-      // logout(state.token).then(() => {
-      //   removeToken() // must remove  token  first
-      //   resetRouter()
-      //   commit('RESET_STATE')
-      //   resolve()
-      // }).catch(error => {
-      //   reject(error)
-      // })
     })
   },
 

+ 1 - 16
src/utils/request-new.js

@@ -1,6 +1,6 @@
 import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
-import { getToken, getUserId, getCodeToken } from '@/utils/auth'
+import { getToken, getCodeToken, TokenKey } from '@/utils/auth'
 import store from '@/store'
 let isMttoken
 // create an axios instance
@@ -23,21 +23,6 @@ service.interceptors.request.use(
       config.headers['appSecret'] = PLATFROM_CONFIG.appKeyString
       isMttoken = config.istoken
     }
-    if (config.data) {
-      config.data['OperatorId'] = getUserId()
-      config.data["token"] = getCodeToken()
-    }
-    // do something before request is sent
-    // config.headers['Content-Type'] = 'text/plain'
-    if (getCodeToken() && !config.istoken) {
-      config.headers['Authorization'] = getCodeToken()
-    }
-    if (store.getters.token) {
-      // let each request carry token
-      // ['X-Token'] is a custom headers key
-      // please modify it according to the actual situation
-      config.headers['Authorization'] = getToken()
-    }
     return config
   },
   error => {

+ 3 - 11
src/utils/request.js

@@ -2,8 +2,7 @@ import axios from "axios";
 import { MessageBox, Message } from "element-ui";
 import store from "@/store";
 import router, { resetRouter } from "@/router";
-import { getToken, getUserId, removeToken } from "@/utils/auth";
-import MD5 from "blueimp-md5";
+import { getToken, TokenKey, removeToken } from "@/utils/auth";
 // create an axios instance
 // let baseURL
 // if (process.env.NODE_ENV === "development") {
@@ -25,15 +24,8 @@ service.interceptors.request.use(
     // do something before request is sent
     // config.headers['Content-Type'] = 'text/plain'
     if (store.getters.token) {
-      // let each request carry token
-      // ['X-Token'] is a custom headers key
-      // please modify it according to the actual situation
-      // config.headers['X-Token'] = getToken()
-      config.headers["token"] = getToken();
-    }
-    if (config.data) {
-      config.data["OperatorId"] = getUserId();
-      config.data["token"] = MD5(JSON.stringify(config.data));
+      config.headers["user_id"] = getToken('userid');
+      config.headers["user_token"] = getToken(TokenKey);
     }
     return config;
   },

+ 16 - 17
src/views/login/index.vue

@@ -39,8 +39,8 @@
 
 <script>
 import { isValue } from "@/utils/validate";
-import { GetCheckCode, gettoken } from "@/api/newLogin";
-import { setCodeToken, getCodeToken } from '@/utils/auth';
+import { getVCode, getToken } from "@/api/login";
+import { setCodeToken, getCodeToken, setToken } from '@/utils/auth';
 import MD5 from 'blueimp-md5'
 export default {
   name: "Login",
@@ -83,20 +83,20 @@ export default {
   },
   async created () {
     try {
-      const { code, returnData, message } = await gettoken({
+      const { code, returnData, message } = await getToken({
         'appid': PLATFROM_CONFIG.appId,
         'appSecret': PLATFROM_CONFIG.appKeyString
       })
       if (code == 0 && isValue(returnData)) {
-        const { appLog, appName, appToken, hasCode, app_show_id } = returnData;
-        this.imgSrc = PLATFROM_CONFIG.baseURLCA + appLog
-        this.pageTitle = appName
-        this.isCode = hasCode
-        this.appId = app_show_id
-        setCodeToken(appToken);
-        sessionStorage.setItem('appLog', appLog)
-        sessionStorage.setItem('appName', appName)
-        if (hasCode) {
+        const { app_log, app_name, app_token, active_duration, app_code_rule } = returnData;
+        this.imgSrc = PLATFROM_CONFIG.baseURLCA + app_log
+        this.pageTitle = app_name
+        this.isCode = app_code_rule
+        setCodeToken(app_token);
+        setToken('active_duration', active_duration);
+        sessionStorage.setItem('appLog', app_log)
+        sessionStorage.setItem('appName', app_name)
+        if (app_code_rule) {
           this.getCheckCode()
         }
       } else {
@@ -123,11 +123,11 @@ export default {
         if (valid) {
           this.loading = true;
           const params = {
-            appid: this.appId,
+            app_token: getCodeToken(),
             username: this.loginForm.username.replace(/\s+/g, ""),
             password: MD5(this.loginForm.password.replace(/\s+/g, "")),
             // password: this.loginForm.password.replace(/\s+/g, ""),
-            verificationCode: this.loginForm.identify.replace(/\s+/g, ""),
+            verifyCode: this.loginForm.identify.replace(/\s+/g, ""),
           };
           this.$store
             .dispatch("user/login", params)
@@ -148,9 +148,8 @@ export default {
     },
     //获取动态验证码
     async getCheckCode () {
-      const { code, message, returnData } = await GetCheckCode({
-        appId: this.appId,
-        appToken: getCodeToken()
+      const { code, message, returnData } = await getVCode({
+        app_token: getCodeToken()
       });
       if (code == 0 && isValue(returnData)) {
         const { verifyCode } = returnData;

+ 7 - 1
src/views/newRole/index.vue

@@ -391,13 +391,19 @@ export default {
     },
     async checksBoxTs (datas, arr, type) {
       const res = [...datas, ...arr].filter((item) => !(datas.some((p) => item.auth_id == p.auth_id) && arr.some((c) => item.auth_id == c.auth_id)));
+      const msgs = []
       res.forEach(item => {
+        msgs.push({
+          ID: item.ID
+        })
         item.role_id = this.dataObj.role_ID
+        item.role_name = this.dataObj.role_name
+        item.role_status = this.dataObj.role_status
       })
       if (type == 'add') {
         this.generalDataReception(SERVICE_ID.authTreeId, 1, res, true)
       } else {
-        this.generalDataReception(SERVICE_ID.authTreeId, 3, res, true)
+        this.generalDataReception(SERVICE_ID.authTreeId, 3, msgs, true)
       }
     },
     async setItem (node, data) {