Commit c7994539 authored by mahui's avatar mahui

init

parent 6315b1d6
......@@ -179,12 +179,12 @@
<div class="filter-one">
<p class="filter-name">类型筛选</p>
<div class="filter-content">
<el-select v-model="filter.type" class="m-2" placeholder="请选择类型" @change="()=>getList()">
<el-select v-model="filter.order_type" class="m-2" placeholder="请选择类型" @change="()=>getOrderList()">
<el-option
v-for="item in [{name:'全部类型',value:'',prop:''},...typeList]"
:key="item.prop"
v-for="item in typeList_order"
:key="item.value"
:label="item.name"
:value="item.prop"
:value="item.value"
/>
</el-select>
</div>
......@@ -193,7 +193,7 @@
<p class="filter-name">时间筛选</p>
<div class="filter-content">
<el-date-picker
v-model="filter.time"
v-model="filter.time_order"
type="datetimerange"
format="YYYY-MM-DD HH:mm"
value-format="YYYY-MM-DD HH:mm"
......@@ -202,7 +202,7 @@
end-placeholder="结束时间"
:teleported="false"
:editable="true"
@change="()=>getList()"
@change="()=>getOrderList()"
/>
</div>
</div>
......@@ -242,7 +242,7 @@
:background="background"
layout="sizes, prev, pager, next"
:total="list.total"
@size-change="()=>getOrderList(list.page)"
@size-change="()=>getOrderList()"
@current-change="()=>getOrderList()"
/>
</div>
......@@ -322,7 +322,9 @@
myChart:null,
filter:{
type:'',
time:['','']
order_type:'',
time:['',''],
time_order:['','']
},
typeList:[
{
......@@ -390,6 +392,20 @@
create_time:'2022-09-01 10:00'
}
],
typeList_order:[
{
name:'全部类型',
value:'',
},
{
name:'一体化设备',
value:1,
},
{
name:'玻璃钢',
value:2,
}
],
list:{
page:1,
pageSize:15,
......@@ -535,12 +551,12 @@
page:page,
page_size:state.list.pageSize,
};
if(state.filter.time[0]&&state.filter.time[1]){
p.start_time = state.filter.time[0];
p.end_time = state.filter.time[1];
if(state.filter.time_order[0]&&state.filter.time_order[1]){
p.start_time = state.filter.time_order[0];
p.end_time = state.filter.time_order[1];
}
if(state.filter.type){
p.type = state.filter.type;
if(state.filter.order_type){
p.type = state.filter.order_type;
}
state.list.page = page;
api.getPatrolList(p).then((res)=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment