feature:基础分析文件上传题附件接入下载中心

This commit is contained in:
王博冉
2023-04-23 10:47:36 +08:00
parent af9ba54ee1
commit d9534e3b45

View File

@@ -57,6 +57,8 @@ import {
} from "@/api/data-analyse";
import { convertQueryToString } from "@/utils/httpFormat";
import { addDownloadCenter } from "@/api/download.js";
import ImagePreview from "./ImagePreview";
@@ -136,17 +138,22 @@ export default defineComponent({
async function handleClick() {
const sn = props.sn;
const question_index = props.data.question_index;
const { data } = await downloadAllFile(
sn,
question_index,
searchParams.value
);
const {title,url} = data.url;
const subdata = {
fileURL:url,
fileName:title
}
store.dispatch('common/fileDown',subdata)
let data ={ download_type: '3', question_index }
addDownloadCenter(sn,data).then(res=>{
store.dispatch('downloadCenter/changeCenterUrl',route.path)
store.dispatch('downloadCenter/changeCenterShow',true)
})
// const { data } = await downloadAllFile(
// sn,
// question_index,
// searchParams.value
// );
// const {title,url} = data.url;
// const subdata = {
// fileURL:url,
// fileName:title
// }
// store.dispatch('common/fileDown',subdata)
}
const previewVisible = ref(false);