Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
NLT-e-cigarette
Commits
cbf27501
Commit
cbf27501
authored
Jun 15, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
379a5b30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
12 deletions
+42
-12
user.js
src/api/system/user.js
+8
-0
index.vue
src/views/system/user/index.vue
+34
-12
No files found.
src/api/system/user.js
View file @
cbf27501
...
@@ -58,6 +58,14 @@ export function updateUser(data) {
...
@@ -58,6 +58,14 @@ export function updateUser(data) {
}
}
})
})
}
}
// 查数据字典
export
function
getDicts
(
params
)
{
return
request
({
url
:
'/system/dict/type/getDictByTypeStrings'
,
method
:
'get'
,
params
})
}
// 删除用户
// 删除用户
export
function
delUser
(
userId
)
{
export
function
delUser
(
userId
)
{
...
...
src/views/system/user/index.vue
View file @
cbf27501
...
@@ -238,7 +238,8 @@
...
@@ -238,7 +238,8 @@
<div>
Start Date
</div>
<div>
Start Date
</div>
</
template
>
</
template
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
nltStartDate
||
'-'
}}
<span
v-if=
"scope.row.nltStartDate"
>
{{
scope
.
row
.
nltStartDate
.
substring
(
0
,
10
)
}}
</span>
<span
v-else
>
{{
'-'
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
width=
"70"
prop=
"flag"
>
<el-table-column
align=
"center"
width=
"70"
prop=
"flag"
>
...
@@ -329,7 +330,14 @@
...
@@ -329,7 +330,14 @@
<div
class=
"labelName"
>
班组
</div>
<div
class=
"labelName"
>
班组
</div>
<div
class=
"labelName"
>
Group
</div>
<div
class=
"labelName"
>
Group
</div>
</div>
</div>
<el-input
v-model
.
trim=
"form.nltBz"
show-word-limit
:maxlength=
"20"
placeholder=
"请输入班组"
/>
<el-select
v-model=
"form.nltBz"
style=
"width: 100%"
placeholder=
"请选择班组"
>
<el-option
v-for=
"dict in shiftOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -472,8 +480,8 @@
...
@@ -472,8 +480,8 @@
<div
class=
"labelName"
>
Dept
</div>
<div
class=
"labelName"
>
Dept
</div>
</div>
</div>
<treeSelect
<treeSelect
class=
"userTree"
v-model=
"form.deptId"
v-model=
"form.deptId"
class=
"userTree"
:disable-branch-nodes=
"false"
:disable-branch-nodes=
"false"
:default-expand-level=
"1"
:default-expand-level=
"1"
:options=
"deptOptions"
:options=
"deptOptions"
...
@@ -572,6 +580,7 @@
...
@@ -572,6 +580,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
import
{
getDicts
,
listUser
,
listUser
,
getUser
,
getUser
,
delUser
,
delUser
,
...
@@ -637,6 +646,7 @@ export default {
...
@@ -637,6 +646,7 @@ export default {
}
}
}
}
return
{
return
{
shiftOptions
:
[],
// 班次数组
confirmLoading
:
false
,
confirmLoading
:
false
,
deptTreeData
:
[],
deptTreeData
:
[],
pwdTypeMap
:
{
pwdTypeMap
:
{
...
@@ -701,6 +711,7 @@ export default {
...
@@ -701,6 +711,7 @@ export default {
deptChildren
:
[],
deptChildren
:
[],
// 表单参数
// 表单参数
form
:
{
form
:
{
deptId
:
''
,
roleList
:
[],
roleList
:
[],
nltStartDate
:
''
,
nltStartDate
:
''
,
nltPosition
:
''
,
nltPosition
:
''
,
...
@@ -748,7 +759,7 @@ export default {
...
@@ -748,7 +759,7 @@ export default {
userType
:
''
,
userType
:
''
,
allowLogin
:
''
,
allowLogin
:
''
,
flag
:
''
,
flag
:
''
,
deptId
:
''
,
deptId
:
undefined
,
name
:
''
name
:
''
},
},
// 表单校验
// 表单校验
...
@@ -839,14 +850,29 @@ export default {
...
@@ -839,14 +850,29 @@ export default {
this
.
getList
()
this
.
getList
()
this
.
getRoleSelect
()
this
.
getRoleSelect
()
this
.
getTreeSelect
()
this
.
getTreeSelect
()
this
.
getDictDetails
()
// this.getConfigKey('sys.user.initPassword').then(response => {
// this.getConfigKey('sys.user.initPassword').then(response => {
// this.initPassword = response.msg
// this.initPassword = response.msg
// })
// })
},
},
methods
:
{
methods
:
{
handleCheckChange
(
data
)
{
getDictDetails
()
{
console
.
log
(
'check'
,
data
)
const
params
=
{
this
.
form
.
deptId
=
data
.
id
dictTypes
:
'shift'
}
getDicts
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
res
.
data
.
forEach
(
item
=>
{
if
(
item
.
dictLabel
===
'Day'
)
{
item
.
dictLabel
=
'白班'
this
.
shiftOptions
.
push
(
item
)
}
else
if
(
item
.
dictLabel
===
'Night'
)
{
item
.
dictLabel
=
'夜班'
this
.
shiftOptions
.
push
(
item
)
}
})
}
})
},
},
changeValue
()
{
changeValue
()
{
this
.
$refs
.
form
.
validateField
(
'id'
)
this
.
$refs
.
form
.
validateField
(
'id'
)
...
@@ -932,7 +958,7 @@ export default {
...
@@ -932,7 +958,7 @@ export default {
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
userId
:
''
,
userId
:
''
,
deptId
:
''
,
deptId
:
undefined
,
phone
:
''
,
phone
:
''
,
username
:
''
,
username
:
''
,
userType
:
''
,
userType
:
''
,
...
@@ -1021,9 +1047,6 @@ export default {
...
@@ -1021,9 +1047,6 @@ export default {
this
.
$set
(
this
.
form
,
'roleList'
,
response
.
data
.
roleIds
.
split
(
','
).
map
(
num
=>
{
return
Number
(
num
)
}))
this
.
$set
(
this
.
form
,
'roleList'
,
response
.
data
.
roleIds
.
split
(
','
).
map
(
num
=>
{
return
Number
(
num
)
}))
}
}
console
.
log
(
'详情'
,
this
.
form
)
console
.
log
(
'详情'
,
this
.
form
)
// if (this.form.deptId) {
// this.form.deptId = this.form.deptId.split(',')
// }
this
.
title
=
'修改'
this
.
title
=
'修改'
})
})
// this.getChildrenDept(userId)
// this.getChildrenDept(userId)
...
@@ -1068,7 +1091,6 @@ export default {
...
@@ -1068,7 +1091,6 @@ export default {
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
confirmLoading
=
true
this
.
confirmLoading
=
true
// this.form.deptId = this.form.deptId.join(',')
if
(
this
.
form
.
businessId
!==
undefined
)
{
if
(
this
.
form
.
businessId
!==
undefined
)
{
console
.
log
(
'form'
,
this
.
form
)
console
.
log
(
'form'
,
this
.
form
)
updateUser
(
this
.
form
).
then
(
response
=>
{
updateUser
(
this
.
form
).
then
(
response
=>
{
...
...
Write
Preview
Markdown
is supported
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