zhouwx
2025-11-27 4e3ea127d1000b0f615b860e553acc409d926e18
修改
已修改8个文件
36 ■■■■■ 文件已修改
src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/components/editDialog.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/programStanderdModule/components/editDialog.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/programStanderdModule/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/components/editDialog.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/components/editDialog.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/components/editDialog.vue
@@ -36,10 +36,10 @@
          <el-input v-model.trim="state.form.templateName" :disabled="state.title =='查看'" placeholder="模板名称"></el-input>
        </el-form-item>
        <el-form-item label="模板文件:" prop="filePath">
          <el-upload accept=".doc,.docx" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
          <el-upload accept=".doc,.docx,.pdf,.xlsx,.xls" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
            <el-button type="primary">点击上传</el-button>
            <template #tip>
              <div class="el-upload__tip">支持上传.doc、.docx格式文档,尺寸小于30M,最多可上传1份</div>
              <div class="el-upload__tip">支持上传.doc、.docx、.pdf、.xlsx、.xls格式文档,尺寸小于30M,最多可上传1份</div>
            </template>
          </el-upload>
        </el-form-item>
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);
src/views/build/conpanyFunctionConsult/standardSysTemp/programStanderdModule/components/editDialog.vue
@@ -44,10 +44,10 @@
          </el-select>
        </el-form-item>
        <el-form-item label="模板文件:" prop="filePath">
          <el-upload accept=".doc,.docx" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
          <el-upload accept=".doc,.docx,.pdf,.xlsx,.xls" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
            <el-button type="primary">点击上传</el-button>
            <template #tip>
              <div class="el-upload__tip">支持上传.doc、.docx格式文档,尺寸小于30M,最多可上传1份</div>
              <div class="el-upload__tip">支持上传.doc、.docx、.pdf、.xlsx、.xls格式文档,尺寸小于30M,最多可上传1份</div>
            </template>
          </el-upload>
        </el-form-item>
src/views/build/conpanyFunctionConsult/standardSysTemp/programStanderdModule/index.vue
@@ -105,20 +105,22 @@
})
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);
    const arrayBuffer = await response.arrayBuffer();
    // 2. 创建新窗口
    const win = window.open('', '_blank')
      const win = window.open('', '_blank');
    win.document.write(`
      <!DOCTYPE html>
      <html>
@@ -142,6 +144,7 @@
    alert(`预览失败: ${error.message}`);
  }
}
}
const getList = async () => {
  loading.value = true
  const res = await getStandardTemp(data.queryParams)
src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/components/editDialog.vue
@@ -33,10 +33,10 @@
<!--          </el-select>-->
<!--        </el-form-item>-->
        <el-form-item label="文件:" prop="filePath">
          <el-upload accept=".doc,.docx,.pdf" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
          <el-upload accept=".doc,.docx,.pdf,.xlsx,.xls" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
            <el-button type="primary">点击上传</el-button>
            <template #tip>
              <div class="el-upload__tip">支持上传.doc、.docx、.pdf格式文档,尺寸小于30M,最多可上传1份</div>
              <div class="el-upload__tip">支持上传.doc、.docx、.pdf、.xlsx、.xls格式文档,尺寸小于30M,最多可上传1份</div>
            </template>
          </el-upload>
        </el-form-item>
src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/index.vue
@@ -107,7 +107,7 @@
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(() => {
src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/components/editDialog.vue
@@ -33,10 +33,10 @@
<!--          </el-select>-->
<!--        </el-form-item>-->
        <el-form-item label="文件:" prop="filePath">
          <el-upload accept=".doc,.docx,.pdf" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
          <el-upload accept=".doc,.docx,.pdf,.xlsx,.xls" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
            <el-button type="primary">点击上传</el-button>
            <template #tip>
              <div class="el-upload__tip">支持上传.doc、.docx、.pdf格式文档,尺寸小于30M,最多可上传1份</div>
              <div class="el-upload__tip">支持上传.doc、.docx、.pdf、.xlsx、.xls格式文档,尺寸小于30M,最多可上传1份</div>
            </template>
          </el-upload>
        </el-form-item>
src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/index.vue
@@ -107,7 +107,7 @@
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(() => {