wuxw
2019-12-22 0d8d94898f1491a42922b041f119c72627baaf6c
WebService/src/main/resources/components/orgPackage/edit-org/editOrg.js
@@ -8,6 +8,7 @@
                orgLevel: '',
                parentOrgId: '',
                belongCommunityId: '',
                communityId: '',
                description: '',
                parentOrg: []
@@ -23,13 +24,14 @@
        },
        _initMethod: function () {
            vc.component._editOrgListParentOrgInfo();
            vc.component._loadEditEnterCommunitys();
        },
        _initEvent: function () {
            vc.on('editOrg', 'openEditOrgModal', function (_params) {
                vc.component.refreshEditOrgInfo();
                $('#editOrgModel').modal('show');
                vc.copyObject(_params, vc.component.editOrgInfo);
                vc.component.editOrgInfo.communityId = vc.getCurrentCommunity().communityId;
                vc.component.editOrgInfo.communityId = vc.component.editOrgInfo.belongCommunityId;
            });
        },
        methods: {
@@ -103,6 +105,7 @@
                });
            },
            editOrg: function () {
                vc.component.editOrgInfo.belongCommunityId = vc.component.editOrgInfo.communityId;
                if (!vc.component.editOrgValidate()) {
                    vc.message(vc.validate.errInfo);
                    return;
@@ -169,6 +172,26 @@
                        console.log('请求失败处理');
                    }
                );
            },
            _loadEditEnterCommunitys: function () {
                //belongCommunitys
                var param = {
                    params: {
                        _uid: 'mmmllnnjhhjjh'
                    }
                }
                //发送get请求
                vc.http.get('editOrg',
                    'listEnterCommunitys',
                    param,
                    function (json, res) {
                        var _enterCommunitys = JSON.parse(json);
                        vc.component.editOrgInfo.belongCommunitys = _enterCommunitys.communitys;
                    }, function (errInfo, error) {
                        console.log('请求失败处理');
                    }
                );
            }
        }
    });