zhangjie 1 жил өмнө
parent
commit
54ce94e41a

+ 2 - 2
src/api/work-hours.js

@@ -65,7 +65,7 @@ export const workAttendanceCancelWithdrawApi = (id) =>
 // work-attendance-detail
 export const workAttendanceDetailListApi = (data) =>
   request({
-    url: '/api/system/work-attendance-detail/list',
+    url: '/api/admin/tb/ding/attendance/query',
     params: data,
   });
 export const workAttendanceDetailExportApi = (ids) =>
@@ -76,7 +76,7 @@ export const workAttendanceDetailExportApi = (ids) =>
   });
 export const workStatisticsDetailInfoApi = (data) =>
   request({
-    url: '/api/system/work-attendance-detail/info',
+    url: '/api/admin/tb/ding/attendance/count',
     params: data,
   });
 

+ 10 - 2
src/components/global/my-dialog/index.vue

@@ -1,6 +1,6 @@
 <template>
   <t-dialog v-bind="cutAttrs" @close="readyCloseWithAnimation">
-    <template #body>
+    <template #body v-if="isFirstOpen">
       <slot></slot>
     </template>
     <template #footer v-if="slots.foot">
@@ -9,7 +9,7 @@
   </t-dialog>
 </template>
 <script setup name="MyDialog">
-import { useAttrs, useSlots, onMounted, computed } from 'vue';
+import { useAttrs, useSlots, onMounted, computed, ref, watch } from 'vue';
 import { omit } from 'lodash';
 const attrs = useAttrs();
 const slots = useSlots();
@@ -26,4 +26,12 @@ const readyCloseWithAnimation = () => {
     emit('close');
   }, 200); //t-dialog的动画时间是0.2秒,所以对父组件的v-if进行200毫秒延迟置为false
 };
+
+let isFirstOpen = ref(false);
+watch(
+  () => attrs.visible,
+  () => {
+    if (!isFirstOpen.value) isFirstOpen.value = true;
+  }
+);
 </script>

+ 15 - 15
src/views/work-hours/work-hours-manage/work-attendance-detail/index.vue

@@ -13,12 +13,12 @@
       <div class="flex justify-between items-center">
         <t-space>
           <span>考勤总计:{{ statisticsInfo.total }}</span>
-          <span>异常考勤:{{ statisticsInfo.exception }}</span>
+          <span>异常考勤:{{ statisticsInfo.abnormal }}</span>
           <span>累计人天:{{ statisticsInfo.allDays }}天</span>
           <span>累计工时:{{ statisticsInfo.allHours }}小时</span>
         </t-space>
         <div class="btn-group">
-          <t-button theme="success" @click="multExport">批量导出</t-button>
+          <!-- <t-button theme="success" @click="multExport">批量导出</t-button> -->
         </div>
       </div>
 
@@ -36,10 +36,10 @@
           current: pagination.pageNumber,
         }"
       >
-        <template #create-time="{ col, row }">
+        <template #sign-time="{ col, row }">
           {{ timestampFilter(row[col.colKey]) }}
         </template>
-        <template #result="{ col, row }">
+        <template #status="{ col, row }">
           {{ attendanceResultFilter(row[col.colKey]) }}
         </template>
         <template #type="{ col, row }">
@@ -138,7 +138,7 @@ const fields = ref([
     },
   },
   {
-    prop: 'exceptionCount',
+    prop: 'abnormal',
     type: 'number',
     label: '考勤异常数>',
     labelWidth: 120,
@@ -163,7 +163,7 @@ const fields = ref([
     },
   },
   {
-    prop: 'result',
+    prop: 'status',
     type: 'number',
     label: '考勤结果',
     labelWidth: 120,
@@ -181,31 +181,31 @@ const params = reactive({
   supplierId: '',
   custom: '',
   sopNo: '',
-  exceptionCount: null,
+  abnormal: null,
   type: null,
-  result: null,
+  status: null,
 });
 const computedParams = computed(() => {
   let data = omit(params, ['createTime']);
-  data.createStartTime = params.createTime[0];
-  data.createEndTime = params.createTime[1];
+  data.startTime = params.createTime[0];
+  data.endTime = params.createTime[1];
   return data;
 });
 
 const columns = [
-  { colKey: 'serviceUnitName', title: '服务单元' },
+  { colKey: 'service', title: '服务单元' },
   { colKey: 'sopNo', title: 'SOP流水号' },
-  { colKey: 'customName', title: '客户名称' },
+  { colKey: 'custom', title: '客户名称' },
   { colKey: 'province', title: '省份', minWidth: 60 },
   { colKey: 'city', title: '城市', minWidth: 60 },
   { colKey: 'userName', title: '姓名', width: 150 },
   { colKey: 'roleName', title: '项目角色' },
   { colKey: 'supplier', title: '所属供应商' },
-  { colKey: 'day', title: '考勤日期', width: 120 },
+  { colKey: 'signDate', title: '考勤日期', width: 120 },
   { colKey: 'type', title: '考勤类型', cell: 'type', width: 80 },
-  { colKey: 'createTime', title: '打卡时间', cell: 'create-time', width: 170 },
+  { colKey: 'signTime', title: '打卡时间', cell: 'sign-time', width: 170 },
   { colKey: 'address', title: '打卡地址' },
-  { colKey: 'result', title: '考勤结果', cell: 'result', width: 80 },
+  { colKey: 'status', title: '考勤结果', cell: 'status', width: 80 },
 ];
 const { pagination, tableData, search, onChange } = useFetchTable(
   workAttendanceDetailListApi,