<rt-form id="{{vm.form.name}}" name="{{vm.form.name}}" novalidate>
    <div class="row rt-margin-bottom-before-box">
        <div class="col-sm-2">
            <button class="btn btn-link" type="button" id="btnClose" ng-click="vm.form.hide()">
                        <i class="fa fa-sign-out"></i> 关闭
                    </button>
        </div>
        <!-- div[.col-sm-2] -->
        <div class="col-sm-10">
            <div class="pull-right">
                <rt-button id="btnSave" rt-style="link" rt-title="保存" rt-icon="floppy-o" ng-click="vm.form.save(false);">
                </rt-button>
                <rt-button id="btnSaveAndHide" rt-style="link" rt-title="保存并关闭" rt-icon="floppy-o" ng-click="vm.form.newSaveAndHide(false);">
                </rt-button>
                <rt-button id="btnSaveAndNew" rt-style="link" rt-title="保存并新建" rt-icon="floppy-o" ng-click="vm.form.save(true);">
                </rt-button>
            </div>
        </div>
        <!-- div[.col-sm-10] -->
    </div>
    <!-- div[.row] -->
    <div class="nav-tabs-custom">
        <!-- @@表单 -->
        <ul class="nav nav-tabs" ng-if="vm.form.type === 'Edit'">
            <li class="active">
                <a href="#A1{{vm.form.data.RoleCode}}" onclick="return false;" data-toggle="tab">详细信息</a>
            </li>
        </ul>
        <!-- ui[.nav] -->

        <div class="tab-content">
            <div class="tab-pane active" id="A1{{vm.form.data.RoleCode}}">
                <rt-section rt-title="基本信息">
                    <rt-section-row>
                        <rt-input rt-type="text" rt-title="角色名称" rt-required="true" rt-col="4" ng-model="vm.form.data.RoleName" rt-disabled="vm.form.data.RoleCode == 'OrgAdmin'||vm.form.data.RoleCode == 'SysAdmin'||vm.form.data.RoleCode == 'SysDev'"></rt-input>
                        <rt-input rt-type="text" rt-title="模板角色" rt-col="4" rt-disabled="true" ng-model="vm.form.data.ParentRoleIdName"></rt-input>
                    </rt-section-row>
                    <rt-section-row>
                        <rt-picklist rt-title="数据权限粒度" ng-model="vm.form.data.privilege_level" rt-col="4" rt-options="vm.picklist.privilege_level"></rt-picklist>
                    </rt-section-row>
                    <rt-section-row>
                        <!-- 创建时组织默认可以选择 -->
                        <rt-lookup2 rt-title="组织" rt-required="true" ng-model="vm.form.data.OwningOrganizationId" rt-disabled="vm.form.type == 'Edit'"
                            rt-col="4" rt-get-data-name="OwningOrganization.GetOwningOrganizationList" rt-order-by="name asc"
                            rt-col-list="[{Code:'name',Name:'名称'}]"></rt-lookup2>
                        <rt-picklist rt-title="状态" ng-model="vm.form.data.StateCode" rt-col="4" rt-options="vm.picklist.StateCode"></rt-picklist>
                    </rt-section-row>
                </rt-section>
            </div>            
        </div>
        <!-- div[.tab-content] -->
    </div>
</rt-form>