Bladeren bron

值班员-按月统计

CzRger 1 jaar geleden
bovenliggende
commit
07b0acb3ad
1 gewijzigde bestanden met toevoegingen van 46 en 2 verwijderingen
  1. 46 2
      src/views/staging/zby/center/statistic.vue

+ 46 - 2
src/views/staging/zby/center/statistic.vue

@@ -305,7 +305,6 @@ import ButtonSwitchCom from '../../common/button-switch.vue'
 import * as Handle from '../../common/handle'
 import {ElMessage, ElMessageBox} from "element-plus";
 import {downLoadBlob} from "@/utils/downLoadUrl";
-import {zbyWorkbenchCheckWeek} from "@/api/modules/workbench";
 
 export default defineComponent({
   name: '',
@@ -623,7 +622,52 @@ export default defineComponent({
         state.loading = false
       })
     }
-    const getMonthInfo = () => {}
+    const getMonthInfo = () => {
+      state.loading = true
+      state.dataInfo.month = {
+        sign: {
+          cqts: 0,
+          qqts: 0,
+          cdcs: 0,
+          ztcs: 0,
+          qkcs: 0
+        },
+        daily: {
+          ytjts: 0,
+          wtjts: 0,
+          ytjfs: 0
+        },
+        weekly: {
+          ytjts: 0,
+          wtjts: 0,
+          ytjfs: 0
+        },
+      }
+      that.$api.zbyWorkbenchCheckWeek({
+        deptId: store.state.app.userInfo.dept.id,
+        startTime: `${state.dateValue.selectMonth}-01`,
+        endTime: `${state.dateValue.selectMonth}-${new Date(new Date(state.dateValue.selectMonth).getFullYear(), new Date(state.dateValue.selectMonth).getMonth() + 1, 0).getDate()}`,
+      }).then(res => {
+        if (res.code === 200 && res.data) {
+          state.dataInfo.month.sign.cqts = res.data.days
+          state.dataInfo.month.sign.qqts = res.data.delDays
+          state.dataInfo.month.sign.cdcs = res.data.lateDays
+          state.dataInfo.month.sign.ztcs = res.data.earlyDays
+          state.dataInfo.month.sign.qkcs = res.data.lackDays
+          state.dataInfo.month.daily.ytjts = res.data.dailySubmit
+          state.dataInfo.month.daily.wtjts = res.data.dailyNotSubmit
+          state.dataInfo.month.daily.ytjfs = res.data.dailySubmit
+          state.dataInfo.month.weekly.ytjts = res.data.weekSubmit
+          state.dataInfo.month.weekly.wtjts = res.data.weekNotSubmit
+          state.dataInfo.month.weekly.ytjfs = res.data.weekSubmit
+        } else {
+          ElMessage.error(res.message)
+        }
+        state.loading = false
+      }).catch(() => {
+        state.loading = false
+      })
+    }
     const initDictionary = () => {
       store.dispatch('dictionary/LOAD_DICT_LIST', 'sign_type')
       store.dispatch('dictionary/LOAD_DICT_LIST', 'sign_status')