zhouwx
7 天以前 4fe6c5ac4bc2b7fa9c9c71bb52d9df3e8b13bd7c
src/views/build/conpanyFunctionConsult/standardSysTemp/techStandardModule/index.vue
@@ -99,6 +99,15 @@
})
const openFile = async(path)=>{
  const ext = path.split('.').pop().toLowerCase();
  if (ext === 'doc') {
    ElMessageBox.confirm('暂不支持线上预览.doc文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
      window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank');
    }).catch(() => {
      console.log('取消预览')
    });
    return
  }
  try {
    // 1. 获取文件
    const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path);