diff --git a/src/components.d.ts b/src/components.d.ts index 6d8ba2e..c627659 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -60,6 +60,7 @@ SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] + SelectDeptDialog: typeof import('./components/dialog/selectDeptDialog.vue')['default'] SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] SelectStaffDialog: typeof import('./components/dialog/selectStaffDialog.vue')['default'] diff --git a/src/components.d.ts b/src/components.d.ts index 6d8ba2e..c627659 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -60,6 +60,7 @@ SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] + SelectDeptDialog: typeof import('./components/dialog/selectDeptDialog.vue')['default'] SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] SelectStaffDialog: typeof import('./components/dialog/selectStaffDialog.vue')['default'] diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue index 5a31c59..00451c0 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTable.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -54,21 +54,74 @@ // 是否显示当前页,否则跳转第一页 // listQuery.value.offset = 1 // } + // fetchApproval({ processId: listQuery.value.processId }).then((response) => { + // console.log(response.data, 'response') + // response.data.forEach((item: Array, index: number) => { + // item.forEach((i: any) => { + // list.value.push({ + // cindex: index, + // nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[index - 1].nodeNumber + 1, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // }) + // total.value = parseInt(response.data.total) + // loadingTable.value = false + // }).catch(() => { + // loadingTable.value = false + // }) + fetchApproval({ processId: listQuery.value.processId }).then((response) => { - console.log(response.data, 'response') response.data.forEach((item: Array, index: number) => { - item.forEach((i: any) => { - list.value.push({ - cindex: index, - nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[index - 1].nodeNumber + 1, - assigneeName: i.assigneeName, // 姓名 - approvalStatus: i.approvalStatus, // 审批类型 - finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 - duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 - comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 - type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + console.log(item, item.length, item[0].countersignOrSign === 2) + + if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + console.log('或签数据处理', item) + + let name = ''// 姓名 + let approvalStatus = ''// 审批类型 + let finishTime = ''// 审批类型 + let duration = ''// 用时 + let comment = ''// 审批意见 + let type = '-'// 审批意见 + item.forEach((i: any, index) => { + name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + approvalStatus = i.approvalStatus // 审批类型 + finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + duration = i.duration ? i.duration : duration // 用时 + finishTime = finishTime + i.finishTime + comment = comment + i.comment // 审批意见 + type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 }) - }) + list.value.push({ + nodeNumber: index, + approvalStatus, // 审批类型 + assigneeName: name, // 姓名 + finishTime, // 完成时间 + duration, // 用时 + comment, // 审批意见 + type, // 意见类别 + }) + console.log('list.v*******alue', list.value) + } + else { + item.forEach((i: any) => { + list.value.push({ + nodeNumber: index, + assigneeName: i.assigneeName, // 姓名 + approvalStatus: i.approvalStatus, // 审批类型 + finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + }) + }) + } }) total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/components.d.ts b/src/components.d.ts index 6d8ba2e..c627659 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -60,6 +60,7 @@ SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] + SelectDeptDialog: typeof import('./components/dialog/selectDeptDialog.vue')['default'] SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] SelectStaffDialog: typeof import('./components/dialog/selectStaffDialog.vue')['default'] diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue index 5a31c59..00451c0 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTable.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -54,21 +54,74 @@ // 是否显示当前页,否则跳转第一页 // listQuery.value.offset = 1 // } + // fetchApproval({ processId: listQuery.value.processId }).then((response) => { + // console.log(response.data, 'response') + // response.data.forEach((item: Array, index: number) => { + // item.forEach((i: any) => { + // list.value.push({ + // cindex: index, + // nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[index - 1].nodeNumber + 1, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // }) + // total.value = parseInt(response.data.total) + // loadingTable.value = false + // }).catch(() => { + // loadingTable.value = false + // }) + fetchApproval({ processId: listQuery.value.processId }).then((response) => { - console.log(response.data, 'response') response.data.forEach((item: Array, index: number) => { - item.forEach((i: any) => { - list.value.push({ - cindex: index, - nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[index - 1].nodeNumber + 1, - assigneeName: i.assigneeName, // 姓名 - approvalStatus: i.approvalStatus, // 审批类型 - finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 - duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 - comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 - type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + console.log(item, item.length, item[0].countersignOrSign === 2) + + if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + console.log('或签数据处理', item) + + let name = ''// 姓名 + let approvalStatus = ''// 审批类型 + let finishTime = ''// 审批类型 + let duration = ''// 用时 + let comment = ''// 审批意见 + let type = '-'// 审批意见 + item.forEach((i: any, index) => { + name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + approvalStatus = i.approvalStatus // 审批类型 + finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + duration = i.duration ? i.duration : duration // 用时 + finishTime = finishTime + i.finishTime + comment = comment + i.comment // 审批意见 + type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 }) - }) + list.value.push({ + nodeNumber: index, + approvalStatus, // 审批类型 + assigneeName: name, // 姓名 + finishTime, // 完成时间 + duration, // 用时 + comment, // 审批意见 + type, // 意见类别 + }) + console.log('list.v*******alue', list.value) + } + else { + item.forEach((i: any) => { + list.value.push({ + nodeNumber: index, + assigneeName: i.assigneeName, // 姓名 + approvalStatus: i.approvalStatus, // 审批类型 + finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + }) + }) + } }) total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts index b950897..1604410 100644 --- a/src/components/ApprovalRecord/approval-interface.ts +++ b/src/components/ApprovalRecord/approval-interface.ts @@ -9,4 +9,5 @@ duration: string // 用时 approvalLogs?: any[] approvalLogsList?: any[] + countersignOrSign?: number // 类型 1会签、2或签 } diff --git a/src/components.d.ts b/src/components.d.ts index 6d8ba2e..c627659 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -60,6 +60,7 @@ SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] + SelectDeptDialog: typeof import('./components/dialog/selectDeptDialog.vue')['default'] SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] SelectStaffDialog: typeof import('./components/dialog/selectStaffDialog.vue')['default'] diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue index 5a31c59..00451c0 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTable.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -54,21 +54,74 @@ // 是否显示当前页,否则跳转第一页 // listQuery.value.offset = 1 // } + // fetchApproval({ processId: listQuery.value.processId }).then((response) => { + // console.log(response.data, 'response') + // response.data.forEach((item: Array, index: number) => { + // item.forEach((i: any) => { + // list.value.push({ + // cindex: index, + // nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[index - 1].nodeNumber + 1, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // }) + // total.value = parseInt(response.data.total) + // loadingTable.value = false + // }).catch(() => { + // loadingTable.value = false + // }) + fetchApproval({ processId: listQuery.value.processId }).then((response) => { - console.log(response.data, 'response') response.data.forEach((item: Array, index: number) => { - item.forEach((i: any) => { - list.value.push({ - cindex: index, - nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[index - 1].nodeNumber + 1, - assigneeName: i.assigneeName, // 姓名 - approvalStatus: i.approvalStatus, // 审批类型 - finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 - duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 - comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 - type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + console.log(item, item.length, item[0].countersignOrSign === 2) + + if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + console.log('或签数据处理', item) + + let name = ''// 姓名 + let approvalStatus = ''// 审批类型 + let finishTime = ''// 审批类型 + let duration = ''// 用时 + let comment = ''// 审批意见 + let type = '-'// 审批意见 + item.forEach((i: any, index) => { + name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + approvalStatus = i.approvalStatus // 审批类型 + finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + duration = i.duration ? i.duration : duration // 用时 + finishTime = finishTime + i.finishTime + comment = comment + i.comment // 审批意见 + type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 }) - }) + list.value.push({ + nodeNumber: index, + approvalStatus, // 审批类型 + assigneeName: name, // 姓名 + finishTime, // 完成时间 + duration, // 用时 + comment, // 审批意见 + type, // 意见类别 + }) + console.log('list.v*******alue', list.value) + } + else { + item.forEach((i: any) => { + list.value.push({ + nodeNumber: index, + assigneeName: i.assigneeName, // 姓名 + approvalStatus: i.approvalStatus, // 审批类型 + finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + }) + }) + } }) total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts index b950897..1604410 100644 --- a/src/components/ApprovalRecord/approval-interface.ts +++ b/src/components/ApprovalRecord/approval-interface.ts @@ -9,4 +9,5 @@ duration: string // 用时 approvalLogs?: any[] approvalLogsList?: any[] + countersignOrSign?: number // 类型 1会签、2或签 } diff --git a/src/components/dialog/selectDeptDialog.vue b/src/components/dialog/selectDeptDialog.vue new file mode 100644 index 0000000..6812ec4 --- /dev/null +++ b/src/components/dialog/selectDeptDialog.vue @@ -0,0 +1,279 @@ + + + + + + + + diff --git a/src/components.d.ts b/src/components.d.ts index 6d8ba2e..c627659 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -60,6 +60,7 @@ SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] + SelectDeptDialog: typeof import('./components/dialog/selectDeptDialog.vue')['default'] SelectEmployeesDialog: typeof import('./components/dialog/selectEmployeesDialog.vue')['default'] SelectRoleDialog: typeof import('./components/dialog/selectRoleDialog.vue')['default'] SelectStaffDialog: typeof import('./components/dialog/selectStaffDialog.vue')['default'] diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue index 5a31c59..00451c0 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTable.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -54,21 +54,74 @@ // 是否显示当前页,否则跳转第一页 // listQuery.value.offset = 1 // } + // fetchApproval({ processId: listQuery.value.processId }).then((response) => { + // console.log(response.data, 'response') + // response.data.forEach((item: Array, index: number) => { + // item.forEach((i: any) => { + // list.value.push({ + // cindex: index, + // nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[index - 1].nodeNumber + 1, + // assigneeName: i.assigneeName, // 姓名 + // approvalStatus: i.approvalStatus, // 审批类型 + // finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + // duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + // comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + // type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + // }) + // }) + // }) + // total.value = parseInt(response.data.total) + // loadingTable.value = false + // }).catch(() => { + // loadingTable.value = false + // }) + fetchApproval({ processId: listQuery.value.processId }).then((response) => { - console.log(response.data, 'response') response.data.forEach((item: Array, index: number) => { - item.forEach((i: any) => { - list.value.push({ - cindex: index, - nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[index - 1].nodeNumber + 1, - assigneeName: i.assigneeName, // 姓名 - approvalStatus: i.approvalStatus, // 审批类型 - finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 - duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 - comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 - type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + console.log(item, item.length, item[0].countersignOrSign === 2) + + if (item.length > 1 && item[0].countersignOrSign === 2) { // 或签 + console.log('或签数据处理', item) + + let name = ''// 姓名 + let approvalStatus = ''// 审批类型 + let finishTime = ''// 审批类型 + let duration = ''// 用时 + let comment = ''// 审批意见 + let type = '-'// 审批意见 + item.forEach((i: any, index) => { + name = name + (index > 0 ? `, ${i.assigneeName}` : `${i.assigneeName}`) // 姓名 + approvalStatus = i.approvalStatus // 审批类型 + finishTime = i.finishTime ? i.finishTime : finishTime // 完成时间 + duration = i.duration ? i.duration : duration // 用时 + finishTime = finishTime + i.finishTime + comment = comment + i.comment // 审批意见 + type = i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-' // 意见类别 }) - }) + list.value.push({ + nodeNumber: index, + approvalStatus, // 审批类型 + assigneeName: name, // 姓名 + finishTime, // 完成时间 + duration, // 用时 + comment, // 审批意见 + type, // 意见类别 + }) + console.log('list.v*******alue', list.value) + } + else { + item.forEach((i: any) => { + list.value.push({ + nodeNumber: index, + assigneeName: i.assigneeName, // 姓名 + approvalStatus: i.approvalStatus, // 审批类型 + finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 + duration: i.approvalStatus === '发起人' || !i.duration ? '-' : i.duration, // 用时 + comment: i.comment.comment ? i.comment.comment : '-', // 审批意见 + type: i.comment.type ? approvalLogTypeMap.value[i.comment.type] : '-', // 意见类别 + }) + }) + } }) total.value = parseInt(response.data.total) loadingTable.value = false diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts index b950897..1604410 100644 --- a/src/components/ApprovalRecord/approval-interface.ts +++ b/src/components/ApprovalRecord/approval-interface.ts @@ -9,4 +9,5 @@ duration: string // 用时 approvalLogs?: any[] approvalLogsList?: any[] + countersignOrSign?: number // 类型 1会签、2或签 } diff --git a/src/components/dialog/selectDeptDialog.vue b/src/components/dialog/selectDeptDialog.vue new file mode 100644 index 0000000..6812ec4 --- /dev/null +++ b/src/components/dialog/selectDeptDialog.vue @@ -0,0 +1,279 @@ + + + + + + + + diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue index 3746fe7..e7b4b8f 100644 --- a/src/components/drawer/conditionDrawer.vue +++ b/src/components/drawer/conditionDrawer.vue @@ -1,9 +1,9 @@