| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <!-- 搜索区 ↓↓↓↓↓↓↓↓↓↓ --> |
| | | <el-form v-show="showSearch" ref="searchForm" :inline="true"> |
| | | <!-- <el-form v-show="showSearch" ref="searchForm" :inline="true"> |
| | | <el-form-item label="角色名称"> |
| | | <el-input |
| | | v-model="keyWord" |
| | |
| | | clearable |
| | | size="small" |
| | | style="width: 240px" |
| | | maxlength="50" |
| | | @keyup.enter.native="reGetList" |
| | | /> |
| | | </el-form-item> |
| | |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="reGetList">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetHandle">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form> --> |
| | | <!-- 搜索区 ↑↑↑↑↑↑↑↑↑↑ --> |
| | | |
| | | <!-- 操作区 ↓↓↓↓↓↓↓↓↓↓ --> |
| | |
| | | |
| | | <script> |
| | | |
| | | import mixin_keepAlive from '@/mixins/keepAlive.js' // 页面缓存 |
| | | export default { |
| | | name: 'Role', |
| | | mixins: [mixin_keepAlive], |
| | | data() { |
| | | return { |
| | | showSearch: true, // 是否显示搜索区 |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | // 在mixin_keepAlive => activated初始化 |
| | | }, |
| | | methods: { |
| | | // 初始化 |
| | | init() { |
| | | // keepalive重置初始值 |
| | | this.resetHandle() |
| | | }, |
| | | |
| | | // 返回刷新 |
| | | regInit() { |
| | | this.getList() |
| | | }, |
| | | |
| | |
| | | url: 'admin/role/list', |
| | | params: { |
| | | pageNum: pageNum, |
| | | rowCount: pageSize, |
| | | pageSize: pageSize, |
| | | keyWord: keyWord |
| | | }, |
| | | mockData: { |