Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5
Overview
Overview
Details
Activity
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
vanke
h5
Commits
117e9f81
Commit
117e9f81
authored
Jun 15, 2021
by
谢鸿飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改所属部门模糊查询
parent
2185883b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
4 deletions
+51
-4
.eslintrc.js
.eslintrc.js
+1
-1
receiveAdmin.vue
src/views/Admin/receiveAdmin.vue
+50
-3
No files found.
.eslintrc.js
View file @
117e9f81
...
@@ -5,7 +5,7 @@ module.exports = {
...
@@ -5,7 +5,7 @@ module.exports = {
},
},
extends
:
[
extends
:
[
'plugin:vue/essential'
,
'plugin:vue/essential'
,
'@vue/standard'
//
'@vue/standard'
],
],
parserOptions
:
{
parserOptions
:
{
parser
:
'babel-eslint'
parser
:
'babel-eslint'
...
...
src/views/Admin/receiveAdmin.vue
View file @
117e9f81
...
@@ -8,8 +8,12 @@
...
@@ -8,8 +8,12 @@
</van-col>
</van-col>
<van-col
span=
"16"
class=
"menu-dropdown"
>
<van-col
span=
"16"
class=
"menu-dropdown"
>
<van-dropdown-menu>
<van-dropdown-menu>
<van-dropdown-item
:title=
"departTitle"
v-model=
"params.departId"
:options=
"departOptions"
<van-dropdown-item
:title=
"departTitle"
v-model=
"params.departId"
:options=
"departOptions"
@
change=
"changeDepart"
/>
@
change=
"changeDepart"
@
open=
"openMenu"
@
close =
"closeMenu"
style=
"top:30px"
/>
<van-cell-group
v-if=
"inputStatus"
class=
"seachInput"
>
<van-field
v-model=
"search"
label=
"部门查询"
placeholder=
"请输入部门名称"
@
input=
"searchInputChange"
/>
</van-cell-group>
<van-dropdown-item
:title=
"timeTitle"
ref=
"myPicker"
>
<van-dropdown-item
:title=
"timeTitle"
ref=
"myPicker"
>
<van-datetime-picker
<van-datetime-picker
v-model=
"currentDate"
v-model=
"currentDate"
...
@@ -18,6 +22,7 @@
...
@@ -18,6 +22,7 @@
@
confirm=
"confirmDate"
@
confirm=
"confirmDate"
/>
/>
</van-dropdown-item>
</van-dropdown-item>
</van-dropdown-menu>
</van-dropdown-menu>
</van-col>
</van-col>
</van-row>
</van-row>
...
@@ -77,10 +82,12 @@ export default {
...
@@ -77,10 +82,12 @@ export default {
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
departId
:
null
,
departId
:
null
,
queryTime
:
null
queryTime
:
null
,
},
},
departTitle
:
'所属部门'
,
departTitle
:
'所属部门'
,
timeTitle
:
'领用时间'
timeTitle
:
'领用时间'
,
inputStatus
:
false
,
search
:
''
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -151,6 +158,37 @@ export default {
...
@@ -151,6 +158,37 @@ export default {
this
.
params
.
pageNum
=
1
this
.
params
.
pageNum
=
1
this
.
getList
()
this
.
getList
()
},
},
// 打开菜单
openMenu
()
{
this
.
inputStatus
=
true
console
.
log
(
this
.
inputStatus
)
},
// 关闭菜单
closeMenu
()
{
this
.
inputStatus
=
false
console
.
log
(
this
.
inputStatus
)
this
.
search
=
''
getDepartList
().
then
(
res
=>
{
res
.
data
.
list
.
forEach
(
item
=>
{
item
.
text
=
item
.
name
item
.
value
=
item
.
id
})
this
.
departOptions
=
res
.
data
.
list
console
.
log
(
'this.departOptions'
,
this
.
departOptions
,
res
.
data
.
list
)
})
},
searchInputChange
(){
getDepartList
({
name
:
this
.
search
}).
then
(
res
=>
{
res
.
data
.
list
.
forEach
(
item
=>
{
item
.
text
=
item
.
name
item
.
value
=
item
.
id
})
this
.
departOptions
=
res
.
data
.
list
console
.
log
(
'this.departOptions'
,
this
.
departOptions
,
res
.
data
.
list
)
})
},
// 日期
// 日期
confirmDate
(
data
)
{
confirmDate
(
data
)
{
const
d
=
new
Date
(
data
)
const
d
=
new
Date
(
data
)
...
@@ -233,4 +271,13 @@ export default {
...
@@ -233,4 +271,13 @@ export default {
.width_100
{
.width_100
{
width
:
100%
;
width
:
100%
;
}
}
.seachInput
{
width
:
100%
;
z-index
:
9999
;
position
:
fixed
;
left
:
0
;
width
:
100%
;
top
:
80%
;
box-shadow
:
0
-2px
3px
-1px
#cccccc
;
}
</
style
>
</
style
>
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