| | |
| | | ElMessage.warning('入门指南文件未找到'); |
| | | return; |
| | | } |
| | | fetch(rumenPath.value) |
| | | .then((response) => response.blob()) |
| | | .then((res) => { |
| | | let blob = new Blob([res], { type: "application/pdf" }); |
| | | // pdfurl即转化后的结果 |
| | | let pdfurl = window.URL.createObjectURL(blob); |
| | | // 新标签页打开,即可预览并下载 |
| | | window.open(pdfurl); |
| | | }); |
| | | } else if (val === 'systemupdate') { |
| | | |
| | | fetch(systemupdateFilePath.value) |
| | | .then((response) => response.blob()) |
| | | .then((res) => { |
| | | let blob = new Blob([res], { type: "application/pdf" }); |
| | | // pdfurl即转化后的结果 |
| | | let pdfurl = window.URL.createObjectURL(blob); |
| | | // 新标签页打开,即可预览并下载 |
| | | window.open(pdfurl); |
| | | }); |
| | | |
| | | window.open(rumenPath.value, '_blank'); |
| | | } else if (val === 'systemupdate') { |
| | | window.open(systemupdateFilePath.value, '_blank'); |
| | | |
| | | |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | defineOptions({ |
| | | name: 'algorithmRepository', |
| | | }); |
| | | |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz'; |
| | | import { getalgorithmList, selectDeviceList } from '@/api/algorithm'; |
| | | import { getSmallImg } from '@/utils/util'; |
| | |
| | | }; |
| | | // 详情 |
| | | const getList = () => { |
| | | getalgorithmList(params.value).then(res => { |
| | | const detailParams={ |
| | | ai_type_key: params.value.ai_type_key, |
| | | start_date:params.value.start_date, |
| | | end_date: params.value.end_date, |
| | | device_name: params.value.device_name, |
| | | name:params.value.name, |
| | | } |
| | | getalgorithmList(detailParams,{ current: params.value.current, |
| | | size: params.value.size,}).then(res => { |
| | | |
| | | console.log('算法仓库',res.data.data); |
| | | |
| | | loading.value = true; |
| | | detailData.value = res.data.data.records; |
| | | total.value = res.data.data.total; |
| | |
| | | .pictureitem { |
| | | display: grid; |
| | | grid-template-columns: repeat(5, 1fr); |
| | | gap: 24px; |
| | | gap: 14px; |
| | | |
| | | .imgitem { |
| | | border-radius: 12px 12px 0 0; |
| | | overflow: hidden; |
| | | .el-image { |
| | | width: 100%; |
| | | height: 200px; |
| | | height: 170px; |
| | | display: block; |
| | | margin: 0; |
| | | padding: 0; |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 42px; |
| | | height: 35px; |
| | | border-radius: 0 0 12px 12px; |
| | | overflow: hidden; |
| | | background: linear-gradient(180deg, #ffffff 0%, #e5edff 100%); |
| | |
| | | <el-pagination |
| | | v-model:current-page="jobListParams.current" |
| | | v-model:page-size="jobListParams.size" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-sizes="[15, 20, 30, 40]" |
| | | background |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | |
| | | }); |
| | | }; |
| | | // 查看 |
| | | const clickDetail = row => { |
| | | if (!row.filePath) { |
| | | // const clickDetail = row => { |
| | | // if (!row.filePath) { |
| | | // ElMessage.warning('没有可预览的文件'); |
| | | // return; |
| | | // } |
| | | // fetch(row.filePath) |
| | | // .then(response => response.blob()) |
| | | // .then(res => { |
| | | // let blob = new Blob([res], { type: 'application/pdf' }); |
| | | // // pdfurl即转化后的结果 |
| | | // let pdfurl = window.URL.createObjectURL(blob); |
| | | // // 新标签页打开,即可预览并下载 |
| | | // window.open(pdfurl); |
| | | // }); |
| | | // }; |
| | | const clickDetail = val => { |
| | | const filePath = val.filePath; |
| | | if (!val.filePath) { |
| | | ElMessage.warning('没有可预览的文件'); |
| | | return; |
| | | } |
| | | fetch(row.filePath) |
| | | .then(response => response.blob()) |
| | | .then(res => { |
| | | let blob = new Blob([res], { type: 'application/pdf' }); |
| | | // pdfurl即转化后的结果 |
| | | let pdfurl = window.URL.createObjectURL(blob); |
| | | // 新标签页打开,即可预览并下载 |
| | | window.open(pdfurl); |
| | | }); |
| | | window.open(filePath, '_blank'); |
| | | }; |
| | | // 文件上传 |
| | | const onUploadFileBefore = (file, row) => { |
| | |
| | | const formData = new FormData(); |
| | | formData.append('file', file, file.name); |
| | | |
| | | |
| | | uploadFileAPI(formData).then(res => { |
| | | if (res.data.code === 200) { |
| | | const params = { |