From 822afc9a730df6449cf39dd4d148c2fea74b05a8 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Fri, 9 Sep 2022 17:56:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deleteParkingBox/deleteParkingBox.js | 24 ++-- .../property/editParkingBox/editParkingBox.js | 89 ++++++------ .../parkingBoxManage/parkingBoxManage.html | 127 +++++++++--------- 3 files changed, 111 insertions(+), 129 deletions(-) diff --git a/public/components/property/deleteParkingBox/deleteParkingBox.js b/public/components/property/deleteParkingBox/deleteParkingBox.js index 46929df39..da06d1784 100644 --- a/public/components/property/deleteParkingBox/deleteParkingBox.js +++ b/public/components/property/deleteParkingBox/deleteParkingBox.js @@ -1,26 +1,24 @@ -(function (vc, vm) { +(function(vc, vm) { vc.extends({ data: { deleteParkingBoxInfo: {} }, - _initMethod: function () { - }, - _initEvent: function () { - vc.on('deleteParkingBox', 'openDeleteParkingBoxModal', function (_params) { + _initMethod: function() {}, + _initEvent: function() { + vc.on('deleteParkingBox', 'openDeleteParkingBoxModal', function(_params) { vc.component.deleteParkingBoxInfo = _params; $('#deleteParkingBoxModel').modal('show'); }); }, methods: { - deleteParkingBox: function () { + deleteParkingBox: function() { vc.component.deleteParkingBoxInfo.communityId = vc.getCurrentCommunity().communityId; vc.http.apiPost( - 'parkingBox.deleteParkingBox', - JSON.stringify(vc.component.deleteParkingBoxInfo), - { + '/parkingBox.deleteParkingBox', + JSON.stringify(vc.component.deleteParkingBoxInfo), { emulateJSON: true }, - function (json, res) { + function(json, res) { //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); let _json = JSON.parse(json); if (_json.code == 0) { @@ -33,14 +31,14 @@ vc.toast(_json.msg); } }, - function (errInfo, error) { + function(errInfo, error) { console.log('请求失败处理'); vc.message(json); }); }, - closeDeleteParkingBoxModel: function () { + closeDeleteParkingBoxModel: function() { $('#deleteParkingBoxModel').modal('hide'); } } }); -})(window.vc, window.vc.component); +})(window.vc, window.vc.component); \ No newline at end of file diff --git a/public/components/property/editParkingBox/editParkingBox.js b/public/components/property/editParkingBox/editParkingBox.js index 6ba2ffc40..f2cb1d9a2 100644 --- a/public/components/property/editParkingBox/editParkingBox.js +++ b/public/components/property/editParkingBox/editParkingBox.js @@ -1,4 +1,4 @@ -(function (vc, vm) { +(function(vc, vm) { vc.extends({ data: { editParkingBoxInfo: { @@ -13,11 +13,11 @@ parkingAreas: [] } }, - _initMethod: function () { + _initMethod: function() { $that._loadEditParkingBoxs(); }, - _initEvent: function () { - vc.on('editParkingBox', 'openEditParkingBoxModal', function (_params) { + _initEvent: function() { + vc.on('editParkingBox', 'openEditParkingBoxModal', function(_params) { vc.component.refreshEditParkingBoxInfo(); $('#editParkingBoxModel').modal('show'); vc.copyObject(_params, vc.component.editParkingBoxInfo); @@ -25,12 +25,11 @@ }); }, methods: { - editParkingBoxValidate: function () { + editParkingBoxValidate: function() { return vc.validate.validate({ editParkingBoxInfo: vc.component.editParkingBoxInfo }, { - 'editParkingBoxInfo.boxName': [ - { + 'editParkingBoxInfo.boxName': [{ limit: "required", param: "", errInfo: "岗亭名称不能为空" @@ -41,54 +40,44 @@ errInfo: "岗亭名称不能超过64" } ], - 'editParkingBoxInfo.paId': [ - { - limit: "required", - param: "", - errInfo: "停车场不能为空" - } - ], - 'editParkingBoxInfo.tempCarIn': [ - { - limit: "required", - param: "", - errInfo: "临时车是否进场不能为空" - } - ], - 'editParkingBoxInfo.fee': [ - { - limit: "required", - param: "", - errInfo: "是否收费不能为空" - } - ], - 'editParkingBoxInfo.blueCarIn': [ - { - limit: "required", - param: "", - errInfo: "蓝牌车进场不能为空" - } - ], - 'editParkingBoxInfo.yelowCarIn': [ - { - limit: "required", - param: "", - errInfo: "黄牌车进场不能为空" - } - ] + 'editParkingBoxInfo.paId': [{ + limit: "required", + param: "", + errInfo: "停车场不能为空" + }], + 'editParkingBoxInfo.tempCarIn': [{ + limit: "required", + param: "", + errInfo: "临时车是否进场不能为空" + }], + 'editParkingBoxInfo.fee': [{ + limit: "required", + param: "", + errInfo: "是否收费不能为空" + }], + 'editParkingBoxInfo.blueCarIn': [{ + limit: "required", + param: "", + errInfo: "蓝牌车进场不能为空" + }], + 'editParkingBoxInfo.yelowCarIn': [{ + limit: "required", + param: "", + errInfo: "黄牌车进场不能为空" + }] }); }, - editParkingBox: function () { + editParkingBox: function() { if (!vc.component.editParkingBoxValidate()) { vc.toast(vc.validate.errInfo); return; } vc.http.apiPost( - 'parkingBox.updateParkingBox', + '/parkingBox.updateParkingBox', JSON.stringify(vc.component.editParkingBoxInfo), { emulateJSON: true }, - function (json, res) { + function(json, res) { //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); let _json = JSON.parse(json); if (_json.code == 0) { @@ -101,12 +90,12 @@ vc.toast(_json.msg); } }, - function (errInfo, error) { + function(errInfo, error) { console.log('请求失败处理'); vc.message(errInfo); }); }, - _loadEditParkingBoxs: function () { + _loadEditParkingBoxs: function() { let param = { params: { page: 1, @@ -116,15 +105,15 @@ }; //发送get请求 vc.http.apiGet('/parkingArea.listParkingAreas', param, - function (json, res) { + function(json, res) { let _parkingAreaManageInfo = JSON.parse(json); $that.editParkingBoxInfo.parkingAreas = _parkingAreaManageInfo.parkingAreas; }, - function (errInfo, error) { + function(errInfo, error) { console.log('请求失败处理'); }); }, - refreshEditParkingBoxInfo: function () { + refreshEditParkingBoxInfo: function() { let _parkingAreas = $that.editParkingBoxInfo.parkingAreas; vc.component.editParkingBoxInfo = { boxId: '', diff --git a/public/pages/property/parkingBoxManage/parkingBoxManage.html b/public/pages/property/parkingBoxManage/parkingBoxManage.html index 6378a12d5..7cdbfab12 100644 --- a/public/pages/property/parkingBoxManage/parkingBoxManage.html +++ b/public/pages/property/parkingBoxManage/parkingBoxManage.html @@ -12,14 +12,12 @@
|
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
|---|---|---|---|---|---|---|---|---|
|
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
| {{parkingBox.boxId}} | -{{parkingBox.boxName}} | -{{parkingBox.paNum}} | -{{parkingBox.tempCarIn== 'Y'?'是':'否'}} | -{{parkingBox.fee == 'Y'?'是':'否'}} | -{{parkingBox.blueCarIn== 'Y'?'是':'否'}} | -{{parkingBox.yelowCarIn== 'Y'?'是':'否'}} | -{{parkingBox.remark}} | -
-
-
+ |
+
|
- |
- ||||||||
|
+ |
+ ||||||||