|
@@ -11,14 +11,10 @@
|
|
<select-service-unit
|
|
<select-service-unit
|
|
v-model="params[item.prop]"
|
|
v-model="params[item.prop]"
|
|
:filterParams="{ statusList: ['PUBLISH'] }"
|
|
:filterParams="{ statusList: ['PUBLISH'] }"
|
|
|
|
+ defaultSelect
|
|
|
|
+ :clearable="false"
|
|
></select-service-unit>
|
|
></select-service-unit>
|
|
</template>
|
|
</template>
|
|
- <template #supplier="{ item, params }">
|
|
|
|
- <select-supplier v-model="params[item.prop]"> </select-supplier>
|
|
|
|
- </template>
|
|
|
|
- <template #creator="{ item, params }">
|
|
|
|
- <select-filter-user v-model="params[item.prop]"> </select-filter-user>
|
|
|
|
- </template>
|
|
|
|
</SearchForm>
|
|
</SearchForm>
|
|
<div class="flex-1 page-wrap">
|
|
<div class="flex-1 page-wrap">
|
|
<t-table
|
|
<t-table
|
|
@@ -37,52 +33,13 @@
|
|
current: pagination.pageNumber,
|
|
current: pagination.pageNumber,
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
- <template #user="{ row }">
|
|
|
|
- {{ row.userName }}({{ row.userNo }})
|
|
|
|
- </template>
|
|
|
|
- <template #scanStartTime="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <template #scanEndTime="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <template #markPaperStartTime="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <template #markPaperEndTime="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <!-- <template #start-time="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <template #end-time="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template> -->
|
|
|
|
- <template #submit-time="{ col, row }">
|
|
|
|
- {{ timestampFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <template #status="{ col, row }">
|
|
|
|
- {{ attendanceStatisticsSubmitStatusFilter(row[col.colKey]) }}
|
|
|
|
- </template>
|
|
|
|
- <template #operate="{ row }">
|
|
|
|
- <div v-if="perm.LINK_Reject" class="table-operations">
|
|
|
|
- <t-link
|
|
|
|
- :disabled="row.status !== 'APPLY_WITHDRAW'"
|
|
|
|
- theme="primary"
|
|
|
|
- hover="color"
|
|
|
|
- @click="handlePass(row)"
|
|
|
|
- >
|
|
|
|
- 同意撤回
|
|
|
|
- </t-link>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
</t-table>
|
|
</t-table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup name="WorkStatistics">
|
|
<script setup name="WorkStatistics">
|
|
-import { ref, reactive, onMounted } from 'vue';
|
|
|
|
|
|
+import { ref, reactive, onMounted, computed } from 'vue';
|
|
import { DialogPlugin, MessagePlugin } from 'tdesign-vue-next';
|
|
import { DialogPlugin, MessagePlugin } from 'tdesign-vue-next';
|
|
import { ErrorCircleFilledIcon } from 'tdesign-icons-vue-next';
|
|
import { ErrorCircleFilledIcon } from 'tdesign-icons-vue-next';
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
@@ -91,6 +48,7 @@ import {
|
|
workStatisticsInfoApi,
|
|
workStatisticsInfoApi,
|
|
workStatisticsExportApi,
|
|
workStatisticsExportApi,
|
|
workStatisticsPassApi,
|
|
workStatisticsPassApi,
|
|
|
|
+ exportWorkApi,
|
|
} from '@/api/work-hours';
|
|
} from '@/api/work-hours';
|
|
import {
|
|
import {
|
|
timestampFilter,
|
|
timestampFilter,
|
|
@@ -121,7 +79,9 @@ const fields = ref([
|
|
colSpan: 6,
|
|
colSpan: 6,
|
|
options: dictToOptionList(STATISTICAL_DIMENSION),
|
|
options: dictToOptionList(STATISTICAL_DIMENSION),
|
|
attrs: {
|
|
attrs: {
|
|
- clearable: true,
|
|
|
|
|
|
+ onChange: () => {
|
|
|
|
+ search();
|
|
|
|
+ },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -135,6 +95,16 @@ const fields = ref([
|
|
search();
|
|
search();
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ type: 'button',
|
|
|
|
+ text: '导出统计结果',
|
|
|
|
+ attrs: {
|
|
|
|
+ theme: 'success',
|
|
|
|
+ },
|
|
|
|
+ onClick: () => {
|
|
|
|
+ exportFile();
|
|
|
|
+ },
|
|
|
|
+ },
|
|
],
|
|
],
|
|
},
|
|
},
|
|
]);
|
|
]);
|
|
@@ -143,55 +113,117 @@ const mixinSearch = () => {
|
|
};
|
|
};
|
|
const params = reactive({
|
|
const params = reactive({
|
|
serviceId: '',
|
|
serviceId: '',
|
|
- type: '',
|
|
|
|
|
|
+ type: 'BY_PERSON',
|
|
});
|
|
});
|
|
|
|
|
|
-const columns = [
|
|
|
|
- { colKey: 'service', title: '服务单元', width: 160 },
|
|
|
|
- { colKey: 'sopNo', title: 'SOP流水号', width: 200 },
|
|
|
|
- { colKey: 'custom', title: '客户名称', width: 120 },
|
|
|
|
- { colKey: 'province', title: '省份', width: 120 },
|
|
|
|
- { colKey: 'city', title: '城市', width: 120 },
|
|
|
|
- // {
|
|
|
|
- // colKey: 'examStartTime',
|
|
|
|
- // title: '项目开始时间',
|
|
|
|
- // width: 180,
|
|
|
|
- // cell: 'start-time',
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // colKey: 'examEndTime',
|
|
|
|
- // title: '项目结束时间',
|
|
|
|
- // width: 180,
|
|
|
|
- // cell: 'end-time',
|
|
|
|
- // },
|
|
|
|
- { colKey: 'scanStartTime', title: '扫描开始时间', width: 180 },
|
|
|
|
- { colKey: 'scanEndTime', title: '扫描结束时间', width: 180 },
|
|
|
|
- { colKey: 'markPaperStartTime', title: '阅卷开始时间', width: 180 },
|
|
|
|
- { colKey: 'markPaperEndTime', title: '阅卷结束时间', width: 180 },
|
|
|
|
- { colKey: 'userName', title: '姓名(人员档案号)', cell: 'user', width: 170 },
|
|
|
|
- { colKey: 'roleName', title: '项目角色', width: 120 },
|
|
|
|
- { colKey: 'supplier', title: '供应商' },
|
|
|
|
- { colKey: 'attendance', title: '实际出勤(天)', width: 140 },
|
|
|
|
- { colKey: 'weekdays', title: '工作日(天)', width: 130 },
|
|
|
|
- { colKey: 'weekends', title: '周末(天)', width: 120 },
|
|
|
|
- { colKey: 'holidays', title: '法定节假日(天)', width: 160 },
|
|
|
|
- { colKey: 'workHours', title: '累计工时(小时)', width: 140 },
|
|
|
|
- // { colKey: 'violationDays', title: '违规工时(天)', width: 140 },
|
|
|
|
- { colKey: 'submitter', title: '提交人', width: 120 },
|
|
|
|
- {
|
|
|
|
- colKey: 'submissionTime',
|
|
|
|
- title: '提交时间',
|
|
|
|
- cell: 'submit-time',
|
|
|
|
- width: 180,
|
|
|
|
- },
|
|
|
|
- { colKey: 'status', title: '提交状态', cell: 'status', width: 100 },
|
|
|
|
- {
|
|
|
|
- title: '管理',
|
|
|
|
- colKey: 'operate',
|
|
|
|
- fixed: 'right',
|
|
|
|
- width: 100,
|
|
|
|
- },
|
|
|
|
-];
|
|
|
|
|
|
+const exportFile = () => {
|
|
|
|
+ exportWorkApi(params).then(() => {
|
|
|
|
+ MessagePlugin.success('导出成功');
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const columns = computed(() => {
|
|
|
|
+ const type = params.type;
|
|
|
|
+ if (!type) {
|
|
|
|
+ return [];
|
|
|
|
+ }
|
|
|
|
+ let map = {
|
|
|
|
+ BY_PERSON: [
|
|
|
|
+ { colKey: 'serviceName', title: '服务单元', width: 160, fixed: 'left' },
|
|
|
|
+ { colKey: 'userInfo', title: '姓名(人员档案号)', width: 200 },
|
|
|
|
+ { colKey: 'supplierName', title: '供应商', width: 160 },
|
|
|
|
+ { colKey: 'actualDays', title: '实际出勤(天)', width: 138 },
|
|
|
|
+ { colKey: 'weekdays', title: '工作日(天)', width: 120 },
|
|
|
|
+ { colKey: 'weekends', title: '周末(天)', width: 110 },
|
|
|
|
+ { colKey: 'legalHolidays', title: '法定节假日(天)', width: 150 },
|
|
|
|
+ { colKey: 'workHours', title: '累计工时(小时)', width: 160 },
|
|
|
|
+ { colKey: 'violationDays', title: '违规工时(天)', width: 160 },
|
|
|
|
+ ],
|
|
|
|
+ BY_SOP: [
|
|
|
|
+ { colKey: 'serviceName', title: '服务单元', width: 160, fixed: 'left' },
|
|
|
|
+ { colKey: 'sopNo', title: 'SOP流水号', width: 200 },
|
|
|
|
+ { colKey: 'courseName', title: '科目名称', width: 200 },
|
|
|
|
+ { colKey: 'actualDays', title: '实际出勤(天)', width: 138 },
|
|
|
|
+ { colKey: 'weekdays', title: '工作日(天)', width: 120 },
|
|
|
|
+ { colKey: 'weekends', title: '周末(天)', width: 110 },
|
|
|
|
+ { colKey: 'legalHolidays', title: '法定节假日(天)', width: 150 },
|
|
|
|
+ { colKey: 'scanPeriod', title: '扫描周期(天)', width: 160 },
|
|
|
|
+ { colKey: 'markPaperPeriod', title: '阅卷周期(天)', width: 160 },
|
|
|
|
+ { colKey: 'workHours', title: '累计工时(小时)', width: 160 },
|
|
|
|
+ { colKey: 'violationDays', title: '违规工时(天)', width: 160 },
|
|
|
|
+ ],
|
|
|
|
+ BY_CRM: [
|
|
|
|
+ { colKey: 'serviceName', title: '服务单元', width: 160, fixed: 'left' },
|
|
|
|
+ { colKey: 'crmNo', title: '派单号', width: 200 },
|
|
|
|
+ { colKey: 'crmName', title: '项目名称', width: 200 },
|
|
|
|
+ { colKey: 'actualDays', title: '实际出勤(天)', width: 138 },
|
|
|
|
+ { colKey: 'weekdays', title: '工作日(天)', width: 120 },
|
|
|
|
+ { colKey: 'weekends', title: '周末(天)', width: 110 },
|
|
|
|
+ { colKey: 'legalHolidays', title: '法定节假日(天)', width: 150 },
|
|
|
|
+ { colKey: 'scanPeriod', title: '扫描周期(天)', width: 160 },
|
|
|
|
+ { colKey: 'markPaperPeriod', title: '阅卷周期(天)', width: 160 },
|
|
|
|
+ { colKey: 'workHours', title: '累计工时(小时)', width: 160 },
|
|
|
|
+ { colKey: 'violationDays', title: '违规工时(天)', width: 160 },
|
|
|
|
+ ],
|
|
|
|
+ BY_CUSTOM: [
|
|
|
|
+ { colKey: 'serviceName', title: '服务单元', width: 160, fixed: 'left' },
|
|
|
|
+ { colKey: 'customName', title: '客户名称', width: 200 },
|
|
|
|
+ { colKey: 'actualDays', title: '实际出勤(天)', width: 138 },
|
|
|
|
+ { colKey: 'weekdays', title: '工作日(天)', width: 120 },
|
|
|
|
+ { colKey: 'weekends', title: '周末(天)', width: 110 },
|
|
|
|
+ { colKey: 'legalHolidays', title: '法定节假日(天)', width: 150 },
|
|
|
|
+ { colKey: 'scanPeriod', title: '扫描周期(天)', width: 160 },
|
|
|
|
+ { colKey: 'markPaperPeriod', title: '阅卷周期(天)', width: 160 },
|
|
|
|
+ { colKey: 'workHours', title: '累计工时(小时)', width: 160 },
|
|
|
|
+ { colKey: 'violationDays', title: '违规工时(天)', width: 160 },
|
|
|
|
+ ],
|
|
|
|
+ BY_SUPPLIER: [
|
|
|
|
+ { colKey: 'serviceName', title: '服务单元', width: 160, fixed: 'left' },
|
|
|
|
+ { colKey: 'supplierName', title: '供应商', width: 200 },
|
|
|
|
+ { colKey: 'actualDays', title: '实际出勤(天)', width: 138 },
|
|
|
|
+ { colKey: 'weekdays', title: '工作日(天)', width: 120 },
|
|
|
|
+ { colKey: 'weekends', title: '周末(天)', width: 110 },
|
|
|
|
+ { colKey: 'legalHolidays', title: '法定节假日(天)', width: 150 },
|
|
|
|
+ { colKey: 'workHours', title: '累计工时(小时)', width: 160 },
|
|
|
|
+ { colKey: 'violationDays', title: '违规工时(天)', width: 160 },
|
|
|
|
+ ],
|
|
|
|
+ };
|
|
|
|
+ return map[type];
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+// const columns = [
|
|
|
|
+// { colKey: 'service', title: '服务单元', width: 160 },
|
|
|
|
+// { colKey: 'sopNo', title: 'SOP流水号', width: 200 },
|
|
|
|
+// { colKey: 'custom', title: '客户名称', width: 120 },
|
|
|
|
+// { colKey: 'province', title: '省份', width: 120 },
|
|
|
|
+// { colKey: 'city', title: '城市', width: 120 },
|
|
|
|
+// { colKey: 'scanStartTime', title: '扫描开始时间', width: 180 },
|
|
|
|
+// { colKey: 'scanEndTime', title: '扫描结束时间', width: 180 },
|
|
|
|
+// { colKey: 'markPaperStartTime', title: '阅卷开始时间', width: 180 },
|
|
|
|
+// { colKey: 'markPaperEndTime', title: '阅卷结束时间', width: 180 },
|
|
|
|
+// { colKey: 'userName', title: '姓名(人员档案号)', cell: 'user', width: 170 },
|
|
|
|
+// { colKey: 'roleName', title: '项目角色', width: 120 },
|
|
|
|
+// { colKey: 'supplier', title: '供应商' },
|
|
|
|
+// { colKey: 'attendance', title: '实际出勤(天)', width: 140 },
|
|
|
|
+// { colKey: 'weekdays', title: '工作日(天)', width: 130 },
|
|
|
|
+// { colKey: 'weekends', title: '周末(天)', width: 120 },
|
|
|
|
+// { colKey: 'holidays', title: '法定节假日(天)', width: 160 },
|
|
|
|
+// { colKey: 'workHours', title: '累计工时(小时)', width: 140 },
|
|
|
|
+// { colKey: 'submitter', title: '提交人', width: 120 },
|
|
|
|
+// {
|
|
|
|
+// colKey: 'submissionTime',
|
|
|
|
+// title: '提交时间',
|
|
|
|
+// cell: 'submit-time',
|
|
|
|
+// width: 180,
|
|
|
|
+// },
|
|
|
|
+// { colKey: 'status', title: '提交状态', cell: 'status', width: 100 },
|
|
|
|
+// {
|
|
|
|
+// title: '管理',
|
|
|
|
+// colKey: 'operate',
|
|
|
|
+// fixed: 'right',
|
|
|
|
+// width: 100,
|
|
|
|
+// },
|
|
|
|
+// ];
|
|
const { pagination, tableData, fetchData, search, onChange } = useFetchTable(
|
|
const { pagination, tableData, fetchData, search, onChange } = useFetchTable(
|
|
workStatisticsListApi,
|
|
workStatisticsListApi,
|
|
{ params }
|
|
{ params }
|