|
@@ -60,6 +60,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="depTable">
|
|
<div class="depTable">
|
|
<el-table
|
|
<el-table
|
|
|
|
+ v-loading="tableLoading"
|
|
:data="
|
|
:data="
|
|
tableData.slice(
|
|
tableData.slice(
|
|
(pagesList.pageNo - 1) * pagesList.pageSize,
|
|
(pagesList.pageNo - 1) * pagesList.pageSize,
|
|
@@ -87,7 +88,7 @@
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<div class="iconsFlex" v-if="item.isworkday == 1">
|
|
<div class="iconsFlex" v-if="item.isworkday == 1">
|
|
- <div class="sw">
|
|
|
|
|
|
+ <div class="sw" @click="swStateClick(scope.row, item, 1)">
|
|
<img
|
|
<img
|
|
v-if="sco(scope.row, item, 1) == '1'"
|
|
v-if="sco(scope.row, item, 1) == '1'"
|
|
src="@/assets/imgs/OA/kq/gouzi.png"
|
|
src="@/assets/imgs/OA/kq/gouzi.png"
|
|
@@ -158,11 +159,14 @@
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <DepsUpdataDetail ref="depsDetailRef" @updataInit="updataInit" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
defineOptions({ name: 'AttendanceDep' })
|
|
defineOptions({ name: 'AttendanceDep' })
|
|
import * as DeptApi from '@/api/system/dept'
|
|
import * as DeptApi from '@/api/system/dept'
|
|
|
|
+import DepsUpdataDetail from './components/depsUpdataDetail.vue'
|
|
import { defaultProps, handleTree } from '@/utils/tree'
|
|
import { defaultProps, handleTree } from '@/utils/tree'
|
|
import * as MineApi from '@/api/oa/attendanceCenter'
|
|
import * as MineApi from '@/api/oa/attendanceCenter'
|
|
import { isArrayDelOrNickname, allDeptsArr, dayOfWeekCall } from './attendAuth'
|
|
import { isArrayDelOrNickname, allDeptsArr, dayOfWeekCall } from './attendAuth'
|
|
@@ -194,13 +198,20 @@ const handleCurrentChange = async (page) => {
|
|
}
|
|
}
|
|
const querysClick = async () => {
|
|
const querysClick = async () => {
|
|
// initInsMouth()
|
|
// initInsMouth()
|
|
|
|
+ pagesList.value.pageNo = 1
|
|
let month = fromParams.value.month
|
|
let month = fromParams.value.month
|
|
let toMoseMonths: any = []
|
|
let toMoseMonths: any = []
|
|
toMoseMonths[0] = moment(month).startOf('months').format('YYYY-MM-DD') + ' 00:00:00'
|
|
toMoseMonths[0] = moment(month).startOf('months').format('YYYY-MM-DD') + ' 00:00:00'
|
|
toMoseMonths[1] = moment(month).endOf('months').format('YYYY-MM-DD') + ' 23:59:59'
|
|
toMoseMonths[1] = moment(month).endOf('months').format('YYYY-MM-DD') + ' 23:59:59'
|
|
initInsMouth(toMoseMonths)
|
|
initInsMouth(toMoseMonths)
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+const tableLoading = ref(true)
|
|
|
|
+const updataInit = (date) => {
|
|
|
|
+ initInsMouth(date)
|
|
|
|
+}
|
|
const initInsMouth = async (date: any) => {
|
|
const initInsMouth = async (date: any) => {
|
|
|
|
+ tableLoading.value = true
|
|
let params = {
|
|
let params = {
|
|
attendanceDate: date, // 考勤时间
|
|
attendanceDate: date, // 考勤时间
|
|
attendanceStatus: '', // 考勤状态,示例值(2)
|
|
attendanceStatus: '', // 考勤状态,示例值(2)
|
|
@@ -223,6 +234,7 @@ const initInsMouth = async (date: any) => {
|
|
let arr = allDeptsArr(restall, resArr, namesArr)
|
|
let arr = allDeptsArr(restall, resArr, namesArr)
|
|
tableData.value = arr
|
|
tableData.value = arr
|
|
pagesList.value.total = arr.length
|
|
pagesList.value.total = arr.length
|
|
|
|
+ tableLoading.value = false
|
|
})
|
|
})
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -270,6 +282,12 @@ const initWorkDay = async (date: any) => {
|
|
|
|
|
|
return await arr
|
|
return await arr
|
|
}
|
|
}
|
|
|
|
+const depsDetailRef = ref()
|
|
|
|
+const swStateClick = (row, item, index) => {
|
|
|
|
+ //更改上午考勤
|
|
|
|
+ console.log(row, item)
|
|
|
|
+ depsDetailRef.value.initShow(row, item, index, fromParams.value.month)
|
|
|
|
+}
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
let toMonth = moment().format('YYYY-MM')
|
|
let toMonth = moment().format('YYYY-MM')
|
|
fromParams.value.month = toMonth
|
|
fromParams.value.month = toMonth
|
|
@@ -408,6 +426,17 @@ onMounted(() => {
|
|
justify-content: center;
|
|
justify-content: center;
|
|
user-select: none;
|
|
user-select: none;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .sw:hover {
|
|
|
|
+ .spans {
|
|
|
|
+ color: pink;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .xw:hover {
|
|
|
|
+ .spans {
|
|
|
|
+ color: pink;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.xw {
|
|
.xw {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 50%;
|
|
height: 50%;
|