傅行帆 6 vuotta sitten
vanhempi
commit
49f6553d62

+ 7
- 7
VUECODE/smart-property-manage/src/router/index.js Näytä tiedosto

@@ -68,13 +68,13 @@ export const constantRouterMap = [
68 68
         name: 'owner-index',
69 69
         meta: { title: '已认证业主', icon: 'building' }
70 70
       },
71
-      // {
72
-      //   path: '/banner/infoBanner',
73
-      //   component: () => import('@/views/banner/infoBanner/index'),
74
-      //   name: 'banner-info',
75
-      //   hidden: true,
76
-      //   meta: { title: '查看banner', icon: 'table' }
77
-      // }
71
+      {
72
+        path: '/building/batch',
73
+        component: () => import('@/views/building/batch/batchImport'),
74
+        name: 'batch-import',
75
+        hidden: true,
76
+        meta: { title: '批量导入楼栋信息', icon: 'table' }
77
+      }
78 78
     ]
79 79
   },
80 80
 

+ 90
- 0
VUECODE/smart-property-manage/src/views/building/batch/batchImport.vue Näytä tiedosto

@@ -0,0 +1,90 @@
1
+
2
+<template>
3
+  <div class="root">
4
+    <el-form :inline="true" :model="listQuery" class="form-listQuery">
5
+      <el-form-item>
6
+        <el-button type="primary">下载模板</el-button>
7
+        <el-button type="warning">上传文件</el-button>
8
+        <el-button type="danger">上传服务器</el-button>
9
+      </el-form-item>
10
+    </el-form>
11
+    <el-table
12
+      ref="multipleTable"
13
+      :data="tableData3"
14
+      border
15
+      tooltip-effect="dark"
16
+      style="width: 100%; margin-top: 20px;"
17
+      @selection-change="handleSelectionChange">
18
+      <el-table-column type="selection" width="55"/>
19
+      <el-table-column label="日期" width="120">
20
+        <template slot-scope="scope">{{ scope.row.date }}</template>
21
+      </el-table-column>
22
+      <el-table-column prop="name" label="姓名" width="120" />
23
+      <el-table-column prop="address" label="地址" show-overflow-tooltip />
24
+    </el-table>
25
+    <div class="block">
26
+      <el-pagination
27
+        :current-page="currentPage4"
28
+        :page-sizes="[100, 200, 300, 400]"
29
+        :page-size="100"
30
+        :total="400"
31
+        layout="total, sizes, prev, pager, next, jumper"
32
+        @size-change="handleSizeChange"
33
+        @current-change="handleCurrentChange"/>
34
+    </div>
35
+  </div>
36
+</template>
37
+
38
+<script>
39
+export default {
40
+  data() {
41
+    return {
42
+      listQuery: {},
43
+      tableData3: [{
44
+        date: '2016-05-03',
45
+        name: '王小虎',
46
+        address: '上海市普陀区金沙江路 1518 弄'
47
+      }, {
48
+        date: '2016-05-02',
49
+        name: '王小虎',
50
+        address: '上海市普陀区金沙江路 1518 弄'
51
+      }],
52
+      currentPage4: 4
53
+    }
54
+  },
55
+  methods: {
56
+    handleSizeChange(val) {
57
+      console.log(`每页 ${val} 条`)
58
+    },
59
+    handleCurrentChange(val) {
60
+      console.log(`当前页: ${val}`)
61
+    },
62
+    dialogBatchImport(){
63
+      this.$router.push({ name: 'batch-import'})
64
+    }
65
+  }
66
+}
67
+</script>
68
+
69
+<style scoped>
70
+.root{
71
+  display: flex;
72
+  flex-flow: column;
73
+}
74
+.form-listQuery{
75
+  margin-top: 20px;
76
+  margin-left: 30px;
77
+}
78
+.operation{
79
+  display: flex;
80
+  justify-content: space-between;
81
+  margin-left: 20px;
82
+  margin-right: 20px;
83
+}
84
+.block{
85
+  display: flex;
86
+  justify-content: flex-end;
87
+  margin-top: 10px;
88
+}
89
+</style>
90
+

+ 4
- 2
VUECODE/smart-property-manage/src/views/building/index.vue Näytä tiedosto

@@ -35,8 +35,7 @@
35 35
         <el-button type="danger">删除</el-button>
36 36
       </div>
37 37
       <div>
38
-        <el-button type="primary">下载模板</el-button>
39
-        <el-button type="success">批量导入</el-button>
38
+        <el-button type="success" @click="dialogBatchImport">批量导入楼栋信息</el-button>
40 39
       </div>
41 40
     </div>
42 41
     <el-table
@@ -89,6 +88,9 @@ export default {
89 88
     },
90 89
     handleCurrentChange(val) {
91 90
       console.log(`当前页: ${val}`)
91
+    },
92
+    dialogBatchImport(){
93
+      this.$router.push({ name: 'batch-import'})
92 94
     }
93 95
   }
94 96
 }