Compare commits

...

3 Commits

Author SHA1 Message Date
wbc fb227393cf 图片下载和预览 1 week ago
wbc 1bea27d6b4 图片预览下载 1 week ago
wbc 681286692c 图片下载 2 weeks ago
  1. 1
      src/views/IO/delayPatrol/waitAudit/faultModal.vue
  2. 1
      src/views/IO/delayPatrol/waitPatrol/faultModal.vue
  3. 4
      src/views/IO/patrolReport/reportModal.vue
  4. 1
      src/views/IO/workOrder/delayAudit/auditModal.vue
  5. 8
      src/views/IO/workOrder/delayAudit/data.ts
  6. 48
      src/views/IO/workOrder/delayAudit/detailDrawer.vue
  7. 62
      src/views/IO/workOrder/orderAudit/detailDrawer.vue
  8. 1
      src/views/IO/workOrder/orderHandle/delayModal.vue
  9. 61
      src/views/IO/workOrder/orderHandle/detailDrawer.vue
  10. 1
      src/views/IO/workOrder/orderHandle/handleModal.vue
  11. 4
      src/views/IO/workOrder/orderSearch/data.ts
  12. 54
      src/views/IO/workOrder/orderSearch/detailDrawer.vue
  13. 1
      src/views/IO/workOrder/orderSearch/faultModal.vue
  14. 22
      src/views/IO/workOrder/orderSearch/index.vue
  15. 58
      src/views/IO/workOrder/orderSend/detailDrawer.vue
  16. 1
      src/views/IO/workOrder/orderSend/faultModal.vue
  17. 3
      src/views/document/addModal.vue
  18. 2
      src/views/notice/addModal.vue
  19. 2
      src/views/project/contractManage/addModal.vue
  20. 2
      src/views/project/projectManage/addModal.vue
  21. 1
      src/views/property/point/pointModal.vue

1
src/views/IO/delayPatrol/waitAudit/faultModal.vue

@ -359,6 +359,7 @@
form.attachments.push({ form.attachments.push({
url: i.response?.data.url || i.url, url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name, name: i.response?.data.fileName || i.name,
ossId:i.response?.data.ossId || i.ossId
}); });
} }
}); });

1
src/views/IO/delayPatrol/waitPatrol/faultModal.vue

@ -359,6 +359,7 @@
form.attachments.push({ form.attachments.push({
url: i.response?.data.url || i.url, url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name, name: i.response?.data.fileName || i.name,
ossId:i.response?.data.ossId || i.ossId
}); });
} }
}); });

4
src/views/IO/patrolReport/reportModal.vue

@ -180,6 +180,7 @@
fileLists.value.push({ fileLists.value.push({
url:i.url, url:i.url,
name:i.name, name:i.name,
ossId:i.ossId,
status:'done' status:'done'
}) })
}) })
@ -189,6 +190,7 @@
inspectionPhotoLists.value.push({ inspectionPhotoLists.value.push({
url:i.url, url:i.url,
name:i.name, name:i.name,
ossId:i.ossId,
status:'done' status:'done'
}) })
}) })
@ -254,6 +256,7 @@
form.attachments.push({ form.attachments.push({
url:i.response?.data.url || i.url, url:i.response?.data.url || i.url,
name:i.response?.data.fileName ||i.name, name:i.response?.data.fileName ||i.name,
ossId:i.response?.data.ossId || i.ossId
}) })
} }
}) })
@ -269,6 +272,7 @@
form.inspectionPhotos.push({ form.inspectionPhotos.push({
url:i.response?.data.url || i.url, url:i.response?.data.url || i.url,
name:i.response?.data.fileName ||i.name, name:i.response?.data.fileName ||i.name,
ossId:i.response?.data.ossId || i.ossId
}) })
} }
}) })

1
src/views/IO/workOrder/delayAudit/auditModal.vue

@ -118,6 +118,7 @@
fileLists.value.push({ fileLists.value.push({
url: i.url, url: i.url,
name: i.name, name: i.name,
ossId:i.ossId,
status: 'done', status: 'done',
}); });
}); });

8
src/views/IO/workOrder/delayAudit/data.ts

@ -35,6 +35,14 @@ import { FormSchema } from '@/components/Form';
// }, // },
// ]; // ];
export const formSchemas: FormSchema[] = [ export const formSchemas: FormSchema[] = [
{
label: '点位名称',
field: 'faultLocation',
component: 'Input',
componentProps: {
placeholder: '输入点位',
},
},
{ {
field: 'contractName', field: 'contractName',
label: '合同名称', label: '合同名称',

48
src/views/IO/workOrder/delayAudit/detailDrawer.vue

@ -78,9 +78,17 @@
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<div <div>
><span class="titleLabel">故障图片</span> <span class="titleLabel">故障图片</span>
<a-upload v-model:file-list="fileLists" disabled> </a-upload> <div class="file-item" v-for="file in fileLists" :key="file.url">
<span>{{ file.name }}</span>
<a-button size="small" @click="handleDownload(file)" style="margin-left: 8px">
下载
</a-button>
<a-button size="small" @click="preview(file)" style="margin-left: -8px">
预览
</a-button>
</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -124,6 +132,8 @@
import { getInfo, queryProcess } from './api'; import { getInfo, queryProcess } from './api';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import { ossDownload } from '@/api/system/oss';
import { downloadByData } from '@/utils/file/download';
export default defineComponent({ export default defineComponent({
components: { Icon }, components: { Icon },
setup(props, { emit }) { setup(props, { emit }) {
@ -216,6 +226,7 @@
fileLists.value.push({ fileLists.value.push({
url: i.url, url: i.url,
name: i.name, name: i.name,
ossId: i.ossId,
status: 'done', status: 'done',
}); });
}); });
@ -227,7 +238,36 @@
initMap(detail.longitude, detail.latitude, detail.faultLocation); initMap(detail.longitude, detail.latitude, detail.faultLocation);
} }
}; };
const handleDownload = async (record) => {
const data = await ossDownload(record.ossId);
downloadByData(data, record.name);
};
const preview = async (record) => {
const data = await ossDownload(record.ossId);
const objectURL = URL.createObjectURL(data);
const newWindow = window.open('', '_blank');
if (newWindow) {
// img
const img = newWindow.document.createElement('img');
img.src = objectURL;
img.style.width = '100%';
img.style.height = 'auto';
img.style.display = 'block';
//
newWindow.document.body.style.margin = '0';
newWindow.document.body.style.backgroundColor = '#000';
newWindow.document.body.style.display = 'flex';
newWindow.document.body.style.justifyContent = 'center';
newWindow.document.body.style.alignItems = 'center';
newWindow.document.body.appendChild(img);
// Object URL
img.onload = () => {
URL.revokeObjectURL(objectURL);
};
}
};
// //
const onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
@ -272,6 +312,8 @@
statusText, statusText,
progress, progress,
fileLists, fileLists,
handleDownload,
preview
}; };
}, },
}); });

62
src/views/IO/workOrder/orderAudit/detailDrawer.vue

@ -78,9 +78,17 @@
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<div <div>
><span class="titleLabel">故障图片</span> <span class="titleLabel">故障图片</span>
<a-upload v-model:file-list="fileLists" disabled> </a-upload> <div class="file-item" v-for="file in fileLists" :key="file.url">
<span>{{ file.name }}</span>
<a-button size="small" @click="handleDownload(file)" style="margin-left: 8px">
下载
</a-button>
<a-button size="small" @click="preview(file)" style="margin-left: -8px">
预览
</a-button>
</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -116,9 +124,17 @@
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<div <div>
><span class="titleLabel">处理图片</span> <span class="titleLabel">处理图片</span>
<a-upload v-model:file-list="fileLists1" disabled> </a-upload> <div class="file-item" v-for="file in fileLists1" :key="file.url">
<span>{{ file.name }}</span>
<a-button size="small" @click="handleDownload(file)" style="margin-left: 8px">
下载
</a-button>
<a-button size="small" @click="preview(file)" style="margin-left: -8px">
预览
</a-button>
</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -166,6 +182,8 @@
import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api'; import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import { ossDownload } from '@/api/system/oss';
import { downloadByData } from '@/utils/file/download';
export default defineComponent({ export default defineComponent({
components: { Icon }, components: { Icon },
setup(props, { emit }) { setup(props, { emit }) {
@ -321,6 +339,7 @@
fileLists.value.push({ fileLists.value.push({
url: i.url, url: i.url,
name: i.name, name: i.name,
ossId: i.ossId,
status: 'done', status: 'done',
}); });
}); });
@ -340,7 +359,36 @@
} }
initMap(detail.longitude, detail.latitude, detail.faultLocation); initMap(detail.longitude, detail.latitude, detail.faultLocation);
}; };
const handleDownload = async (record) => {
const data = await ossDownload(record.ossId);
downloadByData(data, record.name);
};
const preview = async (record) => {
const data = await ossDownload(record.ossId);
const objectURL = URL.createObjectURL(data);
const newWindow = window.open('', '_blank');
if (newWindow) {
// img
const img = newWindow.document.createElement('img');
img.src = objectURL;
img.style.width = '100%';
img.style.height = 'auto';
img.style.display = 'block';
//
newWindow.document.body.style.margin = '0';
newWindow.document.body.style.backgroundColor = '#000';
newWindow.document.body.style.display = 'flex';
newWindow.document.body.style.justifyContent = 'center';
newWindow.document.body.style.alignItems = 'center';
newWindow.document.body.appendChild(img);
// Object URL
img.onload = () => {
URL.revokeObjectURL(objectURL);
};
}
};
// //
const onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
@ -392,6 +440,8 @@
progress, progress,
fileLists, fileLists,
fileLists1, fileLists1,
handleDownload,
preview
}; };
}, },
}); });

1
src/views/IO/workOrder/orderHandle/delayModal.vue

@ -167,6 +167,7 @@
form.attachments.push({ form.attachments.push({
url: i.response?.data.url || i.url, url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name, name: i.response?.data.fileName || i.name,
ossId:i.response?.data.ossId || i.ossId
}); });
} }
}); });

61
src/views/IO/workOrder/orderHandle/detailDrawer.vue

@ -80,7 +80,22 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<a-upload v-model:file-list="fileLists" disabled> </a-upload> <!-- <a-upload v-model:file-list="fileLists" disabled> </a-upload> -->
<!-- <a-button
type="primary"
@click="handleDownload(fileLists[0])"
v-if="fileLists.length > 0"
>下载</a-button
> -->
<div class="file-item" v-for="file in fileLists" :key="file.url">
<span>{{ file.name }}</span>
<a-button size="small" @click="handleDownload(file)" style="margin-left: 8px">
下载
</a-button>
<a-button size="small" @click="preview(file)" style="margin-left: -8px">
预览
</a-button>
</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -118,7 +133,15 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload v-model:file-list="fileLists1" disabled> </a-upload> <div class="file-item" v-for="file in fileLists1" :key="file.url">
<span>{{ file.name }}</span>
<a-button size="small" @click="handleDownload(file)" style="margin-left: 8px">
下载
</a-button>
<a-button size="small" @click="preview(file)" style="margin-left: -8px">
预览
</a-button>
</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -166,6 +189,8 @@
import { getInfo, getDealInfo, queryProcess, getOrderDelayHistory } from './handleApi'; import { getInfo, getDealInfo, queryProcess, getOrderDelayHistory } from './handleApi';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import { ossDownload } from '@/api/system/oss';
import { downloadByData } from '@/utils/file/download';
export default defineComponent({ export default defineComponent({
components: { Icon }, components: { Icon },
setup(props, { emit }) { setup(props, { emit }) {
@ -312,6 +337,7 @@
fileLists.value.push({ fileLists.value.push({
url: i.url, url: i.url,
name: i.name, name: i.name,
ossId: i.ossId,
status: 'done', status: 'done',
}); });
}); });
@ -340,7 +366,36 @@
} }
initMap(detail.longitude, detail.latitude, detail.faultLocation); initMap(detail.longitude, detail.latitude, detail.faultLocation);
}; };
const handleDownload = async (record) => {
const data = await ossDownload(record.ossId);
downloadByData(data, record.name);
};
const preview = async (record) => {
const data = await ossDownload(record.ossId);
const objectURL = URL.createObjectURL(data);
const newWindow = window.open('', '_blank');
if (newWindow) {
// img
const img = newWindow.document.createElement('img');
img.src = objectURL;
img.style.width = '100%';
img.style.height = 'auto';
img.style.display = 'block';
//
newWindow.document.body.style.margin = '0';
newWindow.document.body.style.backgroundColor = '#000';
newWindow.document.body.style.display = 'flex';
newWindow.document.body.style.justifyContent = 'center';
newWindow.document.body.style.alignItems = 'center';
newWindow.document.body.appendChild(img);
// Object URL
img.onload = () => {
URL.revokeObjectURL(objectURL);
};
}
};
// //
const onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
@ -393,6 +448,8 @@
progress, progress,
fileLists, fileLists,
fileLists1, fileLists1,
handleDownload,
preview
}; };
}, },
}); });

1
src/views/IO/workOrder/orderHandle/handleModal.vue

@ -150,6 +150,7 @@
form.attachments.push({ form.attachments.push({
url: i.response?.data.url || i.url, url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name, name: i.response?.data.fileName || i.name,
ossId:i.response?.data.ossId || i.ossId
}); });
} }
}); });

4
src/views/IO/workOrder/orderSearch/data.ts

@ -103,9 +103,9 @@ export const formSchemas: FormSchema[] = [
{ {
field: 'faultLocation', field: 'faultLocation',
label: '故障地点', label: '故障地点',
component: 'Select', component: 'Input',
componentProps: { componentProps: {
options: [], placeholder: '输入编号',
}, },
}, },
{ {

54
src/views/IO/workOrder/orderSearch/detailDrawer.vue

@ -80,7 +80,15 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">故障图片</span> ><span class="titleLabel">故障图片</span>
<a-upload v-model:file-list="fileLists" disabled> </a-upload> <div class="file-item" v-for="file in fileLists" :key="file.url">
<span>{{ file.name }}</span>
<a-button size="small" @click="handleDownload(file)" style="margin-left: 8px">
下载
</a-button>
<a-button size="small" @click="preview(file)" style="margin-left: -8px">
预览
</a-button>
</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -118,7 +126,15 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload v-model:file-list="fileLists1" disabled> </a-upload> <div class="file-item" v-for="file in fileLists1" :key="file.url">
<span>{{ file.name }}</span>
<a-button size="small" @click="handleDownload(file)" style="margin-left: 8px">
下载
</a-button>
<a-button size="small" @click="preview(file)" style="margin-left: -8px">
预览
</a-button>
</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -166,6 +182,8 @@
import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api'; import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import { ossDownload } from '@/api/system/oss';
import { downloadByData } from '@/utils/file/download';
export default defineComponent({ export default defineComponent({
components: { Icon }, components: { Icon },
setup(props, { emit }) { setup(props, { emit }) {
@ -312,6 +330,7 @@
fileLists.value.push({ fileLists.value.push({
url: i.url, url: i.url,
name: i.name, name: i.name,
ossId: i.ossId,
status: 'done', status: 'done',
}); });
}); });
@ -340,7 +359,36 @@
} }
initMap(detail.longitude, detail.latitude, detail.faultLocation); initMap(detail.longitude, detail.latitude, detail.faultLocation);
}; };
const handleDownload = async (record) => {
const data = await ossDownload(record.ossId);
downloadByData(data, record.name);
};
const preview = async (record) => {
const data = await ossDownload(record.ossId);
const objectURL = URL.createObjectURL(data);
const newWindow = window.open('', '_blank');
if (newWindow) {
// img
const img = newWindow.document.createElement('img');
img.src = objectURL;
img.style.width = '100%';
img.style.height = 'auto';
img.style.display = 'block';
//
newWindow.document.body.style.margin = '0';
newWindow.document.body.style.backgroundColor = '#000';
newWindow.document.body.style.display = 'flex';
newWindow.document.body.style.justifyContent = 'center';
newWindow.document.body.style.alignItems = 'center';
newWindow.document.body.appendChild(img);
// Object URL
img.onload = () => {
URL.revokeObjectURL(objectURL);
};
}
};
// //
const onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
@ -393,6 +441,8 @@
progress, progress,
fileLists, fileLists,
fileLists1, fileLists1,
handleDownload,
preview
}; };
}, },
}); });

1
src/views/IO/workOrder/orderSearch/faultModal.vue

@ -360,6 +360,7 @@
form.attachments.push({ form.attachments.push({
url: i.response?.data.url || i.url, url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name, name: i.response?.data.fileName || i.name,
ossId:i.response?.data.ossId || i.ossId
}); });
} }
}); });

22
src/views/IO/workOrder/orderSearch/index.vue

@ -83,20 +83,20 @@
}); });
formSchemas[4].componentProps.options = faultSubcategoryOptions.value; formSchemas[4].componentProps.options = faultSubcategoryOptions.value;
}; };
const faultLocationOptions = ref([]); // const faultLocationOptions = ref([]);
const getFaultLocationOptions = async () => { // const getFaultLocationOptions = async () => {
const res = await queryPointNames(); // const res = await queryPointNames();
faultLocationOptions.value = res; // faultLocationOptions.value = res;
faultLocationOptions.value.forEach((i: any) => { // faultLocationOptions.value.forEach((i: any) => {
i.value = i.pointName; // i.value = i.pointName;
i.label = i.pointName; // i.label = i.pointName;
}); // });
formSchemas[5].componentProps.options = faultLocationOptions.value; // formSchemas[5].componentProps.options = faultLocationOptions.value;
}; // };
const getOptions = () => { const getOptions = () => {
getProjectOptions(); getProjectOptions();
getFaultSubcategoryOptions(); getFaultSubcategoryOptions();
getFaultLocationOptions(); // getFaultLocationOptions();
}; };
getOptions(); getOptions();
onActivated(() => { onActivated(() => {

58
src/views/IO/workOrder/orderSend/detailDrawer.vue

@ -78,9 +78,17 @@
</a-row> </a-row>
<a-row :gutter="[16, 16]"> <a-row :gutter="[16, 16]">
<a-col :span="24"> <a-col :span="24">
<div <div>
><span class="titleLabel">故障图片</span> <span class="titleLabel">故障图片</span>
<a-upload v-model:file-list="fileLists" disabled> </a-upload> <div class="file-item" v-for="file in fileLists" :key="file.url">
<span>{{ file.name }}</span>
<a-button size="small" @click="handleDownload(file)" style="margin-left: 8px">
下载
</a-button>
<a-button size="small" @click="preview(file)" style="margin-left: -8px">
预览
</a-button>
</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -118,7 +126,15 @@
<a-col :span="24"> <a-col :span="24">
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload v-model:file-list="fileLists1" disabled> </a-upload> <div class="file-item" v-for="file in fileLists1" :key="file.url">
<span>{{ file.name }}</span>
<a-button size="small" @click="handleDownload(file)" style="margin-left: 8px">
下载
</a-button>
<a-button size="small" @click="preview(file)" style="margin-left: -8px">
预览
</a-button>
</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -166,6 +182,8 @@
import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api'; import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import { ossDownload } from '@/api/system/oss';
import { downloadByData } from '@/utils/file/download';
export default defineComponent({ export default defineComponent({
components: { Icon }, components: { Icon },
setup(props, { emit }) { setup(props, { emit }) {
@ -321,6 +339,7 @@
fileLists.value.push({ fileLists.value.push({
url: i.url, url: i.url,
name: i.name, name: i.name,
ossId: i.ossId,
status: 'done', status: 'done',
}); });
}); });
@ -340,7 +359,36 @@
} }
initMap(detail.longitude, detail.latitude, detail.faultLocation); initMap(detail.longitude, detail.latitude, detail.faultLocation);
}; };
const handleDownload = async (record) => {
const data = await ossDownload(record.ossId);
downloadByData(data, record.name);
};
const preview = async (record) => {
const data = await ossDownload(record.ossId);
const objectURL = URL.createObjectURL(data);
const newWindow = window.open('', '_blank');
if (newWindow) {
// img
const img = newWindow.document.createElement('img');
img.src = objectURL;
img.style.width = '100%';
img.style.height = 'auto';
img.style.display = 'block';
//
newWindow.document.body.style.margin = '0';
newWindow.document.body.style.backgroundColor = '#000';
newWindow.document.body.style.display = 'flex';
newWindow.document.body.style.justifyContent = 'center';
newWindow.document.body.style.alignItems = 'center';
newWindow.document.body.appendChild(img);
// Object URL
img.onload = () => {
URL.revokeObjectURL(objectURL);
};
}
};
// //
const onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
@ -393,6 +441,8 @@
progress, progress,
fileLists, fileLists,
fileLists1, fileLists1,
handleDownload,
preview
}; };
}, },
}); });

1
src/views/IO/workOrder/orderSend/faultModal.vue

@ -360,6 +360,7 @@
form.attachments.push({ form.attachments.push({
url: i.response?.data.url || i.url, url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name, name: i.response?.data.fileName || i.name,
ossId:i.response?.data.ossId || i.ossId
}); });
} }
}); });

3
src/views/document/addModal.vue

@ -91,6 +91,7 @@
fileLists.value.push({ fileLists.value.push({
url:i.url, url:i.url,
name:i.name, name:i.name,
ossId:i.ossId,
status:'done' status:'done'
}) })
}) })
@ -141,11 +142,13 @@
const handleChange = (info) => { const handleChange = (info) => {
if (info.fileList.length > 0) { if (info.fileList.length > 0) {
form.attachments = []; form.attachments = [];
console.log(info)
info.fileList.forEach((i) => { info.fileList.forEach((i) => {
if (i.status == 'done') { if (i.status == 'done') {
form.attachments.push({ form.attachments.push({
url: i.response?.data.url || i.url, url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name, name: i.response?.data.fileName || i.name,
ossId:i.response?.data.ossId || i.ossId
}); });
} }
}); });

2
src/views/notice/addModal.vue

@ -130,6 +130,7 @@
fileLists.value.push({ fileLists.value.push({
url:i.url, url:i.url,
name:i.name, name:i.name,
ossId:i.ossId,
status:'done' status:'done'
}) })
}) })
@ -235,6 +236,7 @@
form.attachments.push({ form.attachments.push({
url:i.response?.data.url || i.url, url:i.response?.data.url || i.url,
name:i.response?.data.fileName ||i.name, name:i.response?.data.fileName ||i.name,
ossId:i.response?.data.ossId || i.ossId
}) })
} }
}) })

2
src/views/project/contractManage/addModal.vue

@ -241,6 +241,7 @@
fileLists.value.push({ fileLists.value.push({
url: i.url, url: i.url,
name: i.name, name: i.name,
ossId:i.ossId,
status: 'done', status: 'done',
}); });
}); });
@ -314,6 +315,7 @@
form.attachments.push({ form.attachments.push({
url: i.response?.data.url || i.url, url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name, name: i.response?.data.fileName || i.name,
ossId:i.response?.data.ossId || i.ossId
}); });
} }
}); });

2
src/views/project/projectManage/addModal.vue

@ -156,6 +156,7 @@
fileLists.value.push({ fileLists.value.push({
url: i.url, url: i.url,
name: i.name, name: i.name,
ossId:i.ossId,
status: 'done', status: 'done',
}); });
}); });
@ -223,6 +224,7 @@
form.attachments.push({ form.attachments.push({
url: i.response?.data.url || i.url, url: i.response?.data.url || i.url,
name: i.response?.data.fileName || i.name, name: i.response?.data.fileName || i.name,
ossId:i.response?.data.ossId || i.ossId
}); });
} }
}); });

1
src/views/property/point/pointModal.vue

@ -306,6 +306,7 @@
form.attachments.push({ form.attachments.push({
url:i.response?.data.url || i.url, url:i.response?.data.url || i.url,
name:i.response?.data.fileName ||i.name, name:i.response?.data.fileName ||i.name,
ossId:i.response?.data.ossId || i.ossId
}) })
} }
}) })

Loading…
Cancel
Save