Kaynağa Gözat

1、菜单页面整理

slowslo 4 yıl önce
ebeveyn
işleme
cfdfe4df6d
100 değiştirilmiş dosya ile 14989 ekleme ve 709 silme
  1. 8 0
      src/api/device/iotdevice.js
  2. 7 7
      src/api/grid/index.js
  3. 4 4
      src/components/bills-comp/bills-add.vue
  4. 1 1
      src/components/home-page/topMenu.vue
  5. 2 2
      src/components/houseuser/houseuser-check.vue
  6. 4 4
      src/components/person-tags/adolescent-form.vue
  7. 4 4
      src/components/person-tags/aids-form.vue
  8. 4 4
      src/components/person-tags/allowancespeople-form.vue
  9. 4 4
      src/components/person-tags/basicinfo-add.vue
  10. 4 4
      src/components/person-tags/correctionalStaff-form.vue
  11. 4 4
      src/components/person-tags/disabler-form.vue
  12. 4 4
      src/components/person-tags/disablerTags-detail.vue
  13. 4 4
      src/components/person-tags/disablerTags-form.vue
  14. 4 4
      src/components/person-tags/drug-form.vue
  15. 4 4
      src/components/person-tags/elderTags-detail.vue
  16. 4 4
      src/components/person-tags/elderTags-form.vue
  17. 4 4
      src/components/person-tags/elderlyPeople-form.vue
  18. 2 2
      src/components/person-tags/enterpriseStaffTags-detail.vue
  19. 2 2
      src/components/person-tags/enterpriseStaffTags-form.vue
  20. 4 4
      src/components/person-tags/establishFilecard-form.vue
  21. 4 4
      src/components/person-tags/fertileWoman-form.vue
  22. 4 4
      src/components/person-tags/keyPersonTags-detail.vue
  23. 4 4
      src/components/person-tags/keyPersonTags-form.vue
  24. 4 4
      src/components/person-tags/prisoner-form.vue
  25. 4 4
      src/components/person-tags/psychiatric-form.vue
  26. 4 4
      src/components/person-tags/veterans-form.vue
  27. 3 3
      src/components/scene/wvp/wvpvideodevice.vue
  28. 1 1
      src/components/select-dialog/select-dialog-agency.vue
  29. 3 3
      src/components/select-dialog/select-dialog-residential.vue
  30. 403 0
      src/views/accesscontrolmng/doordevice.vue
  31. 518 0
      src/views/businessmng/agencymng/agency.vue
  32. 413 0
      src/views/businessmng/agencymng/building.vue
  33. 873 0
      src/views/businessmng/agencymng/residential.vue
  34. 1492 0
      src/views/businessmng/agencymng/residentialManage.vue
  35. 360 0
      src/views/businessmng/assetmng.vue
  36. 453 0
      src/views/businessmng/enterprisemng.vue
  37. 372 0
      src/views/businessmng/estatemng/parkarticle.vue
  38. 260 0
      src/views/businessmng/estatemng/parknotice.vue
  39. 480 0
      src/views/businessmng/estatemng/parkrepair.vue
  40. 96 0
      src/views/businessmng/set-admin.vue
  41. 755 0
      src/views/businessmng/staffmng.vue
  42. 438 0
      src/views/businessmng/workordermng/deviceworkorder.vue
  43. 339 0
      src/views/businessmng/workordermng/publicevent.vue
  44. 2 2
      src/views/community/agency.vue
  45. 5 5
      src/views/community/building.vue
  46. 12 12
      src/views/community/floor.vue
  47. 3 3
      src/views/community/residential.vue
  48. 13 13
      src/views/community/residentialManage.vue
  49. 7 7
      src/views/community/room.vue
  50. 7 7
      src/views/community/unit.vue
  51. 4 4
      src/views/device/deviceList.vue
  52. 3 3
      src/views/device/doordevice.vue
  53. 2 2
      src/views/device/electricmeterstatic.vue
  54. 1 1
      src/views/device/elevatoralarm.vue
  55. 4 4
      src/views/device/elevatordevice.vue
  56. 2 2
      src/views/device/iot/cover.vue
  57. 10 10
      src/views/device/iot/electricmeter.vue
  58. 9 9
      src/views/device/iot/environmentmonitor.vue
  59. 290 59
      src/views/device/iot/firehydrant.vue
  60. 289 55
      src/views/device/iot/gasmonitoring.vue
  61. 2 2
      src/views/device/iot/hornbind.vue
  62. 412 230
      src/views/device/iot/iotdevice.vue
  63. 10 10
      src/views/device/iot/parkingmonitor.vue
  64. 2 2
      src/views/device/iot/smartcharge.vue
  65. 2 2
      src/views/device/iot/smartlamp.vue
  66. 302 79
      src/views/device/iot/smartsmoke.vue
  67. 2 2
      src/views/device/iot/smarttrashbin.vue
  68. 963 0
      src/views/device/iot/smoke.vue
  69. 2 2
      src/views/device/iotalarmgroup.vue
  70. 3 3
      src/views/device/iotdevice.vue
  71. 1 1
      src/views/device/videoSurveillance.vue
  72. 3 3
      src/views/device/videoclouddevice.vue
  73. 5 5
      src/views/device/videodevice/videocloud/videoclouddevice.vue
  74. 3 3
      src/views/device/videodevice/wvp/wvpvideodevice.vue
  75. 3 3
      src/views/estate/applyuser.vue
  76. 4 4
      src/views/estate/bills.vue
  77. 3 3
      src/views/estate/dailymng/repair.vue
  78. 1 1
      src/views/estate/guestmng/guestrecord.vue
  79. 4 4
      src/views/estate/noticepushrecord.vue
  80. 11 11
      src/views/estate/parkinglotmng/car.vue
  81. 12 12
      src/views/estate/parkinglotmng/parkinglot.vue
  82. 3 3
      src/views/estate/parkinglotmng/parkingspace.vue
  83. 3 3
      src/views/estate/passmng/accessrecord.vue
  84. 8 8
      src/views/estate/passmng/carenterrecord.vue
  85. 6 6
      src/views/estate/passmng/caroutrecord.vue
  86. 396 0
      src/views/guestmng/facetrajectory.vue
  87. 459 0
      src/views/guestmng/guestrecordmng.vue
  88. 521 0
      src/views/parkingmng/parkinglotmng.vue
  89. 373 0
      src/views/parkingmng/parkingspace.vue
  90. 407 0
      src/views/parkingmng/parkingvehicleinrecord.vue
  91. 575 0
      src/views/parkingmng/parkingvehiclemng.vue
  92. 417 0
      src/views/parkingmng/parkingvehicleoutrecord.vue
  93. 260 0
      src/views/parkservice/parknotice.vue
  94. 4 4
      src/views/party/branch.vue
  95. 4 4
      src/views/party/branchrelation.vue
  96. 240 0
      src/views/partymng/partyactivityapplicant.vue
  97. 438 0
      src/views/partymng/partybranch.vue
  98. 280 0
      src/views/partymng/partycomment.vue
  99. 407 0
      src/views/partymng/partymeeting.vue
  100. 414 0
      src/views/partymng/partymember.vue

+ 8 - 0
src/api/device/iotdevice.js

@@ -88,3 +88,11 @@ export const getIotDeviceStaticVo = (params) => {
     }
   })
 }
+
+export const sync = (row) => {
+  return request({
+    url: '/api/cyzh-smart-device/iotdevice/sync',
+    method: 'post',
+    data: row
+  })
+}

+ 7 - 7
src/api/grid/index.js

@@ -1,5 +1,5 @@
 import request from '@/router/axios';
-//所有统计、区列表
+//所有统计、区列表
 export const getCommunityList = (codeOrgPosition) => {
   return request({
     url: '/api/cyzh-community/statistics/screen/estate/static',
@@ -9,7 +9,7 @@ export const getCommunityList = (codeOrgPosition) => {
     }
   })
 }
-//区统计、小区列表
+//区统计、小区列表
 export const getCommunityDetail = (params) => {
   return request({
     url: '/api/cyzh-community/statistics/agency',
@@ -49,7 +49,7 @@ export const getResidentialDevices = (params) => {
     }
   })
 }
-//区设备列表
+//区设备列表
 export const getSmartdeviceAll = (type,id,status) => {
   return request({
     url: '/api/smartapplication/smartdevice/getAll',
@@ -61,7 +61,7 @@ export const getSmartdeviceAll = (type,id,status) => {
     }
   })
 }
-//区地磁、人脸、视频云、车辆统计
+//区地磁、人脸、视频云、车辆统计
 export const getMultiCount = (codeOrgPosition) => {
   return request({
     url: '/api/cyzh-community/statistics/screen/MultiStatic/static',
@@ -71,7 +71,7 @@ export const getMultiCount = (codeOrgPosition) => {
     }
   })
 }
-//区设备列表、设备统计
+//区设备列表、设备统计
 export const getDeviceCount = (deviceType,codeOrgPosition) => {
   return request({
     url: '/api/cyzh-community/statistics/screen/smartDevice/static',
@@ -82,7 +82,7 @@ export const getDeviceCount = (deviceType,codeOrgPosition) => {
     }
   })
 }
-//区设备列表、设备统计
+//区设备列表、设备统计
 export const getDeviceVideo = (id) => {
   return request({
     url: '/api/cyzh-smart-device/videoclouddevice/list',
@@ -135,7 +135,7 @@ export const getElectricMeterStatic = (id) => {
     }
   })
 }
-//区维度的设备告警
+//区维度的设备告警
 export const getSmartdevice = (params) => {
   return request({
     url: '/api/cyzh-smart-device/iotdevice/page',

+ 4 - 4
src/components/bills-comp/bills-add.vue

@@ -43,7 +43,7 @@
           dialogClickModal: false,
           column: [
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               slot: true,
               search: true,
@@ -60,12 +60,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               slot: true,
               type: "select",
@@ -83,7 +83,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 1 - 1
src/components/home-page/topMenu.vue

@@ -140,7 +140,7 @@
           }else{
             let orgInfo = this.$store.getters.orgInfo
             if(orgInfo.deptType=="5"){
-              //
+              //
               localStorage.setItem("agencies1",JSON.stringify(this.GardenDataList))
               path = 'index2'
             }else if(orgInfo.deptType=="6"||orgInfo.deptType=="1"||orgInfo.deptType=="4"){

+ 2 - 2
src/components/houseuser/houseuser-check.vue

@@ -106,7 +106,7 @@ export default {
             hide: true,
           },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "residentialId",
           //   type: "select",
           //   disabled: true,
@@ -123,7 +123,7 @@ export default {
           //   },
           //   rules: [{
           //     required: true,
-          //     message: "请输入所属区id",
+          //     message: "请输入所属区id",
           //     trigger: "blur"
           //   }]
           // },

+ 4 - 4
src/components/person-tags/adolescent-form.vue

@@ -79,7 +79,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -95,12 +95,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -117,7 +117,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 4 - 4
src/components/person-tags/aids-form.vue

@@ -79,7 +79,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -95,12 +95,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -117,7 +117,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 4 - 4
src/components/person-tags/allowancespeople-form.vue

@@ -79,7 +79,7 @@
                   }]
                 },
                 {
-                  label: "所属区",
+                  label: "所属区",
                   prop: "agencyId",
                   search: true,
                   cascaderItem: ['residentialId'],
@@ -95,12 +95,12 @@
                   },
                   rules: [{
                     required: true,
-                    message: "请选择所属区",
+                    message: "请选择所属区",
                     trigger: "blur"
                   }]
                 },
                 {
-                  label: "所属区",
+                  label: "所属区",
                   prop: "residentialId",
                   type: "select",
                   search: true,
@@ -117,7 +117,7 @@
                   },
                   rules: [{
                     required: true,
-                    message: "请选择所属区",
+                    message: "请选择所属区",
                     trigger: "blur"
                   }]
                 },

+ 4 - 4
src/components/person-tags/basicinfo-add.vue

@@ -77,7 +77,7 @@
                 }]
               },
               {
-                label: "所属区",
+                label: "所属区",
                 prop: "agencyId",
                 search: true,
                 cascaderItem: ['residentialId'],
@@ -93,12 +93,12 @@
                 },
                 rules: [{
                   required: true,
-                  message: "请选择所属区",
+                  message: "请选择所属区",
                   trigger: "blur"
                 }]
               },
               {
-                label: "所属区",
+                label: "所属区",
                 prop: "residentialId",
                 type: "select",
                 search: true,
@@ -115,7 +115,7 @@
                 },
                 rules: [{
                   required: true,
-                  message: "请选择所属区",
+                  message: "请选择所属区",
                   trigger: "blur"
                 }]
               },

+ 4 - 4
src/components/person-tags/correctionalStaff-form.vue

@@ -77,7 +77,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -93,12 +93,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -115,7 +115,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 4 - 4
src/components/person-tags/disabler-form.vue

@@ -79,7 +79,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -95,12 +95,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -117,7 +117,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 4 - 4
src/components/person-tags/disablerTags-detail.vue

@@ -85,7 +85,7 @@
                   }]
                 },
                 // {
-                //   label: "所属区",
+                //   label: "所属区",
                 //   prop: "agencyId",
                 //   slot: true,
                 //   search: true,
@@ -102,12 +102,12 @@
                 //   },
                 //   rules: [{
                 //     required: true,
-                //     message: "请选择所属区",
+                //     message: "请选择所属区",
                 //     trigger: "blur"
                 //   }]
                 // },
                 // {
-                //   label: "所属区",
+                //   label: "所属区",
                 //   prop: "residentialId",
                 //   slot: true,
                 //   type: "select",
@@ -125,7 +125,7 @@
                 //   },
                 //   rules: [{
                 //     required: true,
-                //     message: "请选择所属区",
+                //     message: "请选择所属区",
                 //     trigger: "blur"
                 //   }]
                 // },

+ 4 - 4
src/components/person-tags/disablerTags-form.vue

@@ -187,7 +187,7 @@ export default {
             }]
           },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "agencyId",
           //   slot: true,
           //   search: true,
@@ -204,12 +204,12 @@ export default {
           //   },
           //   rules: [{
           //     required: true,
-          //     message: "请选择所属区",
+          //     message: "请选择所属区",
           //     trigger: "blur"
           //   }]
           // },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "residentialId",
           //   slot: true,
           //   type: "select",
@@ -227,7 +227,7 @@ export default {
           //   },
           //   rules: [{
           //     required: true,
-          //     message: "请选择所属区",
+          //     message: "请选择所属区",
           //     trigger: "blur"
           //   }]
           // },

+ 4 - 4
src/components/person-tags/drug-form.vue

@@ -83,7 +83,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -99,14 +99,14 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
               },{
                 validator: validatenull,
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -123,7 +123,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 4 - 4
src/components/person-tags/elderTags-detail.vue

@@ -88,7 +88,7 @@
                   }]
                 },
                 // {
-                //   label: "所属区",
+                //   label: "所属区",
                 //   prop: "agencyId",
                 //   slot: true,
                 //   search: true,
@@ -105,12 +105,12 @@
                 //   },
                 //   rules: [{
                 //     required: true,
-                //     message: "请选择所属区",
+                //     message: "请选择所属区",
                 //     trigger: "blur"
                 //   }]
                 // },
                 // {
-                //   label: "所属区",
+                //   label: "所属区",
                 //   prop: "residentialId",
                 //   slot: true,
                 //   type: "select",
@@ -128,7 +128,7 @@
                 //   },
                 //   rules: [{
                 //     required: true,
-                //     message: "请选择所属区",
+                //     message: "请选择所属区",
                 //     trigger: "blur"
                 //   }]
                 // },

+ 4 - 4
src/components/person-tags/elderTags-form.vue

@@ -181,7 +181,7 @@
               }]
             },
             // {
-            //   label: "所属区",
+            //   label: "所属区",
             //   prop: "agencyId",
             //   slot: true,
             //   search: true,
@@ -198,12 +198,12 @@
             //   },
             //   rules: [{
             //     required: true,
-            //     message: "请选择所属区",
+            //     message: "请选择所属区",
             //     trigger: "blur"
             //   }]
             // },
             // {
-            //   label: "所属区",
+            //   label: "所属区",
             //   prop: "residentialId",
             //   slot: true,
             //   type: "select",
@@ -221,7 +221,7 @@
             //   },
             //   rules: [{
             //     required: true,
-            //     message: "请选择所属区",
+            //     message: "请选择所属区",
             //     trigger: "blur"
             //   }]
             // },

+ 4 - 4
src/components/person-tags/elderlyPeople-form.vue

@@ -79,7 +79,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -95,12 +95,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -117,7 +117,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 2 - 2
src/components/person-tags/enterpriseStaffTags-detail.vue

@@ -76,7 +76,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
@@ -99,7 +99,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 2 - 2
src/components/person-tags/enterpriseStaffTags-form.vue

@@ -78,7 +78,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
@@ -101,7 +101,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 4 - 4
src/components/person-tags/establishFilecard-form.vue

@@ -77,7 +77,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -93,12 +93,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -115,7 +115,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 4 - 4
src/components/person-tags/fertileWoman-form.vue

@@ -79,7 +79,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -95,12 +95,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -117,7 +117,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 4 - 4
src/components/person-tags/keyPersonTags-detail.vue

@@ -101,7 +101,7 @@
               }]
             },
             // {
-            //   label: "所属区",
+            //   label: "所属区",
             //   prop: "agencyId",
             //   slot: true,
             //   search: true,
@@ -118,12 +118,12 @@
             //   },
             //   rules: [{
             //     required: true,
-            //     message: "请选择所属区",
+            //     message: "请选择所属区",
             //     trigger: "blur"
             //   }]
             // },
             // {
-            //   label: "所属区",
+            //   label: "所属区",
             //   prop: "residentialId",
             //   slot: true,
             //   type: "select",
@@ -141,7 +141,7 @@
             //   },
             //   rules: [{
             //     required: true,
-            //     message: "请选择所属区",
+            //     message: "请选择所属区",
             //     trigger: "blur"
             //   }]
             // },

+ 4 - 4
src/components/person-tags/keyPersonTags-form.vue

@@ -96,7 +96,7 @@ export default {
             }]
           },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "agencyId",
           //   slot: true,
           //   search: true,
@@ -113,12 +113,12 @@ export default {
           //   },
           //   rules: [{
           //     required: true,
-          //     message: "请选择所属区",
+          //     message: "请选择所属区",
           //     trigger: "blur"
           //   }]
           // },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "residentialId",
           //   slot: true,
           //   type: "select",
@@ -136,7 +136,7 @@ export default {
           //   },
           //   rules: [{
           //     required: true,
-          //     message: "请选择所属区",
+          //     message: "请选择所属区",
           //     trigger: "blur"
           //   }]
           // },

+ 4 - 4
src/components/person-tags/prisoner-form.vue

@@ -77,7 +77,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -93,12 +93,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -115,7 +115,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 4 - 4
src/components/person-tags/psychiatric-form.vue

@@ -77,7 +77,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -93,12 +93,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -115,7 +115,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 4 - 4
src/components/person-tags/veterans-form.vue

@@ -77,7 +77,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               cascaderItem: ['residentialId'],
@@ -93,12 +93,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -115,7 +115,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 3 - 3
src/components/scene/wvp/wvpvideodevice.vue

@@ -334,7 +334,7 @@ export default {
       bindOption: {
         column: [
           {
-            label: "所属区",
+            label: "所属区",
             prop: "residentialId",
             type: "select",
             search: true,
@@ -350,7 +350,7 @@ export default {
             },
             rules: [{
               required: true,
-              message: "请选择所属区",
+              message: "请选择所属区",
               trigger: "blur"
             }]
           },
@@ -536,7 +536,7 @@ export default {
     },
     bindBatchDevice(loading,done) {
       // if (this.selectValue == "") {
-      //   this.$message.warning("请选择所属区");
+      //   this.$message.warning("请选择所属区");
       //   return;
       // }
       //保存

+ 1 - 1
src/components/select-dialog/select-dialog-agency.vue

@@ -14,7 +14,7 @@
           children:{
             border: true,
             column: [{
-              label: '区名称',
+              label: '区名称',
               search:true,
               prop: 'name'
             },

+ 3 - 3
src/components/select-dialog/select-dialog-residential.vue

@@ -18,7 +18,7 @@
               search:true,
               prop: 'name'
             }, {
-              label: '所属区',
+              label: '所属区',
               search:true,
               prop: 'agencyName'
             }, {
@@ -53,8 +53,8 @@
     created() {
       const tenantType = localStorage.getItem("tenantType");
       if (tenantType == 0){
-        this.column.children.column[0].label = "所属区"
-        this.column.children.column[1].label = "所属区"
+        this.column.children.column[0].label = "所属区"
+        this.column.children.column[1].label = "所属区"
       }else if (tenantType == 1){
         this.column.children.column[0].label = "所属区域"
         this.column.children.column[1].label = "所属园区"

+ 403 - 0
src/views/accesscontrolmng/doordevice.vue

@@ -0,0 +1,403 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.facedevice_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="menu" slot-scope="{row}">
+        <el-button @click="openDoor(row)" size="small" type="text">远程开门</el-button>
+      </template>
+      <template slot="mapSelectForm" slot-scope="scope">
+        <!-- <avue-map v-model="scope.row.mapSelect"></avue-map> -->
+        <div>
+          <el-button @click="mapVisible = true">选择地址</el-button>
+
+          <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="mapVisible"
+                     title="编辑地址" width="80%">
+            <!--            <customAvueMap v-if="mapVisible" v-model="scope.row.mapSelect"></customAvueMap>-->
+            <editPolygonMap v-if="mapVisible" :editForm.sync="scope.row" :region.sync="scope.row.address" :latitude.sync="scope.row.latitude" :longitude.sync="scope.row.longitude" :visible.sync="mapVisible"></editPolygonMap>
+          </el-dialog>
+        </div>
+      </template>
+      <template slot="residentialId" slot-scope="scope">{{scope.row.residentialName}}</template>
+      <template slot="residentialIdForm" slot-scope="scope">
+        <select-dialog-residential :id="form.residentialId" :name="form.residentialName" :callback="selectCallback"></select-dialog-residential>
+      </template>
+      <template slot="deviceStatus" slot-scope="{row}">
+        <el-tag v-if="row.deviceStatus === 0" type="info">离线</el-tag>
+        <el-tag v-if="row.deviceStatus === 1" type="success">在线</el-tag>
+        <el-tag v-if="row.deviceStatus === 2" type="danger">异常</el-tag>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+import {getList, getDetail, add, update, remove, remoteOpenDoor} from "../../api/device/doordevice.js";
+import {mapGetters} from "vuex";
+import customAvueMap from "../../components/residential/customAvueMap.vue"
+import editPolygonMap from "../../components/residential/editPolygonMap.vue";
+import SelectDialogResidential from "../../components/select-dialog/select-dialog-residential";
+export default {
+  components:{
+    SelectDialogResidential,
+    customAvueMap,editPolygonMap
+  },
+  data() {
+    return {
+      mapVisible:false,
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {
+        height:'auto',
+        calcHeight: 60,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: false,
+        delBtn: true,
+        selection: true,
+        dialogClickModal: false,
+        menuWidth:350,
+        column: [
+          {
+            label: "设备名称",
+            prop: "name",
+            search: true,
+            overHidden: true,
+            rules: [{
+              required: true,
+              message: "请输入名称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label:'',
+            prop:'mapSelect',
+            viewDisplay: false,
+            formslot: true,
+            hide: true,
+          },
+          {
+            label: "经度",
+            prop: "longitude",
+            width: 100,
+            overHidden: true,
+            hide:true,
+            rules: [{
+              required: true,
+              message: "请输入经度",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "纬度",
+            prop: "latitude",
+            width: 100,
+            overHidden: true,
+            hide:true,
+            rules: [{
+              required: true,
+              message: "请输入纬度",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "设备序列号",
+            prop: "macAddress",
+            width: 200,
+            rules: [{
+              required: true,
+              message: "请输入Mac编码",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "设备厂商",
+            prop: "deviceFactory",
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=door_device_factory",
+            props:{
+              label: "dictValue",
+              value: "dictKey"
+            },
+            width: 135,
+            rules: [{
+              required: true,
+              message: "请选择设备厂商",
+              trigger: "blur"
+            }],
+            hide: true
+          },
+          // {
+          //   label: "所属园区",
+          //   prop: "agencyName",
+          //   editDisplay:false,
+          //   addDisplay:false
+          // },
+          {
+            label: "所属区域",
+            prop: "residentialId",
+            dicFlag: true,
+            type: "select",
+            search: true,
+            searchFilterable: true,
+            slot: true,
+            formslot: true,
+            dataType: "number",
+            dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+            dicFormatter:(res)=>{
+              return res.data.records;//返回字典的层级结构
+            },
+            props: {
+              label: "name",
+              value: "id"
+            },
+            rules: [{
+              required: true,
+              message: "请选择所属区域",
+              trigger: "change"
+            }],
+          },
+          {
+            label: "具体地址",
+            prop: "address",
+            width: 350,
+            search: true,
+            overHidden: true,
+            rules: [{
+              required: true,
+              message: "请输入具体地址",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "设备状态",
+            prop: "deviceStatus",
+            type: "select",
+            dicUrl:"/api/blade-system/dict-biz/dictionary?code=face_device_status",
+            props: {
+              label: 'dictValue',
+              value: 'dictKey'
+            },
+            dataType: "number",
+            display: false,
+            slot: true
+          },
+          {
+            label: "最近心跳",
+            prop: "heartbeatTime"
+          }
+        ]
+      },
+      data: []
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.doordevice_add, false),
+        viewBtn: this.vaildData(this.permission.doordevice_view, false),
+        delBtn: this.vaildData(this.permission.doordevice_delete, false),
+        editBtn: this.vaildData(this.permission.doordevice_edit, false)
+      };
+    },
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+
+  watch: {
+    'form.mapSelect': {
+      handler: function(value) {
+        if (!value){
+          return
+        }else{
+          this.form.longitude = this.form.mapSelect.longitude;
+          this.form.latitude = this.form.mapSelect.latitude;
+        }
+      },
+    }
+  },
+
+  created() {
+    const tenantType = localStorage.getItem("tenantType");
+    if (tenantType == 0){
+      this.findObject(this.option.column, 'residentialId').label = "所属区域";
+      this.findObject(this.option.column, 'residentialId').rules[0].message = "请选择所属区域";
+      // this.option.column[2].label = "所属区域"
+    }else if (tenantType == 1){
+      // this.option.column[2].label = "所属区域"
+      this.findObject(this.option.column, 'residentialId').label = "所属区域";
+      this.findObject(this.option.column, 'residentialId').rules[0].message = "请选择所属区域";
+    }
+  },
+
+  methods: {
+    openDoor(row){
+      remoteOpenDoor(row.id, true).then(res =>{
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+      });
+    },
+    selectCallback(row){
+      this.form.latitude = row.latitude;
+      this.form.longitude = row.longitude;
+      this.form.address = row.address;
+      this.form.residentialId = row.id;
+      this.form.residentialName = row.name;
+    },
+    rowSave(row, done, loading) {
+      add(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      update(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        });
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(this.ids);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.$refs.crud.toggleSelection();
+        });
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage){
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+        this.selectionClear();
+      });
+    }
+  }
+};
+</script>
+
+<style>
+</style>

+ 518 - 0
src/views/businessmng/agencymng/agency.vue

@@ -0,0 +1,518 @@
+<template>
+  <basic-container>
+
+<!--卡片数据展示-->
+    <el-card style="margin-bottom: 20px">
+        <el-tabs type="border-card">
+          <el-tab-pane label="园区数据统计">
+            <div><avue-data-box :option="communityStatistics"></avue-data-box></div>
+          </el-tab-pane>
+        </el-tabs>
+    </el-card>
+
+    <avue-crud :option="option" :table-loading="loading" :data="data" :page="page" :permission="permissionList"
+               :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
+               @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+               @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.agency_delete" @click="handleDelete">删 除</el-button>
+        <cy-excel-import :flag="1" file-name="园区信息导入模板" @success="onLoad(page)"></cy-excel-import>
+      </template>
+      <template slot="mapSelectForm" slot-scope="scope">
+        <div>
+          <!--          <input class="el-input&#45;&#45;small el-input__inner" placeholder="选择地址" @click="mapVisible = true">-->
+          <el-button @click="mapVisible = true"> 选择地址</el-button>
+          <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="mapVisible"
+                     title="编辑地址" width="80%">
+            <editPolygonMap v-if="mapVisible" :editForm.sync="scope.row" :region.sync="scope.row.address" :latitude.sync="scope.row.latitude" :longitude.sync="scope.row.longitude" :visible.sync="mapVisible"></editPolygonMap>
+          </el-dialog>
+        </div>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+import {
+  getList,
+  getDetail,
+  add,
+  update,
+  remove
+} from "@/api/community/agency.js";
+import {getCommunityList} from "../../../api/grid/index";
+import {
+  mapGetters
+} from "vuex";
+import {
+  validatePhone
+} from "@/util/validator"
+import CyExcelImport from "../../../components/excel/cy-excel-import"
+import editPolygonMap from "../../../components/residential/editPolygonMap.vue"
+import {getDetail as getRegDetail} from "@/api/base/region"
+export default {
+  components: {CyExcelImport,editPolygonMap},
+  data() {
+    return {
+      communityCount:{},
+      mapVisible:false,
+      areaData: [],
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      //数据展示
+      communityStatistics:{
+        span:6,
+        data: [
+          {
+            title: '园区数量',
+            count: 0,
+            icon: 'el-icon-office-building',
+            color: 'rgb(49, 180, 141)',
+          },
+          {
+            title: '区域数量',
+            count: 0,
+            icon: 'el-icon-school',
+            color: 'rgb(56, 161, 242)',
+          },
+          {
+            title: '楼宇数量',
+            count: 0,
+            icon: 'el-icon-s-home',
+            color: 'rgb(117, 56, 199)',
+          },
+          {
+            title: '住户数量',
+            count: 0,
+            icon: 'el-icon-user-solid',
+            color: 'rgb(143,119,0)',
+          },
+        ]
+      },
+
+      selectionList: [],
+      option: {
+        height: 'auto',
+        // calcHeight: 60,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: true,
+        selection: true,
+        dialogClickModal: false,
+        menuWidth:350,
+        column: [{
+          label: "名称",
+          prop: "name",
+          search: true,
+          width: 160,
+          overHidden: true,
+          rules: [{
+            required: true,
+            message: "请输入名称",
+            trigger: "blur"
+          }]
+        },
+          {
+            label:'',
+            prop:'mapSelect',
+            viewDisplay: false,
+            formslot: true,
+            hide: true,
+          },
+          {
+            label: "经度",
+            prop: "longitude",
+            width: 120,
+            hide: true,
+            rules: [{
+              required: false,
+              message: "请输入经度",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "纬度",
+            prop: "latitude",
+            width: 120,
+            hide: true,
+            rules: [{
+              required: false,
+              message: "请输入纬度",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "所属省",
+            prop: "regionProvince",
+            type: "select",
+            width: 150,
+            dicUrl: "/api/blade-system/region/lazy-tree?parentCode=000000",
+            cascaderItem:["regionCity"],
+            props:{
+              label:"title",
+              value: "id"
+            },
+            rules: [{
+              required: true,
+              message: "请选择所属省份",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "所属市",
+            prop: "regionCity",
+            type: "select",
+            width: 150,
+            dicFlag: true,
+            cascaderItem: ["regionArea"],
+            dicUrl: `/api/blade-system/region/lazy-tree?parentCode={{key}}`,
+
+            props:{
+              label: "title",
+              value: "id"
+            },
+            rules: [{
+              required: false,
+              message: "请选择所属市",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "所属区",
+            prop: "regionArea",
+            type: "select",
+            width: 150,
+            cascaderItem: ["regionStreet"],
+            dicUrl:  `/api/blade-system/region/lazy-tree?parentCode={{key}}`,
+            props: {
+              label: "title",
+              value: "id"
+            },
+            rules: [{
+              required: false,
+              message: "请选择所属区",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "所属街道",
+            prop: "regionStreet",
+            type:"select",
+
+            width: 150,
+            dicUrl: `/api/blade-system/region/lazy-tree?parentCode={{key}}`,
+            props: {
+              label: "title",
+              value: "id"
+            },
+
+            rules: [{
+              required: true,
+              message: "请选择所属街道",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "详细地址",
+            search: true,
+            prop: "address",
+            type: "textarea",
+            maxRows: 2,
+            // width: 300,
+            overHidden: true,
+            rules: [{
+              required: false,
+              message: "请输入详细地址",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "负责人名称",
+            prop: "personName",
+            width: 210,
+            labelWidth: 100,
+            rules: [{
+              required: false,
+              message: "请输入负责人名称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "联系方式",
+            prop: "personPhone",
+            width: 120,
+            rules: [{
+              required: false,
+              message: "请输入负责人联系方式",
+              trigger: "blur"
+            }, {
+              validator: validatePhone,
+              trigger: "blur"
+            }],
+          },
+          {
+            label: "背景图",
+            prop: "pic",
+            type: 'upload',
+            hide: true,
+            propsHttp: {
+              res: "data",
+              url: 'link'
+            },
+            listType: 'picture-img',
+            span: 24,
+            row: true,
+            action: "/api/blade-resource/oss/endpoint/put-file",
+            display: true,
+            tip:"上传图片不能超过500K",
+            rules: [{
+              required: false,
+              message: "请上传封面图片",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "小区数量",
+            prop: "residentialCount",
+            display: false,
+            hide: true,
+          },
+          {
+            label: "楼栋数量",
+            prop: "buildingCount",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "单元数量",
+            prop: "unitCount",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "楼层数量",
+            prop: "floorCount",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "房间数量",
+            prop: "roomCount",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "人员数量",
+            prop: "personCount",
+            hide: true,
+            display: false,
+          },
+
+          {
+            label: "备注",
+            prop: "remark",
+            hide: true,
+          },
+        ]
+      },
+      data: []
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.agency_add, false),
+        viewBtn: this.vaildData(this.permission.agency_view, false),
+        delBtn: this.vaildData(this.permission.agency_delete, false),
+        editBtn: this.vaildData(this.permission.agency_edit, false)
+      };
+    },
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    },
+  },
+  watch: {
+    'form.address': {
+      handler: function(value) {
+        if (!value){
+          return
+        }else{
+          var _this = this
+          AMap.plugin('AMap.Geocoder', function() {
+            var geocoder = new AMap.Geocoder({})
+            let lnglat = [_this.form.longitude,_this.form.latitude]
+            geocoder.getAddress(lnglat, function(status, result) {
+              if (status === 'complete'&&result.regeocode&&result.regeocode.addressComponent.township) {
+                let parentCode = result.regeocode.addressComponent.adcode
+                let name = result.regeocode.addressComponent.township
+                getRegDetail({"name":name,"regionLevel":"4","parentCode":parentCode}).then((res)=>{
+                  let data = res.data.data
+                  let obj = {}
+                  obj['regionProvince'] = data.provinceCode
+                  obj['regionCity']  = data.cityCode
+                  obj['regionArea'] = data.districtCode
+                  obj['regionStreet'] = data.code
+                  _this.form = obj
+                })
+              }
+            })
+          })
+        }
+      },
+    },
+    'form.mapSelect': {
+      handler: function(value) {
+        if (!value){
+          return
+        }else{
+          this.form.longitude = this.form.mapSelect.longitude;
+          this.form.latitude = this.form.mapSelect.latitude;
+          this.form.address = this.form.mapSelect.formattedAddress;
+        }
+      },
+    }
+  },
+  methods: {
+    rowSave(row, done, loading) {
+      row.residentialCount = 0;
+      row.unitCount = 0;
+      row.roomCount = 0;
+      row.personCount = 0;
+      row.carCount = 0;
+      add(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      update(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        });
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(this.ids);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.$refs.crud.toggleSelection();
+        });
+    },
+    beforeOpen(done, type) {
+
+      if (["edit", "view"].includes(type)) {
+        getDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      getCommunityList('/640000').then(res=>{
+        this.communityCount = res.data.data;
+        console.log(this.communityCount,"打印communityCount");
+        this.communityStatistics.data[0].count = this.communityCount.agencyCount;
+        this.communityStatistics.data[1].count = this.communityCount.residentialCount;
+        this.communityStatistics.data[2].count = this.communityCount.buildingCount;
+        this.communityStatistics.data[3].count = this.communityCount.userCount;
+      });
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+        this.selectionClear();
+      });
+    }
+  }
+};
+</script>
+
+<style>
+</style>

+ 413 - 0
src/views/businessmng/agencymng/building.vue

@@ -0,0 +1,413 @@
+<template>
+  <basic-container>
+    <el-dialog  :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="editVisible" title="楼栋编辑"
+                width="80%">
+      <avue-form v-model="editForm" :option="option" @submit="submitBuilding"></avue-form>
+    </el-dialog>
+    <el-dialog :modal-append-to-body="false" :visible.sync="deviceDialog" title="设备管理" width="70%">
+      <devicebuilding :buildingId="buildingId"></devicebuilding>
+    </el-dialog>
+    <el-dialog :modal-append-to-body="false" :visible.sync="videoDialog" title="设备管理" width="70%">
+      <buildingvideo :buildingId="buildingId"></buildingvideo>
+    </el-dialog>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.building_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="menu" slot-scope="scope">
+        <el-button type="text" size="small" icon="el-icon-setting">
+          <el-dropdown @command="tip">
+            <span class="el-dropdown-link">
+              操作<i class="el-icon-arrow-down el-icon--right"> </i>
+            </span>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item divided @click.native="edit(scope.row)" icon="el-icon-school">编辑</el-dropdown-item>
+<!--              <el-dropdown-item divided @click.native="buildingManage(scope.row.id,1)" icon="el-icon-school">单元管理</el-dropdown-item>-->
+<!--              <el-dropdown-item divided @click.native="buildingManage(scope.row.id,2)" icon="el-icon-s-order">楼层管理</el-dropdown-item>-->
+<!--              <el-dropdown-item divided @click.native="buildingManage(scope.row.id,3)" icon="el-icon-s-home">房间管理</el-dropdown-item>-->
+              <el-dropdown-item divided @click.native="buildingManage(scope.row.id,4)" icon="el-icon-user-solid" v-if="permission.permanent_people_view">住户管理</el-dropdown-item>
+              <el-dropdown-item divided @click.native="manageDevice(scope.row)" icon="el-icon-s-management">设备管理</el-dropdown-item>
+              <el-dropdown-item divided @click.native="manageVideo(scope.row)" icon="el-icon-s-management">视频监控</el-dropdown-item>
+              <!-- <el-dropdown-item divided @click.native="tip(2,scope.row)">审核通过</el-dropdown-item> -->
+            </el-dropdown-menu>
+          </el-dropdown>
+        </el-button>
+        <!-- <el-button type="text" icon="el-icon-setting" size="mini" @click="manageResidential(scope.row.oldId)">管理</el-button> -->
+      </template>
+      <template slot="residentialId" slot-scope="scope">
+        <div>{{scope.row.residentialName}}</div>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+import {getList, getDetail, add, update, remove} from "../../../api/community/building.js";
+import devicebuilding from "@/views/smartapplication/devicebuilding";
+import buildingvideo from "@/views/smartapplication/buildingvideo";
+import {communityManage} from "@/views/community/util/communityManage";
+import {mapGetters} from "vuex";
+
+export default {
+  components: {
+    devicebuilding,
+    buildingvideo
+  },
+  data() {
+    return {
+      buildingId : '',
+      deviceDialog: false,
+      videoDialog: false,
+      editForm: {},
+      editVisible: false,
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {
+        height:'auto',
+        calcHeight: 60,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: false,
+        // addBtn: false,
+        editBtn: false,
+        delBtn: true,
+        selection: true,
+        dialogClickModal: false,
+        column: [
+          {
+            label: "楼栋名称",
+            prop: "name",
+            rules: [{
+              required: true,
+              message: "请输入楼栋名称",
+              trigger: "blur"
+            }]
+          },
+          // {
+          //   label: "所属区域",
+          //   prop: "residentialId",
+          //   type:"select",
+          //   remote: true,
+          //   //回显的时候有问题,如果所选不在前十条内,下拉框只会显示id
+          //   dicUrl: "/api/cyzh-community/residential/list?size=200&name={{key}}",
+          //   dicFormatter:(res)=>{
+          //     return res.data.records;//返回字典的层级结构
+          //   },
+          //   props:{
+          //     label: "name",
+          //     value: "id"
+          //   },
+          //   searchFilterable: true,
+          //   search: true,
+          //   slot: true,
+          //   rules: [{
+          //     required: true,
+          //     message: "请输入",
+          //     trigger: "blur"
+          //   }]
+          // },
+          {
+            label: "所属区域",
+            prop: "residentialId",
+            slot: true,
+            type: "select",
+            search: true,
+            searchFilterable: true,
+            // cascaderItem: ['buildingId'],
+            dicUrl: "/api/cyzh-community/residential/select?size=100",
+            // dicFormatter:(res)=>{
+            //   return res.data.records;//返回字典的层级结构
+            // },
+            // dicFlag: false,
+            // filterable: true,
+            props: {
+              label: "name",
+              value: "id"
+            },
+            rules: [{
+              required: true,
+              message: "请选择所属区域",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "图片",
+            prop: "pic",
+            type: 'upload',
+            // dataType: 'string',
+            hide: true,
+            propsHttp: {
+              res: "data",
+              url: 'link'
+            },
+            listType: 'picture-img',
+            span: 24,
+            row: true,
+            // value: "/img/default/building.png",
+            action: "/api/blade-resource/oss/endpoint/put-file",
+            rules: [{
+              required: false,
+              message: "请上传封面图片",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "单元数",
+            prop: "unitCount",
+            display: false,
+            rules: [{
+              required: false,
+              message: "请输入",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "楼层数",
+            prop: "floorCount",
+            display: false,
+            rules: [{
+              required: false,
+              message: "请输入",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "房间数",
+            prop: "roomCount",
+            display: false,
+            rules: [{
+              required: false,
+              message: "请输入",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "总人口数",
+            prop: "userCount",
+            display: false,
+            hide: true,
+            rules: [{
+              required: false,
+              message: "请输入",
+              trigger: "blur"
+            }]
+          },
+        ]
+      },
+      data: []
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.building_add, false),
+        viewBtn: this.vaildData(this.permission.building_view, false),
+        delBtn: this.vaildData(this.permission.building_delete, false),
+        editBtn: this.vaildData(this.permission.building_edit, false)
+      };
+    },
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  mounted() {
+    let tenantType = localStorage.getItem("tenantType");
+    const residentialColumn = this.findObject(this.option.column, "residentialId");
+    if (tenantType == 1) { //园区
+      residentialColumn.label = "所属区域"
+    } else { //园区
+      residentialColumn.label = "所属区域"
+    }
+  },
+  methods: {
+    submitBuilding(row,done,loading){
+      update(this.editForm).then(() => {
+        this.onLoad(this.page);
+        this.editVisible = false;
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    edit(row){
+      this.editForm = row;
+      this.editVisible = true;
+    },
+    buildingManage(id,type){
+      let query = {buildingId: id};
+      communityManage(this,type,query)
+    },
+    manageDevice(row){
+      this.buildingId = row.id;
+      this.deviceDialog = true
+    },
+    manageVideo(row){
+      this.buildingId = row.id;
+      this.videoDialog = true
+    },
+    rowSave(row, done, loading){
+      add(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      update(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        });
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(this.ids);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.$refs.crud.toggleSelection();
+        });
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage){
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+
+
+      console.log("dfdf:"+ this.$route.query.residentialOldId);
+      if(this.$route.query.residentialOldId != undefined){
+
+        params.residentialId = this.$route.query.oldId;
+
+      }
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+        this.selectionClear();
+      });
+    }
+  }
+};
+</script>
+
+<style>
+</style>

+ 873 - 0
src/views/businessmng/agencymng/residential.vue

@@ -0,0 +1,873 @@
+<template>
+  <basic-container>
+    <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false"
+      :visible.sync="manageVisible" title="管理" fullscreen="true" @close="closeManage">
+
+      <residentialManage ref="resMang" :residentialId="selectedResidentialId" :residentialName="selectedResidentialName"
+        :visible="manageVisible">
+
+      </residentialManage>
+
+    </el-dialog>
+    <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false"
+      :visible.sync="detailVisible" title="详情" width="80%">
+      <residential-detail :form="detailForm" ref="residentialDetail"></residential-detail>
+    </el-dialog>
+    <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false"
+      :visible.sync="editVisible" title="编辑" width="80%">
+      <avue-form v-model="editForm" :option="option" @submit="submitResidential">
+        <template slot="mapSelect">
+          <!--          <input class="el-input&#45;&#45;small el-input__inner" placeholder="选择地址" @click="mapVisible = true">-->
+          <el-button @click="mapVisible = true">选择地址</el-button>
+        </template>
+      </avue-form>
+    </el-dialog>
+    <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false"
+      :visible.sync="mapVisible" title="编辑地址" width="80%">
+      <editPolygonMap v-if="mapVisible" :editForm.sync="editForm" :region.sync="editForm.address"
+        :latitude.sync="editForm.latitude" :longitude.sync="editForm.longitude" :visible.sync="mapVisible">
+      </editPolygonMap>
+    </el-dialog>
+    <avue-crud :option="option" :table-loading="loading" :data="data" :page="page" :permission="permissionList"
+      :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
+      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @submit="handleSubmit"
+      @on-load="onLoad" >
+      <template slot="menuLeft">
+        <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.residential_delete"
+          @click="handleDelete">删除
+        </el-button>
+        <cy-excel-import :flag="2" file-name="小区信息导入模板" v-if="permission.residential_add" @success="onLoad(page)">
+        </cy-excel-import>
+        <!--        <el-button type="success" size="small" icon="el-icon-refresh" v-if="permission.residential_add" plain @click="refreshNumber">计算统计</el-button>-->
+        <!--        <el-button type="success" size="small" icon="el-icon-refresh" v-if="permission.residential_add" plain @click="syncHouseInfoAndUser(oldIds)">同步楼栋&住户</el-button>-->
+      </template>
+      <template slot-scope="scope" slot="regionForm">
+        <avue-cascader v-model="scope.row.region" :dic="regionDic" key-value="value"></avue-cascader>
+        <cy-area-select></cy-area-select>
+      </template>
+      <template slot="agencyId" slot-scope="scope">{{scope.row.agencyName}}</template>
+      <template slot="menu" slot-scope="scope">
+        <el-button type="text" size="small" icon="el-icon-setting">
+          <el-dropdown @command="tip">
+            <span class="el-dropdown-link">
+              操作<i class="el-icon-arrow-down el-icon--right"> </i>
+            </span>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item divided @click.native="detail(scope.row)" icon="el-icon-office-building">详情
+              </el-dropdown-item>
+              <el-dropdown-item divided @click.native="edit(scope.row)" icon="el-icon-school">编辑</el-dropdown-item>
+              <el-dropdown-item divided @click.native="manage(scope.row)" icon="el-icon-s-order">管理</el-dropdown-item>
+              <!--              <el-dropdown-item divided @click.native="syncBuilding(scope.row)" v-if="permission.residential_syncBuilding">同步楼栋</el-dropdown-item>-->
+              <!--              <el-dropdown-item divided @click.native="syncUnit(scope.row)" v-if="permission.residential_syncUnit">同步单元</el-dropdown-item>-->
+              <!--              <el-dropdown-item divided @click.native="syncFloor(scope.row)" v-if="permission.residential_syncFloor">同步楼层</el-dropdown-item>-->
+              <!--              <el-dropdown-item divided @click.native="syncRoom(scope.row)" v-if="permission.residential_syncRoom">同步房间</el-dropdown-item>-->
+              <!--              <el-dropdown-item divided @click.native="syncUser(scope.row)" v-if="permission.residential_syncUser">同步住户</el-dropdown-item>-->
+              <!--              <el-dropdown-item divided @click.native="syncDoorDevice(scope.row)" v-if="permission.residential_syncDoorDevice">同步门禁设备</el-dropdown-item>-->
+            </el-dropdown-menu>
+          </el-dropdown>
+        </el-button>
+      </template>
+
+      <template slot="mapSelectForm" slot-scope="scope">
+        <div>
+          <!--          <input class="el-input&#45;&#45;small el-input__inner" placeholder="选择地址" @click="mapVisible2 = true">-->
+          <el-button @click="mapVisible2 = true">选择地址</el-button>
+          <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false"
+            :visible.sync="mapVisible2" title="编辑地址" width="80%">
+            <editPolygonMap v-if="mapVisible2" :editForm.sync="scope.row" :region.sync="scope.row.address"
+              :latitude.sync="scope.row.latitude" :longitude.sync="scope.row.longitude" :visible.sync="mapVisible2">
+            </editPolygonMap>
+          </el-dialog>
+        </div>
+      </template>
+
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {
+    getList,
+    updateNumber,
+    add,
+    update,
+    remove,
+    updateResidential,
+    syncHouseInfoAndUser,
+    syncBuilding,
+    syncUnit,
+    syncFloor,
+    syncRoom,
+    syncUser,
+    syncDoorDevice
+  } from "@/api/community/residential";
+  import {
+    mapGetters
+  } from "vuex";
+
+  import CyAreaSelect from "../../../components/cy-area-select/cy-area-select";
+
+
+  import residentialManage from "./residentialManage.vue";
+  import residentialDetail from "../../../components/residential/residentialDetail.vue";
+  import CyExcelImport from "../../../components/excel/cy-excel-import.vue"
+  import editPolygonMap from "../../../components/residential/editPolygonMap.vue";
+  import {validatePhone} from "../../../util/validator";
+  export default {
+    components: {
+      CyAreaSelect,
+      residentialManage,
+      residentialDetail,
+      CyExcelImport,
+      editPolygonMap
+    },
+    data() {
+      return {
+        mapVisible2: false,
+        mapVisible: false,
+        selectedResidentialId: "",
+        selectedResidentialName: "",
+        manageVisible: false,
+        form: {},
+        detailForm: {},
+        detailVisible: false,
+        editForm: {},
+        editVisible: false,
+        regionDic: [],
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height: 'auto',
+          calcHeight: 60,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: false,
+          addBtn: true,
+          editBtn: false,
+          delBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          menuWidth: 250,
+          column: [{
+              label: "名称",
+              overHidden: true,
+              width: 150,
+              prop: "name",
+              // row: true,
+              search: true,
+              rules: [{
+                required: true,
+                message: "请输入名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: '',
+              prop: 'mapSelect',
+              // row: true,
+              // span: 20,
+              formslot: true,
+              hide: true,
+            },
+            {
+              label: "经度",
+              prop: "longitude",
+              width: 120,
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入经度",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "纬度",
+              prop: "latitude",
+              width: 120,
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入纬度",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "所属园区",
+              prop: "agencyId",
+              // slot: true,
+              search: true,
+              width: 150,
+              overHidden: true,
+              type: "select",
+              remote: true,
+              refresh: true,
+              searchFilterable: true,
+              filterable: true,
+              dicUrl: "/api/cyzh-community/agency/list?size=500&name={{key}}",
+              props: {
+                label: "name",
+                value: "id"
+              },
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+              rules: [{
+                required: true,
+                message: "请输入所属园区名称",
+                trigger: "blur"
+              }]
+
+            },
+
+            {
+              label: "详细地址",
+              prop: "address",
+              overHidden: true,
+            },
+            {
+              label: "楼栋数量",
+              prop: "buildingCount",
+              width: 100,
+              display: false,
+            },
+            {
+              label: "单元数量",
+              prop: "unitCount",
+              width: 100,
+              display: false,
+            },
+            {
+              label: "楼层数量",
+              prop: "floorCount",
+              width: 100,
+              display: false,
+            },
+            {
+              label: "房间数量",
+              prop: "roomCount",
+              width: 100,
+              display: false,
+            },
+            {
+              label: "住户数量",
+              prop: "userCount",
+              width: 100,
+              display: false,
+              hide: true,
+            },
+            {
+              label: "已录入人脸住户数",
+              prop: "userFaceCount",
+              hide: true,
+              width: 120,
+              display: false,
+            },
+            {
+              label: "所属物业",
+              labelWidth: 110,
+              hide: true,
+              display: false,
+              type: "select",
+              prop: "estateId",
+              dicUrl: "/api/cyzh-estate/company/list?current=1&size=50",
+              props: {
+                label: "name",
+                value: "id"
+              },
+              dicFormatter: (res) => {
+                return res.data.records
+              },
+              rules: [{
+                required: false,
+                message: "请选择所属物业",
+                trigger: "blur"
+              }, {
+                // validator: validatePhone,
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "物业名称",
+              prop: "estateName",
+              labelWidth: 110,
+              display: false,
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请输入物业名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "物业电话",
+              display: false,
+              hide: true,
+              prop: "estatePhone",
+              labelWidth: 110,
+              rules: [{
+                required: true,
+                message: "请输入物业电话",
+                trigger: "blur"
+              }, {
+                validator: validatePhone,
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "负责人姓名",
+              prop: "personName",
+              labelWidth: 110,
+              rules: [{
+                required: false,
+                message: "请输入负责人姓名",
+                trigger: "blur"
+              }, {
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "负责人电话",
+              prop: "personPhone",
+              labelWidth: 110,
+              rules: [{
+                required: false,
+                message: "请输入负责人电话",
+                trigger: "blur"
+              }, {
+                validator: validatePhone,
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "图片",
+              prop: "pic",
+              type: 'upload',
+              hide: true,
+              propsHttp: {
+                res: "data",
+                url: 'link'
+              },
+              listType: 'picture-img',
+              span: 24,
+              row: true,
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              display: true,
+              rules: [{
+                required: false,
+                message: "请输入封面图片",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "备注",
+              hide: true,
+              prop: "remark",
+              type: "textarea"
+            },
+            {
+              label: "创建时间",
+              hide: true,
+              width: 85,
+              prop: "createTime",
+              type: "datetime",
+              valueFormat: "yyyy-MM-dd HH:mm:ss",
+              display: false,
+            },
+            {
+              label: "旧平台id",
+              prop: "oldId",
+              hide: true,
+              display: false
+            }
+          ]
+        },
+        menuData: {
+          list: [],
+          form: {
+            parentId: 0
+          },
+          option: {
+            column: [{
+              label: "父级编码",
+              prop: "parentId",
+              value: 0,
+              disabled: true,
+              span: 24
+            }, {
+              label: "权限名称",
+              prop: "name",
+              span: 24,
+              rules: [{
+                required: true,
+                message: "请输入权限名称",
+                trigger: "blur"
+              }]
+            }, {
+              label: "权限标识",
+              prop: "code",
+              span: 24,
+              rules: [{
+                required: true,
+                message: "请输入权限标识",
+                trigger: "blur"
+              }]
+            }, {
+              label: "类型",
+              prop: "state",
+              span: 24,
+              type: "radio",
+              dicData: [{
+                label: '系统',
+                value: 0
+              }, {
+                label: '菜单',
+                value: 1
+              }, {
+                label: '按钮',
+                value: 2
+              }],
+              rules: [{
+                required: true,
+                message: "请输入类型",
+                trigger: "blur"
+              }]
+            }, {
+              label: "组件地址",
+              prop: "component",
+              span: 24
+            }, {
+              label: "图标",
+              prop: "icon",
+              span: 24
+            }, {
+              label: "请求地址",
+              prop: "path",
+              span: 24
+            }, {
+              label: "权限描述",
+              prop: "des",
+              span: 24
+            }, {
+              label: "排序",
+              prop: "order",
+              span: 24
+            }]
+          }
+        },
+        menuOption: {
+          column: [{
+            label: "父级编码",
+            prop: "parentId",
+            disabled: true,
+            span: 24
+          }, {
+            label: "权限名称",
+            prop: "name",
+            span: 24,
+            rules: [{
+              required: true,
+              message: "请输入权限名称",
+              trigger: "blur"
+            }]
+          }, {
+            label: "权限标识",
+            prop: "code",
+            span: 24,
+            rules: [{
+              required: true,
+              message: "请输入权限标识",
+              trigger: "blur"
+            }]
+          }, {
+            label: "类型",
+            prop: "state",
+            span: 24,
+            type: "radio",
+            dicData: [{
+              label: '系统',
+              value: 0
+            }, {
+              label: '菜单',
+              value: 1
+            }, {
+              label: '按钮',
+              value: 2
+            }],
+            rules: [{
+              required: true,
+              message: "请输入类型",
+              trigger: "blur"
+            }]
+          }, {
+            label: "组件地址",
+            prop: "component",
+            span: 24
+          }, {
+            label: "图标",
+            prop: "icon",
+            span: 24
+
+
+          }, {
+            label: "请求地址",
+            prop: "path",
+            span: 24
+          }, {
+            label: "权限描述",
+            prop: "des",
+            span: 24
+          }, {
+            label: "排序",
+            prop: "order",
+            span: 24
+          }]
+        },
+        data: [],
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.residential_add, false),
+          viewBtn: this.vaildData(this.permission.residential_view, false),
+          delBtn: this.vaildData(this.permission.residential_delete, false),
+          editBtn: this.vaildData(this.permission.residential_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      },
+      oldIds() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.oldId);
+        });
+        return ids.join(",");
+      }
+    },
+    mounted() {
+
+    },
+    watch: {
+      'form.mapSelect': {
+        handler: function(value) {
+          if (!value) {
+            return
+          } else {
+            this.form.longitude = this.form.mapSelect.longitude;
+            this.form.latitude = this.form.mapSelect.latitude;
+            this.form.address = this.form.mapSelect.formattedAddress;
+          }
+        },
+        immediate: false
+      },
+      'editForm.mapSelect': {
+        handler: function(value) {
+          if (!value) {
+            return
+          } else {
+            this.editForm.longitude = this.editForm.mapSelect.longitude;
+            this.editForm.latitude = this.editForm.mapSelect.latitude;
+            // this.editForm.address = this.editForm.mapSelect.formattedAddress;
+          }
+        },
+        immediate: false
+      },
+    },
+    created() {
+      const tenantType = localStorage.getItem("tenantType");
+      if (tenantType == 0) {
+        this.option.column[4].label = "所属园区"
+      } else if (tenantType == 1) {
+        this.option.column[4].label = "所属园区"
+      }
+    },
+    methods: {
+
+      handleSubmit() {
+        this.$message.success(JSON.stringify(this.form));
+        console.log(this.form, "rrr");
+      },
+      syncHouseInfoAndUser() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        syncHouseInfoAndUser(this.oldIds).then(() => {
+          this.onLoad(this.page)
+        });
+      },
+      refreshNumber() {
+        updateNumber(this.ids).then(() => {
+          this.onLoad(this.page)
+        });
+      },
+      syncUser(row) {
+        syncUser(row.oldId).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        }, error => {
+          window.console.log(error);
+        });
+      },
+      syncBuilding(row) {
+        syncBuilding(row.oldId).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        }, error => {
+          window.console.log(error);
+        });
+      },
+      syncUnit(row) {
+        syncUnit(row.oldId).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        }, error => {
+          window.console.log(error);
+        });
+      },
+      syncFloor(row) {
+        syncFloor(row.oldId).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        }, error => {
+          window.console.log(error);
+        });
+      },
+      syncRoom(row) {
+
+        syncRoom(row.oldId).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+
+      syncDoorDevice(row) {
+        syncDoorDevice(row.oldId).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      closeManage() {
+        this.manageVisible = false;
+      },
+      manage(row) {
+        this.selectedResidentialId = row.id;
+        this.selectedResidentialName = row.name;
+        console.log("id:" + this.selectedResidentialId + "  name" + this.selectedResidentialName)
+        this.manageVisible = true;
+        this.$nextTick(() => {
+          this.$refs.resMang.init();
+        })
+      },
+      edit(row) {
+        this.editForm = row;
+        this.editVisible = true;
+      },
+      detail(row) {
+        this.detailForm = row;
+        this.detailVisible = true;
+        this.$nextTick(() => {
+          this.$refs.residentialDetail.init()
+        })
+      },
+
+      // showMessage(){
+      //   new Error('手机号码不正确')
+      // },
+      rowSave(row, done, loading) {
+        console.log(row,"row数据")
+          // validatePhone(row.personPhone,this.showMessage())
+          add(row).then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            done();
+          }, error => {
+            loading();
+            window.console.log(error);
+          });
+
+      },
+      submitResidential(row, done, loading) {
+        update(this.editForm).then(() => {
+          this.onLoad(this.page);
+          this.editVisible = false;
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        row.isUpdateOrg = false;
+        updateResidential(row).then(() => {
+          // update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        if (row.unitNumber > 0) {
+          this.$message.error("请先删除其下单元和其他数据")
+          return
+        }
+        this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        let _this = this;
+        if (["edit", "view"].includes(type)) {
+          // getResidentialDetail(this.form.id).then(res => {
+          //   _this.form = res.data.data;
+          //   let region = [];
+          //   region.push(_this.form.regionProvince);
+          //   region.push(_this.form.regionCity);
+          //   region.push(_this.form.regionArea);
+          //
+          //   _this.form.region = region;
+          // });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage) {
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+        // getResidentialList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        //   const data = res.data.data;
+        //   this.page.total = Number.parseInt(data.total);
+        //   this.data = data.records;
+        //   this.loading = false;
+        //   this.selectionClear();
+        // });
+
+
+      },
+
+    }
+  };
+</script>
+
+<style scoped>
+</style>

+ 1492 - 0
src/views/businessmng/agencymng/residentialManage.vue

@@ -0,0 +1,1492 @@
+<template v-if="visible">
+  <basic-container>
+    <el-container style="height: 700px; border: 1px solid #eee">
+      <div style="position: fixed;right: 120px;top: 25px;">
+        <el-button type="danger" v-if="permission.residential_add" icon="el-icon-plus" @click="batchVisible = true">批量新增</el-button>
+      </div>
+      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
+        <el-tree :props="treeOption" :data="treeData" :expand-on-click-node="false" @node-click="nodeClick" default-expand-all>
+           <span class="custom-tree-node" slot-scope="{ node, data }">
+            <span>{{ node.label }}</span>
+             <!--<el-popover
+               placement="right"
+               width="200"
+               trigger="hover"
+             >
+               <span slot="reference">
+                 <i class="el-icon-arrow-down"></i>
+               </span>
+               <div style="display: grid">
+                 <el-link :underline="false" type="primary">添加下一级</el-link>
+                 <el-link :underline="false" type="primary">修改</el-link>
+                 <el-link :underline="false" type="danger">删除</el-link>
+               </div>
+             </el-popover>-->
+          </span>
+        </el-tree>
+      </el-aside>
+      <el-main>
+        <avue-crud
+          :data="data"
+          :option="option"
+          :table-loading="loading"
+          :permission="permissionDataList"
+          ref="crud"
+          v-model="form"
+          :before-open="beforeOpen"
+          @row-update="rowDataUpdate"
+          @row-save="rowDataSave"
+          @row-del="rowDataDel"
+        >
+        </avue-crud>
+      </el-main>
+    </el-container>
+
+    <!-- <el-row>
+       <el-col style="margin-right: 5px; padding-right: 10px; width: 25%;border: 1px solid #0073EB;">
+         <el-tree :props="treeOption" :data="treeData" :expand-on-click-node="false"   @node-click="nodeClick"></el-tree>
+       </el-col>
+      <el-col style="width: 70%;">
+         <avue-crud
+           :data="data"
+           :option="option"
+           :table-loading="loading"
+           :permission="permissionDataList"
+           ref="crud"
+           v-model="form"
+           :before-open="beforeOpen"
+           @row-update="rowDataUpdate"
+           @row-save="rowDataSave"
+           @row-del="rowDataDel"
+         >
+         </avue-crud>
+       </el-col>
+     </el-row> -->
+
+    <el-dialog title="批量新增" :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" width="90%" :visible.sync="batchVisible" center>
+      <el-form :inline="true" :rules="batchRules" ref="batchForm" :model="batchForm" label-width="100px">
+        <el-row>
+          <el-form-item label="楼栋区间" required>
+            <el-col :span="11">
+              <el-form-item prop="buildingBegin">
+                <el-input v-model="batchForm.buildingBegin"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col class="line" style="width: 15px" :span="2">-</el-col>
+            <el-col :span="11">
+              <el-form-item prop="buildingEnd">
+                <el-input v-model="batchForm.buildingEnd"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form-item>
+          <el-form-item label="前后缀规则">
+            <el-col :span="11">
+              <el-form-item prop="date1">
+                <el-input placeholder="前缀" v-model="batchForm.buildingPrefix" style="width: 100%;"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col class="line" style="width: 15px" :span="2">-</el-col>
+            <el-col :span="11">
+              <el-form-item prop="date2">
+                <el-input placeholder="后缀" v-model="batchForm.buildingSuffix" style="width: 100%;"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form-item>
+        </el-row>
+        <el-row>
+          <el-form-item label="单元区间" required>
+            <el-col :span="11">
+              <el-form-item prop="unitBegin">
+                <el-input v-model="batchForm.unitBegin"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col class="line" style="width: 15px" :span="2">-</el-col>
+            <el-col :span="11">
+              <el-form-item prop="unitEnd">
+                <el-input v-model="batchForm.unitEnd"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form-item>
+          <el-form-item label="前后缀规则">
+            <el-col :span="11">
+              <el-form-item prop="date1">
+                <el-input placeholder="前缀" v-model="batchForm.unitPrefix" style="width: 100%;"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col class="line" style="width: 15px" :span="2">-</el-col>
+            <el-col :span="11">
+              <el-form-item prop="date2">
+                <el-input placeholder="后缀" v-model="batchForm.unitSuffix" style="width: 100%;"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form-item>
+        </el-row>
+        <el-row>
+          <el-form-item label="楼层区间" required>
+            <el-col :span="11">
+              <el-form-item prop="floorBegin">
+                <el-input v-model="batchForm.floorBegin"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col class="line" style="width: 15px" :span="2">-</el-col>
+            <el-col :span="11">
+              <el-form-item prop="floorEnd">
+                <el-input v-model="batchForm.floorEnd"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form-item>
+          <el-form-item label="前后缀规则">
+            <el-col :span="11">
+              <el-form-item prop="date1">
+                <el-input placeholder="前缀" v-model="batchForm.floorPrefix" style="width: 100%;"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col class="line" style="width: 15px" :span="2">-</el-col>
+            <el-col :span="11">
+              <el-form-item prop="date2">
+                <el-input placeholder="后缀" v-model="batchForm.floorSuffix" style="width: 100%;"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form-item>
+          <el-form-item label="排除楼层" :span="2">
+            <el-input style="width: 100%;" v-model="batchForm.floorExclude"></el-input>
+          </el-form-item>
+        </el-row>
+        <el-row>
+          <el-form-item label="房屋区间" required>
+            <el-col :span="11">
+              <el-form-item prop="roomBegin">
+                <el-input v-model="batchForm.roomBegin"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col class="line" style="width: 15px" :span="2">-</el-col>
+            <el-col :span="11">
+              <el-form-item prop="roomEnd">
+                <el-input v-model="batchForm.roomEnd"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form-item>
+          <el-form-item label="前后缀规则">
+            <el-col :span="11">
+              <el-form-item prop="date1">
+                <el-input placeholder="前缀" v-model="batchForm.roomPrefix" style="width: 100%;"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col class="line" style="width: 15px" :span="2">-</el-col>
+            <el-col :span="11">
+              <el-form-item prop="date2">
+                <el-input placeholder="后缀" v-model="batchForm.roomSuffix" style="width: 100%;"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form-item>
+          <el-form-item label="排除房屋" :span="2">
+            <el-input style="width: 100%;" v-model="batchForm.roomExclude"></el-input>
+          </el-form-item>
+        </el-row>
+        <div style="text-align: center">
+          <el-button type="primary" @click="batchAdd" :disabled="batchDisabled" :icon="batchIcon">{{batchText}}</el-button>
+        </div>
+      </el-form>
+    </el-dialog>
+  </basic-container>
+</template>
+
+<script>
+import { getList as getBuildingListByResidentialOldId,add as buildingAdd,getDetail as buildingGetDetail,update as buildingUpdate,remove as buildingRemove } from '../../../api/community/building.js';
+import { getList as getUnitListByBuildingOldId, add as unitAdd, getDetail as unitGetDetail, update as unitUpdate, remove as unitRemove } from "../../../api/community/unit.js";
+import { getList as getFloorListByUnitOldId, add as floorAdd, getDetail as floorGetDetail, update as floorUpdate, remove as floorRemove } from "../../../api/community/floor.js";
+import { getList as getRoomListByFloorOldId, add as roomAdd, getDetail as roomGetDetail, update as roomUpdate, remove as roomRemove } from "../../../api/community/room.js";
+import { mapGetters } from 'vuex';
+import Log from '../../../api/tool/MyLog.js';
+import ArrUtil from '../../../api/tool/ArrUtil.js';
+
+import {batchAddSubmit} from "@/api/community/building";
+import {validatePhone, validatNum} from "../../../util/validator";
+
+export default {
+  props:{
+    residentialId: "",
+    residentialName: "",
+    visible: false
+  },
+  data() {
+    return {
+      selectBuildingId: "",
+      selectUnitId: "",
+      selectFloorId: "",
+      permissionDataList: [],
+      loading: false,
+      batchVisible: false,
+      batchIcon: 'el-icon-circle-plus-outline',
+      batchDisabled: false,
+      batchText: '提交',
+      typeParent: 'parent',
+      typeBuilding: 'building',
+      typeUnit: 'unit',
+      typeFloor: 'floor',
+      typeRoom: 'room',
+      form: {},
+      batchForm: {},
+      batchRules: {
+        buildingBegin: [
+          { required: true, message: '请输入楼栋区间', trigger: 'blur' },
+        ],
+        buildingEnd: [
+          { required: true, message: '请输入楼栋区间', trigger: 'blur' },
+        ],
+        unitBegin: [
+          { required: true, message: '请输入单元区间', trigger: 'blur' },
+        ],
+        unitEnd: [
+          { required: true, message: '请输入单元区间', trigger: 'blur' },
+        ],
+        floorBegin: [
+          { required: true, message: '请输入楼层区间', trigger: 'blur' },
+        ],
+        floorEnd: [
+          { required: true, message: '请输入楼层区间', trigger: 'blur' },
+        ],
+        roomBegin: [
+          { required: true, message: '请输入房屋区间', trigger: 'blur' },
+        ],
+        roomEnd: [
+          { required: true, message: '请输入房屋区间', trigger: 'blur' },
+        ],
+      },
+      treeData: [],
+      treeOption:{
+        label:"name",
+        value: "id",
+        children: "children"
+      },
+
+
+      // treeOption: {
+      //   nodeKey: 'id',
+      //   addBtn: false,
+      //   menu: false,
+      //   props: {
+      //     label: 'name',
+      //     value: 'id',
+      //     children: 'children'
+      //   }
+      // },
+      optionBuilding: {
+        labelWidth: 100,
+        tip: false,
+        viewBtn: true,
+        selection: false,
+        border: true,
+        addBtn: true,
+        menuWidth:350,
+        column: [
+          {
+            label: '所属区域',
+            prop: 'residentialName',
+            disabled: true,
+          },
+          // {
+          //   label: "所属区域",
+          //   prop: "residentialId",
+          //   disabled: true,
+          //   type:'select',
+          //   hide: true,
+          //   // slot: true,
+          //   dicUrl: "/api/cyzh-community/residential/list?size=500",
+          //   props: {
+          //     label: "name",
+          //     value: "id"
+          //   },
+          //   dicFormatter: (res) => {
+          //     return res.data.records;
+          //   },
+          //   rules: [{
+          //     required: false,
+          //     message: "请选择所属区域",
+          //     trigger: "blur"
+          //   }]
+          // },
+          {
+            label: '楼栋名称',
+            prop: 'name',
+            rules: [
+              {
+                required: true,
+                message: '请输入楼房名称',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: "图片",
+            prop: "pic",
+            type: 'upload',
+            hide: true,
+            propsHttp: {
+              res: "data",
+              url: 'link'
+            },
+            listType: 'picture-img',
+            span: 24,
+            row: true,
+            action: "/api/blade-resource/oss/endpoint/put-file",
+            display: true,
+            rules: [{
+              required: false,
+              message: "请输入封面图片",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: '单元总数',
+            prop: 'unitCount',
+            display: false,
+            rules: [
+              {
+                required: false,
+                message: '请输入楼房编号',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '楼层总数',
+            prop: 'floorCount',
+            display: false,
+            rules: [
+              {
+                required: true,
+                message: '请输入楼房层数',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '房间总数',
+            prop: 'roomCount',
+            display: false,
+            rules: [
+              {
+                required: true,
+                message: '请输入房间数量',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '住户总数',
+            prop: 'userCount',
+            hide: true,
+            display: false,
+            rules: [
+              {
+                required: false,
+                message: '请输入楼房地址',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            prop: 'type',
+            value: 'building',
+            disabled: true,
+            hide: true,
+            display: false
+          }
+        ]
+      },
+      optionUnit: {
+        labelWidth: 100,
+        tip: false,
+        // addBtn: true,
+        viewBtn: true,
+        selection: false,
+        border: true,
+        menuWidth:350,
+        column: [
+          {
+            label: '所属区域',
+            prop: 'residentialName',
+            disabled: true,
+          },
+          // {
+          //   label: "所属区域",
+          //   prop: "residentialId",
+          //   disabled: true,
+          //   type:'select',
+          //   hide: true,
+          //   cascaderItem: ['buildingId'],
+          //   // slot: true,
+          //   dicUrl: "/api/cyzh-community/residential/list?size=500",
+          //   props: {
+          //     label: "name",
+          //     value: "id"
+          //   },
+          //   dicFormatter: (res) => {
+          //     return res.data.records;
+          //   },
+          //   rules: [{
+          //     required: false,
+          //     message: "请选择所属区域",
+          //     trigger: "blur"
+          //   }]
+          // },
+          {
+            label: "所属楼栋",
+            prop: "buildingId",
+            type:'select',
+            hide: true,
+            disabled: true,
+            props: {
+              label: "name",
+              value: "id"
+            },
+          },
+          {
+            label: '单元名称',
+            prop: 'name',
+            maxlength: 10,
+            showWordLimit: true,
+            rules: [
+              {
+                required: true,
+                message: '请输入楼层名称',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: "图片",
+            prop: "pic",
+            type: 'upload',
+            hide: true,
+            propsHttp: {
+              res: "data",
+              url: 'link'
+            },
+            listType: 'picture-img',
+            span: 24,
+            row: true,
+
+            action: "/api/blade-resource/oss/endpoint/put-file",
+            display: true,
+            rules: [{
+              required: false,
+              message: "请输入封面图片",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "负责人姓名",
+            prop: "personName",
+            labelWidth: 110,
+            hide: true,
+            rules: [{
+              required: false,
+              message: "请输入负责人姓名",
+              trigger: "blur"
+            }]
+          }, {
+            label: "负责人电话",
+            prop: "personTel",
+            labelWidth: 110,
+            hide: true,
+            rules: [{
+              required: false,
+              message: "请输入负责人电话",
+              trigger: "blur"
+            },{
+              validator: validatePhone,
+              trigger: "blur"
+            }]
+          }, {
+            label: "建筑年代",
+            prop: "builtYear",
+            hide: true,
+          }, {
+            label: "产权性质",
+            prop: "propertyNature",
+            hide: true,
+          },
+          // {
+          //   label: "有无电梯",
+          //   prop: "includingElevator",
+          //   hide: true,
+          //   type: "select",
+          //   search: true,
+          //   dicUrl: "/api/blade-system/dict-biz/dictionary?code=including_elevator",
+          //   props: {
+          //     label: "dictValue",
+          //     value: "dictKey"
+          //   },
+          // },
+          {
+            label: "楼层数量",
+            prop: "floorCount",
+            display: false
+          },
+          {
+            label: "房间数量",
+            prop: "roomCount",
+            display: false
+          },
+          {
+            label: "住户数量",
+            prop: "userCount",
+            display: false,
+            hide: true,
+          },
+          {
+            prop: 'type',
+            value: 'unit',
+            disabled: true,
+            hide: true,
+            display: false,
+          }
+        ]
+      },
+      optionFloor: {
+        labelWidth: 100,
+        tip: false,
+        viewBtn: true,
+        selection: false,
+        border: true,
+        menuWidth:350,
+        column: [
+          {
+            label: '所属区域',
+            prop: 'residentialName',
+            disabled: true,
+          },
+          // {
+          //   label: "所属区域",
+          //   prop: "residentialId",
+          //   disabled: true,
+          //   type:'select',
+          //   hide: true,
+          //   // slot: true,
+          //   cascaderItem: ['buildingId'],
+          //   dicUrl: "/api/cyzh-community/residential/list?size=500",
+          //   props: {
+          //     label: "name",
+          //     value: "id"
+          //   },
+          //   dicFormatter: (res) => {
+          //     return res.data.records;
+          //   },
+          //   rules: [{
+          //     required: false,
+          //     message: "请选择所属区域",
+          //     trigger: "blur"
+          //   }]
+          // },
+          {
+            label: "所属楼栋",
+            prop: "buildingId",
+            // slot: true,
+            type:'select',
+            disabled: true,
+            dicUrl: `/api/cyzh-community/building/list?size=100&residentialId=` + this.residentialId,
+            props: {
+              label: "name",
+              value: "id"
+            },
+            dicFormatter: (res) => {
+              return res.data.records;
+            },
+            rules: [{
+              required: false,
+              message: "请选择所属楼栋",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: '所属单元',
+            prop: 'unitId',
+            type: 'select',
+            dicData: [],
+            disabled: true,
+            hide: true,
+            props: {
+              label: 'name',
+              value: 'id'
+            },
+            rules: [
+              {
+                required: false,
+                message: '请选择所属楼房',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '楼层名称',
+            prop: 'name',
+            rules: [
+              {
+                required: true,
+                message: '请输入房间名称',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: "负责人姓名",
+            prop: "personName",
+            hide: true,
+            rules: [{
+              required: false,
+              message: "请输入负责人姓名",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "负责人电话",
+            prop: "personTel",
+            hide: true,
+            rules: [{
+              required: false,
+              message: "请输入负责人电话",
+            },{
+              validator: validatePhone,
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "建筑年代",
+            prop: "builtYear",
+            hide: true,
+            dataType: "string",
+            type: "year",
+            rules: [{
+              required: false,
+              message: "请输入建筑年代",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "产权性质",
+            prop: "propertyNature",
+            hide: true,
+            display: false,
+            rules: [{
+              required: false,
+              message: "请输入产权性质",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "有无电梯",
+            prop: "includingElevator",
+            hide: true,
+            type: "select",
+            display: false,
+            dicData: [
+              {
+                label: "有",
+                value: "1"
+              },
+              {
+                label: "无",
+                value: "0"
+              }
+            ],
+            rules: [{
+              required: false,
+              message: "请输入有无电梯",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "房间数量",
+            prop: "roomCount",
+            display: false,
+
+            rules: [{
+              required: false,
+              message: "请输入房间数量",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "住户数量",
+            prop: "userCount",
+             display: false,
+            // hide: true,
+            rules: [{
+              required: false,
+              message: "请输入住户数量",
+              trigger: "blur"
+            }]
+          },
+          {
+            prop: 'type',
+            value: 'buildingRoom',
+            disabled: true,
+            hide: true,
+            display: false,
+          }
+        ]
+      },
+      optionRoom: {
+        labelWidth: 100,
+        tip: false,
+        viewBtn: true,
+        selection: false,
+        border: true,
+        menuWidth:350,
+        column: [
+          {
+            label: '所属区域',
+            prop: 'residentialName',
+            disabled: true,
+          },
+          // {
+          //   label: "所属区域",
+          //   prop: "residentialId",
+          //   // slot: true,
+          //   type: "select",
+          //   remote: true,
+          //   hide: true,
+          //   disabled: true,
+          //   cascaderIndex:0,
+          //   searchFilterable:true,
+          //   // dicUrl: "/grid/estate/getResidentialList",
+          //   dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}&size=500",
+          //   dicFormatter: (res)=>{
+          //     return res.data.records;
+          //   },
+          //   dicFlag: false,
+          //   props: {
+          //     label: "name",
+          //     value: "id"
+          //   },
+          //   rules: [{
+          //     required: false,
+          //     message: "请输入所属区域名称",
+          //     trigger: "blur"
+          //   }]
+          // },
+          {
+            label: "所属楼栋",
+            prop: "buildingId",
+            // slot: true,
+            hide: true,
+            type: "select",
+            dicFlag: false,
+            disabled: true,
+            searchFilterable:true,
+            cascaderIndex:1,
+            dicUrl: "/api/cyzh-community/building/list?residentialId={{key}}&size=100",
+            dicFormatter: (res)=>{
+              return res.data.records;
+            },
+            props: {
+              label: "name",
+              value: "id"
+            },
+            rules: [{
+              required: false,
+              message: "请输入所属楼栋",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "所属单元",
+            prop: "unitId",
+            // slot: true,
+            type: "select",
+            disabled: true,
+            dicFlag: false,
+            cascaderItem: ["floorId"],
+            // dicUrl: "/api/cyzh-community/residential/list?residentialId={{key}}",
+            dicUrl: "/api/cyzh-community/unit/list?residentialId={{key}&size=100",
+            dicFormatter: (res)=>{
+              return res.data.records;
+            },
+            props: {
+              label: "name",
+              value: "id"
+            },
+            rules: [{
+              required: false,
+              message: "请输入所属单元名称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "所属楼层",
+            // width: 150,
+            prop: "floorId",
+            type: "select",
+            dicFlag: false,
+            disabled: true,
+            hide: true,
+            cascaderIndex:1,
+            // dicUrl: "/grid/estate/getUnitList",
+            dicUrl: "/api/cyzh-community/floor/list?unitId={{key}}&size=50",
+            dicFormatter: (res)=>{
+              return res.data.records;
+            },
+            props: {
+              label: "name",
+              value: "id"
+            },
+            rules: [{
+              required: false,
+              message: "请输入所属单元名称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "门牌号 ",
+            prop: "name",
+            // search: true,
+            rules: [{
+              required: true,
+              message: "请输入门牌号-限制数字,单元楼下唯一  ",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "房屋面积(平方米)",
+            prop: "area",
+            hide: true,
+            labelWidth: 140,
+            rules: [{
+              required: false,
+              message: "房屋面积(平方米)",
+              trigger: "blur"
+            },{
+              validator: validatNum,
+              trigger: "blur"
+            }]
+          },{
+            label: "入住用户数量",
+            prop: "userCount",
+            display: false,
+          },
+          // {
+          //   label: "户型",
+          //   prop: "houseType",
+          //   hide: true,
+          //   type: "select",
+          //   // search: true,
+          //   dicUrl: "/api/blade-system/dict-biz/dictionary?code=house_type",
+          //   props: {
+          //     label: "dictValue",
+          //     value: "dictKey"
+          //   },
+          // },
+          // {
+          //   label: "楼层",
+          //   prop: "floor",
+          //   hide: true,
+          // },
+          {
+            label: "装饰",
+            prop: "ornament",
+            hide: true,
+          },
+          // {
+          //   label: "房屋朝向",
+          //   prop: "orientation",
+          //   hide: true,
+          // },
+          // {
+          //   label: "序号",
+          //   prop: "serial",
+          //   value: 1,
+          //   hide: true,
+          //   display: false,
+          // },
+          {
+            label: "备注",
+            prop: "remark",
+            hide: true,
+          },
+          // {
+          //   label: "创建时间",
+          //   prop: "createTime",
+          //   hide: true,
+          //   type: "datetime",
+          //   valueFormat: "yyyy-MM-dd HH:mm:ss",
+          //   display: false,
+          // },
+          {
+            prop: 'type',
+            valueDefault: 'bed',
+            disabled: true,
+            hide: true,
+            display: false,
+          }
+        ]
+      },
+      data: [],
+      option: {
+        tip: false,
+        viewBtn: true,
+        selection: false,
+        addBtn: false,
+        column: []
+      }
+    };
+  },
+
+  created() {
+
+  },
+  computed: {
+    ...mapGetters(['permission']),
+    permissionBuildingList() {
+      return {
+        addBtn: this.vaildData(this.permission.building_add, false),
+        viewBtn: this.vaildData(this.permission.building_view, false),
+        delBtn: this.vaildData(this.permission.building_delete, false),
+        editBtn: this.vaildData(this.permission.building_edit, false)
+      };
+    },
+    permissionBuildinglayerList() {
+      return {
+        addBtn: this.vaildData(this.permission.buildinglayer_add, false),
+        viewBtn: this.vaildData(this.permission.buildinglayer_view, false),
+        delBtn: this.vaildData(this.permission.buildinglayer_delete, false),
+        editBtn: this.vaildData(this.permission.buildinglayer_edit, false)
+      };
+    },
+    permissionBuildingroomList() {
+      return {
+        addBtn: this.vaildData(this.permission.buildingroom_add, false),
+        viewBtn: this.vaildData(this.permission.buildingroom_view, false),
+        delBtn: this.vaildData(this.permission.buildingroom_delete, false),
+        editBtn: this.vaildData(this.permission.buildingroom_edit, false)
+      };
+    },
+    permissionBedList() {
+      return {
+        addBtn: this.vaildData(this.permission.bed_add, false),
+        viewBtn: this.vaildData(this.permission.bed_view, false),
+        delBtn: this.vaildData(this.permission.bed_delete, false),
+        editBtn: this.vaildData(this.permission.bed_edit, false)
+      };
+    },
+    permissionTreeList() {
+      return {
+        addBtn: this.vaildData(this.permission.building_add, false),
+        viewBtn: this.vaildData(this.permission.building_view, false),
+        delBtn: this.vaildData(this.permission.building_delete, false),
+        editBtn: this.vaildData(this.permission.building_edit, false)
+      };
+    },
+    permissionDataList() {
+      return {
+        addBtn: this.vaildData(this.permission.building_add, false),
+        viewBtn: this.vaildData(this.permission.building_view, false),
+        delBtn: this.vaildData(this.permission.building_delete, false),
+        editBtn: this.vaildData(this.permission.building_edit, false)
+      };
+    },
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(',');
+    }
+  },
+  methods: {
+    init(){
+      const tenantType = localStorage.getItem("tenantType");
+      if (tenantType == 0){
+        let residentialNameProp = this.findObject(this.optionBuilding.column, "residentialName");
+        residentialNameProp.label = "所属区域"
+      }else if (tenantType == 1){
+        let residentialNameProp = this.findObject(this.optionBuilding.column, "residentialName");
+        residentialNameProp.label = "所属区域"
+      }
+      this.option = this.optionBuilding;
+      this.treeData = [{ id: this.residentialId, type: this.typeParent, name: this.residentialName, children: [] }];
+      this.onLoadBuilding(this.residentialId);
+    },
+    rowDataSave(row, loading, done) {
+      row.residentialId = this.residentialId;
+      row.residentialName = this.residentialName;
+      if (row.type == this.typeBuilding) {
+        buildingAdd(row).then(
+          () => {
+            loading();
+            this.onLoadBuilding(this.residentialId);
+            this.$message({ type: 'success', message: '操作成功!' });
+          },
+          error => {
+            done();
+            Log.d(error);
+          }
+        );
+      } else if (row.type == this.typeUnit) {
+        unitAdd(row).then(
+          () => {
+            loading();
+            this.onLoadUnit(row.buildingId);
+            this.$message({ type: 'success', message: '操作成功!' });
+          },
+          error => {
+            done();
+            Log.d(error);
+          }
+        );
+      } else if (row.type == this.typeFloor) {
+        floorAdd(row).then(
+          () => {
+            loading();
+            this.onLoadFloor(row.buildingId, row.unitId);
+            this.$message({ type: 'success', message: '操作成功!' });
+          },
+          error => {
+            done();
+            Log.d(error);
+          }
+        );
+      } else if (row.type == this.typeRoom) {
+        roomAdd(row).then(
+          () => {
+            loading();
+            this.onLoadRoom(row.buildingId, row.unitId, row.floorId);
+            this.$message({ type: 'success', message: '操作成功!' });
+          },
+          error => {
+            done();
+            Log.d(error);
+          }
+        );
+      }
+    },
+    rowDataUpdate(row, index, loading, done) {
+      if (row.type == this.typeBuilding) {
+        buildingUpdate(row).then(
+          () => {
+            loading();
+            this.onLoadBuilding(this.residentialId);
+            this.$message({ type: 'success', message: '操作成功!' });
+          },
+          error => {
+            done();
+            Log.d(error);
+          }
+        );
+      } else if (row.type == this.typeUnit) {
+        unitUpdate(row).then(
+          () => {
+            loading();
+            this.onLoadUnit(row.buildingId);
+            this.$message({ type: 'success', message: '操作成功!' });
+          },
+          error => {
+            done();
+            Log.d(error);
+          }
+        );
+      } else if (row.type == this.typeFloor) {
+        floorUpdate(row).then(
+          () => {
+            loading();
+            this.onLoadFloor(row.buildingId, row.unitId);
+            this.$message({ type: 'success', message: '操作成功!' });
+          },
+          error => {
+            done();
+            Log.d(error);
+          }
+        );
+      } else if (row.type == this.typeRoom) {
+        roomUpdate(row).then(
+          () => {
+            loading();
+            this.onLoadRoom(row.buildingId, row.unitId, row.floorId);
+            this.$message({ type: 'success', message: '操作成功!' });
+          },
+          error => {
+            done();
+            Log.d(error);
+          }
+        );
+      }
+    },
+    rowDataDel(row) {
+      this.$confirm('确定将选择数据删除?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          Log.e(row);
+          if (row.type == this.typeBuilding) {
+            return buildingRemove(row.id);
+          } else if (row.type == this.typeUnit) {
+            return unitRemove(row.id);
+          } else if (row.type == this.typeFloor) {
+            return floorRemove(row.id);
+          } else if (row.type == this.typeRoom) {
+            return roomRemove(row.id);
+          }
+        })
+        .then(() => {
+          if (row.type == this.typeBuilding) {
+            this.onLoadBuilding(this.residentialId);
+          } else if (row.type == this.typeUnit) {
+            this.onLoadUnit(row.buildingId);
+          } else if (row.type == this.typeFloor) {
+            this.onLoadFloor(row.buildingId, row.unitId);
+          } else if (row.type == this.typeRoom) {
+            this.onLoadRoom(row.buildingId, row.unitId, row.floorId);
+          }
+          this.$message({
+            type: 'success',
+            message: '操作成功!'
+          });
+        });
+    },
+    nodeClick(data) {
+      // Log.e('======data>>' + JSON.stringify(data));
+      if (data.type == this.typeParent) {
+        this.initBuildingDatas();
+      } else if (data.type == this.typeBuilding) {
+        console.log("获取单元树")
+        this.initUnitDatas(data);
+      } else if (data.type == this.typeUnit) {
+        console.log("获取楼层树")
+        console.log("所属单元名称:"+data.name)
+        // debugger
+        this.initFloorDatas(data);
+      } else if (data.type == this.typeFloor) {
+        console.log("获取房间树")
+        console.log("所属楼层:"+data.name)
+
+        this.initRoomDatas(data);
+      }
+    },
+    beforeOpen(done, type) {
+      this.form["residentialId"] = this.residentialId;
+      this.form["residentialName"] = this.residentialName;
+      this.form["buildingId"] = this.selectBuildingId;
+      this.form["unitId"] = this.selectUnitId;
+      this.form["floorId"] = this.selectFloorId;
+      if (['edit', 'view'].includes(type)) {
+        if (this.form.type == this.typeBuilding) {
+          buildingGetDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+            this.form.type = this.typeBuilding;
+            this.$set(this, 'form', this.form);
+          });
+        } else if (this.form.type == this.typeUnit) {
+          unitGetDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+            this.form.type = this.typeUnit;
+            this.$set(this, 'form', this.form);
+          });
+        } else if (this.form.type == this.typeFloor) {
+          floorGetDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+            this.form.type = this.typeFloor;
+            this.$set(this, 'form', this.form);
+          });
+        } else if (this.form.type == this.typeRoom) {
+          roomGetDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+            this.form.type = this.typeRoom;
+            this.$set(this, 'form', this.form);
+          });
+        }
+      }else{
+        this.form.pic = "/img/default/building.png"
+      }
+      done();
+    },
+
+    //加载右侧数据
+    onLoadBuilding(id,params={}) {
+      this.loading = true;
+      this.form = {
+        type: this.typeBuilding,
+        residentialId: this.residentialId,
+        residentialName: this.residentialName
+      };
+      params.residentialId = id;
+      console.log("residential")
+      getBuildingListByResidentialOldId(1,100,params).then(res => {
+        this.data = res.data.data.records;
+        this.initTreeDatasByBuilding(this.data);
+        this.loading = false;
+      });
+    },
+    onLoadUnit(buildingId,params={}) {
+      this.loading = true;
+      params.buildingId = buildingId;
+      getUnitListByBuildingOldId(1,100,params).then(res => {
+        this.data = res.data.data.records;
+        this.initTreeDatasByUnit(this.data, buildingId);
+        this.loading = false;
+      });
+    },
+    onLoadFloor(buildingId, unitId,params={}) {
+      this.loading = true;
+      params.unitId = unitId;
+      getFloorListByUnitOldId(1,50,params).then(res => {
+        this.data = res.data.data.records;
+        this.initTreeDatasByFloor(this.data, buildingId, unitId);
+        this.loading = false;
+      });
+    },
+    onLoadRoom(buildingId, unitId, floorId,params={}) {
+      this.loading = true;
+      params.floorId = floorId;
+      console.log("楼层id:"+floorId)
+      getRoomListByFloorOldId(1, 100, params).then(res => {
+        this.data = res.data.data.records;
+        // debugger
+        for (let data of this.data) data.type = this.typeRoom;
+        this.initTreeDatasByRoom(this.data, buildingId, unitId, floorId);
+        this.loading = false;
+      });
+    },
+
+    // 点击左侧树形Item后初始化右侧数据
+    initBuildingDatas() {
+      //初始化楼栋
+      this.form = {
+        type: this.typeBuilding,
+        residentialId: this.residentialId,
+        residentialName: this.residentialName,
+      };
+      this.$set(this, 'form', this.form);
+      this.$set(this, 'option', this.optionBuilding);
+      this.onLoadBuilding(this.residentialId);
+    },
+    initUnitDatas(data) {
+      //初始化单元
+      this.form = {
+        type: this.typeUnit,
+        residentialId: this.residentialId,
+        // residentialName: this.residentialName,
+        buildingId: data.id
+      };
+      this.selectBuildingId = data.id;
+      this.initUnitDicData(data.id, this.optionUnit);
+      this.$set(this, 'form', this.form);
+      this.$set(this, 'option', this.optionUnit);
+      this.onLoadUnit(data.id);
+    },
+    initFloorDatas(data) {
+      //初始化楼层
+      this.form = {
+        type: this.typeFloor,
+        residentialId: this.residentialId,
+        // residentialName: this.residentialName,
+        buildingId: data.buildingId,
+        unitId: data.id
+      };
+      this.selectUnitId = data.id;
+      this.initFloorDicDatas(data.buildingId, data.id, this.optionFloor);
+      this.$set(this, 'form', this.form);
+      this.$set(this, 'option', this.optionFloor);
+      this.onLoadFloor(data.buildingId, data.id);
+    },
+    initRoomDatas(data) {
+      //初始化房间
+      this.form = {
+        type: this.typeRoom,
+        residentialId: this.residentialId,
+        // residentialName: this.residentialName,
+        buildingId: data.buildingId,
+        unitId: data.unitId,
+        floorId: data.id
+      };
+      this.selectFloorId = data.id;
+      this.initRoomDicData(data.buildingId, data.unitId, data.id);
+      this.$set(this, 'form', this.form);
+      this.$set(this, 'option', this.optionRoom);
+
+      this.onLoadRoom(data.buildingId, data.unitId, data.id);
+    },
+
+    // 点击左侧树形Item后初始化右侧选择项目数据
+    initUnitDicData(buildingOldId, option) {
+      if (option == null) option = this.optionUnit;
+      //初始化上一级下拉数据
+      for (let column of option.column) {
+        if (column.prop == 'buildingId') {
+          column.valueDefault = buildingOldId;
+          column.dicData = this.treeData[0].children;
+          break;
+        }
+      }
+    },
+    initFloorDicDatas(buildingId, unitId, option) {
+      if (option == null) option = this.optionFloor;
+      // this.initFloorDicData(buildingId, option);
+      //初始化上一级下拉数据
+      for (let column of option.column) {
+        if (column.prop == 'unitId') {
+          column.valueDefault = unitId;
+          for (let building of this.treeData[0].children) {
+            if (building.id == buildingId) {
+              column.dicData = building.children;
+              break;
+            }
+          }
+          break;
+        }
+      }
+    },
+    initRoomDicData(buildingId, unitId, floorId) {
+      // this.initFloorDicData(buildingId, this.optionRoom);
+      this.initFloorDicDatas(buildingId, unitId, this.optionRoom);
+      //初始化上一级下拉数据
+      // for (let column of this.optionRoom.column) {
+      //   if (column.prop == 'buildingRoomId') {
+      //     column.valueDefault = roomId;
+      //     for (let building of this.treeData[0].children) {
+      //       if (building.id == buildingId) {
+      //         for (let layer of building.children) {
+      //           if (layer.id == layerId) {
+      //             column.dicData = layer.children;
+      //             break;
+      //           }
+      //         }
+      //         break;
+      //       }
+      //     }
+      //     break;
+      //   }
+      // }
+    },
+
+    // 初始化右侧数据后更新左侧树形数据
+    initTreeDatasByBuilding(datas) {
+      console.log("小区tree", datas);
+      let treeData = [];
+      if (!ArrUtil.isNullOrLength(datas)) {
+        for (let data of datas) {
+          data.type = this.typeBuilding;
+          //初始化楼栋数据
+          treeData = ArrUtil.add(treeData, {
+            id: data.id,
+            type: "building",
+            leaf: false,
+            name: data.name,
+            children: [],
+            tag: data
+          });
+        }
+      }
+      this.treeData[0].children = treeData;
+    },
+    initTreeDatasByUnit(datas, buildingId) {
+      console.log("楼栋tree", datas);
+      // debugger
+      for (let children of this.treeData[0].children) {
+        if (children.id == buildingId) {
+          // this.optionUnit.addBtn = children.tag.floorNum > datas.length;
+          let treeData = [];
+          for (let data of datas) {
+            data.type = this.typeUnit;
+            treeData = ArrUtil.add(treeData, {
+              id: data.id,
+              buildingId: buildingId,
+              type: data.type,
+              name: data.name,
+              children: [],
+              tag: data
+            });
+          }
+          children.children = treeData;
+          break;
+        }
+      }
+    },
+    initTreeDatasByFloor(datas, buildingId, unitId) {
+      for (let building of this.treeData[0].children) {
+        if (building.id == buildingId) {
+          for (let layer of building.children) {
+            if (layer.id == unitId) {
+              // this.optionFloor.addBtn = building.tag.roomNum > datas.length;
+              let treeData = [];
+              for (let data of datas) {
+                data.type = this.typeFloor;
+                treeData = ArrUtil.add(treeData, {
+                  id: data.id,
+                  buildingId: buildingId,
+                  unitId: unitId,
+                  type: data.type,
+                  name: data.name,
+                  children: [],
+                  tag: data
+                });
+              }
+              layer.children = treeData;
+              break;
+            }
+          }
+          break;
+        }
+      }
+    },
+    initTreeDatasByRoom(datas, buildingId, unitId, floorId) {
+      for (let building of this.treeData[0].children) {
+        if (building.id == buildingId) {
+          for (let unit of building.children) {
+            if (unit.id == unitId) {
+              for (let floor of unit.children) {
+                if (floor.id == floorId) {
+                  // this.optionRoom.addBtn = floor.tag.bedNum > datas.length;
+
+                  let treeData = [];
+                  for (let data of datas) {
+                    data.type = this.typeRoom;
+                    treeData = ArrUtil.add(treeData, {
+                      id: data.id,
+                      buildingId: buildingId,
+                      unitId: unitId,
+                      floorId: floorId,
+                      type: data.type,
+                      name: data.name,
+                      children: [],
+                      tag: data
+                    });
+                  }
+                  floor.children = treeData;
+                  break;
+                }
+              }
+              break;
+            }
+          }
+          break;
+        }
+      }
+    },
+    batchAdd(){
+
+      this.$refs['batchForm'].validate((valid) => {
+        if (valid) {
+          this.batchForm.residentialId = this.residentialId;
+          this.batchDisabled = true;
+          this.batchText = '正在创建中···';
+          this.batchIcon = 'el-icon-loading';
+
+          batchAddSubmit(this.batchForm).then(res => {
+            if (res.data.code == 200){
+              this.batchVisible = false;
+              this.init();
+            }else{
+              this.batchIcon = 'el-icon-circle-plus-outline';
+              this.batchText = '提交';
+              this.batchDisabled = false;
+            }
+          });
+        }
+      });
+    },
+  }
+};
+</script>

+ 360 - 0
src/views/businessmng/assetmng.vue

@@ -0,0 +1,360 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.project_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/enterprise/project";
+  import {mapGetters} from "vuex";
+  import {isIntegerNotMust, validatMoney} from "../../util/validator";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "项目名称",
+              prop: "name",
+              search:true,
+              rules: [{
+                required: true,
+                message: "请输入项目名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "企业",
+              prop: "enterpriseId",
+              type:'select',
+              search:true,
+              remote: true,
+              dicUrl:'/api/cyzh-enterprise/enterprise/list?size=500&enterpriseName={{key}}',
+              props: {
+                label: "enterpriseName",
+                value: "id"
+              },
+              filterable: true,
+              dicFormatter: (res)=>{
+                return res.data.records;
+              },
+              rules: [{
+                required: true,
+                message: "请输入企业id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "投资规模",
+              prop: "investmentScale",
+              rules: [{
+                required: false,
+                message: "请输入投资规模",
+              },{
+                trigger: "blur",
+                validator:validatMoney
+              }]
+            },
+            {
+              label: "项目就业人数",
+              prop: "employmentNumber",
+              labelWidth: 100,
+              rules: [{
+                required: false,
+                message: "请输入项目就业人数",
+              },{
+                trigger:"blur",
+                validator:isIntegerNotMust
+              }]
+            },
+            {
+              label: "研发人员数",
+              prop: "researchNumber",
+              labelWidth: 100,
+              rules: [{
+                required: false,
+                message: "请输入研发人员人数",
+              },{
+                trigger:"blur",
+                validator:isIntegerNotMust
+              }]
+            },
+            {
+              label: "项目投资总额",
+              prop: "investmentAmount",
+              labelWidth: 100,
+              rules: [{
+                required: false,
+                message: "请输入项目投资总额",
+              },{
+                trigger: "blur",
+                validator:validatMoney
+              }]
+            },
+            {
+              label: "项目投资收益",
+              prop: "investmentReturn",
+              labelWidth: 100,
+              rules: [{
+                required: false,
+                message: "请输入项目投资收益",
+              },{
+                trigger: "blur",
+                validator:validatMoney
+              }]
+            },
+            {
+              label: "已完成投资总额",
+              prop: "investmentCompleted",
+              labelWidth: 120,
+              rules: [{
+                required: false,
+                message: "请输入已完成投资总额",
+              },{
+                trigger: "blur",
+                validator:validatMoney
+              }]
+            },
+            {
+              label: "项目研发费用",
+              prop: "researchCost",
+              labelWidth: 100,
+              rules: [{
+                required: false,
+                message: "请输入项目研发费用",
+              },{
+                trigger: "blur",
+                validator:validatMoney
+              }]
+            },
+            {
+              label: "项目上缴税金",
+              prop: "taxes",
+              labelWidth: 100,
+              rules: [{
+                required: false,
+                message: "请输入项目上缴税金",
+              },{
+                trigger: "blur",
+                validator:validatMoney
+              }]
+            },
+            {
+              label: "已申请奖补金额",
+              prop: "taward",
+              labelWidth: 120,
+              rules: [{
+                required: false,
+                message: "请输入已申请奖补金额",
+              },{
+                trigger: "blur",
+                validator:validatMoney
+              }]
+            },
+            {
+              label: "已发放奖补金额",
+              prop: "tawardCompleted",
+              labelWidth: 120,
+              rules: [{
+                required: false,
+                message: "请输入已发放奖补金额",
+              },{
+                trigger: "blur",
+                validator:validatMoney
+              }]
+            },
+            // {
+            //   label: "机构路径",
+            //   prop: "orgPosition",
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入机构路径",
+            //     trigger: "blur"
+            //   }]
+            // },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.project_add, false),
+          viewBtn: this.vaildData(this.permission.project_view, false),
+          delBtn: this.vaildData(this.permission.project_delete, false),
+          editBtn: this.vaildData(this.permission.project_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 453 - 0
src/views/businessmng/enterprisemng.vue

@@ -0,0 +1,453 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.enterprise_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+        <cy-excel-import :flag="2" file-name="企业信息导入模板" @success="onLoad(page)"></cy-excel-import>
+      </template>
+      <template slot="residentialId" slot-scope="scope">{{scope.row.residentialName}}</template>
+      <template slot="mapSelectForm" slot-scope="scope">
+        <div>
+<!--          <input class="el-input&#45;&#45;small el-input__inner" placeholder="选择地址" @click="mapVisible = true">-->
+          <el-button @click="mapVisible = true"> 选择地址</el-button>
+          <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="mapVisible"
+                     title="编辑地址" width="80%">
+            <editPolygonMap v-if="mapVisible" :editForm.sync="scope.row" :region.sync="scope.row.region" :latitude.sync="scope.row.latitude" :longitude.sync="scope.row.longitude" :visible.sync="mapVisible"></editPolygonMap>
+          </el-dialog>
+        </div>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/enterprise/enterprise";
+  import CyExcelImport from "../../components/excel/cy-excel-import"
+  import editPolygonMap from "../../components/residential/editPolygonMap.vue";
+  import {mapGetters} from "vuex";
+  import {validateTelphone} from "../../util/validator";
+
+  export default {
+    components: {
+      CyExcelImport,
+      editPolygonMap
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        mapVisible:false,
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          labelWidth: 120,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "企业名称",
+              prop: "enterpriseName",
+              search: true,
+              rules: [{
+                required: true,
+                message: "请输入企业名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "企业类型",
+              prop: "enterpriseType",
+              type: "select",
+              rules: [{
+                required: true,
+                message: "请输入企业类型",
+                trigger: "blur"
+              }],
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=enterprise_type",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+            },
+            {
+              label:'',
+              prop:'mapSelect',
+              // row: true,
+              // span: 20,
+              viewDisplay: false,
+              formslot: true,
+              hide: true,
+            },
+            {
+              label: "经度",
+              prop: "longitude",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入经度",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "纬度",
+              prop: "latitude",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入纬度",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "园区id",
+              prop: "agencyId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入园区id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              // slot: true,
+              type: "select",
+              search: true,
+              searchFilterable: true,
+              // cascaderItem: ['buildingId'],
+              dicUrl: "/api/cyzh-community/residential/list?size=9000",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              // dicFlag: false,
+              filterable: true,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "详细地址",
+              prop: "region",
+              overHidden: true,
+              rules: [{
+                required: true,
+                message: "请输入详细地址",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "组织机构代码",
+              prop: "organizationCode",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入组织机构代码",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "统一信用代码",
+              prop: "creditCode",
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请输入统一信用代码",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "注册资金",
+              prop: "registeredCapital",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入注册资金",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "注册地址",
+              prop: "registeredAddress",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入注册地址",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "法定代表人",
+              prop: "representative",
+              rules: [{
+                required: true,
+                message: "请输入法定代表人",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "成立日期",
+              prop: "registeredDate",
+              type: 'date',
+              format:'yyyy-MM-dd',
+              valueFormat:'yyyy-MM-dd',
+              rules: [{
+                required: false,
+                message: "请输入成立日期",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "办公电话",
+              prop: "officeNum",
+              rules: [{
+                required: false,
+                message: "请输入办公电话",
+                trigger: "blur"
+              },{
+                validator: validateTelphone,
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "营业执照",
+              prop: "businessLicense",
+              type: "upload",
+              width: 150,
+              listType: 'picture-img',
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              tip: '只能生产jpg/png图片,且不超过500kb',
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              rules: [{
+                required: false,
+                message: "请输入营业执照",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "logo",
+              prop: "logo",
+              type: "upload",
+              width: 150,
+              listType: 'picture-img',
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              tip: '只能生产jpg/png图片,且不超过500kb',
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              rules: [{
+                required: false,
+                message: "请输入logo",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "企业简介",
+              prop: "enterpriseIntroduce",
+              hide: true,
+              type: 'textarea',
+              rules: [{
+                required: false,
+                message: "请输入企业简介",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "登录密码",
+              prop: "password",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入机登录密码",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.enterprise_add, false),
+          viewBtn: this.vaildData(this.permission.enterprise_view, false),
+          delBtn: this.vaildData(this.permission.enterprise_delete, false),
+          editBtn: this.vaildData(this.permission.enterprise_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    mounted() {
+      console.log(this.permission,"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<")
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 372 - 0
src/views/businessmng/estatemng/parkarticle.vue

@@ -0,0 +1,372 @@
+<template>
+  <basic-container>
+    <!--    卡片数据展示-->
+    <el-card style="margin-bottom: 20px">
+      <el-tabs type="border-card">
+        <el-tab-pane label="数据统计"><avue-data-box :option="ArticleCount"></avue-data-box></el-tab-pane>
+      </el-tabs>
+    </el-card>
+
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.article_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="menu" slot-scope="scope">
+        <el-button type="text"
+                   size="small"
+                   icon="el-icon-view"
+                   @click="preview(scope.row)">预览
+        </el-button>
+      </template>
+      <template slot="image" slot-scope="scope">
+        <img style="width: 140px;height: 80px;" :src="scope.row.image" @click="openView(scope.row.image)">
+      </template>
+    </avue-crud>
+    <el-dialog :modal-append-to-body="false" title = "文章预览" :visible.sync = "previewVisiable" width="55%"
+               :close-on-click-modal="false">
+      <div>
+        <div class="borderline">
+          <div class="header">
+            <el-header>{{ previewForm.title }}</el-header>
+          </div>
+          <hr>
+          <!--<el-scrollbar style="height:100%">-->
+          <div>
+            <div id="updatetime">更新时间:{{ previewForm.updateTime }}</div>
+            <img :lazy='true' :src="previewForm.image" style="width:300px; height:200px; margin-left: 8px;" align="right" ></img>
+            <span id="main" v-html="previewForm.content"></span>
+          </div>
+          <hr>
+          <!--</el-scrollbar>-->
+        </div>
+      </div>
+    </el-dialog>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove,getArticleCount} from "@/api/estate/article";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        ArticleCount:{
+          span:6,
+          data: [
+            {
+              title: '今日浏览量',
+              count: 0,
+              icon: 'el-icon-view',
+              color: 'rgb(49, 180, 141)',
+            },
+            {
+              title: '本周浏览量',
+              count: 0,
+              icon: 'el-icon-view',
+              color: 'rgb(56, 161, 242)',
+            },
+            {
+              title: '本月浏览量',
+              count: 0,
+              icon: 'el-icon-view',
+              color: 'rgb(117, 56, 199)',
+            },
+            {
+              title: '今年浏览量',
+              count: 0,
+              icon: 'el-icon-view',
+              color: 'rgb(143,119,0)',
+            },
+          ]
+        },
+        form: {},
+        query: {},
+        loading: true,
+        previewVisiable: false,
+        previewForm: {},
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 50,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: false,
+          index: false,
+          viewBtn: false,
+          selection: true,
+          dialogClickModal: false,
+
+          column: [
+            {
+              label: "文章标题",
+              prop: "title",
+              search:true,
+              rules: [{
+                required: true,
+                message: "请输入文章标题",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "通知内容",
+              prop: "content",
+              hide:true,
+              component: 'AvueUeditor',
+              options: {
+                action: '/api/blade-resource/oss/endpoint/put-file',
+                props: {
+                  res: "data",
+                  url: "link",
+                }
+              },
+              minRows: 6,
+              span: 24,
+            },
+            {
+              label: "阅读数量",
+              prop: "reader",
+              rules: [{
+                required: false,
+                message: "请输入阅读数量",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "封面图",
+              prop: "image",
+              type:"upload",
+              slot: true,
+              width:200,
+              span: 24,
+              listType: 'picture-img',
+              propsHttp: {
+                url: 'data'
+              },
+              action: '/api/upload/putfile',
+              tip: "只能上传jpg/png图片,且不超过500kb",
+              rules: [{
+                required: true,
+                message: "请输入图片",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.article_add, false),
+          viewBtn: this.vaildData(this.permission.article_view, false),
+          delBtn: this.vaildData(this.permission.article_delete, false),
+          editBtn: this.vaildData(this.permission.article_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        let Base64 = require('js-base64').Base64;
+        row.content =Base64.encode(row.content);
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        let Base64 = require('js-base64').Base64;
+        row.content =Base64.encode(row.content);
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      preview(row) {
+        this.previewForm = row;
+        this.previewVisiable = true;
+      },
+      openView(url) {
+        var data = [{
+          thumbUrl: url,
+          url: url
+        }];
+        this.$ImagePreview(data, 0);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getArticleCount().then(res=>{
+          console.log(res,"打印res")
+          this.ArticleCount.data[0].count = res.data.dayCount;
+          this.ArticleCount.data[1].count = res.data.weekCount;
+          this.ArticleCount.data[2].count = res.data.monthCount;
+          this.ArticleCount.data[3].count = res.data.yearCount;
+        });
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+  .header {
+    background: #2B6695;
+    background-size:cover;
+    border-radius: 6px 6px 6px 6px;
+    box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5);
+    color: #FFFFFF;
+    font-family:"微软雅黑", "宋体", "黑体", Arial;
+    font-size: 18px;
+    font-weight: bold;
+    height: 40px;
+    line-height: 25px;
+    text-align: center;
+    margin: 18px 0 !important;
+    padding: 8px 0 5px 5px;
+    text-shadow: 2px 2px 3px #222222;
+  }
+  .borderline {
+    padding: 10px;
+  }
+  #main p{
+    line-height: 26px;
+    text-indent: 2em;
+  }
+  #updatetime{
+    font-weight: bold;
+    text-align: right;
+    margin-top: 20px;
+    margin-bottom: 15px;
+  }
+</style>

+ 260 - 0
src/views/businessmng/estatemng/parknotice.vue

@@ -0,0 +1,260 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.notice_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="menu" slot-scope="{row}">
+        <el-button type="text"
+                   size="mini"
+                   icon="el-icon-delete"
+                   plain
+                   @click="showPushRecord(row)">发布
+        </el-button>
+      </template>
+    </avue-crud>
+    <el-dialog title = "住户信息审核" :visible.sync="pushRecordVisible" :modal-append-to-body="false" >
+      <HouseuserCheck v-if="pushRecordVisible" ></HouseuserCheck>
+    </el-dialog>
+    <el-drawer :visible.sync="pushRecordVisible" size="85%" direction="rtl" :modal-append-to-body="false" destroy-on-close append-to-body center >
+      <noticepushrecord ref="noticepushrecord" :notice-id="noticeId" ></noticepushrecord>
+    </el-drawer>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/estate/notice";
+  import {mapGetters} from "vuex";
+  import noticepushrecord from "@/views/estate/noticepushrecord";
+
+  export default {
+    components: {
+      noticepushrecord
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        pushRecordVisible: false,
+        noticeId: null,
+        selectionList: [],
+        option: {
+          menuWidth: 300,
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "公告标题",
+              prop: "title",
+              rules: [{
+                required: true,
+                message: "请输入文章标题",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "公告内容",
+              prop: "notice",
+              component: 'AvueUeditor',
+              options: {
+                action: '/api/blade-resource/oss/endpoint/put-file',
+                props: {
+                  res: "data",
+                  url: "link",
+                }
+              },
+              hide: true,
+              minRows: 6,
+              span: 24,
+            },
+            {
+              label: "园区id",
+              prop: "agencyId",
+              display:false,
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请输入园区id",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.notice_add, false),
+          viewBtn: this.vaildData(this.permission.notice_view, false),
+          delBtn: this.vaildData(this.permission.notice_delete, false),
+          editBtn: this.vaildData(this.permission.notice_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      showPushRecord(row){
+        this.pushRecordVisible = true;
+        this.noticeId = row.id;
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 480 - 0
src/views/businessmng/estatemng/parkrepair.vue

@@ -0,0 +1,480 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.repair_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="jobStatus" slot-scope="scope">
+        <el-tag v-if="scope.row.jobStatus===0" type="info">待处理</el-tag>
+        <el-tag v-if="scope.row.jobStatus===1" type="success">处理中</el-tag>
+        <el-tag v-if="scope.row.jobStatus===2" >已处理</el-tag>
+      </template>
+      <template slot="residentialId" slot-scope="scope">{{scope.row.residentialName}}</template>
+      <template slot="residentialIdForm" slot-scope="scope">
+        <select-dialog-residential :disabled="true" :id="form.residentialId" :name="form.residentialName" :callback="selectCallback"></select-dialog-residential>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/estate/repair";
+  import {mapGetters} from "vuex";
+  import {validatePhone} from "../../../util/validator";
+  import SelectDialogResidential from "../../../components/select-dialog/select-dialog-residential";
+
+  export default {
+    components: {SelectDialogResidential},
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          labelWidth: 120,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          addBtn:false,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "工单编号",
+              prop: "jobNo",
+              display:false,
+              rules: [{
+                required: true,
+                message: "请输入工单编号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "上报人",
+              prop: "reportor",
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请输入上报人",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "上报人电话",
+              prop: "reportPhone",
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请输入上报人电话",
+              },{
+                validator: validatePhone,
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "上报时间",
+              prop: "reportTime",
+              type: 'datetime',
+              valueFormat: 'yyyy-MM-dd HH:mm:ss',
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请输入上报时间",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "处理人",
+              prop: "handler",
+              addDisplay:false,
+              editDisplay:false,
+              rules: [{
+                required: true,
+                message: "请输入处理人",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "处理人电话",
+              prop: "handlerPhone",
+              hide: true,
+              addDisplay:false,
+              editDisplay:false,
+              rules: [{
+                required: true,
+                message: "请输入处理人电话",
+              },{
+                validator: validatePhone,
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "工单状态",
+              prop: "jobStatus",
+              search: true,
+              type:'select',
+              addDisplay:false,
+              slot: true,
+              // dicUrl: "/api/blade-system/dict-biz/dictionary?code=job_status,
+              // props: {
+              //   label: "dictValue",
+              //   value: "dictKey"
+              // },
+              dicData:[
+                {
+                  label:'待处理',
+                  value:0
+                },{
+                  label:'处理中',
+                  value:1
+                },{
+                  label:'已处理',
+                  value:2
+                }
+              ],
+              rules: [{
+                required: true,
+                message: "请选择工单状态",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              type: "select",
+              slot:true,
+              formslot:true,
+              // dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}&&size=9999",
+              dicUrl: "/api/cyzh-community/residential/list?size=500",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              // dicFlag: false,
+              filterable: true,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: false,
+                message: "请选择所属区域",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "机构路径",
+              prop: "orgPosition",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入机构路径",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "报修位置",
+              prop: "reportPosition",
+              rules: [{
+                required: true,
+                message: "请输入报修位置",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "预约开始时间",
+              prop: "beginTime",
+              hide: true,
+              type: 'datetime',
+              valueFormat: 'yyyy-MM-dd HH:mm:ss',
+              rules: [{
+                required: false,
+                message: "请输入预约开始时间",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "预约结束时间",
+              prop: "endTime",
+              hide: true,
+              type: 'datetime',
+              valueFormat: 'yyyy-MM-dd HH:mm:ss',
+              rules: [{
+                required: false,
+                message: "请输入预约结束时间",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否已评价",
+              prop: "estimateStatus",
+              hide: true,
+              display:false,
+              type:'select',
+              dicData:[
+                {
+                  label:'未评价',
+                  value:0
+                },{
+                  label:'已评价',
+                  value:1
+                }
+              ],
+              rules: [{
+                required: false,
+                message: "请输入",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "用户对处理结果的评论",
+              prop: "comment",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入用户对处理结果的评论",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "处理时间",
+              prop: "handleTime",
+              type: 'datetime',
+              valueFormat: 'yyyy-MM-dd HH:mm:ss',
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入处理时间",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "小区名称",
+              prop: "residentialName",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入小区名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "物业系统id",
+              prop: "oldId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入物业系统id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "图片-多张图片用“,”切割",
+              prop: "pic",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入图片-多张图片用“,”切割",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "报修详情",
+              prop: "reportDetail",
+              hide: true,
+              type: 'textarea',
+              rules: [{
+                required: false,
+                message: "请输入报修详情",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      }
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.repair_add, false),
+          viewBtn: this.vaildData(this.permission.repair_view, false),
+          delBtn: this.vaildData(this.permission.repair_delete, false),
+          editBtn: this.vaildData(this.permission.repair_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    created() {
+      const tenantType = localStorage.getItem("tenantType");
+      if (tenantType == 0){
+        this.option.column[7].label = "所属区域"
+      }else if (tenantType == 1){
+        this.option.column[7].label = "所属区域"
+      }
+    },
+    methods: {
+      selectCallback(row){
+        this.form.residentialId = row.id;
+        this.form.residentialName = row.name;
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        loading = false;
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 96 - 0
src/views/businessmng/set-admin.vue

@@ -0,0 +1,96 @@
+<template>
+  <basic-container>
+    <avue-form ref="form" v-model="form" :option="option" @submit="submit">
+    </avue-form>
+  </basic-container>
+</template>
+
+<script>
+
+  import {update} from "@/api/enterprise/staff";
+
+    export default {
+      name: "set-admin",
+      props: {
+        form: Object
+      },
+      data(){
+        return {
+          option: {
+            column: [
+              {
+                label: "类型",
+                prop: "type",
+                row: true,
+                // span: 6,
+                type: "radio",
+                dicData: [{
+                  label: '园区管理员',
+                  value: 0
+                }, {
+                  label: '企业管理员',
+                  value: 1
+                }],
+                mock:{
+                  type:'dic'
+                },
+                rules: [{
+                  required: true,
+                  message: "请输入昵称",
+                  trigger: "blur"
+                }]
+              },
+              {
+                label: "账号",
+                prop: "account",
+                rules: [{
+                  required: true,
+                  message: "请输入昵称",
+                  trigger: "blur"
+                }]
+              },
+              {
+                label: "密码",
+                prop: "password",
+                type: 'password',
+                rules: [{
+                  required: true,
+                  message: "请输入昵称",
+                  trigger: "blur"
+                }]
+              },
+            ]
+          },
+          // form: {},
+          data: []
+        }
+      },
+      methods: {
+        submit(row, done){
+          if (row.type == 0){
+            row.isAgencyManager = 1;
+            row.agencyAccount = row.account;
+            row.agencyPassword = row.password;
+          }else{
+            row.isEnterpriseManager = 1;
+            row.enterpriseAccount = row.account;
+            row.enterprisePassword = row.password;
+          }
+          update(row).then(() => {
+            this.$emit("close")
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            done();
+          }, error => {
+            console.log(error);
+          });
+        },
+      }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 755 - 0
src/views/businessmng/staffmng.vue

@@ -0,0 +1,755 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.staff_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+        <cy-excel-import :flag="3" file-name="员工信息导入模板" @success="onLoad(page)"></cy-excel-import>
+        <el-button type="success"
+                   size="small"
+                   icon="el-icon-sort-down"
+                   plain
+                   @click="handleBatchPushUserFace">批量下发人脸
+        </el-button>
+      </template>
+
+      <template slot="menu" slot-scope="scope">
+        <el-button type="text" size="mini" icon="el-icon-setting">
+          <el-dropdown>
+            <span class="el-dropdown-link">
+              操作<i class="el-icon-arrow-down el-icon--right"></i>
+            </span>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item divided v-if="permission.staff_view" @click.native="detail(scope.row)" icon="el-icon-view">查看
+              </el-dropdown-item>
+              <el-dropdown-item divided v-if="permission.staff_edit" @click.native="edit(scope.row)" icon="el-icon-edit">编辑
+              </el-dropdown-item>
+              <el-dropdown-item style="color: limegreen" divided v-if="!!scope.row.face && scope.row.auditStatus == 1" @click.native="pushUserFaceToDevice(scope.row)" icon="el-icon-sort-down">人脸下发
+              </el-dropdown-item>
+              <el-dropdown-item style="color: red" divided v-if="!!scope.row.face && scope.row.auditStatus == 1" @click.native="deleteUserFaceFromDevice(scope.row)" icon="el-icon-sort-up">人脸禁用
+              </el-dropdown-item>
+              <el-dropdown-item divided @click.native="setAdmin(scope.row)" icon="el-icon-setting">设为管理员
+              </el-dropdown-item>
+              <el-dropdown-item divided icon="el-icon-s-order" @click.native="reviewHandler(scope.row)" :class=" [scope.row.auditStatus === 0 ? '' : 'recheck']">{{scope.row.auditStatus===0?'审核':'重审'}}</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </el-button>
+        <!--<el-button icon="el-icon-s-order" type="text" @click="reviewHandler(scope.row)">审核</el-button>-->
+      </template>
+
+      <template slot="auditStatus" slot-scope="scope">
+        <el-tag v-if="scope.row.auditStatus===0" type="info">待审核</el-tag>
+        <el-tag v-if="scope.row.auditStatus===1" type="success">审核通过</el-tag>
+        <el-tag v-if="scope.row.auditStatus===2" type="danger">审核不通过</el-tag>
+      </template>
+    </avue-crud>
+
+    <el-dialog :modal-append-to-body="false" title = "员工信息审核" :visible.sync = "reviewVisible" width="60%"
+               :close-on-click-modal="false" top="1%">
+      <review-staff :reviewDetail="reviewDetail" @visibleemit="visibleUpdate"></review-staff>
+    </el-dialog>
+
+    <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="editVisible"
+               title="编辑" width="60%">
+      <avue-form v-model="editForm" :option="option" @submit="submitEnterprisestaff"></avue-form>
+    </el-dialog>
+
+    <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="detailVisible"
+               title="详情" width="60%">
+      <staff-detail :detailForm="detailForm"></staff-detail>
+      <!--<avue-detail :option="option" v-model="detailForm"></avue-detail>-->
+    </el-dialog>
+
+    <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="setAdminVisible"
+               title="设置管理员" width="60%">
+      <set-admin :form="setAdminForm" @close="setAdminVisible = false, onLoad(page)"></set-admin>
+      <!--<avue-detail :option="option" v-model="detailForm"></avue-detail>-->
+    </el-dialog>
+
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove, pushUserFace, pushUserFaceBatch, deleteUserFace} from "@/api/enterprise/staff";
+  import {mapGetters} from "vuex";
+  import {validatedEmail, validatePhone} from "../../util/validator";
+  import StaffDetail from "../../components/staff/staffDetail";
+  import ReviewStaff from "../../components/staff/review-staff";
+  import SetAdmin from "./set-admin";
+
+  export default {
+    components: {SetAdmin, ReviewStaff, StaffDetail},
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        reviewVisible: false,
+        reviewDetail: {},
+        editVisible: false,
+        editForm: {},
+        detailForm: {},
+        detailVisible: false,
+        setAdminForm: {},
+        setAdminVisible: false,
+        forbidden: false,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "所属企业",
+              prop: "enterpriseName",
+              editDisplay: false,
+              addDisplay: false,
+            },
+            {
+              label: "所属企业",
+              prop: "enterpriseId",
+              type: "select",
+              width: 250,
+              search: true,
+              searchSpan: 6,
+              overHidden: true,
+              searchFilterable: true,
+              filterable: true,
+              remote: true,
+              cascaderItem: ['enterpriseDeptId'],
+              dicUrl: '/api/cyzh-enterprise/enterprise/list?size=100&enterpriseName={{key}}',
+              dicFormatter: (res)=>{
+                return res.data.records;
+              },
+              props: {
+                label: "enterpriseName",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请输入所属企业",
+                trigger: "blur"
+              }],
+              hide: true,
+              viewDisplay: false
+            },
+            {
+              label: "所属部门",
+              prop: "enterpriseDeptName",
+              editDisplay: false,
+              addDisplay: false,
+            },
+            {
+              label: "所属部门",
+              prop: "enterpriseDeptId",
+              type: "select",
+              width: 250,
+              search: true,
+              searchSpan: 6,
+              overHidden: true,
+              searchFilterable: true,
+              filterable: true,
+              remote: true,
+              dicUrl: '/api/cyzh-enterprise/dept/list?size=10&enterpriseId={{key}}',
+              dicFormatter: (res)=>{
+                return res.data.records;
+              },
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: false,
+                message: "请输入所属部门",
+                trigger: "blur"
+              }],
+              hide: true,
+              viewDisplay: false
+            },
+            // {
+            //   label: "企业名称",
+            //   prop: "enterpriseName",
+            //   hide: true,
+            //   display: false,
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入企业名称",
+            //     trigger: "blur"
+            //   }]
+            // },
+            {
+              label: "昵称",
+              prop: "name",
+              hide: true,
+              display: false,
+              rules: [{
+                required: false,
+                message: "请输入昵称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "姓名",
+              prop: "realName",
+              rules: [{
+                required: true,
+                message: "请输入真名",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "性别",
+              prop: "sex",
+              type: 'select',
+              width: 100,
+              dataType:"number",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=sex",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+              rules: [{
+                required: false,
+                message: "请选择性别",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "人脸",
+              prop: "face",
+              type: "upload",
+              width: 150,
+              listType: 'picture-img',
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              action: "/api/blade-resource/oss/endpoint/put-file",
+            },
+            {
+              label: "邮箱",
+              prop: "email",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入邮箱",
+                trigger: "blur",
+                validator: validatedEmail
+              }]
+            },
+            {
+              label: "头像",
+              prop: "avatar",
+              type: "upload",
+              hide: true,
+              display: false,
+              width: 150,
+              listType: 'picture-img',
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              rules: [{
+                required: true,
+                message: "请输入头像",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "手机",
+              prop: "phone",
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请输入手机",
+                trigger: "blur",
+              },{
+                trigger: "blur",
+                validator: validatePhone
+              }]
+            },
+            {
+              label: "生日",
+              prop: "birthday",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入生日",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "身份证号码",
+              prop: "idcard",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入身份证号码",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "住址",
+              prop: "address",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入住址",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "审核时间",
+              prop: "auditTime",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入审核时间",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "审核状态",
+              prop: "auditStatus",
+              search:"true",
+              slot: true,
+              display: false,
+              type:'select',
+              dicData:[
+                {
+                  label:'待审核',
+                  value:0,
+                  color:'red'
+                },{
+                  label:'审核通过',
+                  value:1
+                },{
+                  label:'审核不通过',
+                  value:2
+                }
+              ],
+            },
+            {
+              label: "审核意见",
+              prop: "auditOpinion",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入审核意见",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "园区id",
+              prop: "agencyId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入园区id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "区域id",
+              prop: "residentialId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入区域id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "小程序openId",
+              prop: "openId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入小程序openId",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "部门id",
+              prop: "deptId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入部门id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "岗位id",
+              prop: "postId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入岗位id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "备注",
+              prop: "remarks",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入备注",
+                trigger: "blur"
+              }]
+            },
+            {
+              label:"来源",
+              prop:"createType",
+              search:"true",
+              searchSpan: 4,
+              type:'select',
+              display: false,
+              dicData:[
+                {
+                  label:'后台',
+                  value:0
+                },{
+                  label:'小程序',
+                  value:1
+                }
+              ]
+            },
+            {
+              label: "机构路径",
+              prop: "orgPosition",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入机构路径",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否为小程序园区管理员:0-否 1-是",
+              prop: "isAgencyManager",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入是否为小程序园区管理员:0-否 1-是",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "若为园区管理员时的小程序登录账号",
+              prop: "agencyAccount",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入若为园区管理员时的小程序登录账号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "若为园区管理员时的小程序登录密码",
+              prop: "agencyPassword",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入若为园区管理员时的小程序登录密码",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否为企业管理员:0-否 1-是",
+              prop: "isEnterpriseManager",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入是否为企业管理员:0-否 1-是",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "若为企业管理员时的小程序登录账号",
+              prop: "enterpriseAccount",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入若为企业管理员时的小程序登录账号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "若为企业管理员时的小程序登录密码",
+              prop: "enterprisePassword",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入若为企业管理员时的小程序登录密码",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.staff_add, false),
+          viewBtn: this.vaildData(this.permission.staff_view, false),
+          delBtn: this.vaildData(this.permission.staff_delete, false),
+          editBtn: this.vaildData(this.permission.staff_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      setAdmin(row){
+        this.setAdminForm = row;
+        this.setAdminVisible = true;
+      },
+      deleteUserFaceFromDevice(row){
+        this.$confirm("确定禁用人脸吗?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return deleteUserFace(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleBatchPushUserFace() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        pushUserFaceBatch(this.ids).then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        })
+      },
+      visibleUpdate(data) {
+        this.reviewVisible = data;
+        this.onLoad(this.page);
+      },
+      detail(row) {
+        this.detailForm = row;
+        this.detailForm['gender'] = row.$sex;
+        this.detailVisible = true;
+      },
+      edit(row) {
+        this.editForm = row;
+        this.editVisible = true;
+      },
+      pushUserFaceToDevice(row){
+        //下发人脸到测温系统和设备
+        pushUserFace(row.id).then(res => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        })
+      },
+      reviewHandler(row) {
+        this.reviewDetail = row;
+        this.reviewVisible = true;
+        // debugger
+        this.url = row.face;
+      },
+      rowSave(row, done, loading) {
+        if(row.$enterpriseId){
+          row.enterpriseName = row.$enterpriseId;
+        }
+        if(row.$enterpriseDeptId){
+          row.enterpriseDeptName = row.$enterpriseDeptId;
+        }
+        if (row.avatar.length == 0) {
+          row.avatar = '';
+        }
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        if(row.$enterpriseDeptId){
+          row.enterpriseDeptName = row.$enterpriseDeptId;
+        }
+        if(row.$enterpriseId){
+          row.enterpriseName = row.$enterpriseId;
+        }
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 438 - 0
src/views/businessmng/workordermng/deviceworkorder.vue

@@ -0,0 +1,438 @@
+<template>
+  <basic-container>
+    <el-dialog :modal-append-to-body="false" :visible.sync="doorRecordVisible" title="开门记录" width="80%">
+      <open-door-record :openDoorRecordList="openDoorRecordList"></open-door-record>
+    </el-dialog>
+    <el-dialog :modal-append-to-body="false" :visible.sync="solveDetailVisible" title="处理工单" width="50%">
+      <device-job ref="deviceJob"  :jobSolve="solveDetail" :visible="solveDetailVisible"
+                  @close-dialog="closeDialog"></device-job>
+    </el-dialog>
+    <avue-data-icons :option="countOption" style="margin-left: 250px"></avue-data-icons>
+    <avue-crud :option="option" :search.sync="searchForm" :table-loading="loading" :data="data" :page="page" :permission="permissionList"
+               :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
+               @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+               @size-change="sizeChange" @refresh-change="refreshChange">
+
+      <template slot="menu" slot-scope="scope">
+        <el-button type="text" size="mini" icon="el-icon-s-order" plain v-if="permission.deviceorder_edit &&scope.row.jobStatus ==1" @click.native="handleSolve(scope.row)">处理工单
+        </el-button>
+        <el-button type="text" size="mini" icon="el-icon-s-order" plain v-if="permission.deviceorder_edit &&scope.row.jobStatus ==2" @click.native="handleSolve(scope.row)">处理结果
+        </el-button>
+        <el-button type="text" size="mini" icon="el-icon-info" plain v-if="scope.row.deviceType == 9" @click="openDoorRecord(scope.row)">开门记录
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+import {
+  getList,
+  getDetail,
+  add,
+  update,
+  remove,
+  getDeviceJobStaticVo
+} from "../../../api/order/deviceorder";
+import {
+  mapGetters
+} from "vuex";
+import {iconsOption} from "../../../api/dataview/dataviewoption";
+import {validatePhone} from "../../../util/validator";
+import deviceJob from "../../../components/job/job_solve";
+
+export default {
+  components:{deviceJob},
+  data() {
+    return {
+      searchForm:{},
+      deviceJobStaticVo:{},
+      openDoorRecordList: [],
+      doorRecordVisible: false,
+      solveDetailVisible: false,
+      solveDetail: {},
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      countOption: {},
+      option: {
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: false,
+        addBtn: false,
+        editBtn: false,
+        delBtn: false,
+        selection: true,
+        dialogClickModal: false,
+        column: [{
+          label: "设备编号",
+          prop: "deviceId",
+          search: true,
+          width: 150,
+          rules: [{
+            required: true,
+            message: "请输入设备编号",
+            trigger: "blur"
+          }]
+        },
+          {
+            label: "设备名称",
+            overHidden: true,
+            prop: "deviceName",
+          },
+          {
+            label: "相关人",
+            prop: "person",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入相关人",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "告警时间",
+            prop: "alarmTime",
+            type: "datetime",
+            width: 150,
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            rules: [{
+              required: true,
+              message: "请输入告警时间",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "设备类型",
+            prop: "deviceType",
+            width: 120,
+            search: true,
+            type: "select",
+            dataType: "number",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=device_type",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            rules: [{
+              required: true,
+              message: "请输入设备类型",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "告警地点",
+            prop: "alarmPosition",
+            width: 350,
+            overHidden: true,
+            rules: [{
+              required: true,
+              message: "请输入告警地点",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "处理人",
+            prop: "handlePerson",
+            width: 200,
+            rules: [{
+              required: true,
+              message: "请输入处理人",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "电话",
+            prop: "handlePhone",
+            rules: [{
+              required: true,
+              message: "请输入电话",
+            },{
+              validator: validatePhone,
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "工单生成时间",
+            prop: "createTime",
+            type: "datetime",
+            width: 150,
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            rules: [{
+              required: true,
+              message: "请输入告警时间",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "工单状态",
+            prop: "jobStatus",
+            type: "select",
+            dataType: "number",
+            search: true,
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=job_status",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            rules: [{
+              required: true,
+              message: "请输入工单状态",
+              trigger: "blur"
+            }]
+          },
+        ]
+      },
+      data: []
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.deviceorder_add, false),
+        viewBtn: this.vaildData(this.permission.deviceorder_view, false),
+        delBtn: this.vaildData(this.permission.deviceorder_delete, false),
+        editBtn: this.vaildData(this.permission.deviceorder_edit, false)
+      };
+    },
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  mounted() {
+    this.$nextTick(()=>{
+      if (this.$route.params.todo){
+        this.$refs.crud.searchForm.jobStatus = 1;
+        this.query.jobStatus = 1;
+      }
+      this.onLoad(this.page,this.query);
+    })
+  },
+  watch:{
+    solveDetailVisible:function(value){
+
+      this.onLoad(this.page,this.query)
+
+    },
+  },
+  methods: {
+    openDoorRecord(row) {
+      this.openDoorRecordList = [{
+        openTime: "2020-05-14 12:55:45",
+        openStatus: "开"
+      },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "开"
+        },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "关"
+        },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "开"
+        },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "关"
+        },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "开"
+        },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "开"
+        },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "开"
+        },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "开"
+        },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "开"
+        },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "开"
+        },
+        {
+          openTime: "2020-05-14 12:55:45",
+          openStatus: "开"
+        },
+      ];
+      this.doorRecordVisible = true;
+    },
+    closeDialog() {
+      this.solveDetail = {};
+      this.solveDetailVisible = false;
+      this.onLoad(this.page,this.query);
+    },
+    select(deviceType,params={}) {
+      this.$refs.crud.searchForm.deviceType = deviceType;
+      this.query.deviceType = deviceType;
+      this.onLoad(this.page,this.query);
+    },
+    handleSolve(row) {
+      this.solveDetail = row;
+      this.solveDetailVisible = true;
+      this.$nextTick(()=>{
+        this.$refs.deviceJob.init()
+      })
+    },
+    rowSave(row, done, loading) {
+      add(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      update(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        });
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(this.ids);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.$refs.crud.toggleSelection();
+        });
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+
+      if (params.jobStatus == 0) {
+        params.jobStatus = null;
+      }
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+      this.onLoad(this.page,this.query);
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      this.countOption = iconsOption(this)
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+        this.selectionClear();
+      });
+      // debugger
+      getDeviceJobStaticVo().then(res => {
+        this.deviceJobStaticVo = res.data.data;
+        this.countOption.data[0].count = this.deviceJobStaticVo.smokeCount;
+        this.countOption.data[1].count = this.deviceJobStaticVo.gasCount;
+        this.countOption.data[2].count = this.deviceJobStaticVo.coverCount;
+        this.countOption.data[3].count = this.deviceJobStaticVo.alarmCount;
+        this.countOption.data[4].count = this.deviceJobStaticVo.lampCount;
+        this.countOption.data[5].count = this.deviceJobStaticVo.xfCount;
+        this.countOption.data[6].count = this.deviceJobStaticVo.trashbinCount;
+        this.countOption.data[7].count = this.deviceJobStaticVo.parkCount;
+        //this.countOption.data[8].count = this.deviceJobStaticVo.gateCount;
+        // console.log(this.deviceJobStaticVo.alarmCount)
+      });
+    }
+  }
+};
+</script>
+
+<style>
+</style>

+ 339 - 0
src/views/businessmng/workordermng/publicevent.vue

@@ -0,0 +1,339 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button
+          size="small"
+          plain
+          v-if="permission.publicevent_add"
+          @click="addEvent">上报事件
+        </el-button>
+      </template>
+      <template slot-scope="scope" slot="menu">
+        <el-button size="small"
+                   v-if="permission.publicevent_view"
+                   @click.stop="handleDetail(scope.row)">详情
+        </el-button>
+        <el-button size="small"
+                   v-if="permission.publicevent_view"
+                   @click.stop="handleImage(scope.row,scope.index)">跟踪
+        </el-button>
+      </template>
+      <template slot-scope="{row}"
+                slot="finish">
+        <el-tag>{{row.finish==='finish' ? '已完成' : '未完成'}}</el-tag>
+      </template>
+    </avue-crud>
+
+    <el-dialog title="流程图"
+               append-to-body
+               :visible.sync="flowBox"
+               :fullscreen="true">
+      <iframe
+        style="border: solid 2px #dddddd;background: white"
+        :src=flowUrl
+        width="100%"
+        height="800"
+        title="流程图"
+        marginWidth="0"
+        marginHeight="0"
+        allowTransparency="yes">
+      </iframe>
+      <span slot="footer"
+            class="dialog-footer">
+        <el-button @click="flowBox = false">关 闭</el-button>
+      </span>
+    </el-dialog>
+  </basic-container>
+</template>
+
+<script>
+import {getList, getDetail, add, update, remove} from "@/api/order/publicevent";
+import {mapGetters} from "vuex";
+import {startList} from "../../../api/work/work";
+
+export default {
+  data() {
+    return {
+      form: {},
+      query: {},
+      flowBox: false,
+      loading: true,
+      processDefId: '',
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        height:'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: false,
+        selection: true,
+        dialogClickModal: false,
+        column: [
+          {
+            label: "姓名",
+            prop: "name",
+            rules: [{
+              required: true,
+              message: "请输入姓名",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "联系方式",
+            prop: "tel",
+            rules: [{
+              required: true,
+              message: "请输入联系方式",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "事件详情",
+            prop: "eventDetail",
+            rules: [{
+              required: true,
+              message: "请输入事件详情",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "流程定义主键",
+            prop: "processDefinitionId",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入流程定义主键",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "流程实例主键",
+            prop: "processInstanceId",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入流程实例主键",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "审核员",
+            prop: "auditorName",
+            rules: [{
+              required: true,
+              message: "请输入审核员",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "事件发生地点",
+            prop: "location",
+            rules: [{
+              required: false,
+              message: "请输入受理人",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "处理人",
+            prop: "handlePersonName",
+            rules: [{
+              required: true,
+              message: "请输入处理人",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "当前步骤",
+            prop: "currentStep",
+            rules: [{
+              required: true,
+              message: "请输入当前步骤",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "进度",
+            prop: "finish",
+            slot: true,
+          },
+        ]
+      },
+      data: []
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.publicevent_add, false),
+        viewBtn: this.vaildData(this.permission.publicevent_view, false),
+        delBtn: this.vaildData(this.permission.publicevent_delete, false),
+        editBtn: this.vaildData(this.permission.publicevent_edit, false)
+      };
+    },
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  methods: {
+    handleDetail(row) {
+      this.$router.push({ path: `/work/process/publicevent/detail/${row.processInstanceId}/${row.id}`});
+    },
+    handleImage(row) {
+      this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
+      this.flowBox = true;
+    },
+    rowSave(row, done, loading) {
+      add(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      update(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        });
+    },
+    addEvent(){
+      let path = `/work/process/publicEvent/form/`+this.processDefId;
+      this.$router.push({path});
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(this.ids);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.$refs.crud.toggleSelection();
+        });
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage){
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    async onLoad(page, params = {}) {
+      this.loading = true;
+      this.processDefId = (await startList(1,10,{category: 'flow_3'})).data.data.records[0].id;
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+        this.selectionClear();
+      });
+    }
+  }
+};
+</script>
+
+<style>
+</style>

+ 2 - 2
src/views/community/agency.vue

@@ -32,7 +32,7 @@
 <!--卡片数据展示-->
     <el-card style="margin-bottom: 20px">
         <el-tabs type="border-card">
-          <el-tab-pane label="区数据统计">
+          <el-tab-pane label="区数据统计">
             <div><avue-data-box :option="communityStatistics"></avue-data-box></div>
           </el-tab-pane>
         </el-tabs>
@@ -44,7 +44,7 @@
                @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
       <template slot="menuLeft">
         <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.agency_delete" @click="handleDelete">删 除</el-button>
-        <cy-excel-import :flag="1" file-name="区信息导入模板" @success="onLoad(page)"></cy-excel-import>
+        <cy-excel-import :flag="1" file-name="区信息导入模板" @success="onLoad(page)"></cy-excel-import>
       </template>
       <template slot="mapSelectForm" slot-scope="scope">
         <div>

+ 5 - 5
src/views/community/building.vue

@@ -117,7 +117,7 @@ export default {
             }]
           },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "residentialId",
           //   type:"select",
           //   remote: true,
@@ -140,7 +140,7 @@ export default {
           //   }]
           // },
           {
-            label: "所属区",
+            label: "所属区",
             prop: "residentialId",
             slot: true,
             type: "select",
@@ -159,7 +159,7 @@ export default {
             },
             rules: [{
               required: true,
-              message: "请选择所属区",
+              message: "请选择所属区",
               trigger: "blur"
             }]
           },
@@ -253,8 +253,8 @@ export default {
     const residentialColumn = this.findObject(this.option.column, "residentialId");
     if (tenantType == 1) { //园区
       residentialColumn.label = "所属区域"
-    } else { //
-      residentialColumn.label = "所属区"
+    } else { //
+      residentialColumn.label = "所属区"
     }
   },
   methods: {

+ 12 - 12
src/views/community/floor.vue

@@ -91,7 +91,7 @@ export default {
             }]
           },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "agencyId",
           //   hide: true,
           //   display: false,
@@ -109,12 +109,12 @@ export default {
           //   },
           //   rules: [{
           //     required: true,
-          //     message: "请选择所属区",
+          //     message: "请选择所属区",
           //     trigger: "blur"
           //   }]
           // },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "residentialId",
           //   search: true,
           //   slot: true,
@@ -132,12 +132,12 @@ export default {
           //   },
           //   rules: [{
           //     required: true,
-          //     message: "请选择所属区",
+          //     message: "请选择所属区",
           //     trigger: "blur"
           //   }]
           // },
           {
-            label: "所属区",
+            label: "所属区",
             prop: "residentialId",
             type:"select",
             cascaderItem: ['buildingId'],
@@ -156,7 +156,7 @@ export default {
             slot: true,
             rules: [{
               required: true,
-              message: "请选择所属区",
+              message: "请选择所属区",
               trigger: "blur"
             }]
           },
@@ -314,24 +314,24 @@ export default {
             }]
           },
           {
-            label: "所属机构id(属于社区机构,则存社区机构ID;无社区机构,则存小区ID)",
+            label: "所属机构id(属于园区机构,则存园区机构ID;无园区机构,则存小区ID)",
             prop: "orgPid",
             hide: true,
             display: false,
             rules: [{
               required: true,
-              message: "请输入所属机构id(属于社区机构,则存社区机构ID;无社区机构,则存小区ID)",
+              message: "请输入所属机构id(属于园区机构,则存园区机构ID;无园区机构,则存小区ID)",
               trigger: "blur"
             }]
           },
           {
-            label: "所属机构名称(属于社区机构,则存社区机构名称;无社区机构,则存小区名称)",
+            label: "所属机构名称(属于园区机构,则存园区机构名称;无园区机构,则存小区名称)",
             prop: "orgPidName",
             hide: true,
             display: false,
             rules: [{
               required: true,
-              message: "请输入所属机构名称(属于社区机构,则存社区机构名称;无社区机构,则存小区名称)",
+              message: "请输入所属机构名称(属于园区机构,则存园区机构名称;无园区机构,则存小区名称)",
               trigger: "blur"
             }]
           },
@@ -386,8 +386,8 @@ export default {
     const residentialColumn = this.findObject(this.option.column, "residentialId");
     if (tenantType == 1) { //园区
       residentialColumn.label = "所属区域";
-    } else { //
-      residentialColumn.label = "所属区";
+    } else { //
+      residentialColumn.label = "所属区";
     }
   },
   methods: {

+ 3 - 3
src/views/community/residential.vue

@@ -202,7 +202,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               // slot: true,
               search: true,
@@ -223,7 +223,7 @@
               },
               rules: [{
                 required: true,
-                message: "请输入所属区名称",
+                message: "请输入所属区名称",
                 trigger: "blur"
               }]
 
@@ -592,7 +592,7 @@
     created() {
       const tenantType = localStorage.getItem("tenantType");
       if (tenantType == 0) {
-        this.option.column[4].label = "所属区"
+        this.option.column[4].label = "所属区"
       } else if (tenantType == 1) {
         this.option.column[4].label = "所属园区"
       }

+ 13 - 13
src/views/community/residentialManage.vue

@@ -281,12 +281,12 @@ export default {
         menuWidth:350,
         column: [
           {
-            label: '所属区',
+            label: '所属区',
             prop: 'residentialName',
             disabled: true,
           },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "residentialId",
           //   disabled: true,
           //   type:'select',
@@ -302,7 +302,7 @@ export default {
           //   },
           //   rules: [{
           //     required: false,
-          //     message: "请选择所属区",
+          //     message: "请选择所属区",
           //     trigger: "blur"
           //   }]
           // },
@@ -405,12 +405,12 @@ export default {
         menuWidth:350,
         column: [
           {
-            label: '所属区',
+            label: '所属区',
             prop: 'residentialName',
             disabled: true,
           },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "residentialId",
           //   disabled: true,
           //   type:'select',
@@ -427,7 +427,7 @@ export default {
           //   },
           //   rules: [{
           //     required: false,
-          //     message: "请选择所属区",
+          //     message: "请选择所属区",
           //     trigger: "blur"
           //   }]
           // },
@@ -554,12 +554,12 @@ export default {
         menuWidth:350,
         column: [
           {
-            label: '所属区',
+            label: '所属区',
             prop: 'residentialName',
             disabled: true,
           },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "residentialId",
           //   disabled: true,
           //   type:'select',
@@ -576,7 +576,7 @@ export default {
           //   },
           //   rules: [{
           //     required: false,
-          //     message: "请选择所属区",
+          //     message: "请选择所属区",
           //     trigger: "blur"
           //   }]
           // },
@@ -737,12 +737,12 @@ export default {
         menuWidth:350,
         column: [
           {
-            label: '所属区',
+            label: '所属区',
             prop: 'residentialName',
             disabled: true,
           },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "residentialId",
           //   // slot: true,
           //   type: "select",
@@ -763,7 +763,7 @@ export default {
           //   },
           //   rules: [{
           //     required: false,
-          //     message: "请输入所属区名称",
+          //     message: "请输入所属区名称",
           //     trigger: "blur"
           //   }]
           // },
@@ -999,7 +999,7 @@ export default {
       const tenantType = localStorage.getItem("tenantType");
       if (tenantType == 0){
         let residentialNameProp = this.findObject(this.optionBuilding.column, "residentialName");
-        residentialNameProp.label = "所属区"
+        residentialNameProp.label = "所属区"
       }else if (tenantType == 1){
         let residentialNameProp = this.findObject(this.optionBuilding.column, "residentialName");
         residentialNameProp.label = "所属区域"

+ 7 - 7
src/views/community/room.vue

@@ -95,7 +95,7 @@ export default {
               trigger: "blur"
             }]
           },{
-            label: "所属区",
+            label: "所属区",
             prop: "agencyId",
             slot: true,
             hide: true,
@@ -113,11 +113,11 @@ export default {
             },
             rules: [{
               required: true,
-              message: "请选择所属区",
+              message: "请选择所属区",
               trigger: "blur"
             }]
           },{
-            label: "所属区",
+            label: "所属区",
             prop: "residentialId",
             slot: true,
             type: "select",
@@ -138,7 +138,7 @@ export default {
             },
             rules: [{
               required: true,
-              message: "请输入所属区",
+              message: "请输入所属区",
               trigger: "blur"
             }]
           },
@@ -300,9 +300,9 @@ export default {
     if (tenantType == 1) { //园区
       agencyColumn.label = "所属园区";
       residentialColumn.label = "所属区域";
-    } else { //
-      agencyColumn.label = "所属区";
-      residentialColumn.label = "所属区";
+    } else { //
+      agencyColumn.label = "所属区";
+      residentialColumn.label = "所属区";
     }
   },
   methods: {

+ 7 - 7
src/views/community/unit.vue

@@ -130,7 +130,7 @@ export default {
             }]
           },
           // {
-          //   label: "所属区",
+          //   label: "所属区",
           //   prop: "agencyId",
           //   slot: true,
           //   search: true,
@@ -148,12 +148,12 @@ export default {
           //   },
           //   rules: [{
           //     required: true,
-          //     message: "请选择所属区",
+          //     message: "请选择所属区",
           //     trigger: "blur"
           //   }]
           // },
           {
-            label: "所属区",
+            label: "所属区",
             prop: "residentialId",
             slot: true,
             type: "select",
@@ -173,7 +173,7 @@ export default {
             },
             rules: [{
               required: true,
-              message: "请选择所属区",
+              message: "请选择所属区",
               trigger: "blur"
             }]
           },
@@ -333,9 +333,9 @@ export default {
     if (tenantType == 1) { //园区
       agencyColumn.label = "所属园区";
       residentialColumn.label = "所属区域";
-    } else { //
-      agencyColumn.label = "所属区";
-      residentialColumn.label = "所属区";
+    } else { //
+      agencyColumn.label = "所属区";
+      residentialColumn.label = "所属区";
     }
   },
   methods: {

+ 4 - 4
src/views/device/deviceList.vue

@@ -69,20 +69,20 @@
               }]
             },
             {
-              label: "区id",
+              label: "区id",
               prop: "agencyId",
               rules: [{
                 required: true,
-                message: "请输入区id",
+                message: "请输入区id",
                 trigger: "blur"
               }]
             },
             {
-              label: "区名称",
+              label: "区名称",
               prop: "agencyName",
               rules: [{
                 required: true,
-                message: "请输入区名称",
+                message: "请输入区名称",
                 trigger: "blur"
               }]
             },

+ 3 - 3
src/views/device/doordevice.vue

@@ -260,9 +260,9 @@ export default {
   created() {
     const tenantType = localStorage.getItem("tenantType");
     if (tenantType == 0){
-      this.findObject(this.option.column, 'residentialId').label = "所属区";
-      this.findObject(this.option.column, 'residentialId').rules[0].message = "请选择所属区";
-      // this.option.column[2].label = "所属区"
+      this.findObject(this.option.column, 'residentialId').label = "所属区";
+      this.findObject(this.option.column, 'residentialId').rules[0].message = "请选择所属区";
+      // this.option.column[2].label = "所属区"
     }else if (tenantType == 1){
       // this.option.column[2].label = "所属区域"
       this.findObject(this.option.column, 'residentialId').label = "所属区域";

+ 2 - 2
src/views/device/electricmeterstatic.vue

@@ -60,11 +60,11 @@
           dialogClickModal: false,
           column: [
             {
-              label: "园区或区id",
+              label: "园区或区id",
               prop: "agencyId",
               rules: [{
                 required: true,
-                message: "请输入园区或区id",
+                message: "请输入园区或区id",
                 trigger: "blur"
               }]
             },

+ 1 - 1
src/views/device/elevatoralarm.vue

@@ -241,7 +241,7 @@ export default {
     const tenantType = localStorage.getItem("tenantType");
     if (tenantType == 0){
       let residentialNameProp = this.findObject(this.option.column, "residentialName");
-      residentialNameProp.label = "所属区"
+      residentialNameProp.label = "所属区"
     }else if (tenantType == 1){
       let residentialNameProp = this.findObject(this.option.column, "residentialName");
       residentialNameProp.label = "所属区域"

+ 4 - 4
src/views/device/elevatordevice.vue

@@ -153,7 +153,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -162,7 +162,7 @@
               dicUrl: "/api/cyzh-community/residential/list?size=100&name={{key}}",
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }],
               dicFormatter:(res)=>{
@@ -275,8 +275,8 @@
       if (tenantType == 0) {
         let nbhdNameProp = this.findObject(this.option.column, "nbhdName");
         let residentialIdProp = this.findObject(this.option.column, "residentialId");
-        nbhdNameProp.label = "所属区";
-        residentialIdProp.label = "所属区";
+        nbhdNameProp.label = "所属区";
+        residentialIdProp.label = "所属区";
       }else if(tenantType == 1){
         let nbhdNameProp = this.findObject(this.option.column, "nbhdName");
         let residentialIdProp = this.findObject(this.option.column, "residentialId");

+ 2 - 2
src/views/device/iot/cover.vue

@@ -313,7 +313,7 @@
                 }]
               },
               {
-                label: '所属区',
+                label: '所属区',
                 prop: 'residentialId',
                 type: "select",
                 remote: true,
@@ -328,7 +328,7 @@
                 },
                 rules: [{
                   required: true,
-                  message: "所属区",
+                  message: "所属区",
                   trigger: "blur"
                 }]
               },

+ 10 - 10
src/views/device/iot/electricmeter.vue

@@ -248,11 +248,11 @@
               label: "平台",
               prop: "platform",
               type: "select",
-              value: "aep",
+              value: "AEP",
               cascaderItem: ['productId'],
               dicData: [{
-                  label: "aep",
-                  value: "aep"
+                  label: "AEP",
+                  value: "AEP"
                 },
                 {
                   label: "scepctwing",
@@ -288,7 +288,7 @@
               prop: "productId",
               type: "select",
               remote: true,
-              dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=aep`,
+              dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP`,
               props: {
                 label: "productName",
                 value: "productId"
@@ -322,7 +322,7 @@
                 }]
               },
               {
-                label: '所属区',
+                label: '所属区',
                 prop: 'residentialId',
                 type: "select",
                 remote: true,
@@ -337,7 +337,7 @@
                 },
                 rules: [{
                   required: true,
-                  message: "所属区",
+                  message: "所属区",
                   trigger: "blur"
                 }]
               },
@@ -754,13 +754,13 @@
         let platformColumn = this.option.group[1].column[0];
         let isAepColumn = this.option.group[1].column[1];
         let productColumn = this.option.group[1].column[2];
-        if (this.form.platform == "aep") {
+        if (this.form.platform == "AEP") {
           getIotList(1, 10000, {
-            "platform": "aep"
+            "platform": "AEP"
           }).then(res => {
             productColumn['dicData'] = res.data.data.records
             // platformColumn.cascaderItem = ['productId']
-            productColumn.dicUrl = "/api/cyzh-third/iotaepproduct/list?platform=aep&productName={{key}}"
+            productColumn.dicUrl = "/api/cyzh-third/iotaepproduct/list?platform=AEP&productName={{key}}"
             isAepColumn.display = false;
             productColumn.display = true
           })
@@ -781,7 +781,7 @@
         this.option = Object.assign({}, this.option)
       },
       "form.isAep"() {
-        if (this.form.platform == "aep") return
+        if (this.form.platform == "AEP") return
         let productColumn = this.option.group[1].column[2];
         if (this.form.isAep == 1) {
           productColumn.display = true;

+ 9 - 9
src/views/device/iot/environmentmonitor.vue

@@ -238,11 +238,11 @@
               label: "平台",
               prop: "platform",
               type: "select",
-              value: "aep",
+              value: "AEP",
               cascaderItem: ['productId'],
               dicData: [{
-                  label: "aep",
-                  value: "aep"
+                  label: "AEP",
+                  value: "AEP"
                 },
                 {
                   label: "scepctwing",
@@ -278,7 +278,7 @@
               prop: "productId",
               type: "select",
               remote: true,
-              dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=aep`,
+              dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP`,
               props: {
                 label: "productName",
                 value: "productId"
@@ -312,7 +312,7 @@
                 }]
               },
               {
-                label: '所属区',
+                label: '所属区',
                 prop: 'residentialId',
                 type: "select",
                 remote: true,
@@ -327,7 +327,7 @@
                 },
                 rules: [{
                   required: true,
-                  message: "所属区",
+                  message: "所属区",
                   trigger: "blur"
                 }]
               },
@@ -746,11 +746,11 @@
         let productColumn = this.option.group[1].column[2];
         if (this.form.platform == "aep") {
           getIotList(1, 10000, {
-            "platform": "aep"
+            "platform": "AEP"
           }).then(res => {
             productColumn['dicData'] = res.data.data.records
             // platformColumn.cascaderItem = ['productId']
-            productColumn.dicUrl = "/api/cyzh-third/iotaepproduct/list?platform=aep&productName={{key}}"
+            productColumn.dicUrl = "/api/cyzh-third/iotaepproduct/list?platform=AEP&productName={{key}}"
             isAepColumn.display = false;
             productColumn.display = true
           })
@@ -771,7 +771,7 @@
         this.option = Object.assign({}, this.option)
       },
       "form.isAep"() {
-        if (this.form.platform == "aep") return
+        if (this.form.platform == "AEP") return
         let productColumn = this.option.group[1].column[2];
         if (this.form.isAep == 1) {
           productColumn.display = true;

+ 290 - 59
src/views/device/iot/firefighting.vue → src/views/device/iot/firehydrant.vue

@@ -5,7 +5,7 @@
     </el-dialog>
     <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false"
       :visible.sync="editVisible" title="编辑" width="60%">
-      <avue-form v-model="editForm" :option="option" @submit="submitSmartgas"></avue-form>
+      <avue-form v-model="editForm" :cdoption="option" @submit="submitSmartgas"></avue-form>
     </el-dialog>
 
     <avue-data-tabs :option="countOption"></avue-data-tabs>
@@ -21,12 +21,9 @@
           <el-dropdown>
             <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right"></i></span>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item icon="el-icon-view" type="text" @click.native="viewDetail(scope.row)">详情
-              </el-dropdown-item>
-              <el-dropdown-item icon="el-icon-view" type="text" v-if="permission.device_heartbeat"
-                @click.native="viewHeartBeat(scope.row)">心跳</el-dropdown-item>
-              <el-dropdown-item type="text" v-if="permission.smartdevice_edit" @click.native="edit(scope.row)"
-                icon="el-icon-edit">编辑</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-view" type="text" @click.native="viewDetail(scope.row)">详情</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-view" type="text" v-if="permission.device_heartbeat" @click.native="viewHeartBeat(scope.row)">心跳</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-office-building" type="text" @click.native="syncDevice(scope.row)">同步数据</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
         </el-button>
@@ -56,7 +53,8 @@
     add,
     update,
     remove,
-    deviceListCount
+    deviceListCount,
+    sync
   } from "@/api/device/iotdevice";
 
   import {
@@ -169,21 +167,165 @@
             },
           ]
         },
+        groupArray:[
+          {
+            icon: 'el-icon-info',
+            label: '基础信息',
+            prop: 'group1',
+            column: [
+              {
+                label: "设备类型",
+                prop: "deviceType",
+                type: "select",
+                editDisabled:true,
+                addDisabled: true,
+                value: "XFS",
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+                props: {
+                  label: "dictValue",
+                  value: "dictKey"
+                },
+                rules: [{
+                  required: true,
+                  message: "请选择设备类型",
+                  trigger: "blur"
+                }]
+              },
+              {
+                label: '设备名称',
+                prop: 'deviceName',
+                viewDisplay: false,
+              },
+              {
+                label: 'IMEI',
+                prop: 'imei',
+                editDisabled:true,
+                viewDisplay: false,
+              },
+            ]
+          },
+          {
+            icon: 'el-icon-bangzhu',
+            label: '产品分类',
+            prop: 'group2',
+            column: [
+              {
+                label: "平台",
+                prop: "platform",
+                type: "select",
+                value: "AEP",
+                editDisabled:true,
+                cascaderItem: ['productId'],
+                viewDisplay: false,
+                dicData: [
+                  {
+                    label: "AEP",
+                    value: "AEP"
+                  },
+                ],
+              }, {
+                label: "产品类型",
+                prop: "productId",
+                type: "select",
+                editDisabled:true,
+                dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP&&size=100`,
+                viewDisplay: false,
+                props: {
+                  label: "productName",
+                  value: "productId"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+              }]
+          },
+          {
+            icon: 'el-icon-location',
+            label: '位置信息',
+            prop: 'group3',
+            column: [
+              {
+                label: '所属区域',
+                prop: 'residentialId',
+                type: "select",
+                remote: true,
+                cascaderItem: ['buildingId'],
+                dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+                viewDisplay: false,
+                props: {
+                  label: "name",
+                  value: "id"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+                rules: [{
+                  required: false,
+                  message: "请选择所属区域",
+                  trigger: "blur"
+                }]
+              },
+              {
+                label: '所属楼栋',
+                prop: 'buildingId',
+                type: "select",
+                display: true,
+                dicUrl: "/api/cyzh-community/building/list?size=500&residentialId={{key}}",
+                viewDisplay: false,
+                props: {
+                  label: "name",
+                  value: "id"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+              },
+              {
+                label: '',
+                prop: 'mapSelect',
+                viewDisplay: false,
+                // row: true,
+                // span: 20,
+                formslot: true,
+                hide: true,
+              },
+              {
+                label: "经度",
+                prop: "longitude",
+                viewDisplay: false,
+                // disabled: true,
+              },
+              {
+                label: "纬度",
+                prop: "latitude",
+                viewDisplay: false,
+                // disabled: true,
+              },
+              {
+                label: "安装位置",
+                prop: "deviceInstallAddress",
+                viewDisplay: false,
+                row: true,
+                span: 24,
+                // disabled: true,
+              }
+
+            ]
+          }
+        ],
         option: {
           height: 'auto',
-          menuWidth: 200,
-          labelWidth: 140,
+          menuWidth: 300,
+          // labelWidth: 140,
           calcHeight: 60,
           tip: false,
           searchShow: true,
-          searchMenuSpan: 4,
           border: true,
           index: true,
-          // viewBtn: false,
-          // addBtn: false,
-          // delBtn: false,
-          editBtn: false,
+          editBtn: true,
+          viewBtn: true,
           selection: true,
+          searchMenuSpan: 4,
           dialogClickModal: false,
 
           group: [
@@ -191,46 +333,74 @@
               icon: 'el-icon-info',
               label: '基础信息',
               prop: 'group1',
-              column: [{
-                label: '设备名称',
-                prop: 'deviceName',
-              },
+              column: [
+                {
+                  label: "设备类型",
+                  prop: "deviceType",
+                  type: "select",
+                  editDisabled:true,
+                  addDisabled: true,
+                  value: "XFS",
+                  dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+                  props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                  },
+                  rules: [{
+                    required: true,
+                    message: "请选择设备类型",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: '设备名称',
+                  prop: 'deviceName',
+                  viewDisplay: false,
+                },
                 {
                   label: 'IMEI',
                   prop: 'imei',
+                  editDisabled:true,
+                  viewDisplay: false,
                 },
               ]
-            }, {
+            },
+            {
               icon: 'el-icon-bangzhu',
               label: '产品分类',
-              // arrow: false,
               prop: 'group2',
-              column: [{
-                label: "平台",
-                prop: "platform",
-                type: "select",
-                value: "aep",
-                cascaderItem: ['productId'],
-                dicData: [{
-                  label: "aep",
-                  value: "aep"
-                },
-                ],
-              }, {
-                label: "产品类型",
-                prop: "productId",
-                type: "select",
-                remote: true,
-                dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=aep`,
-                props: {
-                  label: "productName",
-                  value: "productId"
-                },
-                dicFormatter: (res) => {
-                  return res.records;
-                },
-              }]
-            }, {
+              column: [
+                {
+                  label: "平台",
+                  prop: "platform",
+                  type: "select",
+                  value: "AEP",
+                  editDisabled:true,
+                  cascaderItem: ['productId'],
+                  viewDisplay: false,
+                  dicData: [
+                    {
+                      label: "AEP",
+                      value: "AEP"
+                    },
+                  ],
+                }, {
+                  label: "产品类型",
+                  prop: "productId",
+                  type: "select",
+                  editDisabled:true,
+                  dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP&&size=100`,
+                  viewDisplay: false,
+                  props: {
+                    label: "productName",
+                    value: "productId"
+                  },
+                  dicFormatter: (res) => {
+                    return res.data.records;
+                  },
+                }]
+            },
+            {
               icon: 'el-icon-location',
               label: '位置信息',
               prop: 'group3',
@@ -242,6 +412,7 @@
                   remote: true,
                   cascaderItem: ['buildingId'],
                   dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+                  viewDisplay: false,
                   props: {
                     label: "name",
                     value: "id"
@@ -261,6 +432,7 @@
                   type: "select",
                   display: true,
                   dicUrl: "/api/cyzh-community/building/list?size=500&residentialId={{key}}",
+                  viewDisplay: false,
                   props: {
                     label: "name",
                     value: "id"
@@ -272,6 +444,7 @@
                 {
                   label: '',
                   prop: 'mapSelect',
+                  viewDisplay: false,
                   // row: true,
                   // span: 20,
                   formslot: true,
@@ -280,30 +453,37 @@
                 {
                   label: "经度",
                   prop: "longitude",
+                  viewDisplay: false,
                   // disabled: true,
                 },
                 {
                   label: "纬度",
                   prop: "latitude",
+                  viewDisplay: false,
                   // disabled: true,
                 },
                 {
                   label: "安装位置",
                   prop: "deviceInstallAddress",
+                  viewDisplay: false,
                   row: true,
                   span: 24,
                   // disabled: true,
                 }
 
               ]
-            }],
+            }
+          ],
           column: [
             {
               label: "设备类型",
               prop: "deviceType",
               type: "select",
+              editDisplay: false,
+              addDisplay: false,
               searchSpan: 4,
-              display: false,
+              editDisabled:true,
+              value: "YG",
               dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
               props: {
                 label: "dictValue",
@@ -318,7 +498,8 @@
             {
               label: "设备名称",
               prop: "deviceName",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               searchSpan: 4,
               search: true,
               overHidden:true,
@@ -331,7 +512,9 @@
             {
               label: "IMEI",
               prop: "imei",
-              display: false,
+              editDisabled:true,
+              editDisplay: false,
+              addDisplay: false,
               rules: [{
                 required: true,
                 message: "请输入IMEI",
@@ -342,8 +525,8 @@
               label: "设备状态",
               prop: "deviceStatus",
               type: "select",
-              display: false,
               searchSpan: 4,
+              editDisabled:true,
               search: true,
               editDisplay: false,
               addDisplay: false,
@@ -366,8 +549,8 @@
               label: "在线状态",
               prop: "deviceNetStatus",
               type: "select",
-              display: false,
               searchSpan: 4,
+              editDisabled:true,
               search: true,
               editDisplay: false,
               addDisplay: false,
@@ -385,19 +568,44 @@
             {
               label: "所属园区",
               prop: "agencyName",
-              addDisplay: false,
-              editDisplay: false
+              editDisplay: false,
+              addDisplay: false
             },
             {
               label: "所属区域",
               prop: "residentialName",
+              editDisplay: false,
+              addDisplay: false
+            },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              editDisplay: false,
               addDisplay: false,
-              editDisplay: false
+              type:"select",
+              searchSpan: 4,
+              filterable: true,
+              hide:true,
+              dicFlag: true,
+              dicUrl: "/api/cyzh-community/residential/list?size=100",
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+              props:{
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请输入区域",
+                trigger: "blur"
+              }]
             },
             {
               label: "经度",
               prop: "longitude",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               hide: true,
               rules: [{
                 required: false,
@@ -408,7 +616,8 @@
             {
               label: "纬度",
               prop: "latitude",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               hide: true,
               rules: [{
                 required: false,
@@ -420,7 +629,8 @@
             {
               label: "安装位置",
               prop: "deviceInstallAddress",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               rules: [{
                 required: false,
                 message: "请输入安装位置",
@@ -429,7 +639,9 @@
             },
             {
               label: "最后上线时间",
+              labelWidth: 100,
               prop: "lastOnlineAt",
+              editDisabled:true,
               hide: true,
               addDisplay: false,
               editDisplay: false,
@@ -437,6 +649,8 @@
             {
               label: "最后上线时间",
               prop: "lastOfflineAt",
+              editDisabled:true,
+              labelWidth: 100,
               hide: true,
               addDisplay: false,
               editDisplay: false,
@@ -535,6 +749,15 @@
     },
 
     methods: {
+      syncDevice(row){
+        sync(row),then(res=>{
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        })
+      },
       openMap() {
         this.mapVisible = true;
         this.$nextTick(() => {
@@ -641,7 +864,15 @@
           });
       },
       beforeOpen(done, type) {
+        if (["add"].includes(type)) {
+          this.option.group = this.groupArray;
+        }
         if (["edit", "view"].includes(type)) {
+          if(type === "view"){
+            this.option.group = null;
+          }else{
+            this.option.group = this.groupArray;
+          }
           getDetail(this.form.id).then(res => {
             this.form = res.data.data;
           });

+ 289 - 55
src/views/device/iot/gasmonitoring.vue

@@ -21,12 +21,9 @@
           <el-dropdown>
             <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right"></i></span>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item icon="el-icon-view" type="text" @click.native="viewDetail(scope.row)">详情
-              </el-dropdown-item>
-              <el-dropdown-item icon="el-icon-view" type="text" v-if="permission.device_heartbeat"
-                @click.native="viewHeartBeat(scope.row)">心跳</el-dropdown-item>
-              <el-dropdown-item type="text" v-if="permission.smartdevice_edit" @click.native="edit(scope.row)"
-                icon="el-icon-edit">编辑</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-view" type="text" @click.native="viewDetail(scope.row)">详情</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-view" type="text" v-if="permission.device_heartbeat" @click.native="viewHeartBeat(scope.row)">心跳</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-office-building" type="text" @click.native="syncDevice(scope.row)">同步数据</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
         </el-button>
@@ -57,7 +54,8 @@
     add,
     update,
     remove,
-    deviceListCount
+    deviceListCount,
+    sync
   } from "@/api/device/iotdevice";
 
   import {
@@ -170,18 +168,165 @@
             },
           ]
         },
+        groupArray:[
+          {
+            icon: 'el-icon-info',
+            label: '基础信息',
+            prop: 'group1',
+            column: [
+              {
+                label: "设备类型",
+                prop: "deviceType",
+                type: "select",
+                editDisabled:true,
+                addDisabled: true,
+                value: "QG",
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+                props: {
+                  label: "dictValue",
+                  value: "dictKey"
+                },
+                rules: [{
+                  required: true,
+                  message: "请选择设备类型",
+                  trigger: "blur"
+                }]
+              },
+              {
+                label: '设备名称',
+                prop: 'deviceName',
+                viewDisplay: false,
+              },
+              {
+                label: 'IMEI',
+                prop: 'imei',
+                editDisabled:true,
+                viewDisplay: false,
+              },
+            ]
+          },
+          {
+            icon: 'el-icon-bangzhu',
+            label: '产品分类',
+            prop: 'group2',
+            column: [
+              {
+                label: "平台",
+                prop: "platform",
+                type: "select",
+                value: "AEP",
+                editDisabled:true,
+                cascaderItem: ['productId'],
+                viewDisplay: false,
+                dicData: [
+                  {
+                    label: "AEP",
+                    value: "AEP"
+                  },
+                ],
+              }, {
+                label: "产品类型",
+                prop: "productId",
+                type: "select",
+                editDisabled:true,
+                dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP&&size=100`,
+                viewDisplay: false,
+                props: {
+                  label: "productName",
+                  value: "productId"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+              }]
+          },
+          {
+            icon: 'el-icon-location',
+            label: '位置信息',
+            prop: 'group3',
+            column: [
+              {
+                label: '所属区域',
+                prop: 'residentialId',
+                type: "select",
+                remote: true,
+                cascaderItem: ['buildingId'],
+                dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+                viewDisplay: false,
+                props: {
+                  label: "name",
+                  value: "id"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+                rules: [{
+                  required: false,
+                  message: "请选择所属区域",
+                  trigger: "blur"
+                }]
+              },
+              {
+                label: '所属楼栋',
+                prop: 'buildingId',
+                type: "select",
+                display: true,
+                dicUrl: "/api/cyzh-community/building/list?size=500&residentialId={{key}}",
+                viewDisplay: false,
+                props: {
+                  label: "name",
+                  value: "id"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+              },
+              {
+                label: '',
+                prop: 'mapSelect',
+                viewDisplay: false,
+                // row: true,
+                // span: 20,
+                formslot: true,
+                hide: true,
+              },
+              {
+                label: "经度",
+                prop: "longitude",
+                viewDisplay: false,
+                // disabled: true,
+              },
+              {
+                label: "纬度",
+                prop: "latitude",
+                viewDisplay: false,
+                // disabled: true,
+              },
+              {
+                label: "安装位置",
+                prop: "deviceInstallAddress",
+                viewDisplay: false,
+                row: true,
+                span: 24,
+                // disabled: true,
+              }
+
+            ]
+          }
+        ],
         option: {
           height: 'auto',
-          menuWidth: 200,
-          labelWidth: 140,
+          menuWidth: 300,
+          // labelWidth: 140,
           calcHeight: 60,
           tip: false,
           searchShow: true,
-          searchMenuSpan: 4,
           border: true,
           index: true,
-          editBtn: false,
+          editBtn: true,
+          viewBtn: true,
           selection: true,
+          searchMenuSpan: 4,
           dialogClickModal: false,
 
           group: [
@@ -189,46 +334,74 @@
               icon: 'el-icon-info',
               label: '基础信息',
               prop: 'group1',
-              column: [{
-                label: '设备名称',
-                prop: 'deviceName',
-              },
+              column: [
+                {
+                  label: "设备类型",
+                  prop: "deviceType",
+                  type: "select",
+                  editDisabled:true,
+                  addDisabled: true,
+                  value: "QG",
+                  dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+                  props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                  },
+                  rules: [{
+                    required: true,
+                    message: "请选择设备类型",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: '设备名称',
+                  prop: 'deviceName',
+                  viewDisplay: false,
+                },
                 {
                   label: 'IMEI',
                   prop: 'imei',
+                  editDisabled:true,
+                  viewDisplay: false,
                 },
               ]
-            }, {
+            },
+            {
               icon: 'el-icon-bangzhu',
               label: '产品分类',
-              // arrow: false,
               prop: 'group2',
-              column: [{
-                label: "平台",
-                prop: "platform",
-                type: "select",
-                value: "aep",
-                cascaderItem: ['productId'],
-                dicData: [{
-                  label: "aep",
-                  value: "aep"
-                },
-                ],
-              }, {
-                label: "产品类型",
-                prop: "productId",
-                type: "select",
-                remote: true,
-                dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=aep`,
-                props: {
-                  label: "productName",
-                  value: "productId"
-                },
-                dicFormatter: (res) => {
-                  return res.records;
-                },
-              }]
-            }, {
+              column: [
+                {
+                  label: "平台",
+                  prop: "platform",
+                  type: "select",
+                  value: "AEP",
+                  editDisabled:true,
+                  cascaderItem: ['productId'],
+                  viewDisplay: false,
+                  dicData: [
+                    {
+                      label: "AEP",
+                      value: "AEP"
+                    },
+                  ],
+                }, {
+                  label: "产品类型",
+                  prop: "productId",
+                  type: "select",
+                  editDisabled:true,
+                  dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP&&size=100`,
+                  viewDisplay: false,
+                  props: {
+                    label: "productName",
+                    value: "productId"
+                  },
+                  dicFormatter: (res) => {
+                    return res.data.records;
+                  },
+                }]
+            },
+            {
               icon: 'el-icon-location',
               label: '位置信息',
               prop: 'group3',
@@ -240,6 +413,7 @@
                   remote: true,
                   cascaderItem: ['buildingId'],
                   dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+                  viewDisplay: false,
                   props: {
                     label: "name",
                     value: "id"
@@ -259,6 +433,7 @@
                   type: "select",
                   display: true,
                   dicUrl: "/api/cyzh-community/building/list?size=500&residentialId={{key}}",
+                  viewDisplay: false,
                   props: {
                     label: "name",
                     value: "id"
@@ -270,6 +445,7 @@
                 {
                   label: '',
                   prop: 'mapSelect',
+                  viewDisplay: false,
                   // row: true,
                   // span: 20,
                   formslot: true,
@@ -278,30 +454,37 @@
                 {
                   label: "经度",
                   prop: "longitude",
+                  viewDisplay: false,
                   // disabled: true,
                 },
                 {
                   label: "纬度",
                   prop: "latitude",
+                  viewDisplay: false,
                   // disabled: true,
                 },
                 {
                   label: "安装位置",
                   prop: "deviceInstallAddress",
+                  viewDisplay: false,
                   row: true,
                   span: 24,
                   // disabled: true,
                 }
 
               ]
-            }],
+            }
+          ],
           column: [
             {
               label: "设备类型",
               prop: "deviceType",
               type: "select",
+              editDisplay: false,
+              addDisplay: false,
               searchSpan: 4,
-              display: false,
+              editDisabled:true,
+              value: "YG",
               dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
               props: {
                 label: "dictValue",
@@ -316,7 +499,8 @@
             {
               label: "设备名称",
               prop: "deviceName",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               searchSpan: 4,
               search: true,
               overHidden:true,
@@ -329,7 +513,9 @@
             {
               label: "IMEI",
               prop: "imei",
-              display: false,
+              editDisabled:true,
+              editDisplay: false,
+              addDisplay: false,
               rules: [{
                 required: true,
                 message: "请输入IMEI",
@@ -340,8 +526,8 @@
               label: "设备状态",
               prop: "deviceStatus",
               type: "select",
-              display: false,
               searchSpan: 4,
+              editDisabled:true,
               search: true,
               editDisplay: false,
               addDisplay: false,
@@ -364,8 +550,8 @@
               label: "在线状态",
               prop: "deviceNetStatus",
               type: "select",
-              display: false,
               searchSpan: 4,
+              editDisabled:true,
               search: true,
               editDisplay: false,
               addDisplay: false,
@@ -383,19 +569,44 @@
             {
               label: "所属园区",
               prop: "agencyName",
-              addDisplay: false,
-              editDisplay: false
+              editDisplay: false,
+              addDisplay: false
             },
             {
               label: "所属区域",
               prop: "residentialName",
+              editDisplay: false,
+              addDisplay: false
+            },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              editDisplay: false,
               addDisplay: false,
-              editDisplay: false
+              type:"select",
+              searchSpan: 4,
+              filterable: true,
+              hide:true,
+              dicFlag: true,
+              dicUrl: "/api/cyzh-community/residential/list?size=100",
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+              props:{
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请输入区域",
+                trigger: "blur"
+              }]
             },
             {
               label: "经度",
               prop: "longitude",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               hide: true,
               rules: [{
                 required: false,
@@ -406,7 +617,8 @@
             {
               label: "纬度",
               prop: "latitude",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               hide: true,
               rules: [{
                 required: false,
@@ -418,7 +630,8 @@
             {
               label: "安装位置",
               prop: "deviceInstallAddress",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               rules: [{
                 required: false,
                 message: "请输入安装位置",
@@ -427,7 +640,9 @@
             },
             {
               label: "最后上线时间",
+              labelWidth: 100,
               prop: "lastOnlineAt",
+              editDisabled:true,
               hide: true,
               addDisplay: false,
               editDisplay: false,
@@ -435,6 +650,8 @@
             {
               label: "最后上线时间",
               prop: "lastOfflineAt",
+              editDisabled:true,
+              labelWidth: 100,
               hide: true,
               addDisplay: false,
               editDisplay: false,
@@ -533,6 +750,15 @@
     },
 
     methods: {
+      syncDevice(row){
+        sync(row),then(res=>{
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        })
+      },
       openMap() {
         this.mapVisible = true;
         this.$nextTick(() => {
@@ -639,7 +865,15 @@
           });
       },
       beforeOpen(done, type) {
+        if (["add"].includes(type)) {
+          this.option.group = this.groupArray;
+        }
         if (["edit", "view"].includes(type)) {
+          if(type === "view"){
+            this.option.group = null;
+          }else{
+            this.option.group = this.groupArray;
+          }
           getDetail(this.form.id).then(res => {
             this.form = res.data.data;
           });

+ 2 - 2
src/views/device/iot/hornbind.vue

@@ -312,7 +312,7 @@
                 }]
               },
               {
-                label: '所属区',
+                label: '所属区',
                 prop: 'residentialId',
                 type: "select",
                 remote: true,
@@ -327,7 +327,7 @@
                 },
                 rules: [{
                   required: true,
-                  message: "所属区",
+                  message: "所属区",
                   trigger: "blur"
                 }]
               },

+ 412 - 230
src/views/device/iot/iotdevice.vue

@@ -22,7 +22,6 @@
 
       </avue-form>
     </el-dialog>
-
     <el-container>
       <el-main>
         <template>
@@ -52,9 +51,7 @@
       </el-main>
 
     </el-container>
-
     <el-divider class="divider-bottom"></el-divider>
-
     <avue-crud :option="option"
                :table-loading="loading"
                :data="data"
@@ -72,8 +69,7 @@
                @current-change="currentChange"
                @size-change="sizeChange"
                @refresh-change="refreshChange"
-               @on-load="onLoad"></avue-crud>
-
+               @on-load="onLoad">
       <template slot="mapSelectForm" slot-scope="scope">
         <div>
           <el-button @click="mapVisible = true"> 选择地址</el-button>
@@ -86,24 +82,20 @@
         <!-- <avue-map v-model="scope.row.mapSelect"></avue-map> -->
       </template>
       <template slot="menu" slot-scope="scope">
-        <!--         <el-button icon="el-icon-view" type="text" @click="viewDetail(scope.row)">查看</el-button>-->
-        <el-button v-if="permission.bind_residential" icon="el-icon-paperclip" :class="{changeBind: !!scope.row.residentialId}" type="text" @click="showDeviceBind(scope.row)">{{!scope.row.residentialId ? '设备绑定' : '设备改绑'}}</el-button>
         <el-button type="text" size="small" icon="el-icon-setting">
           <el-dropdown @command="tip">
             <span class="el-dropdown-link">
               操作<i class="el-icon-arrow-down el-icon--right"> </i>
             </span>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item icon="el-icon-view" type="text" @click.native="viewDetail(scope.row)">查看</el-dropdown-item>
-              <el-dropdown-item divided @click.native="edit(scope.row)" icon="el-icon-edit">编辑</el-dropdown-item>
-              <el-dropdown-item icon="el-icon-paperclip" :class="{changeBind: !!scope.row.residentialId}" type="text" @click.native="showDeviceBind(scope.row)">{{!scope.row.residentialId ? '设备绑定' : '设备改绑'}}</el-dropdown-item>
-              <el-dropdown-item icon="el-icon-office-building" type="text" @click.native="showEnterpriseSelect(scope.row)">绑定企业</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-office-building" type="text" @click.native="syncDevice(scope.row)">同步数据</el-dropdown-item>
+              <el-dropdown-item divided icon="el-icon-office-building" type="text" @click.native="showEnterpriseSelect(scope.row)">绑定企业</el-dropdown-item>
               <el-dropdown-item divided v-if="scope.row.imei!=''" @click.native="viewAlarmRecord(scope.row)" icon="el-icon-bell">历史告警</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
         </el-button>
-
       </template>
+    </avue-crud>
 
     <!--    小区列表-->
     <el-dialog :modal-append-to-body="false" append-to-body :visible.sync="bindVisible" title="设备绑定" center width="20%">
@@ -143,12 +135,16 @@ import {
   add,
   update,
   remove,
-  deviceListCount
+  deviceListCount,
+  sync
 } from "@/api/device/iotdevice";
 // import { getList as getUserList} from "@/api/system/user";
 import {
   mapGetters
 } from "vuex";
+import {
+  getDetail as getResidentialDetail
+} from "@/api/community/residential"
 import {getAllList} from "@/api/community/residential";
 import alarmhistory from "../../../components/device/alarmhistory.vue";
 import {dataDisplay} from "@/api/dataview/dataviewoption";
@@ -163,8 +159,6 @@ export default {
     return {
       mapVisible:false,
       mapVisible2:false,
-      // alarmRecordForm:{},
-      // treeDateList:[],
       enterpriseVisible:false,
       enterpriseList:[],
       enterpriseSelect:[],
@@ -205,6 +199,149 @@ export default {
 
       selectionList: [],
       dataShowOption: {},
+      groupArray:[
+        {
+          icon: 'el-icon-info',
+          label: '基础信息',
+          prop: 'group1',
+          column: [
+            {
+              label: "设备类型",
+              prop: "deviceType",
+              type: "select",
+              editDisabled:true,
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+              rules: [{
+                required: true,
+                message: "请选择设备类型",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: '设备名称',
+              prop: 'deviceName',
+              viewDisplay: false,
+            },
+            {
+              label: 'IMEI',
+              prop: 'imei',
+              editDisabled:true,
+              viewDisplay: false,
+            },
+          ]
+        },
+        {
+          icon: 'el-icon-bangzhu',
+          label: '产品分类',
+          prop: 'group2',
+          column: [
+            {
+              label: "平台",
+              prop: "platform",
+              type: "select",
+              value: "AEP",
+              editDisabled:true,
+              cascaderItem: ['productId'],
+              viewDisplay: false,
+              dicData: [
+                {
+                  label: "AEP",
+                  value: "AEP"
+                },
+              ],
+            }, {
+              label: "产品类型",
+              prop: "productId",
+              type: "select",
+              editDisabled:true,
+              dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP&&size=100`,
+              viewDisplay: false,
+              props: {
+                label: "productName",
+                value: "productId"
+              },
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+            }]
+        },
+        {
+          icon: 'el-icon-location',
+          label: '位置信息',
+          prop: 'group3',
+          column: [
+            {
+              label: '所属区域',
+              prop: 'residentialId',
+              type: "select",
+              remote: true,
+              cascaderItem: ['buildingId'],
+              dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+              viewDisplay: false,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+              rules: [{
+                required: false,
+                message: "请选择所属区域",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: '所属楼栋',
+              prop: 'buildingId',
+              type: "select",
+              display: true,
+              dicUrl: "/api/cyzh-community/building/list?size=500&residentialId={{key}}",
+              viewDisplay: false,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+            },
+            {
+              label: '',
+              prop: 'mapSelect',
+              viewDisplay: false,
+              // row: true,
+              // span: 20,
+              formslot: true,
+              hide: true,
+            },
+            {
+              label: "经度",
+              prop: "longitude",
+              viewDisplay: false,
+              // disabled: true,
+            },
+            {
+              label: "纬度",
+              prop: "latitude",
+              viewDisplay: false,
+              // disabled: true,
+            },
+            {
+              label: "安装位置",
+              prop: "deviceInstallAddress",
+              viewDisplay: false,
+              row: true,
+              span: 24,
+              // disabled: true,
+            }
+
+          ]
+        }],
 
       option: {
         height: 'auto',
@@ -215,18 +352,163 @@ export default {
         searchMenuSpan: 4,
         border: true,
         index: true,
-        viewBtn:false,
-        // addBtn: false,
-        delBtn: false,
-        editBtn: false,
+        viewBtn:true,
+        delBtn: true,
+        editBtn: true,
         selection: true,
         dialogClickModal: false,
+        group: [
+          {
+            icon: 'el-icon-info',
+            label: '基础信息',
+            prop: 'group1',
+            column: [
+              {
+                label: "设备类型",
+                prop: "deviceType",
+                type: "select",
+                editDisabled:true,
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+                props: {
+                  label: "dictValue",
+                  value: "dictKey"
+                },
+                rules: [{
+                  required: true,
+                  message: "请选择设备类型",
+                  trigger: "blur"
+                }]
+              },
+              {
+                label: '设备名称',
+                prop: 'deviceName',
+                viewDisplay: false,
+              },
+              {
+                label: 'IMEI',
+                prop: 'imei',
+                editDisabled:true,
+                viewDisplay: false,
+              },
+            ]
+          },
+          {
+            icon: 'el-icon-bangzhu',
+            label: '产品分类',
+            prop: 'group2',
+            column: [
+              {
+                label: "平台",
+                prop: "platform",
+                type: "select",
+                value: "AEP",
+                editDisabled:true,
+                cascaderItem: ['productId'],
+                viewDisplay: false,
+                dicData: [
+                  {
+                    label: "AEP",
+                    value: "AEP"
+                  },
+                ],
+              }, {
+                label: "产品类型",
+                prop: "productId",
+                type: "select",
+                editDisabled:true,
+                dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP&&size=100`,
+                viewDisplay: false,
+                props: {
+                  label: "productName",
+                  value: "productId"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+              }]
+          },
+          {
+            icon: 'el-icon-location',
+            label: '位置信息',
+            prop: 'group3',
+            column: [
+              {
+                label: '所属区域',
+                prop: 'residentialId',
+                type: "select",
+                remote: true,
+                cascaderItem: ['buildingId'],
+                dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+                viewDisplay: false,
+                props: {
+                  label: "name",
+                  value: "id"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+                rules: [{
+                  required: false,
+                  message: "请选择所属区域",
+                  trigger: "blur"
+                }]
+              },
+              {
+                label: '所属楼栋',
+                prop: 'buildingId',
+                type: "select",
+                display: true,
+                dicUrl: "/api/cyzh-community/building/list?size=500&residentialId={{key}}",
+                viewDisplay: false,
+                props: {
+                  label: "name",
+                  value: "id"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+              },
+              {
+                label: '',
+                prop: 'mapSelect',
+                viewDisplay: false,
+                // row: true,
+                // span: 20,
+                formslot: true,
+                hide: true,
+              },
+              {
+                label: "经度",
+                prop: "longitude",
+                viewDisplay: false,
+                // disabled: true,
+              },
+              {
+                label: "纬度",
+                prop: "latitude",
+                viewDisplay: false,
+                // disabled: true,
+              },
+              {
+                label: "安装位置",
+                prop: "deviceInstallAddress",
+                viewDisplay: false,
+                row: true,
+                span: 24,
+                // disabled: true,
+              }
+
+            ]
+          }],
         column: [
           {
             label: "设备类型",
             prop: "deviceType",
             type: "select",
+            editDisplay: false,
+            addDisplay: false,
             searchSpan: 4,
+            editDisabled:true,
             search: true,
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
             props: {
@@ -242,6 +524,8 @@ export default {
           {
             label: "设备名称",
             prop: "deviceName",
+            editDisplay: false,
+            addDisplay: false,
             searchSpan: 4,
             search: true,
             overHidden:true,
@@ -254,6 +538,9 @@ export default {
           {
             label: "IMEI",
             prop: "imei",
+            editDisabled:true,
+            editDisplay: false,
+            addDisplay: false,
             rules: [{
               required: true,
               message: "请输入IMEI",
@@ -265,6 +552,7 @@ export default {
             prop: "deviceStatus",
             type: "select",
             searchSpan: 4,
+            editDisabled:true,
             search: true,
             editDisplay: false,
             addDisplay: false,
@@ -288,6 +576,7 @@ export default {
             prop: "deviceNetStatus",
             type: "select",
             searchSpan: 4,
+            editDisabled:true,
             search: true,
             editDisplay: false,
             addDisplay: false,
@@ -302,60 +591,47 @@ export default {
               },
             ]
           },
-          /*{
+          {
             label: "所属园区",
-            prop: "agencyId",
-            searchSpan: 4,
-            slot: true,
-            search: true,
-            cascaderItem: ['residentialId'],
-            type: "select",
-            remote: true,
-            dicUrl: "/api/cyzh-community/agency/list",
-            dicFormatter:(res)=>{
-              return res.data.records;//返回字典的层级结构
-            },
-            props: {
-              label: "name",
-              value: "id"
-            },
-            rules: [{
-              required: true,
-              message: "请选择所属社区",
-              trigger: "blur"
-            }]
+            prop: "agencyName",
+            editDisplay: false,
+            addDisplay: false
+          },
+          {
+            label: "所属区域",
+            prop: "residentialName",
+            editDisplay: false,
+            addDisplay: false
           },
           {
             label: "所属区域",
             prop: "residentialId",
-            slot: true,
-            type: "select",
-            dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}",
-            dicFormatter:(res)=>{
-              return res.data.records;//返回字典的层级结构
-            },
+            editDisplay: false,
+            addDisplay: false,
+            type:"select",
+            searchSpan: 4,
             filterable: true,
-            props: {
+            hide:true,
+            dicFlag: true,
+            dicUrl: "/api/cyzh-community/residential/list?size=100",
+            dicFormatter: (res) => {
+              return res.data.records;
+            },
+            props:{
               label: "name",
               value: "id"
             },
             rules: [{
               required: true,
-              message: "请选择所属小区",
+              message: "请输入区域",
               trigger: "blur"
             }]
-          },*/
-          {
-            label: "所属园区",
-            prop: "agencyName",
-          },
-          {
-            label: "所属区域",
-            prop: "residentialName",
           },
           {
             label: "经度",
             prop: "longitude",
+            editDisplay: false,
+            addDisplay: false,
             hide: true,
             rules: [{
               required: false,
@@ -366,6 +642,8 @@ export default {
           {
             label: "纬度",
             prop: "latitude",
+            editDisplay: false,
+            addDisplay: false,
             hide: true,
             rules: [{
               required: false,
@@ -377,6 +655,8 @@ export default {
           {
             label: "安装位置",
             prop: "deviceInstallAddress",
+            editDisplay: false,
+            addDisplay: false,
             rules: [{
               required: false,
               message: "请输入安装位置",
@@ -385,7 +665,9 @@ export default {
           },
           {
             label: "最后上线时间",
+            labelWidth: 100,
             prop: "lastOnlineAt",
+            editDisabled:true,
             hide: true,
             addDisplay: false,
             editDisplay: false,
@@ -393,32 +675,41 @@ export default {
           {
             label: "最后上线时间",
             prop: "lastOfflineAt",
+            editDisabled:true,
+            labelWidth: 100,
             hide: true,
             addDisplay: false,
             editDisplay: false,
           },
         ]
       },
-      //详情字段
+      /*//详情字段
       detailoption: {
         submitBtn:false,
         emptyBtn:false,
         disabled: true,
-        column: [{
-          label: "设备编码",
-          prop: "deviceId",
-          width: 100,
-          hide: true,
-          // search:true,
-          // display: false,
-          rules: [{
-            required: true,
-            message: "请输入设备唯一标识",
-            trigger: "blur"
-          }]
-        },
+        column: [
+          {
+            label: "设备类型",
+            prop: "deviceType",
+            type: "select",
+            width: 70,
+            searchSpan: 4,
+            search: true,
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            dataType: "string",
+            rules: [{
+              required: true,
+              message: "请输入设备类型",
+              trigger: "blur"
+            }]
+          },
           {
-            label: "IMEI号",
+            label: "IMEI",
             prop: "imei",
             width: 130,
             hide: true,
@@ -428,12 +719,19 @@ export default {
               trigger: "blur"
             }]
           },
+          {
+            label: "设备ID",
+            prop: "deviceId",
+            width: 100,
+            hide: true,
+            editDisplay: false,
+            addDisplay: false,
+          },
           {
             label: "设备名称",
             prop: "deviceName",
             searchSpan: 4,
             search: true,
-            // width:200,
             overHidden:true,
             rules: [{
               required: true,
@@ -442,69 +740,27 @@ export default {
             }]
           },
           {
-            label: "归属",
+            label: "所属区域",
             prop: "residentialId",
             type:"select",
             searchSpan: 4,
             remote: true,
-            dicUrl: "/api/cyzh-community/residential/list?name={{key}}",
+            filterable: true,
+            hide:true,
+            dicUrl: "/api/cyzh-community/residential/list?name={{key}}&size=10",
             props:{
               label: "name",
               value: "id"
             },
-            searchFilterable: true,
-            search: true,
-            rules: [{
-              required: true,
-              message: "请输入",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "企业",
-            prop: "enterpriseIds",
-            type: "select",
-            searchSpan: 4,
-            display: false,
-            hide: true,
-            remote: true,
-            dicUrl: "/api/cyzh-enterprise/enterprise/list?enterpriseName={{key}}",
-            props:{
-              label: "enterpriseName",
-              value: "id"
-            },
-            searchFilterable: true,
-            search: false,
-            rules: [{
-              required: true,
-              message: "请输入",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "设备注册平台标识",
-            prop: "isAep",
-            type: "select",
-            width: 80,
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=device_registry_label",
-            props: {
-              label: 'dictValue',
-              value: 'dictKey'
-            },
-            dataType: "number",
-            // search: true,
-            searchLabelWidth: 140,
-            searchSpan: 8,
-
             rules: [{
               required: true,
-              message: "请输入设备注册平台标识,1:aep,2:华为,3:厂商",
+              message: "请输入区域",
               trigger: "blur"
             }]
           },
           {
-            label: "经度",
-            prop: "latitudeLongitude",
+            label: "经度",
+            prop: "longitude",
             hide: true,
             rules: [{
               required: true,
@@ -513,65 +769,12 @@ export default {
             }]
           },
           {
-            label: "操作者",
-            prop: "operator",
-            hide: true,
-            addDisplay: false,
-            display: false,
-            rules: [{
-              required: false,
-              message: "请输入操作者",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "产品ID",
-            prop: "productId",
-            hide: true,
-            addDisplay: false,
-            display: false,
-            rules: [{
-              required: false,
-              message: "请输入产品ID",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "订阅事件",
-            prop: "autoObserver",
-            type: "select",
+            label: "纬度",
+            prop: "latitude",
             hide: true,
-            addDisplay: false,
-            display: false,
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=auto_subscribe",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
-            dataType: "number",
-            rules: [{
-              required: false,
-              message: "请输入0 自动订阅(默认),1 取消自动订阅 (LWM2M 协议选填,其他协议不填)",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "设备类型",
-            prop: "deviceType",
-            type: "select",
-            width: 70,
-            searchSpan: 4,
-            search: true,
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
-            dataType: "string",
-            // display: false,
             rules: [{
               required: true,
-              message: "请输入设备类型",
+              message: "请输入纬度",
               trigger: "blur"
             }]
           },
@@ -609,54 +812,8 @@ export default {
               trigger: "blur"
             }]
           },
-          {
-            label: "信号强度",
-            prop: "signalIntensity",
-            slot: true,
-            display: false,
-            width: 80,
-            addDisplay: false,
-            rules: [{
-              required: true,
-              message: "请输入信号强度",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "厂家名称",
-            prop: "manufacturers",
-            hide: true,
-            rules: [{
-              required: false,
-              message: "请输入厂家名称",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "厂商编号(附录)",
-            prop: "manufacturersNo",
-            hide: true,
-            display: false,
-            addDisplay: false,
-            rules: [{
-              required: false,
-              message: "请输入厂商编号(附录)",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "设备型号",
-            prop: "deviceSpecld",
-            hide: true,
-            rules: [{
-              required: false,
-              message: "请输入设备型号",
-              trigger: "blur"
-            }]
-          },
-
         ]
-      },
+      },*/
       data: []
     };
   },
@@ -665,10 +822,10 @@ export default {
     ...mapGetters(["permission"]),
     permissionList() {
       return {
-        addBtn: this.vaildData(this.permission.smartdevice_add, false),
-        viewBtn: this.vaildData(this.permission.smartdevice_view, false),
-        delBtn: this.vaildData(this.permission.smartdevice_delete, false),
-        editBtn: this.vaildData(this.permission.smartdevice_edit, false)
+        addBtn: this.vaildData(this.permission.iotdevice_add, false),
+        viewBtn: this.vaildData(this.permission.iotdevice_view, false),
+        delBtn: this.vaildData(this.permission.iotdevice_delete, false),
+        editBtn: this.vaildData(this.permission.iotdevice_edit, false)
       };
     },
     ids() {
@@ -704,6 +861,14 @@ export default {
         }
       },
     },
+    "form.residentialId"() {
+      if (this.form.residentialId != '' && this.form.residentialId != undefined) {
+        getResidentialDetail(this.form.residentialId).then(res => {
+          this.form.latitude = res.data.data.latitude;
+          this.form.longitude = res.data.data.longitude;
+        })
+      }
+    }
   },
   created() {
     deviceListCount().then(res =>{
@@ -717,12 +882,21 @@ export default {
     const residentialColumn = this.findObject(this.option.column, "residentialId");
     if (tenantType == 1) { //园区
       residentialColumn.label = "所属区域";
-    } else { //
-      residentialColumn.label = "所属区";
+    } else { //
+      residentialColumn.label = "所属区";
     }
 
   },
   methods: {
+    syncDevice(row){
+      sync(row),then(res=>{
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+      })
+    },
     dataShow(obj){
       return dataDisplay(obj,this)
     },
@@ -963,7 +1137,15 @@ export default {
         });
     },
     beforeOpen(done, type) {
+      if (["add"].includes(type)) {
+        this.option.group = this.groupArray;
+      }
       if (["edit", "view"].includes(type)) {
+        if(type === "view"){
+          this.option.group = null;
+        }else{
+          this.option.group = this.groupArray;
+        }
         getDetail(this.form.id).then(res => {
           this.form = res.data.data;
         });

+ 10 - 10
src/views/device/iot/parkingmonitor.vue

@@ -237,11 +237,11 @@
               label: "平台",
               prop: "platform",
               type: "select",
-              value: "aep",
+              value: "AEP",
               cascaderItem: ['productId'],
               dicData: [{
-                  label: "aep",
-                  value: "aep"
+                  label: "AEP",
+                  value: "AEP"
                 },
                 {
                   label: "scepctwing",
@@ -277,7 +277,7 @@
               prop: "productId",
               type: "select",
               remote: true,
-              dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=aep`,
+              dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP`,
               props: {
                 label: "productName",
                 value: "productId"
@@ -311,7 +311,7 @@
                 }]
               },
               {
-                label: '所属区',
+                label: '所属区',
                 prop: 'residentialId',
                 type: "select",
                 remote: true,
@@ -326,7 +326,7 @@
                 },
                 rules: [{
                   required: true,
-                  message: "所属区",
+                  message: "所属区",
                   trigger: "blur"
                 }]
               },
@@ -743,13 +743,13 @@
         let platformColumn = this.option.group[1].column[0];
         let isAepColumn = this.option.group[1].column[1];
         let productColumn = this.option.group[1].column[2];
-        if (this.form.platform == "aep") {
+        if (this.form.platform == "AEP") {
           getIotList(1, 10000, {
-            "platform": "aep"
+            "platform": "AEP"
           }).then(res => {
             productColumn['dicData'] = res.data.data.records
             // platformColumn.cascaderItem = ['productId']
-            productColumn.dicUrl = "/api/cyzh-third/iotaepproduct/list?platform=aep&productName={{key}}"
+            productColumn.dicUrl = "/api/cyzh-third/iotaepproduct/list?platform=AEP&productName={{key}}"
             isAepColumn.display = false;
             productColumn.display = true
           })
@@ -770,7 +770,7 @@
         this.option = Object.assign({}, this.option)
       },
       "form.isAep"() {
-        if (this.form.platform == "aep") return
+        if (this.form.platform == "AEP") return
         let productColumn = this.option.group[1].column[2];
         if (this.form.isAep == 1) {
           productColumn.display = true;

+ 2 - 2
src/views/device/iot/smartcharge.vue

@@ -313,7 +313,7 @@
                 }]
               },
               {
-                label: '所属区',
+                label: '所属区',
                 prop: 'residentialId',
                 type: "select",
                 remote: true,
@@ -328,7 +328,7 @@
                 },
                 rules: [{
                   required: true,
-                  message: "所属区",
+                  message: "所属区",
                   trigger: "blur"
                 }]
               },

+ 2 - 2
src/views/device/iot/smartlamp.vue

@@ -312,7 +312,7 @@
                 }]
               },
               {
-                label: '所属区',
+                label: '所属区',
                 prop: 'residentialId',
                 type: "select",
                 remote: true,
@@ -327,7 +327,7 @@
                 },
                 rules: [{
                   required: true,
-                  message: "所属区",
+                  message: "所属区",
                   trigger: "blur"
                 }]
               },

+ 302 - 79
src/views/device/iot/smartsmoke.vue

@@ -15,35 +15,28 @@
       :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
       @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
       @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
-
       <template slot="menu" slot-scope="scope">
         <el-button icon="el-icon-setting" size="small" type="text">
           <el-dropdown>
             <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right"></i></span>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item icon="el-icon-view" type="text" @click.native="viewDetail(scope.row)">详情
-              </el-dropdown-item>
-              <el-dropdown-item icon="el-icon-view" type="text" v-if="permission.device_heartbeat"
-                @click.native="viewHeartBeat(scope.row)">心跳</el-dropdown-item>
-              <el-dropdown-item type="text" v-if="permission.smartdevice_edit" @click.native="edit(scope.row)"
-                icon="el-icon-edit">编辑</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-view" type="text" @click.native="viewDetail(scope.row)">详情</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-view" type="text" v-if="permission.device_heartbeat" @click.native="viewHeartBeat(scope.row)">心跳</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-office-building" type="text" @click.native="syncDevice(scope.row)">同步数据</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
         </el-button>
       </template>
-
       <template slot="mapSelectForm" slot-scope="scope">
         <div>
           <el-button @click="openMap"> 选择地址</el-button>
           <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false"
             :visible.sync="mapVisible" title="编辑地址" width="80%">
-            <!--            <customAvueMap v-if="mapVisible" v-model="scope.row.mapSelect"></customAvueMap>-->
             <editPolygonMap editForm="{}" ref="map" :region.sync="form.deviceInstallAddress"
               :longitude.sync="form.longitude" :latitude.sync="form.latitude" v-if="mapVisible"
               v-model="scope.row.mapSelect" :visible.sync="mapVisible"></editPolygonMap>
           </el-dialog>
         </div>
-        <!-- <avue-map v-model="scope.row.mapSelect"></avue-map> -->
       </template>
     </avue-crud>
   </basic-container>
@@ -56,11 +49,9 @@
     add,
     update,
     remove,
-    deviceListCount
+    deviceListCount,
+    sync
   } from "@/api/device/iotdevice";
-  // import {
-  //   getList as getHouseUserList
-  // } from "@/api/community/houseuser";
   import {
     getDetail as getResidentialDetail
   } from "@/api/community/residential"
@@ -83,7 +74,6 @@
       deviceHeartbeat
     },
     data() {
-
       return {
         heartbeatData: [],
         deviceId: "",
@@ -171,64 +161,79 @@
             },
           ]
         },
-        option: {
-          height: 'auto',
-          menuWidth: 200,
-          labelWidth: 140,
-          calcHeight: 60,
-          tip: false,
-          searchShow: true,
-          border: true,
-          index: true,
-          editBtn: false,
-          selection: true,
-          searchMenuSpan: 4,
-          dialogClickModal: false,
-
-          group: [
-            {
+        groupArray:[
+          {
             icon: 'el-icon-info',
             label: '基础信息',
             prop: 'group1',
-            column: [{
+            column: [
+              {
+                label: "设备类型",
+                prop: "deviceType",
+                type: "select",
+                editDisabled:true,
+                addDisabled: true,
+                value: "YG",
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+                props: {
+                  label: "dictValue",
+                  value: "dictKey"
+                },
+                rules: [{
+                  required: true,
+                  message: "请选择设备类型",
+                  trigger: "blur"
+                }]
+              },
+              {
                 label: '设备名称',
                 prop: 'deviceName',
+                viewDisplay: false,
               },
               {
                 label: 'IMEI',
                 prop: 'imei',
+                editDisabled:true,
+                viewDisplay: false,
               },
             ]
-          }, {
+          },
+          {
             icon: 'el-icon-bangzhu',
             label: '产品分类',
-            // arrow: false,
             prop: 'group2',
-            column: [{
-              label: "平台",
-              prop: "platform",
-              type: "select",
-              value: "aep",
-              cascaderItem: ['productId'],
-              dicData: [{
-                  label: "aep",
-                  value: "aep"
+            column: [
+              {
+                label: "平台",
+                prop: "platform",
+                type: "select",
+                value: "AEP",
+                editDisabled:true,
+                cascaderItem: ['productId'],
+                viewDisplay: false,
+                dicData: [
+                  {
+                    label: "AEP",
+                    value: "AEP"
+                  },
+                ],
+              }, {
+                label: "产品类型",
+                prop: "productId",
+                type: "select",
+                editDisabled:true,
+                dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP&&size=100`,
+                viewDisplay: false,
+                props: {
+                  label: "productName",
+                  value: "productId"
                 },
-              ],
-            }, {
-              label: "产品类型",
-              prop: "productId",
-              type: "select",
-              dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=aep&size=100`,
-              props: {
-                label: "productName",
-                value: "productId"
-              },
-              dicFormatter: (res) => {
-                return res.data.records;
-              },
-            }]
-          }, {
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+              }]
+          },
+          {
             icon: 'el-icon-location',
             label: '位置信息',
             prop: 'group3',
@@ -240,6 +245,7 @@
                 remote: true,
                 cascaderItem: ['buildingId'],
                 dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+                viewDisplay: false,
                 props: {
                   label: "name",
                   value: "id"
@@ -259,6 +265,7 @@
                 type: "select",
                 display: true,
                 dicUrl: "/api/cyzh-community/building/list?size=500&residentialId={{key}}",
+                viewDisplay: false,
                 props: {
                   label: "name",
                   value: "id"
@@ -270,6 +277,7 @@
               {
                 label: '',
                 prop: 'mapSelect',
+                viewDisplay: false,
                 // row: true,
                 // span: 20,
                 formslot: true,
@@ -278,30 +286,198 @@
               {
                 label: "经度",
                 prop: "longitude",
+                viewDisplay: false,
                 // disabled: true,
               },
               {
                 label: "纬度",
                 prop: "latitude",
+                viewDisplay: false,
                 // disabled: true,
               },
               {
                 label: "安装位置",
                 prop: "deviceInstallAddress",
+                viewDisplay: false,
                 row: true,
                 span: 24,
                 // disabled: true,
               }
 
             ]
-          }],
+          }
+        ],
+        option: {
+          height: 'auto',
+          menuWidth: 300,
+          // labelWidth: 140,
+          calcHeight: 60,
+          tip: false,
+          searchShow: true,
+          border: true,
+          index: true,
+          editBtn: true,
+          viewBtn: true,
+          selection: true,
+          searchMenuSpan: 4,
+          dialogClickModal: false,
+
+          group: [
+            {
+              icon: 'el-icon-info',
+              label: '基础信息',
+              prop: 'group1',
+              column: [
+                {
+                  label: "设备类型",
+                  prop: "deviceType",
+                  type: "select",
+                  editDisabled:true,
+                  addDisabled: true,
+                  value: "YG",
+                  dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+                  props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                  },
+                  rules: [{
+                    required: true,
+                    message: "请选择设备类型",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: '设备名称',
+                  prop: 'deviceName',
+                  viewDisplay: false,
+                },
+                {
+                  label: 'IMEI',
+                  prop: 'imei',
+                  editDisabled:true,
+                  viewDisplay: false,
+                },
+              ]
+            },
+            {
+              icon: 'el-icon-bangzhu',
+              label: '产品分类',
+              prop: 'group2',
+              column: [
+                {
+                  label: "平台",
+                  prop: "platform",
+                  type: "select",
+                  value: "AEP",
+                  editDisabled:true,
+                  cascaderItem: ['productId'],
+                  viewDisplay: false,
+                  dicData: [
+                    {
+                      label: "AEP",
+                      value: "AEP"
+                    },
+                  ],
+                }, {
+                  label: "产品类型",
+                  prop: "productId",
+                  type: "select",
+                  editDisabled:true,
+                  dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP&&size=100`,
+                  viewDisplay: false,
+                  props: {
+                    label: "productName",
+                    value: "productId"
+                  },
+                  dicFormatter: (res) => {
+                    return res.data.records;
+                  },
+                }]
+            },
+            {
+              icon: 'el-icon-location',
+              label: '位置信息',
+              prop: 'group3',
+              column: [
+                {
+                  label: '所属区域',
+                  prop: 'residentialId',
+                  type: "select",
+                  remote: true,
+                  cascaderItem: ['buildingId'],
+                  dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+                  viewDisplay: false,
+                  props: {
+                    label: "name",
+                    value: "id"
+                  },
+                  dicFormatter: (res) => {
+                    return res.data.records;
+                  },
+                  rules: [{
+                    required: false,
+                    message: "请选择所属区域",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: '所属楼栋',
+                  prop: 'buildingId',
+                  type: "select",
+                  display: true,
+                  dicUrl: "/api/cyzh-community/building/list?size=500&residentialId={{key}}",
+                  viewDisplay: false,
+                  props: {
+                    label: "name",
+                    value: "id"
+                  },
+                  dicFormatter: (res) => {
+                    return res.data.records;
+                  },
+                },
+                {
+                  label: '',
+                  prop: 'mapSelect',
+                  viewDisplay: false,
+                  // row: true,
+                  // span: 20,
+                  formslot: true,
+                  hide: true,
+                },
+                {
+                  label: "经度",
+                  prop: "longitude",
+                  viewDisplay: false,
+                  // disabled: true,
+                },
+                {
+                  label: "纬度",
+                  prop: "latitude",
+                  viewDisplay: false,
+                  // disabled: true,
+                },
+                {
+                  label: "安装位置",
+                  prop: "deviceInstallAddress",
+                  viewDisplay: false,
+                  row: true,
+                  span: 24,
+                  // disabled: true,
+                }
+
+              ]
+            }
+          ],
           column: [
             {
               label: "设备类型",
               prop: "deviceType",
               type: "select",
+              editDisplay: false,
+              addDisplay: false,
               searchSpan: 4,
-              display: false,
+              editDisabled:true,
+              value: "YG",
               dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
               props: {
                 label: "dictValue",
@@ -316,7 +492,8 @@
             {
               label: "设备名称",
               prop: "deviceName",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               searchSpan: 4,
               search: true,
               overHidden:true,
@@ -329,7 +506,9 @@
             {
               label: "IMEI",
               prop: "imei",
-              display: false,
+              editDisabled:true,
+              editDisplay: false,
+              addDisplay: false,
               rules: [{
                 required: true,
                 message: "请输入IMEI",
@@ -340,8 +519,8 @@
               label: "设备状态",
               prop: "deviceStatus",
               type: "select",
-              display: false,
               searchSpan: 4,
+              editDisabled:true,
               search: true,
               editDisplay: false,
               addDisplay: false,
@@ -364,8 +543,8 @@
               label: "在线状态",
               prop: "deviceNetStatus",
               type: "select",
-              display: false,
               searchSpan: 4,
+              editDisabled:true,
               search: true,
               editDisplay: false,
               addDisplay: false,
@@ -383,19 +562,44 @@
             {
               label: "所属园区",
               prop: "agencyName",
-              addDisplay: false,
-              editDisplay: false
+              editDisplay: false,
+              addDisplay: false
             },
             {
               label: "所属区域",
               prop: "residentialName",
+              editDisplay: false,
+              addDisplay: false
+            },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              editDisplay: false,
               addDisplay: false,
-              editDisplay: false
+              type:"select",
+              searchSpan: 4,
+              filterable: true,
+              hide:true,
+              dicFlag: true,
+              dicUrl: "/api/cyzh-community/residential/list?size=100",
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+              props:{
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请输入区域",
+                trigger: "blur"
+              }]
             },
             {
               label: "经度",
               prop: "longitude",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               hide: true,
               rules: [{
                 required: false,
@@ -406,7 +610,8 @@
             {
               label: "纬度",
               prop: "latitude",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               hide: true,
               rules: [{
                 required: false,
@@ -418,7 +623,8 @@
             {
               label: "安装位置",
               prop: "deviceInstallAddress",
-              display: false,
+              editDisplay: false,
+              addDisplay: false,
               rules: [{
                 required: false,
                 message: "请输入安装位置",
@@ -427,7 +633,9 @@
             },
             {
               label: "最后上线时间",
+              labelWidth: 100,
               prop: "lastOnlineAt",
+              editDisabled:true,
               hide: true,
               addDisplay: false,
               editDisplay: false,
@@ -435,6 +643,8 @@
             {
               label: "最后上线时间",
               prop: "lastOfflineAt",
+              editDisabled:true,
+              labelWidth: 100,
               hide: true,
               addDisplay: false,
               editDisplay: false,
@@ -453,7 +663,6 @@
             "platform": "aep"
           }).then(res => {
             productColumn['dicData'] = res.data.records
-            // platformColumn.cascaderItem = ['productId']
             productColumn.dicUrl = "/api/cyzh-third/iotaepproduct/list?platform=aep&productName={{key}}"
             isAepColumn.display = false;
             productColumn.display = true
@@ -462,7 +671,7 @@
         this.option = Object.assign({}, this.option)
       },
       "form.isAep"() {
-        if (this.form.platform == "aep") return
+        if (this.form.platform == "AEP") return
         let productColumn = this.option.group[1].column[2];
         if (this.form.isAep == 1) {
           productColumn.display = true;
@@ -480,18 +689,16 @@
             this.form.longitude = res.data.data.longitude;
           })
         }
-
       }
     },
     computed: {
       ...mapGetters(["permission"]),
       permissionList() {
         return {
-          addBtn: this.vaildData(this.permission.smoke_add, false),
-          viewBtn: this.vaildData(this.permission.smoke_view, false),
-          delBtn: this.vaildData(this.permission.smoke_delete, false),
-          editBtn: this.vaildData(this.permission.smoke_update, false),
-
+          addBtn: this.vaildData(this.permission.iotdevice_add, false),
+          viewBtn: this.vaildData(this.permission.iotdevice_view, false),
+          delBtn: this.vaildData(this.permission.iotdevice_delete, false),
+          editBtn: this.vaildData(this.permission.iotdevice_edit, false),
         };
       },
       ids() {
@@ -504,6 +711,15 @@
     },
 
     methods: {
+      syncDevice(row){
+        sync(row),then(res=>{
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        })
+      },
       openMap() {
         this.mapVisible = true;
         this.$nextTick(() => {
@@ -514,7 +730,6 @@
         console.log(tab + " " + event)
       },
       handleClickType(tab, event) {
-        // this.$refs.crud.searchForm.deviceType = tab.name;
         this.query.deviceType = tab.name;
         this.onLoad(this.page, this.query);
       },
@@ -610,7 +825,15 @@
           });
       },
       beforeOpen(done, type) {
+        if (["add"].includes(type)) {
+          this.option.group = this.groupArray;
+        }
         if (["edit", "view"].includes(type)) {
+          if(type === "view"){
+            this.option.group = null;
+          }else{
+            this.option.group = this.groupArray;
+          }
           getDetail(this.form.id).then(res => {
             this.form = res.data.data;
           });

+ 2 - 2
src/views/device/iot/smarttrashbin.vue

@@ -313,7 +313,7 @@
                 }]
               },
               {
-                label: '所属区',
+                label: '所属区',
                 prop: 'residentialId',
                 type: "select",
                 remote: true,
@@ -328,7 +328,7 @@
                 },
                 rules: [{
                   required: true,
-                  message: "所属区",
+                  message: "所属区",
                   trigger: "blur"
                 }]
               },

+ 963 - 0
src/views/device/iot/smoke.vue

@@ -0,0 +1,963 @@
+<template>
+  <basic-container>
+    <el-dialog :modal-append-to-body="false" :visible.sync="heartbeatVisible" title="设备心跳" width="80%">
+      <deviceHeartbeat :deviceId="deviceId" :data="heartbeatData" ref="heartbeat"></deviceHeartbeat>
+    </el-dialog>
+    <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false"
+      :visible.sync="editVisible" title="编辑" width="60%">
+      <avue-form v-model="editForm" :option="option" @submit="submitSmartsmoke"></avue-form>
+    </el-dialog>
+
+    <avue-data-tabs :option="countOption"></avue-data-tabs>
+    <el-divider style=""></el-divider>
+
+    <avue-crud :option="option" :table-loading="loading" :data="data" :page="page" :permission="permissionList"
+      :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
+      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+      <template slot="menu" slot-scope="scope">
+        <el-button icon="el-icon-setting" size="small" type="text">
+          <el-dropdown>
+            <span class="el-dropdown-link">操作<i class="el-icon-arrow-down el-icon--right"></i></span>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item icon="el-icon-view" type="text" @click.native="viewDetail(scope.row)">详情</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-view" type="text" v-if="permission.device_heartbeat" @click.native="viewHeartBeat(scope.row)">心跳</el-dropdown-item>
+              <el-dropdown-item icon="el-icon-office-building" type="text" @click.native="syncDevice(scope.row)">同步数据</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </el-button>
+      </template>
+      <template slot="mapSelectForm" slot-scope="scope">
+        <div>
+          <el-button @click="openMap"> 选择地址</el-button>
+          <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false"
+            :visible.sync="mapVisible" title="编辑地址" width="80%">
+            <editPolygonMap editForm="{}" ref="map" :region.sync="form.deviceInstallAddress"
+              :longitude.sync="form.longitude" :latitude.sync="form.latitude" v-if="mapVisible"
+              v-model="scope.row.mapSelect" :visible.sync="mapVisible"></editPolygonMap>
+          </el-dialog>
+        </div>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {
+    getList,
+    getDetail,
+    add,
+    update,
+    remove,
+    deviceListCount,
+    sync
+  } from "@/api/device/iotdevice";
+  import {
+    getDetail as getResidentialDetail
+  } from "@/api/community/residential"
+  import {
+    mapGetters
+  } from "vuex";
+  import editPolygonMap from "../../../components/residential/editPolygonMap.vue"
+  import {
+    getList as getIotList
+  } from "@/api/system/terminal/iotaepproduct"
+  import {
+    getHeartBeatByDeviceId
+  } from "@/api/device/iotdeviceheartbeat";
+
+  import deviceHeartbeat from "../../../components/device/deviceheartbeat.vue"
+
+  export default {
+    components: {
+      editPolygonMap,
+      deviceHeartbeat
+    },
+    data() {
+      return {
+        heartbeatData: [],
+        deviceId: "",
+        mapVisible: false,
+        heartbeatVisible: false,
+        smartDeviceStaticVo: {},
+        location: {},
+        detailForm: {},
+        editVisible: false,
+        editForm: {},
+        proIsCharge: true,
+        activeName: "first",
+        detailVisible: false,
+        form: {},
+        alarmForm: {},
+        homeUserForm: {},
+        orderUserForm: {},
+        query: {
+          deviceType: "YG"
+        },
+        loading: true,
+        alarmSetOptionLoading: true,
+        homeUserLoading: true,
+        orderUserLoading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        alarmPage: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        homeUserPage: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        countOption: {
+          span: 4,
+          data: [
+            {
+              click: function(item) {},
+              title: '总数',
+              count: 0,
+              color: '#409EFF',
+              key: '设备总数'
+            },
+            {
+              click: function(item) {},
+              title: '在线',
+              count: 0,
+              color: '#67C23A',
+              key: '在线'
+            },
+            {
+              click: function(item) {},
+              title: '告警',
+              count: 0,
+              color: '#F56C6C',
+              key: '告警'
+            },
+            {
+              click: function(item) {},
+              title: '激活',
+              count: 0,
+              color: '#E6A23C',
+              key: '激活'
+            },
+            {
+              click: function(item) {},
+              title: '注册',
+              count: 0,
+              color: '#987856',
+              key: '注册'
+            },
+            {
+              click: function(item) {},
+              title: '离线',
+              count: 0,
+              color: '#909399',
+              key: '离线'
+            },
+          ]
+        },
+        groupArray:[
+          {
+            icon: 'el-icon-info',
+            label: '基础信息',
+            prop: 'group1',
+            column: [
+              {
+                label: "设备类型",
+                prop: "deviceType",
+                type: "select",
+                editDisabled:true,
+                addDisabled: true,
+                value: "YG",
+                dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+                props: {
+                  label: "dictValue",
+                  value: "dictKey"
+                },
+                rules: [{
+                  required: true,
+                  message: "请选择设备类型",
+                  trigger: "blur"
+                }]
+              },
+              {
+                label: '设备名称',
+                prop: 'deviceName',
+                viewDisplay: false,
+              },
+              {
+                label: 'IMEI',
+                prop: 'imei',
+                editDisabled:true,
+                viewDisplay: false,
+              },
+            ]
+          },
+          {
+            icon: 'el-icon-bangzhu',
+            label: '产品分类',
+            prop: 'group2',
+            column: [
+              {
+                label: "平台",
+                prop: "platform",
+                type: "select",
+                value: "AEP",
+                editDisabled:true,
+                cascaderItem: ['productId'],
+                viewDisplay: false,
+                dicData: [
+                  {
+                    label: "AEP",
+                    value: "AEP"
+                  },
+                ],
+              }, {
+                label: "产品类型",
+                prop: "productId",
+                type: "select",
+                editDisabled:true,
+                dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP&&size=100`,
+                viewDisplay: false,
+                props: {
+                  label: "productName",
+                  value: "productId"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+              }]
+          },
+          {
+            icon: 'el-icon-location',
+            label: '位置信息',
+            prop: 'group3',
+            column: [
+              {
+                label: '所属区域',
+                prop: 'residentialId',
+                type: "select",
+                remote: true,
+                cascaderItem: ['buildingId'],
+                dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+                viewDisplay: false,
+                props: {
+                  label: "name",
+                  value: "id"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+                rules: [{
+                  required: false,
+                  message: "请选择所属区域",
+                  trigger: "blur"
+                }]
+              },
+              {
+                label: '所属楼栋',
+                prop: 'buildingId',
+                type: "select",
+                display: true,
+                dicUrl: "/api/cyzh-community/building/list?size=500&residentialId={{key}}",
+                viewDisplay: false,
+                props: {
+                  label: "name",
+                  value: "id"
+                },
+                dicFormatter: (res) => {
+                  return res.data.records;
+                },
+              },
+              {
+                label: '',
+                prop: 'mapSelect',
+                viewDisplay: false,
+                // row: true,
+                // span: 20,
+                formslot: true,
+                hide: true,
+              },
+              {
+                label: "经度",
+                prop: "longitude",
+                viewDisplay: false,
+                // disabled: true,
+              },
+              {
+                label: "纬度",
+                prop: "latitude",
+                viewDisplay: false,
+                // disabled: true,
+              },
+              {
+                label: "安装位置",
+                prop: "deviceInstallAddress",
+                viewDisplay: false,
+                row: true,
+                span: 24,
+                // disabled: true,
+              }
+
+            ]
+          }
+        ],
+        option: {
+          height: 'auto',
+          menuWidth: 300,
+          // labelWidth: 140,
+          calcHeight: 60,
+          tip: false,
+          searchShow: true,
+          border: true,
+          index: true,
+          editBtn: true,
+          viewBtn: true,
+          selection: true,
+          searchMenuSpan: 4,
+          dialogClickModal: false,
+
+          group: [
+            {
+              icon: 'el-icon-info',
+              label: '基础信息',
+              prop: 'group1',
+              column: [
+                {
+                  label: "设备类型",
+                  prop: "deviceType",
+                  type: "select",
+                  editDisabled:true,
+                  addDisabled: true,
+                  value: "YG",
+                  dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+                  props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                  },
+                  rules: [{
+                    required: true,
+                    message: "请选择设备类型",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: '设备名称',
+                  prop: 'deviceName',
+                  viewDisplay: false,
+                },
+                {
+                  label: 'IMEI',
+                  prop: 'imei',
+                  editDisabled:true,
+                  viewDisplay: false,
+                },
+              ]
+            },
+            {
+              icon: 'el-icon-bangzhu',
+              label: '产品分类',
+              prop: 'group2',
+              column: [
+                {
+                  label: "平台",
+                  prop: "platform",
+                  type: "select",
+                  value: "AEP",
+                  editDisabled:true,
+                  cascaderItem: ['productId'],
+                  viewDisplay: false,
+                  dicData: [
+                    {
+                      label: "AEP",
+                      value: "AEP"
+                    },
+                  ],
+                }, {
+                  label: "产品类型",
+                  prop: "productId",
+                  type: "select",
+                  editDisabled:true,
+                  dicUrl: `/api/cyzh-third/iotaepproduct/list?platform=AEP&&size=100`,
+                  viewDisplay: false,
+                  props: {
+                    label: "productName",
+                    value: "productId"
+                  },
+                  dicFormatter: (res) => {
+                    return res.data.records;
+                  },
+                }]
+            },
+            {
+              icon: 'el-icon-location',
+              label: '位置信息',
+              prop: 'group3',
+              column: [
+                {
+                  label: '所属区域',
+                  prop: 'residentialId',
+                  type: "select",
+                  remote: true,
+                  cascaderItem: ['buildingId'],
+                  dicUrl: "/api/cyzh-community/residential/list?size=500&name={{key}}",
+                  viewDisplay: false,
+                  props: {
+                    label: "name",
+                    value: "id"
+                  },
+                  dicFormatter: (res) => {
+                    return res.data.records;
+                  },
+                  rules: [{
+                    required: false,
+                    message: "请选择所属区域",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: '所属楼栋',
+                  prop: 'buildingId',
+                  type: "select",
+                  display: true,
+                  dicUrl: "/api/cyzh-community/building/list?size=500&residentialId={{key}}",
+                  viewDisplay: false,
+                  props: {
+                    label: "name",
+                    value: "id"
+                  },
+                  dicFormatter: (res) => {
+                    return res.data.records;
+                  },
+                },
+                {
+                  label: '',
+                  prop: 'mapSelect',
+                  viewDisplay: false,
+                  // row: true,
+                  // span: 20,
+                  formslot: true,
+                  hide: true,
+                },
+                {
+                  label: "经度",
+                  prop: "longitude",
+                  viewDisplay: false,
+                  // disabled: true,
+                },
+                {
+                  label: "纬度",
+                  prop: "latitude",
+                  viewDisplay: false,
+                  // disabled: true,
+                },
+                {
+                  label: "安装位置",
+                  prop: "deviceInstallAddress",
+                  viewDisplay: false,
+                  row: true,
+                  span: 24,
+                  // disabled: true,
+                }
+
+              ]
+            }
+          ],
+          column: [
+            {
+              label: "设备类型",
+              prop: "deviceType",
+              type: "select",
+              editDisplay: false,
+              addDisplay: false,
+              searchSpan: 4,
+              editDisabled:true,
+              value: "YG",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=iot_device_type",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+              rules: [{
+                required: true,
+                message: "请选择设备类型",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "设备名称",
+              prop: "deviceName",
+              editDisplay: false,
+              addDisplay: false,
+              searchSpan: 4,
+              search: true,
+              overHidden:true,
+              rules: [{
+                required: true,
+                message: "请输入设备名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "IMEI",
+              prop: "imei",
+              editDisabled:true,
+              editDisplay: false,
+              addDisplay: false,
+              rules: [{
+                required: true,
+                message: "请输入IMEI",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "设备状态",
+              prop: "deviceStatus",
+              type: "select",
+              searchSpan: 4,
+              editDisabled:true,
+              search: true,
+              editDisplay: false,
+              addDisplay: false,
+              dicData:[
+                {
+                  label: "已注册",
+                  value: 0
+                },
+                {
+                  label: "已激活",
+                  value: 1
+                },
+                {
+                  label: "已注销",
+                  value: 2
+                }
+              ]
+            },
+            {
+              label: "在线状态",
+              prop: "deviceNetStatus",
+              type: "select",
+              searchSpan: 4,
+              editDisabled:true,
+              search: true,
+              editDisplay: false,
+              addDisplay: false,
+              dicData:[
+                {
+                  label: "在线",
+                  value: 1
+                },
+                {
+                  label: "离线",
+                  value: 2
+                },
+              ]
+            },
+            {
+              label: "所属园区",
+              prop: "agencyName",
+              editDisplay: false,
+              addDisplay: false
+            },
+            {
+              label: "所属区域",
+              prop: "residentialName",
+              editDisplay: false,
+              addDisplay: false
+            },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              editDisplay: false,
+              addDisplay: false,
+              type:"select",
+              searchSpan: 4,
+              filterable: true,
+              hide:true,
+              dicFlag: true,
+              dicUrl: "/api/cyzh-community/residential/list?size=100",
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+              props:{
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请输入区域",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "经度",
+              prop: "longitude",
+              editDisplay: false,
+              addDisplay: false,
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入经纬度",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "纬度",
+              prop: "latitude",
+              editDisplay: false,
+              addDisplay: false,
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入经纬度",
+                trigger: "blur"
+              }]
+            },
+
+            {
+              label: "安装位置",
+              prop: "deviceInstallAddress",
+              editDisplay: false,
+              addDisplay: false,
+              rules: [{
+                required: false,
+                message: "请输入安装位置",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "最后上线时间",
+              labelWidth: 100,
+              prop: "lastOnlineAt",
+              editDisabled:true,
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+            },
+            {
+              label: "最后上线时间",
+              prop: "lastOfflineAt",
+              editDisabled:true,
+              labelWidth: 100,
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    watch: {
+      "form.platform"() {
+        let isAepColumn = this.option.group[1].column[1];
+        let productColumn = this.option.group[1].column[2];
+        if (this.form.platform == "aep") {
+          getIotList(1, 10000, {
+            "platform": "aep"
+          }).then(res => {
+            productColumn['dicData'] = res.data.records
+            productColumn.dicUrl = "/api/cyzh-third/iotaepproduct/list?platform=aep&productName={{key}}"
+            isAepColumn.display = false;
+            productColumn.display = true
+          })
+        }
+        this.option = Object.assign({}, this.option)
+      },
+      "form.isAep"() {
+        if (this.form.platform == "AEP") return
+        let productColumn = this.option.group[1].column[2];
+        if (this.form.isAep == 1) {
+          productColumn.display = true;
+        } else {
+          productColumn.display = false;
+        }
+
+        this.option = Object.assign({}, this.option)
+      },
+
+      "form.residentialId"() {
+        if (this.form.residentialId != '' && this.form.residentialId != undefined) {
+          getResidentialDetail(this.form.residentialId).then(res => {
+            this.form.latitude = res.data.data.latitude;
+            this.form.longitude = res.data.data.longitude;
+          })
+        }
+      }
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.iotdevice_add, false),
+          viewBtn: this.vaildData(this.permission.iotdevice_view, false),
+          delBtn: this.vaildData(this.permission.iotdevice_delete, false),
+          editBtn: this.vaildData(this.permission.iotdevice_edit, false),
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+
+    methods: {
+      syncDevice(row){
+        sync(row),then(res=>{
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        })
+      },
+      openMap() {
+        this.mapVisible = true;
+        this.$nextTick(() => {
+          // this.$refs.map.mounted();
+        })
+      },
+      handleClick(tab, event) {
+        console.log(tab + " " + event)
+      },
+      handleClickType(tab, event) {
+        this.query.deviceType = tab.name;
+        this.onLoad(this.page, this.query);
+      },
+      viewHeartBeat(row) {
+        this.deviceId = row.id;
+
+        getHeartBeatByDeviceId({
+          deviceId: this.deviceId
+        }).then(res => {
+          this.heartbeatVisible = true;
+          this.heartbeatData = res.data.data;
+          this.$nextTick(() => {
+            this.$refs.heartbeat.init()
+          })
+        })
+
+      },
+      viewDetail(row) {
+        if (row.latitudeLongitude != null && row.latitudeLongitude != "") {
+          var latitudeLongitude = row.latitudeLongitude.split(",");
+          this.location.latitude = latitudeLongitude[0];
+          this.location.longitude = latitudeLongitude[1];
+          this.location.name = row.deviceName;
+        }
+        this.detailForm = row;
+        this.detailVisible = true;
+      },
+      rowSave(row, done, loading) {
+        row.latitudeLongitude = row.latituede + "," + row.longitude;
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        row.latitudeLongitude = row.latituede + "," + row.longitude;
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["add"].includes(type)) {
+          this.option.group = this.groupArray;
+        }
+        if (["edit", "view"].includes(type)) {
+          if(type === "view"){
+            this.option.group = null;
+          }else{
+            this.option.group = this.groupArray;
+          }
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage) {
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+
+
+      homeUserOnLoad(page, params = {}) {
+        this.homeUserLoading = true;
+        // this.homeUserData = [];
+        params.residentialId = this.detailForm.residentialId;
+        params.type = 0;
+        getHouseUserList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          let data = res.data.data
+          this.homeUserData = data.records;
+          this.homeUserPage.total = data.total;
+          this.homeUserLoading = false;
+          this.selectionClear();
+        })
+      },
+      edit(row) {
+        this.editForm = row;
+        this.editVisible = true;
+      },
+      submitSmartsmoke(row, done, loading) {
+        update(this.editForm).then(() => {
+          this.onLoad(this.page);
+          this.editVisible = false;
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        deviceListCount(params).then(res => {
+          this.smartDeviceStaticVo = res.data.data;
+          this.smartDeviceStaticVo.forEach(staticDevice => {
+            if (staticDevice.deviceType == params.deviceType) {
+              this.countOption.data[0].count = staticDevice.deviceCount;
+              this.countOption.data[1].count = staticDevice.onlineCount;
+              this.countOption.data[2].count = staticDevice.alarmCount;
+              this.countOption.data[3].count = staticDevice.activeCount;
+              this.countOption.data[4].count = staticDevice.registerCount;
+              this.countOption.data[5].count = staticDevice.offlineCount;
+            }
+          })
+
+        })
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+
+      }
+    }
+  };
+</script>
+
+<style scoped>
+  .el-divider--vertical {
+    /* height: 100%; */
+  }
+
+  >>>.el-divider--horizontal {
+    margin: 30px 0 !important;
+  }
+
+  >>>.el-card__body {
+    padding-top: 0px !important;
+  }
+
+  >>>.avue-crud__menu {
+    /*display: none;*/
+  }
+
+  >>>section header .el-row {
+    margin-top: 15px;
+  }
+
+  >>>.avue-data-tabs .item {
+    height: auto;
+  }
+
+  .el-dropdown-link {
+    cursor: pointer;
+    color: #409eff;
+    font-size: small;
+    margin-left: 10px;
+  }
+</style>

+ 2 - 2
src/views/device/iotalarmgroup.vue

@@ -272,8 +272,8 @@ export default {
     const residentialIdColumn = this.findObject(this.optionParent.column, "residentialId");
     if (tenantType == 1) { //园区
       residentialIdColumn.label = "所属区域"
-    } else { //
-      residentialIdColumn.label = "所属区"
+    } else { //
+      residentialIdColumn.label = "所属区"
     }
   },
   methods: {

+ 3 - 3
src/views/device/iotdevice.vue

@@ -379,7 +379,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type:"select",
               searchSpan: 4,
@@ -1090,8 +1090,8 @@
       const residentialColumn = this.findObject(this.option.column, "residentialId");
       if (tenantType == 1) { //园区
         residentialColumn.label = "所属区域";
-      } else { //
-        residentialColumn.label = "所属区";
+      } else { //
+        residentialColumn.label = "所属区";
       }
 
     },

+ 1 - 1
src/views/device/videoSurveillance.vue

@@ -18,7 +18,7 @@
       </el-col>
     </el-row> -->
     <el-row>
-      <el-col v-if="tenantType == 0" span="4" align="right" style="font-size: large;">所属区:</el-col>
+      <el-col v-if="tenantType == 0" span="4" align="right" style="font-size: large;">所属区:</el-col>
       <el-col v-if="tenantType == 1" span="4" align="right" style="font-size: large;">所属区域:</el-col>
       <el-col span="4" align="left">
         <el-select size="small" v-model="selectResidential" filterable  clearable @change="residentialIdChange">

+ 3 - 3
src/views/device/videoclouddevice.vue

@@ -1315,7 +1315,7 @@ export default {
       bindOption: {
         column: [
           {
-            label: "所属区",
+            label: "所属区",
             prop: "residentialId",
             type: "select",
             search: true,
@@ -1332,7 +1332,7 @@ export default {
             },
             rules: [{
               required: true,
-              message: "请选择所属区",
+              message: "请选择所属区",
               trigger: "blur"
             }]
           },
@@ -1437,7 +1437,7 @@ export default {
     },
     bindBatchDevice(loading,done) {
       // if (this.selectValue == "") {
-      //   this.$message.warning("请选择所属区");
+      //   this.$message.warning("请选择所属区");
       //   return;
       // }
       //保存

+ 5 - 5
src/views/device/videodevice/videocloud/videoclouddevice.vue

@@ -1307,7 +1307,7 @@ export default {
       bindOption: {
         column: [
           {
-            label: "所属区",
+            label: "所属区",
             prop: "residentialId",
             type: "select",
             search: true,
@@ -1325,7 +1325,7 @@ export default {
             },
             rules: [{
               required: true,
-              message: "请选择所属区",
+              message: "请选择所属区",
               trigger: "blur"
             }]
           },
@@ -1375,8 +1375,8 @@ export default {
   created() {
     const tenantType = localStorage.getItem("tenantType");
     if (tenantType == 0){
-      //
-      this.bindOption.column[0].label="所属区";
+      //
+      this.bindOption.column[0].label="所属区";
     }else if (tenantType == 1){
       //园区
       this.bindOption.column[0].label = "所属区域";
@@ -1515,7 +1515,7 @@ export default {
     },
     bindBatchDevice(loading,done) {
       // if (this.selectValue == "") {
-      //   this.$message.warning("请选择所属区");
+      //   this.$message.warning("请选择所属区");
       //   return;
       // }
       //保存

+ 3 - 3
src/views/device/videodevice/wvp/wvpvideodevice.vue

@@ -328,7 +328,7 @@ export default {
       bindOption: {
         column: [
           {
-            label: "所属区",
+            label: "所属区",
             prop: "residentialId",
             type: "select",
             search: true,
@@ -344,7 +344,7 @@ export default {
             },
             rules: [{
               required: true,
-              message: "请选择所属区",
+              message: "请选择所属区",
               trigger: "blur"
             }]
           },
@@ -556,7 +556,7 @@ export default {
     },
     bindBatchDevice(loading,done) {
       // if (this.selectValue == "") {
-      //   this.$message.warning("请选择所属区");
+      //   this.$message.warning("请选择所属区");
       //   return;
       // }
       //保存

+ 3 - 3
src/views/estate/applyuser.vue

@@ -174,7 +174,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialName",
               addDisplay: false,
               editDisplay: false,
@@ -185,7 +185,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -203,7 +203,7 @@
               },
               rules: [{
                 required: true,
-                message: "请输入所属区id",
+                message: "请输入所属区id",
                 trigger: "blur"
               }],
               hide: true,

+ 4 - 4
src/views/estate/bills.vue

@@ -92,7 +92,7 @@
           dialogClickModal: false,
           column: [
             // {
-            //   label: "所属区",
+            //   label: "所属区",
             //   prop: "agencyId",
             //   // slot: true,
             //   search: true,
@@ -110,12 +110,12 @@
             //   },
             //   rules: [{
             //     required: true,
-            //     message: "请选择所属区",
+            //     message: "请选择所属区",
             //     trigger: "blur"
             //   }]
             // },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               slot: true,
               type: "select",
@@ -135,7 +135,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },

+ 3 - 3
src/views/estate/dailymng/repair.vue

@@ -173,7 +173,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               slot:true,
@@ -191,7 +191,7 @@
               },
               rules: [{
                 required: false,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
@@ -352,7 +352,7 @@
     created() {
       const tenantType = localStorage.getItem("tenantType");
       if (tenantType == 0){
-        this.option.column[7].label = "所属区"
+        this.option.column[7].label = "所属区"
       }else if (tenantType == 1){
         this.option.column[7].label = "所属区域"
       }

+ 1 - 1
src/views/estate/guestmng/guestrecord.vue

@@ -284,7 +284,7 @@
         let findObject5 = this.findObject(this.option.column, "floorName");
         let findObject6 = this.findObject(this.option.column, "roomName");
         let findObject7 = this.findObject(this.option.column, "enterpriseName");
-        findObject1.label = "拜访区";
+        findObject1.label = "拜访区";
         findObject2.label = "拜访小区";
         findObject3.hide = false;findObject3.viewDisplay = true;
         findObject4.hide = false;findObject4.viewDisplay = true;

+ 4 - 4
src/views/estate/noticepushrecord.vue

@@ -78,7 +78,7 @@
               }]
             },
             {
-              label: "下发区",
+              label: "下发区",
               prop: "agencyId",
               search: true,
               searchFilterable: true,
@@ -96,14 +96,14 @@
               },
               rules: [{
                 required: true,
-                message: "请选择下发区",
+                message: "请选择下发区",
                 trigger: "blur"
               }],
               hide: true,
               viewDisplay: false,
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -127,7 +127,7 @@
               viewDisplay: false,
             },
             {
-              label: "下发区",
+              label: "下发区",
               prop: "agencyName",
               editDisplay: false,
               addDisplay: false,

+ 11 - 11
src/views/estate/parkinglotmng/car.vue

@@ -118,13 +118,13 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyName",
               editDisplay: false,
               addDisplay: false,
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               searchFilterable: true,
@@ -142,20 +142,20 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }],
               hide: true,
               viewDisplay: false,
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialName",
               editDisplay: false,
               addDisplay: false
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -173,7 +173,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }],
               hide: true,
@@ -446,11 +446,11 @@
         residentialColumn.label = "所属区域";
         agencyNameColumn.label = "所属园区";
         residentialNameColumn.label = "所属区域";
-      } else { //
-        agencyColumn.label = "所属区";
-        residentialColumn.label = "所属区";
-        agencyNameColumn.label = "所属区";
-        residentialNameColumn.label = "所属区";
+      } else { //
+        agencyColumn.label = "所属区";
+        residentialColumn.label = "所属区";
+        agencyNameColumn.label = "所属区";
+        residentialNameColumn.label = "所属区";
       }
     },
     methods: {

+ 12 - 12
src/views/estate/parkinglotmng/parkinglot.vue

@@ -111,7 +111,7 @@
               hide: true
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               search: true,
               searchFilterable: true,
@@ -129,26 +129,26 @@
               },
               rules: [{
                 required: true,
-                message: "请输入所属区",
+                message: "请输入所属区",
                 trigger: "change"
               }],
               hide: true,
               viewDisplay: false,
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyName",
               editDisplay: false,
               addDisplay: false,
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialName",
               editDisplay: false,
               addDisplay: false
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               dicUrl: "/api/cyzh-community/residential/list?size=500&agencyId={{key}}",
@@ -164,7 +164,7 @@
               },
               rules: [{
                 required: true,
-                message: "请输入所属区",
+                message: "请输入所属区",
                 trigger: "blur"
               }],
               hide: true,
@@ -372,12 +372,12 @@
         let agencyNameProp = this.findObject(this.option.column,"agencyName");
         let residentialIdProp = this.findObject(this.option.column,"residentialId");
         let residentialNameProp = this.findObject(this.option.column,"residentialName");
-        agencyIdProp.label = "所属区"
-        agencyIdProp.rules[0].message = "请选择所属区"
-        agencyNameProp.label = "所属区"
-        residentialIdProp.label = "所属区"
-        residentialIdProp.rules[0].message = "请选择所属区"
-        residentialNameProp.label = "所属区"
+        agencyIdProp.label = "所属区"
+        agencyIdProp.rules[0].message = "请选择所属区"
+        agencyNameProp.label = "所属区"
+        residentialIdProp.label = "所属区"
+        residentialIdProp.rules[0].message = "请选择所属区"
+        residentialNameProp.label = "所属区"
       }else if (tenantType == 1){
         let agencyIdProp = this.findObject(this.option.column,"agencyId");
         let agencyNameProp = this.findObject(this.option.column,"agencyName");

+ 3 - 3
src/views/estate/parkinglotmng/parkingspace.vue

@@ -141,7 +141,7 @@
               }],
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               slot:true,
@@ -159,7 +159,7 @@
               },
               rules: [{
                 required: false,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
@@ -240,7 +240,7 @@
     created() {
       const tenantType = localStorage.getItem("tenantType");
       if (tenantType == 0){
-        this.option.column[4].label = "所属区"
+        this.option.column[4].label = "所属区"
       }else if (tenantType == 1){
         this.option.column[4].label = "所属区域"
       }

+ 3 - 3
src/views/estate/passmng/accessrecord.vue

@@ -259,9 +259,9 @@
       let agencyNameProp = this.findObject(this.option.column,"agencyName");
       let residentialNameProp = this.findObject(this.option.column,"residentialName");
       if (tenantType == 0){
-        //
-        agencyNameProp.label="所属区";
-        residentialNameProp.label="所属区";
+        //
+        agencyNameProp.label="所属区";
+        residentialNameProp.label="所属区";
       }else if (tenantType == 1){
         //园区
         agencyNameProp.label = "所属园区";

+ 8 - 8
src/views/estate/passmng/carenterrecord.vue

@@ -96,13 +96,13 @@
               }]
             },
             // { //列表展示
-            //   label: "所属区",
+            //   label: "所属区",
             //   prop: "agencyName",
             //   addDisplay: false,
             //   editDisplay: false,
             // },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               // slot: true,
               search: true,
@@ -121,20 +121,20 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }],
               // hide: true,
               // viewDisplay: false
             },
             // { //列表展示
-            //   label: "所属区",
+            //   label: "所属区",
             //   prop: "residentialName",
             //   addDisplay: false,
             //   editDisplay: false,
             // },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               type: "select",
               search: true,
@@ -150,7 +150,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }],
               // hide: true,
@@ -324,8 +324,8 @@
       const tenantType = localStorage.getItem("tenantType");
       if (tenantType == 0){
         console.log(this.option,"this.option")
-        this.option.column[2].label = "所属区"
-        this.option.column[3].label = "所属区"
+        this.option.column[2].label = "所属区"
+        this.option.column[3].label = "所属区"
         //根据账号显隐企业列
         this.option.column[4].hide = true;
         this.option.column[4].viewDisplay = false;

+ 6 - 6
src/views/estate/passmng/caroutrecord.vue

@@ -227,7 +227,7 @@
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "agencyId",
               // slot: true,
               search: true,
@@ -246,12 +246,12 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
             {
-              label: "所属区",
+              label: "所属区",
               prop: "residentialId",
               // slot: true,
               type: "select",
@@ -269,7 +269,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
@@ -320,8 +320,8 @@
     created() {
       const tenantType = localStorage.getItem("tenantType");
       if (tenantType == 0){
-        this.option.column[13].label = "所属区"
-        this.option.column[14].label = "所属区"
+        this.option.column[13].label = "所属区"
+        this.option.column[14].label = "所属区"
       }else if (tenantType == 1){
         this.option.column[13].label = "所属园区"
         this.option.column[14].label = "所属区域"

+ 396 - 0
src/views/guestmng/facetrajectory.vue

@@ -0,0 +1,396 @@
+<template>
+  <basic-container>
+<!--    卡片数据展示-->
+    <el-card style="margin-bottom: 20px">
+<!--      <template slot="header">-->
+<!--        出入统计数据-->
+        <el-tabs type="border-card">
+          <el-tab-pane label="数据统计"><avue-data-box :option="AccessRecord"></avue-data-box></el-tab-pane>
+<!--          <el-tab-pane label="本周数据"><avue-data-icon :option="weekAccessRecord"></avue-data-icon></el-tab-pane>-->
+<!--          <el-tab-pane label="本月数据"><avue-data-icon :option="monthAccessRecord"></avue-data-icon></el-tab-pane>-->
+<!--          <el-tab-pane label="今年数据"><avue-data-icon :option="yearAccessRecord"></avue-data-icon></el-tab-pane>-->
+        </el-tabs>
+<!--      </template>-->
+    </el-card>
+
+
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove, getAccessCount} from "@/api/estate/accessrecord";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        //今年数据
+        AccessRecord:{
+          span:6,
+          data: [
+            {
+              title: '今日数据',
+              count: 0,
+              icon: 'el-icon-user-solid',
+              color: 'rgb(49, 180, 141)',
+            },
+            {
+              title: '本周数据',
+              count: 0,
+              icon: 'el-icon-user-solid',
+              color: 'rgb(56, 161, 242)',
+            },
+            {
+              title: '本月数据',
+              count: 0,
+              icon: 'el-icon-user-solid',
+              color: 'rgb(117, 56, 199)',
+            },
+            {
+              title: '今年数据',
+              count: 0,
+              icon: 'el-icon-user-solid',
+              color: 'rgb(143,119,0)',
+            },
+          ]
+        },
+        enterpriseColumn: {
+          label: "所属企业",
+          prop: "enterpriseId",
+          type: "select",
+          search: true,
+          width:200,
+          filterable: true,
+          dicUrl: "/api/cyzh-enterprise/enterprise/list?size=9999",
+          props:{
+            label:"enterpriseName",
+            value:"id"
+          },
+          dicFormatter: (res)=>{
+            return res.data.records;
+          },
+          searchFilterable: true,
+        },
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          // calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          addBtn: false,
+          delBtn: false,
+          editBtn: false,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "用户姓名",
+              prop: "userName",
+              width:80,
+              rules: [{
+                required: true,
+                message: "请输入用户姓名",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "人脸",
+              prop: "faceUrl",
+              type:'upload',
+              width:100,
+              listType: 'picture-img',
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              tip: '只能生产jpg/png图片,且不超过500kb',
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              rules: [{
+                required: true,
+                message: "请输入人脸",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "开门方式",
+              prop: "openType",
+              type:"select",
+              dicData:[
+                {
+                  label:'刷脸开门',
+                  value:1
+                },{
+                  label:'远程开门',
+                  value:2
+                }
+              ],
+            },
+            {
+              label: "体温(℃)",
+              prop: "temperature",
+              width:80,
+              rules: [{
+                required: true,
+                message: "请输入体温",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "用户类型",
+              prop: "userType",
+              type: "select",
+              value: 4,
+              editDisplay: false,
+              addDisplay: false,
+              dicData:[
+                {
+                  label: "企业员工",
+                  value: 2
+                },
+                {
+                  label: "服务人员",
+                  value: 3
+                },
+                {
+                  label: "访客",
+                  value: 4
+                },
+                {
+                  label: "管理员",
+                  value: 5
+                }]
+            },
+            {
+              label: "所属园区",
+              prop: "agencyName",
+            },
+            {
+              label: "所属区域",
+              prop: "residentialName",
+            },
+            {
+              label: "设备编码",
+              prop: "deviceId",
+              hide:true,
+              rules: [{
+                required: true,
+                message: "请输入设备唯一标识",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "设备名称",
+              prop: "deviceName",
+            },
+            {
+              label: "设备mac码",
+              prop: "deviceMac",
+              hide:true,
+              rules: [{
+                required: true,
+                message: "请输入设备mac码",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "开门时间",
+              prop: "openTime",
+              rules: [{
+                required: true,
+                message: "请输入开门时间",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.accessrecord_add, false),
+          viewBtn: this.vaildData(this.permission.accessrecord_view, false),
+          delBtn: this.vaildData(this.permission.accessrecord_delete, false),
+          editBtn: this.vaildData(this.permission.accessrecord_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    created() {
+      const tenantType = localStorage.getItem("tenantType");
+      let agencyNameProp = this.findObject(this.option.column,"agencyName");
+      let residentialNameProp = this.findObject(this.option.column,"residentialName");
+      if (tenantType == 0){
+        //园区
+        agencyNameProp.label="所属园区";
+        residentialNameProp.label="所属区域";
+      }else if (tenantType == 1){
+        //园区
+        agencyNameProp.label = "所属园区";
+        this.option.column.splice(5,0,this.enterpriseColumn)
+        residentialNameProp.label="所属区域";
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        params.userType = 4;
+        this.loading = true;
+        getAccessCount().then(res=>{
+          console.log(res,"打印res")
+          this.AccessRecord.data[0].count = res.data.dayCount;
+          this.AccessRecord.data[1].count = res.data.weekCount;
+          this.AccessRecord.data[2].count = res.data.monthCount;
+          this.AccessRecord.data[3].count = res.data.yearCount;
+        });
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 459 - 0
src/views/guestmng/guestrecordmng.vue

@@ -0,0 +1,459 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.guestrecord_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="checkState" slot-scope="scope">
+        <el-tag v-if="scope.row.checkState===0" type="info">待审核</el-tag>
+        <el-tag v-if="scope.row.checkState===1" type="success">审核通过</el-tag>
+        <el-tag v-if="scope.row.checkState===2" type="danger">审核不通过</el-tag>
+      </template>
+      <template slot="registerSource" slot-scope="{row}">
+        <el-tag v-if="row.registerSource===1">小程序</el-tag>
+        <el-tag v-if="row.registerSource===2">管理后台</el-tag>
+        <el-tag v-if="row.registerSource===3">访客机</el-tag>
+      </template>
+      <template slot="menu" slot-scope="{row}">
+        <el-button size="mini" type="text" icon="el-icon-setting">
+          <el-dropdown>
+            <span class="el-dropdown-link">
+              更多<i class="el-icon-arrow-down el-icon--right"></i>
+            </span>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item style="color: limegreen" type="text" @click.native="pushFace(row)" icon="el-icon-sort-down">人脸下发</el-dropdown-item>
+              <el-dropdown-item style="color: red" type="text" @click.native="deleteFace(row)" icon="el-icon-sort-up">人脸禁用</el-dropdown-item>
+            </el-dropdown-menu>
+
+          </el-dropdown>
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove, pushGuestFace, deleteGuestFace} from "@/api/estate/guestrecord";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          menuWidth: 300,
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          addBtn:true,
+          delBtn:true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "预约开始时间",
+              prop: "beginTime",
+              type: "datetime",
+              width: 130,
+              format: "yyyy-MM-dd HH:mm:ss",
+              valueFormat: "yyyy-MM-dd HH:mm:ss"
+            },
+            {
+              label: "预约结束时间",
+              prop: "endTime",
+              type: "datetime",
+              width: 130,
+              format: "yyyy-MM-dd HH:mm:ss",
+              valueFormat: "yyyy-MM-dd HH:mm:ss"
+            },
+            {
+              label: "登记来源",
+              prop: "registerSource",
+              slot: true,
+              editDisplay: false,
+              addDisplay:false,
+            },
+            {
+              label: "访客姓名",
+              prop: "guestName",
+              search: true,
+              rules: [{
+                required: true,
+                message: "请输入访客名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "访客手机号",
+              prop: "guestTel",
+              labelWidth: 100,
+              rules: [{
+                required: true,
+                message: "请输入访客手机号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "证件号码",
+              prop: "guestIdcard",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入证件号码",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "拜访园区",
+              prop: "agencyId",
+              cascaderItem: ['enterpriseId'],
+              type: "select",
+              remote: true,
+              hide: true,
+              search: true,
+              viewDisplay: false,
+              dicUrl: "/api/cyzh-community/agency/list",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择拜访园区",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "拜访企业",
+              prop: "enterpriseId",
+              type: "select",
+              search: true,
+              hide: true,
+              viewDisplay: false,
+              dicUrl: "/api/cyzh-enterprise/enterprise/list?agencyId={{key}}",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              // dicFlag: false,
+              filterable: true,
+              props: {
+                label: "enterpriseName",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择拜访企业",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "拜访园区",
+              prop: "agencyName",
+              editDisplay: false,
+              addDisplay: false,
+            },
+            {
+              label: "拜访企业",
+              prop: "enterpriseName",
+              editDisplay: false,
+              addDisplay: false,
+            },
+            {
+              label: "审核状态",
+              prop: "checkState",
+              slot: true,
+              type:'select',
+              addDisplay: false,
+              dicData:[
+                {
+                  label:'待审核',
+                  value:0,
+                  color:'red'
+                },{
+                  label:'审核通过',
+                  value:1
+                },{
+                  label:'审核不通过',
+                  value:2
+                }
+              ]
+            },
+            {
+              label: "审核意见",
+              prop: "opinion",
+              hide: true,
+              editDisplay: false,
+              addDisplay: false
+            },
+            {
+              label: "访客事由",
+              prop: "guestReason",
+              type: 'textarea',
+              rules: [{
+                required: false,
+                message: "请输入访问缘由",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "访客人脸",
+              prop: "imageUri",
+              type: "upload",
+              width: 150,
+              listType: 'picture-img',
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              rules: [{
+                required: false,
+                message: "请上传访客人脸",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.guestrecord_add, false),
+          viewBtn: this.vaildData(this.permission.guestrecord_view, false),
+          delBtn: this.vaildData(this.permission.guestrecord_delete, false),
+          editBtn: this.vaildData(this.permission.guestrecord_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    created() {
+      const tenantType = localStorage.getItem("tenantType");
+      if (tenantType == 0){
+        let findObject1 = this.findObject(this.option.column, "agencyName");
+        let findObject2 = this.findObject(this.option.column, "residentialName");
+        let findObject3 = this.findObject(this.option.column, "buildingName");
+        let findObject4 = this.findObject(this.option.column, "unitName");
+        let findObject5 = this.findObject(this.option.column, "floorName");
+        let findObject6 = this.findObject(this.option.column, "roomName");
+        let findObject7 = this.findObject(this.option.column, "enterpriseName");
+        findObject1.label = "拜访园区";
+        findObject2.label = "拜访小区";
+        findObject3.hide = false;findObject3.viewDisplay = true;
+        findObject4.hide = false;findObject4.viewDisplay = true;
+        findObject5.hide = false;findObject5.viewDisplay = true;
+        findObject6.hide = false;findObject6.viewDisplay = true;
+        findObject7.hide = true;
+      }else if (tenantType == 1){
+        let findObject1 = this.findObject(this.option.column, "agencyName");
+        let findObject2 = this.findObject(this.option.column, "residentialName");
+        let findObject3 = this.findObject(this.option.column, "enterpriseName");
+        let findObject4 = this.findObject(this.option.column, "buildingName");
+        let findObject5 = this.findObject(this.option.column, "unitName");
+        let findObject6 = this.findObject(this.option.column, "floorName");
+        let findObject7 = this.findObject(this.option.column, "roomName");
+        findObject1.label = "拜访园区";
+        findObject2.label = "拜访区域";
+        findObject3.hide = false;
+        findObject4.hide = true;findObject4.viewDisplay = false;
+        findObject5.hide = true;findObject5.viewDisplay = false;
+        findObject6.hide = true;findObject6.viewDisplay = false;
+        findObject7.hide = true;findObject7.viewDisplay = false;
+      }
+    },
+    methods: {
+      pushFace(row){
+        //下发人脸到测温系统和设备
+        pushGuestFace(row).then(res => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        })
+      },
+      deleteFace(row){
+        this.$confirm("确定禁用人脸吗?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return deleteGuestFace(row);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      rowSave(row, done, loading) {
+        row.agencyName = row.$agencyId;
+        row.enterpriseName = row.$enterpriseId;
+        row.checkState = 1;
+        row.registerSource = 2;
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        row.agencyName = row.$agencyId;
+        row.enterpriseName = row.$enterpriseId;
+        row.registerSource = 2;
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 521 - 0
src/views/parkingmng/parkinglotmng.vue

@@ -0,0 +1,521 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.parkinglot_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="mapSelectForm" slot-scope="scope">
+        <div>
+          <!--          <input class="el-input&#45;&#45;small el-input__inner" placeholder="选择地址" @click="mapVisible = true">-->
+          <el-button @click="mapVisible = true"> 选择地址</el-button>
+          <el-dialog :append-to-body="true" :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="mapVisible"
+                     title="编辑地址" width="80%">
+            <editPolygonMap v-if="mapVisible" :editForm.sync="scope.row" :region.sync="scope.row.parkAdd" :latitude.sync="scope.row.parkLatitude" :longitude.sync="scope.row.parkLongitude" :visible.sync="mapVisible"></editPolygonMap>
+          </el-dialog>
+        </div>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/estate/parkinglot";
+  import {mapGetters} from "vuex";
+  import editPolygonMap from "@/components/residential/editPolygonMap";
+  import {validatePhone} from "../../util/validator";
+  import {getList as getAgencyList} from "@/api/community/agency";
+  import {getList as getResidentialList} from "@/api/community/residential";
+
+  export default {
+    components: {
+      editPolygonMap
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        mapVisible:false,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          labelWidth: 120,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "索引ID",
+              prop: "indexId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入索引ID",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "停车场名称",
+              prop: "parkName",
+              search: true,
+              searchLabelWidth: 100,
+              rules: [{
+                required: true,
+                message: "请输入停车场名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车场编号",
+              prop: "parkKey",
+              rules: [{
+                required: true,
+                message: "请输入车场唯一编号",
+                trigger: "blur"
+              }],
+              hide: true
+            },
+            {
+              label: "所属园区",
+              prop: "agencyId",
+              search: true,
+              searchFilterable: true,
+              filterable: true,
+              cascaderItem: ["residentialId"],
+              type: "select",
+              // remote: true,
+              dicUrl: "/api/cyzh-community/agency/list?size=500&name={{key}}",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请输入所属园区",
+                trigger: "change"
+              }],
+              hide: true,
+              viewDisplay: false,
+            },
+            {
+              label: "所属园区",
+              prop: "agencyName",
+              editDisplay: false,
+              addDisplay: false,
+            },
+            {
+              label: "所属区域",
+              prop: "residentialName",
+              editDisplay: false,
+              addDisplay: false
+            },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              type: "select",
+              dicUrl: "/api/cyzh-community/residential/list?size=500&agencyId={{key}}",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              // dicFlag: false,
+              filterable: true,
+              filter: true,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请输入所属区域",
+                trigger: "blur"
+              }],
+              hide: true,
+              viewDisplay: false
+            },
+            {
+              label:'',
+              prop:'mapSelect',
+              // row: true,
+              // span: 20,
+              formslot: true,
+              hide: true,
+            },
+            {
+              label: "车场纬度",
+              prop: "parkLatitude",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入车场纬度",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车场经度",
+              prop: "parkLongitude",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入车场经度",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车场地址",
+              prop: "parkAdd",
+              overHidden: true,
+              rules: [{
+                required: false,
+                message: "请输入车场地址",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车场联系方式",
+              prop: "parkTel",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入车场联系方式",
+                trigger: "blur"
+              },{
+                validator: validatePhone,
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车场联系人",
+              prop: "parkLinkman",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入车场联系人",
+                trigger: "blur"
+              }]
+            },
+            // {
+            //   label: "免费分钟数	",
+            //   prop: "parkFreeTime",
+            //   hide: true,
+            //   rules: [{
+            //     required: false,
+            //     message: "请输入免费分钟数	",
+            //     trigger: "blur"
+            //   }]
+            // },
+            // {
+            //   label: "免费超时分钟数	",
+            //   prop: "parkFreeTimeout",
+            //   hide: true,
+            //   rules: [{
+            //     required: false,
+            //     message: "请输入免费超时分钟数	",
+            //     trigger: "blur"
+            //   }]
+            // },
+            {
+              label: "车场收费说明	",
+              prop: "chargesDesc",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入车场收费说明	",
+                trigger: "blur"
+              }]
+            },
+            // {
+            //   label: "停车场是否启用预定功能",
+            //   prop: "reserveStatus",
+            //   hide: true,
+            //   rules: [{
+            //     required: false,
+            //     message: "请输入停车场是否启用预定功能",
+            //     trigger: "blur"
+            //   }]
+            // },
+            {
+              label: "创建时间	",
+              prop: "createTime",
+              type: 'date',
+              valueFormat: 'yyyy-MM-dd',
+              rules: [{
+                required: false,
+                message: "创建时间	",
+                trigger: "blur"
+              }],
+              disabled: true,
+              addDisplay: false,
+              editDisplay: false,
+            },
+            // {
+            //   label: "注册时间	",
+            //   prop: "regTime",
+            //   type: 'date',
+            //   valueFormat: 'yyyy-MM-dd',
+            //   rules: [{
+            //     required: false,
+            //     message: "请输入注册时间	",
+            //     trigger: "blur"
+            //   }]
+            // },
+            // {
+            //   label: "停车场有效期止日	",
+            //   prop: "validTime",
+            //   hide: true,
+            //   type: 'date',
+            //   valueFormat: 'yyyy-MM-dd',
+            //   rules: [{
+            //     required: false,
+            //     message: "请输入停车场有效期止日	",
+            //     trigger: "blur"
+            //   }]
+            // },
+            {
+              label: "车位总数",
+              prop: "spaceTotal",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入车位总数",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车牌地区简称	",
+              prop: "cityShortName",
+              hide: true,
+              display: false,
+              rules: [{
+                required: false,
+                message: "请输入车牌地区简称	",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "空余车位",
+              prop: "remainSpace",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入空余车位",
+                trigger: "blur"
+              }],
+              disabled: true,
+              editDisplay: false,
+              addDisplay: false,
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.parkinglot_add, false),
+          viewBtn: this.vaildData(this.permission.parkinglot_view, false),
+          delBtn: this.vaildData(this.permission.parkinglot_delete, false),
+          editBtn: this.vaildData(this.permission.parkinglot_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    created() {
+      const tenantType = localStorage.getItem("tenantType");
+      if (tenantType == 0){
+        let agencyIdProp = this.findObject(this.option.column,"agencyId");
+        let agencyNameProp = this.findObject(this.option.column,"agencyName");
+        let residentialIdProp = this.findObject(this.option.column,"residentialId");
+        let residentialNameProp = this.findObject(this.option.column,"residentialName");
+        agencyIdProp.label = "所属园区"
+        agencyIdProp.rules[0].message = "请选择所属园区"
+        agencyNameProp.label = "所属园区"
+        residentialIdProp.label = "所属区域"
+        residentialIdProp.rules[0].message = "请选择所属区域"
+        residentialNameProp.label = "所属区域"
+      }else if (tenantType == 1){
+        let agencyIdProp = this.findObject(this.option.column,"agencyId");
+        let agencyNameProp = this.findObject(this.option.column,"agencyName");
+        let residentialIdProp = this.findObject(this.option.column,"residentialId");
+        let residentialNameProp = this.findObject(this.option.column,"residentialName");
+        agencyIdProp.label = "所属园区"
+        agencyIdProp.rules[0].message = "请选择所属园区"
+        agencyNameProp.label = "所属园区"
+        residentialIdProp.label = "所属区域"
+        residentialIdProp.rules[0].message = "请选择所属区域"
+        residentialNameProp.label = "所属区域"
+      }
+    },
+    watch: {
+      "form.agencyId"() {
+        getAgencyList(1, 10, {id: this.form.agencyId}).then(res => {
+          this.form.agencyName = res.data.data.records[0].name;
+        })
+      },
+      "form.residentialId"() {
+        getResidentialList(1, 10, {id: this.form.residentialId}).then(res => {
+          this.form.residentialName = res.data.data.records[0].name;
+        })
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 373 - 0
src/views/parkingmng/parkingspace.vue

@@ -0,0 +1,373 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.parkingspace_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="residentialId" slot-scope="scope">{{scope.row.residentialName}}</template>
+      <template slot="residentialIdForm" slot-scope="scope">
+        <select-dialog-residential :disabled="residentialDisabled" :id="form.residentialId" :name="form.residentialName" :callback="selectCallback"></select-dialog-residential>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/estate/parkingspace";
+  import {mapGetters} from "vuex";
+  import SelectDialogResidential from "../../components/select-dialog/select-dialog-residential";
+
+  export default {
+    components: {SelectDialogResidential},
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        residentialDisabled: false,
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "车位编号",
+              prop: "number",
+              rules: [{
+                required: true,
+                message: "请输入车位编号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车位类型",
+              prop: "type",
+              type:'select',
+              dataType:'number',
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=parkinglot-type",
+              props: {
+                label: 'dictValue',
+                value: 'dictKey'
+              },
+              rules: [{
+                required: true,
+                message: "请输入车位类型(微型,小型,中型,大型)跟车辆类型对应",
+                trigger: "blur"
+              }]
+            },
+            // {
+            //   label: "占用车辆",
+            //   prop: "carId",
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入占用车辆",
+            //     trigger: "blur"
+            //   }]
+            // },
+            {
+              label: "是否收费",
+              prop: "isFree",
+              type:"select",
+              value: 1,
+              dicData:[
+                {
+                  label:'是',
+                  value:0
+                },{
+                  label:'否',
+                  value:1
+                }
+              ],
+              rules: [{
+                required: false,
+                message: "请输入是否收费",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否室内",
+              prop: "isIndoor",
+              type:"select",
+              value: 1,
+              dicData:[
+                {
+                  label:'是',
+                  value:0
+                },{
+                  label:'否',
+                  value:1
+                }
+              ],
+              rules: [{
+                required: false,
+                message: "请输入是否室内",
+                trigger: "blur"
+              }],
+            },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              type: "select",
+              slot:true,
+              formslot:true,
+              // dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}&&size=9999",
+              dicUrl: "/api/cyzh-community/residential/list?size=500",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              // dicFlag: false,
+              filterable: true,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: false,
+                message: "请选择所属区域",
+                trigger: "blur"
+              }]
+            },
+            // {
+            //   label: "机构路径",
+            //   prop: "orgPosition",
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入机构路径",
+            //     trigger: "blur"
+            //   }]
+            // },
+
+            {
+              label: "所属车场",
+              prop: "parkingLotId",
+              type: "select",
+              search: true,
+              // dicFlag: false,
+              // remote: true,
+              dicUrl: "/api/cyzh-estate/parkinglot/list",
+              props: {
+                label: 'parkName',
+                value: 'id'
+              },
+              filterable: true,
+              searchFilterable: true,
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+              rules: [{
+                require: true,
+                message: "请选择所属车场",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否占用",
+              prop: "isUsed",
+              type: "select",
+              value: 0,
+              dicData: [{
+                label: "已占用",
+                value: 1
+              },{
+                label: "未占用",
+                value: 0
+              }],
+              rules: [{
+                required: false,
+                message: "请输入是否占用: 1-已占用 0-未占用",
+                trigger: "blur"
+              }],
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.parkingspace_add, false),
+          viewBtn: this.vaildData(this.permission.parkingspace_view, false),
+          delBtn: this.vaildData(this.permission.parkingspace_delete, false),
+          editBtn: this.vaildData(this.permission.parkingspace_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    created() {
+      const tenantType = localStorage.getItem("tenantType");
+      if (tenantType == 0){
+        this.option.column[4].label = "所属区域"
+      }else if (tenantType == 1){
+        this.option.column[4].label = "所属区域"
+      }
+    },
+    methods: {
+      selectCallback(row){
+        this.form.residentialId = row.id;
+        this.form.residentialName = row.name;
+        if (this.option.column[5].prop == 'parkingLotId' && this.option.column[5].dicUrl.indexOf('residentialId') == -1){
+          this.option.column[5].dicUrl += '?residentialId=' + this.form.residentialId + '&size=100';
+
+        }
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        this.residentialDisabled = false;
+        if (["edit", "view"].includes(type)) {
+          this.residentialDisabled = type == "view";
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 407 - 0
src/views/parkingmng/parkingvehicleinrecord.vue

@@ -0,0 +1,407 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="enterpriseId" slot-scope="scope">
+        <div>{{scope.row.enterpriseName}}</div>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/estate/carenterrecord";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: false,
+          addBtn: false,
+          delBtn: false,
+          editBtn: false,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "	车场唯一编号",
+              prop: "parkKey",
+              hide:true,
+              display:false,
+              rules: [{
+                required: false,
+                message: "请输入	车场唯一编号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "入场图片	",
+              prop: "enterImgPath",
+              type:'upload',
+              listType: 'picture-img',
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              tip: '只能生产jpg/png图片,且不超过500kb',
+              rules: [{
+                required: false,
+                message: "请输入入场图片	",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车牌号码",
+              prop: "carNo",
+              rules: [{
+                required: false,
+                message: "请输入车牌号码",
+                trigger: "blur"
+              }]
+            },
+            // { //列表展示
+            //   label: "所属区域",
+            //   prop: "agencyName",
+            //   addDisplay: false,
+            //   editDisplay: false,
+            // },
+            {
+              label: "所属园区",
+              prop: "agencyId",
+              // slot: true,
+              search: true,
+              cascaderItem: ['residentialId'],
+              type: "select",
+              // remote: true,
+              // searchFilterable:true,
+              filterable: true,
+              dicUrl: "/api/cyzh-community/agency/list?size=500&name={{key}}",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属园区",
+                trigger: "blur"
+              }],
+              // hide: true,
+              // viewDisplay: false
+            },
+            // { //列表展示
+            //   label: "所属区域",
+            //   prop: "residentialName",
+            //   addDisplay: false,
+            //   editDisplay: false,
+            // },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              type: "select",
+              search: true,
+              dataType:'string',
+              dicUrl: "/api/cyzh-community/residential/select?agencyId={{key}}&size=100",
+              // dicFormatter:(res)=>{
+              //   return res.data.records;//返回字典的层级结构
+              // },
+              filterable: true,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属区域",
+                trigger: "blur"
+              }],
+              // hide: true,
+              viewDisplay: false
+            },
+            // { //列表展示
+            //   label: "所属企业",
+            //   prop: "enterpriseName",
+            //   addDisplay: false,
+            //   editDisplay: false,
+            // },
+            {
+              label: "所属企业",
+              prop: "enterpriseId",
+              type:'select',
+              slot:true,
+              dataType:'string',
+              dicUrl:'/api/cyzh-enterprise/enterprise/list?size=500',
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              props:{
+                label: "enterpriseName",
+                value: "id"
+              },
+              rules: [{
+                required: false,
+                message: "请输入企业",
+                trigger: "blur"
+              }],
+              // hide: true,
+              // viewDisplay: false
+            },
+            {
+              label: "车辆类型",
+              prop: "carTypeNo",
+              type:'select',
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=car-type-no",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+              rules: [{
+                required: true,
+                message: "请输入车辆类型",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车辆状态",
+              prop: "lockCar",
+              type:"select",
+              hide:true,
+              display: false,
+              dicData:[
+                {
+                  label:'未锁',
+                  value:0
+                },{
+                  label: '锁定',
+                  value:1
+                }
+              ],
+              rules: [{
+                required: false,
+                message: "请输入车辆状态(0-未锁 1-锁定)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "入场时间	",
+              prop: "enterTime",
+              type:'datetime',
+              valueFormat:'yyyy-MM-dd HH:mm:ss',
+              rules: [{
+                required: true,
+                message: "请输入入场时间	",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "入口车道名称	",
+              prop: "enterGateName",
+              labelWidth:120,
+              rules: [{
+                required: false,
+                message: "请输入入口车道名称	",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "入口操作员	",
+              prop: "enterOperatorName",
+              hide:true,
+              rules: [{
+                required: false,
+                message: "请输入入口操作员	",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.carenterrecord_add, false),
+          viewBtn: this.vaildData(this.permission.carenterrecord_view, false),
+          delBtn: this.vaildData(this.permission.carenterrecord_delete, false),
+          editBtn: this.vaildData(this.permission.carenterrecord_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    created() {
+      const tenantType = localStorage.getItem("tenantType");
+      let agencyIdObj = this.findObject(this.option.column, "agencyId");
+      let resdentialIdObj = this.findObject(this.option.column, "residentialId");
+      let enterpriseIdObj = this.findObject(this.option.column, "enterpriseId");
+      if (tenantType == 0){
+        agencyIdObj.label = "所属园区"
+        resdentialIdObj.label = "所属区域"
+        //根据账号显隐企业列
+        enterpriseIdObj.hide = true;
+        enterpriseIdObj.viewDisplay = false;
+      }else if (tenantType == 1){
+        console.log(this.option,"this.option1")
+        agencyIdObj.label = "所属园区"
+        resdentialIdObj.label = "所属区域"
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 575 - 0
src/views/parkingmng/parkingvehiclemng.vue

@@ -0,0 +1,575 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.car_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+        <cy-excel-import :flag="6" file-name="车辆信息导入模板" @success="onLoad(page)"></cy-excel-import>
+      </template>
+      <!--      <template slot="personId" slot-scope="scope">-->
+      <!--&lt;!&ndash;        <el-tag type="primary" @click="personClick(scope.row)">{{scope.row.$personId}}</el-tag>&ndash;&gt;-->
+      <!--        <el-tag type="primary">{{scope.row.$personId}}</el-tag>-->
+      <!--      </template>-->
+      <template slot="auditStatus" scope="{row}">
+        <el-tag v-if="row.auditStatus == 1" type="success">
+          审核通过
+        </el-tag>
+        <el-tag v-else-if="row.auditStatus == -1" type="info">
+          审核不通过
+        </el-tag>
+        <el-tag v-else type="danger">
+          待审核
+        </el-tag>
+      </template>
+    </avue-crud>
+    <el-dialog title="人员画像" :visible.sync="dialogOpen" :fullscreen="true" :modal-append-to-body="false" center>
+      <cy-person-file :personId="personId"></cy-person-file>
+    </el-dialog>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/estate/car";
+  // import CyPersonFile from "../../components/file/cy-person-file";
+  import {mapGetters} from "vuex";
+  import {validateLicense, validatePhone} from "../../util/validator";
+  import {getList as getAgencyList} from "@/api/community/agency";
+  import {getList as getResidentialList} from "@/api/community/residential";
+  // import CyExcelImport from "../../components/excel/cy-excel-import";
+
+  export default {
+    // components: {
+    //   CyExcelImport,
+    //   CyPersonFile
+    // },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        dialogOpen: false,
+        personId: '',
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "车牌号",
+              prop: "number",
+              width: 200,
+              rules: [{
+                required: true,
+                message: "请输入车牌号",
+              },{
+                validator: validateLicense,
+                trigger: "blur"
+              }]
+            }, {
+              label: "车辆类型",
+              prop: "type",
+              type: "select",
+              width: 150,
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=car-type",
+              props: {
+                label: "dictValue",
+                value: "dictKey",
+              },
+              dataType: "number",
+              rules: [{
+                required: true,
+                message: "请输入车辆类型",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "所属园区",
+              prop: "agencyName",
+              editDisplay: false,
+              addDisplay: false,
+            },
+            {
+              label: "所属园区",
+              prop: "agencyId",
+              search: true,
+              searchFilterable: true,
+              filterable: true,
+              cascaderItem: ['residentialId'],
+              type: "select",
+              // remote: true,
+              dicUrl: "/api/cyzh-community/agency/list?size=9999",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属园区",
+                trigger: "blur"
+              }],
+              hide: true,
+              viewDisplay: false,
+            },
+            {
+              label: "所属区域",
+              prop: "residentialName",
+              editDisplay: false,
+              addDisplay: false
+            },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              type: "select",
+              search: true,
+              // dataType:'string',
+              cascaderItem: ["parkingLotId"],
+              dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              // dicFlag: false,
+              filterable: true,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属区域",
+                trigger: "blur"
+              }],
+              hide: true,
+              viewDisplay: false,
+            },
+            {
+              label: "所属车场",
+              prop: "parkingLotId",
+              type: "select",
+              search: true,
+              // overHidden: true,
+              // remote: true,
+              dicUrl: "/api/cyzh-estate/parkinglot/list?size=500&residentialId={{key}}",
+              props: {
+                label: 'parkName',
+                value: 'id'
+              },
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+
+              rules: [{
+                require: true,
+                message: "请选择所属车场",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车主姓名",
+              prop: "personName",
+              search: true,
+              width: 150,
+              searchSpan: 4,
+              rules: [{
+                required: true,
+                message: "请输入车主姓名",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车主电话",
+              prop: "personPhone",
+              search: true,
+              width: 200,
+              searchSpan: 4,
+              rules: [{
+                required: false,
+                message: "请输入车主电话",
+              },{
+                validator: validatePhone,
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车辆性质",
+              prop: "properties",
+              hide:true,
+              type: "select",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=car_properties",
+              props: {
+                label: "dictValue",
+                value: "dictKey",
+              },
+              dataType: "number",
+              rules: [{
+                required: false,
+                message: "请选择车辆性质",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车辆型号",
+              prop: "model",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入车辆型号",
+                trigger: "blur"
+              }]
+            },
+            // {
+            //   label: "燃油类别",
+            //   prop: "fuelCategory",
+            //   hide: true,
+            //   type: "select",
+            //   dicUrl: "/api/blade-system/dict-biz/dictionary?code=fuel-category",
+            //   props: {
+            //     label: "dictValue",
+            //     value: "dictKey",
+            //   },
+            //   rules: [{
+            //     required: false,
+            //     message: "请输入燃油类别",
+            //     trigger: "blur"
+            //   }]
+            // },
+            {
+              label: "车身颜色",
+              prop: "color",
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入车身颜色",
+                trigger: "blur"
+              }]
+            },{
+              label: "占用车位",
+              prop: "parkinglot",
+              type: "select",
+              hide: true,
+              dicData:[
+                {
+                  label:'占用',
+                  value: 1
+                },{
+                  label:'空闲',
+                  value: 0
+                }
+              ],
+              rules: [{
+                required: false,
+                message: "请选择是否占用车位",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "审核状态",
+              prop: "auditStatus",
+              type: "select",
+              slot: true,
+              dicData:[
+                {
+                  label: "审核通过",
+                  value: 1
+                },
+                {
+                  label: "审核不通过",
+                  value: -1
+                },
+                {
+                  label: "待审核",
+                  value: 0
+                }
+              ],
+              rules: [{
+                required: true,
+                message: "请选择审核状态",
+                trigger: "blur"
+              }],
+              addDisplay: false
+            },
+            {
+              label: "车辆照片",
+              prop: "carImg",
+              listType: 'picture-img',
+              type: "upload",
+              hide: true,
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              //加水印
+              // canvasOption: {
+              //   text: 'bladex',
+              //   ratio: 0.1
+              // },
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              tip: "只能上传jpg/png图片,且不超过500kb",
+              rules: [{
+                required: false,
+                message: "请上传车辆照片",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "行驶证正面照",
+              prop: "vehicleDrivingLicense1",
+              listType: 'picture-img',
+              type: "upload",
+              labelWidth: 100,
+              hide: true,
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              //加水印
+              // canvasOption: {
+              //   text: 'bladex',
+              //   ratio: 0.1
+              // },
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              tip: "只能上传jpg/png图片,且不超过500kb",
+              rules: [{
+                required: false,
+                message: "请上传行驶证正面照",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "行驶证反面照",
+              prop: "vehicleDrivingLicense2",
+              listType: 'picture-img',
+              type: "upload",
+              labelWidth: 100,
+              hide: true,
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              //加水印
+              // canvasOption: {
+              //   text: 'bladex',
+              //   ratio: 0.1
+              // },
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              tip: "只能上传jpg/png图片,且不超过500kb",
+              rules: [{
+                required: false,
+                message: "请上传行驶证反面照",
+                trigger: "blur"
+              }],
+            }
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.car_add, false),
+          viewBtn: this.vaildData(this.permission.car_view, false),
+          delBtn: this.vaildData(this.permission.car_delete, false),
+          editBtn: this.vaildData(this.permission.car_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    watch: {
+      "form.agencyId"() {
+        getAgencyList(1, 10, {id: this.form.agencyId}).then(res => {
+          this.form.agencyName = res.data.data.records[0].name;
+        })
+      },
+      "form.residentialId"() {
+        getResidentialList(1, 10, {id: this.form.residentialId}).then(res => {
+          this.form.residentialName = res.data.data.records[0].name;
+          console.log(JSON.stringify(this.form))
+        })
+      },
+      "form.parkingLotId"() {
+          console.log(JSON.stringify(this.form))
+      }
+    },
+    mounted() {
+      let tenantType = localStorage.getItem("tenantType");
+      const agencyColumn = this.findObject(this.option.column, "agencyId");
+      const residentialColumn = this.findObject(this.option.column, "residentialId");
+      const agencyNameColumn = this.findObject(this.option.column, "agencyName");
+      const residentialNameColumn = this.findObject(this.option.column, "residentialName");
+      if (tenantType == 1) { //园区
+        agencyColumn.label = "所属园区";
+        residentialColumn.label = "所属区域";
+        agencyNameColumn.label = "所属园区";
+        residentialNameColumn.label = "所属区域";
+      } else { //园区
+        agencyColumn.label = "所属园区";
+        residentialColumn.label = "所属区域";
+        agencyNameColumn.label = "所属园区";
+        residentialNameColumn.label = "所属区域";
+      }
+    },
+    methods: {
+      personClick(row) {
+        this.personId = row.personId;
+        // this.dialogOpen = true;
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 417 - 0
src/views/parkingmng/parkingvehicleoutrecord.vue

@@ -0,0 +1,417 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+<!--      <template slot="menuLeft">-->
+<!--        <el-button type="danger"-->
+<!--                   size="small"-->
+<!--                   icon="el-icon-delete"-->
+<!--                   plain-->
+<!--                   v-if="permission.caroutrecord_delete"-->
+<!--                   @click="handleDelete">删 除-->
+<!--        </el-button>-->
+<!--      </template>-->
+      <template slot="lockCar" slot-scope="scope">
+        <el-tag v-if="scope.row.lockCar===0" type="danger">未锁</el-tag>
+        <el-tag v-if="scope.row.lockCar===1" type="success">锁定</el-tag>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/estate/caroutrecord";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          addBtn: false,
+          delBtn: false,
+          editBtn: false,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            // {
+            //   label: "索引ID",
+            //   prop: "indexId",
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入索引ID",
+            //     trigger: "blur"
+            //   }]
+            // },
+            {
+              label: "车场唯一编号",
+              prop: "parkKey",
+              hide:true,
+              rules: [{
+                required: false,
+                message: "请输入车场唯一编号",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车牌号码",
+              prop: "carNo",
+              rules: [{
+                required: true,
+                message: "请输入车牌号码",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车辆类型",
+              prop: "carTypeNo",
+              type:'select',
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=car-type-no",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+              rules: [{
+                required: true,
+                message: "请输入车辆类型",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "入场时间",
+              prop: "enterTime",
+              type:'datetime',
+              valueFormat:'yyyy-MM-dd HH:mm:ss',
+              rules: [{
+                required: false,
+                message: "请输入入场时间(V1.1版本返回字段)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "入口车道名称",
+              prop: "enterGateName",
+              rules: [{
+                required: false,
+                message: "请输入入口车道名称(V1.1版本返回字段)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "出场时间	",
+              prop: "outTime",
+              type:'datetime',
+              valueFormat:'yyyy-MM-dd HH:mm:ss',
+              rules: [{
+                required: true,
+                message: "请输入出场时间	",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "出口车道名称	",
+              prop: "outGateName",
+              rules: [{
+                required: false,
+                message: "请输入出口车道名称	",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "出口操作员	",
+              prop: "outOperatorName",
+              hide:true,
+              rules: [{
+                required: false,
+                message: "请输入出口操作员	",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "车辆状态",
+              prop: "lockCar",
+              type:'select',
+              slot: true,
+              hide:true,
+              display: false,
+              dicData:[
+                {
+                  label:'未锁',
+                  value:0
+                },{
+                  label:'锁定',
+                  value:1
+                }
+              ],
+              rules: [{
+                required: true,
+                message: "请输入车辆状态(0-未锁 1-锁定)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "出场图片	",
+              prop: "outImgPath",
+              type:'upload',
+              listType:'picture-img',
+              propsHttp:{
+                res:'data',
+                url:'link'
+              },
+              action:'/api/blade-resource/oss/endpoint/put-file',
+              tip:'只能生产jpg/png图片,且不超过500kb',
+              rules: [{
+                required: false,
+                message: "请输入出场图片	",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "所属园区",
+              prop: "agencyId",
+              // slot: true,
+              search: true,
+              cascaderItem: ['residentialId'],
+              type: "select",
+              // remote: true,
+              searchFilterable:true,
+              filterable: true,
+              dicUrl: "/api/cyzh-community/agency/list?size=1000&name={{key}}",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属园区",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "所属区域",
+              prop: "residentialId",
+              // slot: true,
+              type: "select",
+              search: true,
+              cascaderItem: ['buildingId'],
+              dicUrl: "/api/cyzh-community/residential/list?agencyId={{key}}",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              // dicFlag: false,
+              filterable: true,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属区域",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "企业",
+              prop: "enterpriseId",
+              hide:true,
+              type:'select',
+              dicData:'/api/cyzh-enterprise/enterprise/list',
+              rules: [{
+                required: false,
+                message: "请输入企业",
+                trigger: "blur"
+              }]
+            },
+            // {
+            //   label: "路径",
+            //   prop: "orgPosition",
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入路径",
+            //     trigger: "blur"
+            //   }]
+            // },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.caroutrecord_add, false),
+          viewBtn: this.vaildData(this.permission.caroutrecord_view, false),
+          delBtn: this.vaildData(this.permission.caroutrecord_delete, false),
+          editBtn: this.vaildData(this.permission.caroutrecord_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    created() {
+      const tenantType = localStorage.getItem("tenantType");
+      if (tenantType == 0){
+        this.option.column[13].label = "所属园区"
+        this.option.column[14].label = "所属区域"
+      }else if (tenantType == 1){
+        this.option.column[13].label = "所属园区"
+        this.option.column[14].label = "所属区域"
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 260 - 0
src/views/parkservice/parknotice.vue

@@ -0,0 +1,260 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.notice_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="menu" slot-scope="{row}">
+        <el-button type="text"
+                   size="mini"
+                   icon="el-icon-delete"
+                   plain
+                   @click="showPushRecord(row)">发布
+        </el-button>
+      </template>
+    </avue-crud>
+    <el-dialog title = "住户信息审核" :visible.sync="pushRecordVisible" :modal-append-to-body="false" >
+      <HouseuserCheck v-if="pushRecordVisible" ></HouseuserCheck>
+    </el-dialog>
+    <el-drawer :visible.sync="pushRecordVisible" size="85%" direction="rtl" :modal-append-to-body="false" destroy-on-close append-to-body center >
+      <noticepushrecord ref="noticepushrecord" :notice-id="noticeId" ></noticepushrecord>
+    </el-drawer>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/estate/notice";
+  import {mapGetters} from "vuex";
+  import noticepushrecord from "@/views/estate/noticepushrecord";
+
+  export default {
+    components: {
+      noticepushrecord
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        pushRecordVisible: false,
+        noticeId: null,
+        selectionList: [],
+        option: {
+          menuWidth: 300,
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "公告标题",
+              prop: "title",
+              rules: [{
+                required: true,
+                message: "请输入文章标题",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "公告内容",
+              prop: "notice",
+              component: 'AvueUeditor',
+              options: {
+                action: '/api/blade-resource/oss/endpoint/put-file',
+                props: {
+                  res: "data",
+                  url: "link",
+                }
+              },
+              hide: true,
+              minRows: 6,
+              span: 24,
+            },
+            {
+              label: "园区id",
+              prop: "agencyId",
+              display:false,
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请输入园区id",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.notice_add, false),
+          viewBtn: this.vaildData(this.permission.notice_view, false),
+          delBtn: this.vaildData(this.permission.notice_delete, false),
+          editBtn: this.vaildData(this.permission.notice_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      showPushRecord(row){
+        this.pushRecordVisible = true;
+        this.noticeId = row.id;
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 4 - 4
src/views/party/branch.vue

@@ -169,7 +169,7 @@
               type: "radio",
               dicData: [
                 {
-                  label: "区",
+                  label: "区",
                   value: 1
                 },
                 {
@@ -215,7 +215,7 @@
               },
               rules: [{
                 required: true,
-                message: "请选择所属区",
+                message: "请选择所属区",
                 trigger: "blur"
               }]
             },
@@ -259,11 +259,11 @@
         ];
         let resourceIds = this.findObject(this.option.column, "resourceIds");
         resourceIds.dicUrl = `/api/cyzh-community/agency/list?size=500&name={{key}}`
-      } else if (tenantType == 2) {//
+      } else if (tenantType == 2) {//
         this.resourceTypeDefault = 1;
         resouceTypeColumn.dicData = [
           {
-            label: "区",
+            label: "区",
             value: 1
           }, {
             label: "小区",

+ 4 - 4
src/views/party/branchrelation.vue

@@ -60,20 +60,20 @@
           dialogClickModal: false,
           column: [
             {
-              label: "资源类型: 1-区 2-小区  3-园区  4-企业",
+              label: "资源类型: 1-区 2-小区  3-园区  4-企业",
               prop: "resourceType",
               rules: [{
                 required: true,
-                message: "请输入资源类型: 1-区 2-小区  3-园区  4-企业",
+                message: "请输入资源类型: 1-区 2-小区  3-园区  4-企业",
                 trigger: "blur"
               }]
             },
             {
-              label: "资源id ,若resouce_type为1,则为区id;以此类推",
+              label: "资源id ,若resouce_type为1,则为区id;以此类推",
               prop: "resourceId",
               rules: [{
                 required: true,
-                message: "请输入资源id ,若resouce_type为1,则为区id;以此类推",
+                message: "请输入资源id ,若resouce_type为1,则为区id;以此类推",
                 trigger: "blur"
               }]
             },

+ 240 - 0
src/views/partymng/partyactivityapplicant.vue

@@ -0,0 +1,240 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <!--<template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.activityenroll_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>-->
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/party/activityenroll";
+  import {mapGetters} from "vuex";
+
+  export default {
+    props: {
+      activityId: {
+        type: String
+      }
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: false,
+          menu: true,
+          menuWidth: 100,
+          addBtn: false,
+          viewBtn: false,
+          editBtn: true,
+          delBtn: false,
+          selection: false,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "党员名称",
+              prop: "memberName",
+              disabled: true,
+            },
+            {
+              label: "报名状态",
+              prop: "enrollStatus",
+              type: "select",
+              dicData: [
+                {
+                  label: "成功",
+                  value: 1
+                },{
+                  label: "失败",
+                  value: 0
+                }
+              ],
+              // dataType: "number",
+              /*props: {
+                label: "dictValue",
+                value: "dictKey",
+              },*/
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.activityenroll_add, false),
+          viewBtn: this.vaildData(this.permission.activityenroll_view, false),
+          delBtn: this.vaildData(this.permission.activityenroll_delete, false),
+          editBtn: this.vaildData(this.permission.activityenroll_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        this.query.activityId = this.activityId;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+  #el-drawer__title span {
+    text-align: center;
+    font-size: 20px;
+    font-weight: bolder;
+  }
+</style>

+ 438 - 0
src/views/partymng/partybranch.vue

@@ -0,0 +1,438 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.branch_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+<!--      <template slot="menu" slot-scope="scope">-->
+<!--        <el-button type="text" size="small" icon="el-icon-setting">-->
+<!--          <el-dropdown @command="tip">-->
+<!--            <span class="el-dropdown-link">-->
+<!--              操作<i class="el-icon-arrow-down el-icon&#45;&#45;right"> </i>-->
+<!--            </span>-->
+<!--            <el-dropdown-menu slot="dropdown">-->
+<!--              <el-dropdown-item divided @click.native="detail(scope.row)" icon="el-icon-office-building">详情-->
+<!--              </el-dropdown-item>-->
+<!--              <el-dropdown-item divided @click.native="edit(scope.row)" icon="el-icon-school">编辑</el-dropdown-item>-->
+<!--              <el-dropdown-item divided @click.native="manage(scope.row)" icon="el-icon-s-order">管理</el-dropdown-item>-->
+<!--            </el-dropdown-menu>-->
+<!--          </el-dropdown>-->
+<!--        </el-button>-->
+<!--      </template>-->
+      <template slot="activities" slot-scope="{row}">
+        <el-button size="mini" @click="show(row,1)">查看党内活动</el-button>
+      </template>
+      <template slot="news" slot-scope="{row}">
+        <el-button size="mini" @click="show(row,2)">查看党内资讯</el-button>
+      </template>
+      <template slot="meetings" slot-scope="{row}">
+        <el-button size="mini" @click="show(row,3)">查看三会一课</el-button>
+      </template>
+    </avue-crud>
+
+    <el-drawer :visible.sync="showActivities" size="85%" direction="rtl" :modal-append-to-body="false" destroy-on-close append-to-body center >
+      <activity ref="activity" :branch-id="branchId" :branch-name="branchName"></activity>
+    </el-drawer>
+    <el-drawer :visible.sync="showNews" size="85%" direction="rtl" :modal-append-to-body="false" destroy-on-close append-to-body center >
+      <newslist ref="newslist" :branch-id="branchId" ></newslist>
+    </el-drawer>
+    <el-drawer :visible.sync="showMeetings" size="85%" direction="rtl" :modal-append-to-body="false" destroy-on-close append-to-body center >
+      <meetinglist ref="meetinglist" :branch-id="branchId"></meetinglist>
+    </el-drawer>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/party/branch";
+  import {mapGetters} from "vuex";
+  import activity from "@/views/party/activity";
+  import newslist from "@/views/party/news";
+  import meetinglist from "@/views/party/meeting";
+
+  export default {
+    components: {
+      activity,
+      newslist,
+      meetinglist
+    },
+    data() {
+      return {
+        branchId: '',
+        branchName: '',
+        showActivities: false,
+        showNews: false,
+        showMeetings: false,
+        form: {
+          resourceType: '1'
+        },
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          dialogWidth: 600,
+          height: 'auto',
+          align: "center",
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "党支部名称",
+              prop: "branchName",
+              labelWidth: 100,
+              span: 24,
+              row: true,
+              search: true,
+              searchLabelWidth: 100,
+              rules: [{
+                required: true,
+                message: "请输入党支部名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "党内活动",
+              prop: "activities",
+              slot: true,
+              labelWidth: 100,
+              display: false
+            },
+            {
+              label: "党内资讯",
+              prop: "news",
+              slot: true,
+              labelWidth: 100,
+              display: false
+
+            },
+            {
+              label: "三会一课",
+              prop: "meetings",
+              slot: true,
+              labelWidth: 100,
+              display: false
+
+            },
+
+            {
+              label: "党支部介绍",
+              prop: "branchIntroduce",
+              type: "textarea",
+              labelWidth: 100,
+              row: true,
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入党支部介绍",
+                trigger: "blur"
+              }]
+            },
+
+            {
+              label: "关联类型",
+              prop: "resourceType",
+              hide: true,
+              type: "radio",
+              dicData: [
+                {
+                  label: "园区",
+                  value: 1
+                },
+                {
+                  label: "小区",
+                  value: 2
+                }
+              ],
+              span: 24,
+              row: true,
+              rules: [{
+                required: true,
+                message: "请输入负责人类型方式",
+                trigger: "blur"
+              }]
+            },
+            {
+              label:"关联对象",
+              prop:"resourceNames",
+              type: "textarea",
+              addDisplay:false,
+              editDisplay:false,
+              // row: true,
+              span: 24
+            },
+
+            {
+              label: "关联对象",
+              prop: "resourceIds",
+              type: "select",
+              multiple: true,
+              hide:true,
+              viewDisplay:false,
+              remote: true,
+              span: 24,
+              dicUrl: "/api/cyzh-community/agency/list?size=100",
+              dicFormatter:(res)=>{
+                return res.data.records;//返回字典的层级结构
+              },
+              filterable: true,
+              props: {
+                label: "name",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属区域",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.branch_add, false),
+          viewBtn: this.vaildData(this.permission.branch_view, false),
+          delBtn: this.vaildData(this.permission.branch_delete, false),
+          editBtn: this.vaildData(this.permission.branch_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    mounted() {
+      let tenantType = localStorage.getItem("tenantType");
+      let resouceTypeColumn = this.findObject(this.option.column, "resourceType");
+
+      if (tenantType == 1) {//园区
+        this.resourceTypeDefault = 3;
+        resouceTypeColumn.dicData = [
+          {
+            label: "园区",
+            value: 3
+          }, {
+            label: "企业",
+            value: 4
+          }
+        ];
+        let resourceIds = this.findObject(this.option.column, "resourceIds");
+        resourceIds.dicUrl = `/api/cyzh-community/agency/list?size=500&name={{key}}`
+      } else if (tenantType == 2) {//园区
+        this.resourceTypeDefault = 1;
+        resouceTypeColumn.dicData = [
+          {
+            label: "园区",
+            value: 1
+          }, {
+            label: "小区",
+            value: 2
+          }
+        ];
+      }
+    },
+    watch: {
+      'form.resourceType': {
+        handler(val) {
+          let resourceIds = this.findObject(this.option.column, "resourceIds");
+          this.form.resourceIds = null
+          resourceIds.props.label="name"
+          if (val == 1) {
+            resourceIds.dicUrl = `/api/cyzh-community/agency/list?size=100&name={{key}}`
+          } else if (val==2){
+            resourceIds.dicUrl = "/api/cyzh-community/residential/list?size=100&name={{key}}";
+          }else if(val==3){
+            resourceIds.dicUrl = `/api/cyzh-community/agency/list?size=100&name={{key}}`
+          }else{
+            resourceIds.dicUrl = "/api/cyzh-enterprise/enterprise/list?size=100&enterpriseName={{key}}";
+            resourceIds.props.label="enterpriseName"
+          }
+        }
+      }
+    },
+    methods: {
+      show(row, type) {
+        debugger
+        this.branchId = row.id;
+        this.branchName = row.branchName;
+        this.showParty = true;
+        switch (type) {
+          case 1:
+            this.showActivities = true;
+            break;
+          case 2:
+            this.showNews = true;
+            break;
+          case 3:
+            this.showMeetings = true;
+            break;
+          default:
+            break;
+        }
+      },
+      rowSave(row, done, loading) {
+        row.resourceIds = row.resourceIds.toString()
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        row.resourceIds = row.resourceIds.toString();
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (type == 'add'){
+          let tenantType = localStorage.getItem("tenantType");
+          if (tenantType == 1){
+            this.form.resourceType = 3;
+          }else{
+            this.form.resourceType = 1;
+          }
+        }
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage) {
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 280 - 0
src/views/partymng/partycomment.vue

@@ -0,0 +1,280 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="isShow" slot-scope="{row}">
+        <el-switch v-model="row.isShow"
+                   :active-value=1 active-text="显示"
+                   :inactive-value=0 inactive-text="不显示"
+                   @change="statusChange(row)">
+        </el-switch>
+      </template>
+      <!--<template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.meetingcomment_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>-->
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/party/comment";
+  import {mapGetters} from "vuex";
+
+  export default {
+    props: {
+      relationId:{
+        type: String
+      },
+      relationType:{
+        type: String
+      }
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        parentId: 0,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: false,
+          menu: false,
+          viewBtn: false,
+          addBtn: false,
+          delBtn: false,
+          editBtn: false,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "评论内容",
+              prop: "content",
+              rules: [{
+                required: true,
+                message: "请输入评论内容",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "党员(回复人)名称",
+              prop: "senderName",
+              width: 150
+            },
+            {
+              label: "党员(被回复人)名称",
+              prop: "accepterName",
+              width: 150
+            },
+            {
+              label: "前台是否显示",
+              prop: "isShow",
+              width: 200,
+              type: "switch",
+              slot: true,
+              dicData: [
+                {
+                  label: "显示",
+                  value: 1
+                },{
+                  label: "不显示",
+                  value: 0
+                }
+              ]
+            },
+            {
+              label: "评论时间",
+              prop: "createTime",
+              width: 200
+            }
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.comment_add, false),
+          viewBtn: this.vaildData(this.permission.comment_view, false),
+          delBtn: this.vaildData(this.permission.comment_delete, false),
+          editBtn: this.vaildData(this.permission.comment_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    mounted() {
+      this.onLoad(this.page)
+    },
+    methods: {
+      init(){
+        this.onLoad(this.page)
+      },
+      statusChange(row) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        }, error => {
+          console.log(error);
+        });
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        this.query.relationId = this.relationId;
+        this.query.relationType = this.relationType;
+        this.query.pid = 0;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 407 - 0
src/views/partymng/partymeeting.vue

@@ -0,0 +1,407 @@
+<template>
+  <basic-container>
+    <el-dialog :visible.sync="commentVisible" width="80%" :modal-append-to-body="false" append-to-body center>
+      <comment ref="comment" :relationId="meetingId" relationType="2"></comment>
+    </el-dialog>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.meetinglist_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="menu" slot-scope="{row}">
+        <el-button type="text" size="mini" icon="el-icon-s-comment" @click="showComment(row)">评论</el-button>
+      </template>
+      <template slot="content" slot-scope="{row}">
+        <el-button size="mini" @click="showContent(row)">查看会议内容</el-button>
+      </template>
+<!--      <template slot="meetingStatus" slot-scope="{row}">-->
+<!--        <el-switch v-model="row.meetingStatus"-->
+<!--                   :active-value=1 active-text="开启"-->
+<!--                   :inactive-value=0 inactive-text="关闭"-->
+<!--                   @change="statusChange(row)">-->
+<!--        </el-switch>-->
+<!--      </template>-->
+      <template slot="meetingStatus" slot-scope="scope">
+        <el-tag v-if="scope.row.meetingStatus===0" type="info">待开始</el-tag>
+        <el-tag v-if="scope.row.meetingStatus===1" type="success">已开始</el-tag>
+        <el-tag v-if="scope.row.meetingStatus===2" type="danger">已结束</el-tag>
+      </template>
+    </avue-crud>
+<!--    <el-dialog :visible.sync="show" width="30%" :modal-append-to-body="false" append-to-body center>-->
+<!--      <avue-ueditor v-model="form.content" :upload="upload" disabled></avue-ueditor>-->
+<!--    </el-dialog>-->
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/party/meeting";
+  import {mapGetters} from "vuex";
+  // import AvueUeditor from "avue-plugin-ueditor";
+  import comment from "@/views/party/comment.vue"
+
+  export default {
+    components: {
+      comment
+    },
+    props: {
+      branchId: {
+        type: String
+      }
+    },
+    data() {
+      return {
+        upload: {
+          action: '/api/blade-resource/oss/endpoint/put-file',
+          props: {
+            res: "data",
+            url: "link",
+          }
+        },
+        commentVisible: false,
+        meetingId: 0,
+        show: false,
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height: 'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: false,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "会议名称",
+              prop: "name",
+              row: true,
+              search: true,
+              rules: [{
+                required: true,
+                message: "请输入会议名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "会议图片",
+              prop: "img",
+              type: 'upload',
+              hide: true,
+              row: true,
+              listType: 'picture-img',
+              action: '/api/blade-resource/oss/endpoint/put-file',
+              propsHttp: {
+                res: 'data',
+                url: 'link',
+              },
+              display: true
+            },
+            // {
+            //   label: "会议内容",
+            //   prop: "content",
+            //   // component: 'ueditor',
+            //   component: 'AvueUeditor',
+            //   options: {
+            //     action: '/api/blade-resource/oss/endpoint/put-file',
+            //     props: {
+            //       res: "data",
+            //       url: "link",
+            //     }
+            //   },
+            //   minRows: 6,
+            //   width: 150,
+            //   span: 18,
+            //   row: true,
+            //   slot: true,
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入会议内容",
+            //     trigger: "blur"
+            //   }]
+            // },
+            {
+              label: "热门状态",
+              prop: "hitStatus",
+              type: "radio",
+              width: 100,
+              row: true,
+              search: true,
+              dicUrl: "/api/blade-system/dict/dictionary?code=yes_no",
+              dataType: "number",
+              props: {
+                label: "dictValue",
+                value: "dictKey",
+              },
+              rules: [{
+                required: true,
+                message: "请输入热门状态",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "通知状态",
+              prop: "notificationStatus",
+              type: "radio",
+              width: 100,
+              row: true,
+              search: true,
+              dicUrl: "/api/blade-system/dict/dictionary?code=yes_no",
+              dataType: "number",
+              props: {
+                label: "dictValue",
+                value: "dictKey",
+              },
+              rules: [{
+                required: true,
+                message: "请输入通知状态",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "会议分类",
+              prop: "classId",
+              type: "select",
+              row: true,
+              search: true,
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=party_meeting_class",
+              dataType: "number",
+              props: {
+                label: "dictValue",
+                value: "dictKey",
+              },
+              rules: [{
+                required: true,
+                message: "请输入会议分类",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "会议状态",
+              prop: "meetingStatus",
+              type: "select",
+              width: 200,
+              row: true,
+              search: true,
+              slot: true,
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=on_off",
+              dataType: "number",
+              value: 0,
+              props: {
+                label: "dictValue",
+                value: "dictKey",
+              },
+              rules: [{
+                required: true,
+                message: "请输入会议状态",
+                trigger: "blur"
+              }]
+            },
+            // {
+            //   label: "排序",
+            //   prop: "sort",
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入排序",
+            //     trigger: "blur"
+            //   }]
+            // }
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.meeting_add, false),
+          viewBtn: this.vaildData(this.permission.meeting_view, false),
+          delBtn: this.vaildData(this.permission.meeting_delete, false),
+          editBtn: this.vaildData(this.permission.meeting_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      showComment(row){
+        this.meetingId = row.id;
+        this.commentVisible = true;
+        this.$nextTick(()=>{
+          this.$refs.comment.init()
+        })
+      },
+      init(){
+        this.onLoad(this.page)
+      },
+      statusChange(row) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        }, error => {
+          console.log(error);
+        });
+      },
+      showContent(row) {
+        this.form = row;
+        this.show = true;
+      },
+      rowSave(row, done, loading) {
+        row.branchId = this.branchId;
+        row.content = btoa(unescape(encodeURIComponent(row.content)));
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        row.content = btoa(unescape(encodeURIComponent(row.content)));
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage) {
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        this.query.branchId = this.branchId
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 414 - 0
src/views/partymng/partymember.vue

@@ -0,0 +1,414 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.member_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot="auditStatus" scope="{row}">
+        <el-tag v-if="row.auditStatus == 1" type="success">
+          审核通过
+        </el-tag>
+        <el-tag v-else-if="row.auditStatus == -1" type="info">
+          审核不通过
+        </el-tag>
+        <el-tag v-else type="danger">
+          待审核
+        </el-tag>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove, audit} from "@/api/party/member";
+  import {mapGetters} from "vuex";
+  import {validatePhone} from "../../util/validator";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          menuWidth: 300,
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "姓名",
+              prop: "name",
+              rules: [{
+                required: true,
+                message: "请输入姓名",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "性别",
+              prop: "sex",
+              type: "select",
+              dataType: "number",
+              dicUrl: "/api/blade-system/dict/dictionary?code=sex",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+              rules: [{
+                required: true,
+                message: "请选择性别",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "联系方式",
+              prop: "phone",
+              rules: [{
+                required: true,
+                message: "请输入联系方式",
+                trigger: "blur",
+                validator: validatePhone
+              }]
+            },
+            {
+              label: "住址",
+              prop: "address",
+              rules: [{
+                required: true,
+                message: "请输入住址",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "身份证",
+              prop: "idCard",
+              hide: true,
+              rules: [{
+                required: true,
+                message: "请输入身份证",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "所属支部",
+              prop: "branchId",
+              hide: true,
+              search: true,
+              type: "select",
+              dicUrl: "/api/cyzh-smart-party/branch/list?current=1&size=99999",
+              dicFormatter: (res)=>{
+                return res.data.records;
+              },
+              props: {
+                label: "branchName",
+                value: "id"
+              },
+              rules: [{
+                required: true,
+                message: "请选择所属支部",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "党员状态",
+              prop: "memberStatus",
+              dataType: "number",
+              search: true,
+              type: "select",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=party_member_status",
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+              rules: [{
+                required: true,
+                message: "请选择党员状态",
+                trigger: "blur"
+              }],
+            },
+            {
+              label: "入党时间",
+              prop: "enterTime",
+              type: "date",
+              valueFormat: "yyyy-MM-dd",
+              format: "yyyy-MM-dd",
+              rules: [{
+                required: true,
+                message: "请输入入党时间",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "优秀党员",
+              prop: "isExcellent",
+              type: "radio",
+              value: 0,
+              hide: true,
+              dicData: [
+                {
+                  label: "是",
+                  value:1
+                },
+                {
+                  label: "否",
+                  value: 0
+                }
+              ],
+              rules: [{
+                required: false,
+                message: "请选择是否为优秀党员",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "党员证件",
+              prop: "memberPic",
+              type: "upload",
+              hide: true,
+              listType: "picture-img",
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              propsHttp: {
+                url: "link",
+                res: "data"
+              },
+              type: "upload",
+              rules: [{
+                required: true,
+                message: "请上传党员证件图像",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "审核状态",
+              prop: "auditStatus",
+              type: "select",
+              slot: true,
+              dicData:[
+                {
+                  label: "审核通过",
+                  value: 1
+                },
+                {
+                  label: "审核不通过",
+                  value: -1
+                },
+                {
+                  label: "待审核",
+                  value: 0
+                },
+              ],
+              rules: [{
+                required: true,
+                message: "请选择审核状态",
+                trigger: "blur"
+              }],
+              addDisplay: false
+            },
+            {
+              label: "审核意见",
+              prop: "auditOpinion",
+              hide: true,
+              type: "textarea",
+              rules: [{
+                required: false,
+                message: "请输入审核意见",
+                trigger: "blur"
+              }],
+              addDisplay: false
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.member_add, false),
+          viewBtn: this.vaildData(this.permission.member_view, false),
+          delBtn: this.vaildData(this.permission.member_delete, false),
+          editBtn: this.vaildData(this.permission.member_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    watch:{
+      "form.auditStatus"(value){
+        let auditOpinionProp = this.findObject(this.option.column, "auditOpinion");
+        if(value == -1){
+          auditOpinionProp.rules[0].required = true;
+        }else{
+          auditOpinionProp.rules[0].required = false;
+        }
+      }
+    },
+    methods: {
+      handleAudit(row){
+        audit(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "审核成功!"
+          });
+        });
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+            this.form.residentialIds = this.form.residntialIds.spilt(",");
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor