Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-system
/
system
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 64d9ec70
authored
Nov 12, 2020
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加搜索时间开始限制、编辑时对删除的字典进行处理
1 parent
3e0cf74b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
21 deletions
src/styles/common.scss
src/views/dictionaryManage/dictionaryData/index.vue
src/views/dictionaryManage/index.vue
src/views/orginizaManage/index.vue
src/views/user/index.vue
src/views/workLog/index.vue
src/styles/common.scss
View file @
64d9ec7
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
.user-tree
{
.user-tree
{
margin-top
:
20px
;
margin-top
:
20px
;
padding
:
2
0px
;
padding
:
1
0px
;
// float: left;
// float: left;
display
:
inline-block
;
display
:
inline-block
;
width
:
200px
;
width
:
200px
;
...
...
src/views/dictionaryManage/dictionaryData/index.vue
View file @
64d9ec7
...
@@ -122,7 +122,7 @@ export default {
...
@@ -122,7 +122,7 @@ export default {
prop
:
'daterange'
,
prop
:
'daterange'
,
pickerOptions
:
{
pickerOptions
:
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
;
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
}
}
}
}
...
...
src/views/dictionaryManage/index.vue
View file @
64d9ec7
...
@@ -119,7 +119,7 @@ export default {
...
@@ -119,7 +119,7 @@ export default {
prop
:
'daterange'
,
prop
:
'daterange'
,
pickerOptions
:
{
pickerOptions
:
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
;
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
}
}
}
}
...
...
src/views/orginizaManage/index.vue
View file @
64d9ec7
...
@@ -366,7 +366,7 @@ export default {
...
@@ -366,7 +366,7 @@ export default {
getTableList
(
params
).
then
((
res
)
=>
{
getTableList
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
total
=
res
.
data
.
totalElements
this
.
total
=
res
.
data
.
totalElements
this
.
orginTableData
=
res
.
data
this
.
orginTableData
=
res
.
data
.
list
}
else
{
}
else
{
this
.
orginTableData
=
[]
this
.
orginTableData
=
[]
}
}
...
...
src/views/user/index.vue
View file @
64d9ec7
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
:data=
"treedata"
:data=
"treedata"
accordion
accordion
node-key=
"id"
node-key=
"id"
highlight-current
@
node-click=
"handleNodeClick"
@
node-click=
"handleNodeClick"
:render-content=
"renderContent"
:render-content=
"renderContent"
>
>
...
@@ -123,9 +124,8 @@
...
@@ -123,9 +124,8 @@
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
// import UserService from 'services/user';
<
script
>
import
{
getUserList
,
getSuperUser
,
addUser
,
editUser
,
detailUser
,
deleteUser
,
roleList
,
dictInfo
}
from
'services/user'
;
import
{
getUserList
,
getSuperUser
,
addUser
,
editUser
,
detailUser
,
deleteUser
,
roleList
,
dictInfo
}
from
'services/user'
;
import
{
getSimpleList
,
getTreeOrg
}
from
'services/orginizaManage'
import
{
getSimpleList
,
getTreeOrg
}
from
'services/orginizaManage'
export
default
{
export
default
{
...
@@ -214,7 +214,6 @@ export default {
...
@@ -214,7 +214,6 @@ export default {
userVisible
:
false
,
userVisible
:
false
,
userForm
:
{
userForm
:
{
account
:
''
,
account
:
''
,
gender
:
'2'
,
departmentName
:
''
,
departmentName
:
''
,
superiorName
:
''
,
superiorName
:
''
,
enableStatus
:
true
enableStatus
:
true
...
@@ -249,6 +248,8 @@ export default {
...
@@ -249,6 +248,8 @@ export default {
},
},
addRule
:
[{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
},
addRule
:
[{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
},
{
min
:
6
,
max
:
50
,
message
:
'长度在 6 到 50 个字符'
,
trigger
:
'blur'
}],
{
min
:
6
,
max
:
50
,
message
:
'长度在 6 到 50 个字符'
,
trigger
:
'blur'
}],
sexList
:
[],
positionList
:
[],
// 部门弹窗
// 部门弹窗
filterDialogTitle
:
'选择组织'
,
filterDialogTitle
:
'选择组织'
,
filterVisible
:
false
,
filterVisible
:
false
,
...
@@ -345,11 +346,11 @@ export default {
...
@@ -345,11 +346,11 @@ export default {
this
.
userDialogTitle
=
'新增用户'
this
.
userDialogTitle
=
'新增用户'
this
.
$set
(
this
.
userRules
,
'password'
,
this
.
addRule
)
this
.
$set
(
this
.
userRules
,
'password'
,
this
.
addRule
)
this
.
userForm
=
{
this
.
userForm
=
{
gender
:
'2'
,
departmentName
:
''
,
departmentName
:
''
,
superiorName
:
''
,
superiorName
:
''
,
enableStatus
:
true
enableStatus
:
true
}
}
this
.
userForm
.
gender
=
this
.
sexList
.
length
>
0
?
this
.
sexList
[
0
].
dictValue
:
''
this
.
userData
.
map
(
item
=>
{
this
.
userData
.
map
(
item
=>
{
if
(
item
.
prop
==
'superiorName'
)
{
if
(
item
.
prop
==
'superiorName'
)
{
item
.
hidden
=
true
item
.
hidden
=
true
...
@@ -372,15 +373,26 @@ export default {
...
@@ -372,15 +373,26 @@ export default {
},
},
// 编辑触发事件
// 编辑触发事件
editEvent
(
row
)
{
editEvent
(
row
)
{
console
.
log
(
row
)
detailUser
({
id
:
row
.
id
}).
then
(
res
=>
{
detailUser
({
id
:
row
.
id
}).
then
(
res
=>
{
this
.
userDialogTitle
=
'编辑用户'
this
.
userDialogTitle
=
'编辑用户'
this
.
userForm
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
this
.
userForm
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
this
.
userForm
.
enableStatus
=
res
.
data
.
enableStatus
==
1
?
true
:
false
this
.
userForm
.
enableStatus
=
res
.
data
.
enableStatus
==
1
?
true
:
false
this
.
userForm
.
gender
=
this
.
userForm
.
gender
+
''
//
this.userForm.gender = this.userForm.gender + ''
this
.
userData
.
map
(
item
=>
{
this
.
userData
.
map
(
item
=>
{
if
(
item
.
prop
==
'superiorName'
)
{
if
(
item
.
prop
==
'superiorName'
)
{
item
.
hidden
=
this
.
userForm
.
deptDepth
==
0
item
.
hidden
=
this
.
userForm
.
deptDepth
==
0
}
else
if
(
item
.
prop
==
'gender'
)
{
let
flag
=
false
item
.
options
.
map
(
i
=>
{
if
(
i
.
dictValue
==
this
.
userForm
.
gender
)
flag
=
true
})
this
.
userForm
.
gender
=
flag
?
this
.
userForm
.
gender
+
''
:
''
}
else
if
(
item
.
prop
==
'position'
)
{
let
isFlag
=
false
item
.
options
.
map
(
j
=>
{
if
(
j
.
dictValue
==
this
.
userForm
.
position
)
isFlag
=
true
})
if
(
!
isFlag
)
this
.
userForm
.
position
=
''
}
}
})
})
this
.
handleClose
(
res
.
data
)
this
.
handleClose
(
res
.
data
)
...
@@ -435,10 +447,8 @@ export default {
...
@@ -435,10 +447,8 @@ export default {
this
.
filterVisible
=
!
this
.
filterVisible
this
.
filterVisible
=
!
this
.
filterVisible
},
},
filterConfirm
()
{
filterConfirm
()
{
console
.
log
(
this
.
$refs
.
tree
.
getCurrentNode
())
if
(
this
.
filterDialogTitle
==
'选择直接上级'
)
{
if
(
this
.
filterDialogTitle
==
'选择直接上级'
)
{
if
(
this
.
$refs
.
tree
.
getCurrentNode
().
disabled
)
{
if
(
this
.
$refs
.
tree
.
getCurrentNode
().
disabled
)
{
console
.
log
(
'jinlaile......'
)
this
.
$message
(
'该选项不可选择为直接上级'
)
this
.
$message
(
'该选项不可选择为直接上级'
)
}
else
{
}
else
{
this
.
userForm
.
superiorId
=
this
.
$refs
.
tree
.
getCurrentNode
().
id
this
.
userForm
.
superiorId
=
this
.
$refs
.
tree
.
getCurrentNode
().
id
...
@@ -500,19 +510,18 @@ export default {
...
@@ -500,19 +510,18 @@ export default {
// 岗位列表
// 岗位列表
getPosti
(
value
)
{
getPosti
(
value
)
{
dictInfo
(
'sys_position'
).
then
(
res
=>
{
dictInfo
(
'sys_position'
).
then
(
res
=>
{
// const arr = []
res
.
data
.
map
(
item
=>
{
// res.data.map(item => {
if
(
!
item
.
disabled
)
this
.
positionList
.
length
>
0
?
this
.
positionList
.
push
(
item
)
:
''
// if (!item.disabled) arr.push(item)
})
// })
this
.
userData
[
this
.
userData
.
length
-
1
].
options
=
res
.
data
this
.
userData
[
this
.
userData
.
length
-
1
].
options
=
res
.
data
})
})
},
},
getSex
()
{
getSex
()
{
dictInfo
(
'sys_user_sex'
).
then
(
res
=>
{
dictInfo
(
'sys_user_sex'
).
then
(
res
=>
{
// const arr = []
res
.
data
.
map
(
item
=>
{
// res.data.map(item => {
if
(
!
item
.
disabled
)
this
.
sexList
.
push
(
item
)
// if (!item.disabled) arr.push(item
)
}
)
// }
)
console
.
log
(
this
.
sexList
)
this
.
userData
.
map
(
item
=>
{
this
.
userData
.
map
(
item
=>
{
if
(
item
.
prop
==
'gender'
)
{
if
(
item
.
prop
==
'gender'
)
{
item
.
options
=
res
.
data
item
.
options
=
res
.
data
...
...
src/views/workLog/index.vue
View file @
64d9ec7
...
@@ -57,7 +57,7 @@ export default {
...
@@ -57,7 +57,7 @@ export default {
prop
:
'daterange'
,
prop
:
'daterange'
,
pickerOptions
:
{
pickerOptions
:
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
;
return
time
.
getTime
()
>
Date
.
now
()
||
time
.
getTime
()
<
new
Date
(
'2017-12-31'
).
getTime
()
}
}
}
}
}
}
...
...
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