|
|
@@ -746,106 +746,15 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 上传整改材料弹窗 -->
|
|
|
- <Dialog
|
|
|
- v-model="ectificationMaterialsVisible"
|
|
|
- title="上传整改材料"
|
|
|
- width="750px"
|
|
|
- style="margin-bottom: 0px; height: 100vh"
|
|
|
- top="0vh"
|
|
|
- :scroll="true"
|
|
|
- height="100vh"
|
|
|
- :maxHeight="'calc(100vh - 55px - 60px - 63px)'"
|
|
|
- @close="handleClosePectificationMaterialsDialog"
|
|
|
- >
|
|
|
- <div v-loading="ectificationMaterialsLoading" class="rectification-dialog">
|
|
|
- <!-- 检验意见通知书上传 -->
|
|
|
- <div class="upload-section required">
|
|
|
- <div class="section-header">
|
|
|
- <div class="header-left">
|
|
|
- <i class="icon-document"></i>
|
|
|
- <span class="section-title">检验意见通知书</span>
|
|
|
- <span class="required-mark">*</span>
|
|
|
- </div>
|
|
|
- <span class="section-tip">仅支持PDF格式,限1个文件</span>
|
|
|
- </div>
|
|
|
- <div class="upload-area">
|
|
|
- <RectificationUpload
|
|
|
- v-model:fileList="ectificationMaterialsData.rectificationUrl"
|
|
|
- apiUrl="infra/file/upload"
|
|
|
- :limit="1"
|
|
|
- :disabled="ectificationMaterialsData.rectificationUrl.length >= 1 || ectificationMaterialsLoading"
|
|
|
- accept=".pdf"
|
|
|
- :default-file-name="selectedItem?.reportName || '检验意见通知书'"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 整改图片上传 -->
|
|
|
- <div class="upload-section">
|
|
|
- <div class="section-header">
|
|
|
- <div class="header-left">
|
|
|
- <i class="icon-image"></i>
|
|
|
- <span class="section-title">整改图片</span>
|
|
|
- </div>
|
|
|
- <span class="section-tip">支持JPG、PNG格式,最多20张,单个不超过2MB</span>
|
|
|
- </div>
|
|
|
- <div class="upload-area">
|
|
|
- <RectificationUpload
|
|
|
- v-model:fileList="ectificationMaterialsData.rectificationImage"
|
|
|
- apiUrl="infra/file/upload"
|
|
|
- :limit="20"
|
|
|
- :disabled="ectificationMaterialsData.rectificationImage.length >= 20 || ectificationMaterialsLoading"
|
|
|
- accept=".jpg,.jpeg,.png"
|
|
|
- :multiple="true"
|
|
|
- :maxSize="2097152"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 整改视频上传 -->
|
|
|
- <div class="upload-section">
|
|
|
- <div class="section-header">
|
|
|
- <div class="header-left">
|
|
|
- <i class="icon-video"></i>
|
|
|
- <span class="section-title">整改视频</span>
|
|
|
- </div>
|
|
|
- <span class="section-tip">支持MP4格式,最多5个,单个不超过10MB</span>
|
|
|
- </div>
|
|
|
- <div class="upload-area">
|
|
|
- <RectificationUpload
|
|
|
- v-model:fileList="ectificationMaterialsData.rectificationVideo"
|
|
|
- apiUrl="infra/file/upload"
|
|
|
- :limit="5"
|
|
|
- :disabled="ectificationMaterialsData.rectificationVideo.length >= 5 || ectificationMaterialsLoading"
|
|
|
- accept=".mp4"
|
|
|
- :multiple="true"
|
|
|
- :maxSize="10485760"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 温馨提示 -->
|
|
|
- <div class="info-tips">
|
|
|
- <i class="icon-info"></i>
|
|
|
- <div class="tips-content">
|
|
|
- <p class="tips-title">温馨提示:</p>
|
|
|
- <p>1. 请确保上传的文件清晰可辨,以便审核</p>
|
|
|
- <p>2. 整改材料将作为审核依据,请如实上传</p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <template #footer>
|
|
|
- <el-button @click="()=> ectificationMaterialsVisible = false">取消</el-button>
|
|
|
- <el-button
|
|
|
- :loading="ectificationMaterialsLoading"
|
|
|
- type="primary"
|
|
|
- @click="handleSubmitChangeEctificationMaterialsDialog"
|
|
|
- >
|
|
|
- 确定提交
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </Dialog>
|
|
|
+ <RectificationMaterialsDialog
|
|
|
+ :visible="ectificationMaterialsVisible"
|
|
|
+ :report-name="selectedItem?.reportName"
|
|
|
+ :detail="checkBookDetail"
|
|
|
+ :submit-api="PipeTaskOrderApi.inspectionOpinionRectifyApi"
|
|
|
+ :editable="true"
|
|
|
+ @close="ectificationMaterialsVisible = false"
|
|
|
+ @success="handleRefresh"
|
|
|
+ />
|
|
|
|
|
|
<CustomDialog
|
|
|
ref="customUnitDialogRef"
|
|
|
@@ -911,6 +820,7 @@
|
|
|
<script setup lang="tsx">
|
|
|
import SmartTable from '@/components/SmartTable/SmartTable'
|
|
|
import RectificationUpload from '@/views/pressure2/components/RectificationUpload.vue'
|
|
|
+import RectificationMaterialsDialog from '@/views/pressure2/components/RectificationMaterialsDialog.vue'
|
|
|
import {computed, defineAsyncComponent, nextTick, reactive, ref, watch} from 'vue'
|
|
|
import {useRoute} from 'vue-router'
|
|
|
import { InfoFilled, View, Back, Right, WarningFilled, VideoPlay } from '@element-plus/icons-vue'
|
|
|
@@ -1408,53 +1318,12 @@ const executePass = (params: Record<string, any>, type: number) => {
|
|
|
}
|
|
|
|
|
|
// 上传整改材料
|
|
|
-const ectificationMaterialsData = ref<any>({
|
|
|
- rectificationUrl: [],
|
|
|
- rectificationImage: [],
|
|
|
- rectificationVideo: [],
|
|
|
-})
|
|
|
const ectificationMaterialsVisible = ref(false)
|
|
|
-const ectificationMaterialsLoading = ref(false)
|
|
|
|
|
|
const handleRectificationMaterials = () => {
|
|
|
- const detail = checkBookDetail.value || {}
|
|
|
- ectificationMaterialsData.value = {
|
|
|
- rectificationUrl: detail.rectificationUrl ? detail.rectificationUrl.split(',').filter(Boolean).map((url: string) => ({ url })) : [],
|
|
|
- rectificationImage: detail.rectificationImage ? detail.rectificationImage.split(',').filter(Boolean).map((url: string) => ({ url })) : [],
|
|
|
- rectificationVideo: detail.rectificationVideo ? detail.rectificationVideo.split(',').filter(Boolean).map((url: string) => ({ url })) : [],
|
|
|
- }
|
|
|
ectificationMaterialsVisible.value = true
|
|
|
}
|
|
|
|
|
|
-const handleClosePectificationMaterialsDialog = () => {
|
|
|
- ectificationMaterialsVisible.value = false
|
|
|
-}
|
|
|
-
|
|
|
-const handleSubmitChangeEctificationMaterialsDialog = async () => {
|
|
|
- if (ectificationMaterialsData.value?.rectificationUrl?.length == 0) {
|
|
|
- return ElMessage.error('请上传证明材料')
|
|
|
- }
|
|
|
- ectificationMaterialsLoading.value = true
|
|
|
- try {
|
|
|
- const data = {
|
|
|
- reportId: props.selectedItem?.id || '',
|
|
|
- businessType: 1,
|
|
|
- rectificationUrl: ectificationMaterialsData.value?.rectificationUrl?.length ? ectificationMaterialsData.value?.rectificationUrl?.map(item => item.url)?.join(',') : '',
|
|
|
- rectificationImage: ectificationMaterialsData.value?.rectificationImage?.length ? ectificationMaterialsData.value?.rectificationImage?.map(item => item.url)?.join(',') : '',
|
|
|
- rectificationVideo: ectificationMaterialsData.value?.rectificationVideo?.length ? ectificationMaterialsData.value?.rectificationVideo?.map(item => item.url)?.join(',') : '',
|
|
|
- }
|
|
|
- const response = await PipeTaskOrderApi.inspectionOpinionRectifyApi(data)
|
|
|
- if (response) {
|
|
|
- ectificationMaterialsLoading.value = false
|
|
|
- ElMessage.success('上传成功')
|
|
|
- ectificationMaterialsVisible.value = false
|
|
|
- emit('refresh')
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
- ectificationMaterialsLoading.value = false
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
// 获取检验员名称
|
|
|
const getCheckersName = (): string => {
|
|
|
if (!props.selectedItem?.checkUsers || props.selectedItem.checkUsers.length === 0) {
|