|
|
@@ -12,11 +12,35 @@
|
|
|
<!-- inactive-text="记录"-->
|
|
|
<!-- @change="handleChangeShowReportPdf"-->
|
|
|
<!-- />-->
|
|
|
- <el-radio-group v-model="showReportPdfType" @change="handleChangeShowReportPdf">
|
|
|
- <el-radio-button label="record">记录</el-radio-button>
|
|
|
- <el-radio-button label="report">报告</el-radio-button>
|
|
|
- <el-radio-button label="result" v-if="selectedItem?.reportType === 100">结论报告</el-radio-button>
|
|
|
- </el-radio-group>
|
|
|
+<!-- <el-radio-group v-model="showReportPdfType" @change="handleChangeShowReportPdf">-->
|
|
|
+<!-- <el-radio-button label="record">记录</el-radio-button>-->
|
|
|
+<!-- <el-radio-button label="report">报告</el-radio-button>-->
|
|
|
+<!-- <el-radio-button label="result" v-if="selectedItem?.reportType === 100">结论报告</el-radio-button>-->
|
|
|
+<!-- </el-radio-group>-->
|
|
|
+ <div class="capsule-tabs">
|
|
|
+ <div
|
|
|
+ class="tab-item"
|
|
|
+ :class="{ active: showReportPdfType === 'record' }"
|
|
|
+ @click="handleChangeShowReportPdf('record')"
|
|
|
+ >
|
|
|
+ <span>记录</span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="tab-item"
|
|
|
+ :class="{ active: showReportPdfType === 'report' }"
|
|
|
+ @click="handleChangeShowReportPdf('report')"
|
|
|
+ >
|
|
|
+ <span>报告</span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="tab-item"
|
|
|
+ :class="{ active: showReportPdfType === 'result' }"
|
|
|
+ @click="handleChangeShowReportPdf('result')"
|
|
|
+ v-if="selectedItem?.reportType === 100"
|
|
|
+ >
|
|
|
+ <span>结论报告</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="info-item" style="margin: 0 auto;">
|
|
|
<span class="label">检验项目:</span>
|
|
|
@@ -94,22 +118,11 @@
|
|
|
@modify-checker="handleModifyChecker"
|
|
|
/>
|
|
|
<!-- <div class="pdf-panel" :style="{ maxWidth: !onlyShowPdf ? '1200px' : 'unset' }"> -->
|
|
|
- <div class="pdf-panel" style="max-width: 1200px; margin: 0 auto;" >
|
|
|
+ <div ref="pdfPanelRef" class="pdf-panel" >
|
|
|
<!-- PDF预览区域 -->
|
|
|
-<!-- <InlinePdfViewer-->
|
|
|
-<!-- class="!w-full"-->
|
|
|
-<!-- :refreshPdf="refreshPdf"-->
|
|
|
-<!-- v-if="refreshPdfFlag"-->
|
|
|
-<!-- :pdf-url="(selectedItem as any)?.prepareUrl || (selectedItem as any)?.reportUrl"-->
|
|
|
-<!-- :selected-item="selectedItem"-->
|
|
|
-<!-- :template-params="templateParams"-->
|
|
|
-<!-- :report-list="reportList"-->
|
|
|
-<!-- :handleUpload="handleUploadItem"-->
|
|
|
-<!-- :report-type="showReportPdfType"-->
|
|
|
-<!-- />-->
|
|
|
- <el-scrollbar>
|
|
|
- <SpreadViewer :initData="initData" ref="spreadRef"/>
|
|
|
- </el-scrollbar>
|
|
|
+ <div class="!h-full" :style="{ width: pdfContentWidth + 'px'}">
|
|
|
+ <SpreadViewer :initData="initData" ref="spreadRef" isFullscreen @saveSuccess="saveSuccessRecord"/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!--
|
|
|
1、重大问题线索告知表
|
|
|
@@ -118,93 +131,93 @@
|
|
|
以上报告类型不显示右侧栏目
|
|
|
-->
|
|
|
<template v-if="showCheckBook && getReportStatusEnd">
|
|
|
- <div class="operation-panel">
|
|
|
- <template v-if="[0, 2].includes(checkBookDetail.rectificationStatus)">
|
|
|
- <div class="default-toolbar">
|
|
|
- <el-button type="success" @click="() => handlePass(0)">整改通过</el-button>
|
|
|
- <el-button type="success" @click="() => handlePass(2)">整改不通过</el-button>
|
|
|
+ <div class="right-panel-container">
|
|
|
+ <!-- 收缩展开按钮 -->
|
|
|
+ <div class="toggle-btn" @click="togglePanel" :class="{ 'collapsed': !isExpanded }">
|
|
|
+ <el-icon>
|
|
|
+ <Back v-if="!isExpanded" />
|
|
|
+ <Right v-else />
|
|
|
+ </el-icon>
|
|
|
+ </div>
|
|
|
+ <div class="operation-panel" :class="{ 'expanded': isExpanded, 'collapsed': !isExpanded }">
|
|
|
+ <div class="operation-inner custom-inner">
|
|
|
<template v-if="checkBookDetail.rectificationStatus === 2">
|
|
|
- <el-button type="primary" @click="() => handlePass(1)">回退</el-button>
|
|
|
+ <div class="operation-item">
|
|
|
+ <div class="item-header"> 回退原因 </div>
|
|
|
+ <div class="item-content">
|
|
|
+ <el-form
|
|
|
+ ref="returnFormRef"
|
|
|
+ :model="returnForm"
|
|
|
+ :rules="returnFormRules"
|
|
|
+ label-position="right"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="回退原因" prop="rejectionReason">
|
|
|
+ <el-input
|
|
|
+ v-model="returnForm.rejectionReason"
|
|
|
+ type="textarea"
|
|
|
+ :rows="5"
|
|
|
+ maxlength="100"
|
|
|
+ placeholder="请输入回退原因"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <div class="operation-inner custom-inner">
|
|
|
- <template v-if="checkBookDetail.rectificationStatus === 2">
|
|
|
- <div class="operation-item">
|
|
|
- <div class="item-header"> 回退原因 </div>
|
|
|
+ <div class="operation-item1">
|
|
|
+ <div class="item-header"> 处理人信息 </div>
|
|
|
<div class="item-content">
|
|
|
- <el-form
|
|
|
- ref="returnFormRef"
|
|
|
- :model="returnForm"
|
|
|
- :rules="returnFormRules"
|
|
|
- label-position="right"
|
|
|
- label-width="80px"
|
|
|
- >
|
|
|
- <el-form-item label="回退原因" prop="rejectionReason">
|
|
|
- <el-input
|
|
|
- v-model="returnForm.rejectionReason"
|
|
|
- type="textarea"
|
|
|
- :rows="5"
|
|
|
- maxlength="100"
|
|
|
- placeholder="请输入回退原因"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <div class="operation-item1">
|
|
|
- <div class="item-header"> 处理人信息 </div>
|
|
|
- <div class="item-content">
|
|
|
- <div class="item-content-item">
|
|
|
- <span class="item-content-item-label">联系人姓名:</span>
|
|
|
- <span class="item-content-item-value">{{ checkBookDetail?.recipient || '-' }}</span>
|
|
|
- </div>
|
|
|
- <div class="item-content-item">
|
|
|
- <span class="item-content-item-label">联系人电话:</span>
|
|
|
- <span class="item-content-item-value">{{ checkBookDetail?.recipientPhone || '-'}}</span>
|
|
|
- </div>
|
|
|
- <div class="item-content-item">
|
|
|
- <span class="item-content-item-label">当前状态:</span>
|
|
|
- <span class="item-content-item-value">{{
|
|
|
- rectificationStatusMap[checkBookDetail?.rectificationStatus] || '-'
|
|
|
- }}</span>
|
|
|
+ <div class="item-content-item">
|
|
|
+ <span class="item-content-item-label">联系人姓名:</span>
|
|
|
+ <span class="item-content-item-value">{{ checkBookDetail?.recipient || '-' }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="item-content-item">
|
|
|
+ <span class="item-content-item-label">联系人电话:</span>
|
|
|
+ <span class="item-content-item-value">{{ checkBookDetail?.recipientPhone || '-'}}</span>
|
|
|
+ </div>
|
|
|
+ <div class="item-content-item">
|
|
|
+ <span class="item-content-item-label">当前状态:</span>
|
|
|
+ <span class="item-content-item-value">{{
|
|
|
+ rectificationStatusMap[checkBookDetail?.rectificationStatus] || '-'
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="operation-item1 videoAndImg">
|
|
|
- <div class="item-header"> 整改材料 </div>
|
|
|
- <div class="item-content1">
|
|
|
- <div class="item-content1-item">图片:</div>
|
|
|
- <div class="item-content1-img">
|
|
|
- <template
|
|
|
- v-for="(path, index) in checkBookDetail.rectificationImage?.split(',') || []"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <div class="item-content1-img-item">
|
|
|
- <img class="img-item" :src="buildFileUrl(path)" alt="" @click="handlePreview(buildFileUrl(path), 'image')" />
|
|
|
- <div class="list-item-tool">
|
|
|
- <el-icon class="icon" @click="() => handlePreview(buildFileUrl(path), 'image')"><View /></el-icon>
|
|
|
- </div>
|
|
|
+ <div class="operation-item1 videoAndImg">
|
|
|
+ <div class="item-header"> 整改材料 </div>
|
|
|
+ <div class="item-content1">
|
|
|
+ <div class="item-content1-item">图片:</div>
|
|
|
+ <div class="item-content1-img">
|
|
|
+ <template
|
|
|
+ v-for="(path, index) in checkBookDetail.rectificationImage?.split(',') || []"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <div class="item-content1-img-item">
|
|
|
+ <img class="img-item" :src="buildFileUrl(path)" alt="" @click="handlePreview(buildFileUrl(path), 'image')" />
|
|
|
+ <div class="list-item-tool">
|
|
|
+ <el-icon class="icon" @click="() => handlePreview(buildFileUrl(path), 'image')"><View /></el-icon>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- </template>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="item-content1">
|
|
|
- <div class="item-content1-item">视频:</div>
|
|
|
- <div class="item-content1-img">
|
|
|
- <template
|
|
|
- v-for="(path, index) in checkBookDetail.rectificationVideo?.split(',') || []"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <div class="item-content1-img-item">
|
|
|
- <video class="img-item" :src="buildFileUrl(path)" alt="" @click="handlePreview(buildFileUrl(path), 'video')"></video>
|
|
|
- <!-- 视频播放按钮 -->
|
|
|
- <div class="list-item-tool">
|
|
|
- <el-icon class="icon" @click="() => handlePreview(buildFileUrl(path), 'video')"><View /></el-icon>
|
|
|
- </div>
|
|
|
+ <div class="item-content1">
|
|
|
+ <div class="item-content1-item">视频:</div>
|
|
|
+ <div class="item-content1-img">
|
|
|
+ <template
|
|
|
+ v-for="(path, index) in checkBookDetail.rectificationVideo?.split(',') || []"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <div class="item-content1-img-item">
|
|
|
+ <video class="img-item" :src="buildFileUrl(path)" alt="" @click="handlePreview(buildFileUrl(path), 'video')"></video>
|
|
|
+ <!-- 视频播放按钮 -->
|
|
|
+ <div class="list-item-tool">
|
|
|
+ <el-icon class="icon" @click="() => handlePreview(buildFileUrl(path), 'video')"><View /></el-icon>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -212,158 +225,112 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <div class="operation-panel" v-if="!onlyShowPdf">
|
|
|
- <div class="operation-btns">
|
|
|
- <!-- 报告办结后,这部分按钮不再显示 -->
|
|
|
- <template v-if="!getReportStatusEnd">
|
|
|
- <!-- 根据报告类型和配置显示相应按钮 -->
|
|
|
- <template
|
|
|
- v-if="
|
|
|
- selectedItem.reportType === PressureReportType.SINGLE &&
|
|
|
- 'PipeCheckerTaskDetail' === routeName
|
|
|
- "
|
|
|
- >
|
|
|
- <!-- 独审报告根据配置显示按钮 -->
|
|
|
- <el-button
|
|
|
- v-if="currentReportConfig?.isApproval && isCanSubmitToAudit"
|
|
|
- type="danger"
|
|
|
- @click="handleSubmitAudit"
|
|
|
- :disabled="checkerIsLoginUser"
|
|
|
- >
|
|
|
- 提交报告审核
|
|
|
- </el-button>
|
|
|
- <!-- 没有审核只有审批 -->
|
|
|
- <el-button
|
|
|
- v-if="
|
|
|
- currentReportConfig?.isRatify &&
|
|
|
- !currentReportConfig?.isApproval &&
|
|
|
- isCanSubmitToAudit
|
|
|
- "
|
|
|
- type="danger"
|
|
|
- @click="handleApprovalSelectConfirm"
|
|
|
- :disabled="checkerIsLoginUser"
|
|
|
- >
|
|
|
- 提交报告审批
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <!-- 非独审报告默认显示审核按钮 -->
|
|
|
- <el-button
|
|
|
- v-if="
|
|
|
- selectedItem.reportType !== PressureReportType.SINGLE &&
|
|
|
- isCanSubmitToAudit &&
|
|
|
- 'PipeCheckerTaskDetail' === routeName
|
|
|
- "
|
|
|
- type="danger"
|
|
|
- @click="handleSubmitAudit"
|
|
|
- :disabled="checkerIsLoginUser"
|
|
|
- >
|
|
|
- {{ selectedItem.reportType === PressureReportType['SUGGUESTION'] ? '提交审核' : '提交报告审核' }}
|
|
|
- </el-button>
|
|
|
- <el-button type="primary" plain v-if="isCanEditReport" @click="handleEditRreport" :disabled="checkerIsLoginUser"
|
|
|
- >编制报告</el-button>
|
|
|
- <el-button v-if="isCanSubmitRecheck" type="primary" @click="handleSelectVerfiyer" :disabled="checkerIsLoginUser"
|
|
|
- >提交校核</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- v-if="isCanEditTestRecord"
|
|
|
- plain
|
|
|
- @click="handleEditSpreadRecord"
|
|
|
- :disabled="checkerIsLoginUser"
|
|
|
- >{{ selectedItem.reportType === PressureReportType['SUGGUESTION'] ? '编制意见书' : '填写记录' }}</el-button>
|
|
|
- <el-button v-if="isCanSyncReportData" type="primary" @click="handleSyncReportData" :disabled="checkerIsLoginUser"
|
|
|
- >同步报表</el-button>
|
|
|
- </template>
|
|
|
- <!-- 修改费用废弃 20250807 -->
|
|
|
- <!-- <el-button
|
|
|
- type="primary"
|
|
|
- v-if="isCanEditRecordResult"
|
|
|
- plain
|
|
|
- @click="handleInputCheckConclusion"
|
|
|
- >修改费用</el-button> -->
|
|
|
+ <div class="right-panel-container">
|
|
|
+ <!-- 收缩展开按钮 -->
|
|
|
+ <div class="toggle-btn" @click="togglePanel" :class="{ 'collapsed': !isExpanded }">
|
|
|
+ <el-icon>
|
|
|
+ <Back v-if="!isExpanded" />
|
|
|
+ <Right v-else />
|
|
|
+ </el-icon>
|
|
|
</div>
|
|
|
- <div class="operation-inner">
|
|
|
- <!-- 流转记录 -->
|
|
|
- <div class="operation-item">
|
|
|
- <div class="item-header"> 流转记录 </div>
|
|
|
- <div class="item-content">
|
|
|
- <el-empty
|
|
|
- v-if="!recordList.length"
|
|
|
- description="暂无流转记录"
|
|
|
- :image-size="120"
|
|
|
- />
|
|
|
- <div class="record-item" v-for="record in recordList" :key="record.id">
|
|
|
- <div class="record-item-title">{{
|
|
|
- PressureCheckerMyTaskStatusMap[record.process]
|
|
|
- }}</div>
|
|
|
- <div class="record-item-inner">
|
|
|
- <div class="content">
|
|
|
- <span>{{ record.createUser?.nickname||record.creator }}</span>
|
|
|
- <el-button
|
|
|
- :type="getRecordResultButtonType(record)"
|
|
|
- round
|
|
|
- size="small"
|
|
|
- >{{ formatRecordResult(record) }}</el-button>
|
|
|
- <span class="time">{{
|
|
|
- !record.createTime
|
|
|
- ? '-'
|
|
|
- : dayjs(record.createTime).format('YYYY-MM-DD HH:mm:ss')
|
|
|
- }}</span>
|
|
|
+ <div class="operation-panel" :class="{ 'expanded': isExpanded, 'collapsed': !isExpanded }" v-if="!onlyShowPdf">
|
|
|
+ <div class="operation-inner">
|
|
|
+ <!-- 流转记录 -->
|
|
|
+ <div class="operation-item">
|
|
|
+ <div class="item-header"> 流转记录 </div>
|
|
|
+ <div class="item-content">
|
|
|
+ <el-empty
|
|
|
+ v-if="!recordList.length"
|
|
|
+ description="暂无流转记录"
|
|
|
+ :image-size="120"
|
|
|
+ />
|
|
|
+ <div class="record-item" v-for="record in recordList" :key="record.id">
|
|
|
+ <div class="record-item-title">{{ PressureReportType['SUGGUESTION'] === props.selectedItem?.reportType ? record.processName : PressureCheckerMyTaskStatusMap[record.process]
|
|
|
+
|
|
|
+ }}</div>
|
|
|
+ <div class="record-item-inner">
|
|
|
+ <div class="content">
|
|
|
+ <span>{{ record.createUser.nickname }}</span>
|
|
|
+ <el-button
|
|
|
+ :type="
|
|
|
+ record.result === 100
|
|
|
+ ? 'success'
|
|
|
+ : record.result === 200
|
|
|
+ ? 'danger'
|
|
|
+ : 'default'
|
|
|
+ "
|
|
|
+ round
|
|
|
+ size="small"
|
|
|
+ >{{
|
|
|
+ record.result === 100
|
|
|
+ ? '通过'
|
|
|
+ : record.result === 200
|
|
|
+ ? '拒绝'
|
|
|
+ : record.result || '-'
|
|
|
+ }}</el-button
|
|
|
+ >
|
|
|
+ <span class="time">{{
|
|
|
+ !record.createTime
|
|
|
+ ? '-'
|
|
|
+ : dayjs(record.createTime).format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
+ <p class="desc">
|
|
|
+ <span>描述</span>
|
|
|
+ {{ record.remark && record.remark.trim() !== '' ? record.remark : '-' }}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
- <p class="desc">
|
|
|
- <span>描述</span>
|
|
|
- {{ record.remark && record.remark.trim() !== '' ? record.remark : '-' }}
|
|
|
- </p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <!-- 智能纠错 -->
|
|
|
- <div class="operation-item">
|
|
|
- <div class="item-header"> 智能纠错 </div>
|
|
|
- <div class="item-content">
|
|
|
- <el-empty
|
|
|
- v-if="!checkInputList.length"
|
|
|
- description="暂无纠错内容"
|
|
|
- :image-size="120"
|
|
|
- />
|
|
|
- <div class="error-item" v-for="input in checkInputList" :key="input.code">
|
|
|
- <el-icon color="#E0534E" :size="20"><InfoFilled /></el-icon>
|
|
|
- {{ input.code }}:{{ input.name }}
|
|
|
+ <!-- 智能纠错 -->
|
|
|
+ <div class="operation-item">
|
|
|
+ <div class="item-header"> 智能纠错 </div>
|
|
|
+ <div class="item-content">
|
|
|
+ <el-empty
|
|
|
+ v-if="!checkInputList.length"
|
|
|
+ description="暂无纠错内容"
|
|
|
+ :image-size="120"
|
|
|
+ />
|
|
|
+ <div class="error-item" v-for="input in checkInputList" :key="input.code">
|
|
|
+ <el-icon color="#E0534E" :size="20"><InfoFilled /></el-icon>
|
|
|
+ {{ input.code }}:{{ input.name }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <!-- 历史版本 -->
|
|
|
- <div class="operation-item" >
|
|
|
- <div class="item-header"> 历史版本 </div>
|
|
|
- <div class="item-content" v-if="historyList.length" >
|
|
|
- <!-- <template> -->
|
|
|
- <div class="history-item" v-for="item in historyList" :key="item.id">
|
|
|
- <div class="history-title">{{ item.versionNoStr || '-' }}号版本</div>
|
|
|
- <p
|
|
|
+ <!-- 历史版本 -->
|
|
|
+ <div class="operation-item">
|
|
|
+ <div class="item-header"> 历史版本 </div>
|
|
|
+ <div class="item-content" v-if="historyList.length">
|
|
|
+ <!-- <template> -->
|
|
|
+ <div class="history-item" v-for="item in historyList" :key="item.id">
|
|
|
+ <div class="history-title">{{ item.versionNoStr || '-' }}号版本</div>
|
|
|
+ <p
|
|
|
>修改原因:<span>{{ item.modifiedReason || '人工修改' }}</span></p
|
|
|
- >
|
|
|
- <div class="history-footer">
|
|
|
- <span class="name">{{ item.creatorName || '-' }}</span>
|
|
|
- <span class="time"
|
|
|
- >修改于{{
|
|
|
- dayjs(item.updateTime).format('YYYY-MM-DD HH:mm:ss') || '-'
|
|
|
- }}</span
|
|
|
>
|
|
|
- </div>
|
|
|
- <div class="my-2">
|
|
|
- <el-button type="primary" link @click="handleShowVersionInfo(item)"
|
|
|
+ <div class="history-footer">
|
|
|
+ <span class="name">{{ item.creatorName || '-' }}</span>
|
|
|
+ <span class="time"
|
|
|
+ >修改于{{
|
|
|
+ dayjs(item.updateTime).format('YYYY-MM-DD HH:mm:ss') || '-'
|
|
|
+ }}</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <div class="my-2">
|
|
|
+ <el-button type="primary" link @click="handleShowVersionInfo(item)"
|
|
|
>查看详情</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" link @click="restoreVersion(item)" :disabled="isCompleteInput"
|
|
|
+ >
|
|
|
+ <el-button v-if="!checkerIsLoginUser" type="primary" link @click="restoreVersion(item)"
|
|
|
>恢复版本</el-button
|
|
|
- >
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <!-- </template> -->
|
|
|
</div>
|
|
|
- <!-- </template> -->
|
|
|
+ <template v-else>
|
|
|
+ <el-empty description="暂无历史版本" :image-size="120" />
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- <template v-else>
|
|
|
- <el-empty description="暂无历史版本" :image-size="120" />
|
|
|
- </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -564,8 +531,12 @@
|
|
|
<!-- />-->
|
|
|
|
|
|
<!-- 检验录入-模板 -->
|
|
|
- <CustomDialog v-model="showInlineEditCheckRecord" title="检验录入" :show-footer="false" fullscreen>
|
|
|
- <SpreadViewer :initData="editData" ref="editSpreadRecordRef" @saveSuccess="saveSuccessRecord"/>
|
|
|
+ <CustomDialog v-model="showInlineEditCheckRecord" :show-footer="false" fullscreen :show-close="false">
|
|
|
+ <SpreadViewer :initData="editData" ref="editSpreadRecordRef" @saveSuccess="saveSuccessRecord" @close="handleClose">
|
|
|
+ <template #title>
|
|
|
+ <div style="font-size: 20px; ">检测录入</div>
|
|
|
+ </template>
|
|
|
+ </SpreadViewer>
|
|
|
</CustomDialog>
|
|
|
|
|
|
<!-- 报告编制 - 模板 -->
|
|
|
@@ -581,8 +552,12 @@
|
|
|
<!-- />-->
|
|
|
|
|
|
<!-- 报告编制 - 模板 -->
|
|
|
- <CustomDialog v-model="showInlineReportEdit" title="报告编制" :show-footer="false" fullscreen>
|
|
|
- <SpreadViewer :initData="editData" ref="editSpreadReportRef" @saveSuccess="saveSuccessReport"/>
|
|
|
+ <CustomDialog v-model="showInlineReportEdit" :show-footer="false" fullscreen :show-close="false">
|
|
|
+ <SpreadViewer :initData="editData" ref="editSpreadReportRef" @saveSuccess="saveSuccessReport" @close="handleClose">
|
|
|
+ <template #title>
|
|
|
+ <div style="font-size: 20px; ">报告编制</div>
|
|
|
+ </template>
|
|
|
+ </SpreadViewer>
|
|
|
</CustomDialog>
|
|
|
|
|
|
<!-- 修改主检人弹窗 -->
|
|
|
@@ -634,6 +609,77 @@
|
|
|
@confirm="handleRefresh"
|
|
|
/>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 新加 -->
|
|
|
+ <Teleport v-if="teleportBtnRef" to=".teleport-btn">
|
|
|
+ <div class="operation-btns">
|
|
|
+ <!-- 报告办结后,这部分按钮不再显示 -->
|
|
|
+ <template v-if="!getReportStatusEnd && selectedItem">
|
|
|
+ <!-- 根据报告类型和配置显示相应按钮 -->
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ selectedItem.reportType === PressureReportType.SINGLE &&
|
|
|
+ 'PipeCheckerTaskDetail' === routeName
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <!-- 独审报告根据配置显示按钮 -->
|
|
|
+ <el-button
|
|
|
+ v-if="currentReportConfig?.isApproval && isCanSubmitToAudit"
|
|
|
+ type="danger"
|
|
|
+ @click="handleSubmitAudit"
|
|
|
+ :disabled="checkerIsLoginUser"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ 提交报告审核
|
|
|
+ </el-button>
|
|
|
+ <!-- 没有审核只有审批 -->
|
|
|
+ <el-button
|
|
|
+ v-if="
|
|
|
+ currentReportConfig?.isRatify &&
|
|
|
+ !currentReportConfig?.isApproval &&
|
|
|
+ isCanSubmitToAudit
|
|
|
+ "
|
|
|
+ type="danger"
|
|
|
+ @click="handleApprovalSelectConfirm"
|
|
|
+ :disabled="checkerIsLoginUser"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ 提交报告审批
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <!-- 非独审报告默认显示审核按钮 -->
|
|
|
+ <el-button
|
|
|
+ v-if="
|
|
|
+ selectedItem.reportType !== PressureReportType.SINGLE &&
|
|
|
+ isCanSubmitToAudit &&
|
|
|
+ 'PipeCheckerTaskDetail' === routeName
|
|
|
+ "
|
|
|
+ type="danger"
|
|
|
+ @click="handleSubmitAudit"
|
|
|
+ :disabled="checkerIsLoginUser"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ {{ selectedItem.reportType === PressureReportType['SUGGUESTION'] ? '提交审核' : '提交报告审核' }}
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" size="small" plain v-if="isCanEditReport" @click="handleEditRreport" :disabled="checkerIsLoginUser"
|
|
|
+ >编制报告</el-button>
|
|
|
+ <el-button v-if="isCanSubmitRecheck" type="primary" @click="handleSelectVerfiyer" :disabled="checkerIsLoginUser" size="small"
|
|
|
+ >提交校核</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ v-if="isCanEditTestRecord"
|
|
|
+ plain
|
|
|
+ @click="handleEditSpreadRecord"
|
|
|
+ :disabled="checkerIsLoginUser"
|
|
|
+ size="small"
|
|
|
+ >{{ selectedItem.reportType === PressureReportType['SUGGUESTION'] ? '编制意见书' : '填写记录' }}</el-button>
|
|
|
+<!-- <el-button v-if="isCanSyncReportData" type="primary" @click="handleSyncReportData" :disabled="checkerIsLoginUser" size="small"-->
|
|
|
+<!-- >同步报表</el-button>-->
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </Teleport>
|
|
|
+
|
|
|
+
|
|
|
<AssociationOperationManual
|
|
|
v-if="showAssociationOperationManual"
|
|
|
:selectedItem="selectedItem"
|
|
|
@@ -650,7 +696,7 @@
|
|
|
import SmartTable from '@/components/SmartTable/SmartTable'
|
|
|
import {computed, defineAsyncComponent, ref, watch} from 'vue'
|
|
|
import {useRoute} from 'vue-router'
|
|
|
-import {InfoFilled, View} from '@element-plus/icons-vue'
|
|
|
+import { InfoFilled, View, Back, Right, WarningFilled } from '@element-plus/icons-vue'
|
|
|
import {dayjs, ElMessage, ElMessageBox} from 'element-plus'
|
|
|
import * as UserApi from '@/api/system/user'
|
|
|
import {
|
|
|
@@ -676,8 +722,9 @@ import _ from 'lodash'
|
|
|
import {uploadFile} from '@/api/common/index'
|
|
|
import ReportListUploadModal from './reportListUploadModal.vue'
|
|
|
import AssociationOperationManual from './AssociationOperationManual.vue'
|
|
|
-import {SpreadViewer} from "@/components/DynamicReport";
|
|
|
-import {InitParams} from "@/components/DynamicReport/SpreadInterface";
|
|
|
+import {SpreadViewer} from "@/components/pressure2/DynamicReport";
|
|
|
+import {InitParams} from "@/components/pressure2/DynamicReport/SpreadInterface";
|
|
|
+import { cloneDeep, debounce } from 'lodash-es'
|
|
|
|
|
|
const CustomDialog = defineAsyncComponent(() => import('@/components/CustomDialog/index.vue'))
|
|
|
const AuditUserDialog = defineAsyncComponent(
|
|
|
@@ -692,6 +739,7 @@ interface Props {
|
|
|
reportId?: string | null
|
|
|
reportList?: ReportItemVO[]
|
|
|
taskId: string
|
|
|
+ teleportBtnRef: Ref<HTMLDivElement | null>
|
|
|
}
|
|
|
|
|
|
interface Emits {
|
|
|
@@ -703,6 +751,7 @@ interface Emits {
|
|
|
(e: 'cancel'): void
|
|
|
(e: 'submit-ratify'): void
|
|
|
(e: 'update:selected-item', item: ReportItemVO): void
|
|
|
+ (e: 'item-select', item: ReportItemVO): void
|
|
|
}
|
|
|
|
|
|
const props = defineProps<Props>()
|
|
|
@@ -760,7 +809,7 @@ const initData=ref<InitParams>(
|
|
|
refId: '',
|
|
|
refName:'',
|
|
|
insId:'',
|
|
|
- opType: 1, // 0:excel,1: pdf
|
|
|
+ opType: 0, // 0:excel,1: pdf
|
|
|
});
|
|
|
const reportInitData=ref<InitParams>(
|
|
|
{
|
|
|
@@ -795,7 +844,8 @@ const getCanSubmitRecheckReport = computed(() => {
|
|
|
const reportTypes = [PressureReportType['SUB'], PressureReportType['SINGLE']]
|
|
|
const status = PressureTaskOrderTaskStatus['RECORD_INPUT'] // 记录录入状态
|
|
|
// report.reportUrl 已经录入数据
|
|
|
- if(report.taskStatus !== status || !report.reportUrl) return false
|
|
|
+ // if(report.taskStatus !== status || !report.reportUrl) return false
|
|
|
+ if(report.taskStatus !== status) return false
|
|
|
else if(report.reportType === PressureReportType['MAIN'] && userStore.user.id === props.taskOrderItem?.mainCheckerUser?.id) return true
|
|
|
else
|
|
|
return reportTypes.includes(report.reportType) && (report.checkUsers?.[0]?.id === userStore.user.id || !report.checkUsers || !report.checkUsers.length)
|
|
|
@@ -842,6 +892,7 @@ const handleSelectVerfiyer = async () => {
|
|
|
// 获取审核人\校核人配置信息
|
|
|
let res = await UserApi.getApprovalDetail({})
|
|
|
// 如果存在多份待提交校核的报告,执行批量校核弹窗
|
|
|
+ console.log('getCanSubmitRecheckReport', getCanSubmitRecheckReport,props.reportList)
|
|
|
if(getCanSubmitRecheckReport.value.length > 1) {
|
|
|
if(res && res.recheckUser) {
|
|
|
batchRecheckForm.value.recheckUser = res.recheckUser
|
|
|
@@ -867,6 +918,11 @@ const handleBatchSubmitToRecheck = async () => {
|
|
|
ElMessage.error('请完善表单数据!')
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ if (_.isEmpty(form.value.recheckUser)) {
|
|
|
+ return ElMessage.error('请选择校核人')
|
|
|
+ }
|
|
|
+
|
|
|
// 待提交的数据
|
|
|
const params = {
|
|
|
reportList: getCanSubmitRecheckReport.value.filter((x: any) => batchRecheckForm.value.reportIds.includes(x?.id)).map((x: any) => ({
|
|
|
@@ -882,6 +938,7 @@ const handleBatchSubmitToRecheck = async () => {
|
|
|
if (submitResult) {
|
|
|
ElMessage.success('提交校核成功!')
|
|
|
showBatchSubmitToRecheckDialog.value = false
|
|
|
+ selectNextItem(getCanSubmitRecheckReport.value.filter((x: any) => batchRecheckForm.value.reportIds.includes(x?.id)))
|
|
|
// 这里可以做页面刷新
|
|
|
emit('template-confirm')
|
|
|
}
|
|
|
@@ -902,6 +959,7 @@ const handleAuditSelectConfirm = async () => {
|
|
|
if (submitResult) {
|
|
|
ElMessage.success('提交审核成功!')
|
|
|
isShowAuditDialog.value = false
|
|
|
+ selectNextItem([props.selectedItem])
|
|
|
// 这里可以做页面刷新
|
|
|
emit('template-confirm')
|
|
|
}
|
|
|
@@ -914,11 +972,30 @@ const handleAuditSelectConfirm = async () => {
|
|
|
if (saveResult) {
|
|
|
ElMessage.success('提交校核成功!')
|
|
|
isShowAuditDialog.value = false
|
|
|
+ selectNextItem([props.selectedItem])
|
|
|
// 这里可以做页面刷新
|
|
|
emit('template-confirm')
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+/**
|
|
|
+ * 项目切换
|
|
|
+ */
|
|
|
+const selectNextItem = (items:ReportItemVO[]) => {
|
|
|
+ // 找到其他在记录录入或者报告编制状态的第一项目
|
|
|
+ const ids = items.map(item => item.id)
|
|
|
+ const inputReportList= props.reportList.filter(
|
|
|
+ item => {
|
|
|
+ return !ids.includes(item.id)
|
|
|
+ }
|
|
|
+ ).filter(item =>{
|
|
|
+ return item.taskStatus === PressureTaskOrderTaskStatus['RECORD_INPUT'] || item.taskStatus === PressureTaskOrderTaskStatus['REPORT_INPUT']
|
|
|
+ })
|
|
|
+ console.log(inputReportList)
|
|
|
+ if (inputReportList.length > 0){
|
|
|
+ emit('item-select', inputReportList[0])
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
|
|
|
// 审批人选择对话框状态
|
|
|
@@ -988,7 +1065,7 @@ const returnFormRules = ref({
|
|
|
const returnFormRef = ref()
|
|
|
|
|
|
const isCompleteInput = computed(() => {
|
|
|
- return props.selectedItem?.taskStatus >= PressureCheckerMyTaskStatus.REPORT_AUDIT
|
|
|
+ return props.selectedItem?.taskStatus >= PressureCheckerMyTaskStatus.RECORD_CHECK
|
|
|
})
|
|
|
|
|
|
const isShowRecordOrReportBtn = computed(() => {
|
|
|
@@ -1066,8 +1143,8 @@ const isCanSubmitRecheck = computed(() => {
|
|
|
else
|
|
|
return (
|
|
|
props.selectedItem &&
|
|
|
- props.selectedItem.taskStatus === PressureCheckerMyTaskStatus['RECORD_INPUT'] &&
|
|
|
- props.selectedItem.reportUrl
|
|
|
+ props.selectedItem.taskStatus === PressureCheckerMyTaskStatus['RECORD_INPUT']
|
|
|
+ // && props.selectedItem.reportUrl
|
|
|
)
|
|
|
})
|
|
|
|
|
|
@@ -1729,10 +1806,10 @@ const showAssociationOperationManual = ref(false)
|
|
|
const handleShowAssociationOperationManual = () => {
|
|
|
showAssociationOperationManual.value = true
|
|
|
}
|
|
|
-onMounted(() => {
|
|
|
- console.log(props)
|
|
|
- //initPreview()
|
|
|
-})
|
|
|
+// onMounted(() => {
|
|
|
+// console.log(props)
|
|
|
+// //initPreview()
|
|
|
+// })
|
|
|
|
|
|
const initPreview=()=>{
|
|
|
|
|
|
@@ -1744,7 +1821,7 @@ const initPreview=()=>{
|
|
|
|
|
|
initData.value.templateId = templateId;
|
|
|
initData.value.refId = refId;
|
|
|
- initData.value.opType = 1;
|
|
|
+ initData.value.opType = (props.selectedItem.taskStatus == 510 || props.selectedItem.taskStatus >= 600 || (showReportPdfType.value === 'record' && props.selectedItem.taskStatus > 500) || props?.selectedItem?.checkUsers?.[0]?.id != userStore?.user?.id) ? 1 : 0;
|
|
|
|
|
|
//spreadRef.value?.reloadView();
|
|
|
|
|
|
@@ -1795,6 +1872,18 @@ const saveSuccessRecord = async (data)=>{
|
|
|
|
|
|
}
|
|
|
|
|
|
+const handleClose = () => {
|
|
|
+ ElMessageBox.confirm('是否关闭?', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(() => {
|
|
|
+ showInlineEditCheckRecord.value = false
|
|
|
+ showInlineReportEdit.value = false
|
|
|
+ handleRefresh()
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
const saveSuccessReport = async (data)=>{
|
|
|
|
|
|
const dataJson = !data.dataSource ? '' : JSON.stringify(data.dataSource)
|
|
|
@@ -1821,9 +1910,87 @@ const handleRefreshData = () => {
|
|
|
defineExpose({
|
|
|
handleShowAssociationOperationManual
|
|
|
})
|
|
|
+
|
|
|
+//新加
|
|
|
+// 添加控制展开/收缩状态的变量
|
|
|
+const isExpanded = ref(false);
|
|
|
+
|
|
|
+// 添加切换面板展开/收缩的方法
|
|
|
+const togglePanel = () => {
|
|
|
+ isExpanded.value = !isExpanded.value;
|
|
|
+
|
|
|
+ setTimeout((() => {
|
|
|
+ nextTick(handleWindowResize)
|
|
|
+ }), 300);
|
|
|
+};
|
|
|
+
|
|
|
+// 获取PDF宽度
|
|
|
+const pdfContentWidth = ref<number>(980)
|
|
|
+const pdfPanelRef = ref<HTMLDivElement>()
|
|
|
+const handleWindowResize = debounce(() => {
|
|
|
+ if(!pdfPanelRef.value) return
|
|
|
+ const width = pdfPanelRef.value?.clientWidth - 20
|
|
|
+ pdfContentWidth.value = width > 980 ? 980 : width
|
|
|
+
|
|
|
+ //重新加载适应宽度
|
|
|
+ spreadRef.value?.reloadView();
|
|
|
+
|
|
|
+}, 100)
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ handleWindowResize()
|
|
|
+ window.addEventListener('resize', handleWindowResize)
|
|
|
+})
|
|
|
+onUnmounted(() => {
|
|
|
+ window.removeEventListener('resize', handleWindowResize)
|
|
|
+})
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.capsule-tabs {
|
|
|
+ display: inline-flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 2px;
|
|
|
+ padding: 2px;
|
|
|
+ border-radius: 20px;
|
|
|
+ margin-right: 12px;
|
|
|
+ flex-shrink: 0;
|
|
|
+
|
|
|
+ .tab-item {
|
|
|
+ display: inline-flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 4px 12px;
|
|
|
+ font-size: 12px;
|
|
|
+ background: white;
|
|
|
+ border-radius: 16px;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ color: #606266;
|
|
|
+ font-weight: 500;
|
|
|
+ border: 1px solid transparent;
|
|
|
+ user-select: none;
|
|
|
+ white-space: nowrap;
|
|
|
+ min-width: 50px;
|
|
|
+
|
|
|
+ span {
|
|
|
+ font-size: 12px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ color: #409eff;
|
|
|
+ border-color: #409eff;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
|
|
|
+ color: white;
|
|
|
+ border-color: #409eff;
|
|
|
+ box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
.container-panel {
|
|
|
height: 100%;
|
|
|
border: 1px solid var(--el-border-color);
|
|
|
@@ -1857,19 +2024,64 @@ defineExpose({
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
|
|
|
+ .right-panel-container {
|
|
|
+ display: flex;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ // 收缩展开按钮样式
|
|
|
+ .toggle-btn {
|
|
|
+ position: absolute;
|
|
|
+ left: -30px;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ width: 30px;
|
|
|
+ height: 60px;
|
|
|
+ background-color: #fff;
|
|
|
+ border: 1px solid var(--el-border-color);
|
|
|
+ border-radius: 10px 0 0 10px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ cursor: pointer;
|
|
|
+ z-index: 100;
|
|
|
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ &:hover {
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ }
|
|
|
+ &.collapsed {
|
|
|
+ left: -18px;
|
|
|
+ // border-radius: 0 10px 10px 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.operation-panel {
|
|
|
flex-basis: 300px;
|
|
|
padding: 10px 10px 10px 0;
|
|
|
box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- height: 100%;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+
|
|
|
+ // 展开状态样式
|
|
|
+ &.expanded {
|
|
|
+ width: 300px;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 收缩状态样式
|
|
|
+ &.collapsed {
|
|
|
+ width: 0;
|
|
|
+ padding: 0;
|
|
|
+ border: none;
|
|
|
+ .default-toolbar,
|
|
|
+ .operation-inner {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
.operation-btns {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
gap: 12px;
|
|
|
- flex-shrink: 0; // 不收缩
|
|
|
|
|
|
.el-button {
|
|
|
margin-bottom: 10px;
|
|
|
@@ -1879,8 +2091,7 @@ defineExpose({
|
|
|
}
|
|
|
|
|
|
.operation-inner {
|
|
|
- flex: 1; // 占据剩余空间
|
|
|
- overflow-y: auto;
|
|
|
+ height: 100%;
|
|
|
padding: 7px 10px 20px;
|
|
|
background-color: #fff;
|
|
|
border: 1px solid var(--el-border-color);
|