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

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

@ -81,6 +81,12 @@
<div
><span class="titleLabel">故障图片</span>
<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>
</a-col>
</a-row>
@ -124,6 +130,8 @@
import { getInfo, queryProcess } from './api';
import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue';
import { ossDownload } from '@/api/system/oss';
import { downloadByData } from '@/utils/file/download';
export default defineComponent({
components: { Icon },
setup(props, { emit }) {
@ -216,6 +224,7 @@
fileLists.value.push({
url: i.url,
name: i.name,
ossId: i.ossId,
status: 'done',
});
});
@ -227,7 +236,10 @@
initMap(detail.longitude, detail.latitude, detail.faultLocation);
}
};
const handleDownload = async (record) => {
const data = await ossDownload(record.ossId);
downloadByData(data, record.name);
};
//
const onClose = () => {
visible.value = false;
@ -272,6 +284,7 @@
statusText,
progress,
fileLists,
handleDownload
};
},
});

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

@ -81,6 +81,12 @@
<div
><span class="titleLabel">故障图片</span>
<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>
</a-col>
</a-row>
@ -119,6 +125,12 @@
<div
><span class="titleLabel">处理图片</span>
<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>
</a-col>
</a-row>
@ -166,6 +178,8 @@
import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api';
import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue';
import { ossDownload } from '@/api/system/oss';
import { downloadByData } from '@/utils/file/download';
export default defineComponent({
components: { Icon },
setup(props, { emit }) {
@ -321,6 +335,7 @@
fileLists.value.push({
url: i.url,
name: i.name,
ossId: i.ossId,
status: 'done',
});
});
@ -340,7 +355,10 @@
}
initMap(detail.longitude, detail.latitude, detail.faultLocation);
};
const handleDownload = async (record) => {
const data = await ossDownload(record.ossId);
downloadByData(data, record.name);
};
//
const onClose = () => {
visible.value = false;
@ -392,6 +410,7 @@
progress,
fileLists,
fileLists1,
handleDownload
};
},
});

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

@ -167,6 +167,7 @@
form.attachments.push({
url: i.response?.data.url || i.url,
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
><span class="titleLabel">故障图片</span>
<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>
</a-col>
</a-row>
@ -119,6 +125,12 @@
<div
><span class="titleLabel">处理图片</span>
<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>
</a-col>
</a-row>
@ -166,6 +178,8 @@
import { getInfo, getDealInfo, queryProcess, getOrderDelayHistory } from './handleApi';
import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue';
import { ossDownload } from '@/api/system/oss';
import { downloadByData } from '@/utils/file/download';
export default defineComponent({
components: { Icon },
setup(props, { emit }) {
@ -312,6 +326,7 @@
fileLists.value.push({
url: i.url,
name: i.name,
ossId: i.ossId,
status: 'done',
});
});
@ -340,7 +355,10 @@
}
initMap(detail.longitude, detail.latitude, detail.faultLocation);
};
const handleDownload = async (record) => {
const data = await ossDownload(record.ossId);
downloadByData(data, record.name);
};
//
const onClose = () => {
visible.value = false;
@ -393,6 +411,7 @@
progress,
fileLists,
fileLists1,
handleDownload,
};
},
});

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

@ -150,6 +150,7 @@
form.attachments.push({
url: i.response?.data.url || i.url,
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
><span class="titleLabel">故障图片</span>
<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>
</a-col>
</a-row>
@ -119,6 +125,12 @@
<div
><span class="titleLabel">处理图片</span>
<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>
</a-col>
</a-row>
@ -166,6 +178,8 @@
import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api';
import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue';
import { ossDownload } from '@/api/system/oss';
import { downloadByData } from '@/utils/file/download';
export default defineComponent({
components: { Icon },
setup(props, { emit }) {
@ -312,6 +326,7 @@
fileLists.value.push({
url: i.url,
name: i.name,
ossId: i.ossId,
status: 'done',
});
});
@ -340,7 +355,10 @@
}
initMap(detail.longitude, detail.latitude, detail.faultLocation);
};
const handleDownload = async (record) => {
const data = await ossDownload(record.ossId);
downloadByData(data, record.name);
};
//
const onClose = () => {
visible.value = false;
@ -393,6 +411,7 @@
progress,
fileLists,
fileLists1,
handleDownload
};
},
});

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

@ -360,6 +360,7 @@
form.attachments.push({
url: i.response?.data.url || i.url,
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
><span class="titleLabel">故障图片</span>
<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>
</a-col>
</a-row>
@ -119,6 +125,12 @@
<div
><span class="titleLabel">处理图片</span>
<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>
</a-col>
</a-row>
@ -166,6 +178,8 @@
import { getInfo, dealInfo, queryProcess, getOrderDelayHistory } from './api';
import AMapLoader from '@amap/amap-jsapi-loader';
import Icon from '@/components/Icon/Icon.vue';
import { ossDownload } from '@/api/system/oss';
import { downloadByData } from '@/utils/file/download';
export default defineComponent({
components: { Icon },
setup(props, { emit }) {
@ -321,6 +335,7 @@
fileLists.value.push({
url: i.url,
name: i.name,
ossId: i.ossId,
status: 'done',
});
});
@ -340,7 +355,10 @@
}
initMap(detail.longitude, detail.latitude, detail.faultLocation);
};
const handleDownload = async (record) => {
const data = await ossDownload(record.ossId);
downloadByData(data, record.name);
};
//
const onClose = () => {
visible.value = false;
@ -393,6 +411,7 @@
progress,
fileLists,
fileLists1,
handleDownload
};
},
});

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

@ -360,6 +360,7 @@
form.attachments.push({
url: i.response?.data.url || i.url,
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({
url:i.url,
name:i.name,
ossId:i.ossId,
status:'done'
})
})
@ -141,11 +142,13 @@
const handleChange = (info) => {
if (info.fileList.length > 0) {
form.attachments = [];
console.log(info)
info.fileList.forEach((i) => {
if (i.status == 'done') {
form.attachments.push({
url: i.response?.data.url || i.url,
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({
url:i.url,
name:i.name,
ossId:i.ossId,
status:'done'
})
})
@ -235,6 +236,7 @@
form.attachments.push({
url:i.response?.data.url || i.url,
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({
url: i.url,
name: i.name,
ossId:i.ossId,
status: 'done',
});
});
@ -314,6 +315,7 @@
form.attachments.push({
url: i.response?.data.url || i.url,
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({
url: i.url,
name: i.name,
ossId:i.ossId,
status: 'done',
});
});
@ -223,6 +224,7 @@
form.attachments.push({
url: i.response?.data.url || i.url,
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({
url:i.response?.data.url || i.url,
name:i.response?.data.fileName ||i.name,
ossId:i.response?.data.ossId || i.ossId
})
}
})

Loading…
Cancel
Save