From 796c930558ee25b165a494783afaf5ab147803e3 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期三, 19 二月 2020 17:48:40 +0800
Subject: [PATCH] 优化撤回小区审核功能
---
WebService/src/main/resources/components/communityPackage/edit-community/editCommunity.js | 215 +++++++++++++++++++++++++----------------------------
1 files changed, 103 insertions(+), 112 deletions(-)
diff --git a/WebService/src/main/resources/components/communityPackage/edit-community/editCommunity.js b/WebService/src/main/resources/components/communityPackage/edit-community/editCommunity.js
index 32c581b..9de2652 100644
--- a/WebService/src/main/resources/components/communityPackage/edit-community/editCommunity.js
+++ b/WebService/src/main/resources/components/communityPackage/edit-community/editCommunity.js
@@ -1,142 +1,133 @@
-(function(vc,vm){
+(function(vc, vm) {
vc.extends({
- data:{
- editCommunityInfo:{
- communityId:'',
-name:'',
-address:'',
-nearbyLandmarks:'',
-cityCode:'0971',
-mapX:'101.33',
-mapY:'101.33',
+ data: {
+ editCommunityInfo: {
+ communityId: '',
+ name: '',
+ address: '',
+ nearbyLandmarks: '',
+ cityCode: '',
+ mapX: '101.33',
+ mapY: '101.33',
}
},
- _initMethod:function(){
+ _initMethod: function() {
- },
- _initEvent:function(){
- vc.on('editCommunity','openEditCommunityModal',function(_params){
+},
+ _initEvent: function() {
+ vc.on('editCommunity', 'openEditCommunityModal',
+ function(_params) {
vc.component.refreshEditCommunityInfo();
$('#editCommunityModel').modal('show');
vc.component.editCommunityInfo = _params;
//vc.component.editCommunityInfo.communityId = vc.getCurrentCommunity().communityId;
});
},
- methods:{
- editCommunityValidate:function(){
- return vc.validate.validate({
- editCommunityInfo:vc.component.editCommunityInfo
- },{
- 'editCommunityInfo.name':[
-{
- limit:"required",
- param:"",
- errInfo:"灏忓尯鍚嶇О涓嶈兘涓虹┖"
- },
- {
- limit:"maxin",
- param:"4,20",
- errInfo:"灏忓尯鍚嶇О蹇呴』鍦�4鑷�20瀛楃涔嬮棿"
- },
+ methods: {
+ editCommunityValidate: function() {
+ return vc.validate.validate({
+ editCommunityInfo: vc.component.editCommunityInfo
+ },
+ {
+ 'editCommunityInfo.name': [{
+ limit: "required",
+ param: "",
+ errInfo: "灏忓尯鍚嶇О涓嶈兘涓虹┖"
+ },
+ {
+ limit: "maxin",
+ param: "4,20",
+ errInfo: "灏忓尯鍚嶇О蹇呴』鍦�4鑷�20瀛楃涔嬮棿"
+ },
],
-'editCommunityInfo.address':[
-{
- limit:"required",
- param:"",
- errInfo:"灏忓尯鍦板潃涓嶈兘涓虹┖"
- },
- {
- limit:"maxLength",
- param:"200",
- errInfo:"灏忓尯鍦板潃涓嶈兘澶т簬200涓瓧绗�"
- },
+ 'editCommunityInfo.address': [{
+ limit: "required",
+ param: "",
+ errInfo: "灏忓尯鍦板潃涓嶈兘涓虹┖"
+ },
+ {
+ limit: "maxLength",
+ param: "200",
+ errInfo: "灏忓尯鍦板潃涓嶈兘澶т簬200涓瓧绗�"
+ },
],
-'editCommunityInfo.nearbyLandmarks':[
-{
- limit:"required",
- param:"",
- errInfo:"闄勮繎鍦版爣涓嶈兘涓虹┖"
- },
- {
- limit:"maxLength",
- param:"50",
- errInfo:"灏忓尯闄勮繎鍦版爣涓嶈兘澶т簬50涓瓧绗�"
- },
+ 'editCommunityInfo.nearbyLandmarks': [{
+ limit: "required",
+ param: "",
+ errInfo: "闄勮繎鍦版爣涓嶈兘涓虹┖"
+ },
+ {
+ limit: "maxLength",
+ param: "50",
+ errInfo: "灏忓尯闄勮繎鍦版爣涓嶈兘澶т簬50涓瓧绗�"
+ },
],
-'editCommunityInfo.cityCode':[
- {
- limit:"maxLength",
- param:"12",
- errInfo:"灏忓尯鍩庡競缂栫爜涓嶈兘澶т簬4涓瓧绗�"
- },
+ 'editCommunityInfo.cityCode': [{
+ limit: "maxLength",
+ param: "12",
+ errInfo: "灏忓尯鍩庡競缂栫爜涓嶈兘澶т簬4涓瓧绗�"
+ },
],
-'editCommunityInfo.mapX':[
- {
- limit:"maxLength",
- param:"20",
- errInfo:"灏忓尯鍩庡競缂栫爜涓嶈兘澶т簬4涓瓧绗�"
- },
+ 'editCommunityInfo.mapX': [{
+ limit: "maxLength",
+ param: "20",
+ errInfo: "灏忓尯鍩庡競缂栫爜涓嶈兘澶т簬4涓瓧绗�"
+ },
],
-'editCommunityInfo.mapY':[
- {
- limit:"maxLength",
- param:"20",
- errInfo:"灏忓尯鍩庡競缂栫爜涓嶈兘澶т簬4涓瓧绗�"
- },
+ 'editCommunityInfo.mapY': [{
+ limit: "maxLength",
+ param: "20",
+ errInfo: "灏忓尯鍩庡競缂栫爜涓嶈兘澶т簬4涓瓧绗�"
+ },
],
-'editCommunityInfo.communityId':[
-{
- limit:"required",
- param:"",
- errInfo:"灏忓尯ID涓嶈兘涓虹┖"
- }]
+ 'editCommunityInfo.communityId': [{
+ limit: "required",
+ param: "",
+ errInfo: "灏忓尯ID涓嶈兘涓虹┖"
+ }]
- });
- },
- editCommunity:function(){
- if(!vc.component.editCommunityValidate()){
+ });
+ },
+ editCommunity: function() {
+ if (!vc.component.editCommunityValidate()) {
vc.toast(vc.validate.errInfo);
- return ;
+ return;
}
- vc.http.post(
- 'editCommunity',
- 'update',
- JSON.stringify(vc.component.editCommunityInfo),
- {
- emulateJSON:true
- },
- function(json,res){
- //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
- if(res.status == 200){
- //鍏抽棴model
- $('#editCommunityModel').modal('hide');
- vc.emit('communityManage','listCommunity',{});
- return ;
- }
- vc.message(json);
- },
- function(errInfo,error){
- console.log('璇锋眰澶辫触澶勭悊');
+ vc.http.post('editCommunity', 'update', JSON.stringify(vc.component.editCommunityInfo), {
+ emulateJSON: true
+ },
+ function(json, res) {
+ //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
+ if (res.status == 200) {
+ //鍏抽棴model
+ $('#editCommunityModel').modal('hide');
+ vc.emit('communityManage', 'listCommunity', {});
+ return;
+ }
+ vc.message(json);
+ },
+ function(errInfo, error) {
+ console.log('璇锋眰澶辫触澶勭悊');
- vc.message(errInfo);
- });
+ vc.message(errInfo);
+ });
},
- refreshEditCommunityInfo:function(){
- vc.component.editCommunityInfo= {
- communityId:'',
-name:'',
-address:'',
-nearbyLandmarks:'',
-cityCode:'0971',
-mapX:'101.33',
-mapY:'101.33',
+ refreshEditCommunityInfo: function() {
+ vc.component.editCommunityInfo = {
+ communityId: '',
+ name: '',
+ address: '',
+ nearbyLandmarks: '',
+ cityCode: '',
+ mapX: '101.33',
+ mapY: '101.33',
}
}
}
});
-})(window.vc,window.vc.component);
+})(window.vc, window.vc.component);
\ No newline at end of file
--
Gitblit v1.8.0