diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts index 0e470c4..32b5cd5 100644 --- a/src/api/business/lab/cert.ts +++ b/src/api/business/lab/cert.ts @@ -67,3 +67,14 @@ data, }) } + +// 证书审批完成 +export function certificatePrintByProcess(id: string) { + return request({ + url: '/business/certificateReport/approval/exportFile', + method: 'post', + data: { + id, + }, + }) +} diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts index 0e470c4..32b5cd5 100644 --- a/src/api/business/lab/cert.ts +++ b/src/api/business/lab/cert.ts @@ -67,3 +67,14 @@ data, }) } + +// 证书审批完成 +export function certificatePrintByProcess(id: string) { + return request({ + url: '/business/certificateReport/approval/exportFile', + method: 'post', + data: { + id, + }, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 5920e51..a5153ea 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,7 +12,9 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] + ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts index 0e470c4..32b5cd5 100644 --- a/src/api/business/lab/cert.ts +++ b/src/api/business/lab/cert.ts @@ -67,3 +67,14 @@ data, }) } + +// 证书审批完成 +export function certificatePrintByProcess(id: string) { + return request({ + url: '/business/certificateReport/approval/exportFile', + method: 'post', + data: { + id, + }, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 5920e51..a5153ea 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,7 +12,9 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] + ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue new file mode 100644 index 0000000..8264509 --- /dev/null +++ b/src/components/Approval/ApprovalDialogByProcess.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts index 0e470c4..32b5cd5 100644 --- a/src/api/business/lab/cert.ts +++ b/src/api/business/lab/cert.ts @@ -67,3 +67,14 @@ data, }) } + +// 证书审批完成 +export function certificatePrintByProcess(id: string) { + return request({ + url: '/business/certificateReport/approval/exportFile', + method: 'post', + data: { + id, + }, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 5920e51..a5153ea 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,7 +12,9 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] + ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue new file mode 100644 index 0000000..8264509 --- /dev/null +++ b/src/components/Approval/ApprovalDialogByProcess.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue new file mode 100644 index 0000000..e150747 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -0,0 +1,221 @@ + + + + diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts index 0e470c4..32b5cd5 100644 --- a/src/api/business/lab/cert.ts +++ b/src/api/business/lab/cert.ts @@ -67,3 +67,14 @@ data, }) } + +// 证书审批完成 +export function certificatePrintByProcess(id: string) { + return request({ + url: '/business/certificateReport/approval/exportFile', + method: 'post', + data: { + id, + }, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 5920e51..a5153ea 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,7 +12,9 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] + ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue new file mode 100644 index 0000000..8264509 --- /dev/null +++ b/src/components/Approval/ApprovalDialogByProcess.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue new file mode 100644 index 0000000..e150747 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -0,0 +1,221 @@ + + + + diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts new file mode 100644 index 0000000..1604410 --- /dev/null +++ b/src/components/ApprovalRecord/approval-interface.ts @@ -0,0 +1,13 @@ +export interface IList { + assigneeName: string // 审批人姓名 + cindex?: number + type: string // 状态 + finishTime: string // 审批时间 + comment: string // 审批意见 + nodeNumber: number // 节点号 + approvalStatus: string // 审批类型 + duration: string // 用时 + approvalLogs?: any[] + approvalLogsList?: any[] + countersignOrSign?: number // 类型 1会签、2或签 +} diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts index 0e470c4..32b5cd5 100644 --- a/src/api/business/lab/cert.ts +++ b/src/api/business/lab/cert.ts @@ -67,3 +67,14 @@ data, }) } + +// 证书审批完成 +export function certificatePrintByProcess(id: string) { + return request({ + url: '/business/certificateReport/approval/exportFile', + method: 'post', + data: { + id, + }, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 5920e51..a5153ea 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,7 +12,9 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] + ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue new file mode 100644 index 0000000..8264509 --- /dev/null +++ b/src/components/Approval/ApprovalDialogByProcess.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue new file mode 100644 index 0000000..e150747 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -0,0 +1,221 @@ + + + + diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts new file mode 100644 index 0000000..1604410 --- /dev/null +++ b/src/components/ApprovalRecord/approval-interface.ts @@ -0,0 +1,13 @@ +export interface IList { + assigneeName: string // 审批人姓名 + cindex?: number + type: string // 状态 + finishTime: string // 审批时间 + comment: string // 审批意见 + nodeNumber: number // 节点号 + approvalStatus: string // 审批类型 + duration: string // 用时 + approvalLogs?: any[] + approvalLogsList?: any[] + countersignOrSign?: number // 类型 1会签、2或签 +} diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts new file mode 100644 index 0000000..d4e98f9 --- /dev/null +++ b/src/utils/keepQuery.ts @@ -0,0 +1,28 @@ +// 保存页面查询等参数 +/** + * + * @param sessionName session存储时的名字 + * @param searchQuery 列表查询参数 + */ +export const saveSearchParams = (sessionName: string, searchQuery: any) => { + sessionStorage.setItem(sessionName, JSON.stringify(searchQuery)) +} +// 取出查询的参数 +export const renewSearchParams = (sessionName: string) => { + return JSON.parse(sessionStorage.getItem(sessionName) as string) +} +// 清空查询的参数 +export const clearSearchParams = (sessionName: string) => { + sessionStorage.removeItem(sessionName) +} +// 操作 +const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail'] +export function keepSearchParams(to: any, sessionName: string, searchQuery: any) { + if (needKeep.some((item: string) => to.includes(item))) { + // 保存参数 + saveSearchParams(sessionName, searchQuery) + } + else { + clearSearchParams(sessionName) + } +} diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts index 0e470c4..32b5cd5 100644 --- a/src/api/business/lab/cert.ts +++ b/src/api/business/lab/cert.ts @@ -67,3 +67,14 @@ data, }) } + +// 证书审批完成 +export function certificatePrintByProcess(id: string) { + return request({ + url: '/business/certificateReport/approval/exportFile', + method: 'post', + data: { + id, + }, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 5920e51..a5153ea 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,7 +12,9 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] + ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue new file mode 100644 index 0000000..8264509 --- /dev/null +++ b/src/components/Approval/ApprovalDialogByProcess.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue new file mode 100644 index 0000000..e150747 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -0,0 +1,221 @@ + + + + diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts new file mode 100644 index 0000000..1604410 --- /dev/null +++ b/src/components/ApprovalRecord/approval-interface.ts @@ -0,0 +1,13 @@ +export interface IList { + assigneeName: string // 审批人姓名 + cindex?: number + type: string // 状态 + finishTime: string // 审批时间 + comment: string // 审批意见 + nodeNumber: number // 节点号 + approvalStatus: string // 审批类型 + duration: string // 用时 + approvalLogs?: any[] + approvalLogsList?: any[] + countersignOrSign?: number // 类型 1会签、2或签 +} diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts new file mode 100644 index 0000000..d4e98f9 --- /dev/null +++ b/src/utils/keepQuery.ts @@ -0,0 +1,28 @@ +// 保存页面查询等参数 +/** + * + * @param sessionName session存储时的名字 + * @param searchQuery 列表查询参数 + */ +export const saveSearchParams = (sessionName: string, searchQuery: any) => { + sessionStorage.setItem(sessionName, JSON.stringify(searchQuery)) +} +// 取出查询的参数 +export const renewSearchParams = (sessionName: string) => { + return JSON.parse(sessionStorage.getItem(sessionName) as string) +} +// 清空查询的参数 +export const clearSearchParams = (sessionName: string) => { + sessionStorage.removeItem(sessionName) +} +// 操作 +const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail'] +export function keepSearchParams(to: any, sessionName: string, searchQuery: any) { + if (needKeep.some((item: string) => to.includes(item))) { + // 保存参数 + saveSearchParams(sessionName, searchQuery) + } + else { + clearSearchParams(sessionName) + } +} diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue index 1bcad63..f7b8b04 100644 --- a/src/views/business/board/depComprehensive/list.vue +++ b/src/views/business/board/depComprehensive/list.vue @@ -11,6 +11,7 @@ import { exportFile } from '@/utils/exportUtils' import { getUsersDept } from '@/api/device/standard' import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive' +import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any // 部门 const standardUsersDeptList = ref([]) as any @@ -20,6 +21,16 @@ startTime: '', // 开始时间 endTime: '', // 结束时间 }) +// 页面跳转之前保存参数 +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'depComprehensive', listQuery.value) +}) +// 重新赋值 +listQuery.value = renewSearchParams('depComprehensive') || { + deptId: '', // 部门id + startTime: '', // 开始时间 + endTime: '', // 结束时间 +} // 表头 const columns = ref([ { text: '部门', value: 'deptName', width: '160', align: 'center' }, diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts index 0e470c4..32b5cd5 100644 --- a/src/api/business/lab/cert.ts +++ b/src/api/business/lab/cert.ts @@ -67,3 +67,14 @@ data, }) } + +// 证书审批完成 +export function certificatePrintByProcess(id: string) { + return request({ + url: '/business/certificateReport/approval/exportFile', + method: 'post', + data: { + id, + }, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 5920e51..a5153ea 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,7 +12,9 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] + ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue new file mode 100644 index 0000000..8264509 --- /dev/null +++ b/src/components/Approval/ApprovalDialogByProcess.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue new file mode 100644 index 0000000..e150747 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -0,0 +1,221 @@ + + + + diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts new file mode 100644 index 0000000..1604410 --- /dev/null +++ b/src/components/ApprovalRecord/approval-interface.ts @@ -0,0 +1,13 @@ +export interface IList { + assigneeName: string // 审批人姓名 + cindex?: number + type: string // 状态 + finishTime: string // 审批时间 + comment: string // 审批意见 + nodeNumber: number // 节点号 + approvalStatus: string // 审批类型 + duration: string // 用时 + approvalLogs?: any[] + approvalLogsList?: any[] + countersignOrSign?: number // 类型 1会签、2或签 +} diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts new file mode 100644 index 0000000..d4e98f9 --- /dev/null +++ b/src/utils/keepQuery.ts @@ -0,0 +1,28 @@ +// 保存页面查询等参数 +/** + * + * @param sessionName session存储时的名字 + * @param searchQuery 列表查询参数 + */ +export const saveSearchParams = (sessionName: string, searchQuery: any) => { + sessionStorage.setItem(sessionName, JSON.stringify(searchQuery)) +} +// 取出查询的参数 +export const renewSearchParams = (sessionName: string) => { + return JSON.parse(sessionStorage.getItem(sessionName) as string) +} +// 清空查询的参数 +export const clearSearchParams = (sessionName: string) => { + sessionStorage.removeItem(sessionName) +} +// 操作 +const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail'] +export function keepSearchParams(to: any, sessionName: string, searchQuery: any) { + if (needKeep.some((item: string) => to.includes(item))) { + // 保存参数 + saveSearchParams(sessionName, searchQuery) + } + else { + clearSearchParams(sessionName) + } +} diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue index 1bcad63..f7b8b04 100644 --- a/src/views/business/board/depComprehensive/list.vue +++ b/src/views/business/board/depComprehensive/list.vue @@ -11,6 +11,7 @@ import { exportFile } from '@/utils/exportUtils' import { getUsersDept } from '@/api/device/standard' import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive' +import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any // 部门 const standardUsersDeptList = ref([]) as any @@ -20,6 +21,16 @@ startTime: '', // 开始时间 endTime: '', // 结束时间 }) +// 页面跳转之前保存参数 +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'depComprehensive', listQuery.value) +}) +// 重新赋值 +listQuery.value = renewSearchParams('depComprehensive') || { + deptId: '', // 部门id + startTime: '', // 开始时间 + endTime: '', // 结束时间 +} // 表头 const columns = ref([ { text: '部门', value: 'deptName', width: '160', align: 'center' }, diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index f88cf13..2726643 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -15,6 +15,7 @@ import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder' +import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const $router = useRouter() const useDeptList = ref([]) // 部门列表 @@ -32,6 +33,20 @@ offset: 1, limit: 20, }) +// 页面跳转之前保存参数 +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'equipmentReminder', listQuery.value) +}) +// 重新赋值 +listQuery.value = renewSearchParams('equipmentReminder') || { + equipmentName: '', // 设备名称 + equipmentNo: '', // 设备编号 + mesureType: '', // 检定方式 + useDept: '', // 使用部门 + usePerson: '', // 使用人 + offset: 1, + limit: 20, +} // 表头 const columns = ref([ { text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' }, @@ -77,10 +92,10 @@ // 数据查询 function fetchData(isNowPage = false) { loadingTable.value = true - if (!isNowPage) { - // 是否显示当前页,否则跳转第一页 - listQuery.value.offset = 1 - } + // if (!isNowPage) { + // // 是否显示当前页,否则跳转第一页 + // listQuery.value.offset = 1 + // } getEquipmentReminderList(listQuery.value).then((response) => { list.value = response.data.rows.map((item: { validDate: string }) => { return { diff --git a/src/api/business/lab/cert.ts b/src/api/business/lab/cert.ts index 0e470c4..32b5cd5 100644 --- a/src/api/business/lab/cert.ts +++ b/src/api/business/lab/cert.ts @@ -67,3 +67,14 @@ data, }) } + +// 证书审批完成 +export function certificatePrintByProcess(id: string) { + return request({ + url: '/business/certificateReport/approval/exportFile', + method: 'post', + data: { + id, + }, + }) +} diff --git a/src/components.d.ts b/src/components.d.ts index 5920e51..a5153ea 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,7 +12,9 @@ AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] + ApprovalDialogByProcess: typeof import('./components/Approval/ApprovalDialogByProcess.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] + ApprovalRecordTable: typeof import('./components/ApprovalRecord/ApprovalRecordTable.vue')['default'] ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] diff --git a/src/components/Approval/ApprovalDialogByProcess.vue b/src/components/Approval/ApprovalDialogByProcess.vue new file mode 100644 index 0000000..8264509 --- /dev/null +++ b/src/components/Approval/ApprovalDialogByProcess.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue new file mode 100644 index 0000000..e150747 --- /dev/null +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -0,0 +1,221 @@ + + + + diff --git a/src/components/ApprovalRecord/approval-interface.ts b/src/components/ApprovalRecord/approval-interface.ts new file mode 100644 index 0000000..1604410 --- /dev/null +++ b/src/components/ApprovalRecord/approval-interface.ts @@ -0,0 +1,13 @@ +export interface IList { + assigneeName: string // 审批人姓名 + cindex?: number + type: string // 状态 + finishTime: string // 审批时间 + comment: string // 审批意见 + nodeNumber: number // 节点号 + approvalStatus: string // 审批类型 + duration: string // 用时 + approvalLogs?: any[] + approvalLogsList?: any[] + countersignOrSign?: number // 类型 1会签、2或签 +} diff --git a/src/utils/keepQuery.ts b/src/utils/keepQuery.ts new file mode 100644 index 0000000..d4e98f9 --- /dev/null +++ b/src/utils/keepQuery.ts @@ -0,0 +1,28 @@ +// 保存页面查询等参数 +/** + * + * @param sessionName session存储时的名字 + * @param searchQuery 列表查询参数 + */ +export const saveSearchParams = (sessionName: string, searchQuery: any) => { + sessionStorage.setItem(sessionName, JSON.stringify(searchQuery)) +} +// 取出查询的参数 +export const renewSearchParams = (sessionName: string) => { + return JSON.parse(sessionStorage.getItem(sessionName) as string) +} +// 清空查询的参数 +export const clearSearchParams = (sessionName: string) => { + sessionStorage.removeItem(sessionName) +} +// 操作 +const needKeep = ['edit', 'detail', 'update', 'add', 'create', 'trainPlanApprove', 'solveDetail', 'certPrintDetail'] +export function keepSearchParams(to: any, sessionName: string, searchQuery: any) { + if (needKeep.some((item: string) => to.includes(item))) { + // 保存参数 + saveSearchParams(sessionName, searchQuery) + } + else { + clearSearchParams(sessionName) + } +} diff --git a/src/views/business/board/depComprehensive/list.vue b/src/views/business/board/depComprehensive/list.vue index 1bcad63..f7b8b04 100644 --- a/src/views/business/board/depComprehensive/list.vue +++ b/src/views/business/board/depComprehensive/list.vue @@ -11,6 +11,7 @@ import { exportFile } from '@/utils/exportUtils' import { getUsersDept } from '@/api/device/standard' import { exportDepComprehensiveList, getDepComprehensiveList } from '@/api/business/board/depComprehensive' +import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any // 部门 const standardUsersDeptList = ref([]) as any @@ -20,6 +21,16 @@ startTime: '', // 开始时间 endTime: '', // 结束时间 }) +// 页面跳转之前保存参数 +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'depComprehensive', listQuery.value) +}) +// 重新赋值 +listQuery.value = renewSearchParams('depComprehensive') || { + deptId: '', // 部门id + startTime: '', // 开始时间 + endTime: '', // 结束时间 +} // 表头 const columns = ref([ { text: '部门', value: 'deptName', width: '160', align: 'center' }, diff --git a/src/views/business/board/equipmentReminder/list.vue b/src/views/business/board/equipmentReminder/list.vue index f88cf13..2726643 100644 --- a/src/views/business/board/equipmentReminder/list.vue +++ b/src/views/business/board/equipmentReminder/list.vue @@ -15,6 +15,7 @@ import { printJSON } from '@/utils/printUtils' import { exportFile } from '@/utils/exportUtils' import { exportEquipmentReminderList, getEquipmentReminderList, urgeEquipmentReminderList } from '@/api/business/board/equipmentReminder' +import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const $router = useRouter() const useDeptList = ref([]) // 部门列表 @@ -32,6 +33,20 @@ offset: 1, limit: 20, }) +// 页面跳转之前保存参数 +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'equipmentReminder', listQuery.value) +}) +// 重新赋值 +listQuery.value = renewSearchParams('equipmentReminder') || { + equipmentName: '', // 设备名称 + equipmentNo: '', // 设备编号 + mesureType: '', // 检定方式 + useDept: '', // 使用部门 + usePerson: '', // 使用人 + offset: 1, + limit: 20, +} // 表头 const columns = ref([ { text: '设备编号', value: 'equipmentNo', align: 'center', width: '160' }, @@ -77,10 +92,10 @@ // 数据查询 function fetchData(isNowPage = false) { loadingTable.value = true - if (!isNowPage) { - // 是否显示当前页,否则跳转第一页 - listQuery.value.offset = 1 - } + // if (!isNowPage) { + // // 是否显示当前页,否则跳转第一页 + // listQuery.value.offset = 1 + // } getEquipmentReminderList(listQuery.value).then((response) => { list.value = response.data.rows.map((item: { validDate: string }) => { return { diff --git a/src/views/business/board/overdueReminder/list.vue b/src/views/business/board/overdueReminder/list.vue index 4cec39e..b99f309 100644 --- a/src/views/business/board/overdueReminder/list.vue +++ b/src/views/business/board/overdueReminder/list.vue @@ -9,6 +9,7 @@ import { exportFile } from '@/utils/exportUtils' import { exportTaskList, getTaskList } from '@/api/business/schedule/task' import { interchangeListUrge } from '@/api/business/schedule/interchangeList' +import { keepSearchParams, renewSearchParams } from '@/utils/keepQuery' const { proxy } = getCurrentInstance() as any const $router = useRouter() // 查询条件 @@ -26,6 +27,25 @@ offset: 1, limit: 20, }) +// 页面跳转之前保存参数 +onBeforeRouteLeave((to: any) => { + keepSearchParams(to.path, 'overdueReminder', listQuery.value) +}) +// 重新赋值 +listQuery.value = renewSearchParams('overdueReminder') || { + sampleNo: '', // 样品编号 + sampleName: '', // 样品名称 + orderNo: '', // 委托书编号 + customerNo: '', // 委托方代码 + customerName: '', // 委托方名称 + isUrgent: '', // 是否加急 + sampleBelong: '', // 样品属性 + startTime: '', // 应检完时间-开始 + endTime: '', // 应检完时间-结束 + sampleStatus: '8', // 样品状态:8已超期 + offset: 1, + limit: 20, +} // 表头 const columns = ref([ { text: '样品编号', value: 'sampleNo', width: '160', align: 'center' }, @@ -53,10 +73,10 @@ // 数据查询 function fetchData(isNowPage = false) { loadingTable.value = true - if (!isNowPage) { - // 是否显示当前页,否则跳转第一页 - listQuery.value.offset = 1 - } + // if (!isNowPage) { + // // 是否显示当前页,否则跳转第一页 + // listQuery.value.offset = 1 + // } getTaskList(listQuery.value).then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) @@ -183,7 +203,9 @@ } } -fetchData(true) +onMounted(() => { + fetchData(true) +})