zhouwx
2025-11-27 4e3ea127d1000b0f615b860e553acc409d926e18
src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/index.vue
@@ -135,14 +135,16 @@
const openFile = async(path)=>{
  const ext = path.split('.').pop().toLowerCase();
  if (ext === 'doc') {
  if (ext === 'doc' || ext === 'xlsx' || ext === 'xls') {
    ElMessageBox.confirm('暂不支持线上预览.doc文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
      window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank');
    }).catch(() => {
      console.log('取消预览')
    });
    return
  }
  }else if(ext === 'pdf'){
    window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank');
  }else{
  try {
    // 1. 获取文件
    const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path);
@@ -172,6 +174,7 @@
    alert(`预览失败: ${error.message}`);
  }
}
}
const openDialog = (type, value) => {
  dialogRef.value.openDialog(type, value, data.queryParams.companyId, data.isAdmin, data.companyList);