weiximei vor 6 Jahren
Ursprung
Commit
e99c6ce490

+ 1
- 1
VUECODE/smart-property-manage/config/dev.env.js Datei anzeigen

@@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
4 4
 
5 5
 module.exports = merge(prodEnv, {
6 6
   NODE_ENV: '"development"',
7
-  BASE_API: '"http://localhost:8085/operate-api"',
7
+  BASE_API: '"http://localhost:8085/property-api"',
8 8
 })

+ 14
- 15
VUECODE/smart-property-manage/src/components/chart/chart1.vue Datei anzeigen

@@ -1,6 +1,5 @@
1 1
 <template>
2
-  <div id="node1">
3
-  </div>
2
+  <div id="node1"/>
4 3
 </template>
5 4
 
6 5
 <script>
@@ -9,24 +8,24 @@ import DataSet from '@antv/data-set'
9 8
 import $ from 'jquery'
10 9
 
11 10
 export default {
12
-  mounted () {
11
+  mounted() {
13 12
     this.rander()
14 13
   },
15 14
   methods: {
16
-    rander () {
15
+    rander() {
17 16
       var data = [{
18 17
         type: '未解决',
19 18
         percent: 0.3
20 19
       }, {
21 20
         type: '已解决',
22 21
         percent: 0.7
23
-      },]
22
+      }]
24 23
       var sum = 200
25 24
       var ds = new DataSet()
26 25
       var dv = ds.createView().source(data)
27 26
       dv.transform({
28 27
         type: 'map',
29
-        callback: function callback (row) {
28
+        callback: function callback(row) {
30 29
           row.value = parseInt(sum * row.percent)
31 30
           return row
32 31
         }
@@ -58,7 +57,7 @@ export default {
58 57
         },
59 58
         rotate: 0,
60 59
         autoRotate: false,
61
-        formatter: function formatter (text, item) {
60
+        formatter: function formatter(text, item) {
62 61
           return String(parseInt(item.point.percent * 100)) + '%'
63 62
         }
64 63
       })
@@ -70,16 +69,16 @@ export default {
70 69
         position: ['50%', '-10%'],
71 70
         html: '<div class="g2-guide-title"><p class="title">昨日工单解决情况200单</p></div>'
72 71
       })
73
-      chart.on('interval:mouseenter', function (ev) {
72
+      chart.on('interval:mouseenter', function(ev) {
74 73
         var data = ev.data._origin
75
-        $(".g2-guide-html").css('opacity', 1)
76
-        $(".g2-guide-html .title").text(data.type)
77
-        $(".g2-guide-html .value").text(data.value)
74
+        $('.g2-guide-html').css('opacity', 1)
75
+        $('.g2-guide-html .title').text(data.type)
76
+        $('.g2-guide-html .value').text(data.value)
78 77
       })
79 78
 
80
-      chart.on('interval:mouseleave', function () {
81
-        $(".g2-guide-html .title").text('总计')
82
-        $(".g2-guide-html .value").text(200)
79
+      chart.on('interval:mouseleave', function() {
80
+        $('.g2-guide-html .title').text('总计')
81
+        $('.g2-guide-html .value').text(200)
83 82
       })
84 83
       chart.render()
85 84
     }
@@ -105,4 +104,4 @@ export default {
105 104
     }
106 105
   }
107 106
 }
108
-</style>
107
+</style>

+ 9
- 10
VUECODE/smart-property-manage/src/components/chart/chart2.vue Datei anzeigen

@@ -1,17 +1,16 @@
1 1
 <template>
2
-  <div id="node2"></div>
2
+  <div id="node2"/>
3 3
 </template>
4 4
 
5 5
 <script>
6 6
 import G2 from '@antv/g2'
7
-import DataSet from '@antv/data-set'
8 7
 
9 8
 export default {
10
-  mounted () {
9
+  mounted() {
11 10
     this.rander()
12 11
   },
13 12
   methods: {
14
-    rander () {
13
+    rander() {
15 14
       var data = [{
16 15
         item: '报修单一',
17 16
         count: 40,
@@ -37,7 +36,7 @@ export default {
37 36
       })
38 37
       chart.source(data, {
39 38
         percent: {
40
-          formatter: function formatter (val) {
39
+          formatter: function formatter(val) {
41 40
             val = val * 100 + '%'
42 41
             return val
43 42
           }
@@ -54,7 +53,7 @@ export default {
54 53
         showTitle: false,
55 54
         itemTpl: '<li><span style="background-color:{color}" class="g2-tooltip-marker"></span>{name}: {value}</li>'
56 55
       })
57
-      chart.intervalStack().position('percent').color('item', function (val) {
56
+      chart.intervalStack().position('percent').color('item', function(val) {
58 57
         if (val === '报修单一') {
59 58
           return '#53F9FF'
60 59
         } else if (val === '报修单二') {
@@ -65,14 +64,14 @@ export default {
65 64
           return '#454D54'
66 65
         }
67 66
       }).label('percent', {
68
-        formatter: function formatter (val, item) {
67
+        formatter: function formatter(val, item) {
69 68
           return item._origin.item + ': ' + val
70 69
         },
71 70
         textStyle: {
72 71
           fill: '#a4b6c5', // 文本的颜色
73
-          fontSize: '12', // 文本大小
72
+          fontSize: '12' // 文本大小
74 73
         }
75
-      }).tooltip('item*percent', function (item, percent) {
74
+      }).tooltip('item*percent', function(item, percent) {
76 75
         percent = percent * 100 + '%'
77 76
         return {
78 77
           name: item,
@@ -95,4 +94,4 @@ export default {
95 94
     color: #a4b6c5;
96 95
   }
97 96
 }
98
-</style>
97
+</style>

+ 16
- 17
VUECODE/smart-property-manage/src/components/chart/chart5.vue Datei anzeigen

@@ -1,10 +1,9 @@
1 1
 <template>
2
-  <div id="node5"></div>
2
+  <div id="node5"/>
3 3
 </template>
4 4
 
5 5
 <script>
6 6
 import G2 from '@antv/g2'
7
-import DataSet from '@antv/data-set'
8 7
 import { mapState, mapActions } from 'vuex'
9 8
 
10 9
 export default {
@@ -22,7 +21,7 @@ export default {
22 21
     ...mapActions('trunkIndex', [
23 22
       'GetSignUser'
24 23
     ]),
25
-    rander () {
24
+    rander() {
26 25
       console.log(this.signUser)
27 26
       var data = this.signUser
28 27
       var chart = new G2.Chart({
@@ -30,13 +29,13 @@ export default {
30 29
         forceFit: true,
31 30
         height: 282,
32 31
         padding: [80, 20, 30, 40]
33
-      });
34
-      chart.source(data);
32
+      })
33
+      chart.source(data)
35 34
       console.log(chart)
36 35
       chart.axis('count', {
37 36
         line: {
38 37
           lineWidth: 1, // 设置线的宽度
39
-          stroke: '#a4b6c5', // 设置线的颜色
38
+          stroke: '#a4b6c5' // 设置线的颜色
40 39
         },
41 40
         grid: null,
42 41
         label: {
@@ -47,23 +46,23 @@ export default {
47 46
             textBaseline: 'middle' // 文本基准线,可取 top middle bottom,默认为middle
48 47
           }
49 48
         }
50
-      });
49
+      })
51 50
       chart.axis('message', {
52 51
         line: {
53 52
           lineWidth: 1, // 设置线的宽度
54
-          stroke: '#a4b6c5', // 设置线的颜色
53
+          stroke: '#a4b6c5' // 设置线的颜色
55 54
         },
56 55
         grid: null,
57 56
         label: {
58 57
           textStyle: {
59 58
             fill: '#a4b6c5', // 文本的颜色
60
-            fontSize: '12', // 文本大小
59
+            fontSize: '12' // 文本大小
61 60
           }
62 61
         }
63
-      });
62
+      })
64 63
       chart.scale('', {
65 64
         tickInterval: 200
66
-      });
65
+      })
67 66
       chart.guide().html({
68 67
         position: ['5%', '-25%'],
69 68
         html: '<div class="chart5-title"><p class="title">注册用户统计</p></div>'
@@ -73,13 +72,13 @@ export default {
73 72
         html: `<div class="chart-right-btn"><span>18/11/27</span>&nbsp;<i class='el-icon-date'></i></div>`
74 73
       })
75 74
 
76
-      chart.interval().position('message*count').color('message', function (val) {
75
+      chart.interval().position('message*count').color('message', function(val) {
77 76
         if (val === '业主总数' || val === '家属总数') {
78
-          return '#53F9FF';
77
+          return '#53F9FF'
79 78
         }
80
-        return '#FF5367';
81
-      });
82
-      chart.render();
79
+        return '#FF5367'
80
+      })
81
+      chart.render()
83 82
     }
84 83
   }
85 84
 }
@@ -104,4 +103,4 @@ export default {
104 103
     color: #a4b6c5;
105 104
   }
106 105
 }
107
-</style>
106
+</style>

+ 33
- 33
VUECODE/smart-property-manage/src/components/chart/chart6.vue Datei anzeigen

@@ -1,66 +1,66 @@
1 1
 <template>
2
-  <div id="node6"></div>
2
+  <div id="node6"/>
3 3
 </template>
4 4
 
5 5
 <script>
6 6
 import G2 from '@antv/g2'
7 7
 import DataSet from '@antv/data-set'
8 8
 export default {
9
-  mounted () {
9
+  mounted() {
10 10
     this.rander()
11 11
   },
12 12
   methods: {
13
-    rander () {
13
+    rander() {
14 14
       var data = [{
15
-        "year": "11.17",
16
-        "ACME": 300,
15
+        'year': '11.17',
16
+        'ACME': 300
17 17
       }, {
18
-        "year": "11.18",
19
-        "ACME": 280,
18
+        'year': '11.18',
19
+        'ACME': 280
20 20
       }, {
21
-        "year": "11.19",
22
-        "ACME": 320,
21
+        'year': '11.19',
22
+        'ACME': 320
23 23
       }, {
24
-        "year": "11.20",
25
-        "ACME": 250,
24
+        'year': '11.20',
25
+        'ACME': 250
26 26
       }, {
27
-        "year": "11.21",
28
-        "ACME": 310,
27
+        'year': '11.21',
28
+        'ACME': 310
29 29
       }, {
30
-        "year": "11.22",
31
-        "ACME": 323,
30
+        'year': '11.22',
31
+        'ACME': 323
32 32
       }, {
33
-        "year": "11.23",
34
-        "ACME": 350,
35
-      }];
36
-      var dv = new DataSet.View().source(data);
33
+        'year': '11.23',
34
+        'ACME': 350
35
+      }]
36
+      var dv = new DataSet.View().source(data)
37 37
       dv.transform({
38 38
         type: 'fold',
39 39
         fields: ['ACME'],
40 40
         key: 'type',
41 41
         value: 'value'
42
-      });
42
+      })
43 43
       var chart = new G2.Chart({
44 44
         container: 'node6',
45 45
         forceFit: true,
46 46
         height: 282,
47 47
         padding: [80, 20, 30, 40]
48
-      });
48
+      })
49 49
       chart.source(dv, {
50 50
         value: {
51 51
           alias: 'The Share Price in Dollars',
52
-          formatter: function formatter (val) {
53
-            return val;
52
+          formatter: function formatter(val) {
53
+            return val
54 54
           }
55 55
         },
56 56
         year: {
57 57
           range: [0, 1]
58 58
         }
59
-      });
59
+      })
60 60
       chart.axis('value', {
61 61
         line: {
62 62
           lineWidth: 1, // 设置线的宽度
63
-          stroke: '#a4b6c5', // 设置线的颜色
63
+          stroke: '#a4b6c5' // 设置线的颜色
64 64
         },
65 65
         grid: null,
66 66
         label: {
@@ -71,34 +71,34 @@ export default {
71 71
             textBaseline: 'middle' // 文本基准线,可取 top middle bottom,默认为middle
72 72
           }
73 73
         }
74
-      });
74
+      })
75 75
       chart.axis('year', {
76 76
         line: {
77 77
           lineWidth: 1, // 设置线的宽度
78
-          stroke: '#a4b6c5', // 设置线的颜色
78
+          stroke: '#a4b6c5' // 设置线的颜色
79 79
         },
80 80
         grid: null,
81 81
         label: {
82 82
           textStyle: {
83 83
             fill: '#a4b6c5', // 文本的颜色
84
-            fontSize: '12', // 文本大小
84
+            fontSize: '12' // 文本大小
85 85
           }
86 86
         }
87
-      });
87
+      })
88 88
       chart.tooltip({
89 89
         crosshairs: true
90
-      });
90
+      })
91 91
       chart.guide().html({
92 92
         position: ['90%', '-15%'],
93 93
         html: `<div class="chart-right-btn"><span>日活跃量</span>&nbsp;<i class='el-icon-arrow-down'></i></div>`
94 94
       })
95
-      chart.area().position('year*value').color('type', function (val) { return '#53F9FF' }).shape('smooth');
96
-      chart.line().position('year*value').color('type', function (val) { return '#53F9FF' }).size(2).shape('smooth');
95
+      chart.area().position('year*value').color('type', function(val) { return '#53F9FF' }).shape('smooth')
96
+      chart.line().position('year*value').color('type', function(val) { return '#53F9FF' }).size(2).shape('smooth')
97 97
       chart.guide().html({
98 98
         position: ['5%', '-25%'],
99 99
         html: '<div class="chart5-title"><p class="title">上线活跃用户</p></div>'
100 100
       })
101
-      chart.render();
101
+      chart.render()
102 102
     }
103 103
   }
104 104
 }

+ 18
- 19
VUECODE/smart-property-manage/src/components/chart/chart7.vue Datei anzeigen

@@ -1,17 +1,16 @@
1 1
 <template>
2
-  <div id="node7"></div>
2
+  <div id="node7"/>
3 3
 </template>
4 4
 
5 5
 <script>
6 6
 import G2 from '@antv/g2'
7
-import DataSet from '@antv/data-set'
8 7
 
9 8
 export default {
10
-  mounted () {
9
+  mounted() {
11 10
     this.rander()
12 11
   },
13 12
   methods: {
14
-    rander () {
13
+    rander() {
15 14
       var data = [{
16 15
         type: '公告',
17 16
         sales: 500
@@ -21,17 +20,17 @@ export default {
21 20
       }, {
22 21
         type: '帖子',
23 22
         sales: 1000
24
-      }];
23
+      }]
25 24
       var chart = new G2.Chart({
26 25
         container: 'node7',
27 26
         forceFit: true,
28 27
         height: 282,
29 28
         padding: [80, 20, 30, 40]
30
-      });
31
-      chart.source(data);
29
+      })
30
+      chart.source(data)
32 31
       chart.scale('', {
33 32
         tickInterval: 200
34
-      });
33
+      })
35 34
       chart.guide().html({
36 35
         position: ['5%', '-25%'],
37 36
         html: '<div class="chart7-title"><p class="title">内容运营统计</p></div>'
@@ -43,7 +42,7 @@ export default {
43 42
       chart.axis('sales', {
44 43
         line: {
45 44
           lineWidth: 1, // 设置线的宽度
46
-          stroke: '#a4b6c5', // 设置线的颜色
45
+          stroke: '#a4b6c5' // 设置线的颜色
47 46
         },
48 47
         grid: null,
49 48
         label: {
@@ -54,29 +53,29 @@ export default {
54 53
             textBaseline: 'middle' // 文本基准线,可取 top middle bottom,默认为middle
55 54
           }
56 55
         }
57
-      });
56
+      })
58 57
       chart.axis('type', {
59 58
         line: {
60 59
           lineWidth: 1, // 设置线的宽度
61
-          stroke: '#a4b6c5', // 设置线的颜色
60
+          stroke: '#a4b6c5' // 设置线的颜色
62 61
         },
63 62
         grid: null,
64 63
         label: {
65 64
           textStyle: {
66 65
             fill: '#a4b6c5', // 文本的颜色
67
-            fontSize: '12', // 文本大小
66
+            fontSize: '12' // 文本大小
68 67
           }
69 68
         }
70
-      });
71
-      chart.interval().position('type*sales').color('type', function (val) {
69
+      })
70
+      chart.interval().position('type*sales').color('type', function(val) {
72 71
         if (val === '公告') {
73
-          return '#53F9FF';
72
+          return '#53F9FF'
74 73
         } else if (val === '活动') {
75
-          return '#FF5367';
74
+          return '#FF5367'
76 75
         }
77
-        return '#3F688D';
78
-      });
79
-      chart.render();
76
+        return '#3F688D'
77
+      })
78
+      chart.render()
80 79
     }
81 80
   }
82 81
 }

+ 7
- 7
VUECODE/smart-property-manage/src/router/index.js Datei anzeigen

@@ -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
 

+ 97
- 0
VUECODE/smart-property-manage/src/views/building/batch/batchImport.vue Datei anzeigen

@@ -0,0 +1,97 @@
1
+
2
+<template>
3
+  <div class="root">
4
+    <el-form :inline="true" :model="listQuery" class="form-listQuery">
5
+      <el-form-item>
6
+        <el-upload
7
+          class="upload-demo"
8
+          action="https://jsonplaceholder.typicode.com/posts/"
9
+          :on-preview="handlePreview"
10
+          :on-remove="handleRemove"
11
+          :before-remove="beforeRemove"
12
+          multiple
13
+          :limit="3"
14
+          :on-exceed="handleExceed"
15
+          :file-list="fileList">
16
+          <el-button style="margin-left: 10px;" size="large" type="primary">下载模板</el-button>
17
+          <el-button slot="trigger" size="large" type="primary">选取文件并预览</el-button>
18
+          <el-button style="margin-left: 10px;" size="large" type="success" @click="submitUpload">提交</el-button>
19
+        </el-upload>
20
+      </el-form-item>
21
+    </el-form>
22
+    <el-table
23
+      ref="multipleTable"
24
+      :data="tableData3"
25
+      border
26
+      tooltip-effect="dark"
27
+      style="width: 100%; margin-top: 20px;"
28
+      @selection-change="handleSelectionChange">
29
+      <el-table-column label="栋">
30
+        <template slot-scope="scope">{{ scope.row.date }}</template>
31
+      </el-table-column>
32
+      <el-table-column prop="name" label="单元"/>
33
+      <el-table-column prop="address" label="楼层"/>
34
+      <el-table-column prop="address" label="户号"/>
35
+      <el-table-column prop="address" label="业主姓名"/>
36
+      <el-table-column prop="address" label="手机号码"/>
37
+    </el-table>
38
+    <div class="block">
39
+      <el-pagination
40
+        :current-page="listQuery.pageNum"
41
+        :page-sizes="[5, 10, 20, 30]"
42
+        :page-size="listQuery.pageSize"
43
+        :total="40"
44
+        layout="total, sizes, prev, pager, next, jumper"
45
+        @size-change="handleSizeChange"
46
+        @current-change="handleCurrentChange"/>
47
+    </div>
48
+  </div>
49
+</template>
50
+
51
+<script>
52
+export default {
53
+  data() {
54
+    return {
55
+      listQuery: {
56
+        pageNum: 1,
57
+        pageSize: 20
58
+      },
59
+      currentPage4: 4
60
+    }
61
+  },
62
+  methods: {
63
+    handleSizeChange(val) {
64
+      console.log(`每页 ${val} 条`)
65
+    },
66
+    handleCurrentChange(val) {
67
+      console.log(`当前页: ${val}`)
68
+    },
69
+    dialogBatchImport() {
70
+      this.$router.push({ name: 'batch-import' })
71
+    }
72
+  }
73
+}
74
+</script>
75
+
76
+<style scoped>
77
+.root{
78
+  display: flex;
79
+  flex-flow: column;
80
+}
81
+.form-listQuery{
82
+  margin-top: 20px;
83
+  margin-left: 30px;
84
+}
85
+.operation{
86
+  display: flex;
87
+  justify-content: space-between;
88
+  margin-left: 20px;
89
+  margin-right: 20px;
90
+}
91
+.block{
92
+  display: flex;
93
+  justify-content: flex-end;
94
+  margin-top: 10px;
95
+}
96
+</style>
97
+

+ 4
- 2
VUECODE/smart-property-manage/src/views/building/index.vue Datei anzeigen

@@ -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
 }

+ 8
- 8
VUECODE/smart-property-manage/src/views/index/index.vue Datei anzeigen

@@ -1,17 +1,17 @@
1 1
 <template>
2 2
   <div class="main">
3 3
     <div class="left">
4
-      <chart1></chart1>
5
-      <chart2></chart2>
6
-      <chart3></chart3>
4
+      <chart1/>
5
+      <chart2/>
6
+      <chart3/>
7 7
     </div>
8 8
     <div class="middle">
9
-      <chart4></chart4>
9
+      <chart4/>
10 10
     </div>
11 11
     <div class="right">
12
-      <chart5></chart5>
13
-      <chart6></chart6>
14
-      <chart7></chart7>
12
+      <chart5/>
13
+      <chart6/>
14
+      <chart7/>
15 15
     </div>
16 16
   </div>
17 17
 </template>
@@ -34,7 +34,7 @@ export default {
34 34
     chart5,
35 35
     chart6,
36 36
     chart7
37
-  },
37
+  }
38 38
 }
39 39
 
40 40
 </script>