Browse Source

Merge branch 'deploy_daping' of chelingzhu-web/zxyj-admin-html into master

李文文 4 years ago
parent
commit
ef450e9a82
39 changed files with 3065 additions and 243 deletions
  1. 1 1
      .env
  2. 73 3
      package-lock.json
  3. 2 0
      package.json
  4. 1 1
      public/index.html
  5. BIN
      public/ldt.png
  6. 89 0
      src/api/borard.js
  7. 59 0
      src/api/collector.js
  8. 44 0
      src/api/reportForm.js
  9. 1 1
      src/api/station.js
  10. 10 0
      src/api/userManage.js
  11. BIN
      src/assets/dataViewBg.png
  12. BIN
      src/assets/headBg.png
  13. 1 1
      src/components/GlobalHeader/GlobalHeader.vue
  14. 66 0
      src/config/router.config.js
  15. 7 8
      src/layouts/BasicLayout.vue
  16. 11 4
      src/layouts/PageView.vue
  17. 4 0
      src/libs/getDate.js
  18. 9 2
      src/main.js
  19. 2 3
      src/views/businessManage/partnerManage/partnerManage.vue
  20. 150 95
      src/views/businessManage/userManage/userManage.vue
  21. 2 2
      src/views/cleanManage/cleanDetail.vue
  22. 1 1
      src/views/cleanManage/cleanDetailModal.vue
  23. 1 1
      src/views/cleanManage/netWorkCleanModal.vue
  24. 2 2
      src/views/cleanManage/netWorkCleanRecord.vue
  25. 16 16
      src/views/cleanManage/notCleanNetwork.vue
  26. 5 5
      src/views/cleanManage/statisticalReport.vue
  27. 1219 0
      src/views/dataView/borard.vue
  28. 159 0
      src/views/equipmentManage/collector/addCollector.vue
  29. 274 0
      src/views/equipmentManage/collector/collector.vue
  30. 92 9
      src/views/equipmentManage/equipment/equipment.vue
  31. 16 1
      src/views/equipmentManage/labelSetting/addLabelSetting.vue
  32. 87 25
      src/views/equipmentManage/network/editModal.vue
  33. 28 6
      src/views/equipmentManage/network/network.vue
  34. 3 3
      src/views/reportForm/rubbishDeliveryTotal.vue
  35. 243 0
      src/views/reportForm/unRecyclableRubbishDetails.vue
  36. 295 0
      src/views/reportForm/unRecyclableRubbishTotal.vue
  37. 9 0
      src/views/userInfo/userDetails.vue
  38. 82 52
      src/views/userInfo/userManageList.vue
  39. 1 1
      vue.config.js

+ 1 - 1
.env

@@ -1,5 +1,5 @@
 NODE_ENV=production
 VUE_APP_PREVIEW=false
-VUE_APP_API_BASE_URL=https://lese.sxzxyj.net/gc-admin
+VUE_APP_API_BASE_URL=https://lese.zyucgj.cn/gc-admin
 VUE_APP_VERSION=V1.0.1
 VUE_APP_PRO_NAME=智享亿家后台

+ 73 - 3
package-lock.json

@@ -995,7 +995,6 @@
       "version": "7.6.3",
       "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.3.tgz",
       "integrity": "sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA==",
-      "dev": true,
       "requires": {
         "regenerator-runtime": "^0.13.2"
       },
@@ -1003,8 +1002,7 @@
         "regenerator-runtime": {
           "version": "0.13.3",
           "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz",
-          "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==",
-          "dev": true
+          "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw=="
         }
       }
     },
@@ -1132,6 +1130,59 @@
         "postcss": "^7.0.0"
       }
     },
+    "@jiaminghi/bezier-curve": {
+      "version": "0.0.9",
+      "resolved": "https://registry.npmjs.org/@jiaminghi/bezier-curve/-/bezier-curve-0.0.9.tgz",
+      "integrity": "sha512-u9xJPOEl6Dri2E9FfmJoGxYQY7vYJkURNX04Vj64tdi535tPrpkuf9Sm0lNr3QTKdHQh0DdNRsaa62FLQNQEEw==",
+      "requires": {
+        "@babel/runtime": "^7.5.5"
+      }
+    },
+    "@jiaminghi/c-render": {
+      "version": "0.4.3",
+      "resolved": "https://registry.npmjs.org/@jiaminghi/c-render/-/c-render-0.4.3.tgz",
+      "integrity": "sha512-FJfzj5hGj7MLqqqI2D7vEzHKbQ1Ynnn7PJKgzsjXaZpJzTqs2Yw5OSeZnm6l7Qj7jyPAP53lFvEQNH4o4j6s+Q==",
+      "requires": {
+        "@babel/runtime": "^7.5.5",
+        "@jiaminghi/bezier-curve": "*",
+        "@jiaminghi/color": "*",
+        "@jiaminghi/transition": "*"
+      }
+    },
+    "@jiaminghi/charts": {
+      "version": "0.2.18",
+      "resolved": "https://registry.npmjs.org/@jiaminghi/charts/-/charts-0.2.18.tgz",
+      "integrity": "sha512-K+HXaOOeWG9OOY1VG6M4mBreeeIAPhb9X+khG651AbnwEwL6G2UtcAQ8GWCq6GzhczcLwwhIhuaHqRygwHC0sA==",
+      "requires": {
+        "@babel/runtime": "^7.5.5",
+        "@jiaminghi/c-render": "^0.4.3"
+      }
+    },
+    "@jiaminghi/color": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/@jiaminghi/color/-/color-0.1.1.tgz",
+      "integrity": "sha512-M09+Sb5HGqVim0zo+nG5gU1v+6gXT8ptr0BZR6dMGt83XmCJgnZtO8s7llTW4hLFFFM5co6geZvTekqLpSPAAQ==",
+      "requires": {
+        "@babel/runtime": "^7.5.5"
+      }
+    },
+    "@jiaminghi/data-view": {
+      "version": "2.10.0",
+      "resolved": "https://registry.npmjs.org/@jiaminghi/data-view/-/data-view-2.10.0.tgz",
+      "integrity": "sha512-Cud2MTiMcqc5k2KWabR/svuVQmXHANqURo+yj40370/LdI/gyUJ6LG203hWXEnT1nMCeiv/SLVmxv3PXLScCeA==",
+      "requires": {
+        "@babel/runtime": "^7.5.5",
+        "@jiaminghi/charts": "*"
+      }
+    },
+    "@jiaminghi/transition": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/@jiaminghi/transition/-/transition-1.1.11.tgz",
+      "integrity": "sha512-owBggipoHMikDHHDW5Gc7RZYlVuvxHADiU4bxfjBVkHDAmmck+fCkm46n2JzC3j33hWvP9nSCAeh37t6stgWeg==",
+      "requires": {
+        "@babel/runtime": "^7.5.5"
+      }
+    },
     "@mrmlnc/readdir-enhanced": {
       "version": "2.2.1",
       "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
@@ -16029,6 +16080,11 @@
       "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=",
       "dev": true
     },
+    "throttle-debounce": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-2.3.0.tgz",
+      "integrity": "sha512-H7oLPV0P7+jgvrk+6mwwwBDmxTaxnu9HMXmloNLXwnNO0ZxZ31Orah2n8lU1eMPvsaowP2CX+USCgyovXfdOFQ=="
+    },
     "through": {
       "version": "2.3.8",
       "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
@@ -16555,6 +16611,15 @@
       "resolved": "https://registry.npmjs.org/v-runtime-template/-/v-runtime-template-1.10.0.tgz",
       "integrity": "sha512-WLlq9jUepSfUrMEenw3mn7FDXX6hhbl11JjC1OKhwLzifHzVrY5a696TUHDPyj9jke3GGnR7b+2T3od/RL5cww=="
     },
+    "v-viewer": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/v-viewer/-/v-viewer-1.5.1.tgz",
+      "integrity": "sha512-Q5ICKzmYQD0qTf+hti2Lhgy6UYY2zgFr+YrN9a3yPgr7pOjYrG405Pz4+6Z6FXlhdhGysCWFJUNCI2tsIyvjWQ==",
+      "requires": {
+        "throttle-debounce": "^2.0.1",
+        "viewerjs": "^1.5.0"
+      }
+    },
     "validate-npm-package-license": {
       "version": "3.0.4",
       "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
@@ -16598,6 +16663,11 @@
         "extsprintf": "^1.2.0"
       }
     },
+    "viewerjs": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/viewerjs/-/viewerjs-1.9.0.tgz",
+      "integrity": "sha512-2D1OdGatb5aCZbZvaCdbJYuoDObjD9ITe7GZp0SoG7rgw3arOIZoIO1ygmfG+I4+RvEuDo+aZ75kNgwmYS9j3w=="
+    },
     "viser": {
       "version": "2.4.6",
       "resolved": "https://registry.npmjs.org/viser/-/viser-2.4.6.tgz",

+ 2 - 0
package.json

@@ -15,6 +15,7 @@
   },
   "dependencies": {
     "@antv/data-set": "^0.10.2",
+    "@jiaminghi/data-view": "^2.10.0",
     "ant-design-vue": "^1.7.1",
     "axios": "^0.19.0",
     "china-division": "^2.3.1",
@@ -29,6 +30,7 @@
     "nprogress": "^0.2.0",
     "qrcode": "^1.4.4",
     "v-runtime-template": "^1.10.0",
+    "v-viewer": "^1.5.1",
     "viser-vue": "^2.4.6",
     "vue": "^2.6.10",
     "vue-clipboard2": "^0.2.1",

+ 1 - 1
public/index.html

@@ -28,6 +28,6 @@
     <script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
     <% } %>
     <!-- built files will be auto injected -->
-    <script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=EZHBZ-FWHWJ-MF4FO-K6DJF-4YNGQ-PJBYF"></script>
+    <script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=EZHBZ-FWHWJ-MF4FO-K6DJF-4YNGQ-PJBYF&libraries=visualization"></script>
   </body>
 </html>

BIN
public/ldt.png


+ 89 - 0
src/api/borard.js

@@ -0,0 +1,89 @@
+import { axios } from '@/utils/request'
+// 新用户注册量
+export const getNewRegister = params => {
+  const url = `/customer/queryRegisterCustomerNumList`
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+// 分时投递记录
+export const getTimeSharingLog = params => {
+  const url = `/putInTimeShareing/queryDeliveryLogInfo`
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+// 获取试点单位数(网点数量)
+export const getDwTotal = params => {
+  const url = `/station/countStationNum`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+// 投递量前五站站点
+export const getDeliveryTop = params => {
+  const url = `/stationRubbish/getSumRubbishDeliveryInfo`
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+// 热力图
+export const getHeatMapData = params => {
+  const url = `/deliveryLog/queryStationInfoWithDeliveryTimes`
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+// 获取当前地区经纬度
+export const getLocationCode = params => {
+  const url = `/station/queryLocationByLocationCode?keyword=${params.keyword}`
+  return axios({
+    url: url,
+    method: 'GET'
+  })
+}
+// 按垃圾类型分类统计垃圾总量 (各分类垃圾量分布)
+export const getRubbishTypeTotal = params => {
+  const url = `/stationRubbish/getSumWeightPercentByRubbishType`
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+// 垃圾产生量
+export const querySumWeight = params => {
+  const url = `/stationRubbish/querySumWeight`
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+// 各机构投递量分布比例
+export const labelWeightPercent = params => {
+  const url = `/stationRubbish/querySumWeightByLabelType`
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+// 设备分布比例
+export const devicePercent = params => {
+  const url = `/device/queryDeviceByLabel`
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}

+ 59 - 0
src/api/collector.js

@@ -0,0 +1,59 @@
+import { axios } from '@/utils/request'
+
+// 获取采集员列表数据
+export const getCollectorList = params => {
+  const url = `stationUser/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+
+// 重置密码
+export const resetPSD = params => {
+  return axios({
+    url: `stationUser/resetPwd/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 改变状态接口
+export const updateEnableStatus = params => {
+  return axios({
+    url: `stationUser/enable/${params.id}/${params.flag}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 删除
+export const delectCollector = params => {
+  return axios({
+    url: `stationUser/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 新增/编辑保存
+export const saveCollector = params => {
+  return axios({
+    url: 'stationUser/save',
+    data: params,
+    method: 'POST'
+  })
+}
+
+// 编辑查详情
+export const collectorDetails = (params) => {
+  const url = `stationUser/getById/${params.id}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'get'
+  })
+}

+ 44 - 0
src/api/reportForm.js

@@ -62,3 +62,47 @@ export const getSumTotal = (params) => {
     method: 'post'
   })
 }
+
+// 非可回收垃圾汇总列表
+export const getRubbishList = (params) => {
+  const url = `stationRubbish/sum/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 非可回收垃圾合计
+export const getRubbishTotal = (params) => {
+  const url = `stationRubbish/totalSumInfo`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 非可回收垃圾明细列表
+export const getRubbishDetailList = (params) => {
+  const url = `gather/detail/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 非可回收垃圾明细合计
+export const getRubbishDetailTotal = (params) => {
+  const url = `gather/detailTotalSum`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 1 - 1
src/api/station.js

@@ -1,7 +1,7 @@
 import { axios } from '@/utils/request'
 
 // 网点列表
-export const stationList = (params) => {
+export const stationListData = (params) => {
   const url = `/station/query/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize

+ 10 - 0
src/api/userManage.js

@@ -74,3 +74,13 @@ export const slelerDetails = (params) => {
     method: 'get'
   })
 }
+
+// 获取用户二维码
+export const qRCode = (params) => {
+  const url = `customer/simpleEncodeUserInfo/${params.id}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'get'
+  })
+}

BIN
src/assets/dataViewBg.png


BIN
src/assets/headBg.png


+ 1 - 1
src/components/GlobalHeader/GlobalHeader.vue

@@ -2,7 +2,7 @@
   <transition name="showHeader">
     <div v-if="visible" class="header-animat">
       <a-layout-header
-        v-if="visible && $store.state.user.nowRouteName!='NodeMap'"
+        v-if="visible && $store.state.user.nowRouteName!='NodeMap'&& $store.state.user.nowRouteName!='dataViewBoard'"
         :class="[fixedHeader && 'ant-header-fixedHeader', sidebarOpened ? 'ant-header-side-opened' : 'ant-header-side-closed', ]"
         :style="{ padding: '0' }">
         <div v-if="mode === 'sidemenu'" class="header">

+ 66 - 0
src/config/router.config.js

@@ -80,6 +80,41 @@ export const asyncRouterMap = [{
       }]
     }]
   },
+  {
+    path: '/dataView',
+    name: 'dataView',
+    redirect: '/dataView',
+    component: PageView,
+    meta: {
+      title: '大数据看板',
+      icon: 'fund',
+      permission: 'M_dataView'
+    },
+    hideChildrenInMenu: true,
+    children: [{
+      path: '/dataView',
+      name: 'dataView',
+      redirect: '/dataView/board',
+      component: RouteView,
+      meta: {
+        title: '大数据看板',
+        icon: 'fund',
+        permission: 'M_dataView'
+      },
+      hideChildrenInMenu: true,
+      children: [{
+        path: '/dataView/board',
+        name: 'dataViewBoard',
+        component: () => import(/* webpackChunkName: "map" */ '@/views/dataView/borard.vue'),
+        meta: {
+          title: '大数据看板',
+          icon: 'fund',
+          hidden: true,
+          hiddenHeaderContent: true
+        }
+      }]
+    }]
+  },
   {
     path: '/shop',
     redirect: '/shop/goods',
@@ -377,6 +412,26 @@ export const asyncRouterMap = [{
         icon: 'snippets',
         permission: 'M_rubbishTotal_list'
       }
+    },
+    {
+      path: '/reportForm/unRecyclableRubbishTotal',
+      name: 'unRecyclableRubbishTotal',
+      component: () => import(/* webpackChunkName: "reportForm" */ '@/views/reportForm/unRecyclableRubbishTotal.vue'),
+      meta: {
+        title: '非可回收垃圾汇总表',
+        icon: 'bar-chart',
+        permission: 'M_unRecyclableTotal_list'
+      }
+    },
+    {
+      path: '/reportForm/unRecyclableRubbishDetails',
+      name: 'unRecyclableRubbishDetails',
+      component: () => import(/* webpackChunkName: "reportForm" */ '@/views/reportForm/unRecyclableRubbishDetails.vue'),
+      meta: {
+        title: '非可回收垃圾明细',
+        icon: 'fund',
+        permission: 'M_unRecyclableDetails_list'
+      }
     }
     ]
   },
@@ -471,6 +526,17 @@ export const asyncRouterMap = [{
         permission: 'M_network_list'
       }
     },
+    {
+      path: '/equipmentManage/collector',
+      name: 'collector',
+      component: () => import(/* webpackChunkName: "equipmentManage" */
+        '@/views/equipmentManage/collector/collector.vue'),
+      meta: {
+        title: '采集员管理',
+        icon: 'team',
+        permission: 'M_collector_list'
+      }
+    },
     {
       path: '/equipmentManage/labelSetting',
       name: 'labelSetting',

+ 7 - 8
src/layouts/BasicLayout.vue

@@ -36,7 +36,7 @@
         @toggle="toggle" />
 
       <!-- layout content -->
-      <a-layout-content :style="{ height: '100%', margin: '24px 24px 0', paddingTop: fixedHeader ? '64px' : '0' }">
+      <a-layout-content :style="{ height: '100%', margin: $store.state.user.nowRouteName!='dataViewBoard'?'24px 24px 0':'0px', paddingTop: fixedHeader ? '64px' : '0' }">
         <multi-tab v-if="multiTab"></multi-tab>
         <transition name="page-transition">
           <route-view />
@@ -44,7 +44,7 @@
       </a-layout-content>
 
       <!-- layout footer -->
-      <a-layout-footer>
+      <a-layout-footer v-if="$store.state.user.nowRouteName!='dataViewBoard'">
         <global-footer />
       </a-layout-footer>
 
@@ -114,16 +114,15 @@ export default {
   },
   watch: {
     sidebarOpened (val) {
-      // console.log(this.$store.state.user.nowRouteName, 'vvvvvvvvvvv')
-      if (this.$store.state.user.nowRouteName != 'NodeMap') {
+      const nowRouteName = this.$store.state.user.nowRouteName
+      if (nowRouteName != 'NodeMap' && nowRouteName != 'dataViewBoard') {
         this.collapsed = !val
       } else {
         this.collapsed = true
 	  }
     },
     nowRouteName (val) {
-      // console.log(val, 'vvvvvvvvvvv')
-      if (val == 'NodeMap') {
+      if (val == 'NodeMap' || val == 'dataViewBoard') {
         this.collapsed = true
       } else {
         this.collapsed = false
@@ -143,7 +142,7 @@ export default {
   mounted () {
     const userAgent = navigator.userAgent
     console.log(userAgent, this.collapsed, this.nowRouteName, 'this.collapsedthis.collapsedthis.collapsed')
-    if (userAgent.indexOf('Edge') > -1 && this.nowRouteName != 'NodeMap') {
+    if (userAgent.indexOf('Edge') > -1 && this.nowRouteName != 'NodeMap' && this.nowRouteName != 'dataViewBoard') {
       this.$nextTick(() => {
         this.collapsed = !this.collapsed
         setTimeout(() => {
@@ -151,7 +150,7 @@ export default {
         }, 16)
       })
     }
-    if (this.nowRouteName == 'NodeMap') {
+    if (this.nowRouteName == 'NodeMap' || this.nowRouteName == 'dataViewBoard') {
       this.$nextTick(() => {
 		  this.collapsed = true
       })

+ 11 - 4
src/layouts/PageView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div :style="!$route.meta.hiddenHeaderContent ? 'margin: -24px -24px 0px;' : null">
+  <div :class="$store.state.user.nowRouteName=='dataViewBoard'?'dataViewBoard':''" :style="!$route.meta.hiddenHeaderContent ? 'margin: -24px -24px 0px;' : null">
     <!-- pageHeader , route meta :true on hide -->
     <page-header v-if="!$route.meta.hiddenHeaderContent" :title="pageTitle" :logo="logo" :avatar="avatar">
       <slot slot="action" name="action"></slot>
@@ -37,8 +37,8 @@
         </div>
       </div>
     </page-header>
-    <div class="content">
-      <div class="page-header-index-wide">
+    <div class="content" :style="$store.state.user.nowRouteName!='dataViewBoard' ? 'margin: 24px 24px 0;' : null">
+      <div :class="$store.state.user.nowRouteName=='dataViewBoard'?'dataViewBoard':''" class="page-header-index-wide">
         <slot>
           <!-- keep-alive  -->
           <keep-alive v-if="multiTab">
@@ -124,7 +124,6 @@ export default {
 
 <style lang="less" scoped>
   .content {
-    margin: 24px 24px 0;
     .link {
       margin-top: 16px;
       &:not(:empty) {
@@ -149,6 +148,14 @@ export default {
       }
     }
   }
+  .dataViewBoard{
+    height: 100%;
+    width: 100%;
+    .content{
+      height: 100%;
+      width: 100%;
+    }
+  }
   .page-menu-search {
     text-align: center;
     margin-bottom: 16px;

+ 4 - 0
src/libs/getDate.js

@@ -1,5 +1,9 @@
 // 引入 moment 时间插件
 import moment from 'moment'
+moment.updateLocale('en', { week: {
+  dow: 1, // 星期的第一天是星期一
+  doy: 7 // 年份的第一周必须包含1月1日 (7 + 1 - 1)
+} })
 // 获取今日/昨日/本周/上周/本月/上月 时间
 export default {
   // 获取今日的开始结束时间

+ 9 - 2
src/main.js

@@ -8,7 +8,9 @@ import store from './store/'
 import { VueAxios } from './utils/request'
 //  复制内容到粘贴板
 import VueClipboard from 'vue-clipboard2'
-
+// 图片查看器
+import Viewer from 'v-viewer'
+import 'viewerjs/dist/viewer.css'
 // mock
 // import './mock'
 
@@ -20,9 +22,14 @@ import './utils/filter'
 import VueCookies from 'vue-cookies' // global filter
 // 无缝滚动
 import scroll from 'vue-seamless-scroll'
+// datav
+import dataV from '@jiaminghi/data-view'
+Vue.use(Viewer)
+// 图片查看器下边的操作按钮-若想隐藏改为false即可
+Viewer.setDefaults({ Options: { 'inline': false, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' } })
 Vue.use(scroll)
 Vue.config.productionTip = false
-
+Vue.use(dataV)
 // mount axios Vue.$http and this.$http
 Vue.use(VueAxios)
 Vue.use(VueCookies)

+ 2 - 3
src/views/businessManage/partnerManage/partnerManage.vue

@@ -186,14 +186,13 @@ export default {
   methods: {
     showModal () {
       this.itemId = null
-	  this.itemData = {}
+      this.itemData = {}
       this.openSupplierModal = true
     },
     // 编辑
     handleEdit (record) {
 	  this.itemId = record.id
 	  this.itemData = record
-	  console.log(this.itemId, '-------编辑')
 	  this.openSupplierModal = true
     },
     cancel () {
@@ -203,7 +202,7 @@ export default {
     // 重置
     resetForm () {
       this.queryParam.name = ''
-	  this.queryParam.contactPhone = ''
+      this.queryParam.contactPhone = ''
       this.$refs.table.refresh(true)
     },
     // 更改启用禁用状态

+ 150 - 95
src/views/businessManage/userManage/userManage.vue

@@ -5,24 +5,12 @@
         <a-row :gutter="20">
           <a-col :span="5">
             <a-form-item label="用户名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input
-                allowClear
-                v-model.trim="queryParam.name"
-                placeholder="请输入用户名称"
-                id="userList-name"
-                :maxLength="30"
-              />
+              <a-input allowClear v-model.trim="queryParam.name" placeholder="请输入用户名称" id="userList-name" :maxLength="30" />
             </a-form-item>
           </a-col>
           <a-col :span="5">
             <a-form-item label="手机号码" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input
-                allowClear
-                v-model.trim="queryParam.phone"
-                placeholder="请输入手机号码"
-                :maxLength="11"
-                id="userList-phone"
-              />
+              <a-input allowClear v-model.trim="queryParam.phone" placeholder="请输入手机号码" :maxLength="11" id="userList-phone" />
             </a-form-item>
           </a-col>
           <a-col :span="5">
@@ -81,29 +69,37 @@
         <span v-if="!$hasPermissions('B_userManage_enable')">--</span>
       </span>
       <span slot="action" slot-scope="text, record">
+        <a-icon type="qrcode" title="查看二维码" @click="getQrCode(record)" :style="{ fontSize: '20px', color: '#008000', padding: '0 10px' }" v-hasPermission="'B_userManage_qrcode'"/>
         <a-icon
           v-if="$hasPermissions('B_userManage_resetPwd') && record.loginFlag==1"
           type="unlock"
           title="重置密码"
           class="actionBtn icon-orange"
           @click="resetPassword(record)" />
-        <a-icon
-          v-if="$hasPermissions('B_userManage_edit')"
-          type="edit"
-          title="编辑"
-          class="actionBtn icon-blues"
-          @click="handleEdit(record)"
-        />
+        <a-icon v-if="$hasPermissions('B_userManage_edit')" type="edit" title="编辑" class="actionBtn icon-blues" @click="handleEdit(record)" />
         <a-icon
           v-if="$hasPermissions('B_userManage_del') && record.loginFlag==0"
           type="delete"
           title="删除"
           class="actionBtn icon-red"
-          @click="delect(record)"/>
-        <span v-if="!$hasPermissions('B_userManage_edit') && !($hasPermissions('B_userManage_resetPwd') && record.loginFlag==1) && !($hasPermissions('B_userManage_del') && record.loginFlag==0) ">--</span>
+          @click="delect(record)" />
+        <span v-if="!$hasPermissions('B_userManage_edit') && !($hasPermissions('B_userManage_resetPwd') && record.loginFlag==1) && !($hasPermissions('B_userManage_del') && record.loginFlag==0) && !$hasPermissions('B_userManage_qrcode')" >--</span>
       </span>
     </s-table>
     <userModal :visible="showModal" @refresh="$refs.table.refresh(true)" :itemId="itemId" @close="cancel"></userModal>
+    <!-- 查看二维码 -->
+    <a-modal
+      class="qrCodeModal"
+      title="查看二维码"
+      :width="500"
+      :footer="null"
+      :destroyOnClose="true"
+      @cancel="isQrCodeModal = false"
+      v-model="isQrCodeModal">
+      <img :src="qrCode" width="400" height="400" class="qrCode" />
+      <p class="info">邀请人:{{ this.name }}{{ this.phone }}</p>
+      <a-button type="primary" class="downQrCode" @click="downloadCode">下载二维码</a-button>
+    </a-modal>
   </a-card>
 </template>
 
@@ -113,7 +109,15 @@ import {
   VSelect
 } from '@/components'
 import userModal from './userModal.vue'
-import { sellerList, resetPSD, updateEnableStatus, getPowerUserList, delectUserPower } from '@/api/userManage.js'
+import {
+  sellerList,
+  resetPSD,
+  updateEnableStatus,
+  getPowerUserList,
+  delectUserPower,
+  qRCode
+} from '@/api/userManage.js'
+import QRCode from 'qrcode'
 export default {
   name: 'UserManage',
   components: {
@@ -124,12 +128,12 @@ export default {
   data () {
     return {
       formItemLayout: {
-		  labelCol: {
-		    span: 7
-		  },
-		  wrapperCol: {
-		    span: 17
-		  }
+        labelCol: {
+          span: 7
+        },
+        wrapperCol: {
+          span: 17
+        }
       },
       // 查询参数
       queryParam: {
@@ -140,7 +144,11 @@ export default {
       },
       showModal: false,
       itemId: null, // 编辑行id
-	  optionData: [],
+      qrCode: '', //  小程序码
+      isQrCodeModal: false, //  查看小程序码   弹框展示状态
+      optionData: [],
+      name: '', // 受邀人姓名
+      phone: '', // 受邀人电话
       // 表头
       columns: [{
         title: '序号',
@@ -166,26 +174,12 @@ export default {
         width: 100,
         align: 'center'
       },
-	  {
-	    title: '所属商户',
-	    dataIndex: 'org.name',
-	    width: 100,
-	    align: 'center'
-	  },
-	  // {
-	  //   title: '超级管理员',
-	  //   width: '100',
-	  //   align: 'center',
-	  //   scopedSlots: {
-	  //     customRender: 'status'
-	  //   }
-	  // },
-      // {
-      //   title: '角色',
-      //   width: '100',
-      //   align: 'center',
-      //   dataIndex: 'roleNames'
-      // },
+      {
+        title: '所属商户',
+        dataIndex: 'org.name',
+        width: 100,
+        align: 'center'
+      },
       {
         title: '状态',
         width: 100,
@@ -223,33 +217,32 @@ export default {
     })
   },
   methods: {
-	  handleChange (value) {
-	    console.log(`selected ${value}`)
-	  },
-	  handleBlur () {
-	    console.log('blur')
-	  },
-	  handleFocus () {
-	    console.log('focus')
-	  },
-	  filterOption (input, option) {
-	    return (
-	      option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-	    )
-	  },
-	  cancel () {
-	    this.itemId = null
-	    this.showModal = false
-	  },
-	  // 获取合作商数据
-	  getSellerList () {
-		  sellerList().then(res => {
-			  console.log(res, '-----合作商')
-			  if (res.status == 200) {
-				  this.optionData = res.data || []
-			  }
-		  })
-	  },
+    handleChange (value) {
+      console.log(`selected ${value}`)
+    },
+    handleBlur () {
+      console.log('blur')
+    },
+    handleFocus () {
+      console.log('focus')
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    cancel () {
+      this.itemId = null
+      this.showModal = false
+    },
+    // 获取合作商数据
+    getSellerList () {
+      sellerList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+        }
+      })
+    },
 
     // 刷新列表
     refreshTable () {
@@ -263,11 +256,65 @@ export default {
     // 重置
     reset () {
       this.queryParam.name = ''
-      this.queryParam.phone = '',
+      this.queryParam.phone = ''
       this.queryParam.loginFlag = ''
-	   this.queryParam.orgCode = undefined
+      this.queryParam.orgCode = undefined
       this.refreshTable()
     },
+    // 查看二维码
+    getQrCode (item) {
+      console.log(item)
+      const _this = this
+      _this.name = item.name
+      _this.phone = item.phone
+      const opts = {
+        errorCorrectionLevel: 'H',
+        type: 'image/jpeg',
+        quality: 0.3,
+        margin: 1.5,
+        width: 120,
+        color: {
+          dark: '#000000',
+          light: '#ffffff'
+        }
+      }
+      _this.shName = item.name + item.phone
+      console.log(item.encryptedPartnerNo)
+      qRCode({ id: item.id }).then(res => {
+        if (res.status == 200) {
+          const url = res.data
+          QRCode.toDataURL(url, opts, function (err, url) {
+            _this.qrCode = url
+            _this.isQrCodeModal = true
+          })
+        }
+      })
+      // if (url) {
+      //   QRCode.toDataURL(url, opts, function (err, url) {
+      //     _this.qrCode = url
+      //     _this.isQrCodeModal = true
+      //   })
+      // }
+    },
+    // 查看小程序码
+    // getQrCode (item) {
+    //   storeQrCode({ id: item.id, deviceNo: item.deviceNos.split(',')[0] }).then(res => {
+    //     if (res.status == 200) {
+    //       this.qrCode = 'data:image/png;base64,' + res.data
+    //       this.isQrCodeModal = true
+    //     } else {
+    //       this.qrCode = ''
+    //       this.$message.error(res.message)
+    //     }
+    //   })
+    // },
+    //  下载小程序码
+    downloadCode () {
+      const link = document.createElement('a')
+      link.href = this.qrCode
+      link.download = this.shName + '.jpg'
+      link.click()
+    },
     // 重置密码
     resetPassword (row) {
       resetPSD({
@@ -299,16 +346,9 @@ export default {
         }
       })
     },
-    // getBizStr (storeBizList) {
-    //   const str = []
-    //   storeBizList.forEach(item => {
-    //     str.push(item.bizTypeName)
-    //   })
-    //   return str.join(',')
-    // },
     handleEdit (row) {
       console.log(row, 'row')
-	  this.itemId = row.id
+      this.itemId = row.id
       this.showModal = true
     },
     // 修改状态
@@ -329,11 +369,26 @@ export default {
 }
 </script>
 <style lang="less">
-	.userManage-page-info{
-		.userManage-search{
-			.ant-form-inline .ant-form-item {
-				width: 100%;
-			}
-		}
-	}
+  .userManage-page-info {
+    .userManage-search {
+      .ant-form-inline .ant-form-item {
+        width: 100%;
+      }
+    }
+  }
+  .qrCodeModal {
+  	.qrCode {
+  		display: block;
+  		max-width: 100%;
+  		margin: 0 auto;
+  	}
+  	.downQrCode {
+  		display: block;
+  		margin: 40px auto 30px;
+  	}
+    .info{
+      text-align: center;
+      margin: 15px 0 0 0;
+    }
+  }
 </style>

+ 2 - 2
src/views/cleanManage/cleanDetail.vue

@@ -166,7 +166,7 @@ export default {
               const _item = res.data.list[i]
               _item.no = no + i + 1
               if (_item.cleanWeight != null || 0) {
-                _item.cleanWeight = (_item.cleanWeight / 1000).toFixed(3)
+                _item.cleanWeight = (_item.cleanWeight / 1000).toFixed(3)/1
               }
             }
             this.totalNum = res.data.count
@@ -246,7 +246,7 @@ export default {
       getCleanDetailsTotal(params).then(res => {
         if (res.status == 200) {
           if (res.data != 0 || null) {
-            this.cleanWeightTotal = (res.data.cleanWeight / 1000).toFixed(3)
+            this.cleanWeightTotal = (res.data.cleanWeight / 1000).toFixed(3)/1
           }
         } else {
           this.cleanWeightTotal = 0

+ 1 - 1
src/views/cleanManage/cleanDetailModal.vue

@@ -1,7 +1,7 @@
 <template>
   <a-modal title="清运详情" :footer="null" v-model="isShow" @cancel="cancel" centered>
     <a-spin :spinning="loading">
-      <div class="detail-item" v-for="item in itemData" :key="item.index"><span>{{ item.rubbishTypeDictValue }}:</span>{{ (item.cleanWeight/1000).toFixed(3) }} kg</div>
+      <div class="detail-item" v-for="item in itemData" :key="item.index"><span>{{ item.rubbishTypeDictValue }}:</span>{{ (item.cleanWeight/1000).toFixed(3)/1 }} kg</div>
       <a-empty v-if="itemData.length == 0" style="text-align: center;" />
     </a-spin>
   </a-modal>

+ 1 - 1
src/views/cleanManage/netWorkCleanModal.vue

@@ -68,7 +68,7 @@ export default {
               const _item = res.data.list[i]
               _item.no = no + i + 1
               if (_item.cleanWeight != null || 0) {
-                _item.cleanWeight = (_item.cleanWeight / 1000).toFixed(3)
+                _item.cleanWeight = (_item.cleanWeight / 1000).toFixed(3)/1
               }
             }
             return res.data

+ 2 - 2
src/views/cleanManage/netWorkCleanRecord.vue

@@ -144,7 +144,7 @@ export default {
               const _item = res.data.list[i]
               _item.no = no + i + 1
               if (_item.cleanWeight != null || 0) {
-                _item.cleanWeight = (_item.cleanWeight / 1000).toFixed(3)
+                _item.cleanWeight = (_item.cleanWeight / 1000).toFixed(3)/1
               }
             }
             this.totalNum = res.data.count
@@ -215,7 +215,7 @@ export default {
       getCleanStationTotal(params).then(res => {
         if (res.status == 200) {
           if (res.data != 0 || null) {
-            this.cleanWeightTotal = (res.data.cleanWeight / 1000).toFixed(3)
+            this.cleanWeightTotal = (res.data.cleanWeight / 1000).toFixed(3)/1
           }
         } else {
           this.cleanWeightTotal = 0

+ 16 - 16
src/views/cleanManage/notCleanNetwork.vue

@@ -104,35 +104,35 @@
       </template>
       <!-- 废旧衣物 -->
       <template slot="clothes" slot-scope="text,record">
-        <span :style="{ color: record.maxVal==record.clothes ? 'red' : '' }">{{ record.clothes ? (record.clothes/1000).toFixed(3) : '0.00' }}</span>
+        <span :style="{ color: record.maxVal==record.clothes ? 'red' : '' }">{{ record.clothes ? (record.clothes/1000).toFixed(3)/1 : '0.00' }}</span>
       </template>
       <!-- 废旧纸张 -->
       <template slot="paper" slot-scope="text,record">
-        <span :style="{ color: record.maxVal==record.paper ? 'red' : '' }">{{ record.paper ? (record.paper/1000).toFixed(3) : '0.00' }}</span>
+        <span :style="{ color: record.maxVal==record.paper ? 'red' : '' }">{{ record.paper ? (record.paper/1000).toFixed(3)/1 : '0.00' }}</span>
       </template>
       <!-- 废旧塑料 -->
       <template slot="plastic" slot-scope="text,record">
-        <span :style="{ color: record.maxVal==record.plastic ? 'red' : '' }">{{ record.plastic ? (record.plastic/1000).toFixed(3) : '0.000' }}</span>
+        <span :style="{ color: record.maxVal==record.plastic ? 'red' : '' }">{{ record.plastic ? (record.plastic/1000).toFixed(3)/1 : '0.000' }}</span>
       </template>
       <!-- 废旧金属 -->
       <template slot="metal" slot-scope="text,record">
-        <span :style="{ color: record.maxVal==record.metal ? 'red' : '' }">{{ record.metal ? (record.metal/1000).toFixed(3) : '0.000' }}</span>
+        <span :style="{ color: record.maxVal==record.metal ? 'red' : '' }">{{ record.metal ? (record.metal/1000).toFixed(3)/1 : '0.000' }}</span>
       </template>
       <!-- 废旧金属/塑料 -->
       <template slot="plaMet" slot-scope="text,record">
-        <span :style="{ color: record.maxVal==record.plaMet ? 'red' : '' }">{{ record.plaMet ? (record.plaMet/1000).toFixed(3) : '0.000' }}</span>
+        <span :style="{ color: record.maxVal==record.plaMet ? 'red' : '' }">{{ record.plaMet ? (record.plaMet/1000).toFixed(3)/1 : '0.000' }}</span>
       </template>
       <!-- 废旧玻璃 -->
       <template slot="glass" slot-scope="text,record">
-        <span :style="{ color: record.maxVal==record.glass ? 'red' : '' }">{{ record.glass ? (record.glass/1000).toFixed(3) : '0.000' }}</span>
+        <span :style="{ color: record.maxVal==record.glass ? 'red' : '' }">{{ record.glass ? (record.glass/1000).toFixed(3)/1 : '0.000' }}</span>
       </template>
       <!-- 可回收物 -->
       <template slot="recycling" slot-scope="text,record">
-        <span :style="{ color: record.maxVal==record.recycling ? 'red' : '' }">{{ record.recycling ? (record.recycling/1000).toFixed(3) : '0.000' }}</span>
+        <span :style="{ color: record.maxVal==record.recycling ? 'red' : '' }">{{ record.recycling ? (record.recycling/1000).toFixed(3)/1 : '0.000' }}</span>
       </template>
       <!-- 可回收物小计 -->
       <template slot="totalWeight" slot-scope="text,record">
-        <span >{{ record.totalWeight ? (record.totalWeight/1000).toFixed(3) : '0.000' }}</span>
+        <span >{{ record.totalWeight ? (record.totalWeight/1000).toFixed(3)/1 : '0.000' }}</span>
       </template>
       <!-- 操作 -->
       <span slot="action" slot-scope="text,record">
@@ -356,14 +356,14 @@ export default {
       getCleanStationSum(params).then(res => {
         if (res.status == 200) {
           if (res.data) {
-            this.recyclableWasteTotal = res.data.totalWeight ? (res.data.totalWeight / 1000).toFixed(3) : '0.000'
-            this.wastePaper = res.data.paper ? (res.data.paper / 1000).toFixed(3) : '0.000'
-            this.wasteClothes = res.data.clothes ? (res.data.clothes / 1000).toFixed(3) : '0.000'
-            this.wasteMetal = res.data.metal ? (res.data.metal / 1000).toFixed(3) : '0.000'
-            this.wastePlastics = res.data.plastic ? (res.data.plastic / 1000).toFixed(3) : '0.000'
-            this.wasteMetalPlastic = res.data.plaMet ? (res.data.plaMet / 1000).toFixed(3) : '0.000'
-            this.wasteGlass = res.data.glass ? (res.data.glass / 1000).toFixed(3) : '0.000'
-            this.recyclable = res.data.recycling ? (res.data.recycling / 1000).toFixed(3) : '0.000'
+            this.recyclableWasteTotal = res.data.totalWeight ? (res.data.totalWeight / 1000).toFixed(3)/1 : '0.000'
+            this.wastePaper = res.data.paper ? (res.data.paper / 1000).toFixed(3)/1 : '0.000'
+            this.wasteClothes = res.data.clothes ? (res.data.clothes / 1000).toFixed(3)/1 : '0.000'
+            this.wasteMetal = res.data.metal ? (res.data.metal / 1000).toFixed(3)/1 : '0.000'
+            this.wastePlastics = res.data.plastic ? (res.data.plastic / 1000).toFixed(3)/1 : '0.000'
+            this.wasteMetalPlastic = res.data.plaMet ? (res.data.plaMet / 1000).toFixed(3)/1 : '0.000'
+            this.wasteGlass = res.data.glass ? (res.data.glass / 1000).toFixed(3)/1 : '0.000'
+            this.recyclable = res.data.recycling ? (res.data.recycling / 1000).toFixed(3)/1 : '0.000'
           } else {
             this.recyclableWasteTotal = 0
             this.wasteClothes = 0

+ 5 - 5
src/views/cleanManage/statisticalReport.vue

@@ -193,7 +193,7 @@ export default {
           const has = list.find(obj => obj.rubbishType == item.code)
           temp.push({
             name: item.dispName,
-            value: has ? Number(has.cleanWeight / 1000).toFixed(3) : 0
+            value: has ? Number(has.cleanWeight / 1000).toFixed(3)/1 : 0
           })
         })
       }
@@ -207,7 +207,7 @@ export default {
         list.map(item => {
           temp.push({
             name: item.operatorName,
-            value: Number(item.cleanWeight / 1000).toFixed(3)
+            value: Number(item.cleanWeight / 1000).toFixed(3)/1
           })
         })
       }
@@ -440,12 +440,12 @@ export default {
           const a = res.data.deliveryReportData
           const b = res.data.cleanReportData
           for (const key in a) {
-            const val = Number(a[key] / 1000).toFixed(3)
+            const val = Number(a[key] / 1000).toFixed(3)/1
             this.clearnChartData[0].data.push(val)
           }
           for (const key in b) {
             this.XdaysData.push(key)
-            const val = Number(b[key] / 1000).toFixed(3)
+            const val = Number(b[key] / 1000).toFixed(3)/1
             this.clearnChartData[1].data.push(val)
           }
           this.isNoData = false
@@ -487,7 +487,7 @@ export default {
         for (let i = 0; i < keyArr.length; i++) {
           const leve2 = data[keyArr[i]]
           const row = leve2[item.code]
-          const val = row ? Number(row.cleanWeight / 1000).toFixed(3) : 0
+          const val = row ? Number(row.cleanWeight / 1000).toFixed(3)/1 : 0
           ret.push(val)
         }
         item.data = ret

+ 1219 - 0
src/views/dataView/borard.vue

@@ -0,0 +1,1219 @@
+<template>
+  <div class="dataView-content">
+    <!-- <dv-loading>Loading...</dv-loading> -->
+    <div class="data-header">
+      <div class="total-block">
+        <div>
+          <div class="total-label"><i class="cor1" v-for="item in 3" :key="item">|</i>用户总数</div>
+          <div class="total-value cor1">{{ userTotal }}</div>
+        </div>
+        <div>
+          <div class="total-label"><i class="cor2" v-for="item in 3" :key="item">|</i>试点单位数</div>
+          <div class="total-value cor2">{{ dwTotal }}</div>
+        </div>
+        <div>
+          <div class="total-label"><i class="cor3" v-for="item in 3" :key="item">|</i>设备总数</div>
+          <div class="total-value cor3">{{ devTotal }}</div>
+        </div>
+      </div>
+      <div class="page-title">
+        <!-- 智享亿家投递大数据 -->
+      </div>
+      <div>
+        <div class="border-box-content">
+          <div>区域</div>
+          <!-- <select v-model="queryParam.provinceCode" @change="getCityList" placeholder="省">
+          <option value="">省</option>
+          <option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</option>
+        </select> -->
+          <select v-model="queryParam.cityCode" @change="getAreaList" placeholder="市">
+            <option value="">全部</option>
+            <option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}
+            </option>
+          </select>
+          <!-- <select v-model="queryParam.districtCode" @change="initChart" placeholder="区/县">
+          <option value="">全部区/县</option>
+          <option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</option>
+        </select> -->
+          <a-icon
+            @click="isFullscreenMap"
+            :style="{fontSize:'30px',padding: '7px',float: 'right', cursor: 'pointer'}"
+            :type="isMapFull ?'fullscreen-exit':'fullscreen'" />
+        </div>
+      </div>
+    </div>
+    <div class="data-body">
+      <div class="b-middle">
+        <div>
+          <dv-border-box-8 ref="map" style="padding: 10px;">
+            <div class="lajiliang">
+              <div class="laji-title">垃圾产生量</div>
+              <div class="laji-item">
+                <div class="cor1">可回收垃圾</div>
+                <div>{{ rubbishWeightData.RECYCLING }} kg</div>
+              </div>
+              <div class="laji-item">
+                <div class="cor2">其它垃圾</div>
+                <div>{{ rubbishWeightData.GATHER_OTHER }} kg</div>
+              </div>
+              <div class="laji-item">
+                <div class="cor3">厨余垃圾</div>
+                <div>{{ rubbishWeightData.GATHER_KITCHEN }} kg</div>
+              </div>
+              <div class="laji-item">
+                <div class="cor4">建筑垃圾</div>
+                <div>{{ rubbishWeightData.GATHER_BUILDING }} kg</div>
+              </div>
+              <div class="laji-item">
+                <div class="cor5">有害垃圾</div>
+                <div>{{ rubbishWeightData.HARM }} kg</div>
+              </div>
+              <div class="laji-total">共计<span>{{ rubbishWeightTotal }}</span>kg</div>
+            </div>
+            <div id="map" :style="{height: '100%'}"></div>
+          </dv-border-box-8>
+        </div>
+        <div>
+          <div>
+            <dv-border-box-13 ref="con1">
+              <div id="con1" style="width: 100%;height: 100%;"></div>
+            </dv-border-box-13>
+          </div>
+          <div>
+            <dv-border-box-13 ref="con2">
+              <div id="con2" style="width: 100%;height: 100%;"></div>
+            </dv-border-box-13>
+          </div>
+          <div>
+            <dv-border-box-13 ref="con4">
+              <div id="con4" style="width: 100%;height: 100%;"></div>
+            </dv-border-box-13>
+          </div>
+        </div>
+      </div>
+      <div class="b-right">
+        <!-- 设备比例分布 -->
+        <div>
+          <dv-border-box-13 ref="con3">
+            <div id="con3" style="width: 100%;height: 100%;"></div>
+          </dv-border-box-13>
+        </div>
+        <!-- 各分类垃圾量分布 -->
+        <div>
+          <dv-border-box-13 ref="con5">
+            <div id="con5" style="width: 100%;height: 100%;"></div>
+          </dv-border-box-13>
+        </div>
+        <!-- 各机构投递量分布比例 -->
+        <div>
+          <dv-border-box-13 ref="con6">
+            <div id="con6" style="width: 100%;height: 100%;"></div>
+          </dv-border-box-13>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import echarts from 'echarts'
+import {
+  getUserTotal,
+  getDeviceTotal,
+  getMapStation
+} from '@/api/nodeMap.js'
+import {
+  getNewRegister,
+  getTimeSharingLog,
+  getDeliveryTop,
+  getHeatMapData,
+  getLocationCode,
+  getRubbishTypeTotal,
+  querySumWeight,
+  labelWeightPercent,
+  devicePercent,
+  getDwTotal
+} from '@/api/borard.js'
+import {
+  getProvince,
+  getCityByPro,
+  getDistrictByCity
+} from '@/api/station'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+export default {
+  name: 'DataBoratd',
+  data () {
+    return {
+      queryParam: {
+        provinceCode: '610000', //  省
+        cityCode: '', // 市
+        districtCode: '' // 区
+      },
+      addrProvinceList: [{
+        code: '610000',
+        id: '610000',
+        isOpen: '0',
+        name: '陕西省',
+        parentId: '100000',
+        parentIds: '100000',
+        sort: 27,
+        type: '2'
+      }], //  省下拉
+      addrCityList: [{
+        'id': '610100',
+        'sort': 1,
+        'parentId': '610000',
+        'parentIds': '100000,610000',
+        'isOpen': '0',
+        'name': '西安市',
+        'code': '610100'
+      },
+      {
+        'id': '610400',
+        'sort': 4,
+        'parentId': '610000',
+        'parentIds': '100000,610000',
+        'isOpen': '0',
+        'name': '咸阳市',
+        'code': '610400'
+      }
+      ], //  市下拉
+      addrDistrictList: [], //  区下拉
+      chart1: null,
+      chart2: null,
+      chart3: null,
+      chart4: null,
+      chart5: null,
+      chart6: null,
+      userTotal: 0,
+      devTotal: 0,
+      dwTotal: 0,
+      isMapFull: false,
+      map: null, // 地图对象
+      markerLayer: null, // 地图点标记对象
+      infoWindow: null, // 地图信息窗口对象
+      beginDate: moment().subtract('days', 7).format('YYYY-MM-DD 00:00:00'), // 查询开始时间
+      endDate: moment(moment().add(-1, 'days').endOf('day').valueOf()).format('YYYY-MM-DD 23:59:59'), // 查询结束时间
+	  rubbishWeightData: {
+		  'GATHER_OTHER': 0, // 其它垃圾
+		  'GATHER_KITCHEN': 0, // 厨余垃圾
+		  'GATHER_BUILDING': 0, // 建筑垃圾
+		  'HARM': 0, // 有害垃圾
+		  'RECYCLING': 0 // 可回收垃圾
+	  }, // 垃圾产生量数据
+	  rubbishWeightTotal: 0 // 垃圾产生量数据总计
+    }
+  },
+  methods: {
+    // 获取省列表'
+    getProvinceList () {
+      getProvince().then(res => {
+        if (res.status == 200) {
+          this.addrProvinceList = res.data || []
+        } else {
+          this.addrProvinceList = []
+        }
+      })
+    },
+    // 获取城市列表
+    getCityList (e) {
+      if (e.target.value == '') return
+      this.addrCityList = []
+      this.addrDistrictList = []
+      this.queryParam.cityCode = ''
+      this.queryParam.districtCode = ''
+      this.getCityListRequest(e.target.value)
+    },
+    getCityListRequest (val) {
+      getCityByPro({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrCityList = res.data || []
+        } else {
+          this.addrCityList = []
+        }
+      })
+    },
+    // 获取区县列表
+    getAreaList (e) {
+      if (e.target.value == '') {
+        this.initChart()
+        return
+      }
+      this.addrDistrictList = []
+      this.queryParam.districtCode = ''
+	  // 地图经纬度
+	  this.getLocationCode()
+      this.getAreaListRequest(e.target.value)
+      this.initChart()
+    },
+    getAreaListRequest (val) {
+      getDistrictByCity({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrDistrictList = res.data || []
+        } else {
+          this.addrDistrictList = []
+        }
+      })
+    },
+    // 全屏
+    fullScreen () {
+      var element = document.documentElement
+      if (element.requestFullscreen) {
+        element.requestFullscreen()
+      } else if (element.msRequestFullscreen) {
+        element.msRequestFullscreen()
+      } else if (element.mozRequestFullScreen) {
+        element.mozRequestFullScreen()
+      } else if (element.webkitRequestFullscreen) {
+        element.webkitRequestFullscreen()
+      }
+    },
+    // 退出全屏
+    exitFullscreen () {
+      if (document.exitFullscreen) {
+        document.exitFullscreen()
+      } else if (document.msExitFullscreen) {
+        document.msExitFullscreen()
+      } else if (document.mozCancelFullScreen) {
+        document.mozCancelFullScreen()
+      } else if (document.webkitExitFullscreen) {
+        document.webkitExitFullscreen()
+      }
+    },
+    // 地图是否全屏展示
+    isFullscreenMap () {
+      this.isMapFull = !this.isMapFull
+      if (this.isMapFull) {
+        this.fullScreen()
+      } else {
+        this.exitFullscreen()
+      }
+      this.chart1.resize()
+      this.chart2.resize()
+      this.chart3.resize()
+      this.chart4.resize()
+    },
+    formatter (number) {
+      const numbers = number.toString().split('').reverse()
+      const segs = []
+      while (numbers.length) segs.push(numbers.splice(0, 3).join(''))
+      return segs.join(',').split('').reverse().join('')
+    },
+    // 获取用户总数
+    getUser () {
+      getUserTotal({}).then(res => {
+        const data = res.data || 0
+        this.userTotal = data
+      })
+    },
+    // 获取设备总数
+    getDevice () {
+      getDeviceTotal({}).then(res => {
+        const data = res.data || 0
+        this.devTotal = data
+      })
+    },
+    // 获取试点单位数(网点数量)
+    getDwTotal () {
+	  getDwTotal({}).then(res => {
+	    const data = res.data.count || 0
+	    this.dwTotal = data
+	  })
+    },
+    // 获取新用户注册量
+    getNewRegister () {
+      const params = {
+        beginRegisterTime: this.beginDate,
+        endRegisterTime: this.endDate,
+        'provinceCode': this.queryParam.provinceCode,
+        'cityCode': this.queryParam.cityCode,
+        'districtCode': this.queryParam.districtCode
+      }
+      getNewRegister(params).then(res => {
+        if (res.status == 200) {
+          const xData = res.data.dateTime
+          const yData = res.data.registerNum
+          const arr = []
+          yData.map(item => {
+            arr.push(Number(item))
+          })
+          this.initChart1(xData, arr)
+        }
+      })
+    },
+    // 获取分时投递
+    getTimeSharingLog () {
+      const params = {
+        'beginDeliveryDate': this.beginDate,
+        'endDeliveryDate': this.endDate,
+        'provinceCode': this.queryParam.provinceCode,
+        'cityCode': this.queryParam.cityCode,
+        'districtCode': this.queryParam.districtCode
+      }
+      getTimeSharingLog(params).then(res => {
+        console.log(res)
+        if (res.status == 200) {
+          this.initChart2(res.data)
+        }
+      })
+    },
+    // 排行榜
+    getDeliveryTop () {
+      const params = {
+        'findRubbishDataBeginDate': this.beginDate,
+        'findRubbishDataEndDate': this.endDate,
+        'provinceCode': this.queryParam.provinceCode,
+        'cityCode': this.queryParam.cityCode,
+        'districtCode': this.queryParam.districtCode
+      }
+      getDeliveryTop(params).then(res => {
+        console.log(res)
+        if (res.status == 200 && res.data) {
+          // res.data.deliveryWeight.forEach(item => {
+          //   item = Math.round(item / 1000)
+          // })
+		  console.log(res.data, 'res.data')
+          this.initChart3(res.data)
+        }
+      })
+    },
+    // 设备分布比例
+    getDevicePercent () {
+      devicePercent({}).then(res => {
+        console.log(res, '------------设备分布比例')
+        const data = res.data || []
+
+        data.forEach(item => {
+          item.name = item.LABEL_NAME
+          item.value = item.DEVCIE_NUM
+        })
+        const con3 = document.getElementById('con3')
+        const chart3 = echarts.init(con3)
+        const option3 = this.initPie(chart3, '设备分布比例', data, '个')
+        chart3.setOption(option3)
+        this.chart3 = chart3
+        this.chart3.resize()
+      })
+    },
+    // 各机构投递量分布比例
+    getLabelWeightPercent () {
+      labelWeightPercent({}).then(res => {
+        console.log(res, '-------各机构投递量分布比例')
+        if (res.status == 200) {
+          const data = res.data || []
+          data.forEach(item => {
+			  item.name = item.labelName
+			  item.value = Math.round(item.weight / 1000000)
+          })
+          const con6 = document.getElementById('con6')
+          const chart6 = echarts.init(con6)
+          const option6 = this.initPie(chart6, '各机构投递量分布比例', data, '吨')
+          chart6.setOption(option6)
+          this.chart6 = chart6
+          this.chart6.resize()
+        }
+      })
+    },
+    // 垃圾产生量
+    getRubbishWeight () {
+      querySumWeight({}).then(res => {
+        console.log(res, '垃圾产生量')
+        if (res.status == 200) {
+		  Object.keys(this.rubbishWeightData).map(item => {
+			  this.rubbishWeightData[item] = this.formatter(Math.round((res.data.list.find(key => key.rubbishType == item).rubbishWeight) / 1000))
+		  })
+		  this.rubbishWeightTotal = this.formatter(Math.round(res.data.total / 1000))
+        } else {
+          this.rubbishWeightTotal = 0
+		  this.rubbishWeightData = {
+			  'GATHER_OTHER': 0, // 其它垃圾
+			  'GATHER_KITCHEN': 0, // 厨余垃圾
+			  'GATHER_BUILDING': 0, // 建筑垃圾
+			  'HARM': 0, // 有害垃圾
+			  'RECYCLING': 0 // 可回收垃圾
+		  }
+        }
+      })
+    },
+    // 各分类垃圾量分布
+    getRubbishTypeChart () {
+      getRubbishTypeTotal({}).then(res => {
+        console.log(res)
+        let data = []
+        if (res.status == 200 && res.data) {
+          // this.initChart3(res.data)
+		  Object.keys(this.rubbishWeightData).map(item => {
+			  const p = res.data.find(key => key.rubbishType == item)
+            if (p) {
+              data.push({
+                name: p.rubbishTypeDict,
+                value: p.rubbishWeight
+              })
+            }
+		  })
+        } else {
+          data = [{
+			  name: '可回收垃圾',
+			  value: 0
+          },
+          {
+			  name: '其他垃圾',
+			  value: 0
+          },
+          {
+			  name: '厨余垃圾',
+			  value: 0
+          },
+          {
+			  name: '建筑垃圾',
+			  value: 0
+          },
+          {
+			  name: '有害垃圾',
+			  value: 0
+          }
+          ]
+        }
+        const con5 = document.getElementById('con5')
+        const chart5 = echarts.init(con5)
+        const option = this.initPie(chart5, '各分类垃圾量分布', data)
+        chart5.setOption(option)
+        this.chart5 = chart5
+        this.chart5.resize()
+      })
+    },
+    getLocationCode () {
+      const cityCode = this.queryParam.cityCode
+      const districtCode = this.queryParam.districtCode
+      getLocationCode({
+        keyword: districtCode || cityCode
+      }).then(res => {
+        console.log(res)
+        if (res.status == 200) {
+          if (this.map) {
+            this.map.panTo(new TMap.LatLng(res.data.lat, res.data.lng))
+          } else {
+            this.initMap(res.data)
+          }
+        }
+      })
+    },
+    // 初始化地图
+    initMap (res) {
+      // 定义地图中心点坐标 默认定位在陕西省咸阳市
+      var center = new TMap.LatLng(res.lat, res.lng)
+      // 定义map变量,调用 TMap.Map() 构造函数创建地图
+      this.map = new TMap.Map(document.getElementById('map'), {
+        center: center, // 设置地图中心点坐标
+        mapStyleId: 'style3',
+        zoom: 13, // 设置地图缩放级别
+        pitch: 0, // 设置俯仰角
+        showControl: false,
+        rotation: 45 // 设置地图旋转角度
+      })
+      // 创建并初始化MultiMarker 点标记
+      this.markerLayer = new TMap.MultiMarker({
+        map: this.map, // 指定地图容器
+        // 样式定义
+        styles: {
+          // 创建一个styleId为"myStyle"的样式(styles的子属性名即为styleId)
+          'myStyle': new TMap.MarkerStyle({
+            'width': 40, // 点标记样式宽度(像素)
+            'height': 40, // 点标记样式高度(像素)
+            'src': '../ldt.png', // 图片路径
+            // 焦点在图片中的像素位置,一般大头针类似形式的图片以针尖位置做为焦点,圆形点以圆心位置为焦点
+            'anchor': {
+              x: 8,
+              y: 15
+            }
+          })
+        },
+        // 点标记数据数组
+        geometries: []
+      })
+      // 初始化infoWindow
+      this.infoWindow = new TMap.InfoWindow({
+        map: this.map,
+        position: new TMap.LatLng(39.984104, 116.307503),
+        offset: {
+          x: 0,
+          y: -32
+        } // 设置信息窗相对position偏移像素
+      })
+      this.infoWindow.close() // 初始关闭信息窗关闭
+      this.markerLayer.on('mousemove', this.showMarkTitle)
+      // 监听地图加载完成
+      // this.map.on('tilesloaded', this.getMapMark)
+    },
+    // 获取热力图
+    getHeatMapData () {
+      // 初始化热力图并添加至map图层
+      const heat = new TMap.visualization.Heat({
+        max: 180, // 热力最强阈值
+        min: 0, // 热力最弱阈值
+        height: 40, // 峰值高度
+        gradientColor: { // 渐变颜色
+          0.2: '#0a8b4d',
+          0.3: '#57e0a5',
+          0.5: '#05a8a4'
+        },
+        radius: 30 // 最大辐射半径
+      }).addTo(this.map)
+      const params = {
+        'beginDeliveryDate': this.beginDate,
+        'endDeliveryDate': this.endDate,
+        'provinceCode': this.queryParam.provinceCode,
+        'cityCode': this.queryParam.cityCode,
+        'districtCode': this.queryParam.districtCode
+      }
+      getHeatMapData(params).then(res => {
+        if (res.status == 200) {
+          const ret = []
+          for (let i = 0; i < res.data.length; i++) {
+            if (res.data[i].lat <= 90) {
+              ret.push({
+                count: res.data[i].deliveryTimes,
+                lat: res.data[i].lat,
+                lng: res.data[i].lng
+              })
+            }
+          }
+          // console.log(ret)
+          heat.setData(ret) // 设置数据
+        }
+      })
+    },
+    // 获取地图点坐标
+    getMapMark () {
+      this.getHeatMapData()
+      getMapStation({
+        'provinceCode': this.queryParam.provinceCode,
+        'cityCode': this.queryParam.cityCode,
+        'districtCode': this.queryParam.districtCode
+      }).then(res => {
+        const list = res.data || []
+        const data = []
+        list.map((item, index) => {
+          if (item.lat <= 85.051128 && item.lat >= -85.051128) {
+            const p = {
+              'id': item.id, // 点标记唯一标识,后续如果有删除、修改位置等操作,都需要此id
+              'styleId': 'myStyle', // 指定样式id
+              'position': new TMap.LatLng(Number(item.lat), Number(item
+                .lng)), // 点标记坐标位置
+              'properties': { // 自定义属性
+                'title': item.name
+              }
+            }
+            data.push(p)
+          }
+        })
+        // 增加点标记
+        this.markerLayer.add(data)
+      })
+    },
+    // 显示地图标记点名称
+    showMarkTitle (evt) {
+      this.infoWindow.open() // 打开信息窗
+      this.infoWindow.setPosition(evt.geometry.position) // 设置信息窗位置
+      this.infoWindow.setContent(evt.geometry.properties.title) // 设置信息窗内容
+    },
+    // 初始化图表
+    initChart () {
+      // 用户总数
+      this.getUser()
+      // 设备总数
+      this.getDevice()
+	  // 网点总数
+      this.getDwTotal()
+      // 新注册用户
+      this.getNewRegister()
+      // 分时投递
+      this.getTimeSharingLog()
+      // 垃圾产生量
+      this.getRubbishWeight()
+      // 各分类垃圾量分布
+      this.getRubbishTypeChart()
+      // 设备分布比例
+	  this.getDevicePercent()
+      // 各机构投递量分布比例
+      this.getLabelWeightPercent()
+      // 网点投递量排名
+      this.getDeliveryTop()
+    },
+    // 排行榜
+    initChart3 (res) {
+      const con4 = document.getElementById('con4')
+      const chart4 = echarts.init(con4)
+	  const seriesData = res.deliveryWeight.map(item => {
+		  return Math.round(Number(item) / 1000)
+	  })
+	  // console.log(seriesData, 'seriesData')
+      const option4 = {
+        title: {
+          text: '网点投递量排名',
+          top: 20,
+          left: 20,
+          textStyle: {
+            color: '#abd7ff'
+          },
+          textAlingn: 'left'
+        },
+        tooltip: {
+          formatter: '{b0}: {c0}kg'
+        },
+        grid: {
+          left: 15,
+          right: 15,
+          bottom: 20,
+          top: 85,
+          containLabel: true
+        },
+        xAxis: {
+          data: res.stationName,
+		  show: false
+        },
+        yAxis: {
+          name: 'kg',
+          type: 'value'
+        },
+        series: [{
+          data: seriesData,
+          type: 'bar',
+          barWidth: 30,
+          label: {
+            normal: {
+              show: true,
+              position: 'top'
+            }
+          },
+          itemStyle: {
+            color: '#37a2da',
+            shadowColor: '#246d91',
+            shadowOffsetX: 8,
+            shadowOffsetY: 0
+          }
+        }]
+      }
+      chart4.setOption(option4)
+      this.chart4 = chart4
+      this.chart4.resize()
+    },
+    // 分时投递记录
+    initChart2 (res) {
+      const con2 = document.getElementById('con2')
+      const chart2 = echarts.init(con2)
+      const series = []
+      const arr = res.dayKey.slice(res.dayKey.length - 3)
+      console.log(arr)
+      for (let i = 0; i < arr.length; i++) {
+        series.push({
+          name: arr[i],
+          data: res.value[arr[i]],
+          type: 'line',
+          stack: '投递量',
+          smooth: true,
+          barWidth: 10,
+          label: {
+            normal: {
+              show: true,
+              position: 'top'
+            }
+          }
+        })
+      }
+      const option2 = {
+        title: {
+          text: '分时投递量',
+          top: 20,
+          left: 20,
+          textStyle: {
+            color: '#abd7ff'
+          },
+          textAlingn: 'left'
+        },
+        tooltip: {
+          formatter: '{b0}时: {c0}kg'
+        },
+        grid: {
+          left: 20,
+          right: 40,
+          bottom: 20,
+          top: 85,
+          containLabel: true
+        },
+        legend: {
+          data: arr,
+          orient: 'vertical',
+          textStyle: {
+            fontSize: 10,
+            color: '#abd7ff'
+          },
+          top: 15,
+          left: 'right'
+        },
+        xAxis: {
+          name: '时',
+          type: 'category',
+		  boundaryGap: false, // 两边是否留白
+          data: res.hourKey,
+          nameTextStyle: {
+            color: '#666'
+          },
+          axisLine: {
+            lineStyle: {
+              color: '#666'
+            }
+          }
+        },
+        yAxis: {
+          name: 'kg',
+          type: 'value',
+          nameTextStyle: {
+            color: '#666'
+          },
+          axisLine: {
+            lineStyle: {
+              color: '#666'
+            }
+          }
+        },
+        series: series
+      }
+      chart2.setOption(option2)
+      this.chart2 = chart2
+      this.chart2.resize()
+    },
+    // 初始化新用户注册量
+    initChart1 (xData, yData) {
+      const con1 = document.getElementById('con1')
+      const chart1 = echarts.init(con1)
+      const option1 = {
+        title: {
+          text: '新用户注册量',
+          top: 20,
+          left: 20,
+          textStyle: {
+            color: '#abd7ff'
+          },
+          textAlingn: 'left'
+        },
+        tooltip: {
+          formatter: '{b0}日: {c0}人'
+        },
+        grid: {
+          left: 15,
+          right: 60,
+          bottom: 20,
+          top: 85,
+          containLabel: true
+        },
+        xAxis: {
+          name: '日期',
+          data: xData,
+          type: 'category',
+		  boundaryGap: false, // 两边是否留白
+          nameTextStyle: {
+            color: '#666'
+          },
+          axisLine: {
+            lineStyle: {
+              color: '#666'
+            }
+          }
+        },
+        yAxis: {
+          name: '个',
+          type: 'value',
+          nameTextStyle: {
+            color: '#666'
+          },
+          axisLine: {
+            lineStyle: {
+              color: '#666'
+            }
+          }
+        },
+        series: [{
+          data: yData,
+          type: 'line',
+          smooth: true,
+          label: {
+            normal: {
+              show: true,
+              position: 'top'
+            }
+          },
+          lineStyle: {
+            color: 'rgba(55, 162, 218, 0.9)'
+          },
+          areaStyle: {
+            color: {
+              type: 'linear',
+              x: 0,
+              y: 0,
+              x2: 0,
+              y2: 1,
+              colorStops: [{
+                offset: 0,
+                color: 'rgba(55, 162, 218, 0.5)' // 0% 处的颜色
+              }, {
+                offset: 1,
+                color: 'rgba(55, 162, 218, 0.9)' // 100% 处的颜色
+              }]
+            }
+          }
+        }]
+      }
+      chart1.setOption(option1)
+      this.chart1 = chart1
+      this.chart1.resize()
+    },
+    // 初始化饼图 title: 标题 data:数据 bit:单位
+    initPie (chart, title, data, bit) {
+	 const legend = []
+	 if (bit) {
+        data.map(item => {
+			 const p = `${item.name}: ${item.value}${bit}`
+			 legend.push(p)
+        })
+	 }
+      const option = {
+        color: ['#f56548', '#ffb301', '#7561af', '#06beff', '#20ce7a' ],
+        title: {
+          text: title,
+          top: 20,
+          left: 20,
+          textStyle: {
+            color: '#abd7ff'
+          },
+          textAlingn: 'left'
+        },
+        tooltip: {
+          trigger: 'item',
+          formatter: `{b} : {d}%`
+        },
+        legend: {
+		  orient: 'horizontal',
+		  left: 'center',
+		  bottom: '5',
+		  padding: 5,
+		  textStyle: {
+		    color: '#abd7ff',
+            fontSize: 10
+		  },
+		  show: !!bit,
+		  formatter: function (name) {
+			  if (bit) {
+              const p = data.find(item => item.name == name)
+              return name + (p ? (':' + p.value + bit) : '')
+			  }
+		  }
+        },
+        series: [{
+          type: 'pie',
+          radius: ['30%', '50%'],
+          startAngle: 75,
+          top: 50,
+          avoidLabelOverlap: true, // 在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠
+          label: {
+            normal: {
+              formatter: params => {
+                // console.log(params, 'ppppppp')
+                return (
+                  '{name|' + params.name + '}{value|' +
+										params.percent + '%' + '}'
+                )
+              },
+              padding: [0, -70, 25, -70],
+              rich: {
+                name: {
+                  fontSize: 12,
+                  padding: [0, 4, 0, 4],
+                  color: '#999'
+                },
+                value: {
+                  fontSize: 12,
+                  color: '#999'
+                }
+              }
+            }
+          },
+          labelLine: {
+            normal: {
+              length: 20,
+              length2: 70,
+              lineStyle: {
+                color: '#e6e6e6'
+              }
+            }
+          },
+          data: data,
+          insideLabel: {
+            show: true
+          }
+        }]
+      }
+	  return option
+    }
+  },
+  mounted () {
+    const that = this
+    // 默认定位在陕西省咸阳市
+    this.initMap({ lat: 34.32932, lng: 108.70929 })
+    window.onresize = () => {
+      return (() => {
+        that.chart1.resize()
+        that.chart2.resize()
+        that.chart3.resize()
+        that.chart4.resize()
+        that.chart5.resize()
+        that.chart6.resize()
+      })()
+    }
+    // 监听页面刷新,重置边框宽高
+    window.addEventListener('pageshow', (e) => {
+      // console.log(e, this.chart1, 'eeeeeeeeeeee')
+      this.$refs.map.initWH()
+      this.$refs.con1.initWH()
+      this.$refs.con2.initWH()
+      this.$refs.con3.initWH()
+      this.$refs.con4.initWH()
+      this.$refs.con5.initWH()
+      this.$refs.con6.initWH()
+    })
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getMapMark()
+      setTimeout(() => {
+        vm.initChart()
+        vm.$refs.map.initWH()
+        vm.$refs.con1.initWH()
+        vm.$refs.con2.initWH()
+        vm.$refs.con3.initWH()
+        vm.$refs.con4.initWH()
+        vm.$refs.con5.initWH()
+        vm.$refs.con6.initWH()
+        if (vm.queryParam.cityCode != '') {
+          vm.getAreaListRequest(vm.queryParam.cityCode)
+        }
+      }, 150)
+    })
+  },
+  beforeRouterLeave (to, from, next) {
+    next(vm => {
+      // 销毁地图
+      vm.map.destroy()
+      vm.map = null
+    })
+  }
+
+}
+</script>
+
+<style lang="less">
+	.dataView-content {
+		width: 100%;
+		height: 100%;
+		min-height: 600px;
+		background-image: url(../../assets/dataViewBg.png);
+		background-size: 100% 100%;
+		display: flex;
+		flex-direction: column;
+
+		.data-header {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			background-image: url(../../assets/headBg.png);
+			background-repeat: no-repeat;
+			background-position: center center;
+			background-size: auto 80%;
+			padding: 10px 0 0;
+
+			.total-block {
+				width: 35%;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+
+				>div {
+					width: 30%;
+					padding-right: 10px;
+				}
+
+				.total-label {
+					color: #fff;
+					text-align: left;
+					display: flex;
+
+					i {
+						transform: rotate(330deg);
+						display: inline-block;
+						font-size: 12px;
+						margin: 0 1px;
+
+						&:last-child {
+							margin-right: 10px;
+						}
+					}
+				}
+
+				.total-value {
+					font-size: 22px;
+					font-weight: bold;
+				}
+
+				.cor1 {
+					color: #00ff84;
+				}
+
+				.cor2 {
+					color: #d7ff00;
+				}
+
+				.cor3 {
+					color: #00c0ff;
+				}
+			}
+
+			.page-title {
+				width: 50%;
+				flex-grow: 1;
+				color: #00aaff;
+				font-size: 32px;
+				text-align: center;
+			}
+
+			>div {
+				padding: 15px;
+
+				&:last-child {
+					width: 25%;
+					color: #0ed3ff;
+
+					.border-box-content {
+						font-size: 18px;
+						text-align: center;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						padding-left: 50px;
+
+						select {
+							background: #021931;
+							border: 1px solid #3e566d;
+							min-width: 30%;
+							padding: 2px 20px;
+							margin: 0 10px;
+							box-shadow: inset 0 0 2px #69b2ff;
+							border-radius: 60px;
+						}
+					}
+				}
+			}
+		}
+
+		.data-body {
+			flex-grow: 1;
+			display: flex;
+			padding: 0 15px 15px;
+
+			.b-right {
+				width: 25%;
+				display: flex;
+				padding: 5px;
+				flex-direction: column;
+				justify-content: space-around;
+
+				>div {
+					height: 33%;
+				}
+			}
+
+			.b-middle {
+				width: 75%;
+				padding: 5px;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-around;
+
+				>div {
+					&:first-child {
+						height: 66%;
+
+						.lajiliang {
+							width: 23%;
+							position: absolute;
+							padding: 15px;
+							background: rgba(255, 255, 255, 0.3);
+							border-radius: 6px;
+							left: 20px;
+							top: 20px;
+							z-index: 1000;
+							color: #fff;
+
+							.laji-title {
+								text-align: center;
+								padding: 0 0 10px;
+							}
+
+							.laji-item {
+								display: flex;
+								align-items: center;
+								justify-content: space-between;
+								margin: 15px 0;
+
+								>div {
+									&:first-child {
+										border-radius: 30px;
+										padding: 2px 10px;
+										font-size: 12px;
+										width: 50%;
+										text-align: center;
+									}
+								}
+
+								.cor1 {
+									background-color: #c2523f;
+								}
+
+								.cor2 {
+									background-color: #c59b16;
+								}
+
+								.cor3 {
+									background-color: #7561af;
+								}
+
+								.cor4 {
+									background-color: #418ec6;
+								}
+
+								.cor5 {
+									background-color: #20ce7a;
+								}
+							}
+						}
+					}
+
+					&:last-child {
+						height: 33%;
+						display: flex;
+
+						>div {
+							width: 33.3%;
+							justify-content: space-around;
+							align-items: center;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 159 - 0
src/views/equipmentManage/collector/addCollector.vue

@@ -0,0 +1,159 @@
+<template>
+  <a-modal :footer="null" centered :title="titleText" v-model="isShow" @cancle="cancel">
+    <a-spin :spinning="loading">
+      <a-form-model :model="formData" ref="ruleForm" :rules="rules">
+        <a-form-model-item label="选择网点" :label-col="{span:6}" :wrapper-col="{span:16}" prop="stationNo">
+          <a-select
+            id="addCollector-stationNo"
+            placeholder="请选择网点名称"
+            allowClear
+            v-model="formData.stationNo"
+            :showSearch="true"
+            option-filter-prop="children"
+            :filter-option="filterOption"
+          >
+            <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+          </a-select>
+        </a-form-model-item>
+        <a-form-model-item label="采集员姓名" :label-col="{span:6}" :wrapper-col="{span:16}">
+          <a-input placeholder="请输入网点标签名称(30个字符以内)" v-model.trim="formData.gatherName" allowClear :maxLength="30" id="addCollector-gatherName"/>
+        </a-form-model-item>
+        <a-form-model-item label="采集员手机" :label-col="{span:6}" :wrapper-col="{span:16}" prop="gatherPhone">
+          <a-input
+            placeholder="请输入采集员手机"
+            v-model.trim="formData.gatherPhone"
+            allowClear
+            :maxLength="11"
+            :disabled="collectorId ? true :false "
+            id="addCollector-gatherPhone"/>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 24, offset: 8 }">
+          <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '15px' }" id="addCollector-handleSubmit">
+            保存
+          </a-button>
+          <a-button :style="{ marginLeft: '15px' }" @click="cancel" id="addCollector-cancel">
+            取消
+          </a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { saveCollector, collectorDetails } from '@/api/collector.js'
+import { stationList } from '@/api/releaseRecord.js'
+export default {
+  name: 'AddCollector',
+  props: {
+    openModal: {
+      type: Boolean,
+      default: false
+    },
+    collectorId: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      formData: { gatherName: '', gatherPhone: '', stationNo: undefined },
+      isShow: this.openModal, // 弹框状态
+      titleText: '新增',
+      rules: {
+        stationNo: [{ required: true, message: '请选择网点', trigger: 'change' }],
+        gatherPhone: [{ required: true, message: '请输入正确的手机号', trigger: 'blur', pattern: /^\d{11}$/ }]
+      },
+      loading: false,
+      optionData: [] // 标签数据
+    }
+  },
+  methods: {
+    // 过滤数据
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 获取标签数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+        }
+      })
+    },
+    // 数据详情
+    getPageInfo () {
+      const _this = this
+      _this.loading = true
+      collectorDetails({
+        id: _this.collectorId
+      }).then(res => {
+        if (res.status == 200) {
+          _this.loading = false
+          _this.formData.gatherName = res.data.gatherName
+          _this.formData.gatherPhone = res.data.gatherPhone
+          _this.formData.stationNo = res.data.stationNo
+        }
+      })
+    },
+    // 保存
+    handleSubmit () {
+      this.$refs.ruleForm.validate(valid => {
+        const _this = this
+        if (valid) {
+          const params = JSON.parse(JSON.stringify(this.formData))
+          params.id = _this.collectorId ? _this.collectorId : undefined
+          saveCollector(params).then(res => {
+            console.log(res, 'rrrrrrrrr')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$emit('refresh')
+              setTimeout(function () {
+                _this.cancel()
+              }, 300)
+            }
+          })
+        }
+      })
+    },
+    cancel (e) {
+      this.clear()
+      this.$emit('close')
+    },
+    clear () {
+      this.$refs.ruleForm.resetFields()
+      delete this.formData.id
+      this.formData.gatherPhone = ''
+      this.formData.stationNo = undefined
+      this.formData.gatherName = ''
+    }
+  },
+  mounted() {
+    this.getStationList()
+  },
+  // 监听弹窗
+  watch: {
+    // 父页面传过来的弹窗状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (newValue, oldValue) {
+      if (newValue) {
+        if (this.collectorId) { // 编辑
+          this.titleText = '编辑'
+          this.getPageInfo()
+        } else {
+          this.titleText = '新增'
+        }
+      } else {
+        this.cancel()
+      }
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 274 - 0
src/views/equipmentManage/collector/collector.vue

@@ -0,0 +1,274 @@
+<template>
+  <a-card :bordered="false" class="collector-table-page-search-wrapper">
+    <div class="collector-searchForm">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="8" :lg="6">
+            <a-form-item label="创建时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker
+                id="collector-time"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onChange" />
+            </a-form-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="8" :lg="6">
+            <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-select
+                id="collector-stationNo"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                showSearch
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="8" :lg="6">
+            <a-form-item label="采集员" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="collector-queryWord" allowClear :maxLength="30" v-model="queryParam.queryWord" placeholder="请输入姓名/手机号码" />
+            </a-form-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="8" :lg="6">
+            <a-button class="handle-btn serach-btn" id="collector-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="collector-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="table-operator">
+      <a-button
+        class="add-btn"
+        icon="plus"
+        id="collector-btn-add"
+        type="primary"
+        @click="handleEdit"
+        v-hasPermission="'B_collector_add'">新增</a-button>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 启禁用 -->
+      <span slot="status" slot-scope="text, record">
+        <a-switch
+          v-hasPermission="'B_collector_enable'"
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          v-model="record.loginFlag"
+          @change="changeFlagHandle(text, record)"
+          id="collector-changeFlagHandle" />
+        <span v-if="!$hasPermissions('B_collector_enable')">--</span>
+      </span>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-icon
+          type="edit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)"
+          id="collector-edit"
+          v-hasPermission="'B_collector_edit'"/>
+        <a-icon
+          id="collector-resetPassword"
+          type="unlock"
+          title="重置密码"
+          class="actionBtn icon-orange"
+          v-if="$hasPermissions('B_collector_resetPsd') && record.loginFlag==1"
+          @click="resetPassword(record)" />
+        <a-icon
+          type="delete"
+          title="删除"
+          class="actionBtn icon-red"
+          id="collector-delect"
+          v-if="record.loginFlag==0 && $hasPermissions('B_collector_del')"
+          @click="delect(record)" />
+        <span v-if="!$hasPermissions('B_collector_edit') && !($hasPermissions('B_collector_resetPsd') && record.loginFlag==1) && !($hasPermissions('B_collector_del') && record.loginFlag==0) ">--</span>
+      </template>
+    </s-table>
+    <!-- 新增编辑 -->
+    <add-Collector :openModal="openCollectorModal" :collectorId="collectorId" @refresh="handleReset" @close="closeModal" id="collector-addBtn"/>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import moment from 'moment'
+import addCollector from './addCollector.vue'
+import { stationList } from '@/api/releaseRecord.js'
+import { getCollectorList, resetPSD, updateEnableStatus, delectCollector } from '@/api/collector'
+export default {
+  name: 'Collector',
+  components: { STable, VSelect, addCollector },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: { span: 7 },
+        wrapperCol: { span: 17 }
+      },
+      // 查询参数
+      queryParam: {
+        registerBeginDate: null, // 开始时间
+        registerEndDate: null, // 结束时间
+        queryWord: '', // 采集员姓名或手机号
+        stationNo: undefined //  网点名称
+      },
+      optionData: [], // 网点名称数据
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 200, align: 'center' },
+        { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center', customRender: text => { return text || '--' } },
+        { title: '采集员姓名', dataIndex: 'gatherName', width: 150, align: 'center', ellipsis: true, customRender: text => { return text || '--' } },
+        { title: '采集员手机', dataIndex: 'gatherPhone', width: 150, align: 'center', ellipsis: true, customRender: text => { return text || '--' } },
+        { title: '状态', width: 100, align: 'center', scopedSlots: { customRender: 'status' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return getCollectorList(Object.assign(parameter, this.queryParam)).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+              _item.loginFlag = _item.loginFlag + '' === '1'
+            }
+            return res.data
+          }
+        })
+      },
+      // 将默认当天时间日期回显在时间选择框中
+      time: [],
+      dateFormat: 'YYYY-MM-DD',
+      openCollectorModal: false, //  新增编辑网点信息
+      collectorId: null //  网点id
+    }
+  },
+  mounted () {
+    this.getStationList()
+  },
+  methods: {
+    moment,
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.registerBeginDate = dateStrings[0]
+        this.queryParam.registerEndDate = dateStrings[1]
+      }
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 获取合作商数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+          console.log(res)
+        }
+      })
+    },
+    // 重置
+    handleReset () {
+      this.queryParam.registerBeginDate = undefined
+      this.queryParam.registerEndDate = undefined
+      this.queryParam.queryWord = ''
+      this.time = []
+      this.queryParam.stationNo = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  新增、编辑网点
+    handleEdit (row) {
+      this.collectorId = row ? row.id : null
+      this.openCollectorModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.collectorId = null
+      this.openCollectorModal = false
+    },
+    // 修改状态
+    changeFlagHandle (text, record) {
+      const _data = {
+        id: record.id,
+        flag: record.loginFlag ? '1' : '0'
+      }
+      updateEnableStatus(_data).then(res => {
+        if (res.status + '' === '200') {
+          this.$message.success(res.message)
+        } else {
+          record.loginFlag = !record.loginFlag
+        }
+      })
+    },
+    // 重置密码
+    resetPassword (row) {
+      resetPSD({
+        id: row.id
+      }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+        }
+      })
+    },
+    // 删除
+    delect (row) {
+      const _this = this
+      this.$confirm({
+        title: '警告',
+        centered: true,
+        content: '删除后无法恢复,确认删除?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          delectCollector({
+            id: row.id
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .collector-table-page-search-wrapper{
+    .collector-searchForm{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+      	margin-bottom: 10px;
+      }
+      .handle-btn{
+        margin-top: 4px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+    }
+    .actionBtn {
+    	font-size: 20px;
+    	padding: 0 10px;
+    }
+  }
+</style>

+ 92 - 9
src/views/equipmentManage/equipment/equipment.vue

@@ -10,7 +10,17 @@
           </a-col>
           <a-col :span="6">
             <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="equipment-stationName" allowClear :maxLength="30" v-model="queryParam.stationName" placeholder="请输入网点名称" />
+              <a-select
+                id="cleanDetail-stationNo"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                showSearch
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+              </a-select>
+              <!-- <a-input id="equipment-stationNo" allowClear :maxLength="30" v-model="queryParam.stationNo" placeholder="请输入网点名称" /> -->
             </a-form-item>
           </a-col>
           <a-col :span="6">
@@ -102,17 +112,32 @@
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button
+        <a-icon type="qrcode" title="查看二维码" @click="getQrCode(record)" :style="{ fontSize: '20px', color: '#008000', padding: '0 10px' }" />
+        <a-icon type="snippets" title="掉线日志" @click="checkLog(record)" :style="{ fontSize: '20px', color: '#1890ff', padding: '0 10px' }" />
+        <!-- <a-button @click="getQrCode(record)" style="background-color: #008000;color: #fff;">二维码</a-button> -->
+        <!-- <a-button
           v-if="$hasPermissions('B_equipment_log')"
           type="primary"
           class="btn-edit-s"
           id="equipment-log-btn"
-          @click="checkLog(record)">掉线日志</a-button>
-        <span v-else>--</span>
+          @click="checkLog(record)">掉线日志</a-button> -->
+        <!-- <span v-else>--</span> -->
       </template>
     </s-table>
     <!-- 掉线日志 -->
     <equipment-log-modal :openModal="openLogModal" :srcDeviceCode="srcDeviceCode" @close="closeModal" />
+    <!-- 查看二维码 -->
+    <a-modal
+      class="qrCodeModal"
+      title="查看二维码"
+      :width="500"
+      :footer="null"
+      :destroyOnClose="true"
+      @cancel="isQrCodeModal = false"
+      v-model="isQrCodeModal">
+      <img :src="qrCode" width="400" height="400" class="qrCode" />
+      <a-button type="primary" class="downQrCode" @click="downloadCode">下载二维码</a-button>
+    </a-modal>
   </a-card>
 </template>
 
@@ -120,8 +145,10 @@
 import { STable, VSelect } from '@/components'
 import equipmentLogModal from './logModal.vue'
 import { deviceList } from '@/api/device'
+import { stationList } from '@/api/releaseRecord.js'
 import { deviceTypeListQuery, exportDevice } from '@/api/boxSetting'
 import { lableSeleteList } from '@/api/labelSetting.js'
+import QRCode from 'qrcode'
 import moment from 'moment'
 export default {
   name: 'Equipment',
@@ -129,6 +156,8 @@ export default {
   data () {
     return {
       loading: false,
+      isQrCodeModal: false, //  查看小程序码   弹框展示状态
+      qrCode: '',
       formItemLayout: {
         labelCol: { span: 7 },
         wrapperCol: { span: 17 }
@@ -136,7 +165,7 @@ export default {
       // 查询参数
       queryParam: {
         srcDeviceCode: '', // 设备编号
-        stationName: '', //  网点名称
+        stationNo: undefined, //  网点名称
         deviceTypeNo: undefined, //  箱体类型
         boxNum: undefined, //  内置箱体数
         onlineFlag: undefined, //  设备状态
@@ -144,14 +173,15 @@ export default {
         labelNoList: [] // 网点标签
       },
       lableData: [],
+      optionData: [],
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center' },
+        { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center', customRender: text => { return text || '--' } },
         { title: '网点标签', dataIndex: 'labelName', width: 200, align: 'center', customRender: text => { return text || '--' } },
-        { title: '地址', dataIndex: 'stationAddress', width: 200, align: 'center' },
+        { title: '地址', dataIndex: 'stationAddress', width: 200, align: 'center', customRender: text => { return text || '--' } },
         { title: '设备编号', dataIndex: 'srcDeviceCode', width: 200, align: 'center' },
-        { title: '箱体类型', dataIndex: 'deviceTypeName', width: 200, align: 'center' },
+        { title: '箱体类型', dataIndex: 'deviceTypeName', width: 200, align: 'center', customRender: text => { return text || '--' } },
         { title: '内置箱体数', dataIndex: 'boxNum', width: 200, align: 'center' },
         { title: '版本', dataIndex: 'boxVersion', width: 200, align: 'center' },
         { title: '设备状态', scopedSlots: { customRender: 'onlineFlag' }, width: 150, align: 'center' },
@@ -196,10 +226,19 @@ export default {
         }
       })
     },
+    // 获取合作商数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+          console.log(res)
+        }
+      })
+    },
     // 重置
     handleReset () {
       this.queryParam.srcDeviceCode = ''
-      this.queryParam.stationName = ''
+      this.queryParam.stationNo = undefined
       this.queryParam.deviceTypeNo = undefined
       this.queryParam.boxNum = undefined
       this.queryParam.onlineFlag = undefined
@@ -233,6 +272,37 @@ export default {
       this.srcDeviceCode = row ? row.srcDeviceCode : null
       this.openLogModal = true
     },
+    // 查看二维码
+    getQrCode (item) {
+      const _this = this
+      const opts = {
+        errorCorrectionLevel: 'H',
+        type: 'image/jpeg',
+        quality: 0.3,
+        margin: 1.5,
+        width: 240,
+        color: {
+          dark: '#000000',
+          light: '#ffffff'
+        }
+      }
+      const url = 'http://www.sxzxyj.net/web/static/qrcode/download-app.html?' + 'id=' + item.srcDeviceCode + '&type=dustbin'
+      console.log(url, '------二维码地址')
+      _this.shName = (item.stationName ? item.stationName : '') + item.srcDeviceCode.substring(item.srcDeviceCode.length - 6)
+      if (url) {
+        QRCode.toDataURL(url, opts, function (err, url) {
+          _this.qrCode = url
+          _this.isQrCodeModal = true
+        })
+      }
+    },
+    //  下载二维码
+    downloadCode (item) {
+      const link = document.createElement('a')
+      link.href = this.qrCode
+      link.download = this.shName + '.jpg'
+      link.click()
+    },
     closeModal () {
       this.srcDeviceCode = null
       this.openLogModal = false
@@ -251,6 +321,7 @@ export default {
   mounted () {
     this.getDeviceType()
     this.getlableSeleteList()
+    this.getStationList()
   }
 }
 </script>
@@ -308,4 +379,16 @@ export default {
     	color: red;
     }
   }
+  // 查看小程序码  弹框
+  	.qrCodeModal {
+  		.qrCode {
+  			display: block;
+  			max-width: 100%;
+  			margin: 0 auto;
+  		}
+  		.downQrCode {
+  			display: block;
+  			margin: 40px auto 30px;
+  		}
+  	}
 </style>

+ 16 - 1
src/views/equipmentManage/labelSetting/addLabelSetting.vue

@@ -2,12 +2,21 @@
   <a-modal :footer="null" centered :title="titleText" v-model="isShow" @cancle="cancel">
     <a-spin :spinning="loading">
       <a-form-model :model="formData" ref="ruleForm" :rules="rules">
+        <a-form-model-item label="所属分类" :label-col="{span:6}" :wrapper-col="{span:16}" prop="labelType">
+          <v-select
+            v-model="formData.labelType"
+            ref="labelType"
+            id="addLabelSetting-labelType"
+            code="LABEL_TYPE"
+            placeholder="请选择"
+            allowClear></v-select>
+        </a-form-model-item>
         <a-form-model-item label="网点标签名称" :label-col="{span:6}" :wrapper-col="{span:16}" prop="labelName">
           <a-input placeholder="请输入网点标签名称(30个字符以内)" v-model="formData.labelName" allowClear :maxLength="30"/>
         </a-form-model-item>
         <a-form-model-item label="备注" :label-col="{span:6}" :wrapper-col="{span:16}" prop="remarks">
           <a-textarea
-            id="addElectronicScale-remarks"
+            id="addLabelSetting-remarks"
             :maxLength="500"
             v-model="formData.remarks"
             style="min-height: 50px;"
@@ -28,9 +37,11 @@
 </template>
 
 <script>
+import { VSelect } from '@/components'
 import { lableDetails, saveLable } from '@/api/labelSetting.js'
 export default {
   name: 'AddLabelSetting',
+  components: { VSelect },
   props: {
     visible: {
       type: Boolean,
@@ -47,6 +58,7 @@ export default {
       isShow: this.visible, // 弹框状态
       titleText: '新增',
       rules: {
+        labelType: [{ required: true, message: '请选择', trigger: 'blur' }],
         labelName: [{ required: true, message: '请输入网点标签名称(30个字符以内)', trigger: 'blur' }]
       },
       loading: false
@@ -72,6 +84,9 @@ export default {
         const _this = this
         if (valid) {
           const params = JSON.parse(JSON.stringify(this.formData))
+          if (params.labelType == 'org' || params.labelType == 'biz') {
+            params.labelBizType = 'STATION'
+          }
           saveLable(params).then(res => {
             console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {

+ 87 - 25
src/views/equipmentManage/network/editModal.vue

@@ -144,8 +144,10 @@
           :showSearch="true"
           option-filter-prop="children"
           :filter-option="filterOption"
+          @select="select"
+          @deselect="deselect"
         >
-          <a-select-option v-for="item in lableData" :key="item.labelNo" :value="item.labelNo">{{ item.labelName }}</a-select-option>
+          <a-select-option v-for="item in lableData" :key="item.labelNo" :value="item.labelNo" :disabled="item.disabled">{{ item.labelName }}</a-select-option>
         </a-select>
       </a-form-item>
       <a-form-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
@@ -173,6 +175,25 @@ export default {
       default: ''
     }
   },
+  watch: {
+	  //  父页面传过来的弹框状态
+	  openModal (newValue, oldValue) {
+	    this.isShow = newValue
+	  },
+	  //  重定义的弹框状态
+	  isShow (newValue, oldValue) {
+	    if (!newValue) {
+	      this.$emit('close')
+	    } else {
+        this.pageInit()
+	    }
+	  },
+	  networkId (newValue, oldValue) {
+	    if (this.isShow && newValue) {
+	      this.getDetails()
+	    }
+	  }
+  },
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
@@ -201,7 +222,8 @@ export default {
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
-      lableData: [] // 标签数据
+      lableData: [], // 标签数据
+      newArr: [] // 机构标签数据
     }
   },
   computed: {
@@ -209,7 +231,19 @@ export default {
       return this.networkId ? '编辑' : '新增'
     }
   },
+  mounted () {
+	  this.getlableSeleteList() // 网点标签
+  },
   methods: {
+    pageInit () {
+      this.getProvinceList()
+      this.getdeliveryTimeRule() //  投递时间段
+      this.getgoldExRule() //  兑换规则
+      this.form.resetFields()
+	  if (this.lableData.length) {
+		  this.lableData.forEach(item => item.disabled = false)
+	  }
+    },
     //  获取详情
     getDetails () {
       stationFind({ id: this.networkId }).then(res => {
@@ -227,6 +261,25 @@ export default {
           this.form.setFieldsValue({ 'formData.goldExRuleNo': res.data.goldExRuleNo })
           this.form.setFieldsValue({ 'formData.deliveryTimeRuleNo': res.data.deliveryTimeRuleNo })
           this.form.setFieldsValue({ 'formData.labelNoList': res.data.labelNoList })
+          let b = {}
+		  const selectedLable = res.data.labelNoList
+		  console.log(selectedLable, '-选中数据】')
+		  // 标签数据处理 当返回数据中有机构类型的标签时,其它机构类型的标签不可选
+		  for (var i = 0; i < selectedLable.length; i++) {
+		    // console.log(selectedLable.length, this.newArr, 'selectedLable.length')
+		    b = this.newArr.find(k => k.labelNo == selectedLable[i])
+		    console.log(selectedLable[i], 'i', b, '-xiangqngshuju')
+		    if (b) {
+		      this.lableData.forEach(item => {
+		        if (item.labelType == 'org' && item.labelNo != b.labelNo) {
+		          item.disabled = true
+		        } else {
+		          item.disabled = false
+		        }
+		      })
+		      return
+		    }
+		  }
         }
       })
     },
@@ -285,9 +338,40 @@ export default {
       lableSeleteList().then(res => {
         if (res.status == 200) {
           this.lableData = res.data || []
+          this.lableData.map(item => {
+            if (item.labelType == 'org') {
+              this.newArr.push(item)
+              console.log(this.newArr, '--------机构类型')
+            }
+          })
         }
       })
     },
+    // 选中标签
+    select (value, option) {
+      console.log(value, option, 'hfhhhhhhh')
+      const a = this.newArr.find(item => item.labelNo == value)
+      if (a) {
+        this.lableData.forEach(item => {
+          if (item.labelType == 'org' && item.labelNo != value) {
+            item.disabled = true
+          } else {
+            item.disabled = false
+          }
+        })
+      }
+    },
+    // 取消选中标签
+    deselect (value, option) {
+      const a = this.newArr.find(item => item.labelNo == value)
+      if (a) {
+        this.lableData.forEach(item => {
+          if (item.labelType == 'org') {
+            item.disabled = false
+          }
+        })
+      }
+    },
     // 获取省列表
     getProvinceList () {
       getProvince().then(res => {
@@ -340,30 +424,8 @@ export default {
     areaCharged (val) {
       this.form.setFieldsValue({ 'formData.address': '' })
     }
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-      } else {
-        this.getProvinceList()
-        this.getdeliveryTimeRule() //  投递时间段
-        this.getgoldExRule() //  兑换规则
-        this.getlableSeleteList() // 网点标签
-        this.form.resetFields()
-      }
-    },
-    networkId (newValue, oldValue) {
-      if (this.isShow && newValue) {
-        this.getDetails()
-      }
-    }
   }
+
 }
 </script>
 

+ 28 - 6
src/views/equipmentManage/network/network.vue

@@ -56,7 +56,17 @@
         <a-row :gutter="20">
           <a-col :span="6">
             <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="network-queryWord" allowClear :maxLength="30" v-model="queryParam.queryWord" placeholder="请输入网点名称" />
+              <a-select
+                id="cleanDetail-stationNo"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                showSearch
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+              </a-select>
+              <!-- <a-input id="network-stationNo" allowClear :maxLength="30" v-model="queryParam.stationNo" placeholder="请输入网点名称" /> -->
             </a-form-item>
           </a-col>
           <a-col :span="6">
@@ -121,7 +131,8 @@ import moment from 'moment'
 import editNetworkModal from './editModal.vue'
 import detailsNetworkModal from './detailsModal.vue'
 import equipmentModal from './equipmentModal.vue'
-import { stationList, getProvince, getCityByPro, getDistrictByCity } from '@/api/station'
+import { stationList } from '@/api/releaseRecord.js'
+import { stationListData, getProvince, getCityByPro, getDistrictByCity } from '@/api/station'
 import { lableSeleteList } from '@/api/labelSetting.js'
 export default {
   name: 'Network',
@@ -136,13 +147,14 @@ export default {
       queryParam: {
         beginDate: null, // 开始时间
         endDate: null, // 结束时间
-        queryWord: '', //  网点名称
+        stationNo: undefined, //  网点名称
         provinceCode: undefined, //  省
         cityCode: undefined, // 市
         districtCode: undefined, // 区
         labelNoList: []
       },
       lableData: [],
+      optionData: [],
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
@@ -159,7 +171,7 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        return stationList(Object.assign(parameter, this.queryParam)).then(res => {
+        return stationListData(Object.assign(parameter, this.queryParam)).then(res => {
           if (res.status == 200) {
             const no = (res.data.pageNo - 1) * res.data.pageSize
             this.orderTotal = res.data.count
@@ -203,6 +215,15 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
+    // 获取合作商数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+          console.log(res)
+        }
+      })
+    },
     // 获取标签数据
     getlableSeleteList () {
       lableSeleteList().then(res => {
@@ -215,15 +236,15 @@ export default {
     handleReset () {
       this.queryParam.beginDate = undefined
       this.queryParam.endDate = undefined
-      this.queryParam.queryWord = ''
+      this.queryParam.stationNo = undefined
       this.queryParam.provinceCode = undefined
       this.queryParam.cityCode = undefined
       this.queryParam.districtCode = undefined
       this.time = []
-      this.$refs.table.refresh(true)
       this.networkId = undefined
       this.networkNo = undefined
       this.queryParam.labelNoList = []
+      this.$refs.table.refresh(true)
     },
     //  新增、编辑网点
     handleEdit (row) {
@@ -301,6 +322,7 @@ export default {
   mounted () {
     this.getProvinceList()
     this.getlableSeleteList()
+    this.getStationList()
   }
 }
 </script>

+ 3 - 3
src/views/reportForm/rubbishDeliveryTotal.vue

@@ -162,7 +162,7 @@ export default {
         const searchData = Object.assign(parameter, this.queryParam)
         if (this.time && this.time.length) {
           searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
-          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 00:00:00')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
         } else {
           searchData.beginDate = ''
           searchData.endDate = ''
@@ -285,7 +285,7 @@ export default {
       const params = this.queryParam
       if (this.time && this.time.length) {
         params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
       } else {
         params.beginDate = ''
         params.endDate = ''
@@ -348,7 +348,7 @@ export default {
       const params = this.queryParam
       if (this.time && this.time.length) {
         params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
       } else {
         params.beginDate = ''
         params.endDate = ''

+ 243 - 0
src/views/reportForm/unRecyclableRubbishDetails.vue

@@ -0,0 +1,243 @@
+<template>
+  <a-card :bordered="false" class="unRecyclableRubbishDetails-container">
+    <!-- 搜索条件 -->
+    <div class="unRecyclableRubbishDetails-container-searchForm">
+      <a-form-model
+        ref="queryParam"
+        :model="queryParam"
+        layout="inline"
+        @keyup.enter.native="$refs.table.refresh(true)"
+      >
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="查询时间区间" :label-col="{ span:8 }" :wrapper-col="{ span:16}">
+              <a-range-picker
+                id="unRecyclableRubbishDetails-time"
+                v-model="time"
+                style="width: 100%;"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="采集员" :label-col="{ span:8}" :wrapper-col="{ span:16}">
+              <a-input
+                id="unRecyclableRubbishDetails-queryWord"
+                allowClear
+                :maxLength="30"
+                v-model="queryParam.queryWord"
+                placeholder="请输入姓名/手机号码"
+                autocomplete="off"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="网点名称" :label-col="{ span:8}" :wrapper-col="{ span:16}">
+              <a-select
+                style="max-height: 50px;overflow: auto;margin-top: 3px;"
+                id="unRecyclableRubbishDetails-stationNo"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="unRecyclableRubbishDetails-refresh" style="margin-top: 4px">查询</a-button>
+            <a-button type="" @click="reset" id="unRecyclableRubbishDetails-reset" style="margin: 4px 0 0 10px">重置</a-button>
+          </a-col>
+        </a-row>
+
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">总计<span> {{ orderTotal }} </span>条,<span> {{ total }} </span>kg。
+        其中,其他垃圾总计<span> {{ otherTotal }} </span>kg,厨余垃圾总计<span>{{ chuyuTotal }} </span>kg,建筑垃圾总计<span> {{ jianzhuTotal }} </span>kg
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table ref="table" :rowKey="record => record.id" :columns="columns" :data="loadData" bordered>
+      <!-- 图片 -->
+      <template slot="img" slot-scope="text,record">
+        <viewer :images="record.imageUrlList? record.imageUrlList:[]" class="viewer" ref="viewer" @inited="inited" rebuild>
+          <img v-for="src in record.imageUrlList" :src="src" :key="src" class="image">
+        </viewer>
+        <P style="margin-bottom: 0;">{{ record.imageUrlList ? record.imageUrlList.length+' 张' :'0 张' }}</P>
+      </template>
+    </s-table>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { stationList } from '@/api/releaseRecord.js'
+import { getRubbishDetailList, getRubbishDetailTotal } from '@/api/reportForm.js'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+export default {
+  components: {
+    STable,
+    VSelect
+  },
+  data () {
+    return {
+      orderTotal: 0, //  总计条数
+      total: 0, //  可回收垃圾总计
+      otherTotal: 0, //  其他垃圾总计
+      jianzhuTotal: 0, //  建筑垃圾总计
+      chuyuTotal: 0, //  厨余垃圾总计
+      queryParam: {
+        stationNo: undefined, // 网点名称
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        queryWord: ''
+      },
+      optionData: [], // 网点列表数据
+      // 将默认当天时间日期回显在时间选择框中
+      time: [
+        moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
+      ],
+      dateFormat: 'YYYY-MM-DD', // 日期格式
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 150, align: 'center' },
+        { title: '网点名称', dataIndex: 'stationName', width: 120, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '采集员姓名', dataIndex: 'gatherName', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '采集员手机', dataIndex: 'gatherPhone', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '其他垃圾(kg)', dataIndex: 'gatherOther', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
+        { title: '厨余垃圾(kg)', dataIndex: 'gatherKitchen', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
+        { title: '建筑垃圾(kg)', dataIndex: 'gatherBuilding', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
+        { title: '总计(kg)', dataIndex: 'gatherTotal', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
+        { title: '备注', dataIndex: 'remarks', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '图片', width: 100, align: 'center', scopedSlots: { customRender: 'img' } }
+      ],
+      // 图片
+      images: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const searchData = Object.assign(parameter, this.queryParam)
+        if (this.time && this.time.length) {
+          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
+        } else {
+          searchData.beginDate = null
+          searchData.endDate = null
+        }
+        return getRubbishDetailList(searchData).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            this.orderTotal = res.data.count || 0
+            this.getTotal()
+            return res.data
+          } else {
+            this.orderTotal = 0
+          }
+        })
+      }
+    }
+  },
+  mounted () {
+    this.getStationList()
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 获取网点数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+        } else {
+          this.optionData = []
+        }
+      })
+    },
+    // 总计
+    getTotal () {
+      const params = this.queryParam
+      if (this.time && this.time.length) {
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
+      } else {
+        params.beginDate = null
+        params.endDate = null
+      }
+      getRubbishDetailTotal(params).then(res => {
+        if (res.status == 200) {
+          if (res.data) {
+            this.otherTotal = res.data.GATHER_OTHER ? (res.data.GATHER_OTHER / 1000).toFixed(3) / 1 : '0'
+            this.jianzhuTotal = res.data.GATHER_BUILDING ? (res.data.GATHER_BUILDING / 1000).toFixed(3) / 1 : '0'
+            this.chuyuTotal = res.data.GATHER_KITCHEN ? (res.data.GATHER_KITCHEN / 1000).toFixed(3) / 1 : '0'
+            this.total = res.data.GATHER_TOTAL ? (res.data.GATHER_TOTAL / 1000).toFixed(3) / 1 : '0'
+          }
+        }
+      })
+    },
+    // 重置
+    reset () {
+      this.queryParam.stationNo = undefined
+      this.queryParam.beginDate = null
+      this.queryParam.endDate = null
+      this.queryParam.queryWord = ''
+      this.time = [
+        moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
+      ]
+      this.$refs.table.refresh(true)
+    },
+    inited (viewer) {
+      this.$viewer = viewer
+    },
+    isShow () {
+      this.$viewer.update()
+    }
+  }
+}
+</script>
+
+<style lang='less' scoped>
+	.unRecyclableRubbishDetails-container {
+		.unRecyclableRubbishDetails-container-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+				margin-bottom: 15px;
+			}
+		}
+    .image {
+    width:25px;
+    height: 25px;
+    cursor: pointer;
+    margin: 5px;
+    display: inline-block;
+  }
+  .image:not(:first-child){
+    display: none;
+  }
+	}
+</style>

+ 295 - 0
src/views/reportForm/unRecyclableRubbishTotal.vue

@@ -0,0 +1,295 @@
+<template>
+  <a-card :bordered="false" class="unRecyclableRubbishTotal-container">
+    <!-- 搜索条件 -->
+    <div class="unRecyclableRubbishTotal-container-searchForm">
+      <a-form-model
+        ref="queryParam"
+        :model="queryParam"
+        layout="inline"
+        @keyup.enter.native="$refs.table.refresh(true)"
+      >
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="采集时间区间" :label-col="{ span:8 }" :wrapper-col="{ span:16}">
+              <a-range-picker
+                id="unRecyclableRubbishTotal-time"
+                v-model="time"
+                style="width: 100%;"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item prop="provinceCode" label="所属区域:" :label-col="{ span:8 }" :wrapper-col="{ span:16}">
+              <a-select
+                id="unRecyclableRubbishTotal-provinceCode"
+                allowClear
+                v-model="queryParam.provinceCode"
+                @change="getCityList"
+                placeholder="请选择省">
+                <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item prop="cityCode" label=" " :colon="false" :label-col="{ span:4 }" :wrapper-col="{ span:16}">
+              <a-select
+                allowClear
+                id="unRecyclableRubbishTotal-cityCode"
+                v-model="queryParam.cityCode"
+                @change="getAreaList"
+                placeholder="请选择市">
+                <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item prop="districtCode" label=" " :colon="false" :label-col="{ span:0}" :wrapper-col="{ span:16}">
+              <a-select allowClear id="unRecyclableRubbishTotal-districtCode" v-model="queryParam.districtCode" placeholder="请选择区/县">
+                <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="4">
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="unRecyclableRubbishTotal-refresh" style="margin: 4px 10px 0 0">查询</a-button>
+            <a-button type="" @click="reset" id="unRecyclableRubbishTotal-reset" style="margin-top: 4px">重置</a-button>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="网点名称" :label-col="{ span:8}" :wrapper-col="{ span:16}">
+              <a-select
+                style="max-height: 50px;overflow: auto;"
+                id="unRecyclableRubbishTotal-stationNo"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">总计<span> {{ orderTotal }} </span>条,<span> {{ total }} </span>kg。
+        其中,其他垃圾总计<span> {{ otherTotal }} </span>kg,厨余垃圾总计<span>{{ chuyuTotal }} </span>kg,建筑垃圾总计<span> {{ jianzhuTotal }} </span>kg
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table ref="table" :rowKey="(record) => record.id" :columns="columns" :data="loadData" bordered>
+      <!-- 可回收物小计 -->
+      <template slot="totalWeight" slot-scope="text,record">
+        <span >{{ record.totalWeight ? (record.totalWeight/1000).toFixed(3)/1 : '0' }}</span>
+      </template>
+      <!-- 操作 -->
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { stationList } from '@/api/releaseRecord.js'
+import { getRubbishList, getRubbishTotal } from '@/api/reportForm.js'
+import { getProvince, getCityByPro, getDistrictByCity } from '@/api/station'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+export default {
+  components: {
+    STable,
+    VSelect
+  },
+  data () {
+    return {
+      orderTotal: 0, //  总计条数
+      total: 0, //  可回收垃圾总计
+      otherTotal: 0, //  其他垃圾总计
+      jianzhuTotal: 0, //  建筑垃圾总计
+      chuyuTotal: 0, //  厨余垃圾总计
+      queryParam: {
+        stationNo: undefined, // 网点名称
+        findRubbishDataBeginDate: null, // 开始时间
+        findRubbishDataEndDate: null, // 结束时间
+        provinceCode: undefined, //  省
+        cityCode: undefined, // 市
+        districtCode: undefined // 区
+      },
+      optionData: [], // 网点列表数据
+      addrProvinceList: [], //  省下拉
+      addrCityList: [], //  市下拉
+      addrDistrictList: [], //  区下拉
+      // 将默认当天时间日期回显在时间选择框中
+      time: [
+        moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
+      ],
+      dateFormat: 'YYYY-MM-DD', // 日期格式
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+        { title: '网点名称', dataIndex: 'stationName', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '其他垃圾(kg)', dataIndex: 'GATHER_OTHER', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
+        { title: '厨余垃圾(kg)', dataIndex: 'GATHER_KITCHEN', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
+        { title: '建筑垃圾(kg)', dataIndex: 'GATHER_BUILDING', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
+        { title: '总计(kg)', dataIndex: 'GATHER_TOTAL', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const searchData = Object.assign(parameter, this.queryParam)
+        if (this.time && this.time.length) {
+          searchData.findRubbishDataBeginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.findRubbishDataEndDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
+        } else {
+          searchData.findRubbishDataBeginDate = null
+          searchData.findRubbishDataEndDate = null
+        }
+        return getRubbishList(searchData).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            this.orderTotal = res.data.count || 0
+            this.getTotal()
+            return res.data
+          } else {
+            this.orderTotal = 0
+          }
+        })
+      }
+    }
+  },
+  mounted () {
+    this.getStationList()
+    this.getProvinceList()
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.findRubbishDataBeginDate = dateStrings[0]
+        this.queryParam.findRubbishDataEndDate = dateStrings[1]
+      }
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 获取网点数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+        } else {
+          this.optionData = []
+        }
+      })
+    },
+    // 获取省列表
+    getProvinceList () {
+      getProvince().then(res => {
+        if (res.status == 200) {
+          this.addrProvinceList = res.data || []
+        } else {
+          this.addrProvinceList = []
+        }
+      })
+    },
+    // 获取城市列表
+    getCityList (val) {
+      this.addrCityList = []
+      this.addrDistrictList = []
+      this.queryParam.cityCode = undefined
+      this.queryParam.districtCode = undefined
+      this.getCityListRequest(val)
+    },
+    getCityListRequest (val) {
+      getCityByPro({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrCityList = res.data || []
+        } else {
+          this.addrCityList = []
+        }
+      })
+    },
+    // 获取区县列表
+    getAreaList (val) {
+      this.addrDistrictList = []
+      this.queryParam.districtCode = undefined
+      this.getAreaListRequest(val)
+    },
+    getAreaListRequest (val) {
+      getDistrictByCity({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrDistrictList = res.data || []
+        } else {
+          this.addrDistrictList = []
+        }
+      })
+    },
+    // 总计
+    getTotal () {
+      const params = this.queryParam
+      if (this.time && this.time.length) {
+        params.findRubbishDataBeginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+        params.findRubbishDataEndDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
+      } else {
+        params.findRubbishDataBeginDate = null
+        params.findRubbishDataEndDate = null
+      }
+      getRubbishTotal(params).then(res => {
+        if (res.status == 200) {
+          if (res.data) {
+            this.otherTotal = res.data.GATHER_OTHER ? (res.data.GATHER_OTHER / 1000).toFixed(3) / 1 : '0'
+            this.jianzhuTotal = res.data.GATHER_BUILDING ? (res.data.GATHER_BUILDING / 1000).toFixed(3) / 1 : '0'
+            this.chuyuTotal = res.data.GATHER_KITCHEN ? (res.data.GATHER_KITCHEN / 1000).toFixed(3) / 1 : '0'
+            this.total = res.data.GATHER_TOTAL ? (res.data.GATHER_TOTAL / 1000).toFixed(3) / 1 : '0'
+          }
+        }
+      })
+    },
+    // 重置
+    reset () {
+      this.queryParam.stationNo = undefined
+      this.queryParam.findRubbishDataBeginDate = null
+      this.queryParam.findRubbishDataEndDate = null
+      this.queryParam.provinceCode = undefined
+      this.queryParam.cityCode = undefined
+      this.queryParam.districtCode = undefined
+      this.addrCityList = [] //  市下拉
+      this.addrDistrictList = [] //  区下拉
+      this.time = [
+        moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
+      ]
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>
+
+<style lang='less' scoped>
+	.unRecyclableRubbishTotal-container {
+		.unRecyclableRubbishTotal-container-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+				margin-bottom: 15px;
+			}
+		}
+	}
+</style>

+ 9 - 0
src/views/userInfo/userDetails.vue

@@ -52,6 +52,15 @@
         <p class="item-label">注册时间:</p>
         <p class="item-main">{{ page.registerTime ? page.registerTime : '--' }}</p>
       </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">用户注册方式:</p>
+        <p class="item-main">{{ page.introTypeDictValue ? page.introTypeDictValue : '--' }}</p>
+      </a-col>
+      <a-col :span="24" class="item-cont">
+        <p class="item-label">邀请人:</p>
+        <p class="item-main">{{ page.userName ? page.userName +'-': '' }}{{ page.userPhone ? page.userPhone : '' }}</p>
+        <p class="item-main" v-if="!page.userName && !page.userPhone">--</p>
+      </a-col>
       <a-col :span="24" class="item-cont">
         <p class="item-label">最后登录时间:</p>
         <p class="item-main">{{ page.lastLoginTime ? page.lastLoginTime : '--' }}</p>

+ 82 - 52
src/views/userInfo/userManageList.vue

@@ -37,18 +37,8 @@
                 <span style="margin:0 11%">-</span>
                 <a-input-number id="inputNumber" v-model="queryParam.currentGoldMax" :max="999999999" />
               </div>
-              <!-- <div class="input-number">
-                <a-input-number id="inputNumber" v-model="queryParam.currentGoldMax" :max="999999999" />
-              </div> -->
             </a-form-model-item>
           </a-col>
-          <!-- <a-col :span="2">
-            <a-form-model-item label=" " prop="currentGoldMax" :colon="false" :label-col="{span:1}" :wrapper-col="{span:23}">
-              <div class="input-number">
-                <a-input-number id="inputNumber" v-model="queryParam.currentGoldMax" :max="999999999" />
-              </div>
-            </a-form-model-item>
-          </a-col> -->
         </a-row>
         <a-row :gutter="20">
           <a-col :span="6">
@@ -104,7 +94,22 @@
             </a-form-item>
           </a-col>
         </a-row>
-        <a-row style="margin-bottom:15px">
+        <a-row :gutter="20">
+          <a-col :span="6">
+            <a-form-model-item label="用户注册方式" prop="introType" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.introType"
+                id="userManageList-introType"
+                code="INTRO_TYPE"
+                placeholder="请选择注册方式"
+                allowClear></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item label="邀请人" prop="userPhone" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input v-model.trim="queryParam.userPhone" placeholder="请输入邀请人手机号或姓名" id="userManageList-userPhone" @pressEnter="$refs.table.refresh(true)" allowClear/>
+            </a-form-model-item>
+          </a-col>
           <a-col style="float: right">
             <a-button class="handle-btn serach-btn" id="userManageList-btn-serach" type="primary" @click="refresh">查询</a-button>
             <a-button class="handle-btn" type="" id="userManageList-btn-reset" @click="handleReset">重置</a-button>
@@ -124,6 +129,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
+      :scroll="{ x: 1800}"
       bordered>
       <!--启用禁用 -->
       <template slot="state" slot-scope="text, record">
@@ -136,6 +142,12 @@
           @change="changeFlagHandle(text, record)" />
         <span v-if="!$hasPermissions('B_user_userManage_enable')">--</span>
       </template>
+      <!-- 受邀人 -->
+      <template slot="person" slot-scope="text,record">
+        <p>{{ record.userName }}</p>
+        <p>{{ record.userPhone }}</p>
+        <p v-if="!record.userName &&!record.userPhone">--</p>
+      </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
         <a-button id="userManageList-handleUser" type="link" @click="handleUser(record)" v-hasPermission="'B_user_userManage_userDetails'">用户详情</a-button>
@@ -192,12 +204,16 @@ export default {
         beginRegisterTime: null, //  注册时间最小值
         endRegisterTime: null, //  注册时间最大值
         labelNoList: [], // 网点标签
-        firstDeliveryStationNo: undefined // 首次投递
+        firstDeliveryStationNo: undefined, // 首次投递
+        introType: '', // 注册方式
+        userPhone: '' // 邀请人
       },
       loading: false, // 导出loading
       // 表头
-      columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
-        { title: '用户手机', dataIndex: 'mobile', width: 100, align: 'center' },
+      columns: [{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '用户手机', dataIndex: 'mobile', width: 150, align: 'center' },
+        { title: '用户注册方式', dataIndex: 'introTypeDictValue', width: 150, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '邀请人', dataIndex: 'person', width: 150, align: 'center', scopedSlots: { customRender: 'person' } },
         { title: '用户身份', dataIndex: 'customerRoleDictValue', width: 100, align: 'center' },
         { title: '乐豆余额', dataIndex: 'currentGold', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
         { title: '累计乐豆', dataIndex: 'totalGold', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
@@ -207,20 +223,20 @@ export default {
         { title: '状态', width: 100, dataIndex: 'state', align: 'center', scopedSlots: { customRender: 'state' } },
         { title: '首次投递网点', dataIndex: 'firstDeliveryStationName', width: 150, align: 'center', customRender: (text) => { return text || '--' } },
         { title: '网点标签', dataIndex: 'labelName', width: 150, align: 'center', customRender: (text) => { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }],
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 120, align: 'center' }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam)
         if (this.registerTime && this.registerTime.length) {
-          searchData.beginRegisterTime = moment(this.registerTime[0])
-          searchData.endRegisterTime = moment(this.registerTime[1])
+          searchData.beginRegisterTime = moment(this.registerTime[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.endRegisterTime = moment(this.registerTime[1]).format('YYYY-MM-DD 23:59:59')
         } else {
           searchData.beginRegisterTime = null
           searchData.endRegisterTime = null
         }
         if (this.lastDeliverTime && this.lastDeliverTime.length) {
-          searchData.beginDate = moment(this.lastDeliverTime[0])
-          searchData.endDate = moment(this.lastDeliverTime[1])
+          searchData.beginDate = moment(this.lastDeliverTime[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.endDate = moment(this.lastDeliverTime[1]).format('YYYY-MM-DD 23:59:59')
         } else {
           searchData.beginDate = null
           searchData.endDate = null
@@ -365,43 +381,57 @@ export default {
     // 导出
     handleExport () {
       const params = this.queryParam
-      if (this.lastDeliverTime && this.lastDeliverTime.length) {
-        params.beginDate = moment(this.lastDeliverTime[0])
-        params.endDate = moment(this.lastDeliverTime[1])
-        if (!params.beginDate && !params.endDate) {
-          this.$message.error('请先选择需要导出的最后投递时间区间再进行导出!')
-          return
-        }
-        // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
-        if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
-          this.$message.error('单次最多只能导出3个月的数据,请缩小最后投递时间查询区间后再进行导出!')
-          return
-        }
-      } else {
-        params.beginDate = ''
-        params.endDate = ''
-      }
-
       if (this.registerTime && this.registerTime.length) {
-        params.beginRegisterTime = moment(this.registerTime[0])
-        params.endRegisterTime = moment(this.registerTime[1])
-        if (!params.beginRegisterTime && !params.endRegisterTime) {
-          this.$message.error('请先选择需要导出的注册时间区间再进行导出!')
-          return
-        }
-        // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
-        if (moment(params.endRegisterTime).diff(moment(params.beginRegisterTime), 'months', true) > 3) {
-          this.$message.error('单次最多只能导出3个月的数据,请缩小注册时间查询区间后再进行导出!')
-          return
-        }
+        params.beginRegisterTime = moment(this.registerTime[0]).format('YYYY-MM-DD 00:00:00')
+        params.endRegisterTime = moment(this.registerTime[1]).format('YYYY-MM-DD 23:59:59')
       } else {
-        params.beginRegisterTime = ''
-        params.endRegisterTime = ''
+        params.beginRegisterTime = null
+        params.endRegisterTime = null
       }
-      if (this.lastDeliverTime.length == 0 && this.registerTime.length == 0) {
-        this.$message.error('请先选择需要导出的注册时间区间或最后投递时间区间再进行导出(3个月以内)!')
-        return
+      if (this.lastDeliverTime && this.lastDeliverTime.length) {
+        params.beginDate = moment(this.lastDeliverTime[0]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.lastDeliverTime[1]).format('YYYY-MM-DD 23:59:59')
+      } else {
+        params.beginDate = null
+        params.endDate = null
       }
+      // if (this.lastDeliverTime && this.lastDeliverTime.length) {
+      //   params.beginDate = moment(this.lastDeliverTime[0])
+      //   params.endDate = moment(this.lastDeliverTime[1])
+      //   if (!params.beginDate && !params.endDate) {
+      //     this.$message.error('请先选择需要导出的最后投递时间区间再进行导出!')
+      //     return
+      //   }
+      //   // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
+      //   if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
+      //     this.$message.error('单次最多只能导出3个月的数据,请缩小最后投递时间查询区间后再进行导出!')
+      //     return
+      //   }
+      // } else {
+      //   params.beginDate = ''
+      //   params.endDate = ''
+      // }
+
+      // if (this.registerTime && this.registerTime.length) {
+      //   params.beginRegisterTime = moment(this.registerTime[0])
+      //   params.endRegisterTime = moment(this.registerTime[1])
+      //   if (!params.beginRegisterTime && !params.endRegisterTime) {
+      //     this.$message.error('请先选择需要导出的注册时间区间再进行导出!')
+      //     return
+      //   }
+      //   // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
+      //   if (moment(params.endRegisterTime).diff(moment(params.beginRegisterTime), 'months', true) > 3) {
+      //     this.$message.error('单次最多只能导出3个月的数据,请缩小注册时间查询区间后再进行导出!')
+      //     return
+      //   }
+      // } else {
+      //   params.beginRegisterTime = ''
+      //   params.endRegisterTime = ''
+      // }
+      // if (this.lastDeliverTime.length == 0 && this.registerTime.length == 0) {
+      //   this.$message.error('请先选择需要导出的注册时间区间或最后投递时间区间再进行导出(3个月以内)!')
+      //   return
+      // }
 	  this.$confirm({
 	    title: '提示',
 	    content: '导出过程可能需要一段时间,且导出期间不可进行其他操作,确认要导出吗?',

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.102:8301/gc-admin/',
+        // target: 'http://192.168.16.103:8301/gc-admin/',
         target: 'https://lese.test.sxzxyj.net/gc-admin/',
         ws: false,
         changeOrigin: true,