mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化代码
This commit is contained in:
parent
b6aa206264
commit
51b481b72d
@ -24,7 +24,6 @@
|
||||
vc.component.refreshEditCommunityInfo();
|
||||
$('#editCommunityModel').modal('show');
|
||||
vc.copyObject(_params, vc.component.editCommunityInfo);
|
||||
|
||||
if (_params.hasOwnProperty('communityAttrDtos')) {
|
||||
let _attrDtos = _params.communityAttrDtos;
|
||||
_attrDtos.forEach(item => {
|
||||
@ -42,8 +41,7 @@
|
||||
editCommunityValidate: function() {
|
||||
return vc.validate.validate({
|
||||
editCommunityInfo: vc.component.editCommunityInfo
|
||||
},
|
||||
{
|
||||
}, {
|
||||
'editCommunityInfo.name': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
@ -81,20 +79,17 @@
|
||||
limit: "maxLength",
|
||||
param: "12",
|
||||
errInfo: "小区城市编码不能大于4个字符"
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
'editCommunityInfo.mapX': [{
|
||||
limit: "maxLength",
|
||||
param: "20",
|
||||
errInfo: "小区城市编码不能大于4个字符"
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
'editCommunityInfo.mapY': [{
|
||||
limit: "maxLength",
|
||||
param: "20",
|
||||
errInfo: "小区城市编码不能大于4个字符"
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
'editCommunityInfo.communityId': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
@ -108,9 +103,6 @@
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
vc.http.post('editCommunity', 'update', JSON.stringify(vc.component.editCommunityInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user