Hwt vor 3 Jahren
Ursprung
Commit
5be29dc674

+ 8 - 2
operationSupport/src/views/newWorkBench/components/index.js

@@ -49,7 +49,10 @@ export default {
         taskType: (resolve) => require([`@views/${comUrl}facilityInspections/taskType.vue`], resolve),
         alarmInformation: (resolve) => require([`@views/${comUrl}alarmManagement/alarmInformation.vue`], resolve),
         overallCommunity: (resolve) => require([`@views/${comUrl}communityManagement/overallCommunity.vue`], resolve),
-        houseClick: (resolve) => require([`@views/${comUrl}houseClick.vue`], resolve)
+        houseClick: (resolve) => require([`@views/${comUrl}houseClick.vue`], resolve),
+
+        patrolPersonnel: (resolve) => require([`@views/${comUrl}workbenchMent/patrolPersonnel.vue`], resolve),
+        patrolTaskRate: (resolve) => require([`@views/${comUrl}workbenchMent/patrolTaskRate.vue`], resolve)
     },
     data() {
         return {
@@ -77,7 +80,10 @@ export default {
                 20: 'taskType',
                 21: 'alarmInformation',
                 22: 'overallCommunity',
-                23: 'houseClick'
+                23: 'houseClick',
+
+                24: 'patrolPersonnel',
+                25: 'patrolTaskRate'
             }
         };
     },

+ 172 - 0
operationSupport/src/views/newWorkBench/components/indexOptionChart.js

@@ -574,3 +574,175 @@ export const columnOptionsChartName = (name = '', xAxis = [], series = [], color
     };
     return option;
 };
+
+// 柱状图堆叠
+export const columnOptionsChartStacking = (name = '', xAxis = [], series = [], color = [], barWidth = 6) => {
+    let defaultData = [
+        {
+            name: '',
+            type: 'bar',
+            data: []
+        }
+    ];
+    let defaultColor = [
+        // ['#0EAEFF', '#85E9FF'],
+        ['#0EAEFF', '#0EAEFF'],
+        ['#85E9FF', '#85E9FF']
+        // ['#F0646C', '#F4994E']
+    ];
+
+    let seriesConfiguration = () => {
+        let seriesData = [
+            {
+                type: 'bar',
+                data: [],
+                name: '',
+                barWidth: barWidth,
+                itemStyle: {
+                    normal: {
+                        barBorderRadius: [15, 15, 0, 0],
+                        color: getColor(color[0] || defaultColor[0])
+                    }
+                },
+                barGap: '100%'
+            },
+            {
+                type: 'bar',
+                data: [],
+                name: '',
+                barWidth: barWidth,
+                itemStyle: {
+                    normal: {
+                        barBorderRadius: [15, 15, 0, 0],
+                        color: getColor(color[1] || defaultColor[1])
+                    }
+                },
+                barGap: '-100%',
+                z: '1'
+            }
+        ];
+        series.map((item, index) => {
+            seriesData[index].data = item.data;
+            seriesData[index].name = item.name;
+        });
+        return seriesData;
+    };
+    let option = {
+        tooltip: {
+            trigger: 'axis',
+            axisPointer: {
+                type: 'shadow',
+                shadowStyle: {
+                    color: {
+                        type: 'linear',
+                        x: 0,
+                        y: 0,
+                        x2: 0,
+                        y2: 1,
+                        colorStops: [
+                            {
+                                offset: 0,
+                                color: 'rgba(31,207,245,0)' // 0% 处的颜色
+                            },
+                            {
+                                offset: 0.8,
+                                color: 'rgba(31,207,245,0.15)' // 100% 处的颜色
+                            },
+                            {
+                                offset: 0.2,
+                                color: 'rgba(31,207,245,0.15)' // 100% 处的颜色
+                            },
+                            {
+                                offset: 1,
+                                color: 'rgba(31,207,245,0.05)'
+                            }
+                        ],
+                        global: false // 缺省为 false
+                    }
+                },
+                crossStyle: {
+                    shadowBlur: 30,
+                    shadowColor: 'rgba(0, 0, 0, 0.5)'
+                }
+            },
+            extraCssText: 'background:rgba(33,40,56,0.6);border-radius:4px;padding:6px 10px',
+            textStyle: {
+                fontSize: 12,
+                color: '#FFFFFF'
+            },
+            formatter(param) {
+                let el = ``;
+                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, 
+            ${item.color.colorStops[0].color}, ${item.color.colorStops[1].color})"></span>
+                        <span>${item.seriesName}:${item.value}${name}</span>
+                      </p>`;
+                });
+                el += ``;
+                return el;
+            }
+        },
+        grid: {
+            top: 50,
+            left: 0,
+            bottom: 0,
+            right: 0,
+            containLabel: true
+        },
+        xAxis: {
+            type: 'category',
+            axisLine: {
+                show: false // 不显示坐标轴
+            },
+            axisTick: {
+                show: false // 不显示坐标轴刻度
+            },
+            axisLabel: {
+                formatter: function (params, index) {
+                    return params;
+                },
+                color: '#9B9DA5',
+                margin: 15
+            },
+            data: !!xAxis.length ? xAxis : defaultName
+        },
+        yAxis: {
+            type: 'value',
+            splitNumber: 4,
+            name: name,
+            axisLine: {
+                show: false
+            },
+            axisTick: {
+                show: false
+            },
+            axisLabel: {
+                color: '#9B9DA5',
+                margin: 15,
+                textStyle: {
+                    align: 'right',
+                    baseline: 'middle'
+                }
+            },
+            nameLocation: 'end',
+            nameTextStyle: { color: '#9B9DA5', padding: [0, 0, 0, -40] },
+            splitLine: {
+                lineStyle: {
+                    type: 'dotted',
+                    width: 0.5
+                }
+            }
+        },
+        legend: {
+            show: false,
+            x: 'right',
+            icon: 'circle',
+            itemWidth: 8, // 图例图形宽度
+            itemHeight: 8,
+            itemGap: 20
+        },
+        series: seriesConfiguration() || defaultData
+    };
+    return option;
+};

+ 38 - 21
operationSupport/src/views/newWorkBench/components/workbenchMent/patrolPersonnel.vue

@@ -5,14 +5,14 @@
         <div class="model-title-text">巡更人员任务执行情况</div>
         <div class="model-title-right">
           <el-date-picker
-            value-format="yyyy"
+            value-format="yyyy-MM"
             v-model="date"
-            type="year"
-            placeholder="选择"
+            type="month"
+            placeholder="选择"
             class="saveColumn-select"
             :clearable="false"
+            @change="changeTime"
           >
-            <!-- @change="changeTime" -->
           </el-date-picker>
         </div>
       </div>
@@ -30,8 +30,8 @@
   </div>
 </template>
 <script>
-import { columnOptionsChart } from './indexOptionChart';
-import permissionComponent from './permissionComponent';
+import { columnOptionsChartStacking } from '../indexOptionChart';
+import permissionComponent from '../permissionComponent';
 let dataArr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
 export default {
   mixins: [permissionComponent],
@@ -43,31 +43,48 @@ export default {
         type: ''
       },
       date: '',
-      clientOptions: columnOptionsChart('(个)', [], [{ data: dataArr, name: '巡更人员任务执行情况' }], [], 10)
+      clientOptions: columnOptionsChartStacking(
+        '(个)',
+        ['name1', 'name2', 'name3'],
+        [
+          {
+            data: [10, 20, 15],
+            name: '任务总数'
+          },
+          {
+            data: [20, 30, 10],
+            name: '已完成'
+          }
+        ],
+        [],
+        10
+      ),
+      permissionFiltering: '1'
     };
   },
   methods: {
     getData () {
-      this.$http.get('/sc-community/statisticServiceTrends', this.mixins_query).then(({ data, msg, status }) => {
-        if (status == 0 && !!data) {
-          let timeDay = [],
-            datas = [];
-          data.map((item) => {
-            timeDay.push(item.date);
-            datas.push(item.data);
-          });
-          this.clientOptions = columnOptionsChart('(分)', timeDay, [{ data: datas, name: '巡更人员任务执行情况' }], [], 10);
-        }
-      });
+      // this.$http.get('/sc-community/statisticServiceTrends', this.mixins_query).then(({ data, msg, status }) => {
+      //   if (status == 0 && !!data) {
+      //     let timeDay = [],
+      //       datas = [];
+      //     data.map((item) => {
+      //       timeDay.push(item.date);
+      //       datas.push(item.data);
+      //     });
+      //     this.clientOptions = columnOptionsChart('(分)', timeDay, [{ data: datas, name: '巡更人员任务执行情况' }], [], 10);
+      //   }
+      // });
     },
     changeTime (v) {
-      this.mixins_query.date = v + '-01-01';
+      debugger
+      this.mixins_query.date = v;
       this.getData();
     }
   },
   created () {
-    this.date = this.$moment().format('YYYY');
-    this.mixins_query.date = this.$moment().format('YYYY') + '-01-01';
+    this.mixins_query.date = this.$moment().format('YYYY-MM') + '-01';
+    this.date = this.$moment().format('YYYY-MM');
     this.getData();
   }
 };

+ 176 - 0
operationSupport/src/views/newWorkBench/components/workbenchMent/patrolTaskRate.vue

@@ -0,0 +1,176 @@
+<template>
+  <div class="modelBlock">
+    <template v-if="permissionFiltering">
+      <div class="model-title">
+        <div class="model-title-text">巡更任务完成率</div>
+        <div class="model-title-right">
+          <el-date-picker
+            value-format="yyyy-MM"
+            v-model="date"
+            type="month"
+            placeholder="选择月"
+            class="saveColumn-select"
+            @change="changeTime"
+            :clearable="false"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <div class="model-content">
+        <zz-echart
+          :option="clientOptions"
+          class="chart"
+        ></zz-echart>
+        <div class="totals">
+          <span>{{ total }}</span>
+          <span class="numbers">任务总数</span>
+        </div>
+      </div>
+    </template>
+    <no-permission
+      v-else
+      tipsText="巡检任务类型分布"
+    ></no-permission>
+  </div>
+</template>
+<script>
+import { GradualChange, ringType } from '../indexOptionChart';
+import permissionComponent from '../permissionComponent';
+const colors = [
+  GradualChange('#22D8FF', '#00B2FF'),
+  GradualChange('#F0646C', '#F4994E'),
+  GradualChange('#5EEDCC ', '#24C3F1'),
+  GradualChange('#7178FF', '#D2A4FF'),
+  GradualChange('#884DD2', '#DF63CC')
+];
+export default {
+  mixins: [permissionComponent],
+  data () {
+    return {
+      defaultModel: {
+        permissUrl: 'ownerManagement/index',
+        titleName: '住户管理'
+      },
+      mixins_query: {
+        communityId: '',
+        date: ''
+      },
+      date: '',
+      total: 0,
+      clientOptions: ringType(
+        colors,
+        [
+          { value: 0, name: '业主' },
+          { value: 0, name: '亲属' },
+          { value: 0, name: '租客' },
+          { value: 0, name: '租户管理员' },
+          { value: 0, name: '普通员工' }
+        ],
+        {},
+        { type: 'number', total: 0 }
+      )
+    };
+  },
+  methods: {
+    getData () {
+      this.$http.get('/sc-community/statisticInspectionTaskType', this.mixins_query).then(({ data, msg, status }) => {
+        if (status == 0 && !!data.datas) {
+          this.clientOptions = ringType(colors, this.eachartObj(data), {}, { type: 'number', total: data.total });
+        } else {
+          this.clientOptions = ringType(
+            colors,
+            [
+              { value: 0, name: '业主' },
+              { value: 0, name: '亲属' },
+              { value: 0, name: '租客' },
+              { value: 0, name: '租户管理员' },
+              { value: 0, name: '普通员工' }
+            ],
+            {},
+            { type: 'number', total: 0 }
+          );
+        }
+      });
+    },
+    changeTime (v) {
+      this.mixins_query.date = v + '-01';
+      this.getData();
+    },
+    eachartObj (data) {
+      this.total = data.total || 0;
+      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') + '-01';
+    this.date = this.$moment().format('YYYY-MM');
+    this.getData();
+  }
+};
+</script>
+<style lang="scss" scoped>
+@import '@assets/css/public-style.scss';
+.modelBlock {
+    height: 100%;
+    padding: rem(15) rem(20) rem(20);
+    background: #171f32;
+    .model-title {
+        line-height: rem(30);
+        display: flex;
+        justify-content: space-between;
+        padding-bottom: rem(15);
+        border-bottom: 1px solid rgba(224, 225, 227, 0.2);
+        .saveColumn-select {
+            width: rem(120);
+            margin-left: rem(20);
+            /deep/ .el-input__inner {
+                background: transparent;
+                color: white;
+                border-color: rgba(255, 255, 255, 0.2);
+            }
+        }
+        .model-title-text {
+            color: white;
+        }
+    }
+    .model-content {
+        height: calc(100% - #{rem(45)});
+        display: flex;
+        justify-content: space-between;
+        font-size: 12px;
+        position: relative;
+        .totals {
+            position: absolute;
+            right: rem(10);
+            top: rem(26);
+            width: rem(120);
+            height: rem(40);
+            background: linear-gradient(90deg, rgba(14, 174, 255, 0.5) 0%, rgba(14, 174, 255, 0) 100%);
+            border-radius: 5px;
+            font-size: 20px;
+            padding: rem(8) rem(10);
+            display: flex;
+            justify-content: space-between;
+            .numbers {
+                font-size: 12px;
+                opacity: 0.5;
+                line-height: rem(32);
+            }
+        }
+    }
+}
+</style>

+ 14 - 0
operationSupport/src/views/newWorkBench/template/leftAssembly.vue

@@ -265,6 +265,20 @@ export default {
           imgPng: require('@assets/img/formulation/img_tongji@2x.png'),
           imgIcon: require('@assets/img/formulation/tag_4x@2x.png')
         },
+        {
+          data_id: 24,
+          title: '巡更人员任务执行情况',
+          type: 8,
+          imgPng: require('@assets/img/formulation/img_zhuzhuangtu@2x.png'),
+          imgIcon: require('@assets/img/formulation/tag_2x@2x.png')
+        },
+        {
+          data_id: 25,
+          title: '巡更任务完成率',
+          type: 8,
+          imgPng: require('@assets/img/formulation/img_tongji@2x.png'),
+          imgIcon: require('@assets/img/formulation/tag_4x@2x.png')
+        },
 
       ],
       componentsValue: 0

+ 4 - 3
smart/src/views/rechargeRecord/index.js

@@ -51,9 +51,10 @@ export default {
                     label: '充值数额',
                     // prop: 'amount',  chargeNumber
                     prop: 'chargeNumber',
-                    format(val) {
-                        return val + '月';
-                    }
+                    slot: 'chargeNumbers'
+                    // format(val) {
+                    //     return val + '月';
+                    // }
                 },
                 {
                     label: '充值时段',

+ 7 - 0
smart/src/views/rechargeRecord/index.vue

@@ -66,6 +66,13 @@
       >
         {{(scope.row.startTime).substring(0 ,10)  + '-' +(scope.row.endTime).substring(0 ,10)}}
 
+      </template>
+      <template
+        scope="scope"
+        slot="chargeNumbers"
+      >
+        {{(scope.row.chargeNumber) + (scope.row.chargeUnit == 1 ? '月' :scope.row.chargeUnit == 2 ? '天':scope.row.chargeUnit == 3 ? '小时':'次' )}}
+
       </template>
       <template
         slot-scope="scope"

+ 8 - 7
smart/src/views/temporaryStopCharge/setpPage/details.vue

@@ -84,10 +84,11 @@ export default {
           name: '收费人员',
           label: ''//chargePeople  8
         },
+        // {
+        //   name: '创建时间',//createTime  9
+        //   label: ''
+        // },
         {
-          name: '创建时间',//createTime  9
-          label: ''
-        }, {
           name: '支付时间',//payTime    10
           label: ''
         },
@@ -117,10 +118,10 @@ export default {
     this.cols[5].label = this.params.row.payMethod == 1 ? '微信' : this.params.row.payMethod == 2 ? '支付宝' : this.params.row.payMethod == 3 ? '现金' : this.params.row.payMethod == 4 ? '预存' : '其他' || '--';
 
     this.cols[8].label = this.params.row.chargePeople || '--';
-    this.cols[9].label = this.params.row.createTime || '--';
-    this.cols[10].label = this.params.row.payTime || '--';
-    this.cols[11].label = this.params.row.orderNo || '--';
-    this.cols[12].label = this.params.row.wxOrderNo || '--';
+    // this.cols[9].label = this.params.row.createTime || '--';
+    this.cols[9].label = this.params.row.payTime || '--';
+    this.cols[10].label = this.params.row.orderNo || '--';
+    this.cols[11].label = this.params.row.wxOrderNo || '--';
 
 
     this.licenseNumber = this.params.row.platNo || '--';