|
|
@@ -46,6 +46,7 @@
|
|
|
:id="operationItem.id"
|
|
|
:templateId="templateId"
|
|
|
:manualUrl="manualUrl"
|
|
|
+ :rowInfo="rowInfo"
|
|
|
:useType="useType"
|
|
|
@close="handleCloseAuditDetail"
|
|
|
@update="() => getAuditListByReportType()"
|
|
|
@@ -261,6 +262,21 @@ const columns = ref<SmartTableColumn[]>([
|
|
|
return !val ? '-' : val?.nickname
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '审批人',
|
|
|
+ prop: 'ratifyUser',
|
|
|
+ fieldProps: {
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ search: {
|
|
|
+ type: 'selectUserModal',
|
|
|
+ prop: 'bpmUserId'
|
|
|
+ },
|
|
|
+ render: (row, val) => {
|
|
|
+ return !val ? '-' : val?.nickname
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
label: '提交人',
|
|
|
prop: 'submitUser',
|
|
|
@@ -323,12 +339,14 @@ const getColumnsByReportType = computed(() => {
|
|
|
case PressureReportType['SUGGUESTION']:
|
|
|
return columns.value.filter((col) => col.prop !== 'bpmUserId') as SmartTableColumn[]
|
|
|
case PressureReportType['WORKINSTRUCTION']:
|
|
|
- case PressureReportType['INSPECTIONPLAN']:
|
|
|
case PressureReportType['MAINQUESTION']:
|
|
|
// const columnsTitle = [ '任务单号', '检验时间', '状态', '当前流程', '退回原因', '提交人', '审核人', '提交时间', '操作' ]
|
|
|
// return columns.value.filter((col) => columnsTitle.includes(col.label)) as SmartTableColumn[]
|
|
|
const columnsProp = ['orderNo', 'checkDate', 'status', 'currentNode', 'returnReason', 'submitUser', 'currentAuditor', 'submitTime', 'operation']
|
|
|
return columns.value.filter((col) => columnsProp.includes(col.prop as string)) as SmartTableColumn[]
|
|
|
+ case PressureReportType['INSPECTIONPLAN']:
|
|
|
+ const columnsPropIns = ['orderNo', 'checkDate', 'status', 'currentNode', 'returnReason', 'submitUser', 'currentAuditor','ratifyUser', 'submitTime', 'operation']
|
|
|
+ return columns.value.filter((col) => columnsPropIns.includes(col.prop as string)) as SmartTableColumn[]
|
|
|
default:
|
|
|
return [] as SmartTableColumn[]
|
|
|
}
|
|
|
@@ -405,11 +423,13 @@ const getAuditListByReportType = () => {
|
|
|
const showAuditCheckRecord = ref(false)
|
|
|
const auditApiParams = ref({})
|
|
|
const operationItem = ref<any>({})
|
|
|
+const rowInfo = ref<any>({})
|
|
|
const pageType = ref('check')
|
|
|
const templateId = ref('')
|
|
|
const manualUrl = ref('')
|
|
|
const handleOpenAuditDetailOrInfo = async (row, type) => {
|
|
|
operationItem.value = row
|
|
|
+ rowInfo.value = row
|
|
|
pageType.value = type
|
|
|
templateId.value = row.templateId
|
|
|
manualUrl.value = row.manualUrl
|
|
|
@@ -418,39 +438,6 @@ const handleOpenAuditDetailOrInfo = async (row, type) => {
|
|
|
reportIds: [row.reportId],
|
|
|
reportType: getReportType.value
|
|
|
}
|
|
|
- /*switch (getReportType.value) {
|
|
|
- case PressureReportType['SUGGUESTION']:
|
|
|
- auditApiParams.value = {
|
|
|
- ids: [row.reportId]
|
|
|
- }
|
|
|
- break
|
|
|
- case PressureReportType['WORKINSTRUCTION']:
|
|
|
- case PressureReportType['INSPECTIONPLAN']:
|
|
|
- case PressureReportType['MAINQUESTION']:
|
|
|
- auditApiParams.value = {
|
|
|
- ids: [row.id],
|
|
|
- reportType: getReportType.value
|
|
|
- }
|
|
|
- let reportUrl = ''
|
|
|
- if(PressureReportType['MAINQUESTION'] == getReportType.value && row.signFilePdf){
|
|
|
- reportUrl = buildFileUrl(row.signFilePdf)
|
|
|
- } else {
|
|
|
- // 获取pdf文件流
|
|
|
- const response = await TaskOrderApi.getReportPreview({
|
|
|
- reportId: row.id,
|
|
|
- fileType: 200
|
|
|
- })
|
|
|
- // 文件流转成url
|
|
|
- if (response) {
|
|
|
- const flow = new Blob([response], { type: 'application/pdf' })
|
|
|
- reportUrl = window.URL.createObjectURL(flow)
|
|
|
- }
|
|
|
- }
|
|
|
- operationItem.value = { ...row, reportId: row.id, reportUrl }
|
|
|
- break
|
|
|
- default:
|
|
|
- return false
|
|
|
- }*/
|
|
|
// 打开弹窗
|
|
|
showAuditCheckRecord.value = true
|
|
|
}
|