刘翔宇-旅管家 3 years ago
parent 1b5296df62
commit 19b3df2f7e

@ -160,7 +160,9 @@
this.form = this.$options.data().form;
if (obj) {
obj.status = obj.status.toString();
this.form = result;
this.form = obj;
this.form.pname=obj.pid_info?obj.pid_info.name:'根目录'
}
this.dialogFormVisible = true;
},

@ -7,7 +7,7 @@
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" />
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.keyword" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="edit()" style="margin-left: 10px">新增借阅人</Button>
</div>
@ -33,6 +33,12 @@
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @current-change="handleCurrentChange" :current-page="paginations.page"
:page-size="paginations.page_size" background layout="prev, pager, next" :total="paginations.total">
</el-pagination>
</div>
</div>
<el-dialog title="借阅人编辑" :visible.sync="dialogFormVisible" width="30%">
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
@ -115,15 +121,24 @@
trigger: 'change'
}]
},
paginations: {
page: 1,
page_size: 15,
total: 0
},
tableHeight: 0,
//
searchFields: {
KeyWord: ""
keyword: ""
},
tableData: []
}
},
methods: {
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
initLoad() {
var that = this;
var clientHeight = document.documentElement.clientHeight
@ -144,9 +159,13 @@
},
load() {
var that = this;
listuser().then(response => {
listuser({
page: that.paginations.page,
...that.searchFields
}).then(response => {
var data = response.data;
that.tableData = data;
this.paginations.total = response.total;
}).catch(error => {
console.log(error)
//reject(error)

Loading…
Cancel
Save