|
@@ -56,7 +56,7 @@
|
|
|
|
|
|
<script setup lang="ts" name="AnalysisPersonnelStatistics">
|
|
<script setup lang="ts" name="AnalysisPersonnelStatistics">
|
|
/** 人员数据统计 */
|
|
/** 人员数据统计 */
|
|
-import { computed, onMounted, ref, watch } from 'vue'
|
|
|
|
|
|
+import { computed, onMounted, ref, watch, watchEffect } from 'vue'
|
|
import { omit } from 'lodash-es'
|
|
import { omit } from 'lodash-es'
|
|
import { ElButton, ElIcon, ElCheckboxGroup, ElCheckbox } from 'element-plus'
|
|
import { ElButton, ElIcon, ElCheckboxGroup, ElCheckbox } from 'element-plus'
|
|
import BaseForm from '@/components/element/BaseForm.vue'
|
|
import BaseForm from '@/components/element/BaseForm.vue'
|
|
@@ -70,7 +70,8 @@ import { Setting } from '@element-plus/icons-vue'
|
|
import BaseDialog from '@/components/element/BaseDialog.vue'
|
|
import BaseDialog from '@/components/element/BaseDialog.vue'
|
|
import ConfirmButton from '@/components/common/ConfirmButton.vue'
|
|
import ConfirmButton from '@/components/common/ConfirmButton.vue'
|
|
import { cloneDeep } from 'lodash-es'
|
|
import { cloneDeep } from 'lodash-es'
|
|
-
|
|
|
|
|
|
+import { useIntervalFn } from '@vueuse/core'
|
|
|
|
+import { getTodayByDay } from '@/utils/common'
|
|
import type { ExtractApiResponse } from '@/api/api'
|
|
import type { ExtractApiResponse } from '@/api/api'
|
|
|
|
|
|
const { model, fetchModel, items, onOptionInit, groupListWithAll, changeModelValue } = useStatisticsFilter()
|
|
const { model, fetchModel, items, onOptionInit, groupListWithAll, changeModelValue } = useStatisticsFilter()
|
|
@@ -78,6 +79,7 @@ const showColumnsSetting = ref(false)
|
|
function cancel() {
|
|
function cancel() {
|
|
showColumnsSetting.value = false
|
|
showColumnsSetting.value = false
|
|
}
|
|
}
|
|
|
|
+
|
|
let searchMarkerId = ref<any>('')
|
|
let searchMarkerId = ref<any>('')
|
|
let searchOnline = ref<any>('')
|
|
let searchOnline = ref<any>('')
|
|
|
|
|
|
@@ -211,6 +213,21 @@ const { fetch: exportStatisticsByGroup, loading: exporting } = useFetch('exportS
|
|
function onExport() {
|
|
function onExport() {
|
|
exportStatisticsByGroup(omit(fetchModel.value, 'expand'))
|
|
exportStatisticsByGroup(omit(fetchModel.value, 'expand'))
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+const { pause, isActive, resume } = useIntervalFn(onSearch, 30000, { immediate: false })
|
|
|
|
+watchEffect(() => {
|
|
|
|
+ //如果是小组长登录,且时间选择为当天,则开启定时器,30秒刷一次,否则停掉定时器
|
|
|
|
+ if (
|
|
|
|
+ mainStore.myUserInfo &&
|
|
|
|
+ mainStore.myUserInfo.role === 'DEPUTY' &&
|
|
|
|
+ model.curDay == getTodayByDay() &&
|
|
|
|
+ !isActive.value
|
|
|
|
+ ) {
|
|
|
|
+ resume()
|
|
|
|
+ } else {
|
|
|
|
+ pause()
|
|
|
|
+ }
|
|
|
|
+})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|