<!--
  @description 角色管理页面，实现角色的创建、权限分配与列表管理
  @author D吕贺034244311
  @date 20260618
-->
<template>

  <div>

    <data-table
      ref="pagingTable"
      :options="options"
      :list-query="listQuery"
      @multi-actions="handleMultiAction"
    >
      <template #data-columns>

        <el-table-column
          label="角色ID"
          prop="id"
        />

        <el-table-column
          label="角色名称"
          prop="roleName"
        />

      </template>

    </data-table>
  </div>

</template>

<script>
import DataTable from '@/components/DataTable/index.vue'

export default {
  name: 'SysRoleList',
  components: { DataTable },
  data() {
    return {

      listQuery: {
        current: 1,
        size: 10,
        params: {
        }
      },

      options: {
        // 列表请求URL
        listUrl: '/exam/api/sys/role/paging',
        // 启用禁用
        stateUrl: '/sys/user/state'
      }
    }
  },

  methods: {

    // 批量操作监听
    handleMultiAction(obj) {
      if (obj.opt === 'cancel') {
        this.handleCancelOrder(obj.ids)
      }
    }
  }
}
</script>
