diff --git a/src/api/project/attendance/echarts.ts b/src/api/project/attendance/echarts.ts index ce4cc04..3a66873 100644 --- a/src/api/project/attendance/echarts.ts +++ b/src/api/project/attendance/echarts.ts @@ -1,4 +1,3 @@ -import * as echarts from 'echarts'; const grid = { left: 100, right: 100, @@ -14,17 +13,17 @@ const titleList = [ { name: '请假人数', color: '#000' } ]; -export const echartsConfig = (ref: any, list?: any) => { - const commandstatsIntance = echarts.init(ref, 'macarons'); +// export const echartsConfig = (ref: any, list?: any) => { +// const commandstatsIntance = echarts.init(ref, 'macarons'); +// }; + +export const option = (list?: any) => { const attendanceArray = list.map((item) => item.attendance); const halfAttendanceArray = list.map((item) => item.halfAttendance); const absenteeismArray = list.map((item) => item.absenteeism); const leaveArray = list.map((item) => item.leave); const rawData = [attendanceArray, halfAttendanceArray, absenteeismArray, leaveArray]; - //y轴数据 - const data = list.map((item) => item.clockDate); - const series: any = titleList.map((item, sid) => { return { name: item.name, @@ -42,7 +41,8 @@ export const echartsConfig = (ref: any, list?: any) => { data: rawData[sid] }; }); - commandstatsIntance.setOption({ + const data = list.map((item) => item.clockDate); + const option = { legend: { selectedMode: false, right: 0 @@ -58,5 +58,6 @@ export const echartsConfig = (ref: any, list?: any) => { }, series, color - }); + }; + return option; }; diff --git a/src/api/project/attendance/types.ts b/src/api/project/attendance/types.ts index c27ff3d..1dd03cd 100644 --- a/src/api/project/attendance/types.ts +++ b/src/api/project/attendance/types.ts @@ -107,7 +107,7 @@ export interface AttendanceForm extends BaseEntity { userId?: string | number; typeOfWork?: string; teamId?: string; - clockMonth?: string; + clockDate?: string; /** * 人脸照 @@ -187,7 +187,6 @@ export interface AttendanceQuery extends PageQuery { projectId?: string | number; typeOfWork?: string | number; teamId?: string | number; - clockMonth?: string | number; /** * 打卡日期 diff --git a/src/api/project/project/types.ts b/src/api/project/project/types.ts index e7c9cdb..3ef4de6 100644 --- a/src/api/project/project/types.ts +++ b/src/api/project/project/types.ts @@ -113,6 +113,7 @@ export interface ProjectVO { * 创建时间 */ createTime: string; + type?: string; } export interface locationType { diff --git a/src/api/project/projectTeam/types.ts b/src/api/project/projectTeam/types.ts index e3c5ad9..e799699 100644 --- a/src/api/project/projectTeam/types.ts +++ b/src/api/project/projectTeam/types.ts @@ -35,7 +35,7 @@ export interface ProjectTeamForm extends BaseEntity { * 主键id */ id?: string | number; - + peopleNumber?: string | number; /** * 项目id */ @@ -62,7 +62,7 @@ export interface ProjectTeamQuery extends PageQuery { * 项目id */ projectId?: string | number; - + peopleNumber?: string | number; /** * 班组名称 */ diff --git a/src/api/project/workerDailyReport/types.ts b/src/api/project/workerDailyReport/types.ts index 318c8f9..205f222 100644 --- a/src/api/project/workerDailyReport/types.ts +++ b/src/api/project/workerDailyReport/types.ts @@ -3,6 +3,8 @@ export interface WorkerDailyReportVO { * 申请人名字 */ userName: string; + userId?: string; + id?: string; /** * 今日完成工作 @@ -23,7 +25,6 @@ export interface WorkerDailyReportVO { * 需协调与帮助 */ coordinationHelp: string; - } export interface WorkerDailyReportForm extends BaseEntity { @@ -36,6 +37,10 @@ export interface WorkerDailyReportForm extends BaseEntity { * 项目id */ projectId?: string | number; + teamName?: string; + resubmitReason?: string; + reportDate?: string; + isResubmit: string; /** * 班组id @@ -75,12 +80,30 @@ export interface WorkerDailyReportForm extends BaseEntity { /** * 附件 */ - file?: string; + fileList?: Array; + dailyPieceItemVoList?: dailyPieceItemVO[]; +} +interface dailyPieceItemVO { + /** + * 主键id + */ + id?: string | number; + + /** + * 计件类型 + */ + pieceType?: string; + + /** + * 数量 + */ + pieceCount?: number; + pieceUnit?: string; + remark?: string; } export interface WorkerDailyReportQuery extends PageQuery { - /** * 项目id */ @@ -101,11 +124,9 @@ export interface WorkerDailyReportQuery extends PageQuery { */ userName?: string; - /** - * 日期范围参数 - */ - params?: any; + /** + * 日期范围参数 + */ + params?: any; + isResubmit?: string; } - - - diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 6640258..6532a27 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -14,6 +14,8 @@ :headers="headers" class="upload-file-uploader" :list-type="isConstruction ? 'picture-card' : 'text'" + :accept="accept" + :drag="isDarg" > 选取文件 @@ -89,7 +91,9 @@ const props = defineProps({ //是否为导入资料 isImportInfo: propTypes.bool.def(false), //ip地址 - uploadUrl: propTypes.string.def('/resource/oss/upload') + uploadUrl: propTypes.string.def('/resource/oss/upload'), + //可拖拽上传 + isDarg: propTypes.bool.def(false) }); const { proxy } = getCurrentInstance() as ComponentInternalInstance; @@ -106,6 +110,11 @@ const showTip = computed(() => props.isShowTip && (props.fileType || props.fileS const fileUploadRef = ref(); +const accept = computed(() => { + console.log('🚀 ~ accept ~ props.fileType:', props.fileType.map((value) => `.${value}`).join(',')); + return props.fileType.map((value) => `.${value}`).join(','); +}); + watch( () => props.modelValue, async (val) => { diff --git a/src/components/ProjectSelector/index.vue b/src/components/ProjectSelector/index.vue index a705fb9..350f27e 100644 --- a/src/components/ProjectSelector/index.vue +++ b/src/components/ProjectSelector/index.vue @@ -41,8 +41,6 @@ const handleSelect = (projectId: string) => { const selectedProject = projects.value.find((p) => p.id === projectId); if (selectedProject) { userStore.setSelectedProject(selectedProject); - // getProjectTeam(); - location.reload(); } }; diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index cfe2cd7..fe3aa66 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -1,10 +1,10 @@