|
@@ -1,12 +1,19 @@
|
|
|
<template>
|
|
|
<div class="ManagingUsers" style="display: none;" :style="{display: block}">
|
|
|
<div class="ManagingUsers1">
|
|
|
- <el-input v-model="page.name" placeholder="请输入内容" style="max-width: 300px;" clearable></el-input>
|
|
|
- <el-button type="primary" icon="el-icon-search">搜索</el-button>
|
|
|
- <el-button type="warning" icon="el-icon-circle-plus-outline">添加</el-button>
|
|
|
+ <!-- <el-button type="primary" icon="el-icon-search">搜索</el-button> -->
|
|
|
+ <div class="ManagingUsers1-L">
|
|
|
+ <el-button type="primary" icon="el-icon-plus">新增用户</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="ManagingUsers1-R">
|
|
|
+ <div class="ManagingUsers1-Rtx">
|
|
|
+ 搜索:
|
|
|
+ </div>
|
|
|
+ <el-input v-model="page.name" placeholder="请输入内容" clearable></el-input>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="ManagingUsers2">
|
|
|
- <el-table :data="tableData" style="width: 100%" border>
|
|
|
+ <el-table :data="tableData" border>
|
|
|
<el-table-column label="日期" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<i class="el-icon-time"></i>
|
|
@@ -15,19 +22,13 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="姓名" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-popover trigger="hover" placement="top">
|
|
|
- <p>姓名: {{ scope.row.name }}</p>
|
|
|
- <p>住址: {{ scope.row.address }}</p>
|
|
|
- <div slot="reference" class="name-wrapper">
|
|
|
- <el-tag size="medium">{{ scope.row.name }}</el-tag>
|
|
|
- </div>
|
|
|
- </el-popover>
|
|
|
+ {{ scope.row.name }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
|
|
- <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除
|
|
|
+ <el-button size="mini" @click="handleEdit(scope.row)">编辑</el-button>
|
|
|
+ <el-button size="mini" type="danger" @click="handleDelete(scope.row)">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -35,8 +36,8 @@
|
|
|
</div>
|
|
|
<div class="ManagingUsers3">
|
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
- :current-page="page.page" :page-size="page.page_size"
|
|
|
- layout="total, prev, pager, next, jumper" :total="total">
|
|
|
+ :current-page="page.pagez" :page-size="page.page_size" layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -47,11 +48,11 @@
|
|
|
name: 'ManagingUsers',
|
|
|
data() {
|
|
|
return {
|
|
|
- total:30,
|
|
|
- page:{
|
|
|
- page:1,
|
|
|
- page_size:10,
|
|
|
- name:''
|
|
|
+ total: 30,
|
|
|
+ page: {
|
|
|
+ pagez: 1,
|
|
|
+ page_size: 10,
|
|
|
+ name: ''
|
|
|
},
|
|
|
tableData: [{
|
|
|
date: '2016-05-02',
|
|
@@ -74,25 +75,50 @@
|
|
|
},
|
|
|
methods: {
|
|
|
handleSizeChange(val) {
|
|
|
- console.log(`每页 ${val} 条`);
|
|
|
+ console.log('每页',val,'条');
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
- console.log(`当前页: ${val}`);
|
|
|
+ console.log('当前页',val);
|
|
|
+ },
|
|
|
+ handleEdit(e){
|
|
|
+ console.log('编辑',e);
|
|
|
+ },
|
|
|
+ handleDelete(e){
|
|
|
+ console.log('删除',e);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ // 在填充数据之前隐藏
|
|
|
+ [v-cloak] {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
.ManagingUsers {
|
|
|
.ManagingUsers1 {
|
|
|
display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
align-items: center;
|
|
|
+ .ManagingUsers1-L{
|
|
|
+ }
|
|
|
+ .ManagingUsers1-R{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ .ManagingUsers1-Rtx{
|
|
|
+ min-width:45px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #909399;
|
|
|
+ user-select: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.ManagingUsers2 {
|
|
|
- margin-top: 40px;
|
|
|
+ margin-top: 20px;
|
|
|
}
|
|
|
+
|
|
|
.ManagingUsers3 {
|
|
|
margin-top: 40px;
|
|
|
}
|