Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
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 2bb1f0f5
authored
Sep 11, 2019
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增代码规范规则
1 parent
addc33fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
72 deletions
src/views/userManage/user/index.vue
src/views/userManage/user/index.vue
View file @
2bb1f0f
...
...
@@ -81,7 +81,7 @@
<el-table-column
label=
"部门"
prop=
"departName"
width=
"200"
align=
"center"
></el-table-column>
<el-table-column
label=
"职务"
prop=
"postName"
width=
"200"
align=
"center"
></el-table-column>
<el-table-column
label=
"所属站点"
prop=
"stationName"
width=
"200"
align=
"center"
></el-table-column>
<el-table-column
align=
"center"
fixed=
"right"
width=
"2
0
0"
label=
"操作"
>
<el-table-column
align=
"center"
fixed=
"right"
width=
"2
2
0"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<auth-button
:mapping=
"mapping"
:data=
"scope.row"
></auth-button>
</
template
>
...
...
@@ -111,16 +111,16 @@ import {
AccountValidate
,
AccountActived
,
Reg
}
from
'@/api/sys.account'
import
notice
from
'@/common/notice'
import
{
mapActions
}
from
'vuex'
import
util
from
'@/libs/util'
}
from
'@/api/sys.account'
;
import
notice
from
'@/common/notice'
;
import
{
mapActions
}
from
'vuex'
;
import
util
from
'@/libs/util'
;
export
default
{
name
:
'FimsUsers'
,
components
:
{
DialogReg
:
()
=>
import
(
'./dialogReg'
)
},
data
()
{
data
()
{
return
{
tag
:
Object
.
freeze
({
effect
:
'dark'
,
...
...
@@ -170,128 +170,128 @@ export default {
// 角色
roles
:
[]
}
}
}
;
},
watch
:
{
'searchTimes'
(
value
)
{
!
value
&&
this
.
loadUserList
()
'searchTimes'
(
value
)
{
!
value
&&
this
.
loadUserList
()
;
}
},
mounted
()
{
this
.
fetchData
()
mounted
()
{
this
.
fetchData
()
;
this
.
$event
.
$on
(
'e-reg-dialog-close'
,
isReload
=>
{
this
.
registerDialogVisible
=
false
isReload
&&
this
.
loadUserList
()
})
this
.
registerDialogVisible
=
false
;
isReload
&&
this
.
loadUserList
()
;
})
;
},
methods
:
{
...
mapActions
(
'd2admin/base'
,
[
'load'
]),
// 加载业务所需所有数据
fetchData
()
{
this
.
loadBaseData
()
this
.
loadUserList
()
fetchData
()
{
this
.
loadBaseData
()
;
this
.
loadUserList
()
;
},
async
loadBaseData
()
{
const
{
role
,
station
,
post
}
=
await
this
.
load
()
this
.
baseData
.
posts
=
post
this
.
baseData
.
stations
=
station
this
.
baseData
.
roles
=
role
Object
.
freeze
(
this
.
baseData
)
async
loadBaseData
()
{
const
{
role
,
station
,
post
}
=
await
this
.
load
()
;
this
.
baseData
.
posts
=
post
;
this
.
baseData
.
stations
=
station
;
this
.
baseData
.
roles
=
role
;
Object
.
freeze
(
this
.
baseData
)
;
},
/* 接口请求-start */
getParams
()
{
let
startTime
=
''
let
endTime
=
''
getParams
()
{
let
startTime
=
''
;
let
endTime
=
''
;
if
(
this
.
searchTimes
&&
this
.
searchTimes
.
length
)
{
[
startTime
,
endTime
]
=
this
.
searchTimes
startTime
=
`
${
startTime
}
00:00:00`
endTime
=
`
${
endTime
}
23:59:59`
[
startTime
,
endTime
]
=
this
.
searchTimes
;
startTime
=
`
${
startTime
}
00:00:00`
;
endTime
=
`
${
endTime
}
23:59:59`
;
}
return
{
...
this
.
page
,
...
this
.
searchForm
,
startTime
,
endTime
}
}
;
},
loadUserList
()
{
this
.
tableLoading
=
true
const
params
=
this
.
getParams
()
loadUserList
()
{
this
.
tableLoading
=
true
;
const
params
=
this
.
getParams
()
;
UserList
(
params
)
.
then
(
res
=>
{
const
{
pagination
,
userList
}
=
res
this
.
tableData
=
userList
this
.
page
=
pagination
this
.
tableLoading
=
false
const
{
pagination
,
userList
}
=
res
;
this
.
tableData
=
userList
;
this
.
page
=
pagination
;
this
.
tableLoading
=
false
;
})
.
catch
(()
=>
{
notice
.
errorTips
()
this
.
tableLoading
=
false
})
notice
.
errorTips
()
;
this
.
tableLoading
=
false
;
})
;
},
filterTag
(
value
,
row
)
{
return
row
.
status
===
value
filterTag
(
value
,
row
)
{
return
row
.
status
===
value
;
},
handleRegister
()
{
handleRegister
()
{
const
row
=
{
data
:
{
title
:
'用户创建'
,
submit
:
Reg
}
}
this
.
openDialog
(
row
)
}
;
this
.
openDialog
(
row
)
;
},
handleSearch
()
{
this
.
loadUserList
()
handleSearch
()
{
this
.
loadUserList
()
;
},
// 页码
handleSizeChange
(
value
)
{
this
.
page
.
pageCount
=
value
this
.
loadUserList
()
handleSizeChange
(
value
)
{
this
.
page
.
pageCount
=
value
;
this
.
loadUserList
()
;
},
handleCurrentChange
(
value
)
{
this
.
page
.
pageSize
=
value
this
.
loadUserList
()
handleCurrentChange
(
value
)
{
this
.
page
.
pageSize
=
value
;
this
.
loadUserList
()
;
},
handleEdit
(
row
)
{
row
=
util
.
deepClone
(
row
)
handleEdit
(
row
)
{
row
=
util
.
deepClone
(
row
)
;
row
.
data
=
{
title
:
'用户编辑'
,
submit
:
AccountModify
}
this
.
openDialog
(
row
)
}
;
this
.
openDialog
(
row
)
;
},
openDialog
(
row
)
{
this
.
registerDialogVisible
=
true
this
.
editData
=
row
openDialog
(
row
)
{
this
.
registerDialogVisible
=
true
;
this
.
editData
=
row
;
},
handleVerify
(
row
)
{
row
=
util
.
deepClone
(
row
)
handleVerify
(
row
)
{
row
=
util
.
deepClone
(
row
)
;
row
.
data
=
{
title
:
'用户审核'
,
submit
:
AccountValidate
}
this
.
openDialog
(
row
)
}
;
this
.
openDialog
(
row
)
;
},
// ------------
// 列表各种操作
async
handleOperation
(
row
,
e
)
{
const
_actionText
=
e
.
target
.
innerText
const
res
=
await
this
.
apiMapping
[
_actionText
]({
userId
:
row
.
userId
})
const
{
operateStatus
}
=
res
async
handleOperation
(
row
,
e
)
{
const
_actionText
=
e
.
target
.
innerText
;
const
res
=
await
this
.
apiMapping
[
_actionText
]({
userId
:
row
.
userId
})
;
const
{
operateStatus
}
=
res
;
if
(
operateStatus
)
{
notice
.
okTips
(
`
${
_actionText
}
成功!`
)
this
.
loadUserList
()
notice
.
okTips
(
`
${
_actionText
}
成功!`
)
;
this
.
loadUserList
()
;
}
else
{
notice
.
errorTips
(
`
${
_actionText
}
失败!`
)
notice
.
errorTips
(
`
${
_actionText
}
失败!`
)
;
}
}
}
}
}
;
</
script
>
<
style
scoped
>
</
style
>
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