<gsb-pagecard>
  <div slot="header">
    <h3>角色管理</h3>
  </div>
        <div  slot="content">
            <gsb-grid2 v-if="!authshow"
              bizCode="roles"
              spaceHeight="200"
              modelName="role"
              listMethod="findAndCountAll"
              deleteMethod="delete"
              initMethod="initNewInstance"
              isDataAuto="true"
            :headStyle="headStyle"
            :isSingleSelect="isSingleSelect"
            :colFormatter="onColFormater"
              @rowclick="rowclicktest">
            </gsb-grid2>
            <div v-else style="min-height:1000px">
              <el-tag type="info">当前授权角色：{{ currentRole?currentRole.name:"" }}</el-tag>
              <el-button @click="authsave" type="warning">保存</el-button>
              <el-button @click="authcancel">取消</el-button>
              <el-tree style="border:1px solid #eee" :data="treedata"  @node-click="handleNodeClick" node-key="code" default-expand-all :props="defaultProps" >
                <div style="width:100%"  slot-scope="{ node, data }">
                  <div style="float:left">{{ node.label }}</div>
                  <div style="margin-right:300px;float:right" v-if="data.bizCode">
                    <gsb-checkgroup dicKey="authType" v-model="data.auths" v-key="data.code"></gsb-checkgroup>
                  </div>
                </div>
              </el-tree>
          </div>
        </div>
    
</gsb-pagecard>
