| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
| | | <el-form-item label="角色名称" prop="roleName"> |
| | | <el-input |
| | | v-model="queryParams.roleName" |
| | | placeholder="请输入角色名称" |
| | | clearable |
| | | size="small" |
| | | style="width: 240px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | |
| | | v-model="queryParams.roleKey" |
| | | placeholder="请输入权限字符" |
| | | clearable |
| | | size="small" |
| | | style="width: 240px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | |
| | | v-model="queryParams.status" |
| | | placeholder="角色状态" |
| | | clearable |
| | | size="small" |
| | | style="width: 240px" |
| | | > |
| | | <el-option |
| | |
| | | <el-form-item label="创建时间"> |
| | | <el-date-picker |
| | | v-model="dateRange" |
| | | size="small" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd" |
| | | type="daterange" |
| | |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | :loading="exportLoading" |
| | | @click="handleExport" |
| | | v-hasPermi="['system:role:export']" |
| | | >导出</el-button> |
| | |
| | | return { |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 导出遮罩层 |
| | | exportLoading: false, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | |
| | | /** 查询角色列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listRole(this.addDateRange(this.queryParams, this.dateRange)).then( |
| | | response => { |
| | | listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | this.roleList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.$download.excel('/system/role/export', this.queryParams); |
| | | this.download('system/role/export', { |
| | | ...this.queryParams |
| | | }, `role_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | </script> |