祖安之光
2025-07-15 050ee6d982a8ae40011f1f723198d23fedae40b3
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/appFile/index.vue
@@ -65,6 +65,8 @@
import useUserStore from "@/store/modules/user";
import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys";
import {renderAsync} from "docx-preview";
import {removeToken} from "@/utils/auth";
import {isRelogin} from "@/utils/request";
const userStore = useUserStore()
const { proxy } = getCurrentInstance();
const loading = ref(false);
@@ -99,6 +101,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);