diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts deleted file mode 100644 index 3066ab3..0000000 --- a/src/api/system/plan.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 培训计划请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 导出培训计录列表 -export function exportLogList(data: object) { - return request({ - url: `${prefix}/train/log/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 导出培训计划列表 -export function exportPlanList(data: object) { - return request({ - url: `${prefix}/train/plan/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} -// 列表查询 -export function getPlanList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 审批列表查询 -export function getapprovalList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 培训计划审批删除 -export function getApprovalDelete(data: object) { - return request({ - url: `${prefix}/train/plan/approval/operate/delete`, - method: 'post', - data, - }) -} -// 主管部门 -export function getDeptTree(params: object) { - return request({ - url: '/sys/dept/tree', - method: 'get', - params, - }) -} - -// 培训计划保存 -export function getListSave(data: object) { - return request({ - url: `${prefix}/train/plan/save`, - method: 'post', - data, - }) -} -// 培训计划保存后的提交 -export function getListSubmit(data: object) { - return request({ - url: `${prefix}/train/plan/submit`, - method: 'post', - data, - }) -} -// 培训计划详情 -export function getListDetail(data: object) { - return request({ - url: `${prefix}/train/plan/detail`, - method: 'post', - data, - }) -} -// 培训计划更新 -export function getListUpdate(data: object) { - return request({ - url: `${prefix}/train/plan/update`, - method: 'post', - data, - }) -} -// 培训计划删除 -export function getListDelete(data: object) { - return request({ - url: `${prefix}/train/plan/delete`, - method: 'post', - data, - }) -} - -// 培训记录列表 -export function getLogList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 列表编号查询 -export function getPlanIdList(data: object) { - return request({ - url: `${prefix}/train/plan/list`, - method: 'post', - data, - }) -} - -// 培训记录新建 -export function getListLogAdd(data: object) { - return request({ - url: `${prefix}/train/log/add`, - method: 'post', - data, - }) -} - -// 培训记录修改 -export function getListLogupdate(data: object) { - return request({ - url: `${prefix}/train/log/update`, - method: 'post', - data, - }) -} - -// 培训记录详情 -export function getListLogDetail(data: object) { - return request({ - url: `${prefix}/train/log/detail`, - method: 'post', - data, - }) -} diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts deleted file mode 100644 index 3066ab3..0000000 --- a/src/api/system/plan.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 培训计划请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 导出培训计录列表 -export function exportLogList(data: object) { - return request({ - url: `${prefix}/train/log/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 导出培训计划列表 -export function exportPlanList(data: object) { - return request({ - url: `${prefix}/train/plan/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} -// 列表查询 -export function getPlanList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 审批列表查询 -export function getapprovalList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 培训计划审批删除 -export function getApprovalDelete(data: object) { - return request({ - url: `${prefix}/train/plan/approval/operate/delete`, - method: 'post', - data, - }) -} -// 主管部门 -export function getDeptTree(params: object) { - return request({ - url: '/sys/dept/tree', - method: 'get', - params, - }) -} - -// 培训计划保存 -export function getListSave(data: object) { - return request({ - url: `${prefix}/train/plan/save`, - method: 'post', - data, - }) -} -// 培训计划保存后的提交 -export function getListSubmit(data: object) { - return request({ - url: `${prefix}/train/plan/submit`, - method: 'post', - data, - }) -} -// 培训计划详情 -export function getListDetail(data: object) { - return request({ - url: `${prefix}/train/plan/detail`, - method: 'post', - data, - }) -} -// 培训计划更新 -export function getListUpdate(data: object) { - return request({ - url: `${prefix}/train/plan/update`, - method: 'post', - data, - }) -} -// 培训计划删除 -export function getListDelete(data: object) { - return request({ - url: `${prefix}/train/plan/delete`, - method: 'post', - data, - }) -} - -// 培训记录列表 -export function getLogList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 列表编号查询 -export function getPlanIdList(data: object) { - return request({ - url: `${prefix}/train/plan/list`, - method: 'post', - data, - }) -} - -// 培训记录新建 -export function getListLogAdd(data: object) { - return request({ - url: `${prefix}/train/log/add`, - method: 'post', - data, - }) -} - -// 培训记录修改 -export function getListLogupdate(data: object) { - return request({ - url: `${prefix}/train/log/update`, - method: 'post', - data, - }) -} - -// 培训记录详情 -export function getListLogDetail(data: object) { - return request({ - url: `${prefix}/train/log/detail`, - method: 'post', - data, - }) -} diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue index 52080f5..3eb6219 100644 --- a/src/components/ApprovalRecord/ApprovalRecord.vue +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -7,59 +7,80 @@ default: () => [], }, }) +const typeMap: { [key: string]: string } = { + 1: '同意', + 2: '驳回', + 3: '拒绝', +} const approvalRecord = ref([]) as any // 表格数据 watch(() => props.approvalRecordData, (newValue) => { - const record = newValue[0] as any// 流程数据 - const initiator = newValue[1] as any// 发起人 + if (newValue && newValue.length === 1) { // 只有发起人 + const initiator = newValue[0] as any// 发起人 - approvalRecord.value.push({ - finishTime: initiator[0].finishTime, - tableData: [ - { - name: initiator[0].taskName, - data: initiator[0].assigneeName, - }, - { - name: '部门名称', - data: initiator[0].deptName, - }, - // { - // name: '任务名称', - // data: initiator[0].taskName, - // }, - ], - }) - record.forEach((item: any) => { - approvalRecord.value.push({ - finishTime: item.finishTime, + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 tableData: [ { - name: item.taskName, - data: item.assigneeName, + name: initiator[0].taskName, + data: initiator[0].assigneeName, }, - // { - // name: '任务执行人', - // data: item.assigneeName, - // }, { name: '部门名称', - data: item.deptName, - }, - // { - // name: '意见类别', - // data: item.type', - // }, - { - name: '意见内容', - data: item.comment || '无', - }, - { - name: '任务耗时', - data: item.duration, + data: initiator[0].deptName, }, ], }) - }) + } + else { // 有发起人和审批流程 + const record = newValue[0] as any// 流程数据 + const initiator = newValue[1] as any// 发起人 + + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 + tableData: [ + { + name: initiator[0].taskName, + data: initiator[0].assigneeName, + }, + { + name: '部门名称', + data: initiator[0].deptName, + }, + ], + }) + // 流程数据处理 + record.forEach((item: any) => { + approvalRecord.value.push({ + finishTime: item.finishTime, + tableData: [ + { + name: item.taskName, + data: item.assigneeName, + }, + { + name: '部门名称', + data: item.deptName, + }, + { + name: '审批状态', + data: item.approvalStatus, + }, + { + name: '意见类别', + data: typeMap[item.comment.type], + }, + { + name: '意见内容', + data: item.comment.comment || '无', + }, + { + name: '任务耗时', + data: item.duration, + }, + ], + }) + }) + } }, { deep: true, diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts deleted file mode 100644 index 3066ab3..0000000 --- a/src/api/system/plan.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 培训计划请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 导出培训计录列表 -export function exportLogList(data: object) { - return request({ - url: `${prefix}/train/log/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 导出培训计划列表 -export function exportPlanList(data: object) { - return request({ - url: `${prefix}/train/plan/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} -// 列表查询 -export function getPlanList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 审批列表查询 -export function getapprovalList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 培训计划审批删除 -export function getApprovalDelete(data: object) { - return request({ - url: `${prefix}/train/plan/approval/operate/delete`, - method: 'post', - data, - }) -} -// 主管部门 -export function getDeptTree(params: object) { - return request({ - url: '/sys/dept/tree', - method: 'get', - params, - }) -} - -// 培训计划保存 -export function getListSave(data: object) { - return request({ - url: `${prefix}/train/plan/save`, - method: 'post', - data, - }) -} -// 培训计划保存后的提交 -export function getListSubmit(data: object) { - return request({ - url: `${prefix}/train/plan/submit`, - method: 'post', - data, - }) -} -// 培训计划详情 -export function getListDetail(data: object) { - return request({ - url: `${prefix}/train/plan/detail`, - method: 'post', - data, - }) -} -// 培训计划更新 -export function getListUpdate(data: object) { - return request({ - url: `${prefix}/train/plan/update`, - method: 'post', - data, - }) -} -// 培训计划删除 -export function getListDelete(data: object) { - return request({ - url: `${prefix}/train/plan/delete`, - method: 'post', - data, - }) -} - -// 培训记录列表 -export function getLogList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 列表编号查询 -export function getPlanIdList(data: object) { - return request({ - url: `${prefix}/train/plan/list`, - method: 'post', - data, - }) -} - -// 培训记录新建 -export function getListLogAdd(data: object) { - return request({ - url: `${prefix}/train/log/add`, - method: 'post', - data, - }) -} - -// 培训记录修改 -export function getListLogupdate(data: object) { - return request({ - url: `${prefix}/train/log/update`, - method: 'post', - data, - }) -} - -// 培训记录详情 -export function getListLogDetail(data: object) { - return request({ - url: `${prefix}/train/log/detail`, - method: 'post', - data, - }) -} diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue index 52080f5..3eb6219 100644 --- a/src/components/ApprovalRecord/ApprovalRecord.vue +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -7,59 +7,80 @@ default: () => [], }, }) +const typeMap: { [key: string]: string } = { + 1: '同意', + 2: '驳回', + 3: '拒绝', +} const approvalRecord = ref([]) as any // 表格数据 watch(() => props.approvalRecordData, (newValue) => { - const record = newValue[0] as any// 流程数据 - const initiator = newValue[1] as any// 发起人 + if (newValue && newValue.length === 1) { // 只有发起人 + const initiator = newValue[0] as any// 发起人 - approvalRecord.value.push({ - finishTime: initiator[0].finishTime, - tableData: [ - { - name: initiator[0].taskName, - data: initiator[0].assigneeName, - }, - { - name: '部门名称', - data: initiator[0].deptName, - }, - // { - // name: '任务名称', - // data: initiator[0].taskName, - // }, - ], - }) - record.forEach((item: any) => { - approvalRecord.value.push({ - finishTime: item.finishTime, + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 tableData: [ { - name: item.taskName, - data: item.assigneeName, + name: initiator[0].taskName, + data: initiator[0].assigneeName, }, - // { - // name: '任务执行人', - // data: item.assigneeName, - // }, { name: '部门名称', - data: item.deptName, - }, - // { - // name: '意见类别', - // data: item.type', - // }, - { - name: '意见内容', - data: item.comment || '无', - }, - { - name: '任务耗时', - data: item.duration, + data: initiator[0].deptName, }, ], }) - }) + } + else { // 有发起人和审批流程 + const record = newValue[0] as any// 流程数据 + const initiator = newValue[1] as any// 发起人 + + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 + tableData: [ + { + name: initiator[0].taskName, + data: initiator[0].assigneeName, + }, + { + name: '部门名称', + data: initiator[0].deptName, + }, + ], + }) + // 流程数据处理 + record.forEach((item: any) => { + approvalRecord.value.push({ + finishTime: item.finishTime, + tableData: [ + { + name: item.taskName, + data: item.assigneeName, + }, + { + name: '部门名称', + data: item.deptName, + }, + { + name: '审批状态', + data: item.approvalStatus, + }, + { + name: '意见类别', + data: typeMap[item.comment.type], + }, + { + name: '意见内容', + data: item.comment.comment || '无', + }, + { + name: '任务耗时', + data: item.duration, + }, + ], + }) + }) + } }, { deep: true, diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index 5105a76..7994d21 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -65,7 +65,7 @@ sampleName: item.customerSampleInfo.sampleName, // 样品名称 manufacturingNo: item.customerSampleInfo.manufacturingNo, // 出厂编号 sampleModel: item.customerSampleInfo.sampleModel, // 型号 - calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name, // 校检类别 + calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory) ? mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name : '', // 校检类别 } }) total.value = res.data.total diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts deleted file mode 100644 index 3066ab3..0000000 --- a/src/api/system/plan.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 培训计划请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 导出培训计录列表 -export function exportLogList(data: object) { - return request({ - url: `${prefix}/train/log/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 导出培训计划列表 -export function exportPlanList(data: object) { - return request({ - url: `${prefix}/train/plan/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} -// 列表查询 -export function getPlanList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 审批列表查询 -export function getapprovalList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 培训计划审批删除 -export function getApprovalDelete(data: object) { - return request({ - url: `${prefix}/train/plan/approval/operate/delete`, - method: 'post', - data, - }) -} -// 主管部门 -export function getDeptTree(params: object) { - return request({ - url: '/sys/dept/tree', - method: 'get', - params, - }) -} - -// 培训计划保存 -export function getListSave(data: object) { - return request({ - url: `${prefix}/train/plan/save`, - method: 'post', - data, - }) -} -// 培训计划保存后的提交 -export function getListSubmit(data: object) { - return request({ - url: `${prefix}/train/plan/submit`, - method: 'post', - data, - }) -} -// 培训计划详情 -export function getListDetail(data: object) { - return request({ - url: `${prefix}/train/plan/detail`, - method: 'post', - data, - }) -} -// 培训计划更新 -export function getListUpdate(data: object) { - return request({ - url: `${prefix}/train/plan/update`, - method: 'post', - data, - }) -} -// 培训计划删除 -export function getListDelete(data: object) { - return request({ - url: `${prefix}/train/plan/delete`, - method: 'post', - data, - }) -} - -// 培训记录列表 -export function getLogList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 列表编号查询 -export function getPlanIdList(data: object) { - return request({ - url: `${prefix}/train/plan/list`, - method: 'post', - data, - }) -} - -// 培训记录新建 -export function getListLogAdd(data: object) { - return request({ - url: `${prefix}/train/log/add`, - method: 'post', - data, - }) -} - -// 培训记录修改 -export function getListLogupdate(data: object) { - return request({ - url: `${prefix}/train/log/update`, - method: 'post', - data, - }) -} - -// 培训记录详情 -export function getListLogDetail(data: object) { - return request({ - url: `${prefix}/train/log/detail`, - method: 'post', - data, - }) -} diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue index 52080f5..3eb6219 100644 --- a/src/components/ApprovalRecord/ApprovalRecord.vue +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -7,59 +7,80 @@ default: () => [], }, }) +const typeMap: { [key: string]: string } = { + 1: '同意', + 2: '驳回', + 3: '拒绝', +} const approvalRecord = ref([]) as any // 表格数据 watch(() => props.approvalRecordData, (newValue) => { - const record = newValue[0] as any// 流程数据 - const initiator = newValue[1] as any// 发起人 + if (newValue && newValue.length === 1) { // 只有发起人 + const initiator = newValue[0] as any// 发起人 - approvalRecord.value.push({ - finishTime: initiator[0].finishTime, - tableData: [ - { - name: initiator[0].taskName, - data: initiator[0].assigneeName, - }, - { - name: '部门名称', - data: initiator[0].deptName, - }, - // { - // name: '任务名称', - // data: initiator[0].taskName, - // }, - ], - }) - record.forEach((item: any) => { - approvalRecord.value.push({ - finishTime: item.finishTime, + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 tableData: [ { - name: item.taskName, - data: item.assigneeName, + name: initiator[0].taskName, + data: initiator[0].assigneeName, }, - // { - // name: '任务执行人', - // data: item.assigneeName, - // }, { name: '部门名称', - data: item.deptName, - }, - // { - // name: '意见类别', - // data: item.type', - // }, - { - name: '意见内容', - data: item.comment || '无', - }, - { - name: '任务耗时', - data: item.duration, + data: initiator[0].deptName, }, ], }) - }) + } + else { // 有发起人和审批流程 + const record = newValue[0] as any// 流程数据 + const initiator = newValue[1] as any// 发起人 + + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 + tableData: [ + { + name: initiator[0].taskName, + data: initiator[0].assigneeName, + }, + { + name: '部门名称', + data: initiator[0].deptName, + }, + ], + }) + // 流程数据处理 + record.forEach((item: any) => { + approvalRecord.value.push({ + finishTime: item.finishTime, + tableData: [ + { + name: item.taskName, + data: item.assigneeName, + }, + { + name: '部门名称', + data: item.deptName, + }, + { + name: '审批状态', + data: item.approvalStatus, + }, + { + name: '意见类别', + data: typeMap[item.comment.type], + }, + { + name: '意见内容', + data: item.comment.comment || '无', + }, + { + name: '任务耗时', + data: item.duration, + }, + ], + }) + }) + } }, { deep: true, diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index 5105a76..7994d21 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -65,7 +65,7 @@ sampleName: item.customerSampleInfo.sampleName, // 样品名称 manufacturingNo: item.customerSampleInfo.manufacturingNo, // 出厂编号 sampleModel: item.customerSampleInfo.sampleModel, // 型号 - calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name, // 校检类别 + calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory) ? mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name : '', // 校检类别 } }) total.value = res.data.total diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index f68400b..bf45d1e 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/system/plan' +import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/measure/plan' import { deleteAcceptanceCheck, getacceptanceCheckList, submitAcceptanceCheck } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts deleted file mode 100644 index 3066ab3..0000000 --- a/src/api/system/plan.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 培训计划请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 导出培训计录列表 -export function exportLogList(data: object) { - return request({ - url: `${prefix}/train/log/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 导出培训计划列表 -export function exportPlanList(data: object) { - return request({ - url: `${prefix}/train/plan/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} -// 列表查询 -export function getPlanList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 审批列表查询 -export function getapprovalList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 培训计划审批删除 -export function getApprovalDelete(data: object) { - return request({ - url: `${prefix}/train/plan/approval/operate/delete`, - method: 'post', - data, - }) -} -// 主管部门 -export function getDeptTree(params: object) { - return request({ - url: '/sys/dept/tree', - method: 'get', - params, - }) -} - -// 培训计划保存 -export function getListSave(data: object) { - return request({ - url: `${prefix}/train/plan/save`, - method: 'post', - data, - }) -} -// 培训计划保存后的提交 -export function getListSubmit(data: object) { - return request({ - url: `${prefix}/train/plan/submit`, - method: 'post', - data, - }) -} -// 培训计划详情 -export function getListDetail(data: object) { - return request({ - url: `${prefix}/train/plan/detail`, - method: 'post', - data, - }) -} -// 培训计划更新 -export function getListUpdate(data: object) { - return request({ - url: `${prefix}/train/plan/update`, - method: 'post', - data, - }) -} -// 培训计划删除 -export function getListDelete(data: object) { - return request({ - url: `${prefix}/train/plan/delete`, - method: 'post', - data, - }) -} - -// 培训记录列表 -export function getLogList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 列表编号查询 -export function getPlanIdList(data: object) { - return request({ - url: `${prefix}/train/plan/list`, - method: 'post', - data, - }) -} - -// 培训记录新建 -export function getListLogAdd(data: object) { - return request({ - url: `${prefix}/train/log/add`, - method: 'post', - data, - }) -} - -// 培训记录修改 -export function getListLogupdate(data: object) { - return request({ - url: `${prefix}/train/log/update`, - method: 'post', - data, - }) -} - -// 培训记录详情 -export function getListLogDetail(data: object) { - return request({ - url: `${prefix}/train/log/detail`, - method: 'post', - data, - }) -} diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue index 52080f5..3eb6219 100644 --- a/src/components/ApprovalRecord/ApprovalRecord.vue +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -7,59 +7,80 @@ default: () => [], }, }) +const typeMap: { [key: string]: string } = { + 1: '同意', + 2: '驳回', + 3: '拒绝', +} const approvalRecord = ref([]) as any // 表格数据 watch(() => props.approvalRecordData, (newValue) => { - const record = newValue[0] as any// 流程数据 - const initiator = newValue[1] as any// 发起人 + if (newValue && newValue.length === 1) { // 只有发起人 + const initiator = newValue[0] as any// 发起人 - approvalRecord.value.push({ - finishTime: initiator[0].finishTime, - tableData: [ - { - name: initiator[0].taskName, - data: initiator[0].assigneeName, - }, - { - name: '部门名称', - data: initiator[0].deptName, - }, - // { - // name: '任务名称', - // data: initiator[0].taskName, - // }, - ], - }) - record.forEach((item: any) => { - approvalRecord.value.push({ - finishTime: item.finishTime, + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 tableData: [ { - name: item.taskName, - data: item.assigneeName, + name: initiator[0].taskName, + data: initiator[0].assigneeName, }, - // { - // name: '任务执行人', - // data: item.assigneeName, - // }, { name: '部门名称', - data: item.deptName, - }, - // { - // name: '意见类别', - // data: item.type', - // }, - { - name: '意见内容', - data: item.comment || '无', - }, - { - name: '任务耗时', - data: item.duration, + data: initiator[0].deptName, }, ], }) - }) + } + else { // 有发起人和审批流程 + const record = newValue[0] as any// 流程数据 + const initiator = newValue[1] as any// 发起人 + + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 + tableData: [ + { + name: initiator[0].taskName, + data: initiator[0].assigneeName, + }, + { + name: '部门名称', + data: initiator[0].deptName, + }, + ], + }) + // 流程数据处理 + record.forEach((item: any) => { + approvalRecord.value.push({ + finishTime: item.finishTime, + tableData: [ + { + name: item.taskName, + data: item.assigneeName, + }, + { + name: '部门名称', + data: item.deptName, + }, + { + name: '审批状态', + data: item.approvalStatus, + }, + { + name: '意见类别', + data: typeMap[item.comment.type], + }, + { + name: '意见内容', + data: item.comment.comment || '无', + }, + { + name: '任务耗时', + data: item.duration, + }, + ], + }) + }) + } }, { deep: true, diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index 5105a76..7994d21 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -65,7 +65,7 @@ sampleName: item.customerSampleInfo.sampleName, // 样品名称 manufacturingNo: item.customerSampleInfo.manufacturingNo, // 出厂编号 sampleModel: item.customerSampleInfo.sampleModel, // 型号 - calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name, // 校检类别 + calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory) ? mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name : '', // 校检类别 } }) total.value = res.data.total diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index f68400b..bf45d1e 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/system/plan' +import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/measure/plan' import { deleteAcceptanceCheck, getacceptanceCheckList, submitAcceptanceCheck } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 39615f3..e55e8bc 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getDeptTree } from '@/api/system/plan' +import { getDeptTree } from '@/api/measure/plan' import { deleteEquipmentApply, getEquipmentApplyList, submitEquipmentApply } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts deleted file mode 100644 index 3066ab3..0000000 --- a/src/api/system/plan.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 培训计划请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 导出培训计录列表 -export function exportLogList(data: object) { - return request({ - url: `${prefix}/train/log/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 导出培训计划列表 -export function exportPlanList(data: object) { - return request({ - url: `${prefix}/train/plan/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} -// 列表查询 -export function getPlanList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 审批列表查询 -export function getapprovalList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 培训计划审批删除 -export function getApprovalDelete(data: object) { - return request({ - url: `${prefix}/train/plan/approval/operate/delete`, - method: 'post', - data, - }) -} -// 主管部门 -export function getDeptTree(params: object) { - return request({ - url: '/sys/dept/tree', - method: 'get', - params, - }) -} - -// 培训计划保存 -export function getListSave(data: object) { - return request({ - url: `${prefix}/train/plan/save`, - method: 'post', - data, - }) -} -// 培训计划保存后的提交 -export function getListSubmit(data: object) { - return request({ - url: `${prefix}/train/plan/submit`, - method: 'post', - data, - }) -} -// 培训计划详情 -export function getListDetail(data: object) { - return request({ - url: `${prefix}/train/plan/detail`, - method: 'post', - data, - }) -} -// 培训计划更新 -export function getListUpdate(data: object) { - return request({ - url: `${prefix}/train/plan/update`, - method: 'post', - data, - }) -} -// 培训计划删除 -export function getListDelete(data: object) { - return request({ - url: `${prefix}/train/plan/delete`, - method: 'post', - data, - }) -} - -// 培训记录列表 -export function getLogList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 列表编号查询 -export function getPlanIdList(data: object) { - return request({ - url: `${prefix}/train/plan/list`, - method: 'post', - data, - }) -} - -// 培训记录新建 -export function getListLogAdd(data: object) { - return request({ - url: `${prefix}/train/log/add`, - method: 'post', - data, - }) -} - -// 培训记录修改 -export function getListLogupdate(data: object) { - return request({ - url: `${prefix}/train/log/update`, - method: 'post', - data, - }) -} - -// 培训记录详情 -export function getListLogDetail(data: object) { - return request({ - url: `${prefix}/train/log/detail`, - method: 'post', - data, - }) -} diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue index 52080f5..3eb6219 100644 --- a/src/components/ApprovalRecord/ApprovalRecord.vue +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -7,59 +7,80 @@ default: () => [], }, }) +const typeMap: { [key: string]: string } = { + 1: '同意', + 2: '驳回', + 3: '拒绝', +} const approvalRecord = ref([]) as any // 表格数据 watch(() => props.approvalRecordData, (newValue) => { - const record = newValue[0] as any// 流程数据 - const initiator = newValue[1] as any// 发起人 + if (newValue && newValue.length === 1) { // 只有发起人 + const initiator = newValue[0] as any// 发起人 - approvalRecord.value.push({ - finishTime: initiator[0].finishTime, - tableData: [ - { - name: initiator[0].taskName, - data: initiator[0].assigneeName, - }, - { - name: '部门名称', - data: initiator[0].deptName, - }, - // { - // name: '任务名称', - // data: initiator[0].taskName, - // }, - ], - }) - record.forEach((item: any) => { - approvalRecord.value.push({ - finishTime: item.finishTime, + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 tableData: [ { - name: item.taskName, - data: item.assigneeName, + name: initiator[0].taskName, + data: initiator[0].assigneeName, }, - // { - // name: '任务执行人', - // data: item.assigneeName, - // }, { name: '部门名称', - data: item.deptName, - }, - // { - // name: '意见类别', - // data: item.type', - // }, - { - name: '意见内容', - data: item.comment || '无', - }, - { - name: '任务耗时', - data: item.duration, + data: initiator[0].deptName, }, ], }) - }) + } + else { // 有发起人和审批流程 + const record = newValue[0] as any// 流程数据 + const initiator = newValue[1] as any// 发起人 + + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 + tableData: [ + { + name: initiator[0].taskName, + data: initiator[0].assigneeName, + }, + { + name: '部门名称', + data: initiator[0].deptName, + }, + ], + }) + // 流程数据处理 + record.forEach((item: any) => { + approvalRecord.value.push({ + finishTime: item.finishTime, + tableData: [ + { + name: item.taskName, + data: item.assigneeName, + }, + { + name: '部门名称', + data: item.deptName, + }, + { + name: '审批状态', + data: item.approvalStatus, + }, + { + name: '意见类别', + data: typeMap[item.comment.type], + }, + { + name: '意见内容', + data: item.comment.comment || '无', + }, + { + name: '任务耗时', + data: item.duration, + }, + ], + }) + }) + } }, { deep: true, diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index 5105a76..7994d21 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -65,7 +65,7 @@ sampleName: item.customerSampleInfo.sampleName, // 样品名称 manufacturingNo: item.customerSampleInfo.manufacturingNo, // 出厂编号 sampleModel: item.customerSampleInfo.sampleModel, // 型号 - calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name, // 校检类别 + calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory) ? mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name : '', // 校检类别 } }) total.value = res.data.total diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index f68400b..bf45d1e 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/system/plan' +import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/measure/plan' import { deleteAcceptanceCheck, getacceptanceCheckList, submitAcceptanceCheck } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 39615f3..e55e8bc 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getDeptTree } from '@/api/system/plan' +import { getDeptTree } from '@/api/measure/plan' import { deleteEquipmentApply, getEquipmentApplyList, submitEquipmentApply } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/measure/bench/bench-interface.ts b/src/views/measure/bench/bench-interface.ts index f24dd3f..46d5d84 100644 --- a/src/views/measure/bench/bench-interface.ts +++ b/src/views/measure/bench/bench-interface.ts @@ -1,4 +1,14 @@ -export interface trainLogStatistic { +export interface ITrainLogStatistic { qualifiedCount: number // 合格总人次 trainCount: number // 考核总人次 } +// 培训计划统计返回值 +export interface IPlanReturn { + date: string + count: string | number +} + +// 证书列表返回值 +export interface ICertificatReturn { + lastValidDate: number +} diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts deleted file mode 100644 index 3066ab3..0000000 --- a/src/api/system/plan.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 培训计划请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 导出培训计录列表 -export function exportLogList(data: object) { - return request({ - url: `${prefix}/train/log/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 导出培训计划列表 -export function exportPlanList(data: object) { - return request({ - url: `${prefix}/train/plan/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} -// 列表查询 -export function getPlanList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 审批列表查询 -export function getapprovalList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 培训计划审批删除 -export function getApprovalDelete(data: object) { - return request({ - url: `${prefix}/train/plan/approval/operate/delete`, - method: 'post', - data, - }) -} -// 主管部门 -export function getDeptTree(params: object) { - return request({ - url: '/sys/dept/tree', - method: 'get', - params, - }) -} - -// 培训计划保存 -export function getListSave(data: object) { - return request({ - url: `${prefix}/train/plan/save`, - method: 'post', - data, - }) -} -// 培训计划保存后的提交 -export function getListSubmit(data: object) { - return request({ - url: `${prefix}/train/plan/submit`, - method: 'post', - data, - }) -} -// 培训计划详情 -export function getListDetail(data: object) { - return request({ - url: `${prefix}/train/plan/detail`, - method: 'post', - data, - }) -} -// 培训计划更新 -export function getListUpdate(data: object) { - return request({ - url: `${prefix}/train/plan/update`, - method: 'post', - data, - }) -} -// 培训计划删除 -export function getListDelete(data: object) { - return request({ - url: `${prefix}/train/plan/delete`, - method: 'post', - data, - }) -} - -// 培训记录列表 -export function getLogList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 列表编号查询 -export function getPlanIdList(data: object) { - return request({ - url: `${prefix}/train/plan/list`, - method: 'post', - data, - }) -} - -// 培训记录新建 -export function getListLogAdd(data: object) { - return request({ - url: `${prefix}/train/log/add`, - method: 'post', - data, - }) -} - -// 培训记录修改 -export function getListLogupdate(data: object) { - return request({ - url: `${prefix}/train/log/update`, - method: 'post', - data, - }) -} - -// 培训记录详情 -export function getListLogDetail(data: object) { - return request({ - url: `${prefix}/train/log/detail`, - method: 'post', - data, - }) -} diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue index 52080f5..3eb6219 100644 --- a/src/components/ApprovalRecord/ApprovalRecord.vue +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -7,59 +7,80 @@ default: () => [], }, }) +const typeMap: { [key: string]: string } = { + 1: '同意', + 2: '驳回', + 3: '拒绝', +} const approvalRecord = ref([]) as any // 表格数据 watch(() => props.approvalRecordData, (newValue) => { - const record = newValue[0] as any// 流程数据 - const initiator = newValue[1] as any// 发起人 + if (newValue && newValue.length === 1) { // 只有发起人 + const initiator = newValue[0] as any// 发起人 - approvalRecord.value.push({ - finishTime: initiator[0].finishTime, - tableData: [ - { - name: initiator[0].taskName, - data: initiator[0].assigneeName, - }, - { - name: '部门名称', - data: initiator[0].deptName, - }, - // { - // name: '任务名称', - // data: initiator[0].taskName, - // }, - ], - }) - record.forEach((item: any) => { - approvalRecord.value.push({ - finishTime: item.finishTime, + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 tableData: [ { - name: item.taskName, - data: item.assigneeName, + name: initiator[0].taskName, + data: initiator[0].assigneeName, }, - // { - // name: '任务执行人', - // data: item.assigneeName, - // }, { name: '部门名称', - data: item.deptName, - }, - // { - // name: '意见类别', - // data: item.type', - // }, - { - name: '意见内容', - data: item.comment || '无', - }, - { - name: '任务耗时', - data: item.duration, + data: initiator[0].deptName, }, ], }) - }) + } + else { // 有发起人和审批流程 + const record = newValue[0] as any// 流程数据 + const initiator = newValue[1] as any// 发起人 + + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 + tableData: [ + { + name: initiator[0].taskName, + data: initiator[0].assigneeName, + }, + { + name: '部门名称', + data: initiator[0].deptName, + }, + ], + }) + // 流程数据处理 + record.forEach((item: any) => { + approvalRecord.value.push({ + finishTime: item.finishTime, + tableData: [ + { + name: item.taskName, + data: item.assigneeName, + }, + { + name: '部门名称', + data: item.deptName, + }, + { + name: '审批状态', + data: item.approvalStatus, + }, + { + name: '意见类别', + data: typeMap[item.comment.type], + }, + { + name: '意见内容', + data: item.comment.comment || '无', + }, + { + name: '任务耗时', + data: item.duration, + }, + ], + }) + }) + } }, { deep: true, diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index 5105a76..7994d21 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -65,7 +65,7 @@ sampleName: item.customerSampleInfo.sampleName, // 样品名称 manufacturingNo: item.customerSampleInfo.manufacturingNo, // 出厂编号 sampleModel: item.customerSampleInfo.sampleModel, // 型号 - calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name, // 校检类别 + calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory) ? mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name : '', // 校检类别 } }) total.value = res.data.total diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index f68400b..bf45d1e 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/system/plan' +import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/measure/plan' import { deleteAcceptanceCheck, getacceptanceCheckList, submitAcceptanceCheck } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 39615f3..e55e8bc 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getDeptTree } from '@/api/system/plan' +import { getDeptTree } from '@/api/measure/plan' import { deleteEquipmentApply, getEquipmentApplyList, submitEquipmentApply } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/measure/bench/bench-interface.ts b/src/views/measure/bench/bench-interface.ts index f24dd3f..46d5d84 100644 --- a/src/views/measure/bench/bench-interface.ts +++ b/src/views/measure/bench/bench-interface.ts @@ -1,4 +1,14 @@ -export interface trainLogStatistic { +export interface ITrainLogStatistic { qualifiedCount: number // 合格总人次 trainCount: number // 考核总人次 } +// 培训计划统计返回值 +export interface IPlanReturn { + date: string + count: string | number +} + +// 证书列表返回值 +export interface ICertificatReturn { + lastValidDate: number +} diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index fecdc5f..0b59abe 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,14 +1,16 @@ @@ -210,7 +210,7 @@ - + diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts deleted file mode 100644 index 3066ab3..0000000 --- a/src/api/system/plan.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 培训计划请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 导出培训计录列表 -export function exportLogList(data: object) { - return request({ - url: `${prefix}/train/log/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 导出培训计划列表 -export function exportPlanList(data: object) { - return request({ - url: `${prefix}/train/plan/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} -// 列表查询 -export function getPlanList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 审批列表查询 -export function getapprovalList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 培训计划审批删除 -export function getApprovalDelete(data: object) { - return request({ - url: `${prefix}/train/plan/approval/operate/delete`, - method: 'post', - data, - }) -} -// 主管部门 -export function getDeptTree(params: object) { - return request({ - url: '/sys/dept/tree', - method: 'get', - params, - }) -} - -// 培训计划保存 -export function getListSave(data: object) { - return request({ - url: `${prefix}/train/plan/save`, - method: 'post', - data, - }) -} -// 培训计划保存后的提交 -export function getListSubmit(data: object) { - return request({ - url: `${prefix}/train/plan/submit`, - method: 'post', - data, - }) -} -// 培训计划详情 -export function getListDetail(data: object) { - return request({ - url: `${prefix}/train/plan/detail`, - method: 'post', - data, - }) -} -// 培训计划更新 -export function getListUpdate(data: object) { - return request({ - url: `${prefix}/train/plan/update`, - method: 'post', - data, - }) -} -// 培训计划删除 -export function getListDelete(data: object) { - return request({ - url: `${prefix}/train/plan/delete`, - method: 'post', - data, - }) -} - -// 培训记录列表 -export function getLogList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 列表编号查询 -export function getPlanIdList(data: object) { - return request({ - url: `${prefix}/train/plan/list`, - method: 'post', - data, - }) -} - -// 培训记录新建 -export function getListLogAdd(data: object) { - return request({ - url: `${prefix}/train/log/add`, - method: 'post', - data, - }) -} - -// 培训记录修改 -export function getListLogupdate(data: object) { - return request({ - url: `${prefix}/train/log/update`, - method: 'post', - data, - }) -} - -// 培训记录详情 -export function getListLogDetail(data: object) { - return request({ - url: `${prefix}/train/log/detail`, - method: 'post', - data, - }) -} diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue index 52080f5..3eb6219 100644 --- a/src/components/ApprovalRecord/ApprovalRecord.vue +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -7,59 +7,80 @@ default: () => [], }, }) +const typeMap: { [key: string]: string } = { + 1: '同意', + 2: '驳回', + 3: '拒绝', +} const approvalRecord = ref([]) as any // 表格数据 watch(() => props.approvalRecordData, (newValue) => { - const record = newValue[0] as any// 流程数据 - const initiator = newValue[1] as any// 发起人 + if (newValue && newValue.length === 1) { // 只有发起人 + const initiator = newValue[0] as any// 发起人 - approvalRecord.value.push({ - finishTime: initiator[0].finishTime, - tableData: [ - { - name: initiator[0].taskName, - data: initiator[0].assigneeName, - }, - { - name: '部门名称', - data: initiator[0].deptName, - }, - // { - // name: '任务名称', - // data: initiator[0].taskName, - // }, - ], - }) - record.forEach((item: any) => { - approvalRecord.value.push({ - finishTime: item.finishTime, + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 tableData: [ { - name: item.taskName, - data: item.assigneeName, + name: initiator[0].taskName, + data: initiator[0].assigneeName, }, - // { - // name: '任务执行人', - // data: item.assigneeName, - // }, { name: '部门名称', - data: item.deptName, - }, - // { - // name: '意见类别', - // data: item.type', - // }, - { - name: '意见内容', - data: item.comment || '无', - }, - { - name: '任务耗时', - data: item.duration, + data: initiator[0].deptName, }, ], }) - }) + } + else { // 有发起人和审批流程 + const record = newValue[0] as any// 流程数据 + const initiator = newValue[1] as any// 发起人 + + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 + tableData: [ + { + name: initiator[0].taskName, + data: initiator[0].assigneeName, + }, + { + name: '部门名称', + data: initiator[0].deptName, + }, + ], + }) + // 流程数据处理 + record.forEach((item: any) => { + approvalRecord.value.push({ + finishTime: item.finishTime, + tableData: [ + { + name: item.taskName, + data: item.assigneeName, + }, + { + name: '部门名称', + data: item.deptName, + }, + { + name: '审批状态', + data: item.approvalStatus, + }, + { + name: '意见类别', + data: typeMap[item.comment.type], + }, + { + name: '意见内容', + data: item.comment.comment || '无', + }, + { + name: '任务耗时', + data: item.duration, + }, + ], + }) + }) + } }, { deep: true, diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index 5105a76..7994d21 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -65,7 +65,7 @@ sampleName: item.customerSampleInfo.sampleName, // 样品名称 manufacturingNo: item.customerSampleInfo.manufacturingNo, // 出厂编号 sampleModel: item.customerSampleInfo.sampleModel, // 型号 - calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name, // 校检类别 + calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory) ? mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name : '', // 校检类别 } }) total.value = res.data.total diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index f68400b..bf45d1e 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/system/plan' +import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/measure/plan' import { deleteAcceptanceCheck, getacceptanceCheckList, submitAcceptanceCheck } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 39615f3..e55e8bc 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getDeptTree } from '@/api/system/plan' +import { getDeptTree } from '@/api/measure/plan' import { deleteEquipmentApply, getEquipmentApplyList, submitEquipmentApply } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/measure/bench/bench-interface.ts b/src/views/measure/bench/bench-interface.ts index f24dd3f..46d5d84 100644 --- a/src/views/measure/bench/bench-interface.ts +++ b/src/views/measure/bench/bench-interface.ts @@ -1,4 +1,14 @@ -export interface trainLogStatistic { +export interface ITrainLogStatistic { qualifiedCount: number // 合格总人次 trainCount: number // 考核总人次 } +// 培训计划统计返回值 +export interface IPlanReturn { + date: string + count: string | number +} + +// 证书列表返回值 +export interface ICertificatReturn { + lastValidDate: number +} diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index fecdc5f..0b59abe 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,14 +1,16 @@ @@ -210,7 +210,7 @@ - + diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue index 0703ad2..e104880 100644 --- a/src/views/measure/train/components/planListDialog.vue +++ b/src/views/measure/train/components/planListDialog.vue @@ -1,19 +1,16 @@ - + - + @@ -176,12 +153,14 @@ + - + - + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} @@ -189,7 +168,7 @@ - 确认 + 确认 取消 diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts deleted file mode 100644 index 3066ab3..0000000 --- a/src/api/system/plan.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 培训计划请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 导出培训计录列表 -export function exportLogList(data: object) { - return request({ - url: `${prefix}/train/log/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 导出培训计划列表 -export function exportPlanList(data: object) { - return request({ - url: `${prefix}/train/plan/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} -// 列表查询 -export function getPlanList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 审批列表查询 -export function getapprovalList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 培训计划审批删除 -export function getApprovalDelete(data: object) { - return request({ - url: `${prefix}/train/plan/approval/operate/delete`, - method: 'post', - data, - }) -} -// 主管部门 -export function getDeptTree(params: object) { - return request({ - url: '/sys/dept/tree', - method: 'get', - params, - }) -} - -// 培训计划保存 -export function getListSave(data: object) { - return request({ - url: `${prefix}/train/plan/save`, - method: 'post', - data, - }) -} -// 培训计划保存后的提交 -export function getListSubmit(data: object) { - return request({ - url: `${prefix}/train/plan/submit`, - method: 'post', - data, - }) -} -// 培训计划详情 -export function getListDetail(data: object) { - return request({ - url: `${prefix}/train/plan/detail`, - method: 'post', - data, - }) -} -// 培训计划更新 -export function getListUpdate(data: object) { - return request({ - url: `${prefix}/train/plan/update`, - method: 'post', - data, - }) -} -// 培训计划删除 -export function getListDelete(data: object) { - return request({ - url: `${prefix}/train/plan/delete`, - method: 'post', - data, - }) -} - -// 培训记录列表 -export function getLogList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 列表编号查询 -export function getPlanIdList(data: object) { - return request({ - url: `${prefix}/train/plan/list`, - method: 'post', - data, - }) -} - -// 培训记录新建 -export function getListLogAdd(data: object) { - return request({ - url: `${prefix}/train/log/add`, - method: 'post', - data, - }) -} - -// 培训记录修改 -export function getListLogupdate(data: object) { - return request({ - url: `${prefix}/train/log/update`, - method: 'post', - data, - }) -} - -// 培训记录详情 -export function getListLogDetail(data: object) { - return request({ - url: `${prefix}/train/log/detail`, - method: 'post', - data, - }) -} diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue index 52080f5..3eb6219 100644 --- a/src/components/ApprovalRecord/ApprovalRecord.vue +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -7,59 +7,80 @@ default: () => [], }, }) +const typeMap: { [key: string]: string } = { + 1: '同意', + 2: '驳回', + 3: '拒绝', +} const approvalRecord = ref([]) as any // 表格数据 watch(() => props.approvalRecordData, (newValue) => { - const record = newValue[0] as any// 流程数据 - const initiator = newValue[1] as any// 发起人 + if (newValue && newValue.length === 1) { // 只有发起人 + const initiator = newValue[0] as any// 发起人 - approvalRecord.value.push({ - finishTime: initiator[0].finishTime, - tableData: [ - { - name: initiator[0].taskName, - data: initiator[0].assigneeName, - }, - { - name: '部门名称', - data: initiator[0].deptName, - }, - // { - // name: '任务名称', - // data: initiator[0].taskName, - // }, - ], - }) - record.forEach((item: any) => { - approvalRecord.value.push({ - finishTime: item.finishTime, + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 tableData: [ { - name: item.taskName, - data: item.assigneeName, + name: initiator[0].taskName, + data: initiator[0].assigneeName, }, - // { - // name: '任务执行人', - // data: item.assigneeName, - // }, { name: '部门名称', - data: item.deptName, - }, - // { - // name: '意见类别', - // data: item.type', - // }, - { - name: '意见内容', - data: item.comment || '无', - }, - { - name: '任务耗时', - data: item.duration, + data: initiator[0].deptName, }, ], }) - }) + } + else { // 有发起人和审批流程 + const record = newValue[0] as any// 流程数据 + const initiator = newValue[1] as any// 发起人 + + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 + tableData: [ + { + name: initiator[0].taskName, + data: initiator[0].assigneeName, + }, + { + name: '部门名称', + data: initiator[0].deptName, + }, + ], + }) + // 流程数据处理 + record.forEach((item: any) => { + approvalRecord.value.push({ + finishTime: item.finishTime, + tableData: [ + { + name: item.taskName, + data: item.assigneeName, + }, + { + name: '部门名称', + data: item.deptName, + }, + { + name: '审批状态', + data: item.approvalStatus, + }, + { + name: '意见类别', + data: typeMap[item.comment.type], + }, + { + name: '意见内容', + data: item.comment.comment || '无', + }, + { + name: '任务耗时', + data: item.duration, + }, + ], + }) + }) + } }, { deep: true, diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index 5105a76..7994d21 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -65,7 +65,7 @@ sampleName: item.customerSampleInfo.sampleName, // 样品名称 manufacturingNo: item.customerSampleInfo.manufacturingNo, // 出厂编号 sampleModel: item.customerSampleInfo.sampleModel, // 型号 - calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name, // 校检类别 + calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory) ? mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name : '', // 校检类别 } }) total.value = res.data.total diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index f68400b..bf45d1e 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/system/plan' +import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/measure/plan' import { deleteAcceptanceCheck, getacceptanceCheckList, submitAcceptanceCheck } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 39615f3..e55e8bc 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getDeptTree } from '@/api/system/plan' +import { getDeptTree } from '@/api/measure/plan' import { deleteEquipmentApply, getEquipmentApplyList, submitEquipmentApply } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/measure/bench/bench-interface.ts b/src/views/measure/bench/bench-interface.ts index f24dd3f..46d5d84 100644 --- a/src/views/measure/bench/bench-interface.ts +++ b/src/views/measure/bench/bench-interface.ts @@ -1,4 +1,14 @@ -export interface trainLogStatistic { +export interface ITrainLogStatistic { qualifiedCount: number // 合格总人次 trainCount: number // 考核总人次 } +// 培训计划统计返回值 +export interface IPlanReturn { + date: string + count: string | number +} + +// 证书列表返回值 +export interface ICertificatReturn { + lastValidDate: number +} diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index fecdc5f..0b59abe 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,14 +1,16 @@ @@ -210,7 +210,7 @@ - + diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue index 0703ad2..e104880 100644 --- a/src/views/measure/train/components/planListDialog.vue +++ b/src/views/measure/train/components/planListDialog.vue @@ -1,19 +1,16 @@ - + - + @@ -176,12 +153,14 @@ + - + - + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} @@ -189,7 +168,7 @@ - 确认 + 确认 取消 diff --git a/src/views/measure/train/components/userListDialog.vue b/src/views/measure/train/components/userListDialog.vue index 20488ca..8c7556d 100644 --- a/src/views/measure/train/components/userListDialog.vue +++ b/src/views/measure/train/components/userListDialog.vue @@ -1,6 +1,8 @@ - + @@ -210,7 +210,7 @@ - + diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue index 0703ad2..e104880 100644 --- a/src/views/measure/train/components/planListDialog.vue +++ b/src/views/measure/train/components/planListDialog.vue @@ -1,19 +1,16 @@ - + - + @@ -176,12 +153,14 @@ + - + - + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} @@ -189,7 +168,7 @@ - 确认 + 确认 取消 diff --git a/src/views/measure/train/components/userListDialog.vue b/src/views/measure/train/components/userListDialog.vue index 20488ca..8c7556d 100644 --- a/src/views/measure/train/components/userListDialog.vue +++ b/src/views/measure/train/components/userListDialog.vue @@ -1,6 +1,8 @@ - + @@ -210,7 +210,7 @@ - + diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue index 0703ad2..e104880 100644 --- a/src/views/measure/train/components/planListDialog.vue +++ b/src/views/measure/train/components/planListDialog.vue @@ -1,19 +1,16 @@ - + - + @@ -176,12 +153,14 @@ + - + - + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} @@ -189,7 +168,7 @@ - 确认 + 确认 取消 diff --git a/src/views/measure/train/components/userListDialog.vue b/src/views/measure/train/components/userListDialog.vue index 20488ca..8c7556d 100644 --- a/src/views/measure/train/components/userListDialog.vue +++ b/src/views/measure/train/components/userListDialog.vue @@ -1,6 +1,8 @@ - + @@ -210,7 +210,7 @@ - + diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue index 0703ad2..e104880 100644 --- a/src/views/measure/train/components/planListDialog.vue +++ b/src/views/measure/train/components/planListDialog.vue @@ -1,19 +1,16 @@ - + - + @@ -176,12 +153,14 @@ + - + - + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} @@ -189,7 +168,7 @@ - 确认 + 确认 取消 diff --git a/src/views/measure/train/components/userListDialog.vue b/src/views/measure/train/components/userListDialog.vue index 20488ca..8c7556d 100644 --- a/src/views/measure/train/components/userListDialog.vue +++ b/src/views/measure/train/components/userListDialog.vue @@ -1,6 +1,8 @@ - + @@ -210,7 +210,7 @@ - + diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue index 0703ad2..e104880 100644 --- a/src/views/measure/train/components/planListDialog.vue +++ b/src/views/measure/train/components/planListDialog.vue @@ -1,19 +1,16 @@ - + - + @@ -176,12 +153,14 @@ + - + - + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} @@ -189,7 +168,7 @@ - 确认 + 确认 取消 diff --git a/src/views/measure/train/components/userListDialog.vue b/src/views/measure/train/components/userListDialog.vue index 20488ca..8c7556d 100644 --- a/src/views/measure/train/components/userListDialog.vue +++ b/src/views/measure/train/components/userListDialog.vue @@ -1,6 +1,8 @@ - + @@ -210,7 +210,7 @@ - + diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue index 0703ad2..e104880 100644 --- a/src/views/measure/train/components/planListDialog.vue +++ b/src/views/measure/train/components/planListDialog.vue @@ -1,19 +1,16 @@ - + - + @@ -176,12 +153,14 @@ + - + - + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} @@ -189,7 +168,7 @@ - 确认 + 确认 取消 diff --git a/src/views/measure/train/components/userListDialog.vue b/src/views/measure/train/components/userListDialog.vue index 20488ca..8c7556d 100644 --- a/src/views/measure/train/components/userListDialog.vue +++ b/src/views/measure/train/components/userListDialog.vue @@ -1,6 +1,8 @@ - + @@ -268,9 +241,9 @@ - 提交 + 保存 打印 @@ -292,7 +265,7 @@ > - + - + + > + + + 选择 + + + - - - - 删除行 - 增加行 + + 删除行 + - + *{{ item.text }} - - + + + + + + + {{ scope.row[item.value] }} - + diff --git a/src/api/measure/plan.ts b/src/api/measure/plan.ts new file mode 100644 index 0000000..b30ddc9 --- /dev/null +++ b/src/api/measure/plan.ts @@ -0,0 +1,165 @@ +/** + * 培训计划请求接口 + */ +import request from '../index' +const prefix = '/meter' + +// 导出培训计录列表 +export function exportLogList(data: object) { + return request({ + url: `${prefix}/train/log/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} + +// 导出培训计划列表 +export function exportPlanList(data: object) { + return request({ + url: `${prefix}/train/plan/listExport`, + method: 'post', + responseType: 'blob', + data, + }) +} +// 列表查询 +export function getPlanList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 审批列表查询 +export function getapprovalList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 培训计划审批删除 +export function getApprovalDelete(data: object) { + return request({ + url: `${prefix}/train/plan/approval/operate/delete`, + method: 'post', + data, + }) +} +// 主管部门 +export function getDeptTree(params: object) { + return request({ + url: '/sys/dept/tree', + method: 'get', + params, + }) +} + +// 培训计划保存 +export function getListSave(data: object) { + return request({ + url: `${prefix}/train/plan/save`, + method: 'post', + data, + }) +} +// 培训计划保存后的提交 +export function getListSubmit(data: object) { + return request({ + url: `${prefix}/train/plan/submit`, + method: 'post', + data, + }) +} + +// 培训计划详情 +export function getListDetail(data: object) { + return request({ + url: `${prefix}/train/plan/detail`, + method: 'post', + data, + }) +} +// 培训计划更新 +export function getListUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/update`, + method: 'post', + data, + }) +} + +// 未通过-驳回编辑 +export function getListFailUpdate(data: object) { + return request({ + url: `${prefix}/train/failUpdate`, + method: 'post', + data, + }) +} + +// 草稿箱-编辑 +export function getListDraftUpdate(data: object) { + return request({ + url: `${prefix}/train/plan/draftUpdate`, + method: 'post', + data, + }) +} + +// 培训计划删除 +export function getListDelete(data: object) { + return request({ + url: `${prefix}/train/plan/delete`, + method: 'post', + data, + }) +} + +// 培训记录列表 +export function getLogList(data: { offset: number; limit: number }) { + return request({ + url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, + method: 'post', + data, + }) +} + +// 列表编号查询 +export function getPlanIdList(data: object) { + return request({ + url: `${prefix}/train/plan/list`, + method: 'post', + data, + }) +} + +// 培训记录新建 +export function getListLogAdd(data: object) { + return request({ + url: `${prefix}/train/log/add`, + method: 'post', + data, + }) +} + +// 培训记录修改 +export function getListLogupdate(data: object) { + return request({ + url: `${prefix}/train/log/update`, + method: 'post', + data, + }) +} + +// 培训记录详情 +export function getListLogDetail(data: object) { + return request({ + url: `${prefix}/train/log/detail`, + method: 'post', + data, + }) +} diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts deleted file mode 100644 index 3066ab3..0000000 --- a/src/api/system/plan.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * 培训计划请求接口 - */ -import request from '../index' -const prefix = '/meter' - -// 导出培训计录列表 -export function exportLogList(data: object) { - return request({ - url: `${prefix}/train/log/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} - -// 导出培训计划列表 -export function exportPlanList(data: object) { - return request({ - url: `${prefix}/train/plan/listExport`, - method: 'post', - responseType: 'blob', - data, - }) -} -// 列表查询 -export function getPlanList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 审批列表查询 -export function getapprovalList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/plan/approval/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 培训计划审批删除 -export function getApprovalDelete(data: object) { - return request({ - url: `${prefix}/train/plan/approval/operate/delete`, - method: 'post', - data, - }) -} -// 主管部门 -export function getDeptTree(params: object) { - return request({ - url: '/sys/dept/tree', - method: 'get', - params, - }) -} - -// 培训计划保存 -export function getListSave(data: object) { - return request({ - url: `${prefix}/train/plan/save`, - method: 'post', - data, - }) -} -// 培训计划保存后的提交 -export function getListSubmit(data: object) { - return request({ - url: `${prefix}/train/plan/submit`, - method: 'post', - data, - }) -} -// 培训计划详情 -export function getListDetail(data: object) { - return request({ - url: `${prefix}/train/plan/detail`, - method: 'post', - data, - }) -} -// 培训计划更新 -export function getListUpdate(data: object) { - return request({ - url: `${prefix}/train/plan/update`, - method: 'post', - data, - }) -} -// 培训计划删除 -export function getListDelete(data: object) { - return request({ - url: `${prefix}/train/plan/delete`, - method: 'post', - data, - }) -} - -// 培训记录列表 -export function getLogList(data: { offset: number; limit: number }) { - return request({ - url: `${prefix}/train/log/listPage?offset=${data.offset}&limit=${data.limit} `, - method: 'post', - data, - }) -} - -// 列表编号查询 -export function getPlanIdList(data: object) { - return request({ - url: `${prefix}/train/plan/list`, - method: 'post', - data, - }) -} - -// 培训记录新建 -export function getListLogAdd(data: object) { - return request({ - url: `${prefix}/train/log/add`, - method: 'post', - data, - }) -} - -// 培训记录修改 -export function getListLogupdate(data: object) { - return request({ - url: `${prefix}/train/log/update`, - method: 'post', - data, - }) -} - -// 培训记录详情 -export function getListLogDetail(data: object) { - return request({ - url: `${prefix}/train/log/detail`, - method: 'post', - data, - }) -} diff --git a/src/components/ApprovalRecord/ApprovalRecord.vue b/src/components/ApprovalRecord/ApprovalRecord.vue index 52080f5..3eb6219 100644 --- a/src/components/ApprovalRecord/ApprovalRecord.vue +++ b/src/components/ApprovalRecord/ApprovalRecord.vue @@ -7,59 +7,80 @@ default: () => [], }, }) +const typeMap: { [key: string]: string } = { + 1: '同意', + 2: '驳回', + 3: '拒绝', +} const approvalRecord = ref([]) as any // 表格数据 watch(() => props.approvalRecordData, (newValue) => { - const record = newValue[0] as any// 流程数据 - const initiator = newValue[1] as any// 发起人 + if (newValue && newValue.length === 1) { // 只有发起人 + const initiator = newValue[0] as any// 发起人 - approvalRecord.value.push({ - finishTime: initiator[0].finishTime, - tableData: [ - { - name: initiator[0].taskName, - data: initiator[0].assigneeName, - }, - { - name: '部门名称', - data: initiator[0].deptName, - }, - // { - // name: '任务名称', - // data: initiator[0].taskName, - // }, - ], - }) - record.forEach((item: any) => { - approvalRecord.value.push({ - finishTime: item.finishTime, + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 tableData: [ { - name: item.taskName, - data: item.assigneeName, + name: initiator[0].taskName, + data: initiator[0].assigneeName, }, - // { - // name: '任务执行人', - // data: item.assigneeName, - // }, { name: '部门名称', - data: item.deptName, - }, - // { - // name: '意见类别', - // data: item.type', - // }, - { - name: '意见内容', - data: item.comment || '无', - }, - { - name: '任务耗时', - data: item.duration, + data: initiator[0].deptName, }, ], }) - }) + } + else { // 有发起人和审批流程 + const record = newValue[0] as any// 流程数据 + const initiator = newValue[1] as any// 发起人 + + approvalRecord.value.push({ // 发起人处理 + finishTime: initiator[0].createTime, // 创建时间--对应发起时间 + tableData: [ + { + name: initiator[0].taskName, + data: initiator[0].assigneeName, + }, + { + name: '部门名称', + data: initiator[0].deptName, + }, + ], + }) + // 流程数据处理 + record.forEach((item: any) => { + approvalRecord.value.push({ + finishTime: item.finishTime, + tableData: [ + { + name: item.taskName, + data: item.assigneeName, + }, + { + name: '部门名称', + data: item.deptName, + }, + { + name: '审批状态', + data: item.approvalStatus, + }, + { + name: '意见类别', + data: typeMap[item.comment.type], + }, + { + name: '意见内容', + data: item.comment.comment || '无', + }, + { + name: '任务耗时', + data: item.duration, + }, + ], + }) + }) + } }, { deep: true, diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index 5105a76..7994d21 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -65,7 +65,7 @@ sampleName: item.customerSampleInfo.sampleName, // 样品名称 manufacturingNo: item.customerSampleInfo.manufacturingNo, // 出厂编号 sampleModel: item.customerSampleInfo.sampleModel, // 型号 - calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name, // 校检类别 + calibrationCategory: mesureCategoryList.value.find(i => i.value === item.calibrationCategory) ? mesureCategoryList.value.find(i => i.value === item.calibrationCategory)!.name : '', // 校检类别 } }) total.value = res.data.total diff --git a/src/views/device/deviceMaintenance/components/listApproval.vue b/src/views/device/deviceMaintenance/components/listApproval.vue index f68400b..bf45d1e 100644 --- a/src/views/device/deviceMaintenance/components/listApproval.vue +++ b/src/views/device/deviceMaintenance/components/listApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/system/plan' +import { getApprovalDelete, getDeptTree, getListSubmit, getapprovalList } from '@/api/measure/plan' import { deleteAcceptanceCheck, getacceptanceCheckList, submitAcceptanceCheck } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue index 39615f3..e55e8bc 100644 --- a/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue +++ b/src/views/device/deviceMaintenance/components/listMaintenanceApproval.vue @@ -5,7 +5,7 @@ import type { IOptions, IlistApproval, IlistApprovalTypes } from '../checkList_interface' import type { IButton } from '@/views/measure/source/list_interface' import type { TableColumn } from '@/components/NormalTable/table_interface' -import { getDeptTree } from '@/api/system/plan' +import { getDeptTree } from '@/api/measure/plan' import { deleteEquipmentApply, getEquipmentApplyList, submitEquipmentApply } from '@/api/device/checkList' import ApprovalDialog from '@/components/Approval/ApprovalDialog.vue' import { SCHEDULE } from '@/utils/scheduleDict' diff --git a/src/views/measure/bench/bench-interface.ts b/src/views/measure/bench/bench-interface.ts index f24dd3f..46d5d84 100644 --- a/src/views/measure/bench/bench-interface.ts +++ b/src/views/measure/bench/bench-interface.ts @@ -1,4 +1,14 @@ -export interface trainLogStatistic { +export interface ITrainLogStatistic { qualifiedCount: number // 合格总人次 trainCount: number // 考核总人次 } +// 培训计划统计返回值 +export interface IPlanReturn { + date: string + count: string | number +} + +// 证书列表返回值 +export interface ICertificatReturn { + lastValidDate: number +} diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index fecdc5f..0b59abe 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -1,14 +1,16 @@ @@ -210,7 +210,7 @@ - + diff --git a/src/views/measure/train/components/planListDialog.vue b/src/views/measure/train/components/planListDialog.vue index 0703ad2..e104880 100644 --- a/src/views/measure/train/components/planListDialog.vue +++ b/src/views/measure/train/components/planListDialog.vue @@ -1,19 +1,16 @@ - + - + @@ -176,12 +153,14 @@ + - + - + {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }} @@ -189,7 +168,7 @@ - 确认 + 确认 取消 diff --git a/src/views/measure/train/components/userListDialog.vue b/src/views/measure/train/components/userListDialog.vue index 20488ca..8c7556d 100644 --- a/src/views/measure/train/components/userListDialog.vue +++ b/src/views/measure/train/components/userListDialog.vue @@ -1,6 +1,8 @@ - + @@ -268,9 +241,9 @@ - 提交 + 保存 打印 @@ -292,7 +265,7 @@ > - + - + + > + + + 选择 + + + - - - - 删除行 - 增加行 + + 删除行 + - + *{{ item.text }} - - + + + + + + + {{ scope.row[item.value] }} - + diff --git a/src/views/measure/train/trainPlanApprove.vue b/src/views/measure/train/trainPlanApprove.vue index c1ce99f..6189806 100644 --- a/src/views/measure/train/trainPlanApprove.vue +++ b/src/views/measure/train/trainPlanApprove.vue @@ -37,6 +37,7 @@ ], 未通过: [ { name: '查看', type: 'primary' }, + { name: '编辑', type: 'primary' }, ], 已取消: [ { name: '查看', type: 'primary' },