This commit is contained in:
bryan sun
2019-10-24 15:45:13 +08:00
parent a6fee1fea0
commit f65eb643fb
20 changed files with 520 additions and 532 deletions

View File

@@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-card>
<span>角色功能:</span>
<el-input v-model="RoleFunctioning" size="small" clearable style="width:200px"/>
<!-- <span>角色功能:</span>-->
<el-input v-model="RoleFunctioning" size="small" clearable placeholder="请输入角色功能" style="width:200px"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent=1;pageSize = 10;searchData()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
</el-card>
@@ -10,6 +10,7 @@
<el-table
v-loading="loading"
:data="tableData"
height="830"
highlight-current-row
border>
<el-table-column align="center" label="角色编号" width="100">
@@ -44,16 +45,16 @@
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
<!-- <div class="block" style="margin-top: 10px;">-->
<!-- <el-pagination-->
<!-- :current-page="pageCurrent"-->
<!-- :page-sizes="[10, 20, 30, 40, 50]"-->
<!-- :page-size="pageSize"-->
<!-- :total="total"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- @size-change="handleSizeChange"-->
<!-- @current-change="handleCurrentChange"/>-->
<!-- </div>-->
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="新增角色" center style="min-height: 200px" width="400px">
@@ -126,8 +127,8 @@ export default {
},
methods: {
fetchData() {
InitRolefunction(this.pageCurrent, this.pageSize).then(response => { // 初始化
this.tableData = response.data.rows
InitRolefunction().then(response => { // 初始化
this.tableData = response.data
this.total = response.data.total
})
},
@@ -140,15 +141,15 @@ export default {
console.log(response.data)
})
},
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.fetchData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.fetchData()
},
// handleSizeChange(val) {
// this.pageCurrent = 1
// this.pageSize = val
// this.fetchData()
// },
// handleCurrentChange(val) {
// this.pageCurrent = val
// this.fetchData()
// },
handleEdit(row) {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()