1711193168@qq.com 5 vuotta sitten
vanhempi
commit
faa59a332d

+ 1 - 0
package.json

@@ -8,6 +8,7 @@
     "lint": "vue-cli-service lint"
   },
   "dependencies": {
+    "axios": "^0.19.0",
     "babel-polyfill": "^6.26.0",
     "core-js": "^2.6.5",
     "echarts": "^4.3.0",

+ 58 - 0
src/api/api.js

@@ -0,0 +1,58 @@
+/*
+ * @Author: mozhuangru
+ * @LastEditors: mozhuangru
+ * @Description: 数据大屏
+ * @Date: 2019-10-09 09:22:49
+ * @LastEditTime: 2019-10-09 14:07:29
+ */
+import axios from '../assets/js/api.request'
+export default {
+  // 资产/任务等数量统计 {communityId entCode}
+  getAssetInfo (data) {
+    return axios.request({
+      url: '/platform/dataScreen/sum',
+      params: data,
+      method: 'get'
+    })
+  },
+  // 智能门禁 {pageSize pageNum entCode communityId}
+  getFacePassRecord (data) {
+    return axios.request({
+      url: '/platform/dataScreen/facePassRecord',
+      params: data,
+      method: 'get'
+    })
+  },
+  // 智能停车 {pageSize pageNum entCode communityId}
+  getTrafficRecord (data) {
+    return axios.request({
+      url: '/platform/dataScreen/trafficRecord',
+      params: data,
+      method: 'get'
+    })
+  },
+  // 账单统计 {entCode communityId}
+  getBillSum (data) {
+    return axios.request({
+      url: '/platform/dataScreen/billSum',
+      params: data,
+      method: 'get'
+    })
+  },
+  // 账单按月统计 {entCode communityId}
+  getBillSumMonth (data) {
+    return axios.request({
+      url: '/platform/dataScreen/receivedSumByMonth',
+      params: data,
+      method: 'get'
+    })
+  },
+  // 报事报修列表 {entCode communityId}
+  getDialogRecord (data) {
+    return axios.request({
+      url: '/platform/dataScreen/dialogRecord',
+      params: data,
+      method: 'get'
+    })
+  }
+}

+ 11 - 0
src/api/index.js

@@ -0,0 +1,11 @@
+/*
+ * @Author: mozhuangru
+ * @LastEditors: mozhuangru
+ * @Description: api
+ * @Date: 2019-10-09 09:21:46
+ * @LastEditTime: 2019-10-09 09:55:16
+ */
+import api from './api'
+export {
+  api
+}

+ 2 - 2
src/assets/js/axios.js

@@ -1,9 +1,9 @@
 /*
  * @Author: WangQiBiao
- * @LastEditors: WangQiBiao
+ * @LastEditors: mozhuangru
  * @Description:
  * @Date: 2019-03-12 09:40:46
- * @LastEditTime: 2019-10-08 16:54:04
+ * @LastEditTime: 2019-10-09 10:22:51
  */
 import axios from 'axios'
 import { Loading, Message } from 'element-ui'

+ 25 - 14
src/views/index/components/communication/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: WangQiBiao
  * @Date: 2019-09-25 14:10:08
- * @LastEditors: WangQiBiao
- * @LastEditTime: 2019-09-26 17:41:29
+ * @LastEditors: mozhuangru
+ * @LastEditTime: 2019-10-09 14:21:37
  * @Description: 在线沟通
  -->
 <template>
@@ -14,14 +14,16 @@
     </div>
     <div class="linst-line"></div>
     <div class="list">
-      <div class="list-item" v-for="(item, idx) in 20" :key="idx">
+      <div class="list-item" v-for="(item, idx) in dialogData" :key="idx">
         <div class="list-item-lf">
-          <TagCom type="time">20:12</TagCom>
-          <span class="list-item-txt">刘**通过小区大门</span>
+          <TagCom type="time">{{item.createAt}}</TagCom>
+          <span class="list-item-txt">{{item.content}}</span>
         </div>
         <div class="list-item-lr">
-          <TagCom v-if="idx % 2 == 0" type="advice">建议</TagCom>
-          <TagCom v-else type="praise">表扬</TagCom>
+          <TagCom v-if="item.label === '建议'" type="advice">建议</TagCom>
+          <TagCom v-if="item.label === '表扬'" type="praise">表扬</TagCom>
+          <TagCom v-if="item.label === '投诉'" type="complaints">投诉</TagCom>
+          <TagCom v-if="item.label === '咨询'" type="consulting">咨询</TagCom>
         </div>
       </div>
     </div>
@@ -31,12 +33,21 @@
 import TitleCom from '@/components/title'
 import TagCom from '@/components/tag'
 import echarts from 'echarts'
+import { api } from '@/api'
 export default {
+  data () {
+    return {
+      dialogData: []
+    }
+  },
   components: {
     TitleCom,
     TagCom
   },
   mounted () {
+    api.getDialogRecord().then(res => {
+      this.dialogData = res.data.data.list
+    })
     this.circleProportionMap()
     this.createSatisfactionMap()
   },
@@ -70,7 +81,7 @@ export default {
             },
             data: [
               {
-                value: 310,
+                value: 1652,
                 name: '咨询',
                 label: {
                   show: true,
@@ -81,7 +92,7 @@ export default {
                 }
               },
               {
-                value: 235,
+                value: 2462,
                 name: '投诉',
                 label: {
                   show: true,
@@ -92,7 +103,7 @@ export default {
                 }
               },
               {
-                value: 274,
+                value: 591,
                 name: '建议',
                 label: {
                   show: true,
@@ -103,7 +114,7 @@ export default {
                 }
               },
               {
-                value: 335,
+                value: 350,
                 name: '表扬',
                 label: {
                   show: true,
@@ -152,14 +163,14 @@ export default {
             },
             data: [
               {
-                value: 335,
-                name: '50%',
+                value: 83.2,
+                name: '83.2%',
                 itemStyle: {
                   color: '#07E144'
                 }
               },
               {
-                value: 310,
+                value: 16.8,
                 itemStyle: {
                   color: '#262795'
                 }

+ 21 - 7
src/views/index/components/entrance-guard/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: WangQiBiao
  * @Date: 2019-09-25 10:20:36
- * @LastEditors: WangQiBiao
- * @LastEditTime: 2019-09-26 15:37:52
+ * @LastEditors: mozhuangru
+ * @LastEditTime: 2019-10-09 11:43:35
  * @Description: 智能门禁
  -->
 <template>
@@ -11,18 +11,18 @@
     <div class="tips">
       <img class="tips-logo" src="./images/zhnmj@3x.png" alt="">
       <div class="tips-desc">
-        <span class="tips-desc-txt">{{43213 | numberFormat}}</span>
+        <span class="tips-desc-txt">{{faceData.total | numberFormat}}</span>
         <span class="tips-desc-unit"> 人次</span>
       </div>
     </div>
     <div class="list">
-      <div class="list-item" v-for="(item, idx) in 20" :key="idx">
+      <div class="list-item" v-for="(item, idx) in faceData.list" :key="idx">
         <div class="list-item-lf">
-          <TagCom type="time">20:12</TagCom>
-          <span class="list-item-txt">刘**通过小区大门</span>
+          <TagCom type="time">{{item.createAt}}</TagCom>
+          <span class="list-item-txt">{{item.content}}</span>
         </div>
         <div class="list-item-lr">
-          <TagCom type="house">蓝岛康城</TagCom>
+          <TagCom type="house">{{item.label}}</TagCom>
         </div>
       </div>
     </div>
@@ -31,10 +31,24 @@
 <script>
 import TitleCom from '@/components/title'
 import TagCom from '@/components/tag'
+import { api } from '@/api'
 export default {
+  data () {
+    return {
+      faceData: {}
+    }
+  },
   components: {
     TitleCom,
     TagCom
+  },
+  mounted () {
+    api.getFacePassRecord({
+      pageSize: 30,
+      pageNum: 1
+    }).then(res => {
+      this.faceData = res.data.data
+    })
   }
 }
 </script>

+ 22 - 8
src/views/index/components/income/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: WangQiBiao
  * @Date: 2019-09-26 10:57:30
- * @LastEditors: WangQiBiao
- * @LastEditTime: 2019-09-26 17:56:18
+ * @LastEditors: mozhuangru
+ * @LastEditTime: 2019-10-11 10:05:50
  * @Description: 收入统计
  -->
 <template>
@@ -10,18 +10,18 @@
     <div class="panel b1">
       <div class="panel-icon"></div>
       <div class="panel-txt">应收</div>
-      <div class="panel-desc">¥{{11156046 | moneyFormat}}</div>
+      <div class="panel-desc">¥{{billSum.billReceivable | moneyFormat}}</div>
     </div>
     <div class="panel b2">
       <div class="panel-icon"></div>
       <div class="panel-txt">实收</div>
-      <div class="panel-desc">¥{{1115600046 | moneyFormat}}</div>
+      <div class="panel-desc">¥{{billSum.billReceived | moneyFormat}}</div>
     </div>
     <div class="map" id="mapId"></div>
     <div class="progress">
       <div class="desc">
         <div class="desc-lf">收费率</div>
-        <div class="desc-lr">{{percentage}}%</div>
+        <div class="desc-lr">{{billSum.billRate}}%</div>
       </div>
       <el-progress
         :percentage="percentage"
@@ -34,14 +34,28 @@
 </template>
 <script>
 import echarts from 'echarts'
+import { api } from '@/api'
+
 export default {
   data () {
     return {
+      billSum: {
+        billReceivable: '',
+        billReceived: '',
+        billOnline: '',
+        billUnderline: '',
+        billRate: ''
+      },
       percentage: 98.4
     }
   },
   mounted () {
-    this.createIncomeMap()
+    api.getBillSum().then(res => {
+      res.data.data.forEach(item => {
+        this.billSum[item.type] = item.total
+      })
+      this.createIncomeMap()
+    })
   },
   methods: {
     /**
@@ -72,7 +86,7 @@ export default {
             },
             data: [
               {
-                value: 5132432,
+                value: this.billSum.billOnline,
                 name: '线上',
                 label: {
                   show: true,
@@ -89,7 +103,7 @@ export default {
                 }
               },
               {
-                value: 431212,
+                value: this.billSum.billUnderline,
                 name: '线下',
                 label: {
                   show: true,

+ 20 - 31
src/views/index/components/paid-in/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: WangQiBiao
  * @Date: 2019-09-26 08:46:04
- * @LastEditors: WangQiBiao
- * @LastEditTime: 2019-09-26 11:02:16
+ * @LastEditors: mozhuangru
+ * @LastEditTime: 2019-10-11 10:24:41
  * @Description: 近1年应实收统计
  -->
 <template>
@@ -20,45 +20,34 @@
 import TitleCom from '@/components/title'
 import IncomeCom from './../income'
 import echarts from 'echarts'
+import { api } from '@/api'
 export default {
+  data () {
+    return {
+      yearTotal: []
+    }
+  },
   components: {
     TitleCom,
     IncomeCom
   },
   mounted () {
-    this.createMapPaid()
+    api.getBillSumMonth().then(res => {
+      this.yearTotal = res.data.data
+      this.createMapPaid()
+    })
   },
   methods: {
     createMapPaid () {
       var myChart = echarts.init(document.getElementById('paid'))
-      var dataAxis = [
-        '2018.12',
-        '2019.01',
-        '2019.02',
-        '2019.03',
-        '2019.04',
-        '2019.05',
-        '2019.06',
-        '2019.07',
-        '2019.08',
-        '2019.09',
-        '2019.10',
-        '2019.11'
-      ]
-      var data = [
-        220,
-        182,
-        191,
-        234,
-        290,
-        330,
-        310,
-        123,
-        442,
-        321,
-        2000,
-        900
-      ]
+      var dataAxis = []
+      var data = []
+      if (this.yearTotal && this.yearTotal.length !== 0) {
+        this.yearTotal.forEach(item => {
+          dataAxis.push(item.type)
+          data.push(item.total)
+        })
+      }
       var option = {
         name: '近1年应实收统计',
         legendHoverLink: true,

+ 21 - 7
src/views/index/components/parking/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: WangQiBiao
  * @Date: 2019-09-25 10:20:36
- * @LastEditors: WangQiBiao
- * @LastEditTime: 2019-09-26 15:38:29
+ * @LastEditors: mozhuangru
+ * @LastEditTime: 2019-10-09 11:43:05
  * @Description: 智能停车
  -->
 <template>
@@ -11,18 +11,18 @@
     <div class="tips">
       <img class="tips-logo" src="./images/zhntch@3x.png" alt="">
       <div class="tips-desc">
-        <span class="tips-desc-txt">{{1145689 | numberFormat}}</span>
+        <span class="tips-desc-txt">{{parkData.total | numberFormat}}</span>
         <span class="tips-desc-unit"> 车次</span>
       </div>
     </div>
     <div class="list">
-      <div class="list-item" v-for="(item, idx) in 20" :key="idx">
+      <div class="list-item" v-for="(item, idx) in parkData.list" :key="idx">
         <div class="list-item-lf">
-          <TagCom type="time">20:12</TagCom>
-          <span class="list-item-txt">刘**通过小区大门</span>
+          <TagCom type="time">{{item.createAt}}</TagCom>
+          <span class="list-item-txt">{{item.content}}</span>
         </div>
         <div class="list-item-lr">
-          <TagCom type="house">蓝岛康城</TagCom>
+          <TagCom type="house">{{item.label}}</TagCom>
         </div>
       </div>
     </div>
@@ -31,10 +31,24 @@
 <script>
 import TitleCom from '@/components/title'
 import TagCom from '@/components/tag'
+import { api } from '@/api'
 export default {
+  data () {
+    return {
+      parkData: {}
+    }
+  },
   components: {
     TitleCom,
     TagCom
+  },
+  mounted () {
+    api.getTrafficRecord({
+      pageSize: 30,
+      pageNum: 1
+    }).then(res => {
+      this.parkData = res.data.data
+    })
   }
 }
 </script>

+ 6 - 6
src/views/index/components/record/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: WangQiBiao
  * @Date: 2019-09-26 14:11:25
- * @LastEditors: WangQiBiao
- * @LastEditTime: 2019-09-26 17:59:54
+ * @LastEditors: mozhuangru
+ * @LastEditTime: 2019-10-09 09:08:41
  * @Description:
  -->
 <template>
@@ -14,7 +14,7 @@
           <img class="list-item-icon" src="./images/shb@3x.png" alt="">
         </div>
         <div class="list-item-desc">
-          <span>{{412343 | numberFormat}}</span>
+          <span>{{2143 | numberFormat}}</span>
           <span class="desc-tips">次</span>
         </div>
         <div class="list-item-txt">设备巡检</div>
@@ -25,7 +25,7 @@
           <img class="list-item-icon" src="./images/baoan@3x.png" alt="">
         </div>
         <div class="list-item-desc">
-          <span>{{134132 | numberFormat}}</span>
+          <span>{{25316 | numberFormat}}</span>
           <span class="desc-tips">次</span>
         </div>
         <div class="list-item-txt">安防巡逻</div>
@@ -36,7 +36,7 @@
           <img class="list-item-icon" src="./images/baojie@3x.png" alt="">
         </div>
         <div class="list-item-desc">
-          <span>{{413213 | numberFormat}}</span>
+          <span>{{3218 | numberFormat}}</span>
           <span class="desc-tips">次</span>
         </div>
         <div class="list-item-txt">保洁登记</div>
@@ -47,7 +47,7 @@
           <img class="list-item-icon" src="./images/renwu@3x.png" alt="">
         </div>
         <div class="list-item-desc">
-          <span>{{542353 | numberFormat}}</span>
+          <span>{{38765 | numberFormat}}</span>
           <span class="desc-tips">次</span>
         </div>
         <div class="list-item-txt">任务执行</div>

+ 14 - 14
src/views/index/components/repair/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: WangQiBiao
  * @Date: 2019-09-25 17:54:01
- * @LastEditors: WangQiBiao
- * @LastEditTime: 2019-09-26 17:54:43
+ * @LastEditors: mozhuangru
+ * @LastEditTime: 2019-10-09 08:51:19
  * @Description: 住户报修
  -->
 <template>
@@ -29,22 +29,22 @@
         <div class="map-tips-item b1">
           <div class="map-tips-item-w"></div>
           <div class="map-tips-item-txt">待受理</div>
-          <div class="map-tips-item-p">{{125 | numberFormat}}</div>
+          <div class="map-tips-item-p">{{320 | numberFormat}}</div>
         </div>
         <div class="map-tips-item b2">
           <div class="map-tips-item-w"></div>
           <div class="map-tips-item-txt">已受理</div>
-          <div class="map-tips-item-p">{{1576 | numberFormat}}</div>
+          <div class="map-tips-item-p">{{653 | numberFormat}}</div>
         </div>
         <div class="map-tips-item b3">
           <div class="map-tips-item-w"></div>
           <div class="map-tips-item-txt">已解决</div>
-          <div class="map-tips-item-p">{{2376 | numberFormat}}</div>
+          <div class="map-tips-item-p">{{4654 | numberFormat}}</div>
         </div>
         <div class="map-tips-item b4">
           <div class="map-tips-item-w"></div>
           <div class="map-tips-item-txt">已评价</div>
-          <div class="map-tips-item-p">{{1245 | numberFormat}}</div>
+          <div class="map-tips-item-p">{{312 | numberFormat}}</div>
         </div>
       </div>
     </div>
@@ -84,29 +84,29 @@ export default {
             },
             data: [
               {
-                value: 335,
-                name: '待受理  125',
+                value: 320,
+                name: '待受理  320',
                 itemStyle: {
                   color: '#F9AF09'
                 }
               },
               {
-                value: 335,
-                name: '已受理  1576',
+                value: 653,
+                name: '已受理  653',
                 itemStyle: {
                   color: '#0996FE'
                 }
               },
               {
-                value: 335,
-                name: '已解决  2376',
+                value: 4654,
+                name: '已解决  4654',
                 itemStyle: {
                   color: '#00C738'
                 }
               },
               {
-                value: 335,
-                name: '已评价  1245',
+                value: 312,
+                name: '已评价  312',
                 itemStyle: {
                   color: '#0BDCE5'
                 }

+ 20 - 2
src/views/index/components/statistical/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: WangQiBiao
  * @Date: 2019-09-24 18:56:59
- * @LastEditors: WangQiBiao
- * @LastEditTime: 2019-09-26 18:36:13
+ * @LastEditors: mozhuangru
+ * @LastEditTime: 2019-10-09 11:26:11
  * @Description:
  -->
 <template>
@@ -15,6 +15,7 @@
 </template>
 <script>
 import TipsCardCom from '@/components/tips-card'
+import { api } from '@/api'
 export default {
   data () {
     return {
@@ -22,26 +23,31 @@ export default {
         {
           label: '物业面积(m^2)',
           cls: 'mianzhi',
+          key: 'propertyArea',
           value: '434123452'
         },
         {
           label: '物业项目(个)',
           cls: 'xiangmu',
+          key: 'propertyProject',
           value: '521331'
         },
         {
           label: '房屋(套)',
           cls: 'fangwu',
+          key: 'house',
           value: '6342531'
         },
         {
           label: '住户(人)',
           cls: 'zhuhu',
+          key: 'resident',
           value: '93834123'
         },
         {
           label: '车辆(辆)',
           cls: 'cheliang',
+          key: 'car',
           value: '7431243'
         }
       ]
@@ -49,6 +55,18 @@ export default {
   },
   components: {
     TipsCardCom
+  },
+  mounted () {
+    api.getAssetInfo().then(res => {
+      res.data.data.forEach(item => {
+        this.list.map(val => {
+          if (val.key === item.type) {
+            val.value = item.total
+          }
+          return val
+        })
+      })
+    })
   }
 }
 </script>

+ 3 - 3
src/views/login/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: WangQiBiao
  * @Date: 2019-10-08 15:33:28
- * @LastEditors: WangQiBiao
- * @LastEditTime: 2019-10-08 16:31:25
+ * @LastEditors: mozhuangru
+ * @LastEditTime: 2019-10-09 11:14:28
  * @Description: 登录
  -->
 <template>
@@ -34,7 +34,7 @@ export default {
           { required: true, message: '请输入账号' }
         ],
         pwd: [
-          { required: true, message: '输入密码' }
+          { required: true, message: '输入密码' }
         ]
       },
       whiteUser: ['wisdomcity', 'wisdomcity2019'], // 白名单账号

+ 55 - 0
vue.config.js

@@ -0,0 +1,55 @@
+/*
+ * @Author: WangQiBiao
+ * @LastEditors: mozhuangru
+ * @Description: 配置文件
+ * @Date: 2019-03-02 14:21:27
+ * @LastEditTime: 2019-10-09 11:09:27
+ */
+const path = require('path')
+
+const resolve = dir => {
+  return path.join(__dirname, dir)
+}
+const BASE_URL = process.env.NODE_ENV === 'production' ? '/' : '/'
+const ramdom = parseInt(Math.random() * 10000) // 随机数
+
+module.exports = {
+  publicPath: BASE_URL,
+  lintOnSave: true,
+  configureWebpack: { // 解决发版更新浏览器缓存没有更新的问题
+    output: {
+      filename: `[name].[hash].${ramdom}.js`,
+      chunkFilename: `[name].[hash].${ramdom}.js`
+    }
+  },
+  chainWebpack: config => {
+    config.resolve.alias
+      .set('@', resolve('src'))
+      .set('_c', resolve('src/components'))
+      .set('_vc', resolve('src/view/components'))
+      .set('_conf', resolve('config'))
+  },
+  // 打包时不生成.map文件
+  productionSourceMap: false,
+  // 这里写你调用接口的基础路径,来解决跨域,如果设置了代理,那你本地开发环境的axios的baseUrl要写为 '' ,即空字符串
+  devServer: {
+    proxy: {
+      '/api': {
+        target: 'http://139.159.229.250:8161', // 对应自己的接口
+        changeOrigin: true,
+        ws: false,
+        pathRewrite: {
+          '^/api': ''
+        }
+      }
+    },
+    overlay: { // 错误信息显示到浏览器上
+      warnings: true,
+      errors: true
+    }
+  },
+  css: {
+    // 开启样式追溯
+    sourceMap: true
+  }
+}