|
@@ -522,12 +522,24 @@
|
|
|
<el-form-item label="危害辨识" prop="space.hazardIdentification" class="span-full"
|
|
<el-form-item label="危害辨识" prop="space.hazardIdentification" class="span-full"
|
|
|
><el-input size="large" placeholder="输入危害辨识" v-model="formValue.space.hazardIdentification" type="textarea"
|
|
><el-input size="large" placeholder="输入危害辨识" v-model="formValue.space.hazardIdentification" type="textarea"
|
|
|
/></el-form-item>
|
|
/></el-form-item>
|
|
|
- <el-form-item label="作业附件" class="span-full" prop="space.attachment"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ <el-form-item label="作业附件" class="span-full" prop="space.attachment">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
|
|
+ disabled
|
|
|
@upload-success="(l) => handleUpload('space', 'attachment', l)"
|
|
@upload-success="(l) => handleUpload('space', 'attachment', l)"
|
|
|
:fileList="listMap['space.attachment']"
|
|
:fileList="listMap['space.attachment']"
|
|
|
- /></el-form-item>
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['space.attachment'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['space.attachment']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="sub-group-box">
|
|
<div class="sub-group-box">
|
|
@@ -591,10 +603,6 @@
|
|
|
>
|
|
>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
-
|
|
|
|
|
- <div class="form-grid mt-20">
|
|
|
|
|
-
|
|
|
|
|
- </div>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-else-if="formValue.hazardOperationType === 2">
|
|
<template v-else-if="formValue.hazardOperationType === 2">
|
|
@@ -652,12 +660,23 @@
|
|
|
<el-form-item label="危害辨识" prop="highAltitude.hazardIdentification" class="span-full"
|
|
<el-form-item label="危害辨识" prop="highAltitude.hazardIdentification" class="span-full"
|
|
|
><el-input size="large" placeholder="输入危害辨识" v-model="formValue.highAltitude.hazardIdentification" type="textarea"
|
|
><el-input size="large" placeholder="输入危害辨识" v-model="formValue.highAltitude.hazardIdentification" type="textarea"
|
|
|
/></el-form-item>
|
|
/></el-form-item>
|
|
|
- <el-form-item label="作业附件" class="span-full" prop="highAltitude.attachment"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ <el-form-item label="作业附件" class="span-full" prop="highAltitude.attachment">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
@upload-success="(l) => handleUpload('highAltitude', 'attachment', l)"
|
|
@upload-success="(l) => handleUpload('highAltitude', 'attachment', l)"
|
|
|
:fileList="listMap['highAltitude.attachment']"
|
|
:fileList="listMap['highAltitude.attachment']"
|
|
|
- /></el-form-item>
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['highAltitude.attachment'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['highAltitude.attachment']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -680,6 +699,7 @@
|
|
|
v-model="formValue.electricityList.operationStartTime"
|
|
v-model="formValue.electricityList.operationStartTime"
|
|
|
value-format="YYYY-MM-DD"
|
|
value-format="YYYY-MM-DD"
|
|
|
class="w-100"
|
|
class="w-100"
|
|
|
|
|
+ style="width: 100%;"
|
|
|
/></el-form-item>
|
|
/></el-form-item>
|
|
|
<el-form-item label="作业结束时间" prop="electricityList.operationEndTime"
|
|
<el-form-item label="作业结束时间" prop="electricityList.operationEndTime"
|
|
|
><el-date-picker
|
|
><el-date-picker
|
|
@@ -688,6 +708,7 @@
|
|
|
v-model="formValue.electricityList.operationEndTime"
|
|
v-model="formValue.electricityList.operationEndTime"
|
|
|
value-format="YYYY-MM-DD"
|
|
value-format="YYYY-MM-DD"
|
|
|
class="w-100"
|
|
class="w-100"
|
|
|
|
|
+ style="width:100%"
|
|
|
/></el-form-item>
|
|
/></el-form-item>
|
|
|
<el-form-item label="事由" prop="electricityList.reason" class="span-full"
|
|
<el-form-item label="事由" prop="electricityList.reason" class="span-full"
|
|
|
><el-input size="large" placeholder="输入事由" v-model="formValue.electricityList.reason" type="textarea" rows="3" show-word-limit maxlength="300"
|
|
><el-input size="large" placeholder="输入事由" v-model="formValue.electricityList.reason" type="textarea" rows="3" show-word-limit maxlength="300"
|
|
@@ -710,12 +731,23 @@
|
|
|
<el-form-item label="建设管理部负责人" prop="electricityList.constructionManager" class="span-full"
|
|
<el-form-item label="建设管理部负责人" prop="electricityList.constructionManager" class="span-full"
|
|
|
><el-input size="large" placeholder="输入建设管理部负责人" v-model="formValue.electricityList.constructionManager"
|
|
><el-input size="large" placeholder="输入建设管理部负责人" v-model="formValue.electricityList.constructionManager"
|
|
|
/></el-form-item>
|
|
/></el-form-item>
|
|
|
- <el-form-item label="申请附件" class="span-full" prop="electricityList.attachment"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ <el-form-item label="申请附件" class="span-full" prop="electricityList.attachment">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
@upload-success="(l) => handleUpload('electricityList', 'attachment', l)"
|
|
@upload-success="(l) => handleUpload('electricityList', 'attachment', l)"
|
|
|
:fileList="listMap['electricityList.attachment']"
|
|
:fileList="listMap['electricityList.attachment']"
|
|
|
- /></el-form-item>
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['electricityList.attachment'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['electricityList.attachment']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -801,56 +833,144 @@
|
|
|
><el-input size="large" placeholder="输入动火操作现场防护措施及检查情况" v-model="formValue.hot.supervisorMeasures" type="textarea"
|
|
><el-input size="large" placeholder="输入动火操作现场防护措施及检查情况" v-model="formValue.hot.supervisorMeasures" type="textarea"
|
|
|
/></el-form-item>
|
|
/></el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="动火现场检查照片" prop="hot.photos"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ <el-form-item label="动火现场检查照片" prop="hot.photos">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
@upload-success="(l) => handleUpload('hot', 'photos', l)"
|
|
@upload-success="(l) => handleUpload('hot', 'photos', l)"
|
|
|
:fileList="listMap['hot.photos']"
|
|
:fileList="listMap['hot.photos']"
|
|
|
- /></el-form-item>
|
|
|
|
|
- <el-form-item label="身份证复印件" prop="hot.idCard"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['hot.photos'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['hot.photos']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="身份证复印件" prop="hot.idCard">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
@upload-success="(l) => handleUpload('hot', 'idCard', l)"
|
|
@upload-success="(l) => handleUpload('hot', 'idCard', l)"
|
|
|
:fileList="listMap['hot.idCard']"
|
|
:fileList="listMap['hot.idCard']"
|
|
|
- /></el-form-item>
|
|
|
|
|
- <el-form-item label="动火人特种作业操作证复印件" prop="hot.optionCard"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['hot.idCard'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['hot.idCard']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="动火人特种作业操作证复印件" prop="hot.optionCard">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
@upload-success="(l) => handleUpload('hot', 'optionCard', l)"
|
|
@upload-success="(l) => handleUpload('hot', 'optionCard', l)"
|
|
|
:fileList="listMap['hot.optionCard']"
|
|
:fileList="listMap['hot.optionCard']"
|
|
|
- /></el-form-item>
|
|
|
|
|
- <el-form-item label="动火安全教育记录" prop="hot.safetyEducationPlan"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['hot.optionCard'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['hot.optionCard']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="动火安全教育记录" prop="hot.safetyEducationPlan">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
@upload-success="(l) => handleUpload('hot', 'safetyEducationPlan', l)"
|
|
@upload-success="(l) => handleUpload('hot', 'safetyEducationPlan', l)"
|
|
|
:fileList="listMap['hot.safetyEducationPlan']"
|
|
:fileList="listMap['hot.safetyEducationPlan']"
|
|
|
- /></el-form-item>
|
|
|
|
|
- <el-form-item label="动火作业施工方案" prop="hot.constructionPlan"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['hot.safetyEducationPlan'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['hot.safetyEducationPlan']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="动火作业施工方案" prop="hot.constructionPlan">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
@upload-success="(l) => handleUpload('hot', 'constructionPlan', l)"
|
|
@upload-success="(l) => handleUpload('hot', 'constructionPlan', l)"
|
|
|
:fileList="listMap['hot.constructionPlan']"
|
|
:fileList="listMap['hot.constructionPlan']"
|
|
|
- /></el-form-item>
|
|
|
|
|
- <el-form-item label="动火作业场所准备照片" prop="hot.preparationPhotos"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['hot.constructionPlan'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['hot.constructionPlan']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="动火作业场所准备照片" prop="hot.preparationPhotos">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
@upload-success="(l) => handleUpload('hot', 'preparationPhotos', l)"
|
|
@upload-success="(l) => handleUpload('hot', 'preparationPhotos', l)"
|
|
|
:fileList="listMap['hot.preparationPhotos']"
|
|
:fileList="listMap['hot.preparationPhotos']"
|
|
|
- /></el-form-item>
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['hot.preparationPhotos'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['hot.preparationPhotos']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="特种行业操作证网上查询情况照片" prop="hot.operationCertificates"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ <el-form-item label="特种行业操作证网上查询情况照片" prop="hot.operationCertificates">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
@upload-success="(l) => handleUpload('hot', 'operationCertificates', l)"
|
|
@upload-success="(l) => handleUpload('hot', 'operationCertificates', l)"
|
|
|
:fileList="listMap['hot.operationCertificates']"
|
|
:fileList="listMap['hot.operationCertificates']"
|
|
|
- /></el-form-item>
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['hot.operationCertificates'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['hot.operationCertificates']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="动火作业安全管理协议" prop="hot.safetyManagementAgreement"
|
|
|
|
|
- ><UploadFiles
|
|
|
|
|
|
|
+ <el-form-item label="动火作业安全管理协议" prop="hot.safetyManagementAgreement">
|
|
|
|
|
+ <!-- <UploadFiles
|
|
|
label="上传附件"
|
|
label="上传附件"
|
|
|
@upload-success="(l) => handleUpload('hot', 'safetyManagementAgreement', l)"
|
|
@upload-success="(l) => handleUpload('hot', 'safetyManagementAgreement', l)"
|
|
|
:fileList="listMap['hot.safetyManagementAgreement']"
|
|
:fileList="listMap['hot.safetyManagementAgreement']"
|
|
|
- /></el-form-item>
|
|
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ <div class="file-list" v-if="listMap['hot.safetyManagementAgreement'].length > 0">
|
|
|
|
|
+ <div v-for="file in listMap['hot.safetyManagementAgreement']" :key="file.fileId" class="file-item">
|
|
|
|
|
+ <div class="file-info">
|
|
|
|
|
+ <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
|
|
|
|
|
+ <span class="file-name">{{ file.fileName }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div link class="fileAction" @click="previewOnline(file.fileUrl, file.fileType as keyof typeof FILE_TYPE_ICON)">预览</div>
|
|
|
|
|
+ <div link class="fileAction" @click.stop="downloadFile(file.fileUrl, file.fileName)">下载</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -881,6 +1001,8 @@
|
|
|
<footer class="safety-platform-container__footer">
|
|
<footer class="safety-platform-container__footer">
|
|
|
<el-button size="large" @click="router.back()">返回</el-button>
|
|
<el-button size="large" @click="router.back()">返回</el-button>
|
|
|
</footer>
|
|
</footer>
|
|
|
|
|
+
|
|
|
|
|
+ <PreviewOnline ref="previewOnlineRef" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
@@ -893,7 +1015,10 @@
|
|
|
import { formatDeptTree } from '@/views/disaster/utils/formatDeptTree';
|
|
import { formatDeptTree } from '@/views/disaster/utils/formatDeptTree';
|
|
|
import { getAllDepartments } from '@/api/auth/dept';
|
|
import { getAllDepartments } from '@/api/auth/dept';
|
|
|
import { unformatAttachment, formatAttachmentList } from '@/components/UploadFiles/utils';
|
|
import { unformatAttachment, formatAttachmentList } from '@/components/UploadFiles/utils';
|
|
|
-
|
|
|
|
|
|
|
+ import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
|
|
|
|
|
+ import { FILE_TYPE_ICON } from '@/components/UploadFiles/constants';
|
|
|
|
|
+ import type { FileItem } from '@/components/UploadFiles/types';
|
|
|
|
|
+ import { downloadFile } from '@/views/disaster/utils';
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
const formRef = ref<any>(null);
|
|
const formRef = ref<any>(null);
|
|
@@ -917,6 +1042,7 @@
|
|
|
'hot.safetyEducationPlan': [],
|
|
'hot.safetyEducationPlan': [],
|
|
|
'hot.constructionPlan': [],
|
|
'hot.constructionPlan': [],
|
|
|
'hot.preparationPhotos': [],
|
|
'hot.preparationPhotos': [],
|
|
|
|
|
+ 'hot.operationCertificates': [],
|
|
|
'hot.safetyManagementAgreement': [],
|
|
'hot.safetyManagementAgreement': [],
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -944,6 +1070,7 @@
|
|
|
safetyEducationPlan: '',
|
|
safetyEducationPlan: '',
|
|
|
constructionPlan: '',
|
|
constructionPlan: '',
|
|
|
preparationPhotos: '',
|
|
preparationPhotos: '',
|
|
|
|
|
+ operationCertificates: '',
|
|
|
safetyManagementAgreement: '',
|
|
safetyManagementAgreement: '',
|
|
|
},
|
|
},
|
|
|
measure: [],
|
|
measure: [],
|
|
@@ -1083,7 +1210,13 @@ const rules = reactive({
|
|
|
ElMessage.error('详情回显失败');
|
|
ElMessage.error('详情回显失败');
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+ // 预览
|
|
|
|
|
+ const previewOnlineRef = ref<InstanceType<typeof PreviewOnline>>();
|
|
|
|
|
+ const previewOnline = (url: string | undefined, type: keyof typeof FILE_TYPE_ICON) => {
|
|
|
|
|
+ if (url) {
|
|
|
|
|
+ previewOnlineRef.value?.open(url, type);
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
/**
|
|
/**
|
|
|
* 辅助:表格行操作
|
|
* 辅助:表格行操作
|
|
|
*/
|
|
*/
|
|
@@ -1147,4 +1280,60 @@ const rules = reactive({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ .file-list {
|
|
|
|
|
+ margin-top: 16px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ &:first-child {
|
|
|
|
|
+ margin-top: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .file-item {
|
|
|
|
|
+ @include flex-center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ border: 1px solid #e5e7eb;
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ padding: 12px;
|
|
|
|
|
+ transition: all 0.2s ease;
|
|
|
|
|
+
|
|
|
|
|
+ &:hover {
|
|
|
|
|
+ background-color: #f8fafc;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .file-info {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .file-name {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: rgba($text-color, 0.65);
|
|
|
|
|
+ }
|
|
|
|
|
+ .fileAction {
|
|
|
|
|
+ width: 60px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ color: #1777ff;
|
|
|
|
|
+ }
|
|
|
|
|
+ .delete-button {
|
|
|
|
|
+ color: #ef4444;
|
|
|
|
|
+ background: none;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|