详情文件预览

This commit is contained in:
zhujiyan
2024-06-06 22:14:20 +08:00
parent 5722259cc1
commit b3fbb68881
15 changed files with 238 additions and 77 deletions

View File

@@ -18,6 +18,7 @@
<Link />
</el-icon>
<a :href='detailData.problemPath' target='_blank'>{{ detailData.problemName }}</a>
<span @click="openFile(detailData.problemName)">预览</span>
</el-descriptions-item>
</template>
<el-descriptions-item :span='2' label='采取措施'>
@@ -28,6 +29,7 @@
<Link />
</el-icon>
<a :href='detailData.reportPath' target='_blank'>{{ detailData.reportName }}</a>
<span @click="openFile(detailData.reportName)">预览</span>
</el-descriptions-item>
</el-descriptions>
</div>
@@ -41,7 +43,9 @@ import { getFileNameAndFilePath } from '@/api/system-boot/file'
import { Link } from '@element-plus/icons-vue'
defineOptions({ name: 'technology/detail' })
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
const { query } = useRoute() // 查询参数
const props = defineProps({

View File

@@ -17,6 +17,7 @@
<Link />
</el-icon>
<a :href="problemDetail.problemPath" target="_blank">{{ problemDetail.problemName }}</a>
<span @click="openFile(problemDetail.problemName )">预览</span>
</el-form-item>
<el-form-item label="采取的措施:" prop="takeStep">
@@ -63,6 +64,9 @@ import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删
import { getFileNameAndFilePath, uploadFile } from '@/api/system-boot/file'
import { addFeedback, updateFeedback } from '@/api/supervision-boot/leaflet'
import { Link } from '@element-plus/icons-vue'
const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?' + name)
}
//.doc,.docx,.xlsx,.xls,.pdf
const acceptType = ref('')
//下拉数据源