|
@@ -75,6 +75,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
<template v-if="signRecords.level1.length">
|
|
<template v-if="signRecords.level1.length">
|
|
|
<h4 v-if="currentDepartmentKey === 'A'"> 副院长签署 </h4>
|
|
<h4 v-if="currentDepartmentKey === 'A'"> 副院长签署 </h4>
|
|
|
<h4 v-if="currentDepartmentKey === 'B'"> 负责人签署 </h4>
|
|
<h4 v-if="currentDepartmentKey === 'B'"> 负责人签署 </h4>
|
|
@@ -88,12 +89,13 @@
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<UploadFiles
|
|
<UploadFiles
|
|
|
:disabled="!item.signFlag"
|
|
:disabled="!item.signFlag"
|
|
|
|
|
+ accept=".jpeg,.jpg,.png,.svg"
|
|
|
label="上传文件"
|
|
label="上传文件"
|
|
|
:fileList="item.attachment"
|
|
:fileList="item.attachment"
|
|
|
@upload-success="(fileList) => handleUploadSignsUploadSuccess(item, fileList)"
|
|
@upload-success="(fileList) => handleUploadSignsUploadSuccess(item, fileList)"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- <div class="file-list">
|
|
|
|
|
|
|
+ <div class="file-list">
|
|
|
<div class="file-item" v-for="file in item.attachment" :key="file.fileId">
|
|
<div class="file-item" v-for="file in item.attachment" :key="file.fileId">
|
|
|
<span class="file-item--name">{{ file.fileName }}</span>
|
|
<span class="file-item--name">{{ file.fileName }}</span>
|
|
|
<div class="file-item--footer">
|
|
<div class="file-item--footer">
|
|
@@ -105,7 +107,7 @@
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div> -->
|
|
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -124,12 +126,13 @@
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<UploadFiles
|
|
<UploadFiles
|
|
|
:disabled="!item.signFlag"
|
|
:disabled="!item.signFlag"
|
|
|
|
|
+ accept=".jpeg,.jpg,.png,.svg"
|
|
|
label="上传文件"
|
|
label="上传文件"
|
|
|
:fileList="item.attachment"
|
|
:fileList="item.attachment"
|
|
|
@upload-success="(fileList) => handleUploadSignsUploadSuccess(item, fileList)"
|
|
@upload-success="(fileList) => handleUploadSignsUploadSuccess(item, fileList)"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- <div class="file-list">
|
|
|
|
|
|
|
+ <div class="file-list">
|
|
|
<div class="file-item" v-for="file in item.attachment" :key="file.fileId">
|
|
<div class="file-item" v-for="file in item.attachment" :key="file.fileId">
|
|
|
<span class="file-item--name">{{ file.fileName }}</span>
|
|
<span class="file-item--name">{{ file.fileName }}</span>
|
|
|
<div class="file-item--footer">
|
|
<div class="file-item--footer">
|
|
@@ -141,7 +144,7 @@
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div> -->
|
|
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -159,12 +162,13 @@
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<UploadFiles
|
|
<UploadFiles
|
|
|
:disabled="!item.signFlag"
|
|
:disabled="!item.signFlag"
|
|
|
|
|
+ accept=".jpeg,.jpg,.png,.svg"
|
|
|
label="上传文件"
|
|
label="上传文件"
|
|
|
:fileList="item.attachment"
|
|
:fileList="item.attachment"
|
|
|
@upload-success="(fileList) => handleUploadSignsUploadSuccess(item, fileList)"
|
|
@upload-success="(fileList) => handleUploadSignsUploadSuccess(item, fileList)"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- <div class="file-list">
|
|
|
|
|
|
|
+ <div class="file-list">
|
|
|
<div class="file-item" v-for="file in item.attachment" :key="file.fileId">
|
|
<div class="file-item" v-for="file in item.attachment" :key="file.fileId">
|
|
|
<span class="file-item--name">{{ file.fileName }}</span>
|
|
<span class="file-item--name">{{ file.fileName }}</span>
|
|
|
<div class="file-item--footer">
|
|
<div class="file-item--footer">
|
|
@@ -176,7 +180,7 @@
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div> -->
|
|
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -222,8 +226,8 @@
|
|
|
|
|
|
|
|
import { unformatAttachment, formatAttachmentList } from '@/components/UploadFiles/utils';
|
|
import { unformatAttachment, formatAttachmentList } from '@/components/UploadFiles/utils';
|
|
|
import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
|
|
import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
|
|
|
- import { sign } from 'crypto';
|
|
|
|
|
|
|
|
|
|
|
|
+ const uploadImagesRef = ref<InstanceType<typeof UploadFiles>>();
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
const formRef = ref<any>(null);
|
|
const formRef = ref<any>(null);
|
|
@@ -247,6 +251,8 @@
|
|
|
signRecords: [],
|
|
signRecords: [],
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ const recordImageList = ref<string[]>([]);
|
|
|
|
|
+
|
|
|
const rules = reactive({
|
|
const rules = reactive({
|
|
|
signsUpload: [
|
|
signsUpload: [
|
|
|
{
|
|
{
|
|
@@ -256,6 +262,14 @@
|
|
|
],
|
|
],
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ const handleUploadChange = (fileList) => {
|
|
|
|
|
+ // console.log('files', val);
|
|
|
|
|
+ // console.log('files', uploadImagesRef.value!.getUploadedImages());
|
|
|
|
|
+ // ruleFormData.drillImagesFile = uploadImagesRef.value!.getUploadedImages();
|
|
|
|
|
+ recordImageList.value = uploadImagesRef.value!.getUploadedImages();
|
|
|
|
|
+ console.log('@recordImageList:', recordImageList.value);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
const signRecords = computed(() => {
|
|
const signRecords = computed(() => {
|
|
|
return {
|
|
return {
|
|
|
level1: formData.signRecords.filter((item) => item.signLevel === 1),
|
|
level1: formData.signRecords.filter((item) => item.signLevel === 1),
|
|
@@ -291,7 +305,6 @@
|
|
|
return route.query.status === '3' && formData.rejection !== null;
|
|
return route.query.status === '3' && formData.rejection !== null;
|
|
|
});
|
|
});
|
|
|
const previewOnlineRef = ref<InstanceType<typeof PreviewOnline>>();
|
|
const previewOnlineRef = ref<InstanceType<typeof PreviewOnline>>();
|
|
|
- const isSignsUpload = computed(() => route.query.status === '2');
|
|
|
|
|
const signerId = ref('');
|
|
const signerId = ref('');
|
|
|
const currentLabel = ref('');
|
|
const currentLabel = ref('');
|
|
|
const previewOnline = (url: string | undefined, type) => {
|
|
const previewOnline = (url: string | undefined, type) => {
|
|
@@ -299,8 +312,10 @@
|
|
|
previewOnlineRef.value?.open(url, type);
|
|
previewOnlineRef.value?.open(url, type);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
- const handleUploadSignsUploadSuccess = (item, fileList) => {
|
|
|
|
|
- item.attachment = fileList;
|
|
|
|
|
|
|
+ const handleUploadSignsUploadSuccess = async (item, fileList) => {
|
|
|
|
|
+ const attachment = await formatAttachmentList(fileList);
|
|
|
|
|
+ item.attachment = attachment;
|
|
|
|
|
+
|
|
|
formData.signRecords = [...signRecords.value.level1, ...signRecords.value.level2, ...signRecords.value.level3];
|
|
formData.signRecords = [...signRecords.value.level1, ...signRecords.value.level2, ...signRecords.value.level3];
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -376,13 +391,12 @@
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- const handleSubmitSign = async (firstItem) => {
|
|
|
|
|
|
|
+ const handleSubmitSign = (firstItem) => {
|
|
|
submiting.value = true;
|
|
submiting.value = true;
|
|
|
try {
|
|
try {
|
|
|
- const attachment = await formatAttachmentList(firstItem?.attachment);
|
|
|
|
|
const params = {
|
|
const params = {
|
|
|
ids: [route.query.id],
|
|
ids: [route.query.id],
|
|
|
- attachment: JSON.stringify(attachment),
|
|
|
|
|
|
|
+ attachment: JSON.stringify(firstItem?.attachment),
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
safetyResponsibilityDeptBatchSign(params)
|
|
safetyResponsibilityDeptBatchSign(params)
|