zhongxiaoyu 3 жил өмнө
parent
commit
d47de8d41e

+ 12 - 19
src/api/Account.js

@@ -1,7 +1,7 @@
 /*
  * @Author: Badguy
  * @Date: 2022-02-14 09:37:11
- * @LastEditTime: 2022-03-30 11:16:24
+ * @LastEditTime: 2022-04-06 10:43:11
  * @LastEditors: your name
  * @Description: 账户管理api
  * have a nice day!
@@ -13,8 +13,7 @@ export function GetAccountList (params) {
   return request({
     url: '/api/fs4a/GetUserList/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -24,9 +23,8 @@ export function ChangeUserStatus (params) {
     url: '/api/fs4a/ChangeUserStatus/v1',
     method: 'post',
     data: params,
-    msg: '账号状态变更',
-    Ident: 'userlist_btn_status_change',
-    proxy: true
+    msg: '账号状态更新',
+    Ident: 'userlist_btn_status_change'
   })
 }
 
@@ -36,9 +34,8 @@ export function delAccount (params) {
     url: '/api/fs4a/DeleteUser/v1',
     method: 'post',
     data: params,
-    msg: '账号删除',
-    Ident: 'userlist_btn_del',
-    proxy: true
+    msg: '删除账号',
+    Ident: 'userlist_btn_del'
   })
 }
 
@@ -48,9 +45,8 @@ export function addAccount (params) {
     url: '/api/fs4a/SaveUser/v1',
     method: 'post',
     data: params,
-    msg: '账号新增',
-    Ident: 'userlist_btn_add',
-    proxy: true
+    msg: '新增账号',
+    Ident: 'userlist_btn_add'
   })
 }
 
@@ -59,8 +55,7 @@ export function getAccountDetails (params) {
   return request({
     url: '/api/fs4a/GetUserDetails/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -70,9 +65,8 @@ export function editAccount (params) {
     url: '/api/fs4a/EditUser/v1',
     method: 'post',
     data: params,
-    msg: '账号编辑',
-    Ident: 'userupdate_btn_save',
-    proxy: true
+    msg: '修改账号',
+    Ident: 'userupdate_btn_save'
   })
 }
 
@@ -81,7 +75,6 @@ export function getAuthListByUser (params) {
   return request({
     url: '/api/fs4a/GetAuthListByUser/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }

+ 14 - 22
src/api/AccountGroup.js

@@ -1,9 +1,9 @@
 /*
  * @Author: Badguy
  * @Date: 2022-02-14 09:37:11
- * @LastEditTime: 2022-03-30 10:42:31
+ * @LastEditTime: 2022-04-06 10:43:17
  * @LastEditors: your name
- * @Description: 账号组|岗位路由表
+ * @Description: 账号组|岗位api
  * have a nice day!
  */
 import request from '@/utils/request'
@@ -14,8 +14,7 @@ export function GetGroupTree (params) {
   return request({
     url: '/api/fs4a/GetGroupTree/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -25,9 +24,8 @@ export function SaveGroup (params) {
     url: '/api/fs4a/SaveGroup/v1',
     method: 'post',
     data: params,
-    msg: `${accountGroupType}新增`,
-    Ident: 'group_btn_save',
-    proxy: true
+    msg: `新增${accountGroupType}`,
+    Ident: 'group_btn_save'
   })
 }
 
@@ -37,9 +35,8 @@ export function DeleteGroup (params) {
     url: '/api/fs4a/DeleteGroup/v1',
     method: 'post',
     data: params,
-    msg: `${accountGroupType}删除`,
-    Ident: 'grouptree_btn_del_group',
-    proxy: true
+    msg: `删除${accountGroupType}`,
+    Ident: 'grouptree_btn_del_group'
   })
 }
 
@@ -48,8 +45,7 @@ export function GetGroupDetails (params) {
   return request({
     url: '/api/fs4a/GetGroupDetails/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -59,9 +55,8 @@ export function ChangeGroupStatus (params) {
     url: '/api/fs4a/ChangeGroupStatus/v1',
     method: 'post',
     data: params,
-    msg: `${accountGroupType}状态变更`,
-    Ident: 'grouptree_btn_state_switch',
-    proxy: true
+    msg: `${accountGroupType}状态更新`,
+    Ident: 'grouptree_btn_state_switch'
   })
 }
 
@@ -70,8 +65,7 @@ export function GetAuthTreeByGroup (params) {
   return request({
     url: '/api/fs4a/GetAuthTreeByGroup/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -81,9 +75,8 @@ export function EditGroup (params) {
     url: '/api/fs4a/EditGroup/v1',
     method: 'post',
     data: params,
-    msg: `${accountGroupType}编辑`,
-    Ident: 'group_btn_edit',
-    proxy: true
+    msg: `更新${accountGroupType}`,
+    Ident: 'group_btn_edit'
   })
 }
 
@@ -92,7 +85,6 @@ export function GetRoleByGroup (params) {
   return request({
     url: '/api/fs4a/GetRoleByGroup/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }

+ 30 - 51
src/api/apiAuthority.js

@@ -1,10 +1,9 @@
 /*
  * @Author: your name
  * @Date: 2021-12-21 09:22:04
- * @LastEditTime: 2022-03-30 10:53:51
+ * @LastEditTime: 2022-04-06 10:43:22
  * @LastEditors: your name
- * @Description: 权限项管理
- * @FilePath: \Foshan4A2.0\src\api\apiAuthority.js
+ * @Description: 权限项管理api
  */
 import request from '@/utils/request'
 
@@ -13,8 +12,7 @@ export function GetAuthTree (params) {
   return request({
     url: '/api/fs4a/GetAuthTree/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -24,8 +22,7 @@ export function SaveApp (params) {
     url: '/api/fs4a/SaveApp/v1',
     method: 'post',
     data: params,
-    msg: '应用新增',
-    proxy: true
+    msg: '新增应用'
   })
 }
 
@@ -34,8 +31,7 @@ export function GetAppDetails (params) {
   return request({
     url: '/api/fs4a/GetAppDetails/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -45,8 +41,7 @@ export function EditApp (params) {
     url: '/api/fs4a/EditApp/v1',
     method: 'post',
     data: params,
-    msg: '应用编辑',
-    proxy: true
+    msg: '更新应用信息'
   })
 }
 
@@ -56,8 +51,7 @@ export function UpdateAppStatus (params) {
     url: '/api/fs4a/UpdateAppStatus/v1',
     method: 'post',
     data: params,
-    msg: '应用状态变更',
-    proxy: true
+    msg: '应用状态更新'
   })
 }
 
@@ -67,8 +61,7 @@ export function DeleteApp (params) {
     url: '/api/fs4a/DeleteApp/v1',
     method: 'post',
     data: params,
-    msg: '应用删除',
-    proxy: true
+    msg: '删除应用'
   })
 }
 
@@ -79,9 +72,8 @@ export function EditAuth (params) {
     url: '/api/fs4a/EditAuth/v1',
     method: 'post',
     data: params,
-    msg: '权限项编辑',
-    Ident: 'appupdate_box_save',
-    proxy: true
+    msg: '更新权限信息',
+    Ident: 'appupdate_box_save'
   })
 }
 
@@ -90,8 +82,7 @@ export function GetAuthDetails (params) {
   return request({
     url: '/api/fs4a/GetAuthDetails/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -100,8 +91,7 @@ export function GetAuthTo (params) {
   return request({
     url: '/api/fs4a/GetAuthTo/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -111,9 +101,8 @@ export function SaveAuth (params) {
     url: '/api/fs4a/SaveAuth/v1',
     method: 'post',
     data: params,
-    msg: '权限项新增',
-    Ident: 'authtree_btn_add_auth',
-    proxy: true
+    msg: '新增权限',
+    Ident: 'authtree_btn_add_auth'
   })
 }
 
@@ -123,9 +112,8 @@ export function DeleteAuth (params) {
     url: '/api/fs4a/DeleteAuth/v1',
     method: 'post',
     data: params,
-    msg: '权限项删除',
-    Ident: 'authtree_btn_del_auth',
-    proxy: true
+    msg: '删除权限',
+    Ident: 'authtree_btn_del_auth'
   })
 }
 
@@ -135,9 +123,8 @@ export function UpdateAuthStatus (params) {
     url: '/api/fs4a/UpdateAuthStatus/v1',
     method: 'post',
     data: params,
-    msg: '权限项状态变更',
-    Ident: 'authtree_btn_state_switch',
-    proxy: true
+    msg: '权限状态更新',
+    Ident: 'authtree_btn_state_switch'
   })
 }
 
@@ -147,9 +134,8 @@ export function SaveRole (params) {
     url: '/api/fs4a/SaveRole/v1',
     method: 'post',
     data: params,
-    msg: '角色新增',
-    Ident: 'role_add',
-    proxy: true
+    msg: '新增角色',
+    Ident: 'role_add'
   })
 }
 
@@ -158,8 +144,7 @@ export function QueryRole (params) {
   return request({
     url: '/api/fs4a/QueryRole/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -168,8 +153,7 @@ export function GetUserList (params) {
   return request({
     url: '/api/fs4a/GetUserList/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -178,8 +162,7 @@ export function RoleDetails (params) {
   return request({
     url: '/api/fs4a/RoleDetails/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -188,8 +171,7 @@ export function RoleAuths (params) {
   return request({
     url: '/api/fs4a/RoleAuths/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -199,9 +181,8 @@ export function DeleteRole (params) {
     url: '/api/fs4a/DeleteRole/v1',
     method: 'post',
     data: params,
-    msg: '角色删除',
-    Ident: 'role_delete',
-    proxy: true
+    msg: '删除角色',
+    Ident: 'role_delete'
   })
 }
 
@@ -211,9 +192,8 @@ export function EditRole (params) {
     url: '/api/fs4a/EditRole/v1',
     method: 'post',
     data: params,
-    msg: '角色编辑',
-    Ident: 'role_edit_save',
-    proxy: true
+    msg: '更新角色信息',
+    Ident: 'role_edit_save'
   })
 }
 
@@ -223,8 +203,7 @@ export function UpdateStatus (params) {
     url: '/api/fs4a/UpdateStatus/v1',
     method: 'post',
     data: params,
-    msg: '角色状态变更',
-    Ident: 'role_state_switch',
-    proxy: true
+    msg: '角色状态更新',
+    Ident: 'role_state_switch'
   })
 }

+ 3 - 6
src/api/authGroupApi.js

@@ -5,8 +5,7 @@ export function GetGroupByOrgan (params) {
   return request({
     url: '/api/fs4a/GetGroupByOrgan/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -15,8 +14,7 @@ export function GetGroupByJob (params) {
   return request({
     url: '/api/fs4a/GetGroupByJob/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -25,7 +23,6 @@ export function GroupAuths (params) {
   return request({
     url: '/api/fs4a/GroupAuths/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }

+ 4 - 4
src/api/jobApi.js

@@ -15,7 +15,7 @@ export function SaveJob(params) {
     url: '/api/fs4a/SaveJob/v1',
     method: 'post',
     data: params,
-    msg: '岗位新增',
+    msg: '新增岗位',
     Ident: 'job_btn_save'
   })
 }
@@ -25,7 +25,7 @@ export function ChangeJobStatus(params) {
     url: '/api/fs4a/ChangeJobStatus/v1',
     method: 'post',
     data: params,
-    msg: '岗位状态更',
+    msg: '岗位状态更',
     Ident: 'joblist_btn_state_switch'
   })
 }
@@ -36,7 +36,7 @@ export function EditJob(params) {
     url: '/api/fs4a/EditJob/v1',
     method: 'post',
     data: params,
-    msg: '岗位编辑',
+    msg: '更新岗位信息',
     Ident: 'job_btn_edit'
   })
 }
@@ -46,7 +46,7 @@ export function DeleteJob(params) {
     url: '/api/fs4a/DeleteJob/v1',
     method: 'post',
     data: params,
-    msg: '岗位删除',
+    msg: '删除岗位',
     Ident: 'joblist_btn_del_job'
   })
 }

+ 2 - 1
src/api/login.js

@@ -34,7 +34,8 @@ export function loginUp (params) {
     return request({
         url: '/api/fs4a/Logout/v1',
         method: 'post',
-        data: params
+        data: params,
+        msg: '退出登录'
     })
 }
 

+ 8 - 8
src/api/postInterface.js

@@ -24,7 +24,7 @@ export function newOrgan(params) {
     url: '/api/fs4a/SaveOrgan/v1',
     method: 'post',
     data: params,
-    msg: '组织新增',
+    msg: '新增组织',
     Ident: 'organ_btn_save'
   })
 }
@@ -35,7 +35,7 @@ export function newOrganmod(params) {
     url: '/api/fs4a/EditOrgan/v1',
     method: 'post',
     data: params,
-    msg: '组织编辑',
+    msg: '更新组织信息',
     Ident: 'organ_btn_edit'
   })
 }
@@ -46,7 +46,7 @@ export function organele(params) {
     url: '/api/fs4a/DeleteOrgan/v1',
     method: 'post',
     data: params,
-    msg: '组织删除',
+    msg: '删除组织',
     Ident: 'organtree_btn_del_organ'
   })
 }
@@ -57,7 +57,7 @@ export function tissueTreeStart(params) {
     url: '/api/fs4a/ChangeOrganStatus/v1',
     method: 'post',
     data: params,
-    msg: '组织状态更',
+    msg: '组织状态更',
     Ident: 'organtree_btn_state_switch'
   })
 }
@@ -86,7 +86,7 @@ export function newstaff(params) {
     url: '/api/fs4a/SaveOfficer/v1',
     method: 'post',
     data: params,
-    msg: '职员新增',
+    msg: '新增职员',
     Ident: 'officer_btn_save'
   })
 }
@@ -97,7 +97,7 @@ export function newstaffmod(params) {
     url: '/api/fs4a/EditOfficer/v1',
     method: 'post',
     data: params,
-    msg: '职员编辑',
+    msg: '更新职员信息',
     Ident: 'officer_btn_edit'
   })
 }
@@ -108,7 +108,7 @@ export function staffListele(params) {
     url: '/api/fs4a/DeleteOfficer/v1',
     method: 'post',
     data: params,
-    msg: '职员删除',
+    msg: '删除职员',
     Ident: 'officerlist_btn_del_officer'
   })
 }
@@ -119,7 +119,7 @@ export function staffStart(params) {
     url: '/api/fs4a/ChangeOfficerStatus/v1',
     method: 'post',
     data: params,
-    msg: '职员状态更',
+    msg: '职员状态更',
     Ident: 'officerlist_btn_state_switch'
   })
 }

+ 10 - 18
src/api/systemConfiguration.js

@@ -5,8 +5,7 @@ export function GetTacDetails (params) {
   return request({
     url: '/api/fs4a/GetTacDetails/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 //登录策略列表查询
@@ -14,8 +13,7 @@ export function GetTacList (params) {
   return request({
     url: '/api/fs4a/GetTacList/v1',
     method: 'post',
-    data: params,
-    proxy: true
+    data: params
   })
 }
 
@@ -25,9 +23,8 @@ export function SaveTac (params) {
     url: '/api/fs4a/SaveTac/v1',
     method: 'post',
     data: params,
-    msg: '登录策略新增',
-    Ident: 'logintac_btn_add',
-    proxy: true
+    msg: '新增登录策略',
+    Ident: 'logintac_btn_add'
   })
 }
 
@@ -37,9 +34,8 @@ export function EditTac (params) {
     url: '/api/fs4a/EditTac/v1',
     method: 'post',
     data: params,
-    msg: '登录策略编辑',
-    Ident: 'logintac_btn_edit',
-    proxy: true
+    msg: '修改登录策略',
+    Ident: 'logintac_btn_edit'
   })
 }
 
@@ -49,9 +45,8 @@ export function DeleteTac (params) {
     url: '/api/fs4a/DeleteTac/v1',
     method: 'post',
     data: params,
-    msg: '登录策略删除',
-    Ident: 'logintac_btn_delete',
-    proxy: true
+    msg: '删除登录策略',
+    Ident: 'logintac_btn_delete'
   })
 }
 
@@ -61,8 +56,6 @@ export function GetSystemSet (params) {
     url: '/api/fs4a/GetSystemSet/v1',
     method: 'post',
     islogin: true
-    // data: params,
-    // proxy: true
   })
 }
 
@@ -72,8 +65,7 @@ export function SaveSystemSet (params) {
     url: '/api/fs4a/SaveSystemSet/v1',
     method: 'post',
     data: params,
-    msg: '系统设置保存',
-    Ident: 'system_btn_save',
-    proxy: true
+    msg: '系统配置新增保存',
+    Ident: 'system_btn_save'
   })
 }

+ 14 - 17
src/utils/request.js

@@ -1,10 +1,9 @@
 /*
  * @Author: your name
  * @Date: 2022-01-06 09:45:17
- * @LastEditTime: 2022-03-31 10:22:02
+ * @LastEditTime: 2022-04-06 11:17:20
  * @LastEditors: your name
- * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- * @FilePath: \vue-admin-template\src\utils\request.js
+ * @Description: axios封装
  */
 import axios from 'axios'
 import { MessageBox, Message } from 'element-ui'
@@ -47,10 +46,8 @@ service.interceptors.request.use(
         text: '数据加载中'
       })
     }
-    if (!config.url.includes('/api/fs4a/sendLog') && config.Ident) {
-      config.metaData = {
-        BeginTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
-      }
+    config.metaData = {
+      BeginTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}')
     }
     return config
   },
@@ -75,27 +72,27 @@ service.interceptors.response.use(
    */
   response => {
     const res = response.data
+    // 特定请求完成后发送日志
     const { metaData, url, Ident, data, msg } = response.config
-    if (!url.includes('/api/fs4a/sendLog') && Ident) {
+    if (!url.includes('/api/fs4a/sendLog') && (Ident || msg)) {
       Object.assign(metaData, {
-        BrowserTag: navigator.userAgent,
-        Data: typeof data === 'string' ? JSON.parse(data) : data,
+        LogInfo: typeof data === 'string' ? JSON.parse(data) : data,
         EndTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}:{s}'),
         LogType: msg ?? '未定义操作',
-        OperateIP: returnCitySN.cip,
         OperateResult: res.returnData,
-        Operator: getUserId(),
-        Ident
+        Ident: Ident ?? ''
       })
       service({
         url: '/api/fs4a/sendLog',
         method: 'post',
         data: {
           Data: [metaData],
+          BrowserTag: navigator.userAgent,
+          OperateIP: returnCitySN.cip,
+          Operator: getUserId(),
           Msg: msg,
           Type: '2'
-        },
-        proxy: true
+        }
       })
     }
     if (res.code == 0 || res.code == -1) {
@@ -109,7 +106,7 @@ service.interceptors.response.use(
           type: 'error',
           duration: 5 * 1000,
           onClose: () => {
-            store.dispatch('tagsView/delAllViews').then(() => { })
+            store.dispatch('tagsView/delAllViews').then(() => {})
             store.dispatch('user/resetToken').then(() => {
               location.reload()
             })
@@ -159,7 +156,7 @@ service.interceptors.response.use(
         duration: 5 * 1000,
         onClose: () => {
           store.dispatch('app/toggleDialog', false)
-          store.dispatch('tagsView/delAllViews').then(() => { })
+          store.dispatch('tagsView/delAllViews').then(() => {})
           store.dispatch('user/resetToken').then(() => {
             location.reload()
           })