增加icon
This commit is contained in:
parent
9988c7c00c
commit
872f6b9dfb
@ -4,12 +4,12 @@
|
|||||||
<a-form layout="inline">
|
<a-form layout="inline">
|
||||||
<a-row :gutter="48">
|
<a-row :gutter="48">
|
||||||
<a-col :md="4" :sm="24">
|
<a-col :md="4" :sm="24">
|
||||||
<a-input v-model="queryParam.role_name" placeholder="请输入角色名"/>
|
<a-input allowClear v-model="queryParam.role_name" placeholder="请输入角色名"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="24">
|
<a-col :md="4" :sm="24">
|
||||||
<span class="table-page-search-submitButtons">
|
<span class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
<a-button icon="search" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
<a-button icon="sync" style="margin-left: 8px" @click="resetSearchForm()">重置</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -33,9 +33,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<a @click="handleAddSon(record)">新增子角色</a>
|
<a-dropdown>
|
||||||
<a-divider type="vertical" />
|
<a-menu slot="overlay">
|
||||||
<a @click="handleDel(record)">删除</a>
|
<a-menu-item><a @click="handleAddSon(record)">新增子角色</a></a-menu-item>
|
||||||
|
<a-menu-item><a @click="handleDel(record)">删除</a></a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
<a>更多<a-icon type="down"/></a>
|
||||||
|
</a-dropdown>
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
</s-table>
|
</s-table>
|
||||||
@ -44,7 +48,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment'
|
|
||||||
import { STable } from '@/components'
|
import { STable } from '@/components'
|
||||||
import CreateRole from './form/create'
|
import CreateRole from './form/create'
|
||||||
import { getRoleList, del } from '@/api/role'
|
import { getRoleList, del } from '@/api/role'
|
||||||
@ -131,9 +134,8 @@ export default {
|
|||||||
this.handleCancel()
|
this.handleCancel()
|
||||||
},
|
},
|
||||||
resetSearchForm () {
|
resetSearchForm () {
|
||||||
this.queryParam = {
|
this.queryParam = {}
|
||||||
date: moment(new Date())
|
this.handleOk()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
<a-form layout="inline">
|
<a-form layout="inline">
|
||||||
<a-row :gutter="48">
|
<a-row :gutter="48">
|
||||||
<a-col :md="4" :sm="24">
|
<a-col :md="4" :sm="24">
|
||||||
<a-input v-model="queryParam.permission_name" placeholder="请输入菜单名名称"/>
|
<a-input allowClear v-model="queryParam.permission_name" placeholder="请输入菜单名名称"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="24">
|
<a-col :md="4" :sm="24">
|
||||||
<span class="table-page-search-submitButtons">
|
<span class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
<a-button icon="search" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
<a-button icon="sync" style="margin-left: 8px" @click="resetSearchForm()">重置</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -33,9 +33,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<a @click="handleAddSon(record)">新增子菜单</a>
|
<a-dropdown>
|
||||||
<a-divider type="vertical" />
|
<a-menu slot="overlay">
|
||||||
<a @click="handleDel(record)">删除</a>
|
<a-menu-item><a @click="handleAddSon(record)">新增子菜单</a></a-menu-item>
|
||||||
|
<a-menu-item><a @click="handleDel(record)">删除</a></a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
<a>更多<a-icon type="down"/></a>
|
||||||
|
</a-dropdown>
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
</s-table>
|
</s-table>
|
||||||
@ -44,7 +48,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment'
|
|
||||||
import { STable } from '@/components'
|
import { STable } from '@/components'
|
||||||
import CreatePermission from './form/create'
|
import CreatePermission from './form/create'
|
||||||
import { getPermissionList, del } from '@/api/permission'
|
import { getPermissionList, del } from '@/api/permission'
|
||||||
@ -144,9 +147,8 @@ export default {
|
|||||||
this.handleCancel()
|
this.handleCancel()
|
||||||
},
|
},
|
||||||
resetSearchForm () {
|
resetSearchForm () {
|
||||||
this.queryParam = {
|
this.queryParam = {}
|
||||||
date: moment(new Date())
|
this.handleOk()
|
||||||
}
|
|
||||||
},
|
},
|
||||||
renderType (value, row, index) {
|
renderType (value, row, index) {
|
||||||
return value === 1 ? <a-button type="normal" size="small">菜单</a-button> : <a-button type="danger" size="small">按钮</a-button>
|
return value === 1 ? <a-button type="normal" size="small">菜单</a-button> : <a-button type="danger" size="small">按钮</a-button>
|
||||||
|
@ -4,21 +4,21 @@
|
|||||||
<a-form layout="inline">
|
<a-form layout="inline">
|
||||||
<a-row :gutter="48">
|
<a-row :gutter="48">
|
||||||
<a-col :md="4" :sm="24">
|
<a-col :md="4" :sm="24">
|
||||||
<a-input v-model="queryParam.username" placeholder="请输入用户名"/>
|
<a-input allowClear v-model="queryParam.username" placeholder="请输入用户名"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="24">
|
<a-col :md="4" :sm="24">
|
||||||
<a-input v-model="queryParam.email" placeholder="请输入邮箱"/>
|
<a-input allowClear v-model="queryParam.email" placeholder="请输入邮箱"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="24">
|
<a-col :md="4" :sm="24">
|
||||||
<a-select v-model="queryParam.status" placeholder="请选择状态" default-value="0">
|
<a-select allowClear v-model="queryParam.status" placeholder="请选择状态" default-value="0">
|
||||||
<a-select-option value="1">正常</a-select-option>
|
<a-select-option value="1">正常</a-select-option>
|
||||||
<a-select-option value="2">禁用</a-select-option>
|
<a-select-option value="2">禁用</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="24">
|
<a-col :md="4" :sm="24">
|
||||||
<span class="table-page-search-submitButtons">
|
<span class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
<a-button icon="search" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||||
<a-button style="margin-left: 8px" @click="resetSearchForm()">重置</a-button>
|
<a-button icon="sync" style="margin-left: 8px" @click="resetSearchForm()">重置</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -117,10 +117,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
selectedRows: [],
|
|
||||||
// custom table alert & rowSelection
|
// custom table alert & rowSelection
|
||||||
options: {
|
options: {
|
||||||
alert: { show: false, clear: () => { this.selectedRowKeys = [] } },
|
alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
||||||
rowSelection: {
|
rowSelection: {
|
||||||
selectedRowKeys: this.selectedRowKeys,
|
selectedRowKeys: this.selectedRowKeys,
|
||||||
onChange: this.onSelectChange
|
onChange: this.onSelectChange
|
||||||
@ -190,7 +189,6 @@ export default {
|
|||||||
},
|
},
|
||||||
onSelectChange (selectedRowKeys, selectedRows) {
|
onSelectChange (selectedRowKeys, selectedRows) {
|
||||||
this.selectedRowKeys = selectedRowKeys
|
this.selectedRowKeys = selectedRowKeys
|
||||||
this.selectedRows = selectedRows
|
|
||||||
},
|
},
|
||||||
resetSearchForm () {
|
resetSearchForm () {
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="4" :sm="24">
|
<a-col :md="4" :sm="24">
|
||||||
<span class="table-page-search-submitButtons">
|
<span class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
<a-button icon="search" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
||||||
<a-button style="margin-left: 8px" @click="resetSearchForm()">重置</a-button>
|
<a-button icon="sync" style="margin-left: 8px" @click="resetSearchForm()">重置</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -23,8 +23,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-operator" v-if="selectTables.length > 0">
|
<div class="table-operator" v-if="selectTables.length > 0">
|
||||||
<a-button type="primary" icon="plus" @click="optimizeTables()">优化</a-button>
|
<a-button type="primary" icon="safety" @click="optimizeTables()">优化</a-button>
|
||||||
<a-button type="primary" icon="plus" @click="backupTables">备份</a-button>
|
<a-button type="primary" icon="database" @click="backupTables">备份</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<s-table
|
<s-table
|
||||||
@ -119,9 +119,9 @@ export default {
|
|||||||
selectTables: [],
|
selectTables: [],
|
||||||
// custom table alert & rowSelection
|
// custom table alert & rowSelection
|
||||||
options: {
|
options: {
|
||||||
alert: { show: false, clear: () => { this.selectedRowKeys = [] } },
|
alert: { show: false, clear: () => { this.selectTables = [] } },
|
||||||
rowSelection: {
|
rowSelection: {
|
||||||
selectedRowKeys: this.selectedRowKeys,
|
selectedRowKeys: this.selectTables,
|
||||||
onChange: this.onSelectChange
|
onChange: this.onSelectChange
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -135,6 +135,7 @@ export default {
|
|||||||
duration: 4
|
duration: 4
|
||||||
})
|
})
|
||||||
this.selectTables = []
|
this.selectTables = []
|
||||||
|
this.selectedRowKeys = []
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
backupTables () {
|
backupTables () {
|
||||||
@ -144,6 +145,7 @@ export default {
|
|||||||
duration: 4
|
duration: 4
|
||||||
})
|
})
|
||||||
this.selectTables = []
|
this.selectTables = []
|
||||||
|
this.selectedRowKeys = []
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleOk () {
|
handleOk () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user