Shannon_mu 3 éve
szülő
commit
439335915c

+ 40 - 4
commandCenter/src/assets/css/public-style.scss

@@ -25,7 +25,7 @@ $base_fontSize: 100;
 .ashText {
   color: $ashColor !important;
 }
-.mainText{
+.mainText {
   color: $mainTextColor !important;
 }
 .height100 {
@@ -57,9 +57,45 @@ $base_fontSize: 100;
 /deep/ .titleName {
   color: $mainTextColor !important;
 }
-.mgB20{
+.mgB20 {
   margin-bottom: rem(20);
 }
-.mgR20{
+/deep/ .el-input--small .el-input__inner {
+  background: transparent;
+}
+.mgR20 {
   margin-right: 20px;
-}
+}
+.showAlarm {
+  // table改成透明
+  /deep/ .el-table {
+    background: transparent !important;
+    color: white;
+    border-bottom: none;
+    thead {
+      color: white;
+    }
+    th,
+    tr {
+      background: transparent !important;
+    }
+  }
+  /deep/ .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
+    background: transparent !important;
+  }
+  //分页
+  .el-pagination__total,
+  .el-pagination__jump,
+  .el-input__inner {
+    color: white;
+    background: transparent;
+  }
+  .el-pagination.is-background .btn-next,
+  .el-pagination.is-background .btn-prev,
+  .el-pagination.is-background .el-pager li {
+    background: transparent;
+    &:not(.disabled).active{
+      background: transparent;
+    }
+  }
+}

BIN
commandCenter/src/assets/img/homeIcon/bg_bottom.png


+ 7 - 2
commandCenter/src/components/common/alertModal.vue

@@ -6,7 +6,7 @@
         :width="modal.width"
         :fullscreen="modal.fullscreen"
         :custom-class="modal.customClass || 'alert-el-modal'"
-        :class="{ 'is-modal': !modal.fullscreen, newpop: modal.class }"
+        :class="{ 'is-modal': !modal.fullscreen, newpop: modal.class, 'showAlarm': !modal.showAlarm }"
         :append-to-body="true"
         :lock-scroll="true"
         @closed="close"
@@ -22,7 +22,7 @@
                 <span v-if="modal.hideStar"></span>
                 <span v-else-if="modal.title && !modal.notip"> (<span class="color-danger">*为必填项</span>) </span>
             </div>
-            <div class="mgR20" v-if="modal.showAlarm" @click="open(modal.id)"><i class="zoniot_font zoniot-icon-xiangqing"></i></div>
+            <div class="mgR20" v-if="modal.showAlarm && !modal.showHide" @click="open(modal.id)"><i class="zoniot_font zoniot-icon-xiangqing"></i></div>
         </template>
         <div class="content">
             <component :id="modal.id" :is="modal.component" :params="modal.props" :ref="modal.id" @close="close"></component>
@@ -200,6 +200,11 @@ export default {
         }
     }
 }
+.showAlarm {
+    /deep/ .el-dialog__body {
+        height: calc(100% - 110px);
+    }
+}
 
 .newpop .el-dialog {
     background: transparent;

+ 27 - 11
commandCenter/src/views/commandDispatch/index.vue

@@ -52,15 +52,13 @@
 
 <script>
 import smallModuleIndex from '@views/smallModule/index.js';
+import { mapState } from 'vuex';
 export default {
     mixins: [smallModuleIndex],
     data() {
         return {
             showChart: true,
-            edit: true,
             loadding: true,
-            width: '',
-            height: '',
             openCur: null,
             deviceArr: [
                 {
@@ -84,12 +82,16 @@ export default {
                     label: '电表'
                 }
             ],
+            mixins_query: {
+                communityId: ''
+            },
             showPointArr: [1, 2, 3, 4, 5],
             point: [],
-            imgUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg9.51tietu.net%2Fpic%2F2019-091407%2Fores3oho25bores3oho25b.jpg&refer=http%3A%2F%2Fimg9.51tietu.net&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1656730680&t=2eb039923a58add4080cd042c1e4e9eb'
+            imgUrl: require('@/assets/img/homeIcon/bg_bottom.png')
         };
     },
     computed: {
+        ...mapState(['homeCommunityAll']),
         points() {
             let showArr = [];
             this.point.map((item) => {
@@ -100,6 +102,15 @@ export default {
             return showArr;
         }
     },
+    watch: {
+        //全局社区接口调用
+        homeCommunityAll(val) {
+            try {
+                this.mixins_query.communityId = val;
+                this.getData();
+            } catch {}
+        }
+    },
     methods: {
         addPoint() {
             if (this.openCur == 1) {
@@ -121,13 +132,15 @@ export default {
         togglePop(row) {
             let url = '',
                 width = '2.89rem',
-                height = '2.25rem';
+                height = '2.25rem',showHide=false;
+         
             if (row.deviceType == 1) {
                 url = 'typeCamera';
             } else if (row.deviceType == 2) {
                 url = 'typeAccessControl';
             } else if (row.deviceType == 3) {
                 url = 'typeCard';
+  showHide = true
             } else if (row.deviceType == 4 || row.deviceType == 5) {
                 url = 'typeHydropower';
                 height = '2.65rem';
@@ -141,7 +154,8 @@ export default {
                     height: height,
                     fullscreen: false,
                     showFooter: true,
-                    showAlarm:true,
+                    showAlarm: true,
+                    showHide:showHide,
                     props: {
                         row,
                         callback: resolve
@@ -170,7 +184,7 @@ export default {
                     }
                 });
             }).then(() => {
-                this.getPoint();
+                this.getData();
             });
         },
         pointClose(item) {
@@ -182,7 +196,7 @@ export default {
                                 type: 'success',
                                 message: '删除成功!'
                             });
-                            this.getPoint();
+                            this.getData();
                         }
                     });
                 })
@@ -191,9 +205,9 @@ export default {
         toggleShow() {
             this.showChart = !this.showChart;
         },
-        getPoint() {
+        getData() {
             this.$http
-                .post('/sc-community/community/layer/list', { communityId: this.$store.getters['getHomeCommunityAll'] })
+                .post('/sc-community/community/layer/list', this.mixins_query)
                 .then(({ status, data, msg }) => {
                     if (status == 0 && !!data) {
                         this.point = data;
@@ -207,7 +221,9 @@ export default {
     },
 
     created() {
-        this.getPoint();
+        if (!!this.mixins_query.communityId) {
+            this.getData();
+        }
     }
 };
 </script>

+ 26 - 2
commandCenter/src/views/commandDispatch/pop/dottingEquipment.vue

@@ -41,7 +41,7 @@ export default {
             this.$refs.form.validate((valid) => {
                 if (valid) {
                     var loading = this.$loading();
-                    let installData = Object.assign({},this.formData) ;
+                    let installData = Object.assign({}, this.formData);
                     installData.deviceName = installData.deviceId.name;
                     installData.deviceId = installData.deviceId.value;
                     this.$http
@@ -135,7 +135,31 @@ export default {
                 })
                 .catch(() => {});
         },
-        findPageParking() {},
+        findPageParking() {
+            let parameter = {
+                pageIndex: 1,
+                pageSize: 100,
+                communityId: this.$store.getters['getHomeCommunityAll']
+            };
+            this.$http
+                .post('/sc-community/parkingCar/findChannelInfo', parameter)
+                .then(({ status, data, msg }) => {
+                    let arrs = [];
+                    if (status == 0) {
+                        data.list.map((item) => {
+                            arrs.push({
+                                id: item.parkId,
+                                name: item.nodeName,
+                                address: item.parkName
+                            });
+                        });
+                    } else {
+                        this.$message.error(msg);
+                    }
+                    this.typeArr = arrs;
+                })
+                .catch(() => {});
+        },
         findPageCamera() {}
     },
     created() {

+ 88 - 25
commandCenter/src/views/commandDispatch/pop/tableList.vue

@@ -1,23 +1,85 @@
 <template>
-    <el-table :data="tableData" border style="width: 100%">
-        <el-table-column label="No." type="index" :width="70" align="left"></el-table-column>
-        <el-table-column prop="date" label="告警名称"> </el-table-column>
-        <el-table-column prop="date" label="告警时间" width="180"> </el-table-column>
-        <el-table-column prop="date" label="告警地址" > </el-table-column>
-    </el-table>
+    <zz-table
+        :settings="{ showIndex: true, stripe: true }"
+        :cols="cols"
+        :data="mixins_list"
+        :pageset="mixins_pageset"
+        @page-change="pageChange"
+    ></zz-table>
 </template>
 <script>
+import list from '@/utils/list.js';
+
 export default {
+    mixins: [list],
     props: ['params'],
     data() {
         return {
-             tableData:[]
+            tableData: [],
+            cols: [
+                {
+                    label: '告警名称',
+                    prop: 'name'
+                },
+                {
+                    label: '告警时间',
+                    prop: 'warningDate',
+                    width: '150'
+                },
+                {
+                    label: '告警地址',
+                    prop: 'address',
+                    width: '150'
+                }
+            ]
         };
     },
     methods: {
-        getData() {
+        getHydropower() {
             this.$http
-                .get('/sc-energy/device/detail', { deviceId: this.params.row.deviceId })
+                .post('/sc-community/alarmHydropower/getWarningDetails', { pageNum: 1, pageSize: 15, deviceId: this.params.row.deviceId })
+                .then(({ status, data: { list = [], total = 0 }, msg }) => {
+                    if (0 === status) {
+                        this.mixins_list = list;
+                        this.mixins_pageset.total = total * 1;
+                    } else {
+                        this.$message.error(msg);
+                    }
+                })
+                .catch(() => {});
+        },
+        getCard() {
+            // this.$http
+            //     .get('/sc-community/dahuaDevice/getAlarmList', { deviceId: this.params.row.deviceId })
+            //     .then(({ status, data, msg }) => {
+            //         if (status == 0) {
+            //             this.formData = data;
+            //             console.log(data);
+            //         } else {
+            //             this.$message.error(msg);
+            //         }
+            //     })
+            //     .catch(() => {});
+        },
+        getAccessControl() {
+            this.$http
+                .get('/sc-gate-web/alarm/page', { deviceNo: this.params.deviceNo })
+                .then(({ status, data: { list = [], total = 0 }, msg }) => {
+                    this.cols[0].prop = 'alarmContent';
+                    this.cols[1].prop = 'createDate';
+
+                    if (0 === status) {
+                        this.mixins_list = list;
+                        this.mixins_pageset.total = total * 1;
+                    } else {
+                        this.$message.error(msg);
+                    }
+                })
+                .catch(() => {});
+        },
+        getCamera() {
+            this.$http
+                .get('/sc-community/dahuaDevice/getAlarmList', { deviceId: this.params.row.deviceId })
                 .then(({ status, data, msg }) => {
                     if (status == 0) {
                         this.formData = data;
@@ -28,26 +90,27 @@ export default {
                 })
                 .catch(() => {});
         },
-        typeStatus(val) {
-            switch (val) {
-                case 1:
-                    return '正常';
-                case 2:
-                    return '告警';
-                case 3:
-                    return '离线';
-                case 4:
-                    return '未启用';
-                case 5:
-                    return '报废';
-                default:
-                    return '--';
+        submit() {
+            window.open('http://114.135.61.186:21020/sc-operation/workOrders/index?showPop');
+        },
+        getList() {
+            const { deviceType } = this.params.row;
+            if (deviceType == 1) {
+                this.getCamera();
+            } else if (deviceType == 2) {
+                //门禁
+                this.getAccessControl();
+            } else if (deviceType == 3) {
+                //停车
+                this.getCard();
+            } else if (deviceType == 4 || deviceType == 5) {
+                //水电告警
+                this.getHydropower();
             }
         }
     },
     created() {
-        this.getData();
-        // console.log(this.params.row);
+        this.getList();
     }
 };
 </script>

+ 73 - 14
commandCenter/src/views/commandDispatch/pop/typeAccessControl.vue

@@ -6,7 +6,7 @@
         </div>
         <div class="list">
             <div class="list-title">通行人数</div>
-            <div class="list-text">{{ formData.readData || '--' }}</div>
+            <div class="list-text">{{ formData.persons || '--' }}</div>
         </div>
         <div class="list">
             <div class="list-title">状态</div>
@@ -14,7 +14,7 @@
         </div>
         <div class="list">
             <div class="list-title">开关按钮</div>
-            <div class="list-text">{{ formData.readData || '--' }}</div>
+            <div class="list-text"><div class="button" @click="openType(formData.id)">开门</div></div>
         </div>
     </div>
 </template>
@@ -28,17 +28,33 @@ export default {
     },
     methods: {
         getData() {
-            this.$http
-                .get('/sc-energy/device/detail', { deviceId: this.params.row.deviceId })
-                .then(({ status, data, msg }) => {
-                    if (status == 0) {
-                        this.formData = data;
-                        console.log(data);
-                    } else {
-                        this.$message.error(msg);
-                    }
-                })
-                .catch(() => {});
+            new Promise((resolve) => {
+                this.$http
+                    .get(`/sc-gate-web/gate/find/${this.params.row.deviceId}`)
+                    .then(({ status, data, msg }) => {
+                        if (status == 0) {
+                            resolve && resolve(data);
+                        } else {
+                            this.$message.error(msg);
+                        }
+                    })
+                    .catch(() => {});
+            }).then((val) => {
+                this.$http
+                    .get(`/sc-community/countDuoduDeviceVisitorsFlowRate`, {
+                        communityId: val.communityId,
+                        deviceGuid: val.deviceNo
+                    })
+                    .then(({ status, data, msg }) => {
+                        if (status == 0) {
+                            this.formData = { persons: data };
+                            Object.assign(this.formData, val);
+                        } else {
+                            this.$message.error(msg);
+                        }
+                    })
+                    .catch(() => {});
+            });
         },
         typeStatus(val) {
             switch (val) {
@@ -55,11 +71,44 @@ export default {
                 default:
                     return '--';
             }
+        },
+        openType(id) {
+            this.$msgBox(`远程开门`, `是否远程开门?`)
+                .then(() => {
+                    this.$http.post('/sc-gate-web/gate/remoteOpenDoor', { ids: id }).then(({ status, data, msg }) => {
+                        if (0 === status) {
+                            this.$message({
+                                type: 'success',
+                                message: '远程开门成功!'
+                            });
+                            this.mixins_search();
+                        } else {
+                            this.$message.error(msg);
+                        }
+                    });
+                })
+                .catch(() => {});
+        },
+        open() {
+            this.$store.dispatch('addPopup', {
+                url: `/commandDispatch/pop/tableList.vue`,
+                title: '告警信息',
+                notip: true,
+                width: '5rem',
+                height: '4rem',
+                confirmButtonText: '添加工单',
+                showCancelButton: true,
+                props: {
+                    row: this.params.row,
+                    deviceNo: this.formData.deviceNo
+                }
+            });
+            this.params.callback();
+            this.$emit('close');
         }
     },
     created() {
         this.getData();
-        // console.log(this.params.row);
     }
 };
 </script>
@@ -87,6 +136,16 @@ export default {
             overflow: hidden;
             text-overflow: ellipsis;
         }
+        .button {
+            width: 60px;
+            height: 30px;
+            background: #0eaeff;
+            border-radius: 4px;
+            text-align: center;
+            line-height: 30px;
+            margin-top: 5px;
+            cursor: pointer;
+        }
     }
 }
 </style>

+ 7 - 2
commandCenter/src/views/commandDispatch/pop/typeCard.vue

@@ -23,7 +23,12 @@ export default {
     props: ['params'],
     data() {
         return {
-            formData: {}
+            formData: {
+                address:'',
+                readData:'',
+                deviceStatus:'',
+                readData:''
+            }
         };
     },
     methods: {
@@ -32,7 +37,7 @@ export default {
                 .get('/sc-energy/device/detail', { deviceId: this.params.row.deviceId })
                 .then(({ status, data, msg }) => {
                     if (status == 0) {
-                        this.formData = data;
+                        // this.formData = data;
                         console.log(data);
                     } else {
                         this.$message.error(msg);

+ 13 - 15
commandCenter/src/views/commandDispatch/pop/typeHydropower.vue

@@ -45,21 +45,20 @@ export default {
                 .catch(() => {});
         },
         open() {
-            new Promise((resolve) => {
-                this.$store.dispatch('addPopup', {
-                    url: `/commandDispatch/pop/tableList.vue`,
-                    title: '告警信息',
-                    notip: true,
-                    width: '4.89rem',
-                    height: '4rem',
-                    props: {
-                        // row,
-                        callback: resolve
-                    }
-                });
-            }).then(() => {
-
+            this.$store.dispatch('addPopup', {
+                url: `/commandDispatch/pop/tableList.vue`,
+                title: '告警信息',
+                notip: true,
+                width: '5rem',
+                height: '4rem',
+                confirmButtonText: '添加工单',
+                showCancelButton: true,
+                props: {
+                    row: this.params.row
+                }
             });
+            this.params.callback();
+            this.$emit('close');
         },
         typeStatus(val) {
             switch (val) {
@@ -80,7 +79,6 @@ export default {
     },
     created() {
         this.getData();
-        // console.log(this.params.row);
     }
 };
 </script>