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

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

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

Loading…
Cancel
Save