Shannon_mu 2 gadi atpakaļ
vecāks
revīzija
eb999e37aa

+ 2 - 0
commandCenter/src/components/common/Header.vue

@@ -108,6 +108,8 @@ export default {
             this.$http.get('/sc-community/assets/community/list').then(({ data, msg, status }) => {
                 if (status == 0) {
                     this.communityList = data;
+                    this.communityId = data[0].id;
+                    this.$store.commit('setHomeCommunityAll', this.communityId);
                     this.$store.commit('setAreaSelect', data);
                 }
             });

+ 5 - 1
commandCenter/src/components/common/index.js

@@ -18,6 +18,8 @@ import alramform from './alramform';
 import xkUpload from './XKUpload';
 import select from './select';
 import echart from "./echart";
+import numberActive from "./numberActive";
+import modularLoading from './modularLoading'
 // 注册全局组件
 export default {
     install() {
@@ -33,7 +35,9 @@ export default {
             organTree,
             xkUpload,
             select,
-            echart
+            echart,
+            numberActive,
+            modularLoading
         ];
         _.each(components, (v) => {
             Vue.component(v.name, v);

+ 28 - 0
commandCenter/src/components/common/modularLoading.vue

@@ -0,0 +1,28 @@
+<template>
+    <div class="modularLoading" v-if="loadding">
+        <div class="el-loading-spinner">
+            <i class="el-icon-loading"></i>
+            <div class="el-loading-text">{{ tipsText || '模块加载中' }}</div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    name: 'modularLoading',
+    props: ['loadding', 'tipsText']
+};
+</script>
+<style lang="scss" scoped>
+.modularLoading {
+    position: absolute;
+    z-index: 2000;
+    background-color: rgba(0, 0, 0, 1);
+    margin: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    -webkit-transition: opacity 0.3s;
+    transition: opacity 0.3s;
+}
+</style>

+ 64 - 0
commandCenter/src/components/common/numberActive.vue

@@ -0,0 +1,64 @@
+<template>
+    <p class="number-grow-warp">
+        <span ref="numberGrow" :data-time="time" class="number-grow" :data-value="value">0</span>
+    </p>
+</template>
+<script>
+export default {
+    name: 'numberActive',
+    props: {
+        time: {
+            type: Number,
+            default: 2
+        },
+        value: {
+            type: Number,
+            default: 720000
+        }
+    },
+    watch: {
+        value() {
+            this.numberGrow(this.$refs.numberGrow);
+        }
+    },
+    methods: {
+        numberGrow(ele) {
+          debugger;
+            let _this = this;
+            let step = (_this.value * 10) / (_this.time * 1000);
+            let current = 0;
+            let start = 0;
+            let t = setInterval(function () {
+                start += step;
+                if (start > _this.value) {
+                    clearInterval(t);
+                    start = _this.value;
+                    t = null;
+                }
+                if (current === start) {
+                    return;
+                }
+                current = start;
+                ele.innerHTML = current.toString().replace(/(d)(?=(?:d{3}[+]?)+$)/g, '$1,');
+            }, 10);
+        }
+    },
+    mounted() {
+        // this.numberGrow(this.$refs.numberGrow);
+    }
+};
+</script>
+<style lang="scss" scoped>
+.number-grow-warp {
+    transform: translateZ(0);
+}
+.number-grow {
+    font-family: Arial-BoldMT;
+    font-size: 64px;
+    color: #ffaf00;
+    letter-spacing: 2.67px;
+    margin: 110px 0 20px;
+    display: block;
+    line-height: 64px;
+}
+</style>

+ 1 - 19
commandCenter/src/router/dynamicMuen.js

@@ -1,24 +1,6 @@
 import store from '../store/store.js';
 const staticMuen = [
-    {
-        path: '/index',
-        component: () => import(/* webpackChunkName: "404" */ '@views/commandDispatch/index.vue'),
-        meta: { title: 'index' }
-    },
-    {
-        path: '/403',
-        component: () => import(/* webpackChunkName: "404" */ '@views/errorPage/403.vue'),
-        meta: { title: '403' }
-    },
-    {
-        path: '/404',
-        component: () => import(/* webpackChunkName: "404" */ '@views/errorPage/404.vue'),
-        meta: { title: '404' }
-    },
-    {
-        path: '*',
-        redirect: '/404'
-    }
+
 ];
 //路由格式
 // 自定义路由文件

+ 33 - 7
commandCenter/src/views/commandDispatch/index.vue

@@ -10,22 +10,24 @@
             <span class="point-type" :class="`point-type${item.type}`" @click="togglePop(item)"></span>
             <span class="textStyle">{{ item.name }}</span>
         </div>
-        <div class="index-content-left">
+        <div class="index-content-left" v-if="showChart">
             <last-month-alarm></last-month-alarm>
             <alarm-trend-analysis></alarm-trend-analysis>
             <proportion-of-alarm-types></proportion-of-alarm-types>
             <work-order-processing-status></work-order-processing-status>
         </div>
-        <div class="index-content-right-buttom"><span></span> 隐藏图表</div>
-        <div class="index-content-right">
+        <div class="index-content-right-buttom" @click="toggleShow"><span></span>隐藏图表</div>
+        <div class="rightFloatType" :class="showChart ? '' : 'showChart'"></div>
+        <div class="index-content-right" v-if="showChart">
             <water-consumption></water-consumption>
             <power-consumption></power-consumption>
             <patrol-task-completion-rate></patrol-task-completion-rate>
             <key-areas></key-areas>
         </div>
-        <div class="index-content-buttom">
+        <div class="index-content-buttom" v-if="showChart">
             <passenger-flow-statistics></passenger-flow-statistics>
         </div>
+        <modular-loading :loadding="false" tipsText="地图加载中"></modular-loading>
     </div>
 </template>
 
@@ -35,7 +37,9 @@ export default {
     mixins: [smallModuleIndex],
     data() {
         return {
+            showChart: true,
             edit: true,
+            loadding: true,
             width: '',
             height: '',
             point: [
@@ -92,6 +96,9 @@ export default {
                 x: ((e.x / width) * 100).toFixed(6) + '%',
                 y: ((e.y / height) * 100).toFixed(6) + '%'
             };
+        },
+        toggleShow() {
+            this.showChart = !this.showChart;
         }
     }
 };
@@ -163,17 +170,22 @@ $name: index-content;
         &-buttom {
             position: absolute;
             top: 73px;
-            width: 0.9rem;
-            height: 0.3rem;
+            width: 90px;
+            height: 30px;
+            line-height: 30px;
+            text-align: center;
             background: #01b1fe;
-            border-radius: 0.06rem 0 0 0.06rem;
+            border-radius: 6px 0 0 6px;
             right: 0;
             color: white;
+            z-index: 100;
+            cursor: pointer;
             span {
                 display: inline-block;
                 background-size: cover;
                 width: 14px;
                 height: 14px;
+                margin-right: 5px;
                 background-image: url('~@/assets/img/homeIcon/icon_hide.png');
             }
         }
@@ -189,5 +201,19 @@ $name: index-content;
         left: 360px;
         bottom: 0;
     }
+    .rightFloatType {
+        position: absolute;
+        right: 360px;
+        bottom: 300px;
+        width: 132px;
+        height: 160px;
+        background: #000000;
+        border-radius: 10px;
+        opacity: 0.49;
+        &.showChart {
+            right: 20px;
+            bottom: 20px;
+        }
+    }
 }
 </style>

+ 29 - 2
commandCenter/src/views/smallModule/alarmTrendAnalysis.vue

@@ -14,11 +14,38 @@
 </template>
 <script>
 import { discountedWave } from './indexOptionChart';
+import allcommunit from './allcommunit';
 export default {
+    mixins: [allcommunit],
     data() {
         return {
+            mixins_query: {
+                communityId: ''
+            },
             clientOptions: discountedWave('(次)', ['01-01', '01-02', '01-03', '01-04', '01-05', '01-06', '01-07'], [0, 0, 0, 5, 0, 0, 0])
         };
+    },
+    methods: {
+        getData() {
+            this.$http
+                .get('/sc-community/countDeviceAlarmLast7Days', this.mixins_query)
+                .then(({ status, data, msg }) => {
+                    if (status == 0 && !!data) {
+                        let times = [],
+                            total = [];
+
+                        data.map((item) => {
+                            times.push(this.$moment(item.date).format('MM-DD'));
+                            total.push(item.total);
+                        });
+                        this.clientOptions = discountedWave('(次)', times, total);
+                    }
+                })
+                .catch((err) => {});
+        }
+    },
+    created() {
+        this.getData();
     }
 };
 </script>
@@ -31,7 +58,7 @@ export default {
     font-size: 12px;
     position: relative;
 }
-.modeBlock-title-left .text-leftIcon{
-    background-image: url("~@/assets/img/homeIcon/icon_gaojingqushi.png");
+.modeBlock-title-left .text-leftIcon {
+    background-image: url('~@/assets/img/homeIcon/icon_gaojingqushi.png');
 }
 </style>

+ 32 - 0
commandCenter/src/views/smallModule/allcommunit.js

@@ -0,0 +1,32 @@
+import { mapState } from 'vuex';
+export default {
+  data() {
+    return {
+      loadding: true,
+    }
+  },
+  computed: {
+    //全局社区
+    ...mapState(['homeCommunityAll']),
+    resize() {
+      // 通过scale值来判断窗口是变化
+      return this.$store.getters['getScale'];
+    }
+  },
+  watch: {
+    //全局社区接口调用
+    homeCommunityAll(val) {
+      try {
+        this.mixins_query.communityId = val;
+        this.getData();
+      } catch {
+
+      }
+
+    }, resize(va) {
+      // console.log(va);
+    }
+  },
+  methods: {
+  }
+}

+ 7 - 6
commandCenter/src/views/smallModule/indexOptionChart.js

@@ -47,6 +47,7 @@ export const getItemStyle = (c1, c2) => {
   };
 }
 export const defaultMonth = ['01', "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
+export const defaultDay = ['01', "02", "03", "04", "05", "06", "07"];
 export const defaultName = ['name1', 'name2', 'name3'];
 
 
@@ -67,9 +68,9 @@ export const ringType = (
     data.map(item => {
       if (item.name == v) {
         if (legendFcuntion.type == '%') {
-          val = `{a|${v}} · · · · · · {b|${parseInt((item.value / legendFcuntion.total).toFixed(2) * 100) || 0}%}`
+          val = `{a|${v}}· · ·{b|${parseInt((item.value / legendFcuntion.total).toFixed(2) * 100) || 0}%}`
         } else {
-          val = `{a|${v}} · · · · · · {b|${item.value}}`
+          val = `{a|${v}}· · ·{b|${item.value}}`
         }
       }
     })
@@ -82,7 +83,7 @@ export const ringType = (
     },
     legend: {
       orient: 'vertical',
-      right: 10,
+      right: 0,
       top: 20,
       itemGap: 10,
       itemWidth: 12, // 图例图形宽度
@@ -288,7 +289,7 @@ export const columnOptionsChart = (
   barWidth = 6
 ) => {
   let defaultData = [{
-    name: '', type: 'bar', data: []
+    name: '', type: 'bar', data: [0,0,0,0,0,0,0]
   }]
   let defaultColor = [['#0EAEFF', '#85E9FF'], ['#F0646C', '#F4994E']]
   let seriesConfiguration = () => {
@@ -355,7 +356,7 @@ export const columnOptionsChart = (
         color: "#FFFFFF"
       },
       formatter(param) {
-        let el = `<div class="dmp-echart-tooltip" style="text-align: center;"><h4>${dateType(param[0].axisValue)}</h4>`;
+        let el = `<div class="dmp-echart-tooltip" style="text-align: center;"><h4>${param[0].axisValue}</h4>`;
         param.forEach(item => {
           el += `<p style="text-align: left;">
           <span style="display:inline-block;margin-right:5px;border-radius:4px;width:12px;height:8px;background-image: linear-gradient(to left, 
@@ -389,7 +390,7 @@ export const columnOptionsChart = (
         color: "#9B9DA5",
         margin: 15
       },
-      data: !!xAxis.length ? xAxis : defaultMonth
+      data: !!xAxis.length ? xAxis : defaultDay
     },
     yAxis: {
       type: "value",

+ 34 - 4
commandCenter/src/views/smallModule/lastMonthAlarm.vue

@@ -13,24 +13,54 @@
         <div class="modeBlock-content">
             <div class="leftSun">
                 <div class="content-text">
-                    <h1>208</h1>
+                    <h1>{{ datas.total || 0 }}</h1>
                     <div class="imgs"></div>
-                    <div>单位:</div>
+                    <div>单位:{{ datas.total || 0 }} 个</div>
                 </div>
             </div>
             <div class="rightSun">
                 <div class="top">
-                    <h2>3.47%</h2>
+                    <h2>{{ datas.tongBi || 0 }}</h2>
                     <div>同比<span class="imgtop"></span></div>
                 </div>
                 <div class="buttom">
-                    <h2>3.47%</h2>
+                    <h2>{{ datas.huanBi || 0 }}</h2>
                     <div>环比<span class="imgtop"></span></div>
                 </div>
             </div>
         </div>
     </div>
 </template>
+<script>
+import allcommunit from './allcommunit'
+export default {
+    mixins:[allcommunit],
+    data() {
+        return {
+            mixins_query: {
+                communityId: ''
+            },
+            datas: {}
+        };
+    },
+    methods: {
+        getData() {
+            this.$http
+                .get('/sc-community/countDeviceAlarmLastMonth', this.mixins_query)
+                .then(({ status, data, msg }) => {
+                    if (status == 0) {
+                        debugger;
+                        this.datas = data;
+                    }
+                })
+                .catch((err) => {});
+        }
+    },
+    created() {
+        this.getData();
+    }
+};
+</script>
 <style lang="scss" scoped>
 @import '@views/smallModule/style.scss';
 </style>

+ 48 - 5
commandCenter/src/views/smallModule/passengerFlowStatistics.vue

@@ -10,16 +10,16 @@
         <div class="modeBlock-content">
             <div class="leftBlock">
                 <div class="blockTop1">
-                    <div class="nubmers">5511</div>
+                    <div class="nubmers">{{ datas.todayTotal || 0 }}</div>
                     <div>今日人流量</div>
                 </div>
                 <div class="blockTop2">
-                    <div class="nubmers">5511</div>
-                    <div>日人流量</div>
+                    <div class="nubmers">{{ datas.yesterdayTotal || 0 }}</div>
+                    <div>日人流量</div>
                 </div>
                 <div class="blockBottom">
-                    <div class="nubmers">5511</div>
-                    <div>今日人流量</div>
+                    <div class="nubmers">{{ datas.averageDailyFlow || 0 }}</div>
+                    <div>本月日均人流量</div>
                 </div>
             </div>
             <zz-echart :option="clientOptions" class="chart"></zz-echart>
@@ -28,11 +28,54 @@
 </template>
 <script>
 import { discountedWave } from './indexOptionChart';
+import allcommunit from './allcommunit';
 export default {
+    mixins: [allcommunit],
     data() {
         return {
+            mixins_query: {
+                communityId: ''
+            },
+            datas: {},
+            total: 0,
             clientOptions: discountedWave('(次)', ['01-01', '01-02', '01-03', '01-04', '01-05', '01-06', '01-07'], [0, 0, 0, 5, 0, 0, 0])
         };
+    },
+    methods: {
+        getData() {
+            this.blockData();
+            this.gradData();
+        },
+        blockData() {
+            this.$http
+                .get('/sc-community/countDuoduVisitorsFlowRate', this.mixins_query)
+                .then(({ status, data, msg }) => {
+                    if (status == 0 && !!data) {
+                        this.datas = data;
+                    }
+                })
+                .catch((err) => {});
+        },
+        gradData() {
+            this.$http
+                .get('/sc-community/countDuoduVisitorsFlowRatePerHour', this.mixins_query)
+                .then(({ status, data, msg }) => {
+                    if (status == 0 && !!data.length) {
+                        let times = [],
+                            total = [];
+
+                        data.map((item) => {
+                            times.push(this.$moment(item.date).format('MM-DD'));
+                            total.push(item.total);
+                        });
+                        this.clientOptions = discountedWave('(次)', times, total);
+                    }
+                })
+                .catch((err) => {});
+        }
+    },
+    created() {
+        this.getData();
     }
 };
 </script>

+ 47 - 4
commandCenter/src/views/smallModule/patrolTaskCompletionRate.vue

@@ -18,19 +18,62 @@
 </template>
 <script>
 import { ringType } from './indexOptionChart';
+import allcommunit from './allcommunit';
 export default {
+    mixins: [allcommunit],
     data() {
         return {
+            mixins_query: {
+                communityId: '',
+                date: ''
+            },
+            total: 0,
             clientOptions: ringType(
                 [],
                 [
-                    { value: 0, name: '男' },
-                    { value: 0, name: '女' }
+                    { value: 0, name: '待执行' },
+                    { value: 0, name: '执行中' },
+                    { value: 0, name: '已完成' },
+                    { value: 0, name: '已完成(超时)' },
+                    { value: 0, name: '已逾期' }
                 ],
-                {},
-                { type: '%', total: 0 }
+                {}
             )
         };
+    },
+    methods: {
+        getData() {
+            this.$http
+                .get('/sc-community/statisticPatrolCompletionRate', this.mixins_query)
+                .then(({ status, data, msg }) => {
+                    if (status == 0 && !!data) {
+                        this.clientOptions = ringType([], this.eachartObj(data), {});
+                    }
+                })
+                .catch((err) => {});
+        },
+        eachartObj(data) {
+            this.total = data.total;
+            let typeName = {
+                1: '待执行',
+                2: '执行中',
+                3: '已完成',
+                4: '已完成(超时)',
+                5: '已逾期'
+            };
+            let newData = [];
+            for (let a in data.datas) {
+                newData.push({
+                    value: data.datas[a],
+                    name: typeName[a]
+                });
+            }
+            return newData;
+        }
+    },
+    created() {
+        this.mixins_query.date = this.$moment().format('YYYY-MM-DD');
+        this.getData();
     }
 };
 </script>

+ 53 - 0
commandCenter/src/views/smallModule/powerConsumption.vue

@@ -6,6 +6,12 @@
                 <span class="text">7日用电量</span>
                 <span class="text-rightIcon"></span>
             </div>
+            <div class="modeBlock-title-right">
+                <el-select v-model="mixins_query.useType" placeholder="全部" clearable class="saveColumn-select" @change="getData">
+                    <el-option label="房间表" :value="1"></el-option>
+                    <el-option label="公摊表" :value="2"></el-option>
+                </el-select>
+            </div>
         </div>
         <div class="modeBlock-content">
             <zz-echart :option="clientOptions" class="chart"></zz-echart>
@@ -14,9 +20,17 @@
 </template>
 <script>
 import { columnOptionsChart } from './indexOptionChart';
+import allcommunit from './allcommunit';
 export default {
+    mixins: [allcommunit],
     data() {
         return {
+            mixins_query: {
+                communityId: '',
+                useType: '',
+                type: 3,
+                categoryId: 2
+            },
             clientOptions: columnOptionsChart(
                 '(度)',
                 ['01-01', '01-02', '01-03', '01-04', '01-05', '01-06', '01-07'],
@@ -25,6 +39,28 @@ export default {
                 10
             )
         };
+    },
+    methods: {
+        getData() {
+            this.$http
+                .get('/sc-energy/overview/getCommunityQuantityTrend', this.mixins_query)
+                .then(({ status, data, msg }) => {
+                    if (status == 0 && !!data) {
+                        let times = [],
+                            datas = [];
+
+                        data.map((item) => {
+                            times.push(this.$moment(item.date, 'YYYY-MM-DD').format('MM-DD '));
+                            datas.push(item.value);
+                        });
+                        this.clientOptions = columnOptionsChart('(度)', times, [{ data: datas, name: '用电量' }], [], 10);
+                    }
+                })
+                .catch((err) => {});
+        }
+    },
+    created() {
+        this.getData();
     }
 };
 </script>
@@ -42,4 +78,21 @@ export default {
     height: 26px;
     background-image: url('~@/assets/img/homeIcon/icon_dian.png');
 }
+.modeBlock-title-left {
+    display: inline-block;
+}
+.modeBlock-title-right {
+    // display: inline-block;
+    float: right;
+}
+.saveColumn-select {
+    width: 100px;
+    margin-left: 10;
+    /deep/ .el-input__inner {
+        background: transparent;
+        color: white;
+        border-color: rgba(255, 255, 255, 0.2);
+        border: none;
+    }
+}
 </style>

+ 37 - 6
commandCenter/src/views/smallModule/proportionOfAlarmTypes.vue

@@ -9,7 +9,7 @@
         </div>
         <div class="modeBlock-content">
             <div class="totals">
-                <span>100</span>
+                <span>{{ total || 0 }}</span>
                 <span class="numbers">告警总数</span>
             </div>
             <zz-echart :option="clientOptions" class="chart"></zz-echart>
@@ -18,19 +18,50 @@
 </template>
 <script>
 import { ringType } from './indexOptionChart';
+import allcommunit from './allcommunit';
 export default {
+    mixins: [allcommunit],
     data() {
         return {
+            mixins_query: {
+                communityId: ''
+            },
+            total: 0,
             clientOptions: ringType(
                 [],
                 [
-                    { value: 0, name: '男' },
-                    { value: 0, name: '' }
+                    { value: 0, name: '水表' },
+                    { value: 0, name: '电表' }
                 ],
                 {},
-                { type: '%', total: 0 }
             )
         };
+    },
+    methods: {
+        getData() {
+            this.$http
+                .get('/sc-community/countDeviceAlarm', this.mixins_query)
+                .then(({ status, data, msg }) => {
+                    if (status == 0 && !!data) {
+                        let two = [],
+                            total = 0;
+
+                        data.map((item) => {
+                            two.push({
+                                value: item.total,
+                                name: item.categoryName
+                            });
+                            total += item.total;
+                        });
+                        this.total = total;
+                        this.clientOptions = ringType([], two, {});
+                    }
+                })
+                .catch((err) => {});
+        }
+    },
+    created() {
+        this.getData();
     }
 };
 </script>
@@ -59,7 +90,7 @@ export default {
         }
     }
 }
-.modeBlock-title-left .text-leftIcon{
-    background-image: url("~@/assets/img/homeIcon/icon_gaojingleixing.png");
+.modeBlock-title-left .text-leftIcon {
+    background-image: url('~@/assets/img/homeIcon/icon_gaojingleixing.png');
 }
 </style>

+ 55 - 2
commandCenter/src/views/smallModule/waterConsumption.vue

@@ -1,11 +1,17 @@
 <template>
-    <div class="modeBlock ">
+    <div class="modeBlock">
         <div class="modeBlock-title">
             <div class="modeBlock-title-left">
                 <span class="text-leftIcon"></span>
                 <span class="text">7日用水量</span>
                 <span class="text-rightIcon"></span>
             </div>
+            <div class="modeBlock-title-right">
+                <el-select v-model="mixins_query.useType" placeholder="全部" clearable class="saveColumn-select" @change="getData">
+                    <el-option label="房间表" :value="1"></el-option>
+                    <el-option label="公摊表" :value="2"></el-option>
+                </el-select>
+            </div>
         </div>
         <div class="modeBlock-content">
             <zz-echart :option="clientOptions" class="chart"></zz-echart>
@@ -14,9 +20,17 @@
 </template>
 <script>
 import { columnOptionsChart } from './indexOptionChart';
+import allcommunit from './allcommunit';
 export default {
+    mixins: [allcommunit],
     data() {
         return {
+            mixins_query: {
+                communityId: '',
+                useType: '',
+                type: 3,
+                categoryId: 1
+            },
             clientOptions: columnOptionsChart(
                 '(吨)',
                 ['01-01', '01-02', '01-03', '01-04', '01-05', '01-06', '01-07'],
@@ -25,7 +39,29 @@ export default {
                 10
             )
         };
-    } 
+    },
+    methods: {
+        getData() {
+            this.$http
+                .get('/sc-energy/overview/getCommunityQuantityTrend', this.mixins_query)
+                .then(({ status, data, msg }) => {
+                    if (status == 0 && !!data) {
+                        let times = [],
+                            datas = [];
+
+                        data.map((item) => {
+                            times.push(this.$moment(item.date, "YYYY-MM-DD").format('MM-DD '));
+                            datas.push(item.value);
+                        });
+                        this.clientOptions = columnOptionsChart('(吨)', times, [{ data: datas, name: '用水量' }], [], 10);
+                    }
+                })
+                .catch((err) => {});
+        }
+    },
+    created() {
+        this.getData();
+    }
 };
 </script>
 <style lang="scss" scoped>
@@ -42,4 +78,21 @@ export default {
     height: 26px;
     background-image: url('~@/assets/img/homeIcon/icon_shui.png');
 }
+.modeBlock-title-left {
+    display: inline-block;
+}
+.modeBlock-title-right {
+    // display: inline-block;
+    float: right;
+}
+.saveColumn-select {
+    width: 100px;
+    margin-left: 10;
+    /deep/ .el-input__inner {
+        background: transparent;
+        color: white;
+        border-color: rgba(255, 255, 255, 0.2);
+        border: none;
+    }
+}
 </style>

+ 38 - 6
commandCenter/src/views/smallModule/workOrderProcessingStatus.vue

@@ -9,7 +9,7 @@
         </div>
         <div class="modeBlock-content">
             <div class="totals">
-                <span>100</span>
+                <span>{{ total || 0 }}</span>
                 <span class="numbers">工单总数</span>
             </div>
             <zz-echart :option="clientOptions" class="chart"></zz-echart>
@@ -18,19 +18,51 @@
 </template>
 <script>
 import { ringType } from './indexOptionChart';
+import allcommunit from './allcommunit';
 export default {
+    mixins: [allcommunit],
     data() {
         return {
+            mixins_query: {
+                communityId: ''
+            },
+            total: 0,
             clientOptions: ringType(
                 [],
                 [
-                    { value: 0, name: '男' },
-                    { value: 0, name: '女' }
+                    { value: 0, name: '关闭' },
+                    { value: 0, name: '待处理' },
+                    { value: 0, name: '处理中' },
+                    { value: 0, name: '已完成(超时)' },
+                    { value: 0, name: '已完成' },
                 ],
                 {},
-                { type: '%', total: 0 }
             )
         };
+    },
+    methods: {
+        getData() {
+            this.$http
+                .get('/sc-community/statisticWorkOrderLast7Days', this.mixins_query)
+                .then(({ status, data, msg }) => {
+                    if (status == 0 && !!data) {
+                        let two = [];
+
+                        for (let a in data.datas) {
+                            two.push({
+                                value: data.datas[a],
+                                name: a
+                            });
+                        }
+                        this.total = data.total;
+                        this.clientOptions = ringType([], two, {});
+                    }
+                })
+                .catch((err) => {});
+        }
+    },
+    created() {
+        this.getData();
     }
 };
 </script>
@@ -59,7 +91,7 @@ export default {
         }
     }
 }
-.modeBlock-title-left .text-leftIcon{
-    background-image: url("~@/assets/img/homeIcon/icon_gongdan.png");
+.modeBlock-title-left .text-leftIcon {
+    background-image: url('~@/assets/img/homeIcon/icon_gongdan.png');
 }
 </style>

+ 1 - 1
commandCenter/vue.config.js

@@ -118,7 +118,7 @@ module.exports = {
                     // "^/operation-manager": ""
                 }
             },
-            '/zoniot-water': {
+            '/sc-energy': {
                 target: envConfig.baseApi,
                 ws: true, // 代理的WebSockets
                 changeOrigin: true, // 允许websockets跨域