|
|
@@ -57,18 +57,6 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <span class="detail-reject-alert-content-download" @click="downloadFile('./skyeye-file-upload/sfysecurity/TEMPLATE/施工证申请表.doc', '事故报告模板')">
|
|
|
- 事故报告 下载
|
|
|
- </span>
|
|
|
- <span class="detail-reject-alert-content-download" @click="downloadFile('./skyeye-file-upload/sfysecurity/TEMPLATE/施工证申请表.doc', '委托书模板')">
|
|
|
- 委托书 下载
|
|
|
- </span>
|
|
|
- <span class="detail-reject-alert-content-download" @click="downloadFile('./skyeye-file-upload/sfysecurity/TEMPLATE/施工证申请表.doc', '地址确认书模板')">
|
|
|
- 地址确认书 下载
|
|
|
- </span>
|
|
|
- <span class="detail-reject-alert-content-download" @click="downloadFile('./skyeye-file-upload/sfysecurity/TEMPLATE/施工证申请表.doc', '申请表模板')">
|
|
|
- 申请表 下载
|
|
|
- </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<BasicForm
|
|
|
@@ -104,108 +92,128 @@
|
|
|
</template>
|
|
|
|
|
|
<template #accidentReport>
|
|
|
- <UploadFiles
|
|
|
- v-if="!isViewMode && !isAuditMode"
|
|
|
- label="上传事故报告"
|
|
|
- :maxCount="1"
|
|
|
- :file-list="accidentCertUrl"
|
|
|
- :disabled="isViewMode || isAuditMode"
|
|
|
- @uploadSuccess="handleAccidentReportUploadSuccess"
|
|
|
- />
|
|
|
- <div class="file-list" v-else>
|
|
|
- <div v-if="accidentCertUrl && accidentCertUrl.length > 0">
|
|
|
- <div class="file-item" v-for="file in accidentCertUrl" :key="file.fileId">
|
|
|
- <span class="file-item--name">{{ file.fileName }}</span>
|
|
|
- <div class="file-item--footer">
|
|
|
- <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
|
|
|
- >预览</el-button
|
|
|
- >
|
|
|
- <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
- >下载</el-button
|
|
|
- >
|
|
|
+ <div class="flexBox">
|
|
|
+ <UploadFiles
|
|
|
+ v-if="!isViewMode && !isAuditMode"
|
|
|
+ label="上传事故报告"
|
|
|
+ :maxCount="1"
|
|
|
+ :file-list="accidentCertUrl"
|
|
|
+ :disabled="isViewMode || isAuditMode"
|
|
|
+ @uploadSuccess="handleAccidentReportUploadSuccess"
|
|
|
+ />
|
|
|
+ <div class="file-list" v-else>
|
|
|
+ <div v-if="accidentCertUrl && accidentCertUrl.length > 0">
|
|
|
+ <div class="file-item" v-for="file in accidentCertUrl" :key="file.fileId">
|
|
|
+ <span class="file-item--name">{{ file.fileName }}</span>
|
|
|
+ <div class="file-item--footer">
|
|
|
+ <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
|
|
|
+ >预览</el-button
|
|
|
+ >
|
|
|
+ <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
+ >下载</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else class="no-attachment">暂无附件</div>
|
|
|
</div>
|
|
|
- <div v-else class="no-attachment">暂无附件</div>
|
|
|
+ <span class="detail-reject-alert-content-download" @click="downloadFile('./skyeye-file-upload/sfysecurity/TEMPLATE/施工证申请表.doc', '事故报告模板')">
|
|
|
+ 事故报告 下载
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<template #powerOfAttorney>
|
|
|
- <UploadFiles
|
|
|
- v-if="!isViewMode && !isAuditMode"
|
|
|
- label="上传委托书"
|
|
|
- :maxCount="1"
|
|
|
- :file-list="powerAttorneyUrl"
|
|
|
- :disabled="isViewMode || isAuditMode"
|
|
|
- @uploadSuccess="handlePowerOfAttorneyUploadSuccess"
|
|
|
- />
|
|
|
- <div class="file-list" v-else>
|
|
|
- <div v-if="powerAttorneyUrl && powerAttorneyUrl.length > 0">
|
|
|
- <div class="file-item" v-for="file in powerAttorneyUrl" :key="file.fileId">
|
|
|
- <span class="file-item--name">{{ file.fileName }}</span>
|
|
|
- <div class="file-item--footer">
|
|
|
- <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
|
|
|
- >预览</el-button
|
|
|
- >
|
|
|
- <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
- >下载</el-button
|
|
|
- >
|
|
|
+ <div class="flexBox">
|
|
|
+ <UploadFiles
|
|
|
+ v-if="!isViewMode && !isAuditMode"
|
|
|
+ label="上传委托书"
|
|
|
+ :maxCount="1"
|
|
|
+ :file-list="powerAttorneyUrl"
|
|
|
+ :disabled="isViewMode || isAuditMode"
|
|
|
+ @uploadSuccess="handlePowerOfAttorneyUploadSuccess"
|
|
|
+ />
|
|
|
+ <div class="file-list" v-else>
|
|
|
+ <div v-if="powerAttorneyUrl && powerAttorneyUrl.length > 0">
|
|
|
+ <div class="file-item" v-for="file in powerAttorneyUrl" :key="file.fileId">
|
|
|
+ <span class="file-item--name">{{ file.fileName }}</span>
|
|
|
+ <div class="file-item--footer">
|
|
|
+ <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
|
|
|
+ >预览</el-button
|
|
|
+ >
|
|
|
+ <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
+ >下载</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else class="no-attachment">暂无附件</div>
|
|
|
</div>
|
|
|
- <div v-else class="no-attachment">暂无附件</div>
|
|
|
+ <span class="detail-reject-alert-content-download" @click="downloadFile('./skyeye-file-upload/sfysecurity/TEMPLATE/施工证申请表.doc', '委托书模板')">
|
|
|
+ 委托书 下载
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #addressConfirmation>
|
|
|
- <UploadFiles
|
|
|
- v-if="!isViewMode && !isAuditMode"
|
|
|
- label="上传地址确认书"
|
|
|
- :maxCount="1"
|
|
|
- :file-list="addressConfirmUrl"
|
|
|
- :disabled="isViewMode || isAuditMode"
|
|
|
- @uploadSuccess="handleAddressConfirmationUploadSuccess"
|
|
|
- />
|
|
|
- <div class="file-list" v-else>
|
|
|
- <div v-if="addressConfirmUrl && addressConfirmUrl.length > 0">
|
|
|
- <div class="file-item" v-for="file in addressConfirmUrl" :key="file.fileId">
|
|
|
- <span class="file-item--name">{{ file.fileName }}</span>
|
|
|
- <div class="file-item--footer">
|
|
|
- <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
|
|
|
- >预览</el-button
|
|
|
- >
|
|
|
- <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
- >下载</el-button
|
|
|
- >
|
|
|
+ <div class="flexBox">
|
|
|
+ <UploadFiles
|
|
|
+ v-if="!isViewMode && !isAuditMode"
|
|
|
+ label="上传地址确认书"
|
|
|
+ :maxCount="1"
|
|
|
+ :file-list="addressConfirmUrl"
|
|
|
+ :disabled="isViewMode || isAuditMode"
|
|
|
+ @uploadSuccess="handleAddressConfirmationUploadSuccess"
|
|
|
+ />
|
|
|
+ <div class="file-list" v-else>
|
|
|
+ <div v-if="addressConfirmUrl && addressConfirmUrl.length > 0">
|
|
|
+ <div class="file-item" v-for="file in addressConfirmUrl" :key="file.fileId">
|
|
|
+ <span class="file-item--name">{{ file.fileName }}</span>
|
|
|
+ <div class="file-item--footer">
|
|
|
+ <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
|
|
|
+ >预览</el-button
|
|
|
+ >
|
|
|
+ <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
+ >下载</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else class="no-attachment">暂无附件</div>
|
|
|
</div>
|
|
|
- <div v-else class="no-attachment">暂无附件</div>
|
|
|
+ <span class="detail-reject-alert-content-download" @click="downloadFile('./skyeye-file-upload/sfysecurity/TEMPLATE/施工证申请表.doc', '地址确认书模板')">
|
|
|
+ 地址确认书 下载
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #applicationForm>
|
|
|
- <UploadFiles
|
|
|
- v-if="!isViewMode && !isAuditMode"
|
|
|
- label="上传申请表"
|
|
|
- :maxCount="1"
|
|
|
- :file-list="applicationFormUrl"
|
|
|
- :disabled="isViewMode || isAuditMode"
|
|
|
- @uploadSuccess="handleApplicationFormUploadSuccess"
|
|
|
- />
|
|
|
- <div class="file-list" v-else>
|
|
|
- <div v-if="applicationFormUrl && applicationFormUrl.length > 0">
|
|
|
- <div class="file-item" v-for="file in applicationFormUrl" :key="file.fileId">
|
|
|
- <span class="file-item--name">{{ file.fileName }}</span>
|
|
|
- <div class="file-item--footer">
|
|
|
- <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
|
|
|
- >预览</el-button
|
|
|
- >
|
|
|
- <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
- >下载</el-button
|
|
|
- >
|
|
|
+ <div class="flexBox">
|
|
|
+ <UploadFiles
|
|
|
+ v-if="!isViewMode && !isAuditMode"
|
|
|
+ label="上传申请表"
|
|
|
+ :maxCount="1"
|
|
|
+ :file-list="applicationFormUrl"
|
|
|
+ :disabled="isViewMode || isAuditMode"
|
|
|
+ @uploadSuccess="handleApplicationFormUploadSuccess"
|
|
|
+ />
|
|
|
+ <div class="file-list" v-else>
|
|
|
+ <div v-if="applicationFormUrl && applicationFormUrl.length > 0">
|
|
|
+ <div class="file-item" v-for="file in applicationFormUrl" :key="file.fileId">
|
|
|
+ <span class="file-item--name">{{ file.fileName }}</span>
|
|
|
+ <div class="file-item--footer">
|
|
|
+ <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
|
|
|
+ >预览</el-button
|
|
|
+ >
|
|
|
+ <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
+ >下载</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else class="no-attachment">暂无附件</div>
|
|
|
</div>
|
|
|
- <div v-else class="no-attachment">暂无附件</div>
|
|
|
+ <span class="detail-reject-alert-content-download" @click="downloadFile('./skyeye-file-upload/sfysecurity/TEMPLATE/施工证申请表.doc', '申请表模板')">
|
|
|
+ 申请表 下载
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #idCard>
|
|
|
@@ -312,6 +320,32 @@
|
|
|
<div v-else class="no-attachment">暂无附件</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template #otherMaterials>
|
|
|
+ <UploadFiles
|
|
|
+ v-if="!isViewMode && !isAuditMode"
|
|
|
+ label="上传其它资料"
|
|
|
+ :maxCount="1"
|
|
|
+ :file-list="other"
|
|
|
+ :disabled="isViewMode || isAuditMode"
|
|
|
+ @uploadSuccess="handleOtherMaterialsUploadSuccess"
|
|
|
+ />
|
|
|
+ <div class="file-list" v-else>
|
|
|
+ <div v-if="other && other.length > 0">
|
|
|
+ <div class="file-item" v-for="file in other" :key="file.fileId">
|
|
|
+ <span class="file-item--name">{{ file.fileName }}</span>
|
|
|
+ <div class="file-item--footer">
|
|
|
+ <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
|
|
|
+ >预览</el-button
|
|
|
+ >
|
|
|
+ <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
|
|
|
+ >下载</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else class="no-attachment">暂无附件</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template #status>
|
|
|
<el-radio-group v-model="ruleFormData.status" :disabled="isViewMode">
|
|
|
<el-radio label="ENABLE">启用</el-radio>
|
|
|
@@ -544,6 +578,7 @@
|
|
|
ruleFormData.laborContractUrl = res.laborContractUrl || ''; // 劳动合同
|
|
|
ruleFormData.initialMedicalCertUrl = res.initialMedicalCertUrl || ''; // 初次医疗证明
|
|
|
ruleFormData.trusteeIdCardUrl = res.trusteeIdCardUrl || ''; // 被委托人员身份证正反面
|
|
|
+ ruleFormData.other = res.other || ''; // 其它资料
|
|
|
ruleFormData.departmentCode = JSON.parse(res.departmentCode || '[]') || ''; // 部门编码
|
|
|
ruleFormData.departmentName = res.departmentName || ''; // 添加这一行,设置部门名称
|
|
|
ruleFormData.approvalTemplateId = res.templateId || ''; // 审批模板ID
|
|
|
@@ -575,6 +610,7 @@
|
|
|
laborContractUrl: ruleFormData.laborContractUrl,
|
|
|
initialMedicalCertUrl: ruleFormData.initialMedicalCertUrl,
|
|
|
trusteeIdCardUrl: ruleFormData.trusteeIdCardUrl,
|
|
|
+ other: ruleFormData.other,
|
|
|
departmentName: ruleFormData.departmentName || '',
|
|
|
departmentCode: ruleFormData.departmentCode || '',
|
|
|
templateId: Number(ruleFormData.approvalTemplateId),
|
|
|
@@ -651,6 +687,7 @@
|
|
|
const laborContractUrl = computed(() => convertAttachmentJsonToFileItems(ruleFormData.laborContractUrl || ''));
|
|
|
const initialMedicalCertUrl = computed(() => convertAttachmentJsonToFileItems(ruleFormData.initialMedicalCertUrl || ''));
|
|
|
const trusteeIdCardUrl = computed(() => convertAttachmentJsonToFileItems(ruleFormData.trusteeIdCardUrl || ''));
|
|
|
+ const other = computed(() => convertAttachmentJsonToFileItems(ruleFormData.other || ''));
|
|
|
|
|
|
async function handleAccidentReportUploadSuccess(files: FileItem[]) {
|
|
|
if (!files?.length) {
|
|
|
@@ -819,6 +856,26 @@
|
|
|
ElMessage.error(e?.message || e?.data || '被委托人员身份证正反面上传失败,请重试');
|
|
|
}
|
|
|
}
|
|
|
+ async function handleOtherMaterialsUploadSuccess(files: FileItem[]) {
|
|
|
+ if (!files?.length) {
|
|
|
+ ruleFormData.other = '';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ const list = await formatAttachmentList(files);
|
|
|
+ const jsonArr = (list || []).map((r) => ({
|
|
|
+ file_name: r.fileName,
|
|
|
+ fileId: r.fileId || '',
|
|
|
+ fileSize: r.fileSize || '',
|
|
|
+ fileType: r.fileType || '',
|
|
|
+ fileUrl: r.fileUrl || '',
|
|
|
+ })).filter((x) => x.fileId);
|
|
|
+ ruleFormData.other = JSON.stringify(jsonArr);
|
|
|
+ } catch (e) {
|
|
|
+ console.error('被委托人员身份证正反面上传失败:', e);
|
|
|
+ ElMessage.error(e?.message || e?.data || '被委托人员身份证正反面上传失败,请重试');
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
const getDeptData = () => {
|
|
|
getAllDepartments().then((res) => {
|
|
|
@@ -932,10 +989,14 @@
|
|
|
color: #409eff;
|
|
|
margin-right: 15px;
|
|
|
cursor: pointer;
|
|
|
+ white-space:nowrap;
|
|
|
}
|
|
|
.more-text-btn{
|
|
|
cursor: pointer;
|
|
|
color: #409eff;
|
|
|
|
|
|
}
|
|
|
+ .flexBox{
|
|
|
+ display:flex;
|
|
|
+ }
|
|
|
</style>
|