From efc7b6bc4c6b77bfd4a158fea1e287e9d1ca78d5 Mon Sep 17 00:00:00 2001
From: zhengpz <1838927346@qq.com>
Date: Fri, 12 Nov 2021 22:19:51 +0800
Subject: [PATCH] 改智能分析数据概览部分

---
 src/views/home/index.vue                              |    2 
 src/views/securityUnitOperation/economicAnalysis.vue  |   76 ++++++++++++++++++++-----------------
 src/views/securityUnitOperation/operationAnalysis.vue |   12 +++---
 3 files changed, 48 insertions(+), 42 deletions(-)

diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 8a3cadb..4a07c9b 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -20,7 +20,7 @@
           </div>
           <div class="leftEchartTitle leftEchartTitle2">
             <div class="block1"></div>
-            <span>保安培训公司</span>
+            <span>保安培训学校</span>
             <span>{{ leftData.px }}</span>
             <span>个</span>
           </div>
diff --git a/src/views/securityUnitOperation/economicAnalysis.vue b/src/views/securityUnitOperation/economicAnalysis.vue
index 0888a17..6226110 100644
--- a/src/views/securityUnitOperation/economicAnalysis.vue
+++ b/src/views/securityUnitOperation/economicAnalysis.vue
@@ -76,8 +76,15 @@
               <span>较上月增加{{ socialSecurity.addNum }}人</span>
             </div>
             <div class="box-card">
-              <span>社保缴纳总额(元)</span>
-              <span>{{ socialSecurity.money }}</span>
+              <template v-if="socialSecurity.money / 10000 > 1">
+                <span>社保缴纳总额(万元)</span>
+                <span>{{ (socialSecurity.money / 10000).toFixed(2) }}</span>
+              </template>
+              <template v-else>
+                <span>社保缴纳总额(元)</span>
+                <span>{{ socialSecurity.money }}</span>
+              </template>
+
               <span>较上月增加{{ socialSecurity.addMoney }}元</span>
             </div>
             <div class="box-card">
@@ -130,7 +137,7 @@
   queryYearSoil,
   queryYearAn,
   queryYearPz,
-  queryYearKh,
+  queryYearKh
 } from "../../api/securityUnitOperation/securityUnitOperation";
 export default {
   data() {
@@ -141,28 +148,28 @@
       options0: [
         {
           value: "2012",
-          label: "2012年",
+          label: "2012年"
         },
         {
           value: "2011",
-          label: "2011年",
+          label: "2011年"
         },
         {
           value: "2010",
-          label: "2010年",
+          label: "2010年"
         },
         {
           value: "2009",
-          label: "2009年",
+          label: "2009年"
         },
         {
           value: "2008",
-          label: "2008年",
+          label: "2008年"
         },
         {
           value: "2007",
-          label: "2007年",
-        },
+          label: "2007年"
+        }
       ],
       options1: [],
       options2: [],
@@ -174,7 +181,7 @@
         paiQ: 0,
         addPaiQ: 0,
         sheBPerson: 0,
-        addSheBPerson: 0,
+        addSheBPerson: 0
       },
       loading1: true,
       loading2: true,
@@ -183,14 +190,14 @@
       props: {
         children: "children",
         label: "title",
-        value: "id",
+        value: "id"
       },
       props2: {
         children: "children",
         label: "enterpriseName",
-        value: "departmentid",
+        value: "departmentid"
       },
-      node: {}, //选中的记录
+      node: {} //选中的记录
     };
   },
   methods: {
@@ -207,14 +214,14 @@
           "&enterpriseName=" +
           this.enterpriseName +
           "&jurisdiction1=" +
-          this.value1,
+          this.value1
       });
     },
     getFenju() {
       this.options1 = [];
       this.value1 = "";
       this.node = {};
-      lazyTrees().then((res) => {
+      lazyTrees().then(res => {
         if (res.data.code === 200) {
           this.options1 = res.data.data;
           this.value1 = this.options1[0] ? this.options1[0].id : "";
@@ -229,9 +236,9 @@
       this.loading2 = true;
       let params = {
         jurisdiction: this.value1,
-        deptid: this.value2,
+        deptid: this.value2
       };
-      selectPCount(params).then((res) => {
+      selectPCount(params).then(res => {
         if (res.data.code === 200) {
           let middleEchart2 = echarts.init(
             document.getElementById("middleEchart2")
@@ -244,7 +251,7 @@
       });
     },
     getCompanys() {
-      getCompanys({ jurisdiction: this.value1 }).then((res) => {
+      getCompanys({ jurisdiction: this.value1 }).then(res => {
         if (res.data.code === 200) {
           this.options2 = res.data.data;
           // this.value2 = this.options2[0] ? this.options2[0].departmentid : "";
@@ -255,21 +262,20 @@
     getSocialSecurity() {
       let params = {
         jurisdiction: this.value1,
-        deptid: this.value2,
+        deptid: this.value2
       };
-      selectTo(params).then((res) => {
+      selectTo(params).then(res => {
         if (res.data.code === 200) {
           let data = res.data.data[0];
           this.socialSecurity.num = data.znum;
-          this.socialSecurity.addNum = data.thismouth - data.lastmonth;
-          this.socialSecurity.money = data.tamountnum;
-          this.socialSecurity.addMoney = data.thisamount - data.lastamount;
+          this.socialSecurity.addNum = data.thismouth;
+          this.socialSecurity.money = data.tamountnum.toFixed(2);
+          this.socialSecurity.addMoney = data.thisamount.toFixed(2);
           this.socialSecurity.paiQ = data.userpcnum;
-          this.socialSecurity.addPaiQ =
-            data.userpcthismouth - data.userpclastmouth;
+          this.socialSecurity.addPaiQ = data.userpcthismouth;
           this.socialSecurity.sheBPerson =
             data.usernum && (data.znum / data.userthismouth) * 100
-              ? ((data.thismouth / data.userthismouth) * 100).toFixed(2) + "%"
+              ? ((data.znum / data.userthismouth) * 100).toFixed(2) + "%"
               : 0;
           this.socialSecurity.addSheBPerson =
             data.userthismouth &&
@@ -292,11 +298,11 @@
       this.loading1 = true;
       let params = {
         jurisdiction: this.value1,
-        deptid: this.value2,
+        deptid: this.value2
       };
-      queryYearSoil(params).then((res) => {
+      queryYearSoil(params).then(res => {
         if (res.data.code === 200) {
-          queryYearPz(params).then((res1) => {
+          queryYearPz(params).then(res1 => {
             if (res1.data.code === 200) {
               let middleEchart1 = echarts.init(
                 document.getElementById("middleEchart1")
@@ -316,9 +322,9 @@
       this.loading3 = true;
       let params = {
         jurisdiction: this.value1,
-        deptid: this.value2,
+        deptid: this.value2
       };
-      queryYearKh(params).then((res) => {
+      queryYearKh(params).then(res => {
         if (res.data.code === 200) {
           let bottomEchart = echarts.init(
             document.getElementById("bottomEchart")
@@ -331,7 +337,7 @@
       });
     },
     changeCompanys() {
-      this.options2.forEach((item) => {
+      this.options2.forEach(item => {
         if (item.departmentid === this.value2) {
           this.enterpriseName = item.enterpriseName;
         }
@@ -340,11 +346,11 @@
       this.getSocialSecurity();
       this.getQueryYearSoil();
       this.getQueryYearAn();
-    },
+    }
   },
   mounted() {
     this.getFenju();
-  },
+  }
 };
 </script>
 <style lang="scss" scoped>
diff --git a/src/views/securityUnitOperation/operationAnalysis.vue b/src/views/securityUnitOperation/operationAnalysis.vue
index 36a5b01..a9d9f03 100644
--- a/src/views/securityUnitOperation/operationAnalysis.vue
+++ b/src/views/securityUnitOperation/operationAnalysis.vue
@@ -301,19 +301,19 @@
           let data = res.data.data[0];
           this.card = {
             baoanTotal: data.baoan.num,
-            addbaoanTotal: data.baoan.thisnum - data.baoan.lastnum,
+            addbaoanTotal: data.baoan.thisnum,
             zcBaoan: data.zcbaoan.thisnum,
-            addzcBaoan: data.zcbaoan.thisnum - data.zcbaoan.lastnum,
+            addzcBaoan: data.zcbaoan.thisnum,
             czBaoan: data.czbaoan.num,
-            addczBaoan: data.czbaoan.thisnum - data.czbaoan.lastnum,
+            addczBaoan: data.czbaoan.thisnum,
             gkBaoan: 0,
             addgkBaoan: 0,
             kh: data.kh.num,
-            addkh: data.kh.thisnum - data.kh.lastnum,
+            addkh: data.kh.thisnum,
             sheb: data.sheb.num,
-            addsheb: data.sheb.thisnum - data.sheb.lastnum,
+            addsheb: data.sheb.thisnum,
             baoanPq: data.paiq.num,
-            addbaoanPq: data.paiq.thisnum - data.paiq.lastnum,
+            addbaoanPq: data.paiq.thisnum,
           };
         }
       });

--
Gitblit v1.9.3