Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
SHR
/
tFIMS
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 609464c7
authored
Sep 09, 2019
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://192.168.3.233:8090/glsx-web/tFIMS
2 parents
093c22f7
54405b62
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
90 additions
and
56 deletions
src/api/reportLogs.js
src/api/userManage.js
src/layout/header-aside/components/header-user/index.vue
src/layout/header-aside/components/header-user/passwordDialog.vue
src/layout/header-aside/components/header-user/personMsgDialog.vue
src/libs/util.js
src/router/routes.js
src/views/userManage/role/editDialog.vue
src/views/userManage/user/dialogReg.vue
src/views/userManage/user/index.vue
src/api/reportLogs.js
0 → 100644
View file @
609464c
import
request
from
'./request'
import
RequestMethods
from
'./request.methods'
const
path
=
'fims.'
export
function
searchReportLog
(
data
)
{
data
.
method
=
`
${
path
}
reportlog.search`
return
request
(
data
)
}
export
function
searchDepot
(
data
)
{
data
.
method
=
`fims.configuration.from.conftype`
return
request
(
data
)
}
\ No newline at end of file
\ No newline at end of file
src/api/userManage.js
View file @
609464c
...
@@ -2,9 +2,9 @@ import request from './request'
...
@@ -2,9 +2,9 @@ import request from './request'
import
RequestMethods
from
'./request.methods'
import
RequestMethods
from
'./request.methods'
const
path
=
'fims.user.'
const
path
=
'fims.user.'
export
function
Modify
(
data
)
{
export
function
Modify
Password
(
data
)
{
data
.
method
=
`
${
path
}
modify`
data
.
method
=
`
${
path
}
password.
modify`
return
request
(
data
,
RequestMethods
.
POS
T
)
return
request
(
data
,
RequestMethods
.
GE
T
)
}
}
export
function
getLoginlogs
(
data
)
{
export
function
getLoginlogs
(
data
)
{
...
...
src/layout/header-aside/components/header-user/index.vue
View file @
609464c
...
@@ -26,6 +26,9 @@ export default {
...
@@ -26,6 +26,9 @@ export default {
components
:
{
components
:
{
PersonalPanel
PersonalPanel
}
,
}
,
mounted
()
{
this
.
$event
.
$on
(
'e-password-dialog'
,
res
=>
this
.
passVisible
=
res
)
}
,
computed
:
{
computed
:
{
...
mapState
(
'd2admin/user'
,
[
'info'
])
...
mapState
(
'd2admin/user'
,
[
'info'
])
}
,
}
,
...
...
src/layout/header-aside/components/header-user/passwordDialog.vue
View file @
609464c
...
@@ -50,14 +50,14 @@
...
@@ -50,14 +50,14 @@
type=
"primary"
type=
"primary"
@
click=
"savePassword('info')"
@
click=
"savePassword('info')"
>
保 存
</el-button>
>
保 存
</el-button>
<el-button
@
click=
"
passwordDialogVisible = fal
se"
>
取 消
</el-button>
<el-button
@
click=
"
handleClo
se"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Modify
}
from
'@api/userManage'
import
{
Modify
Password
}
from
'@api/userManage'
export
default
{
export
default
{
name
:
'PasswordDialog'
,
name
:
'PasswordDialog'
,
components
:
{
components
:
{
...
@@ -112,8 +112,7 @@ export default {
...
@@ -112,8 +112,7 @@ export default {
},
},
props
:
{
props
:
{
passwordDialogVisible
:
{
passwordDialogVisible
:
{
type
:
Boolean
,
type
:
Boolean
default
:
false
}
}
// info: {
// info: {
// type: Object,
// type: Object,
...
@@ -123,24 +122,16 @@ export default {
...
@@ -123,24 +122,16 @@ export default {
// }
// }
},
},
methods
:
{
methods
:
{
// getPersonalType() {
// const params = {}
// params.method = ctMethods.GetPersonalType
// request
// .req(params)
// .then(res => {
// this.sendObjList = res.merchantDictList
// })
// .catch(err => {
// console.log(err)
// })
// },
// 修改密码
// 修改密码
savePassword
(
formName
)
{
savePassword
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
alert
(
'submit!'
)
const
params
=
{}
params
.
userId
=
''
params
.
oldPassword
=
this
.
info
.
oldPassword
params
.
newPassword
=
this
.
info
.
newPassword
this
.
mergePassWord
(
params
)
}
else
{
}
else
{
console
.
log
(
'error submit!!'
)
console
.
log
(
'error submit!!'
)
return
false
return
false
...
@@ -148,16 +139,21 @@ export default {
...
@@ -148,16 +139,21 @@ export default {
})
})
},
},
handleClose
()
{
handleClose
()
{
this
.
passwordDialogVisible
=
false
this
.
$event
.
$emit
(
'e-password-dialog'
,
false
)
}
// this.passwordDialogVisible = false
},
// mergePassWord (params) {
// Modify(params)
// .then(res => {
// })
mergePassWord
(
params
)
{
// .catch(err => console.log(err))
ModifyPassword
(
params
)
// }
.
then
(
res
=>
{
this
.
$message
({
message
:
'密码修改成功'
,
type
:
'success'
});
//this.passwordDialogVisible = false
})
.
catch
(
err
=>
console
.
log
(
err
))
}
}
}
}
}
...
...
src/layout/header-aside/components/header-user/personMsgDialog.vue
View file @
609464c
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"
personDialogVisible = fal
se"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
handleClo
se"
>
确 定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
</div>
</div>
...
@@ -94,8 +94,7 @@ export default {
...
@@ -94,8 +94,7 @@ export default {
},
},
props
:
{
props
:
{
personDialogVisible
:
{
personDialogVisible
:
{
type
:
Boolean
,
type
:
Boolean
default
:
false
}
}
// detail: {
// detail: {
// type: Object,
// type: Object,
...
@@ -136,7 +135,7 @@ export default {
...
@@ -136,7 +135,7 @@ export default {
// })
// })
// },
// },
handleClose
()
{
handleClose
()
{
this
.
personDialogVisible
=
false
this
.
$emit
(
'detailClose'
)
}
}
}
}
}
}
...
...
src/libs/util.js
View file @
609464c
...
@@ -22,10 +22,10 @@ util.title = function (titleText) {
...
@@ -22,10 +22,10 @@ util.title = function (titleText) {
* @description 打开新页面
* @description 打开新页面
* @param {String} url 地址
* @param {String} url 地址
*/
*/
util
.
open
=
function
(
url
)
{
util
.
open
=
function
(
url
,
target
)
{
var
a
=
document
.
createElement
(
'a'
)
var
a
=
document
.
createElement
(
'a'
)
a
.
setAttribute
(
'href'
,
url
)
a
.
setAttribute
(
'href'
,
url
)
a
.
setAttribute
(
'target'
,
'_blank'
)
a
.
setAttribute
(
'target'
,
target
||
'_blank'
)
a
.
setAttribute
(
'id'
,
'd2admin-link-temp'
)
a
.
setAttribute
(
'id'
,
'd2admin-link-temp'
)
document
.
body
.
appendChild
(
a
)
document
.
body
.
appendChild
(
a
)
a
.
click
()
a
.
click
()
...
...
src/router/routes.js
View file @
609464c
...
@@ -275,7 +275,7 @@ export const resources = {
...
@@ -275,7 +275,7 @@ export const resources = {
authId
:
'1070101'
,
authId
:
'1070101'
,
parentId
:
'10701'
,
parentId
:
'10701'
,
label
:
'审核'
,
label
:
'审核'
,
handle
:
'handle
Operation
'
handle
:
'handle
Verify
'
},
{
//
},
{
//
authId
:
'1070102'
,
authId
:
'1070102'
,
parentId
:
'10701'
,
parentId
:
'10701'
,
...
...
src/views/userManage/role/editDialog.vue
View file @
609464c
...
@@ -110,10 +110,6 @@ export default {
...
@@ -110,10 +110,6 @@ export default {
this
.
$refs
.
roleForm
.
validate
(
vaild
=>
{
this
.
$refs
.
roleForm
.
validate
(
vaild
=>
{
if
(
vaild
)
{
if
(
vaild
)
{
const
authIds
=
this
.
$refs
.
roleTree
.
getCheckedNodes
()
const
authIds
=
this
.
$refs
.
roleTree
.
getCheckedNodes
()
if
(
authIds
.
length
===
0
)
{
this
.
$message
.
error
(
'请选择权限!'
)
return
}
var
__p
=
{
...
this
.
roleForm
,
authIds
}
var
__p
=
{
...
this
.
roleForm
,
authIds
}
const
fMethod
=
__p
.
roleId
?
RoleModify
:
RoleReg
const
fMethod
=
__p
.
roleId
?
RoleModify
:
RoleReg
fMethod
(
__p
).
then
(
res
=>
{
fMethod
(
__p
).
then
(
res
=>
{
...
...
src/views/userManage/user/dialogReg.vue
View file @
609464c
<
template
>
<
template
>
<el-dialog
<el-dialog
:title=
"
regForm.id?'编辑用户':'创建用户'
"
:title=
"
title
"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
:before-close=
"handleClose"
:before-close=
"handleClose"
width=
"720px"
width=
"720px"
...
@@ -88,7 +88,6 @@
...
@@ -88,7 +88,6 @@
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Reg
,
AccountModify
}
from
'@/api/sys.account'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
import
{
RegistType
}
from
'@/common/constants'
import
{
RegistType
}
from
'@/common/constants'
...
@@ -103,12 +102,21 @@ export default {
...
@@ -103,12 +102,21 @@ export default {
editData
:
{
editData
:
{
type
:
Object
,
type
:
Object
,
default
:
{}
default
:
{}
},
verify
:
{
type
:
Function
,
default
:
null
}
}
},
},
watch
:
{
watch
:
{
editData
:
{
editData
:
{
handler
:
function
(
value
)
{
handler
:
function
(
value
)
{
this
.
title
=
value
&&
value
.
userId
?
'编辑用户信息'
:
'创建用户'
if
(
!
value
||
!
value
.
data
)
return
const
{
data
}
=
value
const
{
title
,
submit
}
=
data
this
.
title
=
title
this
.
submitFunction
=
submit
delete
value
.
data
Object
.
assign
(
this
.
regForm
,
value
)
Object
.
assign
(
this
.
regForm
,
value
)
},
},
immediate
:
true
immediate
:
true
...
@@ -136,6 +144,7 @@ export default {
...
@@ -136,6 +144,7 @@ export default {
roleId
:
''
roleId
:
''
},
},
title
:
''
,
title
:
''
,
submitFunction
:
null
,
rules
:
Object
.
freeze
({
rules
:
Object
.
freeze
({
loginName
:
[
loginName
:
[
{
required
:
true
,
message
:
'用户名不能为空'
,
trigger
:
[
'blur'
]
}
{
required
:
true
,
message
:
'用户名不能为空'
,
trigger
:
[
'blur'
]
}
...
@@ -174,21 +183,20 @@ export default {
...
@@ -174,21 +183,20 @@ export default {
methods
:
{
methods
:
{
...
mapActions
(
'd2admin/base'
,
[
'load'
]),
...
mapActions
(
'd2admin/base'
,
[
'load'
]),
handleClose
(
done
)
{
handleClose
(
done
)
{
this
.
$event
.
$emit
(
'e-reg-dialog
'
,
false
)
this
.
$event
.
$emit
(
'e-reg-dialog
-close'
)
},
},
// 提交注册数据
// 提交注册
或审核
数据
submit
()
{
submit
()
{
this
.
$refs
.
regForm
.
validate
(
vaild
=>
{
this
.
$refs
.
regForm
.
validate
(
vaild
=>
{
if
(
vaild
)
{
if
(
vaild
)
{
var
__p
=
this
.
regForm
var
__p
=
this
.
regForm
__p
.
createType
=
RegistType
.
BY_ADMIN
__p
.
createType
=
RegistType
.
BY_ADMIN
const
fMethod
=
__p
.
userId
?
AccountModify
:
Reg
this
.
submitFunction
(
__p
).
then
(
res
=>
{
fMethod
(
__p
).
then
(
res
=>
{
const
{
operateStatus
}
=
res
const
{
operateStatus
}
=
res
if
(
operateStatus
)
{
if
(
operateStatus
)
{
notice
.
okTips
(
`
${
this
.
title
}
成功!`
)
notice
.
okTips
(
`
${
this
.
title
}
成功!`
)
this
.
$refs
.
regForm
.
resetFields
()
this
.
$refs
.
regForm
.
resetFields
()
this
.
$event
.
$emit
(
'e-reg-dialog
'
,
false
)
this
.
$event
.
$emit
(
'e-reg-dialog
-close'
)
}
else
{
}
else
{
notice
.
errorTips
(
`
${
this
.
title
}
失败!`
)
notice
.
errorTips
(
`
${
this
.
title
}
失败!`
)
}
}
...
...
src/views/userManage/user/index.vue
View file @
609464c
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
:total=
"page.totalCount"
:total=
"page.totalCount"
layout=
"sizes,total,->,prev,pager,next,jumper"
layout=
"sizes,total,->,prev,pager,next,jumper"
></el-pagination>
></el-pagination>
<dialog-reg
:isVisible=
"registerDialogVisible"
:editData=
"editData"
/>
<dialog-reg
:isVisible=
"registerDialogVisible"
:editData=
"editData"
/>
</d2-container>
</d2-container>
</template>
</template>
...
@@ -109,7 +109,8 @@ import {
...
@@ -109,7 +109,8 @@ import {
AccountIncrease
,
AccountIncrease
,
AccountForbidden
,
AccountForbidden
,
AccountValidate
,
AccountValidate
,
AccountActived
AccountActived
,
Reg
}
from
'@/api/sys.account'
}
from
'@/api/sys.account'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
...
@@ -137,8 +138,6 @@ export default {
...
@@ -137,8 +138,6 @@ export default {
'重置密码'
:
PassWordReset
,
'重置密码'
:
PassWordReset
,
'延期'
:
AccountIncrease
,
'延期'
:
AccountIncrease
,
'禁用'
:
AccountForbidden
,
'禁用'
:
AccountForbidden
,
'审核'
:
AccountValidate
,
'编辑'
:
AccountModify
,
'激活'
:
AccountActived
'激活'
:
AccountActived
}),
}),
// 新增/编辑弹窗
// 新增/编辑弹窗
...
@@ -182,7 +181,7 @@ export default {
...
@@ -182,7 +181,7 @@ export default {
mounted
()
{
mounted
()
{
this
.
fetchData
()
this
.
fetchData
()
this
.
$event
.
$on
(
'e-reg-dialog
'
,
res
=>
(
this
.
registerDialogVisible
=
res
))
this
.
$event
.
$on
(
'e-reg-dialog
-close'
,
res
=>
(
this
.
registerDialogVisible
=
false
))
},
},
methods
:
{
methods
:
{
...
@@ -235,7 +234,13 @@ export default {
...
@@ -235,7 +234,13 @@ export default {
return
row
.
status
===
value
return
row
.
status
===
value
},
},
handleRegister
()
{
handleRegister
()
{
this
.
registerDialogVisible
=
true
const
row
=
{
data
:
{
title
:
'用户创建'
,
submit
:
Reg
}
}
this
.
openDialog
(
row
)
},
},
handleSearch
()
{
handleSearch
()
{
this
.
loadUserList
()
this
.
loadUserList
()
...
@@ -250,10 +255,25 @@ export default {
...
@@ -250,10 +255,25 @@ export default {
this
.
loadUserList
()
this
.
loadUserList
()
},
},
handleEdit
(
row
)
{
handleEdit
(
row
)
{
row
=
util
.
deepClone
(
row
)
row
.
data
=
{
title
:
'用户编辑'
,
submit
:
AccountModify
}
this
.
openDialog
(
row
)
},
openDialog
(
row
)
{
this
.
registerDialogVisible
=
true
this
.
registerDialogVisible
=
true
this
.
editData
=
util
.
deepClone
(
row
)
this
.
editData
=
row
},
handleVerify
(
row
){
row
=
util
.
deepClone
(
row
)
row
.
data
=
{
title
:
'用户审核'
,
submit
:
AccountValidate
}
this
.
openDialog
(
row
)
},
},
// ------------
// ------------
// 列表各种操作
// 列表各种操作
async
handleOperation
(
row
,
e
)
{
async
handleOperation
(
row
,
e
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment