分页
This commit is contained in:
@@ -3,22 +3,22 @@
|
||||
<table style="width: 100%">
|
||||
|
||||
<el-card>
|
||||
<span>员工姓名:</span>
|
||||
<el-input v-model="staffName" placeholder="员工姓名" size="small" clearable style="width:200px"/>
|
||||
<span style="margin-left: 15px">角色名称:</span>
|
||||
<el-select v-model="roleName" placeholder="角色名称" clearable size="small" style="width:200px">
|
||||
<!-- <span>员工姓名:</span>-->
|
||||
<el-input v-model="staffName" placeholder="员工姓名" size="small" clearable style="width:200px;margin: 0px 10px"/>
|
||||
<!-- <span style="margin-left: 15px">角色名称:</span>-->
|
||||
<el-select v-model="roleName" placeholder="角色名称" clearable size="small" style="width:200px;margin: 0px 10px">
|
||||
<el-option
|
||||
v-for="item in roleNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent1=1;searchData()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="searchData">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handelAdd">增加</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table :data="tableData" highlight-current-row stripe size="mini" height="550" border style="width: 100%">
|
||||
<el-table :data="tableData" highlight-current-row stripe size="mini" height="820" border style="width: 100%">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
@@ -66,16 +66,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<!-- <div class="block" style="margin-top: 10px;">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- :current-page="pageCurrent1"-->
|
||||
<!-- :page-sizes="[10, 20, 30, 40, 50]"-->
|
||||
<!-- :page-size="10"-->
|
||||
<!-- :total="total1"-->
|
||||
<!-- layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!-- @size-change="handleSizeChange1"-->
|
||||
<!-- @current-change="handleCurrentChange1"/>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
</table>
|
||||
|
||||
@@ -232,9 +232,9 @@ export default {
|
||||
staffNum: '',
|
||||
personnelNumber: '',
|
||||
personnelStream: '',
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: null,
|
||||
// pageCurrent1: 1,
|
||||
// pageSize1: 10,
|
||||
// total1: null,
|
||||
roleName: null,
|
||||
roleNames: [],
|
||||
rybh: '',
|
||||
@@ -283,9 +283,9 @@ export default {
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
searchTable(this.check1, this.staffName, this.check2, this.roleName, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
searchTable(this.check1, this.staffName, this.check2, this.roleName).then(response => {
|
||||
console.log(response)
|
||||
this.tableData = response.data.rows
|
||||
this.tableData = response.data
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
@@ -304,15 +304,15 @@ export default {
|
||||
})
|
||||
this.searchData()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchData()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchData()
|
||||
},
|
||||
// handleSizeChange1(val) {
|
||||
// this.pageCurrent1 = 1
|
||||
// this.pageSize1 = val
|
||||
// this.searchData()
|
||||
// },
|
||||
// handleCurrentChange1(val) {
|
||||
// this.pageCurrent1 = val
|
||||
// this.searchData()
|
||||
// },
|
||||
submitAdd1() {
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
Reference in New Issue
Block a user