Browse Source

图片下载

ops-management-platform-frontend-dev
wbc 2 weeks ago
parent
commit
681286692c
  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. 15
      src/views/IO/workOrder/delayAudit/detailDrawer.vue
  6. 21
      src/views/IO/workOrder/orderAudit/detailDrawer.vue
  7. 1
      src/views/IO/workOrder/orderHandle/delayModal.vue
  8. 21
      src/views/IO/workOrder/orderHandle/detailDrawer.vue
  9. 1
      src/views/IO/workOrder/orderHandle/handleModal.vue
  10. 21
      src/views/IO/workOrder/orderSearch/detailDrawer.vue
  11. 1
      src/views/IO/workOrder/orderSearch/faultModal.vue
  12. 21
      src/views/IO/workOrder/orderSend/detailDrawer.vue
  13. 1
      src/views/IO/workOrder/orderSend/faultModal.vue
  14. 3
      src/views/document/addModal.vue
  15. 2
      src/views/notice/addModal.vue
  16. 2
      src/views/project/contractManage/addModal.vue
  17. 2
      src/views/project/projectManage/addModal.vue
  18. 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',
}); });
}); });

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

@ -81,6 +81,12 @@
<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> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -124,6 +130,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 +224,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 +236,10 @@
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 onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
@ -272,6 +284,7 @@
statusText, statusText,
progress, progress,
fileLists, fileLists,
handleDownload
}; };
}, },
}); });

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

@ -81,6 +81,12 @@
<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> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -119,6 +125,12 @@
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload v-model:file-list="fileLists1" disabled> </a-upload> <a-upload v-model:file-list="fileLists1" disabled> </a-upload>
<a-button
type="primary"
@click="handleDownload(fileLists1[0])"
v-if="fileLists1.length > 0"
>下载</a-button
>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -166,6 +178,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 +335,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 +355,10 @@
} }
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 onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
@ -392,6 +410,7 @@
progress, progress,
fileLists, fileLists,
fileLists1, fileLists1,
handleDownload
}; };
}, },
}); });

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
}); });
} }
}); });

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

@ -81,6 +81,12 @@
<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> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -119,6 +125,12 @@
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload v-model:file-list="fileLists1" disabled> </a-upload> <a-upload v-model:file-list="fileLists1" disabled> </a-upload>
<a-button
type="primary"
@click="handleDownload(fileLists1[0])"
v-if="fileLists1.length > 0"
>下载</a-button
>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -166,6 +178,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 +326,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 +355,10 @@
} }
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 onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
@ -393,6 +411,7 @@
progress, progress,
fileLists, fileLists,
fileLists1, fileLists1,
handleDownload,
}; };
}, },
}); });

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
}); });
} }
}); });

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

@ -81,6 +81,12 @@
<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> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -119,6 +125,12 @@
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload v-model:file-list="fileLists1" disabled> </a-upload> <a-upload v-model:file-list="fileLists1" disabled> </a-upload>
<a-button
type="primary"
@click="handleDownload(fileLists1[0])"
v-if="fileLists1.length > 0"
>下载</a-button
>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -166,6 +178,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 +326,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 +355,10 @@
} }
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 onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
@ -393,6 +411,7 @@
progress, progress,
fileLists, fileLists,
fileLists1, fileLists1,
handleDownload
}; };
}, },
}); });

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
}); });
} }
}); });

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

@ -81,6 +81,12 @@
<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> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -119,6 +125,12 @@
<div <div
><span class="titleLabel">处理图片</span> ><span class="titleLabel">处理图片</span>
<a-upload v-model:file-list="fileLists1" disabled> </a-upload> <a-upload v-model:file-list="fileLists1" disabled> </a-upload>
<a-button
type="primary"
@click="handleDownload(fileLists1[0])"
v-if="fileLists1.length > 0"
>下载</a-button
>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -166,6 +178,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 +335,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 +355,10 @@
} }
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 onClose = () => { const onClose = () => {
visible.value = false; visible.value = false;
@ -393,6 +411,7 @@
progress, progress,
fileLists, fileLists,
fileLists1, fileLists1,
handleDownload
}; };
}, },
}); });

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