Hwt há 3 anos atrás
pai
commit
4e2f576b09

+ 57 - 61
operationSupport/src/views/newWorkBench/components/permissionComponent.js

@@ -2,67 +2,63 @@ import modularLoading from '@views/newWorkBench/template/modularLoading.vue';
 import noPermission from '@views/newWorkBench/template/noPermission.vue';
 import { mapState } from 'vuex';
 export default {
-  components: {
-    //默认加载
-    modularLoading,
-    noPermission
-  },
-  data() {
-    return {
-      loadding: true,
-      defaultModel: {
-        permissUrl: "",
-        titleName: ""
-      },
-      permisStatus: false
-    }
-  },
-  computed: {
-    //全局社区
-    ...mapState(['homeCommunityAll']),
-    // 定义模块显示隐藏
-    permissionFiltering() {
-      let arr = this.$store.getters['getMenuList'] || [];
-      if (arr.length !== 0) {
-        setTimeout(() => {
-          this.loadding = false;
-        }, 700)
-        this.permissionStr(arr)
-        return this.permisStatus;
-      } else {
-        return this.permisStatus;
-      }
-    }
-  },
-  watch: {
-    //全局社区接口调用
-    homeCommunityAll(val) {
-      try {
-        this.mixins_query.communityId = val;
-        this.getData();
-      } catch {
-
-      }
-
-    }
-  },
-  methods: {
-    // 需要什么权限才能查看
-    filterFuntion(arr, nameTitle, linkPaths) {
-      arr.map((item) => {
-        if (item.name == nameTitle && item.linkPath == linkPaths) {
-          this.permisStatus = true
-        } else if (!!item.children) {
-          this.filterFuntion(item.children, nameTitle, linkPaths);
+    components: {
+        //默认加载
+        modularLoading,
+        noPermission
+    },
+    data() {
+        return {
+            loadding: true,
+            defaultModel: {
+                permissUrl: '',
+                titleName: ''
+            },
+            permisStatus: false
+        };
+    },
+    computed: {
+        //全局社区
+        ...mapState(['homeCommunityAll']),
+        // 定义模块显示隐藏
+        permissionFiltering() {
+            let arr = this.$store.getters['getMenuList'] || [];
+            if (arr.length !== 0) {
+                setTimeout(() => {
+                    this.loadding = false;
+                }, 700);
+                this.permissionStr(arr);
+                return this.permisStatus;
+            } else {
+                return this.permisStatus;
+            }
         }
-      });
-
     },
-    permissionStr(arr) {
-      const { permissUrl, titleName } = this.defaultModel;
-      if (!!permissUrl && !!titleName) {
-        return this.filterFuntion(arr, titleName, permissUrl);
-      }
+    watch: {
+        //全局社区接口调用
+        homeCommunityAll(val) {
+            try {
+                this.mixins_query.communityId = val;
+                this.getData();
+            } catch {}
+        }
     },
-  }
-}
+    methods: {
+        // 需要什么权限才能查看
+        filterFuntion(arr, nameTitle, linkPaths) {
+            arr.map((item) => {
+                if (item.name == nameTitle && item.linkPath == linkPaths) {
+                    this.permisStatus = true;
+                } else if (!!item.children) {
+                    this.filterFuntion(item.children, nameTitle, linkPaths);
+                }
+            });
+        },
+        permissionStr(arr) {
+            const { permissUrl, titleName } = this.defaultModel;
+            if (!!permissUrl && !!titleName) {
+                return this.filterFuntion(arr, titleName, permissUrl);
+            }
+        }
+    }
+};

+ 0 - 1
operationSupport/src/views/newWorkBench/components/workbenchMent/distributionSuggestion.vue

@@ -84,7 +84,6 @@ export default {
       this.getData();
     },
     eachartObj (data) {
-      debugger
       this.total = data.total || 0;
       let newData = [];
       let DataName = {

+ 0 - 2
operationSupport/src/views/newWorkBench/components/workbenchMent/householdDistribution.vue

@@ -62,10 +62,8 @@ export default {
     getData () {
       this.$http.get('/sc-community/statisticGeneration', this.mixins_query)
         .then(({ status, data, msg }) => {
-          debugger
           if (status == 0) {
             let name = ['0-18岁', '19-30岁', '31-40岁', '41-50岁', '51-60岁', '60岁以上']
-            debugger
             let date = []
             let dateRes = [];
             for (let a in data.datas) {

+ 0 - 3
operationSupport/src/views/newWorkBench/components/workbenchMent/operationMaintenancePersonnel.vue

@@ -69,7 +69,6 @@ export default {
   methods: {
     getData () {
       this.$http.get('/sc-community/statisticWorkOrderTask', this.mixins_query).then(({ data, msg, status }) => {
-        debugger
         console.log('data', data);
         if (status == 0 && !!data) {
           let dataName = [];
@@ -85,13 +84,11 @@ export default {
       })
     },
     changeTime (v) {
-      debugger
       this.mixins_query.date = v + '-01';
       this.getData();
     }
   },
   created () {
-    debugger
     this.mixins_query.date = this.$moment().format('YYYY-MM') + '-01';
     this.date = this.$moment().format('YYYY-MM');
     this.getData();

+ 0 - 1
operationSupport/src/views/newWorkBench/components/workbenchMent/paidAnalysis.vue

@@ -113,7 +113,6 @@ export default {
   methods: {
     getData () {
       this.$http.get('/sc-charge/charge/report/months/total', this.mixins_query).then(({ status, data, msg }) => {
-        debugger
         if (status == 0) {
           if (data != null) {
             let dateTimes = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];

+ 0 - 3
operationSupport/src/views/newWorkBench/components/workbenchMent/patrolPersonnel.vue

@@ -69,7 +69,6 @@ export default {
   methods: {
     getData () {
       this.$http.get('/sc-community/statisticPatrolPersonnelSituation', this.mixins_query).then(({ data, msg, status }) => {
-        debugger
         console.log('data', data);
         if (status == 0 && !!data) {
           let dataName = [];
@@ -85,13 +84,11 @@ export default {
       })
     },
     changeTime (v) {
-      debugger
       this.mixins_query.date = v + '-01';
       this.getData();
     }
   },
   created () {
-    debugger
     this.mixins_query.date = this.$moment().format('YYYY-MM') + '-01';
     this.date = this.$moment().format('YYYY-MM');
     this.getData();

+ 172 - 160
operationSupport/src/views/newWorkBench/components/workbenchMent/proportionIncomeMode.vue

@@ -1,178 +1,190 @@
 <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>
-                    <el-select
-                        v-model="mixins_query.chargeType"
-                        placeholder="所有费用"
-                        clearable
-                        class="saveColumn-select"
-                        @change="getData"
-                    >
-                        <el-option v-for="(item, index) in amountType" :label="item.name" :value="item.value" :key="index"></el-option>
-                    </el-select>
-                </div>
-            </div>
-            <div class="model-content">
-                <zz-echart :option="clientOptions" class="chart"></zz-echart>
-                <div class="totals">
-                    <span
-                        style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
-                        :title="unitConvert(total).num + unitConvert(total).unit"
-                        >{{ unitConvert(total).num }}{{ unitConvert(total).unit }}</span
-                    >
-                    <span class="numbers" style="white-space: nowrap">总收入</span>
-                </div>
-            </div>
-        </template>
-        <no-permission v-else tipsText="收入方式占比"></no-permission>
-    </div>
+  <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>
+          <el-select
+            v-model="mixins_query.chargeType"
+            placeholder="所有费用"
+            clearable
+            class="saveColumn-select"
+            @change="getData"
+          >
+            <el-option
+              v-for="(item, index) in amountType"
+              :label="item.name"
+              :value="item.value"
+              :key="index"
+            ></el-option>
+          </el-select>
+        </div>
+      </div>
+      <div class="model-content">
+        <zz-echart
+          :option="clientOptions"
+          class="chart"
+        ></zz-echart>
+        <div class="totals">
+          <span
+            style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
+            :title="unitConvert(total).num + unitConvert(total).unit"
+          >{{ unitConvert(total).num }}{{ unitConvert(total).unit }}</span>
+          <span
+            class="numbers"
+            style="white-space: nowrap"
+          >总收入</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')
+  GradualChange('#22D8FF', '#00B2FF'),
+  GradualChange('#F0646C', '#F4994E'),
+  GradualChange('#5EEDCC ', '#24C3F1'),
+  GradualChange('#7178FF', '#D2A4FF'),
+  GradualChange('#884DD2', '#DF63CC')
 ];
 export default {
-    mixins: [permissionComponent],
-    data() {
-        return {
-            defaultModel: {
-                permissUrl: '14',
-                titleName: '收费管理'
-            },
-            mixins_query: {
-                communityId: '',
-                date: '',
-                chargeType: ''
-            },
-            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 }
-            ),
-            amountType: [
-                {
-                    value: 1,
-                    name: '物业费'
-                },
-                {
-                    value: 2,
-                    name: '水费'
-                },
-                {
-                    value: 3,
-                    name: '电费'
-                },
-                {
-                    value: 4,
-                    name: '车位费'
-                },
-                {
-                    value: 6,
-                    name: '卫生费'
-                },
-                {
-                    value: 7,
-                    name: '其他费用'
-                }
-            ]
-        };
-    },
-    methods: {
-        getData() {
-            this.$http.get('/sc-community/statisticIncomeMethod', this.mixins_query).then(({ data, msg, status }) => {
-                debugger;
-                if (status == 0 && !!data.datas) {
-                    this.clientOptions = ringType(colors, this.eachartObj(data), {}, { type: 'number', total: this.total });
-                }
-            });
+  mixins: [permissionComponent],
+  data () {
+    return {
+      defaultModel: {
+        permissUrl: '14',
+        titleName: '收费管理'
+      },
+      mixins_query: {
+        communityId: '',
+        date: '',
+        chargeType: ''
+      },
+      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 }
+      ),
+      amountType: [
+        {
+          value: 1,
+          name: '物业费'
         },
-        changeTime(v) {
-            this.mixins_query.date = v + '-01';
-            this.getData();
+        {
+          value: 2,
+          name: '水费'
         },
-        unitConvert(num) {
-            var moneyUnits = ['元', '万元', '亿元', '万亿'];
-            var dividend = 10000;
-            var curentNum = num;
-            //转换数字
-            var curentUnit = moneyUnits[0];
-            //转换单位
-            for (var i = 0; i < 4; i++) {
-                curentUnit = moneyUnits[i];
-                if (this.strNumSize(curentNum) < 5) {
-                    break;
-                }
-                curentNum = curentNum / dividend;
-            }
-            var m = { num: '', unit: '' };
-            m.num = curentNum.toFixed(2);
-            m.unit = curentUnit;
-            return m;
+        {
+          value: 3,
+          name: '电费'
         },
-        strNumSize(tempNum) {
-            var stringNum = tempNum.toString();
-            var index = stringNum.indexOf('.');
-            var newNum = stringNum;
-            if (index != -1) {
-                newNum = stringNum.substring(0, index);
-            }
-            return newNum.length;
+        {
+          value: 4,
+          name: '车位费'
         },
-        eachartObj(data) {
-            this.total = data.total || 0;
-            let typeName = {
-                1: '微信在线',
-                2: '支付宝',
-                3: '现金',
-                4: '预存',
-                5: '其他',
-                6: '刷卡',
-                7: '微信扫码'
-            };
-            let newData = [];
-            for (let a in data.datas) {
-                newData.push({
-                    value: this.unitConvert(data.datas[a]).num,
-                    name: typeName[a]
-                });
-                this.total = this.total + data.datas[a];
-            }
-            return newData;
+        {
+          value: 6,
+          name: '卫生费'
+        },
+        {
+          value: 7,
+          name: '其他费用'
         }
+      ]
+    };
+  },
+  methods: {
+    getData () {
+      this.$http.get('/sc-community/statisticIncomeMethod', this.mixins_query).then(({ data, msg, status }) => {
+        if (status == 0 && !!data.datas) {
+          this.clientOptions = ringType(colors, this.eachartObj(data), {}, { type: 'number', total: this.total });
+        }
+      });
+    },
+    changeTime (v) {
+      this.mixins_query.date = v + '-01';
+      this.getData();
+    },
+    unitConvert (num) {
+      var moneyUnits = ['元', '万元', '亿元', '万亿'];
+      var dividend = 10000;
+      var curentNum = num;
+      //转换数字
+      var curentUnit = moneyUnits[0];
+      //转换单位
+      for (var i = 0; i < 4; i++) {
+        curentUnit = moneyUnits[i];
+        if (this.strNumSize(curentNum) < 5) {
+          break;
+        }
+        curentNum = curentNum / dividend;
+      }
+      var m = { num: '', unit: '' };
+      m.num = curentNum.toFixed(2);
+      m.unit = curentUnit;
+      return m;
+    },
+    strNumSize (tempNum) {
+      var stringNum = tempNum.toString();
+      var index = stringNum.indexOf('.');
+      var newNum = stringNum;
+      if (index != -1) {
+        newNum = stringNum.substring(0, index);
+      }
+      return newNum.length;
     },
-    created() {
-        this.mixins_query.date = this.$moment().format('YYYY-MM') + '-01';
-        this.date = this.$moment().format('YYYY-MM');
-        this.getData();
+    eachartObj (data) {
+      this.total = data.total || 0;
+      let typeName = {
+        1: '微信在线',
+        2: '支付宝',
+        3: '现金',
+        4: '预存',
+        5: '其他',
+        6: '刷卡',
+        7: '微信扫码'
+      };
+      let newData = [];
+      for (let a in data.datas) {
+        newData.push({
+          value: this.unitConvert(data.datas[a]).num,
+          name: typeName[a]
+        });
+        this.total = this.total + data.datas[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>