From 728c34247e1abcd150e2db83a537d15988d8d6b7 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Mon, 23 Nov 2020 23:56:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9D=A2=E7=A7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 10 +- .../common/editCommunity/editCommunity.html | 48 ++++++---- .../common/editCommunity/editCommunity.js | 2 + .../editCommunityArea/editCommunityArea.html | 31 ++++++ .../editCommunityArea/editCommunityArea.js | 96 +++++++++++++++++++ .../property/addFeeFormula/addFeeFormula.html | 1 + .../editFeeFormula/editFeeFormula.html | 1 + .../common/enterCommunity/enterCommunity.html | 14 ++- .../common/enterCommunity/enterCommunity.js | 3 + .../feeFormulaManage/feeFormulaManage.js | 2 +- 10 files changed, 179 insertions(+), 29 deletions(-) create mode 100644 public/components/common/editCommunityArea/editCommunityArea.html create mode 100644 public/components/common/editCommunityArea/editCommunityArea.js diff --git a/app.js b/app.js index e192f9858..11d945a37 100644 --- a/app.js +++ b/app.js @@ -32,15 +32,15 @@ let opts = { //app.use('/callComponent',proxy('https://app.demo.winqi.cn/',opts)); -//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012/',opts)); +//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); //app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); -// app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); -// app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts)); + app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); + app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts)); -app.use('/callComponent',proxy('http://127.0.0.1:8012',opts)); -app.use('/app',proxy('http://127.0.0.1:8012',opts)); +//app.use('/callComponent',proxy('http://127.0.0.1:8012',opts)); +//app.use('/app',proxy('http://127.0.0.1:8012',opts)); //app.use('/callComponent',proxy('http://192.168.1.16:8012',opts)); //app.use('/app',proxy('http://192.168.1.16:8012',opts)); diff --git a/public/components/common/editCommunity/editCommunity.html b/public/components/common/editCommunity/editCommunity.html index 31613969b..be9e4e85e 100644 --- a/public/components/common/editCommunity/editCommunity.html +++ b/public/components/common/editCommunity/editCommunity.html @@ -1,4 +1,5 @@ -
+ \ No newline at end of file diff --git a/public/components/common/editCommunity/editCommunity.js b/public/components/common/editCommunity/editCommunity.js index 76587ab4f..3c81fd190 100644 --- a/public/components/common/editCommunity/editCommunity.js +++ b/public/components/common/editCommunity/editCommunity.js @@ -10,6 +10,7 @@ cityCode: '', mapX: '101.33', mapY: '101.33', + communityArea:'' } }, @@ -124,6 +125,7 @@ cityCode: '', mapX: '101.33', mapY: '101.33', + communityArea:'' } } diff --git a/public/components/common/editCommunityArea/editCommunityArea.html b/public/components/common/editCommunityArea/editCommunityArea.html new file mode 100644 index 000000000..4303e4aa0 --- /dev/null +++ b/public/components/common/editCommunityArea/editCommunityArea.html @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/public/components/common/editCommunityArea/editCommunityArea.js b/public/components/common/editCommunityArea/editCommunityArea.js new file mode 100644 index 000000000..690fa4bf1 --- /dev/null +++ b/public/components/common/editCommunityArea/editCommunityArea.js @@ -0,0 +1,96 @@ +(function (vc, vm) { + + vc.extends({ + data: { + editCommunityAreaInfo: { + communityId: '', + name: '', + address: '', + nearbyLandmarks: '', + cityCode: '', + mapX: '101.33', + mapY: '101.33', + communityArea: '' + + } + }, + _initMethod: function () { + + }, + _initEvent: function () { + vc.on('editCommunityArea', 'openEditCommunityModal', + function (_params) { + vc.component.refreshEditCommunityInfo(); + $('#editCommunityAreaModel').modal('show'); + vc.copyObject(_params, vc.component.editCommunityAreaInfo); + //vc.component.editCommunityAreaInfo.communityId = vc.getCurrentCommunity().communityId; + }); + }, + methods: { + editCommunityAreaValidate: function () { + return vc.validate.validate({ + editCommunityAreaInfo: vc.component.editCommunityAreaInfo + }, + { + + 'editCommunityAreaInfo.communityArea': [{ + limit: "required", + param: "", + errInfo: "小区面积不能为空" + }, + { + limit: "money", + param: "", + errInfo: "小区面积必须是3.00 格式" + }, + ], + 'editCommunityAreaInfo.communityId': [{ + limit: "required", + param: "", + errInfo: "小区ID不能为空" + }] + + }); + }, + editCommunityArea: function () { + if (!vc.component.editCommunityAreaValidate()) { + vc.toast(vc.validate.errInfo); + return; + } + + vc.http.post('editCommunity', 'update', JSON.stringify(vc.component.editCommunityAreaInfo), { + emulateJSON: true + }, + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + if (res.status == 200) { + //关闭model + $('#editCommunityAreaModel').modal('hide'); + vc.emit('enterCommunity','listMyCommunity', {}); + return; + } + vc.toast(json); + }, + function (errInfo, error) { + console.log('请求失败处理'); + + vc.toast(errInfo); + }); + }, + refreshEditCommunityInfo: function () { + vc.component.editCommunityAreaInfo = { + communityId: '', + name: '', + address: '', + nearbyLandmarks: '', + cityCode: '', + mapX: '101.33', + mapY: '101.33', + communityArea: '' + + } + } + } + }); + +})(window.vc, window.vc.component); \ No newline at end of file diff --git a/public/components/property/addFeeFormula/addFeeFormula.html b/public/components/property/addFeeFormula/addFeeFormula.html index 4e21f8115..4950a8f13 100644 --- a/public/components/property/addFeeFormula/addFeeFormula.html +++ b/public/components/property/addFeeFormula/addFeeFormula.html @@ -32,6 +32,7 @@