Bläddra i källkod

Merge branch 'develop' of http://git.ycjcjy.com/fuxingfan/smartCommunity into develop

傅行帆 6 år sedan
förälder
incheckning
92805e2d96

+ 1
- 1
VUECODE/smart-operate-manage/config/dev.env.js Visa fil

@@ -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://101.132.102.231:8085/operate-api"',
8 8
 })

Binär
VUECODE/smart-operate-manage/src/assets/light1.png Visa fil


Binär
VUECODE/smart-operate-manage/src/assets/light2.png Visa fil


Binär
VUECODE/smart-operate-manage/src/assets/light3.png Visa fil


Binär
VUECODE/smart-operate-manage/src/assets/light4.png Visa fil


+ 2
- 2
VUECODE/smart-operate-manage/src/components/chart/chart1.vue Visa fil

@@ -64,7 +64,7 @@ export default {
64 64
       })
65 65
       chart.guide().html({
66 66
         position: ['50%', '50%'],
67
-        html: '<div class="g2-guide-html"><p class="title">总计</p><p class="value">500</p></div>'
67
+        html: '<div class="g2-guide-html"><p class="title">总计</p><p class="value">200</p></div>'
68 68
       })
69 69
       chart.guide().html({
70 70
         position: ['50%', '-10%'],
@@ -79,7 +79,7 @@ export default {
79 79
 
80 80
       chart.on('interval:mouseleave', function () {
81 81
         $(".g2-guide-html .title").text('总计')
82
-        $(".g2-guide-html .value").text(500)
82
+        $(".g2-guide-html .value").text(200)
83 83
       })
84 84
       chart.render()
85 85
     }

+ 1
- 1
VUECODE/smart-operate-manage/src/components/chart/chart3.vue Visa fil

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div id="node3">
3
-    <div class="title">日所有小区智能硬件数据统计</div>
3
+    <div class="title">日所有小区智能硬件数据统计</div>
4 4
     <div class="table">
5 5
       <div v-for="(item,index) in arr" :key="index" @mouseover='item.active = true' @mouseout="item.active=false" :class="{active:item.active}">
6 6
         <div>{{item.text}}</div>

+ 82
- 113
VUECODE/smart-operate-manage/src/components/chart/chart4.vue Visa fil

@@ -1,7 +1,23 @@
1 1
 <template>
2 2
   <div id="node4">
3
-    <el-amap ref="map" vid="amapDemo" :center="mapCenter" :zoom="8" class="amap-demo"  :mapStyle='setMapStyle'>
4
-      <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item.position" :icon='item.icon' :title="item.title"></el-amap-marker>
3
+    <div class="top-title">已合作社区分布图</div>
4
+    <el-amap
5
+      ref="map"
6
+      vid="amapDemo"
7
+      :center="mapCenter"
8
+      :zoom="7"
9
+      class="amap-demo"
10
+      :mapStyle="setMapStyle"
11
+    >
12
+      <el-amap-marker
13
+        v-for="(item,index) in markers"
14
+        :key="index"
15
+        :position="item.position"
16
+        :icon="item.icon"
17
+        :title="item.title"
18
+        :offset="item.offset"
19
+        :content="item.content"
20
+      ></el-amap-marker>
5 21
     </el-amap>
6 22
   </div>
7 23
 </template>
@@ -9,7 +25,7 @@
9 25
 <script>
10 26
 // import G2 from '@antv/g2'
11 27
 // import DataSet from '@antv/data-set'
12
-// import $ from 'jquery'
28
+import $ from 'jquery'
13 29
 // import AMapUI from 'AMapUI'
14 30
 import light1 from '@/assets/light1.png'
15 31
 import light2 from '@/assets/light2.png'
@@ -23,134 +39,87 @@ export default {
23 39
       light3,
24 40
       light4,
25 41
       markers: [{
26
-        position: [119.63803900, 32.58482400],
27
-        icon: light1, // 添加 Icon 图标 URL
28
-        title: '悦见山'
42
+        position: [118.633516, 32.069878],
43
+        title: '悦见山',
44
+        offset: [-60, -60],
45
+        content: `<div class='point'>
46
+        <img src='${light1}'>
47
+        <span>悦见山</span>
48
+        </div>`
29 49
       }, {
30
-        position: [118.29096500, 33.92855800],
31
-        icon: light2, // 添加 Icon 图标 URL
32
-        title: '银山'
50
+        position: [117.161777, 34.154014],
51
+        title: '致享城',
52
+        offset: [-60, -60],
53
+        content: `<div class='point'>
54
+        <img src='${light2}'>
55
+        <span>致享城</span>
56
+        </div>`
33 57
       }, {
34
-        position: [120.07075000, 32.43910000],
35
-        icon: light3, // 添加 Icon 图标 URL
36
-        title: '智慧社区'
58
+        position: [118.753086, 31.972501],
59
+        title: '智慧社区',
60
+        offset: [-60, -60],
61
+        content: `<div class='point'>
62
+        <img src='${light3}'>
63
+        <span>智慧社区</span>
64
+        </div>`
37 65
       }, {
38
-        position: [118.79317400, 32.07443900],
39
-        icon: light4, // 添加 Icon 图标 URL
40
-        title: '帝景天誉'
66
+        position: [120.064082, 30.343891],
67
+        title: '云谷天境',
68
+        offset: [-60, -60],
69
+        content: `<div class='point'>
70
+        <img src='${light4}'>
71
+        <span>云谷天境</span>
72
+        </div>`
41 73
       }],
42
-      mapCenter: [119.63803900, 32.58482400],
74
+      mapCenter: [118.753086, 31.972501],
43 75
       setMapStyle: 'amap://styles/blue'
44 76
     }
45 77
   },
46 78
   mounted () {
47
-    this.rander()
79
+    setInterval(() => {
80
+      this.rander()
81
+    }, 1600)
48 82
   },
49 83
   methods: {
50 84
     rander () {
51
-      // AMap.plugin('AMap.DistrictLayer', function () {//异步加载插件
52
-      //   var DistrictLayer = new AMap.DistrictLayer();
53
-      //   map.addControl(DistrictLayer);
54
-      // });
55
-      // var adCode = 320000;
56
-      // var depth = 2;
57
-      // var map = new AMap.Map("node4", {
58
-      //   zoom: 8,
59
-      //   center: [119.63803900, 32.58482400],
60
-      //   pitch: 0,
61
-      //   viewMode: '3D',
62
-      // });
63
-
64
-      // // 创建省份图层
65
-      // var disProvince;
66
-      // function initPro (code, dep) {
67
-      //   dep = typeof dep == 'undefined' ? 2 : dep;
68
-      //   adCode = code;
69
-      //   depth = dep;
70
-
71
-      //   disProvince && disProvince.setMap(null);
72
-
73
-      //   disProvince = new AMap.DistrictLayer.Province({
74
-      //     zIndex: 12,
75
-      //     adcode: [code],
76
-      //     depth: dep,
77
-      //     styles: {
78
-      //       'fill': function (properties) {
79
-      //         // properties为可用于做样式映射的字段,包含
80
-      //         // NAME_CHN:中文名称
81
-      //         // adcode_pro
82
-      //         // adcode_cit
83
-      //         // adcode
84
-      //         var adcode = properties.adcode;
85
-      //         return getColorByAdcode(adcode);
86
-      //       },
87
-      //       'province-stroke': 'cornflowerblue',
88
-      //       'city-stroke': 'white', // 中国地级市边界
89
-      //       'county-stroke': 'rgba(255,255,255,0.5)' // 中国区县边界
90
-      //     }
91
-      //   });
92
-
93
-      //   disProvince.setMap(map);
94
-      // }
95
-
96
-      // // 颜色辅助方法
97
-      // var colors = {};
98
-      // var getColorByAdcode = function (adcode) {
99
-      //   if (!colors[adcode]) {
100
-      //     var gb = Math.random() * 155 + 50;
101
-      //     colors[adcode] = 'rgb(' + gb + ',' + gb + ',255)';
102
-      //   }
103
-      //   return colors[adcode];
104
-      // }
105
-      // initPro(adCode, depth);
106
-      // map.setMapStyle('amap://styles/blue')
107
-      // var marker1 = new AMap.Marker({
108
-      //   position: new AMap.LngLat(119.63803900, 32.58482400),
109
-      //   offset: new AMap.Pixel(-10, -10),
110
-      //   icon: this.light1, // 添加 Icon 图标 URL
111
-      //   title: '悦见山'
112
-      // });
113
-      // var marker2 = new AMap.Marker({
114
-      //   position: new AMap.LngLat(118.29096500, 33.92855800),
115
-      //   offset: new AMap.Pixel(-10, -10),
116
-      //   icon: this.light2, // 添加 Icon 图标 URL
117
-      //   title: '银山'
118
-      // });
119
-      // var marker3 = new AMap.Marker({
120
-      //   position: new AMap.LngLat(120.07075000, 32.43910000),
121
-      //   offset: new AMap.Pixel(-10, -10),
122
-      //   icon: this.light3, // 添加 Icon 图标 URL
123
-      //   title: '智慧社区'
124
-      // });
125
-      // var marker4 = new AMap.Marker({
126
-      //   position: new AMap.LngLat(119.63803900, 32.58482400),
127
-      //   offset: new AMap.Pixel(-10, -10),
128
-      //   icon: this.light4, // 添加 Icon 图标 URL
129
-      //   title: '帝景天誉'
130
-      // });
131
-      // var markerList = [marker1, marker2, marker3, marker4];
132
-      // map.add(markerList);
85
+      $('.point img').animate({ opacity: 0 }, 800).animate({ opacity: 1 }, 800)
133 86
     }
134 87
   }
135 88
 }
136 89
 </script>
137 90
 
138 91
 <style lang="scss">
139
-#node4 {
140
-  .g2-guide-html {
141
-    color: #a4b6c5;
142
-    .title {
143
-      text-align: "ceter";
144
-    }
145
-    .value {
146
-      text-align: center;
147
-    }
92
+#node4{
93
+  border-radius: 5px;
94
+}
95
+.top-title{
96
+  width: 100%;
97
+  position: absolute;
98
+  top: 0;
99
+  left: 0;
100
+  text-align: center;
101
+  margin-top: 30px;
102
+  z-index: 20;
103
+  color: #A6B9C8;
104
+  font-size: 18px;
105
+}
106
+.point{
107
+  position: relative;
108
+  width: 120px;
109
+  height: 120px;
110
+  img{
111
+    position: absolute;
112
+    top: 50%;
113
+    left: 50%;
114
+    transform: translate(-50%,-50%);
148 115
   }
149
-  .g2-guide-title {
150
-    color: #a4b6c5;
151
-    .title {
152
-      font-size: 16px;
153
-    }
116
+  span{
117
+    position: absolute;
118
+    top: 80%;
119
+    left: 50%;
120
+    transform: translate(-50%,-50%);
121
+    font-size: 12px;
122
+    color: white;
154 123
   }
155 124
 }
156 125
 </style>

+ 41
- 0
VUECODE/smart-operate-manage/src/components/chart/chart5.vue Visa fil

@@ -32,6 +32,30 @@ export default {
32 32
         padding: [80, 20, 30, 40]
33 33
       });
34 34
       chart.source(data);
35
+      console.log(chart)
36
+      chart.axis('xField', {
37
+        line: {
38
+          lineWidth: 1, // 设置线的宽度
39
+          stroke: 'red', // 设置线的颜色
40
+          lineDash: [3, 3] // 设置虚线样
41
+        },
42
+        tickLine: {
43
+          lineWidth: 2,
44
+          length: 10,
45
+          stroke: 'red',
46
+          alignWithLabel: true
47
+        },
48
+        label: {
49
+          textStyle: {
50
+            textAlign: 'center', // 文本对齐方向,可取值为: start middle end
51
+            fill: '#fff', // 文本的颜色
52
+            fontSize: '12', // 文本大小
53
+            fontWeight: 'bold', // 文本粗细
54
+            rotate: 30,
55
+            textBaseline: 'top' // 文本基准线,可取 top middle bottom,默认为middle
56
+          },
57
+        }
58
+      });
35 59
       chart.scale('', {
36 60
         tickInterval: 200
37 61
       });
@@ -39,6 +63,11 @@ export default {
39 63
         position: ['5%', '-25%'],
40 64
         html: '<div class="chart5-title"><p class="title">注册用户统计</p></div>'
41 65
       })
66
+      chart.guide().html({
67
+        position: ['90%', '-15%'],
68
+        html: `<div class="chart-right-btn"><span>18/11/27</span>&nbsp;<i class='el-icon-date'></i></div>`
69
+      })
70
+
42 71
       chart.interval().position('type*sales').color('type', function (val) {
43 72
         if (val === '总户数' || val === '家属') {
44 73
           return '#53F9FF';
@@ -58,4 +87,16 @@ export default {
58 87
     color: #a4b6c5;
59 88
   }
60 89
 }
90
+.chart-right-btn{
91
+  padding: 0px 8px;
92
+  display: flex;
93
+  border: 1px solid #a4b6c5;
94
+  border-radius: 9px;
95
+  justify-content: center;
96
+  align-items: center;
97
+  span,i{
98
+    font-size: 10px;
99
+    color: #a4b6c5;
100
+  }
101
+}
61 102
 </style>

+ 4
- 0
VUECODE/smart-operate-manage/src/components/chart/chart6.vue Visa fil

@@ -60,6 +60,10 @@ export default {
60 60
       chart.tooltip({
61 61
         crosshairs: true
62 62
       });
63
+      chart.guide().html({
64
+        position: ['90%', '-15%'],
65
+        html: `<div class="chart-right-btn"><span>日活跃量</span>&nbsp;<i class='el-icon-arrow-down'></i></div>`
66
+      })
63 67
       chart.area().position('year*value').color('type', function (val) { return '#53F9FF' }).shape('smooth');
64 68
       chart.line().position('year*value').color('type', function (val) { return '#53F9FF' }).size(2).shape('smooth');
65 69
       chart.guide().html({

+ 4
- 0
VUECODE/smart-operate-manage/src/components/chart/chart7.vue Visa fil

@@ -36,6 +36,10 @@ export default {
36 36
         position: ['5%', '-25%'],
37 37
         html: '<div class="chart7-title"><p class="title">内容运营统计</p></div>'
38 38
       })
39
+      chart.guide().html({
40
+        position: ['90%', '-15%'],
41
+        html: `<div class="chart-right-btn"><span>发布数量</span>&nbsp;<i class='el-icon-arrow-down'></i></div>`
42
+      })
39 43
       chart.interval().position('type*sales').color('type', function (val) {
40 44
         if (val === '公告') {
41 45
           return '#53F9FF';

+ 1
- 1
VUECODE/smart-operate-manage/src/permission.js Visa fil

@@ -5,7 +5,7 @@ import 'nprogress/nprogress.css'// Progress 进度条样式
5 5
 import { Message } from 'element-ui'
6 6
 import { getToken } from '@/utils/auth' // 验权
7 7
 
8
-const whiteList = ['/login','/index'] // 不重定向白名单
8
+const whiteList = ['/login'] // 不重定向白名单
9 9
 router.beforeEach((to, from, next) => {
10 10
   NProgress.start()
11 11
   if (getToken()) {

+ 1
- 0
VUECODE/smart-operate-manage/src/views/index/index.vue Visa fil

@@ -57,6 +57,7 @@ export default {
57 57
       margin: 8px;
58 58
       background: #2c343a;
59 59
       border-radius: 5px;
60
+      overflow: hidden;
60 61
     }
61 62
   }
62 63
   .middle {

+ 16
- 8
VUECODE/smart-operate-manage/src/views/layout/components/Navbar.vue Visa fil

@@ -1,18 +1,20 @@
1 1
 <template>
2 2
   <el-menu class="navbar" mode="horizontal">
3
-    <hamburger :toggle-click="toggleSideBar" :is-active="sidebar.opened" class="hamburger-container"/>
4
-    <breadcrumb />
3
+    <hamburger
4
+      :toggle-click="toggleSideBar"
5
+      :is-active="sidebar.opened"
6
+      class="hamburger-container"
7
+    />
8
+    <breadcrumb/>
5 9
     <el-dropdown class="avatar-container" trigger="click">
6 10
       <div class="avatar-wrapper">
7
-        <span>{{ userData.userName }}</span>
11
+        <span style="position: relative;top: -15px;right:5px">{{ userData.userName }}</span>
8 12
         <img :src="userData.headPortrait" class="user-avatar" v-if="userData.headPortrait != ''">
9 13
         <i class="el-icon-caret-bottom"/>
10 14
       </div>
11 15
       <el-dropdown-menu slot="dropdown" class="user-dropdown">
12 16
         <router-link class="inlineBlock" to="/">
13
-          <el-dropdown-item>
14
-            首页
15
-          </el-dropdown-item>
17
+          <el-dropdown-item>首页</el-dropdown-item>
16 18
         </router-link>
17 19
         <el-dropdown-item divided>
18 20
           <span style="display:block;" @click="logout">注销</span>
@@ -40,10 +42,10 @@ export default {
40 42
     ])
41 43
   },
42 44
   methods: {
43
-    toggleSideBar() {
45
+    toggleSideBar () {
44 46
       this.$store.dispatch('ToggleSideBar')
45 47
     },
46
-    logout() {
48
+    logout () {
47 49
       this.$store.dispatch('LogOut').then(() => {
48 50
         location.reload() // 为了重新实例化vue-router对象 避免bug
49 51
       })
@@ -57,11 +59,14 @@ export default {
57 59
   height: 50px;
58 60
   line-height: 50px;
59 61
   border-radius: 0px !important;
62
+  background-color:#1f2d3d;
63
+  border: 0px;
60 64
   .hamburger-container {
61 65
     line-height: 58px;
62 66
     height: 50px;
63 67
     float: left;
64 68
     padding: 0 10px;
69
+    color: #fff;
65 70
   }
66 71
   .screenfull {
67 72
     position: absolute;
@@ -90,6 +95,9 @@ export default {
90 95
         font-size: 12px;
91 96
       }
92 97
     }
98
+    span{
99
+      color: #fff;
100
+    }
93 101
   }
94 102
 }
95 103
 </style>

+ 35
- 8
VUECODE/smart-operate-manage/src/views/login/index.vue Visa fil

@@ -1,13 +1,30 @@
1 1
 <template>
2 2
   <div class="login-container">
3
-    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
4
-      <img src="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1543283673332.png?Expires=1545111060&OSSAccessKeyId=LTAIkc75dpkJw8Lb&Signature=HqQy2E2tWJ4Vbc8HClE3jqPTx0s%3D">
3
+    <el-form
4
+      ref="loginForm"
5
+      :model="loginForm"
6
+      :rules="loginRules"
7
+      class="login-form"
8
+      auto-complete="on"
9
+      label-position="left"
10
+    >
11
+      <div class="logo">
12
+        <img
13
+          src="http://jingcheng-h5temp.oss-cn-shanghai.aliyuncs.com/1543283673332.png?Expires=1545111060&OSSAccessKeyId=LTAIkc75dpkJw8Lb&Signature=HqQy2E2tWJ4Vbc8HClE3jqPTx0s%3D"
14
+        >
15
+      </div>
5 16
       <h3 class="title">智慧社区运营系统</h3>
6 17
       <el-form-item prop="username">
7 18
         <span class="svg-container">
8
-          <svg-icon icon-class="user" />
19
+          <svg-icon icon-class="user"/>
9 20
         </span>
10
-        <el-input v-model="loginForm.username" name="username" type="text" auto-complete="on" placeholder="请输入手机号" />
21
+        <el-input
22
+          v-model="loginForm.username"
23
+          name="username"
24
+          type="text"
25
+          auto-complete="on"
26
+          placeholder="请输入手机号"
27
+        />
11 28
       </el-form-item>
12 29
       <div class="pwdSend">
13 30
         <el-form-item prop="password">
@@ -17,13 +34,17 @@
17 34
             type="text"
18 35
             auto-complete="on"
19 36
             placeholder="请输入验证码"
20
-            @keyup.enter.native="handleLogin" />
37
+            @keyup.enter.native="handleLogin"
38
+          />
21 39
         </el-form-item>
22 40
         <el-button type="primary" @click="sendCode();">发送验证码</el-button>
23 41
       </div>
24
-      <el-button :loading="loading" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
25
-        登录
26
-      </el-button>
42
+      <el-button
43
+        :loading="loading"
44
+        type="primary"
45
+        style="width:100%;"
46
+        @click.native.prevent="handleLogin"
47
+      >登录</el-button>
27 48
     </el-form>
28 49
   </div>
29 50
 </template>
@@ -135,6 +156,12 @@ $light_gray: #eee;
135 156
 </style>
136 157
 
137 158
 <style rel="stylesheet/scss" lang="scss" scoped>
159
+.logo{
160
+  text-align:center;
161
+  img{
162
+    margin-bottom:10px;
163
+  }
164
+}
138 165
 $bg: #2d3a4b;
139 166
 $dark_gray: #889aa4;
140 167
 $light_gray: #eee;