Browse Source

对接问题

Shannon_mu 3 years ago
parent
commit
b0113c6e08

+ 0 - 99
accessControlSystem/src/assets/css/main.scss

@@ -568,105 +568,6 @@ a {
         color: #ffffff;
     }
 }
-// 弹出框
-.alert {
-    background-color: rgba(0, 0, 0, 0.6);
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-    z-index: 1999;
-    color: #3e3e3e;
-}
-.message-box {
-    width: 400px;
-    background: rgba(255, 255, 255, 1);
-    border-radius: 6px;
-    position: absolute;
-    top: 50%;
-    left: 50%;
-    transform: translate(-50%, -50%);
-    padding: 20px 20px 20px 34px;
-    font-size: 16px;
-    animation: alertdown 0.2s forwards;
-    .row-1 {
-        color: #424656;
-        margin-bottom: 10px;
-        padding-left: 24px;
-        font-size: 14px;
-        display: flex;
-        align-items: center;
-        word-break: break-all;
-        position: relative;
-        .dmp-icon-btn {
-            color: #ff7171;
-            font-size: 14px;
-            width: 14px;
-            height: 14px;
-            background-size: 14px;
-            margin-right: 10px;
-            position: absolute;
-            left: 0;
-            top: 17px;
-        }
-        .dmp-icon-btn.icon-error {
-            background-image: url("../img/icon_error.png");
-        }
-        .dmp-icon-btn.icon-warning {
-            background-image: url("../img/icon-warning.png");
-        }
-        .dmp-icon-btn.icon-success {
-            background-image: url("/static/imgs/icon-success.png");
-        }
-        .title {
-            width: 273px;
-            line-height: 18px;
-            margin-top: 15px;
-        }
-        .close {
-            position: absolute;
-            top: 0;
-            right: 0;
-            display: inline-block;
-            height: 10px;
-            width: 10px;
-            cursor: pointer;
-            background: url("../../assets/img/icon-close-off.png") no-repeat center;
-            background-size: 10px 10px;
-            &:hover {
-                background-image: url("../../assets/img/icon-close-on.png");
-            }
-        }
-    }
-    .row-2 {
-        margin-left: 25px;
-        font-size: 12px;
-        color: #ff7171;
-        margin-bottom: 30px;
-        word-break: break-all;
-        width: 273px;
-        &.warning {
-            color: #f7b500;
-        }
-        &.success {
-            color: #424656;
-        }
-    }
-    .row-3 {
-        display: flex;
-        justify-content: flex-end;
-        .el-button {
-            font-size: 12px !important;
-            height: 32px;
-            min-width: 60px;
-            margin-left: 15px;
-        }
-    }
-    &.up {
-        animation: alertup 0.2s forwards;
-    }
-}
 //通用表格样式
 .el-pagination.is-background .btn-next,
 .el-pagination.is-background .btn-prev,

+ 13 - 9
accessControlSystem/src/assets/css/public-style.scss

@@ -1,5 +1,5 @@
 /*主色调*/
-$mainTextColor: #32bbff;
+$mainTextColor: #0eaeff;
 $defaultColor: #424656;
 $white: white;
 $greenColor: #44d7b6;
@@ -25,23 +25,27 @@ $base_fontSize: 100;
 .ashText {
   color: $ashColor !important;
 }
+.mainText{
+  color: $mainTextColor !important;
+}
 .height100 {
   min-height: inherit;
   height: 100%;
 }
 
 .formContent-item_title {
-  font-size: 14px;
+  font-size: rem(14);
   position: relative;
-  margin-left: 14px;
-  margin-bottom: 20px;
+  margin-left: rem(14);
+  margin-bottom: rem(20);
+  font-weight: 600;
   &::before {
     position: absolute;
-    left: -14px;
-    top: 4px;
-    width: 4px;
-    height: 12px;
-    border-radius: 2px;
+    left: rem(-14);
+    top: rem(4);
+    width: rem(4);
+    height: rem(12);
+    border-radius: rem(2);
     display: block;
     background: $mainTextColor;
     content: " ";

+ 6 - 23
accessControlSystem/src/components/common/Sidebar.vue

@@ -15,7 +15,7 @@
                 :collapse="collapse"
                 background-color="#171F32"
                 text-color="#aaadba"
-                active-text-color="#2887f2"
+                active-text-color="#0EAEFF"
                 unique-opened
                 collapse-transition
                 router
@@ -212,17 +212,17 @@ export default {
 .sidebar-el-menu > div > .el-submenu.is-opened.is-active > .el-submenu__title {
     background: #2c354a !important;
     border-radius: rem(32) 0px 0px rem(32);
-    color: rgb(39, 135, 241) !important;
-    border-right: 2px solid #2787f1;
+    color: $mainTextColor !important;
+    border-right: 2px solid $mainTextColor;
     .el-submenu__icon-arrow::before {
-        color: rgb(39, 135, 241);
+        color: $mainTextColor;
     }
 }
 .el-menu-item.is-active {
-    color: rgb(39, 135, 241);
+    color: $mainTextColor;
 }
 .el-submenu.is-active > div > span {
-    color: rgb(39, 135, 241);
+    color: $mainTextColor;
 }
 
 .sidebar .logo.shrink {
@@ -243,23 +243,6 @@ export default {
     }
 }
 
-// .sidebar .logo.shrink {
-//     display: flex;
-//     justify-content: center;
-//     color: #2787f1;
-//     border-bottom: 2px solid #2a335c;
-//     margin-bottom: rem(20);
-//     align-items: flex-start;
-//     .text {
-//         width: rem(48);
-//         height: rem(48);
-//         background: rgba(255, 255, 255, 0.1);
-//         border-radius: rem(4);
-//         border: 1px solid rgba(255, 255, 255, 0.4);
-//         text-align: center;
-//     }
-// }
-
 .el-menu--collapse > .is-active {
     color: #2787f1;
 

+ 13 - 14
accessControlSystem/src/components/common/alertModal.vue

@@ -29,12 +29,9 @@
                 {{ modal.star }}
                 <span v-if="modal.hideStar"></span>
                 <span v-else-if="modal.title && !modal.notip"> (<span class="color-danger">*为必填项</span>) </span>
-                <!-- <i class="close" @click="close"></i> -->
             </div>
         </div>
-        <!-- :style="`height:${modal.showFooter ? 'calc(100% - 50px)' : 'calc(100% - 54px)'}`" -->
-        <!-- <div class="body_content"> -->
-        <div class="content" v-scroll>
+        <div class="content">
             <component :id="modal.id" :is="modal.component" :params="modal.props" :ref="modal.id" @close="close"></component>
         </div>
         <!-- </div> -->
@@ -121,18 +118,19 @@ export default {
 .alert-modal {
     overflow: hidden;
     /deep/.el-dialog {
+        color: #424656;
         .el-dialog__header {
-            height: 54px;
+            height: rem(50);
             border-radius: 6px 6px 0 0;
             background: rgba(248, 252, 255, 1);
-            padding: 0 25px;
+            padding: 0 rem(25);
             display: flex;
             align-items: center;
             justify-content: space-between;
-            font-size: 16px;
+            font-size: rem(14);
         }
         .el-dialog__body {
-            padding: 20px;
+            padding: rem(20) rem(25);
             overflow: auto;
             .content {
                 height: 100%;
@@ -151,8 +149,9 @@ export default {
         .el-dialog__footer {
             border-top: none;
             position: relative;
-            bottom: 10px;
-            margin-top: 10px;
+            bottom: rem(10);
+            margin-top: rem(10);
+            padding: rem(10) rem(20) rem(20);
             .dialog-footer .reset {
                 border: 1px solid #0eaeff;
                 color: #0eaeff;
@@ -169,7 +168,7 @@ export default {
                 position: absolute;
                 left: 0;
                 bottom: 0;
-                top: 54px;
+                top: rem(54);
                 right: 0;
                 display: flex;
                 justify-content: center;
@@ -179,10 +178,10 @@ export default {
 }
 .is-modal {
     .el-dialog {
-        border-radius: 8px;
+        border-radius: rem(8);
         width: auto;
         max-height: 80%;
-        min-height: 210px;
+        min-height: rem(210);
         position: absolute;
         top: 50%;
         left: 50%;
@@ -203,7 +202,7 @@ export default {
     background: transparent;
 }
 .newpop .el-dialog .el-dialog__header {
-    height: 50px;
+    height: rem(50);
     background: rgba(13, 21, 41, 0.3);
 }
 .newpop .el-dialog .el-dialog__body {

+ 151 - 0
accessControlSystem/src/components/msgBox/index.vue

@@ -0,0 +1,151 @@
+<template>
+    <div class="alert" v-if="showMsg" style="z-index: 9999">
+        <div class="message-box" :class="{ up: close }" :style="{ width: config.width }">
+            <div class="row-1">
+                <i :class="`dmp-icon-btn icon-${type}`"></i>
+                <span class="title">{{ msg }}</span>
+                <i class="close" @click="cancel" v-if="config.showClose"></i>
+            </div>
+            <div :class="`row-2 ${type}`">{{ tipMsg }}</div>
+            <div class="row-3">
+                <el-button @click="cancel" v-if="config.showCancelButton">取消</el-button>
+                <el-button type="primary" @click="confirm">{{ config.confirmButtonText }}</el-button>
+            </div>
+        </div>
+    </div>
+</template>
+<script >
+export default {
+    props: ['params'],
+    data() {
+        return {
+            showMsg: true,
+            close: false,
+            config: {},
+            type: 'error',
+            msg: '',
+            tipMsg: ''
+        };
+    },
+    methods: {
+        cancel() {
+            this.close = true;
+            setTimeout(() => {
+                this.showMsg = false;
+            }, 300);
+            this.config.reject();
+        },
+        confirm() {
+            this.close = true;
+            setTimeout(() => {
+                this.showMsg = false;
+            }, 300);
+
+            this.config.resolve();
+        }
+    }
+};
+</script>
+<style lang="scss" scoped>
+@import '@assets/css/public-style.scss';
+
+// 弹出框
+.alert {
+    background-color: rgba(0, 0, 0, 0.6);
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    z-index: 1999;
+    color: #3e3e3e;
+}
+.message-box {
+    width: 400px;
+    background: rgba(255, 255, 255, 1);
+    border-radius: 6px;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    padding: 20px 20px 20px 34px;
+    font-size: 16px;
+    animation: alertdown 0.2s forwards;
+    .row-1 {
+        color: #424656;
+        margin-bottom: 10px;
+        padding-left: 24px;
+        font-size: 14px;
+        display: flex;
+        align-items: center;
+        word-break: break-all;
+        position: relative;
+        .dmp-icon-btn {
+            color: #ff7171;
+            font-size: 14px;
+            width: 14px;
+            height: 14px;
+            background-size: 14px;
+            margin-right: 10px;
+            position: absolute;
+            left: 0;
+            top: 17px;
+        }
+        .dmp-icon-btn.icon-error {
+            background-image: url("~@/assets/img/icon_error.png");
+        }
+        .dmp-icon-btn.icon-warning {
+            background-image: url("~@/assets/img/icon-warning.png");
+        }
+        .dmp-icon-btn.icon-success {
+            // background-image: url("~@/assets/static/imgs/icon-success.png");
+        }
+        .title {
+            width: 273px;
+            line-height: 18px;
+            margin-top: 15px;
+        }
+        .close {
+            position: absolute;
+            top: 0;
+            right: 0;
+            display: inline-block;
+            height: 10px;
+            width: 10px;
+            cursor: pointer;
+            background: url("~@/assets/img/icon-close-off.png") no-repeat center;
+            background-size: 10px 10px;
+            &:hover {
+                background-image: url("~@/assets/img/icon-close-on.png");
+            }
+        }
+    }
+    .row-2 {
+        margin-left: 25px;
+        font-size: 12px;
+        color: #ff7171;
+        margin-bottom: 30px;
+        word-break: break-all;
+        width: 273px;
+        &.warning {
+            color: #f7b500;
+        }
+        &.success {
+            color: #424656;
+        }
+    }
+    .row-3 {
+        display: flex;
+        justify-content: flex-end;
+        .el-button {
+            font-size: 12px !important;
+            height: 32px;
+            min-width: 60px;
+            margin-left: 15px;
+        }
+    }
+    &.up {
+        animation: alertup 0.2s forwards;
+    }
+}
+</style>

+ 0 - 1
accessControlSystem/src/main.js

@@ -40,7 +40,6 @@ Vue.use(ElementUI, {
   size: 'small'
 });
 
-Vue.config.productionTip = false
 
 
 

+ 7 - 4
accessControlSystem/src/utils/http.js

@@ -27,7 +27,10 @@ http.interceptors.request.use(
             config.url = config.url;
         } else if (config.url.indexOf('/sc-charge') !== -1) {
             config.url = config.url;
+        } else if (config.url.indexOf('/sc-gate-web') !== -1) {
+            config.url = config.url;
         }
+
         // else {
         //     config.url = `/sc-community${config.url}`;
         // }
@@ -69,7 +72,7 @@ http.interceptors.response.use(
                             window.relogin = false;
                             localStorage.removeItem('SC_token');
                         })
-                        .catch(() => {});
+                        .catch(() => { });
                 } else if (data == 1) {
                     Vue.prototype
                         .$msgBox('该账号已在其他地址登录,如需访问请重新登录', '', 'warning', {
@@ -83,7 +86,7 @@ http.interceptors.response.use(
                             window.relogin = false;
                             localStorage.removeItem('SC_token');
                         })
-                        .catch(() => {});
+                        .catch(() => { });
                 } else {
                     Vue.prototype
                         .$msgBox('你的账号已被停用,如有问题请联系管理员', '', 'warning', {
@@ -97,12 +100,12 @@ http.interceptors.response.use(
                             window.relogin = false;
                             localStorage.removeItem('SC_token');
                         })
-                        .catch(() => {});
+                        .catch(() => { });
                 }
             });
             return;
         }
-        if (axios.isCancel(err)) return new Promise(() => {}); // 取消请求的情况下,终端Promise调用链
+        if (axios.isCancel(err)) return new Promise(() => { }); // 取消请求的情况下,终端Promise调用链
         return Promise.reject(err);
     }
 );

+ 10 - 42
accessControlSystem/src/utils/utils.js

@@ -8,6 +8,7 @@
  */
 import Vue from 'vue'
 import newValidate from './newValidate.js';
+import MsgBoxCom from '../components/msgBox';
 Vue.prototype.$valid = newValidate;
 
 //全局混入
@@ -41,52 +42,19 @@ Vue.prototype.$msgBox = (msg = '', tipMsg = '删除后将无法恢复,是否
     width: '374px',
     showCancelButton: true,
     confirmButtonText: '确认',
-    showClose: true
+    showClose: true,
+    resolve: resolve,
+    reject: reject,
   }
   Object.assign(config, params)
-  const MsgBox = Vue.extend({
-    data() {
-      return {
-        showMsg: true,
-        close: false,
-        config
-      }
-    },
-    methods: {
-      cancel() {
-        this.close = true
-        setTimeout(() => {
-          this.showMsg = false
-        }, 300)
-        reject()
-      },
-      confirm() {
-        this.close = true
-        setTimeout(() => {
-          this.showMsg = false
-        }, 300)
-        resolve()
-      }
-    },
-    template: `
-    <div class="alert" v-if='showMsg' style="z-index: 9999">
-      <div class="message-box" :class='{"up": close}' :style="{width: config.width}">
-        <div class="row-1">
-          <i class="dmp-icon-btn icon-${type}"></i>
-          <span class="title">${msg}</span>
-          <i class="close" @click='cancel' v-if="config.showClose"></i>
-        </div>
-        <div class="row-2 ${type}">${tipMsg}</div>
-        <div class="row-3">
-          <el-button @click='cancel' v-if="config.showCancelButton">取消</el-button>
-          <el-button type='primary' @click='confirm'>{{config.confirmButtonText}}</el-button>
-        </div>
-      </div>
-    </div>
-    `
-  })
+
+  const MsgBox = Vue.extend(MsgBoxCom)
   const dom = new MsgBox().$mount()
   document.getElementById('app').appendChild(dom.$el)
+  dom.config = config
+  dom.msg = msg
+  dom.tipMsg = tipMsg
+  dom.type = type
 })
 /**
    * @description: 遍历节点是否存在当前值

+ 16 - 45
accessControlSystem/src/views/accessControlAuthorization/employeeAuthorization/index.vue

@@ -39,16 +39,15 @@
                         <template v-else> 租客 </template>
                     </div>
                 </template>
-                <template slot-scope="scope" slot="communityName">
-                    <div class="table-list" v-for="(item, index) in scope.row.houseList" :key="index">
-                        {{ item.communityName }}
-                    </div>
+                <template slot-scope="scope" slot="faceStatus">
+                    <span v-if="scope.row.faceStatus == 1" class="mainText">启用</span>
+                    <span v-else-if="scope.row.faceStatus == 0" class="redText">禁用</span>
                 </template>
-                <template slot-scope="scope" slot="checkInDate">
-                    <div class="table-list" v-for="(item, index) in scope.row.houseList" :key="index">
-                        {{ checkDateType(item.checkInDate) }}
-                    </div>
+                <template slot-scope="scope" slot="appStatus">
+                    <span v-if="scope.row.appStatus == 1" class="mainText">启用</span>
+                    <span v-else-if="scope.row.appStatus == 0" class="redText">禁用</span>
                 </template>
+
                 <template slot-scope="scope" slot="opt">
                     <div class="opt">
                         <el-tooltip class="item" effect="light" placement="bottom" content="查看">
@@ -84,25 +83,13 @@ export default {
                 },
                 {
                     label: '社区名称',
-                    prop: 'communityName',
-                    slot: 'communityName'
+                    prop: 'communityName'
                 },
                 {
                     label: '住户类型',
                     prop: 'householdType',
-                    slot: 'householdType',
-                    width: '100',
-                    format(val) {
-                        if (val == 1) {
-                            return '业主';
-                        } else if (val == 2) {
-                            return '亲属';
-                        } else if (val == 3) {
-                            return '租客';
-                        }
-                    }
+                    slot: 'householdType'
                 },
-
                 {
                     label: '房屋地址',
                     prop: 'roomNumber',
@@ -110,18 +97,17 @@ export default {
                 },
                 {
                     label: '人脸授权',
-                    prop: 'roomNumber',
-                    slot: 'roomNumber'
+                    prop: 'faceStatus',
+                    slot: 'faceStatus'
                 },
                 {
                     label: 'app授权',
-                    prop: 'roomNumber',
-                    slot: 'roomNumber'
+                    prop: 'appStatus',
+                    slot: 'appStatus'
                 },
                 {
                     label: '门禁卡数量',
-                    prop: 'roomNumber',
-                    width: '80'
+                    prop: 'cardNum',
                 },
 
                 {
@@ -160,17 +146,6 @@ export default {
         currentOrganId(data) {
             this.currentId = data || '';
         },
-        getNationArray(type) {
-            this.$http.postForm('/sc-community/scResident/option', { type: type }).then(({ status, data, msg }) => {
-                if (status === 0 && data) {
-                    if (type == 'nation') {
-                        this.$store.commit('setNationArray', data);
-                    } else if (type == 'native') {
-                        this.$store.commit('setNativeArray', data);
-                    }
-                }
-            });
-        },
         CheckChinese(val, name) {
             var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
             let newVal = val;
@@ -207,12 +182,8 @@ export default {
         }
     },
     created() {
-        this.getNationArray('nation');
-        this.getNationArray('native');
-        this.mixins_dataUrl = '/sc-community/scResident/page'; // 分页查询接口
-        this.mixins_query = {
-            questParams: ''
-        };
+        this.mixins_dataUrl = '/sc-gate-web/auth/userPage'; // 分页查询接口
+        this.mixins_query = {};
         this.mixins_search('search');
     }
 };

+ 16 - 27
accessControlSystem/src/views/accessControlAuthorization/residentAuthorization/index.vue

@@ -23,16 +23,19 @@
             :pageset="mixins_pageset"
             @page-change="pageChange"
         >
-            <!-- <template slot-scope="scope" slot="roomNumber">
-                <div class="table-list" v-for="(item, index) in scope.row.houseList" :key="index">
-                    {{ item.buildingName }}-{{ CheckChinese(item.unitName, '单元') }}-{{ item.roomNumber }}
-                </div>
-            </template> -->
             <template slot-scope="scope" slot="communityName">
                 <div class="table-list" v-for="(item, index) in scope.row.houseList" :key="index">
                     {{ item.communityName }}
                 </div>
             </template>
+            <template slot-scope="scope" slot="faceStatus">
+                <span v-if="scope.row.faceStatus == 1" class="mainText">启用</span>
+                <span v-else-if="scope.row.faceStatus == 0" class="redText">禁用</span>
+            </template>
+            <template slot-scope="scope" slot="appStatus">
+                <span v-if="scope.row.appStatus == 1" class="mainText">启用</span>
+                <span v-else-if="scope.row.appStatus == 0" class="redText">禁用</span>
+            </template>
             <template slot-scope="scope" slot="opt">
                 <div class="opt">
                     <el-tooltip class="item" effect="light" placement="bottom" content="查看">
@@ -72,16 +75,17 @@ export default {
                 },
                 {
                     label: 'app授权',
-                    prop: 'roomNumber'
+                    prop: 'appStatus',
+                    slot: 'appStatus'
                 },
                 {
                     label: '人脸授权',
-                    prop: 'roomNumber'
+                    prop: 'faceStatus',
+                    slot: 'faceStatus'
                 },
                 {
                     label: '门禁卡',
-                    prop: 'roomNumber',
-                    width: '80'
+                    prop: 'cardNum',
                 },
 
                 {
@@ -113,17 +117,6 @@ export default {
                 }
             });
         },
-        getNationArray(type) {
-            this.$http.postForm('/sc-community/scResident/option', { type: type }).then(({ status, data, msg }) => {
-                if (status === 0 && data) {
-                    if (type == 'nation') {
-                        this.$store.commit('setNationArray', data);
-                    } else if (type == 'native') {
-                        this.$store.commit('setNativeArray', data);
-                    }
-                }
-            });
-        },
         CheckChinese(val, name) {
             var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
             let newVal = val;
@@ -138,13 +131,9 @@ export default {
     },
     created() {
         this.getorgTree();
-        this.getNationArray('nation');
-        this.getNationArray('native');
-        this.mixins_dataUrl = '/sc-community/scResident/page'; // 分页查询接口
-        this.mixins_query = {
-            questParams: ''
-        };
-        this.mixins_search('search');
+        this.mixins_dataUrl = '/sc-gate-web/auth/residentPage'; // 分页查询接口
+        this.mixins_query = {};
+        this.mixins_search();
     }
 };
 </script>

+ 126 - 24
accessControlSystem/src/views/deviceManagement/accessControlMachineManagement/index.vue

@@ -4,14 +4,11 @@
         <div class="content-right">
             <div class="search">
                 <el-input clearable placeholder="输入设备编号/名称" class="search-input" v-model.trim="mixins_query.name"></el-input>
-                <el-select v-model="mixins_query.communityId" placeholder="选择社区" clearable>
-                    <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
-                </el-select>
-                <el-select v-model="mixins_query.householdType" clearable placeholder="门禁类型">
+                <el-select v-model="mixins_query.gateType" clearable placeholder="门禁类型" >
                     <el-option :value="1" label="围墙机"></el-option>
                     <el-option :value="2" label="单元机"></el-option>
                 </el-select>
-                <el-select v-model="mixins_query.householdType" clearable placeholder="设备状态">
+                <el-select v-model="mixins_query.deviceStatus" clearable placeholder="设备状态">
                     <el-option :value="1" label="正常"></el-option>
                     <el-option :value="2" label="离线"></el-option>
                 </el-select>
@@ -128,7 +125,6 @@ export default {
                 }
             ],
             thisLeftData: {},
-            communityArr: [],
             selectRow: [],
             mixins_post: 'get'
         };
@@ -151,21 +147,130 @@ export default {
         checkDateType(time) {
             return !!time ? this.$moment(new Date(time)).format('YYYY-MM-DD') : '--';
         },
-        getorgTree() {
-            this.$http
-                .get('/sc-community/assets/community/list')
-                .then((data) => {
-                    this.communityArr = data.data;
-                    this.$store.commit('setAreaSelect', data.data);
+        addCard() {
+            new Promise((resolve) => {
+                this.$store.dispatch('addPopup', {
+                    url: '/deviceManagement/accessControlMachineManagement/popups/add.vue',
+                    width: '548px',
+                    height: '724px',
+                    props: {
+                        callback: resolve
+                    },
+                    hideStar: false,
+                    title: '添加门禁机'
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
+        },
+        restartCard() {
+            //获取选中列表的ids
+            let ids = [];
+            if (!this.selectRow.length) {
+                this.$message.error('您尚未选择,请选择后再操作');
+                return;
+            }
+            this.selectRow.forEach((v) => {
+                ids.push(v.id);
+            });
+            this.$msgBox(`门禁机重启`, '重启时无法开门,你确定继续吗?')
+                .then(() => {
+                    this.$message({
+                        type: 'success',
+                        message: '重启成功!'
+                    });
+                    // this.$http.post('/sc-community/assets/house/delete', ids).then(({ status, data, msg }) => {
+                    //     if (0 === status) {
+                    //         this.$message({
+                    //             type: 'success',
+                    //             message: '重启成功!'
+                    //         });
+                    //         this.mixins_search();
+                    //     } else {
+                    //         this.$message.error(msg);
+                    //     }
+                    // });
+                })
+                .catch(() => {});
+        },
+        remoteDoorOpeningCard() {
+            let ids = [];
+            if (!this.selectRow.length) {
+                this.$message.error('您尚未选择,请选择后再操作');
+                return;
+            }
+            this.selectRow.forEach((v) => {
+                ids.push(v.id);
+            });
+            this.$msgBox(`远程开门`, `已选${ids.length}台门禁机,其中${ids.length}台在线,是否远程开门?`)
+                .then(() => {
+                    this.$message({
+                        type: 'success',
+                        message: '远程开门成功!'
+                    });
+                    // this.$http.post('/sc-community/assets/house/delete', ids).then(({ status, data, msg }) => {
+                    //     if (0 === status) {
+                    //         this.$message({
+                    //             type: 'success',
+                    //             message: '重启成功!'
+                    //         });
+                    //         this.mixins_search();
+                    //     } else {
+                    //         this.$message.error(msg);
+                    //     }
+                    // });
                 })
+                .catch(() => {});
+        },
+        deleteCard() {
+            //获取选中列表的ids
+            let ids = [];
+            if (!this.selectRow.length) {
+                this.$message.error('您尚未选择,请选择后再操作');
+                return;
+            }
+            this.selectRow.forEach((v) => {
+                ids.push(v.id);
+            });
 
-                .catch(function () {});
+            this.$msgBox(`删除确认`, '门禁设备删除后,人员将无法正常开启门禁')
+                .then(() => {
+                    this.$message({
+                        type: 'success',
+                        message: '重启成功!'
+                    });
+                    // this.$http.post('/sc-community/assets/house/delete', ids).then(({ status, data, msg }) => {
+                    //     if (0 === status) {
+                    //         this.$message({
+                    //             type: 'success',
+                    //             message: '重启成功!'
+                    //         });
+                    //         this.mixins_search();
+                    //     } else {
+                    //         this.$message.error(msg);
+                    //     }
+                    // });
+                })
+                .catch(() => {});
+        },
+        lookAccessControl(row) {
+            new Promise((resolve) => {
+                this.$store.dispatch('addPopup', {
+                    url: '/deviceManagement/accessControlMachineManagement/popups/details.vue',
+                    width: '615px',
+                    height: '724px',
+                    props: {
+                        callback: resolve
+                    },
+                    hideStar: true,
+                    showCancelButton: true,
+                    showConfirmButton: true,
+                    title: '门禁机信息'
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
         },
-        addCard() {},
-        restartCard() {},
-        remoteDoorOpeningCard() {},
-        deleteCard() {},
-        lookAccessControl(row) {},
         replaceCard(row) {},
         temporaryPasswordCard(row) {}
     },
@@ -193,12 +298,9 @@ export default {
         }
     },
     created() {
-        this.getorgTree();
-        this.mixins_dataUrl = '/sc-community/scResident/page'; // 分页查询接口
-        this.mixins_query = {
-            questParams: ''
-        };
-        this.mixins_search('search');
+        this.mixins_dataUrl = '/sc-gate-web/gate/page'; // 分页查询接口
+        this.mixins_query = {};
+        this.mixins_search();
     }
 };
 </script>

+ 396 - 0
accessControlSystem/src/views/deviceManagement/accessControlMachineManagement/popups/add.vue

@@ -0,0 +1,396 @@
+<template >
+    <div class="addAccess">
+        <el-form ref="form" :model="formData" :rules="formRules" label-width="110px">
+            <el-form-item label="所属社区" prop="communityId">
+                <el-select v-model="formData.communityId" placeholder="选择社区" clearable @change="buildingNameList(formData.communityId)">
+                    <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="设备类型" prop="deviceType">
+                <el-select placeholder="请选择设备类型" v-model="formData.deviceType">
+                    <el-option label="微信" :value="1"></el-option>
+                    <el-option label="支付宝" :value="2"></el-option>
+                    <el-option label="现金" :value="3"></el-option>
+                    <el-option label="其他" :value="5"></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="设备编号" prop="deviceNo">
+                <el-input type="text" maxlength="100" placeholder="请输入设备编号" v-model="formData.deviceNo"></el-input>
+            </el-form-item>
+            <el-form-item label="设备名称" prop="deviceName">
+                <el-input type="text" maxlength="100" placeholder="请输入设备名称" v-model="formData.deviceName"></el-input>
+            </el-form-item>
+
+            <el-form-item label="门禁机类型" required>
+                <el-radio-group v-model="formData.gateType">
+                    <el-radio :label="1">围墙机</el-radio>
+                    <el-radio :label="2">单元机</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item label="进出门类型" required>
+                <el-radio-group v-model="formData.accessType">
+                    <el-radio :label="1">进出门</el-radio>
+                    <el-radio :label="2">进门</el-radio>
+                    <el-radio :label="3">出门</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item label="安装方位" required>
+                <el-radio-group v-model="formData.installedLocation">
+                    <el-radio :label="1">楼面</el-radio>
+                    <el-radio :label="2">地下室</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <template v-if="formData.gateType == 1">
+                <el-form-item v-for="(item, index) in formData.gateUnitDtoList" :key="index" label="所属单元" required>
+                    <div class="form-item-flex">
+                        <el-form-item
+                            :prop="`buildingId${index}`"
+                            :rules="buildingIdRules('楼栋', item.buildingId)"
+                            class="form-item-flex-input"
+                        >
+                            <el-select v-model="item.buildingId" placeholder="请选择楼栋" clearable @change="unitNameList(item.buildingId)">
+                                <el-option
+                                    v-for="(item, index) in buildingList"
+                                    :key="index"
+                                    :label="item.buildingName"
+                                    :value="item.id"
+                                ></el-option>
+                            </el-select>
+                            <!-- <el-select placeholder="请选择楼栋" v-model="item.buildingId">
+                                <el-option label="微信" :value="1"></el-option>
+                                <el-option label="支付宝" :value="2"></el-option>
+                                <el-option label="现金" :value="3"></el-option>
+                                <el-option label="其他" :value="5"></el-option>
+                            </el-select> -->
+                        </el-form-item>
+                        <el-form-item :prop="`unitName${index}`" :rules="buildingIdRules('单元', item.unitName)" class="form-item-flex-input">
+                            <el-select v-model="item.unitName" placeholder="请选择楼栋" clearable>
+                                <el-option
+                                    v-for="(item, index) in unitList"
+                                    :key="index"
+                                    :label="item.unitName"
+                                    :value="item.unitName"
+                                ></el-option>
+                            </el-select>
+                            <!-- <el-select placeholder="请选择单元" v-model="item.unit">
+                                <el-option label="微信" :value="1"></el-option>
+                                <el-option label="支付宝" :value="2"></el-option>
+                                <el-option label="现金" :value="3"></el-option>
+                                <el-option label="其他" :value="5"></el-option>
+                            </el-select> -->
+                        </el-form-item>
+                        <div class="sunm" @click="addUnit">
+                            <i class="zoniot_font zoniot-icon-tianjia1"></i>
+                        </div>
+                    </div>
+                </el-form-item>
+            </template>
+            <el-form-item label="门禁位置" prop="address">
+                <el-input type="text" maxlength="100" placeholder="请输入门禁位置" v-model="formData.address"></el-input>
+            </el-form-item>
+            <el-form-item label="门禁机经纬度" prop="longLat" :rules="longLatRules('经纬度', longLat)">
+                <el-input type="text" maxlength="100" placeholder="请选择门禁机经纬度" disabled v-model="longLat">
+                    <i slot="suffix" class="zoniot_font zoniot-icon-dizhi" @click="addressQueryClick"></i>
+                </el-input>
+            </el-form-item>
+            <el-form-item label="门禁机照片">
+                <div class="imgdis-div" v-show="formData.picture">
+                    <i class="el-icon-delete" @click="delformphoto"></i>
+                    <img :src="envConfig.baseImgApi + formData.picture" alt="" width="60" height="60" />
+                </div>
+                <el-upload
+                    v-show="!formData.picture"
+                    :headers="token"
+                    ref="uploaduserlogo"
+                    class="mini-upload"
+                    :limit="1"
+                    action="/sc-user-center/user/addUserPhoto"
+                    list-type="picture-card"
+                    :on-success="uploadsuccess"
+                    :auto-upload="true"
+                    name="avatarfile"
+                >
+                    <i slot="default" class="el-icon-plus"></i>
+                    <div slot="file" slot-scope="{ file }">
+                        <el-image class="el-upload-list__item-thumbnail" :src="file.url" fit="cover"></el-image>
+                        <span class="el-upload-list__item-actions">
+                            <span class="el-upload-list__item-delete" @click="handleRemove(file)">
+                                <i class="el-icon-delete"></i>
+                            </span>
+                        </span>
+                    </div>
+                </el-upload>
+            </el-form-item>
+        </el-form>
+        <!--地图详情地址弹出框-->
+        <el-dialog title="选择地址" :append-to-body="true" :visible.sync="mapPopUpStatus" width="50vw">
+            <map-select ref="mapSelect"></map-select>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="closeMap" class="reset">取消</el-button>
+                <el-button type="primary" @click="submitMap">保存</el-button>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+<script >
+import envConfig from '@/config';
+import mapSelect from './mapSelect.vue';
+export default {
+    props: ['params'],
+    components: {
+        mapSelect
+    },
+    data() {
+        return {
+            cols: [
+                {
+                    label: '订单号',
+                    prop: 'billNumber'
+                },
+                {
+                    label: '费用名称',
+                    prop: 'chargeName',
+                    width: '200'
+                },
+                {
+                    label: '计费日期',
+                    prop: 'payBeginTime',
+                    slot: 'payBeginTime',
+                    width: '150'
+                },
+                {
+                    label: '费用金额(元)',
+                    prop: 'amount'
+                },
+                {
+                    label: '滞纳金(元)',
+                    prop: 'lateFee'
+                },
+
+                {
+                    label: '应收金额(元)',
+                    prop: 'receivableAmount'
+                }
+            ],
+            tabList: [],
+            formData: {
+                communityId: '',
+                deviceType: '',
+                deviceNo: '',
+                deviceName: '',
+                gateType: 1,
+                accessType: 1,
+                installedLocation: 1,
+                address: '',
+                picture: '',
+                gateUnitDtoList: [
+                    {
+                        buildingId: '',
+                        unitName: ''
+                    }
+                ]
+            },
+            formRules: {
+                communityId: [this.$valid.selectRequired('所属社区')],
+                deviceType: [this.$valid.selectRequired('设备类型')],
+                deviceNo: [this.$valid.inputRequired('设备编号')],
+                deviceName: [this.$valid.inputRequired('设备名称')],
+                address: [this.$valid.inputRequired('门禁位置')],
+                longLat: this.$valid.custome({
+                    validator(rule, value, cb) {
+                        const rl = rule;
+                        let regExp = /^.{1,20}$/;
+                        if (!value) {
+                            rl.message = '请选择经纬度';
+                            cb(new Error());
+                        } else if (!regExp.test(value)) {
+                            rl.message = '不能超过20个字';
+                            cb(new Error());
+                        } else {
+                            cb();
+                        }
+                    }
+                })
+            },
+            envConfig: envConfig,
+            token: {
+                [localStorage.getItem('SC_token') && 'Authorization']: 'Bearer ' + localStorage.getItem('SC_token')
+            },
+            mapPopUpStatus: false,
+            longLat: '',
+            communityArr: [],
+            buildingList: [],
+            unitList: []
+        };
+    },
+    methods: {
+        getorgTree() {
+            this.$http
+                .get('/sc-community/assets/community/list')
+                .then((data) => {
+                    this.communityArr = data.data;
+                })
+
+                .catch(function () {});
+        },
+        //查询楼栋下拉列表
+        buildingNameList(id) {
+            this.buildingList = [];
+            this.$http.post('/sc-community/assets/building/list/building', { communityId: id }).then(({ data, status, msg }) => {
+                if (0 === status) {
+                    this.buildingList = data;
+                }
+            });
+        },
+        unitNameList(id) {
+            this.unitList = [];
+            this.$http.get('/sc-community/assets/building/house/find', { id: id }).then((res) => {
+                if (res.status == 0) {
+                    if (res.data.buildingUnitList.length != 0) {
+                        this.unitList = res.data.buildingUnitList;
+                    }
+                }
+            });
+        },
+        buildingIdRules(name, val) {
+            return {
+                required: true,
+                message: `${name}不能为空`,
+                trigger: 'change',
+                validator(rule, value, cb) {
+                    if (!val) {
+                        cb(new Error());
+                    } else {
+                        cb();
+                    }
+                }
+            };
+        },
+        longLatRules(name, val) {
+            return {
+                required: true,
+                message: `${name}不能为空`,
+                trigger: 'change',
+                validator(rule, value, cb) {
+                    if (!val) {
+                        cb(new Error());
+                    } else {
+                        cb();
+                    }
+                }
+            };
+        },
+        submit() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    let billList = this.tabList.map((item, index) => {
+                        return {
+                            amount: item.amount,
+                            billId: item.id
+                        };
+                    });
+                    let installData = {
+                        payType: this.formData.payType,
+                        remark: this.formData.remark,
+                        billList: billList
+                    };
+                    var loading = this.$loading();
+                    this.$http
+                        .post('/sc-gate-web/gate/add', installData)
+                        .then(({ status, msg }) => {
+                            if (status == 0) {
+                                this.$message.success(msg);
+                                this.params.callback();
+                                this.$emit('close');
+                            } else {
+                                this.$message.error(msg);
+                            }
+                            loading.close();
+                        })
+                        .catch(() => {
+                            loading.close();
+                        });
+                }
+            });
+        },
+        delformphoto() {
+            this.formData.picture = '';
+        },
+        addressQueryClick() {
+            this.mapPopUpStatus = true;
+        },
+        handleRemove(file) {
+            this.$refs.uploaduserlogo.clearFiles();
+        },
+        uploadsuccess(response, file, fileList) {
+            if (0 === response.status) {
+                this.formData.picture = response.data;
+            }
+            this.$refs.uploaduserlogo.clearFiles();
+        },
+        addUnit() {
+            this.formData.gateUnitDtoList.push({
+                buildingId: '',
+                unit: ''
+            });
+        },
+        closeMap() {
+            this.mapPopUpStatus = false;
+        },
+        submitMap() {
+            const { lat, lng } = this.$refs.mapSelect.thisMapPot;
+            this.longLat = `${lng},${lat}`;
+            this.closeMap();
+        }
+    },
+    created() {
+        this.getorgTree();
+        // this.chiData = this.params.chiData;
+    }
+};
+</script>
+<style lang="scss" scoped>
+@import '@assets/css/public-style.scss';
+::v-deep.el-upload--picture-card {
+    width: rem(80);
+    height: rem(80);
+    line-height: rem(90);
+}
+
+/deep/.el-dialog__body {
+    padding: 0 rem(20);
+}
+.imgdis-div {
+    width: rem(80);
+    height: rem(80);
+    position: relative;
+    img {
+        width: 100%;
+        height: 100%;
+    }
+}
+.imgdis-div i {
+    display: none;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+}
+.imgdis-div:hover i {
+    display: block;
+}
+.form-item-flex {
+    display: flex;
+    .form-item-flex-input {
+        width: rem(165) !important;
+        margin-left: rem(20);
+        margin-bottom: 0 !important;
+        &:first-child {
+            margin: 0;
+        }
+    }
+    .sunm {
+        margin-left: rem(10);
+    }
+}
+</style>

+ 241 - 0
accessControlSystem/src/views/deviceManagement/accessControlMachineManagement/popups/details.vue

@@ -0,0 +1,241 @@
+<template >
+    <div class="contentTable">
+        <div class="formContent-item_title">基本信息</div>
+        <div class="contentTableList">
+            <div class="tableLeft">
+                <div class="list-item" v-for="(item, index) in basic.left" :key="`basic.left${index}`">
+                    <div class="list-item-label">{{ item.label }}</div>
+                    <div class="list-item-conten"></div>
+                </div>
+            </div>
+            <div class="tableRight">
+                <div class="list-item" v-for="(item, index) in basic.right" :key="`basic.right${index}`">
+                    <div class="list-item-label">{{ item.label }}</div>
+                    <div class="list-item-conten"></div>
+                </div>
+            </div>
+        </div>
+        <div class="formContent-item_title">配置信息</div>
+        <div class="contentTableList">
+            <div class="tableLeft">
+                <div class="list-item" v-for="(item, index) in configure.left" :key="`configure.left${index}`">
+                    <div class="list-item-label">{{ item.label }}</div>
+                    <div class="list-item-conten"></div>
+                </div>
+            </div>
+            <div class="tableRight">
+                <div class="list-item" v-for="(item, index) in configure.right" :key="`configure.right${index}`">
+                    <div class="list-item-label">{{ item.label }}</div>
+                    <div class="list-item-conten"></div>
+                </div>
+            </div>
+        </div>
+        <div class="formContent-item_title">网络信息</div>
+                <div class="contentTableList">
+            <div class="tableLeft">
+                <div class="list-item" v-for="(item, index) in network.left" :key="`network.left${index}`">
+                    <div class="list-item-label">{{ item.label }}</div>
+                    <div class="list-item-conten"></div>
+                </div>
+            </div>
+            <div class="tableRight">
+                <div class="list-item" v-for="(item, index) in network.right" :key="`network.right${index}`">
+                    <div class="list-item-label">{{ item.label }}</div>
+                    <div class="list-item-conten"></div>
+                </div>
+            </div>
+        </div>
+        <div class="formContent-item_title">硬件特征信息</div>
+        <div class="formContent-item_title">多模块信息</div>
+    </div>
+</template>
+<script >
+export default {
+    props: ['params'],
+    data() {
+        return {
+            basic: {
+                left: [
+                    {
+                        label: '门禁机名称',
+                        prop: ''
+                    },
+                    {
+                        label: '社区名称',
+                        prop: ''
+                    },
+                    {
+                        label: '门禁机类型',
+                        prop: ''
+                    },
+                    {
+                        label: '进出门类型',
+                        prop: ''
+                    },
+                    {
+                        label: '安装时间',
+                        prop: ''
+                    },
+                    {
+                        label: '图片',
+                        prop: ''
+                    }
+                ],
+                right: [
+                    {
+                        label: '设备编号',
+                        prop: ''
+                    },
+                    {
+                        label: '安装位置',
+                        prop: ''
+                    },
+                    {
+                        label: '安装方位',
+                        prop: ''
+                    },
+                    {
+                        label: '重启时间',
+                        prop: ''
+                    },
+                    {
+                        label: '经纬度',
+                        prop: ''
+                    },
+                    {
+                        label: '',
+                        prop: ''
+                    }
+                ]
+            },
+            configure: {
+                left: [
+                    {
+                        label: 'M1卡开门',
+                        prop: ''
+                    },
+                    {
+                        label: '临时密码',
+                        prop: ''
+                    },
+                    {
+                        label: '活体检测',
+                        prop: ''
+                    },
+                    {
+                        label: '人脸算法',
+                        prop: ''
+                    },
+                    {
+                        label: '人脸抓拍',
+                        prop: ''
+                    },
+                    {
+                        label: '二维码开门',
+                        prop: ''
+                    },
+                    {
+                        label: '广告播放',
+                        prop: ''
+                    }
+                ],
+                right: [
+                    {
+                        label: 'UID防复制',
+                        prop: ''
+                    },
+                    {
+                        label: '人脸开门',
+                        prop: ''
+                    },
+                    {
+                        label: '相识度阈值',
+                        prop: ''
+                    },
+                    {
+                        label: '人像库上限',
+                        prop: ''
+                    },
+                    {
+                        label: '防尾随截图',
+                        prop: ''
+                    },
+                    {
+                        label: 'WIFI探针',
+                        prop: ''
+                    },
+                    {
+                        label: '',
+                        prop: ''
+                    }
+                ]
+            },
+            network: {
+                left: [
+                    {
+                        label: '在线状态',
+                        prop: ''
+                    },
+                    {
+                        label: '4G卡号',
+                        prop: ''
+                    },
+                    {
+                        label: 'ICCID',
+                        prop: ''
+                    }
+                ],
+                right: [
+                    {
+                        label: '当前网络模式',
+                        prop: ''
+                    },
+                    {
+                        label: 'IMEI',
+                        prop: ''
+                    },
+                    {
+                        label: '基带版本号',
+                        prop: ''
+                    }
+                ]
+            }
+        };
+    },
+    methods: {},
+    created() {
+        // this.chiData = this.params.chiData;
+    }
+};
+</script>
+<style lang="scss" scoped>
+@import '@assets/css/public-style.scss';
+$border: 1px solid #e0e1e3;
+// @mixin border {
+// }
+.contentTable {
+    font-size: rem(12);
+    .contentTableList {
+        display: grid;
+        grid-template-columns: repeat(2, minmax(0, 1fr));
+        border: $border;
+        margin-bottom: rem(20);
+        .tableLeft {
+            border-right: $border;
+            color: #424656;
+        }
+        .list-item {
+            line-height: rem(40);
+            border-bottom: $border;
+            &:last-child {
+                border: none;
+            }
+            &-label {
+                width: rem(100);
+                border-right: $border;
+                margin-left: rem(10);
+            }
+        }
+    }
+}
+</style>

+ 145 - 0
accessControlSystem/src/views/deviceManagement/accessControlMachineManagement/popups/mapSelect.vue

@@ -0,0 +1,145 @@
+<template>
+    <div>
+        <el-autocomplete
+            popper-class="my-autocomplete"
+            v-model="addressName"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入地址查找"
+            @select="handleSelect"
+        >
+            <template slot-scope="{ item }">
+                <div class="name">
+                    {{ item.name }} <span>({{ item.cityname + item.adname }})</span>
+                </div>
+            </template>
+        </el-autocomplete>
+        <div id="container"></div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            map: '',
+            placeSearch: '',
+            marker: '',
+            addressName: '', //地址查询名称
+            poisArray: [],
+            thisMapPot: {}
+        };
+    },
+    methods: {
+        init() {
+            let _this = this;
+
+            this.map = new AMap.Map('container', {
+                center: '',
+                resizeEnable: true, //是否监控地图容器尺寸变化
+                zoom: 16 //初始化地图层级
+            });
+            this.map.on('complete', () => {
+                // if (!!_this.params.location) {
+                //     let arr = this.params.location.split(',');
+                //     this.addIcon({ lng: arr[0], lat: arr[1] });
+                // }
+            });
+
+            this.map.on('click', this.mapClick);
+            this.placeSearch = new AMap.PlaceSearch({
+                map: _this.map,
+                city: '广东', //020
+                citylimit: true, //定点范围
+                autoFitView: true
+            });
+            AMap.event.addListener(this.placeSearch, 'markerClick', (e) => {
+                this.thisMapPot = e.event.lnglat;
+                this.$message.success('选择成功');
+            });
+        },
+        mapClick(e) {
+            this.addIcon(e.lnglat);
+            this.$message.success('选择成功');
+        },
+        addIcon(e) {
+            if (!!this.marker) {
+                this.map.remove(this.marker);
+                this.marker = '';
+            }
+            this.thisMapPot = e;
+            let loc = [e.lng, e.lat];
+            this.marker = new AMap.Marker({
+                icon: 'https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png',
+                position: loc,
+                map: this.map
+            });
+            // this.marker.setLabel({
+            //     offset: new AMap.Pixel(-50, 35),
+            //     content: !!this.params.data.pointName ? `巡更名称:${this.params.data.pointName}` : `巡更经纬度:${e.lng},${e.lat}`
+            // });
+            this.map.setFitView();
+        },
+        togglePlaceSearch(val, resolve) {
+            this.placeSearch.search(val, (status, result) => {
+                if (result.info == 'OK' && status == 'complete') {
+                    console.log(result.poiList);
+                    this.poisArray = result.poiList.pois;
+                }
+                resolve && resolve(true);
+            });
+        },
+        handleSelect(item) {
+            this.addressName = item.name;
+            this.placeSearch.search(item.name);
+        },
+        querySearch(queryString, cb) {
+            new Promise((resolve) => {
+                this.togglePlaceSearch(queryString, resolve);
+            }).then(() => {
+                if (this.poisArray.length !== 0) {
+                    cb(this.poisArray);
+                }
+            });
+        }
+    },
+    destroyed() {
+        this.map && this.map.destroy();
+        this.marker = '';
+    },
+    created() {
+        this.$nextTick(() => {
+            this.init();
+        });
+    }
+};
+</script>
+<style scoped  lang="scss">
+@import '@assets/css/public-style.scss';
+#container {
+    margin-top: 20px;
+    width: 100%;
+    height: rem(400);
+    /deep/ .amap-marker-label {
+        border: 0 none;
+        background-color: #fff;
+        white-space: nowrap;
+        box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
+        border-radius: 5px;
+    }
+}
+.my-autocomplete {
+    li {
+        line-height: normal;
+        padding: 7px;
+
+        .name {
+            text-overflow: ellipsis;
+            overflow: hidden;
+            span {
+                font-size: 12px;
+                color: #b4b4b4;
+            }
+        }
+    }
+}
+</style>

+ 11 - 1
accessControlSystem/vue.config.js

@@ -4,6 +4,15 @@ function resolve(dir) {
     return path.join(__dirname, dir); // path.join(__dirname)设置绝对路径
 }
 
+const proxyAgent = {
+    target: envConfig.baseApi,
+    ws: true, // 代理的WebSockets
+    changeOrigin: true, // 允许websockets跨域
+    logLevel: 'debug',
+    pathRewrite: {
+
+    }
+}
 module.exports = {
     publicPath: process.env.NODE_ENV === 'sit' ? '/sc-accessControlSystem' : '/',
     productionSourceMap: false,
@@ -138,7 +147,8 @@ module.exports = {
                 pathRewrite: {
                     // "^/zoniot-water": ""
                 }
-            }
+            },
+            '/sc-gate-web': proxyAgent
         },
         overlay: {
             warnings: false,