加入道闸管理控制台页面

This commit is contained in:
java110 2021-09-30 18:33:44 +08:00
parent 5021911079
commit a875e2e5dc
20 changed files with 2406 additions and 119 deletions

View File

@ -72,6 +72,7 @@
</div>
</body>
<script src="/vcCore/vc-zh.js"></script>
<script src="/js/jessibuca/renderer.js"></script>
<script src="/vcCore/vcFramework.js"></script>
<vc:create path="frame/commonBottom" location="body"></vc:create>

View File

@ -0,0 +1,10 @@
<div class="margin-top">
<div class="row">
<div class="col-md-6">
<img :src="parkingAreaControlCarInoutInfo.inImg" width="100%" height="350px" />
</div>
<div class="col-md-6">
<img :src="parkingAreaControlCarInoutInfo.outImg" width="100%" height="350px" />
</div>
</div>
</div>

View File

@ -0,0 +1,23 @@
/**
入驻小区
**/
(function (vc) {
vc.extends({
data: {
parkingAreaControlCarInoutInfo: {
inImg:'/img/carInout.jpg',
outImg:'/img/carInout.jpg'
}
},
_initMethod: function () {
},
_initEvent: function () {
},
methods: {
}
});
})(window.vc);

View File

@ -0,0 +1,39 @@
<div class="margin-top">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">进出场编号</th>
<th class="text-center">车辆状态</th>
<th class="text-center">车辆类型</th>
<th class="text-center">车牌号</th>
<th class="text-center">进场时间</th>
<th class="text-center">出场时间</th>
<th class="text-center">停车时间(小时)</th>
<th class="text-center">收费金额</th>
</tr>
</thead>
<tbody>
<tr v-for="carIn in parkingAreaControlCarInoutsInfo.carIns">
<td class="text-center">{{carIn.inoutId}}</td>
<td class="text-center">{{carIn.stateName}}</td>
<td class="text-center">{{carIn.carNum}}</td>
<td class="text-center">{{carIn.carNum}}</td>
<td class="text-center">{{carIn.inTime}}</td>
<td class="text-center">{{carIn.outTime}}</td>
<td class="text-center">{{carIn.inHours}}小时{{carIn.inMin}}分</td>
<td class="text-center">{{carIn.outTime}}</td>
<td class="text-center">{{carIn.amount}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/paginationPlus" namespace="parkingAreaControlInCar"></vc:create>
</div>

View File

@ -0,0 +1,22 @@
/**
入驻小区
**/
(function (vc) {
vc.extends({
data: {
parkingAreaControlCarInoutsInfo: {
carIns: []
}
},
_initMethod: function () {
},
_initEvent: function () {
},
methods: {
}
});
})(window.vc);

View File

@ -0,0 +1,40 @@
<div id="parkingAreaControlCustomCarInoutModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<h3 class="m-t-none m-b ">车辆{{parkingAreaControlCustomCarInoutInfo.type == '1101'?'进场':'出场'}}</h3>
<div class="ibox-content">
<div>
<div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">车牌号</label>
<div class="col-sm-10">
<input v-model="parkingAreaControlCustomCarInoutInfo.carNum" type="text"
placeholder="必填,请填写车牌号" class="form-control">
</div>
</div>
<div class="form-group row" v-if="parkingAreaControlCustomCarInoutInfo.type != '1101'">
<label class="col-sm-2 col-form-label">收费金额</label>
<div class="col-sm-10"><input v-model="parkingAreaControlCustomCarInoutInfo.amount"
type="number" placeholder="必填,请填写收费金额" class="form-control"></div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">备注</label>
<div class="col-sm-10"><textarea cols="5"
v-model="parkingAreaControlCustomCarInoutInfo.remark" type="text"
placeholder="请填写备注信息" class="form-control"></textarea></div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button"
v-on:click="parkingAreaControlCustomCarInout()">提交</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,77 @@
(function (vc, vm) {
vc.extends({
data: {
parkingAreaControlCustomCarInoutInfo: {
carNum: '',
amount: '',
remark: '',
type: '1101',
payCharge: ''
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('parkingAreaControlCustomCarInout', 'open', function (_params) {
vc.component.refreshParkingAreaControlCustomCarInoutInfo();
$('#parkingAreaControlCustomCarInoutModel').modal('show');
// = _params;
vc.copyObject(_params, vc.component.parkingAreaControlCustomCarInoutInfo);
vc.component.parkingAreaControlCustomCarInoutInfo.communityId = vc.getCurrentCommunity().communityId;
});
},
methods: {
parkingAreaControlCustomCarInoutValidate: function () {
return vc.validate.validate({
parkingAreaControlCustomCarInoutInfo: vc.component.parkingAreaControlCustomCarInoutInfo
}, {
'parkingAreaControlCustomCarInoutInfo.carNum': [
{
limit: "required",
param: "",
errInfo: "车牌号不能为空"
}
]
});
},
parkingAreaControlCustomCarInout: function () {
if (!vc.component.parkingAreaControlCustomCarInoutValidate()) {
vc.toast(vc.validate.errInfo);
return;
}
vc.http.apiPost(
'/machine.customCarInOutCmd',
JSON.stringify(vc.component.parkingAreaControlCustomCarInoutInfo),
{
emulateJSON: true
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
let _data = JSON.parse(json);
if (_data.code != 0) {
vc.toast(_data.msg);
} else {
vc.toast(_data.msg);
}
},
function (errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
});
},
refreshParkingAreaControlCustomCarInoutInfo: function () {
vc.component.parkingAreaControlCustomCarInoutInfo = {
carNum: '',
amount: '',
remark: '',
type: '1101',
payCharge: ''
}
}
}
});
})(window.vc, window.vc.component);

View File

@ -0,0 +1,59 @@
<div class="row">
<div class="col-md-1 ">
<div class="vc-line-y"></div>
</div>
<div class="col-md-11">
<div>
<h3>收费信息</h3>
</div>
<div class="form-group row margin-top">
<label class="col-sm-2 col-form-label">车辆</label>
<div class="col-sm-8">
<input v-model="parkingAreaControlFeeInfo.carNum" disabled="disabled" type="text" placeholder="车牌号"
class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">停车时间</label>
<div class="col-sm-8">
<input v-model="parkingAreaControlFeeInfo.time" disabled="disabled" type="text" placeholder="停车时间"
class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">开门</label>
<div class="col-sm-8">
<input v-model="parkingAreaControlFeeInfo.open" disabled="disabled" type="text" placeholder="开门状态"
class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">开门说明</label>
<div class="col-sm-8">
<textarea v-model="parkingAreaControlFeeInfo.openMsg" disabled="disabled" placeholder="开门说明"
class="form-control"></textarea>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">应收</label>
<div class="col-sm-8">
<input v-model="parkingAreaControlFeeInfo.payCharge" type="text" disabled="disabled" placeholder="应收" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">实收</label>
<div class="col-sm-8">
<input v-model="parkingAreaControlFeeInfo.pay" type="text" placeholder="实收" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">备注</label>
<div class="col-sm-8">
<textarea v-model="parkingAreaControlFeeInfo.remark" placeholder="备注" class="form-control"></textarea>
</div>
</div>
<div class="form-group text-center">
<button class="btn btn-primary" type="button" v-on:click="saveTempFeeInfo()">临时车收费</button>
</div>
</div>
</div>

View File

@ -0,0 +1,34 @@
/**
入驻小区
**/
(function (vc) {
vc.extends({
data: {
parkingAreaControlFeeInfo: {
carNum: "",
time: "",
payCharge: 0.0,
pay: 0.0,
remark: "",
open: "",
openMsg: "",
}
},
_initMethod: function () {
},
_initEvent: function () {
},
methods: {
saveTempFeeInfo: function () {
vc.emit('parkingAreaControlCustomCarInout', 'open', {
type: "1102", //1101 手动入场 1102 手动出场
carNum: $that.parkingAreaControlFeeInfo.carNum,
amount: $that.parkingAreaControlFeeInfo.pay,
payCharge: $that.parkingAreaControlFeeInfo.payCharge,
})
}
}
});
})(window.vc);

View File

@ -0,0 +1,32 @@
<div class="margin-top">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">进出场ID</th>
<th class="text-center">车辆状态</th>
<th class="text-center">车牌号</th>
<th class="text-center">进场时间</th>
<th class="text-center">在场时间(小时)</th>
</tr>
</thead>
<tbody>
<tr v-for="carIn in parkingAreaControlInCarInfo.carIns">
<td class="text-center">{{carIn.inoutId}}</td>
<td class="text-center">{{carIn.stateName}}</td>
<td class="text-center">{{carIn.carNum}}</td>
<td class="text-center">{{carIn.inTime}}</td>
<td class="text-center">{{carIn.inHours}}小时{{carIn.inMin}}分</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/paginationPlus" namespace="parkingAreaControlInCar"></vc:create>
</div>

View File

@ -0,0 +1,22 @@
/**
入驻小区
**/
(function (vc) {
vc.extends({
data: {
parkingAreaControlInCarInfo: {
carIns: []
}
},
_initMethod: function () {
},
_initEvent: function () {
},
methods: {
}
});
})(window.vc);

View File

@ -0,0 +1,80 @@
<div>
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-6">
<div class="form-group row">
<label class="col-sm-4 col-form-label text-right">入场视频</label>
<div class="col-sm-8 padding-0">
<select class="custom-select" v-model="parkingAreaControlVideoInfo.inMachineId"
@change="_swatchVedio()">
<option selected disabled value="">请选择入场摄像头</option>
<option :value="item.machineId"
v-for="(item,index) in parkingAreaControlVideoInfo.inMachines">{{item.machineName}}
</option>
</select>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group row">
<div class="col-sm-12 text-right">
<button type="button" class="btn btn-white btn-sm" v-on:click="customCarIn('1101')">
手动进场
</button>
<button type="button" class="btn btn-primary btn-sm margin-left"
v-on:click="_openDoor('in')">
开闸
</button>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-6">
<div class="form-group row">
<label class="col-sm-4 col-form-label text-right">出场视频</label>
<div class="col-sm-8 padding-0">
<select class="custom-select" v-model="parkingAreaControlVideoInfo.outMachineId" @change="_swatchOutVedio()">
<option selected disabled value="">请选择出场摄像头</option>
<option :value="item.machineId"
v-for="(item,index) in parkingAreaControlVideoInfo.outMachines">{{item.machineName}}
</option>
</select>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group row">
<div class="col-sm-12 text-right">
<button type="button" class="btn btn-white btn-sm" v-on:click="customCarIn('1102')">
手动出场
</button>
<button type="button" class="btn btn-primary btn-sm margin-left"
v-on:click="_openDoor('out')">
开闸
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div id="receiver1Div">
<img width="100%" height="350px" id="receiver1"/>
</div>
</div>
<div class="col-md-6">
<div id="receiver2Div">
<img width="100%" height="350px" id="receiver2"/>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,216 @@
/**
入驻小区
**/
(function (vc) {
vc.extends({
data: {
parkingAreaControlVideoInfo: {
paId: '',
inMachineId: '',
outMachineId: '',
inMachines: [],
outMachines: []
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('parkingAreaControlVideo', 'notify', function (param) {
if (param.hasOwnProperty('paId')) {
$that.parkingAreaControlVideoInfo.paId = param.paId;
$that._listMachines();
}
})
},
methods: {
_listMachines: function () {
let param = {
params: {
locationObjId: $that.parkingAreaControlVideoInfo.paId,
page: 1,
row: 100,
machineTypeCd: '9996',
communityId: vc.getCurrentCommunity().communityId
}
}
//发送get请求
vc.http.get('machineManage',
'list',
param,
function (json, res) {
let _machineManageInfo = JSON.parse(json);
let _machines = _machineManageInfo.machines;
_machines.forEach(item => {
if (item.direction == '3306') {
$that.parkingAreaControlVideoInfo.inMachines.push(item);
} else {
$that.parkingAreaControlVideoInfo.outMachines.push(item);
}
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_swatchVedio: function () {
//创建一个socket实例
let wsUrl = "";
let _enterMachineId = $that.parkingAreaControlVideoInfo.inMachineId;
$that.parkingAreaControlVideoInfo.inMachines.forEach((item) => {
if (item.machineId == _enterMachineId) {
wsUrl = item.machineIp;
if (item.machineVersion.indexOf('300') > -1) {
wsUrl += "/ws.flv"
} else {
wsUrl += "/ws"
}
}
});
wsUrl = wsUrl.replace(':8131', ':9080');
let _protocol = window.location.protocol;
if (_protocol.startsWith('https')) {
wsUrl =
"wss://" + wsUrl;
} else {
wsUrl =
"ws://" + wsUrl;
}
let image = document.getElementById("receiver1");
if (wsUrl.endsWith(".flv")) {
image = document.getElementById("receiver1Div");
let jessibuca = new Jessibuca({
container: image,
videoBuffer: 0.2,
isResize: false,
});
jessibuca.onLoad = function () {
this.play(wsUrl);
};
return;
}
let receiver_socket = new WebSocket(wsUrl);
// 监听消息
receiver_socket.onmessage = function (data) {
let reader = new FileReader();
reader.onload = function (evt) {
if (evt.target.readyState == FileReader.DONE) {
let url = evt.target.result;
image.src = "data:image/png;" + url;
}
};
reader.readAsDataURL(data.data);
};
},
_swatchOutVedio: function () {
//创建一个socket实例
let wsUrl = "";
let _outMachineId = $that.parkingAreaControlVideoInfo.outMachineId;
let paId = "";
$that.parkingAreaControlVideoInfo.outMachines.forEach((item) => {
if (item.machineId == _outMachineId) {
wsUrl = item.machineIp;
paId = item.locationObjId;
if (item.machineVersion.indexOf('300') > -1) {
wsUrl += "/ws.flv"
} else {
wsUrl += "/ws"
}
}
});
wsUrl = wsUrl.replace(':8131', ':9080')
let _protocol = window.location.protocol;
if (_protocol.startsWith('https')) {
wsUrl =
"wss://" + wsUrl;
} else {
wsUrl =
"ws://" + wsUrl;
}
let image = document.getElementById("receiver2");
if (wsUrl.endsWith(".flv")) {
image = document.getElementById("receiver2Div");
let jessibuca = new Jessibuca({
container: image,
videoBuffer: 0.2,
isResize: false,
});
jessibuca.onLoad = function () {
this.play(wsUrl);
};
return;
}
let receiver_socket = new WebSocket(wsUrl);
// 监听消息
receiver_socket.onmessage = function (data) {
//image.src = 'data:image/png;' + data.data;
let reader = new FileReader();
reader.onload = function (evt) {
if (evt.target.readyState == FileReader.DONE) {
let url = evt.target.result;
image.src = "data:image/png;" + url;
}
};
reader.readAsDataURL(data.data);
};
},
_openDoor: function (_inOut) {
let _machines = [];
let _machineId = "";
if (_inOut == 'in') {
_machines = $that.parkingAreaControlVideoInfo.inMachines;
_machineId = $that.parkingAreaControlVideoInfo.inMachineId;
} else {
_machines = $that.parkingAreaControlVideoInfo.outMachines;
_machineId = $that.parkingAreaControlVideoInfo.outMachineId;
}
if (_machines.length == 0) {
vc.toast('请先选择设备');
return;
}
let _machineCode = '';
_machines.forEach(item => {
if (item.machineId == _machineId) {
_machineCode = item.machineCode;
}
})
let _data = {
"machineCode": _machineCode,
"stateName": "开门",
"state": "1500",
"url": "/machine/openDoor",
"userRole": "staff",
"communityId": vc.getCurrentCommunity().communityId
};
vc.http.apiPost('/machine/openDoor',
JSON.stringify(_data),
{
emulateJSON: true
},
function (json, res) {
let _data = JSON.parse(json);
if (_data.code != 0) {
vc.toast(_data.msg);
} else {
vc.toast('已请求设备');
}
},
function (errInfo, error) {
console.log('请求失败处理');
vc.toast(json);
});
},
customCarIn: function (_type) {
vc.emit('parkingAreaControlCustomCarInout', 'open', {
type: _type
})
}
}
});
})(window.vc);

View File

@ -2025,6 +2025,13 @@ a:hover {
height:2px;
background: -webkit-linear-gradient(left, #fff -4%,#1ab394 50%,#fff 100%);
}
.vc-line-y{
width:2px;
height:100%;
background: -webkit-linear-gradient(top, #fff -4%,#1ab394 50%,#fff 100%);
}
.vc-table-border{
border: 1px solid #000000;
}

1
public/ff.js Normal file

File diff suppressed because one or more lines are too long

BIN
public/ff.wasm Normal file

Binary file not shown.

BIN
public/img/carInout.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,70 @@
<div>
<div class="white-bg padding" style="margin-top:-20px">
<div class="row">
<div class="col-md-9"></div>
<div class="col-md-3"></div>
</div>
<div class="col-md-9">
<vc:create path="property/parkingAreaControlVideo"></vc:create>
<div class="margin-top">
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link"
v-bind:class="{active:parkingAreaControlInfo._currentTab == 'parkingAreaControlCarInout'}"
v-on:click="changeTab('parkingAreaControlCarInout')">出入场信息</a>
</li>
<li class="nav-item">
<a class="nav-link"
v-bind:class="{active:parkingAreaControlInfo._currentTab == 'parkingAreaControlInCar'}"
v-on:click="changeTab('parkingAreaControlInCar')">在场车辆</a>
</li>
<li class="nav-item">
<a class="nav-link"
v-bind:class="{active:parkingAreaControlInfo._currentTab == 'parkingAreaControlCarInouts'}"
v-on:click="changeTab('parkingAreaControlCarInouts')">出入场明细</a>
</li>
<li class="nav-item">
<a class="nav-link"
v-bind:class="{active:parkingAreaControlInfo._currentTab == 'simplifyCarFee'}"
v-on:click="changeTab('simplifyCarFee')">收费明细</a>
</li>
<li class="nav-item">
<a class="nav-link"
v-bind:class="{active:parkingAreaControlInfo._currentTab == 'simplifyCarFee'}"
v-on:click="changeTab('simplifyCarFee')">月租车</a>
</li>
<li class="nav-item">
<a class="nav-link"
v-bind:class="{active:parkingAreaControlInfo._currentTab == 'simplifyCarFee'}"
v-on:click="changeTab('simplifyCarFee')">临时车</a>
</li>
<li class="nav-item">
<a class="nav-link"
v-bind:class="{active:parkingAreaControlInfo._currentTab == 'simplifyCarFee'}"
v-on:click="changeTab('simplifyCarFee')">白名单</a>
</li>
<li class="nav-item">
<a class="nav-link"
v-bind:class="{active:parkingAreaControlInfo._currentTab == 'simplifyCarFee'}"
v-on:click="changeTab('simplifyCarFee')">黑名单</a>
</li>
<li class="nav-item">
<a class="nav-link"
v-bind:class="{active:parkingAreaControlInfo._currentTab == 'simplifyCarFee'}"
v-on:click="changeTab('simplifyCarFee')">剩余车位</a>
</li>
</ul>
</div>
<div v-if="parkingAreaControlInfo._currentTab == 'parkingAreaControlCarInout'">
<vc:create path="property/parkingAreaControlCarInout"></vc:create>
</div>
<div v-if="parkingAreaControlInfo._currentTab == 'parkingAreaControlInCar'">
<vc:create path="property/parkingAreaControlInCar"></vc:create>
</div>
<div v-if="parkingAreaControlInfo._currentTab == 'parkingAreaControlCarInouts'">
<vc:create path="property/parkingAreaControlCarInouts"></vc:create>
</div>
</div>
</div>
<div class="col-md-3">
<vc:create path="property/parkingAreaControlFee"></vc:create>
</div>
<vc:create path="property/parkingAreaControlCustomCarInout"></vc:create>
</div>

View File

@ -2,132 +2,30 @@
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
parkingAreaManageInfo: {
parkingAreas: [],
total: 0,
records: 1,
moreCondition: false,
num: '',
listColumns: [],
conditions: {
num: '',
typeCd: '',
paId: ''
}
parkingAreaControlInfo: {
_currentTab: 'parkingAreaControlCarInout',
paId: ''
}
},
_initMethod: function () {
$that._getColumns(function () {
vc.component._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS);
$that.parkingAreaControlInfo.paId = vc.getParam('paId');
vc.emit('parkingAreaControlVideo', 'notify', {
paId: $that.parkingAreaControlInfo.paId
});
},
_initEvent: function () {
vc.on('parkingAreaManage', 'listParkingArea',
function (_param) {
vc.component._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event',
function (_currentPage) {
vc.component._listParkingAreas(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listParkingAreas: function (_page, _rows) {
vc.component.parkingAreaManageInfo.conditions.page = _page;
vc.component.parkingAreaManageInfo.conditions.row = _rows;
vc.component.parkingAreaManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
var param = {
params: vc.component.parkingAreaManageInfo.conditions
};
//发送get请求
vc.http.get('parkingAreaManage', 'list', param,
function (json, res) {
var _parkingAreaManageInfo = JSON.parse(json);
vc.component.parkingAreaManageInfo.total = _parkingAreaManageInfo.total;
vc.component.parkingAreaManageInfo.records = _parkingAreaManageInfo.records;
vc.component.parkingAreaManageInfo.parkingAreas = _parkingAreaManageInfo.parkingAreas;
$that.dealParkingAreaAttr(_parkingAreaManageInfo.parkingAreas);
vc.emit('pagination', 'init', {
total: vc.component.parkingAreaManageInfo.records,
dataCount: vc.component.parkingAreaManageInfo.total,
currentPage: _page
});
},
function (errInfo, error) {
console.log('请求失败处理');
});
},
_openAddParkingAreaModal: function () {
vc.emit('addParkingArea', 'openAddParkingAreaModal', {});
},
_openEditParkingAreaModel: function (_parkingArea) {
vc.emit('editParkingArea', 'openEditParkingAreaModal', _parkingArea);
},
_openDeleteParkingAreaModel: function (_parkingArea) {
vc.emit('deleteParkingArea', 'openDeleteParkingAreaModal', _parkingArea);
},
_queryParkingAreaMethod: function () {
vc.component._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if (vc.component.parkingAreaManageInfo.moreCondition) {
vc.component.parkingAreaManageInfo.moreCondition = false;
} else {
vc.component.parkingAreaManageInfo.moreCondition = true;
}
},
dealParkingAreaAttr: function (parkingAreas) {
parkingAreas.forEach(item => {
$that._getColumnsValue(item);
});
},
_getColumnsValue: function (_parkingArea) {
_parkingArea.listValues = [];
console.log('attr',_parkingArea)
if (!_parkingArea.hasOwnProperty('attrs') || _parkingArea.attrs.length < 1) {
$that.parkingAreaManageInfo.listColumns.forEach(_value => {
_parkingArea.listValues.push('');
})
return;
}
let _parkingAreaAttrDtos = _parkingArea.attrs;
$that.parkingAreaManageInfo.listColumns.forEach(_value => {
let _tmpValue = '';
_parkingAreaAttrDtos.forEach(_attrItem => {
if (_value.specCd == _attrItem.specCd) {
_tmpValue = _attrItem.value;
}
})
_parkingArea.listValues.push(_tmpValue);
changeTab: function (_tab) {
$that.parkingAreaControlInfo._currentTab = _tab;
vc.emit(_tab, 'switch', {
paId: $that.parkingAreaControlInfo.paId
})
},
_getColumns: function (_call) {
console.log('_getColumns');
$that.parkingAreaManageInfo.listColumns = [];
vc.getAttrSpec('parking_area_attr', function (data) {
$that.parkingAreaManageInfo.listColumns = [];
data.forEach(item => {
if (item.listShow == 'Y') {
$that.parkingAreaManageInfo.listColumns.push({
specCd: item.specCd,
specName: item.specName
});
}
});
_call();
});
},
_openParkingAreaText:function(_parkingArea){
vc.jumpToPage('/admin.html#/pages/property/parkingAreaText?paId='+_parkingArea.paId)
},
_openParkingAreaControl:function(_parkingArea){
}
}
});
})(window.vc);