优化在场车辆查询,根据paId 查询不合理 调整为根据paNum 查询

Signed-off-by: java110 <928255095@qq.com>
This commit is contained in:
java110 2024-04-22 01:59:09 +00:00 committed by Gitee
parent 5d14501112
commit a9ab8db91b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 205 additions and 208 deletions

View File

@ -4,10 +4,9 @@
<div class=" border-radius ">
<div class="margin-xs-r treeview ">
<ul class="list-group text-center border-radius">
<li class="list-group-item node-orgTree "
v-for="(item,index) in carInManageInfo.parkingAreas" :key="index"
@click="_swatchParkingArea(item)"
:class="{'vc-node-selected':carInManageInfo.conditions.paId == item.paId}">
<li class="list-group-item node-orgTree " v-for="(item,index) in carInManageInfo.parkingAreas"
:key="index" @click="_swatchParkingArea(item)"
:class="{'vc-node-selected':carInManageInfo.conditions.paNum == item.num}">
{{item.num}}
</li>
</ul>
@ -15,137 +14,137 @@
</div>
</div>
<div class="col-md-11">
<div class="ibox ">
<div class="ibox-title">
<h5>
<vc:i18n name="查询条件" namespace="carInManage"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-2">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入车牌号','carInManage')"
v-model="carInManageInfo.conditions.carNum" class=" form-control">
</div>
</div>
<div class="col-lg-2 ">
<select class="custom-select" v-model="carInManageInfo.conditions.state">
<option value="">{{vc.i18n('请选择车辆状态','carInManage')}}</option>
<option value="100300">{{vc.i18n('进场状态','carInManage')}}</option>
<option value="100400">{{vc.i18n('支付完成','carInManage')}}</option>
<option value="100500">{{vc.i18n('离场状态','carInManage')}}</option>
<option value="100600">{{vc.i18n('支付超时重新支付','carInManage')}}</option>
</select>
</div>
<div class="col-lg-2 ">
<select class="custom-select" v-model="carInManageInfo.conditions.carType">
<option value="">{{vc.i18n('请选择车牌类型','carInManage')}}</option>
<option value="T">{{vc.i18n('临时车','carInManage')}}</option>
<option value="S">{{vc.i18n('出售车辆','carInManage')}}</option>
<option value="H">{{vc.i18n('月租车','carInManage')}}</option>
<option value="W">{{vc.i18n('白名单','carInManage')}}</option>
<option value="B">{{vc.i18n('黑名单','carInManage')}}</option>
<option value="I">{{vc.i18n('内部车','carInManage')}}</option>
<option value="NM">{{vc.i18n('免费车','carInManage')}}</option>
</select>
</div>
<div class="col-sm-2">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入进场开始时间','carInManage')"
v-model="carInManageInfo.conditions.startTime" class="form-control carInStartTime">
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入进场结束时间','carInManage')"
v-model="carInManageInfo.conditions.endTime" class="form-control carInEndTime">
</div>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryCarInoutMethod()">
<vc:i18n name="查询" namespace="carInManage"></vc:i18n>
</button>
<button type="button" class="btn btn-primary btn-sm" v-on:click="_resetCarInoutMethod()">
<vc:i18n name="重置" namespace="carInManage"></vc:i18n>
</button>
</div>
</div>
</div>
</div>
<div class="ibox ">
<div class="ibox-title">
<h5>
<vc:i18n name="查询条件" namespace="carInManage"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;">
<div class="ibox">
<div class="ibox-title">
<h5>
<vc:i18n name="在场车辆" namespace="carInManage"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;"></div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<vc:i18n name="进出场ID" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="车辆状态" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="车牌号" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="停车场" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="计费规则" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="车牌类型" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="进场时间" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="在场时间" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="停车费用" namespace="carInManage"></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="carIn in carInManageInfo.carIns">
<td class="text-center">{{carIn.ciId}}</td>
<td class="text-center">{{carIn.stateName}}</td>
<td class="text-center" >{{carIn.carNum}}
</td>
<td class="text-center">{{carIn.paNum}}</td>
<td class="text-center" >{{carIn.feeName}}</td>
<td class="text-center">{{carIn.carTypeName}}</td>
<td class="text-center">{{carIn.inTime}}</td>
<td class="text-center">{{carIn.hours}}
<span>
<vc:i18n name="小时" namespace="carInManage"></vc:i18n>
</span>{{carIn.min}}
<span>
<vc:i18n name="分" namespace="carInManage"></vc:i18n>
</span>
</td>
<td class="text-center" v-if="carIn.carType != '1001'">
{{carIn.payCharge}}
</td>
<td class="text-center" v-else>-</td>
</tr>
</tbody>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-2">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入车牌号','carInManage')"
v-model="carInManageInfo.conditions.carNum" class=" form-control">
</div>
</div>
<div class="col-lg-2 ">
<select class="custom-select" v-model="carInManageInfo.conditions.state">
<option value="">{{vc.i18n('请选择车辆状态','carInManage')}}</option>
<option value="100300">{{vc.i18n('进场状态','carInManage')}}</option>
<option value="100400">{{vc.i18n('支付完成','carInManage')}}</option>
<option value="100500">{{vc.i18n('离场状态','carInManage')}}</option>
<option value="100600">{{vc.i18n('支付超时重新支付','carInManage')}}</option>
</select>
</div>
<div class="col-lg-2 ">
<select class="custom-select" v-model="carInManageInfo.conditions.carType">
<option value="">{{vc.i18n('请选择车牌类型','carInManage')}}</option>
<option value="T">{{vc.i18n('临时车','carInManage')}}</option>
<option value="S">{{vc.i18n('出售车辆','carInManage')}}</option>
<option value="H">{{vc.i18n('月租车','carInManage')}}</option>
<option value="W">{{vc.i18n('白名单','carInManage')}}</option>
<option value="B">{{vc.i18n('黑名单','carInManage')}}</option>
<option value="I">{{vc.i18n('内部车','carInManage')}}</option>
<option value="NM">{{vc.i18n('免费车','carInManage')}}</option>
</select>
</div>
<div class="col-sm-2">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入进场开始时间','carInManage')"
v-model="carInManageInfo.conditions.startTime" class="form-control carInStartTime">
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入进场结束时间','carInManage')"
v-model="carInManageInfo.conditions.endTime" class="form-control carInEndTime">
</div>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryCarInoutMethod()">
<vc:i18n name="查询" namespace="carInManage"></vc:i18n>
</button>
<button type="button" class="btn btn-primary btn-sm" v-on:click="_resetCarInoutMethod()">
<vc:i18n name="重置" namespace="carInManage"></vc:i18n>
</button>
</div>
</div>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>
<vc:i18n name="在场车辆" namespace="carInManage"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;"></div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<vc:i18n name="进出场ID" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="车辆状态" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="车牌号" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="停车场" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="计费规则" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="车牌类型" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="进场时间" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="在场时间" namespace="carInManage"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="停车费用" namespace="carInManage"></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="carIn in carInManageInfo.carIns">
<td class="text-center">{{carIn.ciId}}</td>
<td class="text-center">{{carIn.stateName}}</td>
<td class="text-center">{{carIn.carNum}}
</td>
<td class="text-center">{{carIn.paNum}}</td>
<td class="text-center">{{carIn.feeName}}</td>
<td class="text-center">{{carIn.carTypeName}}</td>
<td class="text-center">{{carIn.inTime}}</td>
<td class="text-center">{{carIn.hours}}
<span>
<vc:i18n name="小时" namespace="carInManage"></vc:i18n>
</span>{{carIn.min}}
<span>
<vc:i18n name="分" namespace="carInManage"></vc:i18n>
</span>
</td>
<td class="text-center" v-if="carIn.carType != '1001'">
{{carIn.payCharge}}
</td>
<td class="text-center" v-else>-</td>
</tr>
</tbody>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -20,7 +20,7 @@
carType:'',
startTime: '',
endTime: '',
paId:'',
paNum:'',
iotApiCode:'listCarInParkingAreaBmoImpl'
}
}
@ -63,7 +63,7 @@
},
_swatchParkingArea: function (_parkingArea) {
$that.carInManageInfo.conditions.paId = _parkingArea.paId;
$that.carInManageInfo.conditions.paNum = _parkingArea.num;
$that._listCarIns(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initCarInDateInfo: function () {

View File

@ -7,7 +7,7 @@
<li class="list-group-item node-orgTree "
v-for="(item,index) in carInoutManageInfo.parkingAreas" :key="index"
@click="_swatchParkingArea(item)"
:class="{'vc-node-selected':carInoutManageInfo.conditions.paId == item.paId}">
:class="{'vc-node-selected':carInoutManageInfo.conditions.paNum == item.num}">
{{item.num}}
</li>
</ul>

View File

@ -20,7 +20,7 @@
carType: '',
startTime: '',
endTime: '',
paId: '',
paNum: '',
iotApiCode: 'listCarInoutDetailBmoImpl'
}
}
@ -62,7 +62,7 @@
},
_swatchParkingArea: function (_parkingArea) {
$that.carInoutManageInfo.conditions.paId = _parkingArea.paId;
$that.carInoutManageInfo.conditions.paNum = _parkingArea.num;
$that._listCarInouts(DEFAULT_PAGE, DEFAULT_ROWS);
},

View File

@ -1,63 +1,60 @@
<div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>
<span><vc:i18n name="剩余车位" namespace="remainingParkingSpace"></vc:i18n></span>
</h5>
<div class="ibox-tools" style="top:10px;"></div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<span><vc:i18n name="总车位数" namespace="remainingParkingSpace"></vc:i18n></span>
</th>
<th data-hide="phone" class="text-center">
<span><vc:i18n name="剩余车位数" namespace="remainingParkingSpace"></vc:i18n></span>
</th>
<th data-hide="phone" class="text-center">
<span><vc:i18n name="采集时间" namespace="remainingParkingSpace"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="操作" namespace="remainingParkingSpace"></vc:i18n></span>
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">
{{remainingParkingSpaceInfo.total}}
<span><vc:i18n name="位" namespace="remainingParkingSpace"></vc:i18n></span>
</td>
<td class="text-center">
{{remainingParkingSpaceInfo.freeCount}}
<span><vc:i18n name="位" namespace="remainingParkingSpace"></vc:i18n></span>
</td>
<td class="text-center">
{{remainingParkingSpaceInfo.createTime}}
</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_freshRemainingParkingSpace()">
<span><vc:i18n name="刷新" namespace="remainingParkingSpace"></vc:i18n></span>
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="ibox">
<div class="ibox-title">
<h5>
<vc:i18n name="剩余车位" namespace="remainingParkingSpace"></vc:i18n>
</h5>
<div class="ibox-tools" style="top:10px;"></div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<vc:i18n name="总车位数" namespace="remainingParkingSpace"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="剩余车位数" namespace="remainingParkingSpace"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="采集时间" namespace="remainingParkingSpace"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="操作" namespace="remainingParkingSpace"></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">
{{remainingParkingSpaceInfo.total}}
<span>
<vc:i18n name="位" namespace="remainingParkingSpace"></vc:i18n>
</span>
</td>
<td class="text-center">
{{remainingParkingSpaceInfo.freeCount}}
<span>
<vc:i18n name="位" namespace="remainingParkingSpace"></vc:i18n>
</span>
</td>
<td class="text-center">
{{remainingParkingSpaceInfo.createTime}}
</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_freshRemainingParkingSpace()">
<span>
<vc:i18n name="刷新" namespace="remainingParkingSpace"></vc:i18n>
</span>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@ -8,27 +8,28 @@
}
},
_initMethod: function () {
//vc.component._listRemainingParkingSpaceData();
//$that._listRemainingParkingSpaceData();
},
_initEvent: function () {
},
methods: {
_listRemainingParkingSpaceData: function () {
var param = {
let param = {
params: {
communityId: vc.getCurrentCommunity().communityId
communityId: vc.getCurrentCommunity().communityId,
iotApiCode:'getFreeParkingSpaceBmoImpl'
}
}
//发送get请求
vc.http.apiGet('/machineTranslate.machineGetFreeParkingSpace',
vc.http.apiGet('/iot.getOpenApi',
param,
function (json, res) {
let _json = JSON.parse(json);
if (_json.code == 0) {
var listParkingSpaceData = JSON.parse(json).data;
vc.component.remainingParkingSpaceInfo.total = listParkingSpaceData.total;
vc.component.remainingParkingSpaceInfo.freeCount = listParkingSpaceData.freeCount;
vc.component.remainingParkingSpaceInfo.createTime = vc.dateTimeFormat(new Date().getTime());
let _json = JSON.parse(json).data;
$that.remainingParkingSpaceInfo.total = _json.total;
$that.remainingParkingSpaceInfo.freeCount = _json.freeCount;
$that.remainingParkingSpaceInfo.createTime = vc.dateTimeFormat(new Date().getTime());
vc.toast("刷新成功");
} else {
vc.toast(_json.msg);
@ -40,7 +41,7 @@
);
},
_freshRemainingParkingSpace: function () {
vc.component._listRemainingParkingSpaceData();
$that._listRemainingParkingSpaceData();
}
}
})