Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
a2ceec3e
Commit
a2ceec3e
authored
Sep 16, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加出车分公公司查询
parent
aac62864
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
28 deletions
+46
-28
index.vue
src/views/vehicle/vehicleDepartureLog/index.vue
+46
-28
No files found.
src/views/vehicle/vehicleDepartureLog/index.vue
View file @
a2ceec3e
...
...
@@ -30,20 +30,14 @@
</el-row>
<el-row>
<el-col
:span=
"5"
>
<el-form-item
label=
"所属大区"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.zoneId"
placeholder=
"请选择"
@
change=
"getProvinceRegions"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"出车分公司"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.departureId"
placeholder=
"请选择"
@
change=
"getAllBranchCompanyChange"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
<el-form-item
label=
"分公司"
prop=
"departureId"
>
<el-autocomplete
class=
"inline-input"
v-model=
"state1"
:fetch-suggestions=
"querySearch"
placeholder=
"请输入内容"
@
select=
"handleSelect"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
...
...
@@ -244,6 +238,8 @@
mileageStart
:
null
,
mileageEnd
:
null
,
state
:
null
,
allCompaniesArr
:[],
selectArry
:
[],
},
rules
:
{
name
:
[
...
...
@@ -262,11 +258,11 @@
zoneId
:
null
},
allZoneArr
:[],
//全部片区
state1
:
''
,
listQuery
:
{
page
:
1
,
limit
:
20
,
time
:
""
,
zoneId
:
undefined
,
numberPlate
:
undefined
,
departureId
:
undefined
,
},
...
...
@@ -291,6 +287,10 @@
this
.
listQuery
.
numberPlate
=
numberPlate
;
}
this
.
handleFilter
();
getAll
()
.
then
(
response
=>
{
this
.
allCompaniesArr
=
response
.
data
;
})
},
computed
:
{
...
mapGetters
([
...
...
@@ -332,6 +332,9 @@
if
(
this
.
listQuery
.
time
)
{
this
.
listQuery
.
time
=
this
.
dateToString
(
this
.
listQuery
.
time
);
}
if
(
!
this
.
state1
)
{
this
.
listQuery
.
departureId
=
undefined
;
}
page
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
...
...
@@ -339,6 +342,34 @@
this
.
listLoading
=
false
;
})
},
querySearch
(
queryString
,
cb
)
{
let
selectArry
=
[];
let
iitem
=
{
value
:
"全部"
,
name
:
"全部"
};
selectArry
.
push
(
iitem
);
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
this
.
selectArry
=
selectArry
;
var
results
=
queryString
?
selectArry
.
filter
(
this
.
createFilter
(
queryString
))
:
selectArry
;
// 调用 callback 返回建议列表的数据
cb
(
results
);
},
createFilter
(
queryString
)
{
return
(
restaurant
)
=>
{
return
(
restaurant
.
name
.
indexOf
(
queryString
.
toLowerCase
())
!=
-
1
);
};
},
handleSelect
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
listQuery
.
departureId
=
undefined
;
}
else
{
this
.
listQuery
.
departureId
=
item
.
id
;
}
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
getList
();
...
...
@@ -347,19 +378,6 @@
this
.
listQuery
.
page
=
val
;
this
.
getList
();
},
//监听change事件
getProvinceRegions
(
item
)
{
this
.
listQuery
.
zoneId
=
item
this
.
baranchQuery
.
zoneId
=
item
this
.
listQuery
.
departureId
=
undefined
;
getAllBranchCompanyByZoneId
(
this
.
baranchQuery
)
.
then
(
response
=>
{
this
.
allBranchCompany
=
response
.
data
;
})
},
getAllBranchCompanyChange
(
item
)
{
this
.
listQuery
.
departureId
=
item
},
}
}
</
script
>
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