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();
|
vc.component.refreshEditCommunityInfo();
|
||||||
$('#editCommunityModel').modal('show');
|
$('#editCommunityModel').modal('show');
|
||||||
vc.copyObject(_params, vc.component.editCommunityInfo);
|
vc.copyObject(_params, vc.component.editCommunityInfo);
|
||||||
|
|
||||||
if (_params.hasOwnProperty('communityAttrDtos')) {
|
if (_params.hasOwnProperty('communityAttrDtos')) {
|
||||||
let _attrDtos = _params.communityAttrDtos;
|
let _attrDtos = _params.communityAttrDtos;
|
||||||
_attrDtos.forEach(item => {
|
_attrDtos.forEach(item => {
|
||||||
@ -42,8 +41,7 @@
|
|||||||
editCommunityValidate: function() {
|
editCommunityValidate: function() {
|
||||||
return vc.validate.validate({
|
return vc.validate.validate({
|
||||||
editCommunityInfo: vc.component.editCommunityInfo
|
editCommunityInfo: vc.component.editCommunityInfo
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
'editCommunityInfo.name': [{
|
'editCommunityInfo.name': [{
|
||||||
limit: "required",
|
limit: "required",
|
||||||
param: "",
|
param: "",
|
||||||
@ -81,20 +79,17 @@
|
|||||||
limit: "maxLength",
|
limit: "maxLength",
|
||||||
param: "12",
|
param: "12",
|
||||||
errInfo: "小区城市编码不能大于4个字符"
|
errInfo: "小区城市编码不能大于4个字符"
|
||||||
},
|
}, ],
|
||||||
],
|
|
||||||
'editCommunityInfo.mapX': [{
|
'editCommunityInfo.mapX': [{
|
||||||
limit: "maxLength",
|
limit: "maxLength",
|
||||||
param: "20",
|
param: "20",
|
||||||
errInfo: "小区城市编码不能大于4个字符"
|
errInfo: "小区城市编码不能大于4个字符"
|
||||||
},
|
}, ],
|
||||||
],
|
|
||||||
'editCommunityInfo.mapY': [{
|
'editCommunityInfo.mapY': [{
|
||||||
limit: "maxLength",
|
limit: "maxLength",
|
||||||
param: "20",
|
param: "20",
|
||||||
errInfo: "小区城市编码不能大于4个字符"
|
errInfo: "小区城市编码不能大于4个字符"
|
||||||
},
|
}, ],
|
||||||
],
|
|
||||||
'editCommunityInfo.communityId': [{
|
'editCommunityInfo.communityId': [{
|
||||||
limit: "required",
|
limit: "required",
|
||||||
param: "",
|
param: "",
|
||||||
@ -108,9 +103,6 @@
|
|||||||
vc.toast(vc.validate.errInfo);
|
vc.toast(vc.validate.errInfo);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
vc.http.post('editCommunity', 'update', JSON.stringify(vc.component.editCommunityInfo), {
|
vc.http.post('editCommunity', 'update', JSON.stringify(vc.component.editCommunityInfo), {
|
||||||
emulateJSON: true
|
emulateJSON: true
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user