Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
3213ffca
Commit
3213ffca
authored
Aug 22, 2021
by
季圣华
Browse files
清理多余代码
parent
b220608a
Changes
3
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/api/api.js
View file @
3213ffca
import
{
getAction
,
deleteAction
,
putAction
,
postAction
,
httpAction
}
from
'
@/api/manage
'
import
{
getAction
,
deleteAction
,
putAction
,
postAction
,
httpAction
}
from
'
@/api/manage
'
import
Vue
from
'
vue
'
import
{
UI_CACHE_DB_DICT_DATA
}
from
"
@/store/mutation-types
"
//首页统计
//首页统计
const
getBuyAndSaleStatistics
=
(
params
)
=>
getAction
(
"
/depotHead/getBuyAndSaleStatistics
"
,
params
);
const
getBuyAndSaleStatistics
=
(
params
)
=>
getAction
(
"
/depotHead/getBuyAndSaleStatistics
"
,
params
);
const
buyOrSalePrice
=
(
params
)
=>
getAction
(
"
/depotItem/buyOrSalePrice
"
,
params
);
const
buyOrSalePrice
=
(
params
)
=>
getAction
(
"
/depotItem/buyOrSalePrice
"
,
params
);
//租户管理
//租户管理
const
checkTenant
=
(
params
)
=>
getAction
(
"
/tenant/checkIsNameExist
"
,
params
);
const
checkTenant
=
(
params
)
=>
getAction
(
"
/tenant/checkIsNameExist
"
,
params
);
const
editTenant
=
(
params
)
=>
putAction
(
"
/tenant/update
"
,
params
);
const
editTenant
=
(
params
)
=>
putAction
(
"
/tenant/update
"
,
params
);
//角色管理
//角色管理
const
addRole
=
(
params
)
=>
postAction
(
"
/role/add
"
,
params
);
const
addRole
=
(
params
)
=>
postAction
(
"
/role/add
"
,
params
);
const
editRole
=
(
params
)
=>
putAction
(
"
/role/update
"
,
params
);
const
editRole
=
(
params
)
=>
putAction
(
"
/role/update
"
,
params
);
const
checkRole
=
(
params
)
=>
getAction
(
"
/role/checkIsNameExist
"
,
params
);
const
checkRole
=
(
params
)
=>
getAction
(
"
/role/checkIsNameExist
"
,
params
);
const
findUserRole
=
(
params
)
=>
getAction
(
"
/role/findUserRole
"
,
params
);
const
roleAllList
=
(
params
)
=>
getAction
(
"
/role/allList
"
,
params
);
const
queryall
=
(
params
)
=>
getAction
(
"
/sys/role/queryall
"
,
params
);
//用户管理
//用户管理
const
registerUser
=
(
params
)
=>
postAction
(
"
/user/registerUser
"
,
params
);
const
registerUser
=
(
params
)
=>
postAction
(
"
/user/registerUser
"
,
params
);
const
addUser
=
(
params
)
=>
postAction
(
"
/user/addUser
"
,
params
);
const
addUser
=
(
params
)
=>
postAction
(
"
/user/addUser
"
,
params
);
const
editUser
=
(
params
)
=>
putAction
(
"
/user/updateUser
"
,
params
);
const
editUser
=
(
params
)
=>
putAction
(
"
/user/updateUser
"
,
params
);
const
getUserList
=
(
params
)
=>
getAction
(
"
/user/getUserList
"
,
params
);
const
getUserList
=
(
params
)
=>
getAction
(
"
/user/getUserList
"
,
params
);
//验证用户是否存在
const
checkOnlyUser
=
(
params
)
=>
getAction
(
"
/sys/user/checkOnlyUser
"
,
params
);
//改变密码
const
changePassword
=
(
params
)
=>
putAction
(
"
/sys/user/changePassword
"
,
params
);
//权限管理
const
addPermission
=
(
params
)
=>
postAction
(
"
/sys/permission/add
"
,
params
);
const
editPermission
=
(
params
)
=>
putAction
(
"
/sys/permission/edit
"
,
params
);
const
getPermissionList
=
(
params
)
=>
getAction
(
"
/sys/permission/list
"
,
params
);
const
getSystemMenuList
=
(
params
)
=>
getAction
(
"
/sys/permission/getSystemMenuList
"
,
params
);
const
getSystemSubmenu
=
(
params
)
=>
getAction
(
"
/sys/permission/getSystemSubmenu
"
,
params
);
const
getSystemSubmenuBatch
=
(
params
)
=>
getAction
(
'
/sys/permission/getSystemSubmenuBatch
'
,
params
)
const
queryTreeList
=
(
params
)
=>
getAction
(
"
/sys/permission/queryTreeList
"
,
params
);
const
queryTreeListForRole
=
(
params
)
=>
getAction
(
"
/sys/role/queryTreeList
"
,
params
);
const
queryListAsync
=
(
params
)
=>
getAction
(
"
/sys/permission/queryListAsync
"
,
params
);
const
queryRolePermission
=
(
params
)
=>
getAction
(
"
/sys/permission/queryRolePermission
"
,
params
);
const
saveRolePermission
=
(
params
)
=>
postAction
(
"
/sys/permission/saveRolePermission
"
,
params
);
const
queryPermissionsByUser
=
(
params
)
=>
postAction
(
"
/function/findMenuByPNumber
"
,
params
);
const
queryPermissionsByUser
=
(
params
)
=>
postAction
(
"
/function/findMenuByPNumber
"
,
params
);
const
loadAllRoleIds
=
(
params
)
=>
getAction
(
"
/sys/permission/loadAllRoleIds
"
,
params
);
const
getPermissionRuleList
=
(
params
)
=>
getAction
(
"
/sys/permission/getPermRuleListByPermId
"
,
params
);
const
queryPermissionRule
=
(
params
)
=>
getAction
(
"
/sys/permission/queryPermissionRule
"
,
params
);
//机构管理
//机构管理
const
queryOrganizationTreeList
=
(
params
)
=>
getAction
(
"
/organization/getOrganizationTree
"
,
params
);
const
queryOrganizationTreeList
=
(
params
)
=>
getAction
(
"
/organization/getOrganizationTree
"
,
params
);
const
queryOrganizationById
=
(
params
)
=>
getAction
(
"
/organization/findById
"
,
params
);
const
queryOrganizationById
=
(
params
)
=>
getAction
(
"
/organization/findById
"
,
params
);
const
checkOrganization
=
(
params
)
=>
getAction
(
"
/organization/checkIsNameExist
"
,
params
);
const
checkOrganization
=
(
params
)
=>
getAction
(
"
/organization/checkIsNameExist
"
,
params
);
const
queryParentName
=
(
params
)
=>
getAction
(
"
/sys/sysDepart/queryParentName
"
,
params
);
const
searchByKeywords
=
(
params
)
=>
getAction
(
"
/sys/sysDepart/searchBy
"
,
params
);
const
deleteByDepartId
=
(
params
)
=>
deleteAction
(
"
/sys/sysDepart/delete
"
,
params
);
//二级部门管理
const
queryDepartPermission
=
(
params
)
=>
getAction
(
"
/sys/permission/queryDepartPermission
"
,
params
);
const
saveDepartPermission
=
(
params
)
=>
postAction
(
"
/sys/permission/saveDepartPermission
"
,
params
);
const
queryTreeListForDeptRole
=
(
params
)
=>
getAction
(
"
/sys/sysDepartPermission/queryTreeListForDeptRole
"
,
params
);
const
queryDeptRolePermission
=
(
params
)
=>
getAction
(
"
/sys/sysDepartPermission/queryDeptRolePermission
"
,
params
);
const
saveDeptRolePermission
=
(
params
)
=>
postAction
(
"
/sys/sysDepartPermission/saveDeptRolePermission
"
,
params
);
const
queryMyDepartTreeList
=
(
params
)
=>
getAction
(
"
/sys/sysDepart/queryMyDeptTreeList
"
,
params
);
//日志管理
const
deleteLog
=
(
params
)
=>
deleteAction
(
"
/sys/log/delete
"
,
params
);
const
deleteLogList
=
(
params
)
=>
deleteAction
(
"
/sys/log/deleteBatch
"
,
params
);
//数据字典
const
addDict
=
(
params
)
=>
postAction
(
"
/sys/dict/add
"
,
params
);
const
editDict
=
(
params
)
=>
putAction
(
"
/sys/dict/edit
"
,
params
);
const
treeList
=
(
params
)
=>
getAction
(
"
/sys/dict/treeList
"
,
params
);
const
addDictItem
=
(
params
)
=>
postAction
(
"
/sys/dictItem/add
"
,
params
);
const
editDictItem
=
(
params
)
=>
putAction
(
"
/sys/dictItem/edit
"
,
params
);
//字典标签专用(通过code获取字典数组)
export
const
ajaxGetDictItems
=
(
code
,
params
)
=>
getAction
(
`/systemConfig/getDictItems/
${
code
}
`
,
params
);
//从缓存中获取字典配置
function
getDictItemsFromCache
(
dictCode
)
{
if
(
Vue
.
ls
.
get
(
UI_CACHE_DB_DICT_DATA
)
&&
Vue
.
ls
.
get
(
UI_CACHE_DB_DICT_DATA
)[
dictCode
])
{
let
dictItems
=
Vue
.
ls
.
get
(
UI_CACHE_DB_DICT_DATA
)[
dictCode
];
console
.
log
(
"
-----------getDictItemsFromCache----------dictCode=
"
+
dictCode
+
"
---- dictItems=
"
,
dictItems
)
return
dictItems
;
}
}
//系统通告
const
doReleaseData
=
(
params
)
=>
getAction
(
"
/sys/annountCement/doReleaseData
"
,
params
);
const
doReovkeData
=
(
params
)
=>
getAction
(
"
/sys/annountCement/doReovkeData
"
,
params
);
// 根据部门主键查询用户信息
const
queryUserByDepId
=
(
params
)
=>
getAction
(
"
/sys/user/queryUserByDepId
"
,
params
);
// 重复校验
const
duplicateCheck
=
(
params
)
=>
getAction
(
"
/sys/duplicate/check
"
,
params
);
// 加载分类字典
const
loadCategoryData
=
(
params
)
=>
getAction
(
"
/sys/category/loadAllData
"
,
params
);
const
checkRuleByCode
=
(
params
)
=>
getAction
(
'
/sys/checkRule/checkByCode
'
,
params
)
//我的通告
const
getUserNoticeInfo
=
(
params
)
=>
getAction
(
"
/sys/sysAnnouncementSend/getMyAnnouncementSend
"
,
params
);
//经手人管理
//经手人管理
const
addPerson
=
(
params
)
=>
postAction
(
"
/person/add
"
,
params
);
const
addPerson
=
(
params
)
=>
postAction
(
"
/person/add
"
,
params
);
const
editPerson
=
(
params
)
=>
putAction
(
"
/person/update
"
,
params
);
const
editPerson
=
(
params
)
=>
putAction
(
"
/person/update
"
,
params
);
...
@@ -181,56 +105,15 @@ export {
...
@@ -181,56 +105,15 @@ export {
addRole
,
addRole
,
editRole
,
editRole
,
checkRole
,
checkRole
,
findUserRole
,
roleAllList
,
registerUser
,
registerUser
,
addUser
,
addUser
,
editUser
,
editUser
,
getUserList
,
getUserList
,
queryall
,
checkOnlyUser
,
changePassword
,
getPermissionList
,
addPermission
,
editPermission
,
queryTreeList
,
queryListAsync
,
queryRolePermission
,
saveRolePermission
,
queryPermissionsByUser
,
queryPermissionsByUser
,
loadAllRoleIds
,
getPermissionRuleList
,
queryPermissionRule
,
queryOrganizationTreeList
,
queryOrganizationTreeList
,
queryOrganizationById
,
queryOrganizationById
,
checkOrganization
,
checkOrganization
,
queryParentName
,
searchByKeywords
,
deleteByDepartId
,
deleteLog
,
deleteLogList
,
addDict
,
editDict
,
treeList
,
addDictItem
,
editDictItem
,
doReleaseData
,
doReovkeData
,
queryUserByDepId
,
duplicateCheck
,
queryTreeListForRole
,
getSystemMenuList
,
getSystemSubmenu
,
getSystemSubmenuBatch
,
loadCategoryData
,
checkRuleByCode
,
queryDepartPermission
,
saveDepartPermission
,
queryTreeListForDeptRole
,
queryDeptRolePermission
,
saveDeptRolePermission
,
queryMyDepartTreeList
,
getUserNoticeInfo
,
getDictItemsFromCache
,
addPerson
,
addPerson
,
editPerson
,
editPerson
,
checkPerson
,
checkPerson
,
...
...
jshERP-web/src/utils/request.js
View file @
3213ffca
...
@@ -85,14 +85,6 @@ service.interceptors.request.use(config => {
...
@@ -85,14 +85,6 @@ service.interceptors.request.use(config => {
if
(
token
)
{
if
(
token
)
{
config
.
headers
[
'
X-Access-Token
'
]
=
token
// 让每个请求携带自定义 token 请根据实际情况自行修改
config
.
headers
[
'
X-Access-Token
'
]
=
token
// 让每个请求携带自定义 token 请根据实际情况自行修改
}
}
if
(
config
.
method
==
'
get
'
){
if
(
config
.
url
.
indexOf
(
"
systemConfig/getDictItems
"
)
<
0
){
config
.
params
=
{
_t
:
Date
.
parse
(
new
Date
())
/
1000
,
...
config
.
params
}
}
}
return
config
return
config
},(
error
)
=>
{
},(
error
)
=>
{
return
Promise
.
reject
(
error
)
return
Promise
.
reject
(
error
)
...
...
jshERP-web/src/views/system/modules/UserModal.vue
View file @
3213ffca
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"角色"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"角色"
>
<a-select
v-if=
"model.roleName!='租户'"
placeholder=
"选择角色"
v-decorator=
"[ 'roleId' ]"
:dropdownMatchSelectWidth=
"false"
>
<a-select
v-if=
"model.roleName!='租户'"
placeholder=
"选择角色"
v-decorator=
"[ 'roleId' ]"
:dropdownMatchSelectWidth=
"false"
>
<a-select-option
v-for=
"(item,index) in roleList"
:key=
"index"
:value=
"item.id"
>
<a-select-option
v-for=
"(item,index) in roleList"
:key=
"index"
:value=
"item.id"
>
{{ item.
text
}}
{{ item.
name
}}
</a-select-option>
</a-select-option>
</a-select>
</a-select>
<a-col
v-if=
"model.roleName=='租户'"
><a-row>
租户
</a-row></a-col>
<a-col
v-if=
"model.roleName=='租户'"
><a-row>
租户
</a-row></a-col>
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
import
JSelectPosition
from
'
@/components/jeecgbiz/JSelectPosition
'
import
JSelectPosition
from
'
@/components/jeecgbiz/JSelectPosition
'
import
{
ACCESS_TOKEN
}
from
"
@/store/mutation-types
"
import
{
ACCESS_TOKEN
}
from
"
@/store/mutation-types
"
import
{
getAction
}
from
'
@/api/manage
'
import
{
getAction
}
from
'
@/api/manage
'
import
{
addUser
,
editUser
,
queryOrganizationTreeList
,
findUserRole
}
from
'
@/api/api
'
import
{
addUser
,
editUser
,
queryOrganizationTreeList
,
roleAllList
}
from
'
@/api/api
'
import
{
disabledAuthFilter
}
from
"
@/utils/authFilter
"
import
{
disabledAuthFilter
}
from
"
@/utils/authFilter
"
import
{
duplicateCheck
}
from
'
@/api/api
'
import
{
duplicateCheck
}
from
'
@/api/api
'
import
JImageUpload
from
'
../../../components/jeecg/JImageUpload
'
import
JImageUpload
from
'
../../../components/jeecg/JImageUpload
'
...
@@ -178,14 +178,9 @@
...
@@ -178,14 +178,9 @@
})
})
},
},
loadRoleData
(){
loadRoleData
(){
let
that
=
this
;
roleAllList
({}).
then
((
res
)
=>
{
let
params
=
{
'
UBType
'
:
'
UserRole
'
,
'
UBKeyId
'
:
''
};
findUserRole
(
params
).
then
((
res
)
=>
{
if
(
res
){
if
(
res
){
th
at
.
roleList
=
res
th
is
.
roleList
=
res
}
}
})
})
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment