祖安之光
8 天以前 65c426a4930005901aa86a7cb8a60cf27811617c
src/views/build/conpanyFunctionConsult/standardSysTemp/recordStandardModule/index.vue
@@ -8,6 +8,7 @@
              plain
              icon="Plus"
              @click="openDialog('add',{})"
              v-hasPermi="['appStandard:update']"
          >新增</el-button>
        </el-form-item>
        <el-form-item v-if="isAdmin" label="单位:" >
@@ -45,9 +46,9 @@
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
        <template #default="scope">
          <el-button link type="primary" @click="downloadFile(scope.row.filePath)">下载</el-button>
          <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button>
          <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
          <el-button link type="primary" @click="downloadFile(scope.row.filePath)" v-hasPermi="['recordStandard:view']">下载</el-button>
          <el-button link type="primary" @click="openDialog('edit',scope.row)" v-hasPermi="['recordStandard:update']">编辑</el-button>
          <el-button link type="danger" @click="handleDelete(scope.row)" v-hasPermi="['recordStandard:update']">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -113,7 +114,7 @@
const openFile = async(path)=>{
  const ext = path.split('.').pop().toLowerCase();
  if (ext === 'doc' || ext === 'xlsx' || ext === 'xls') {
    ElMessageBox.confirm('暂不支持线上预览.doc文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
    ElMessageBox.confirm('暂不支持线上预览.doc、.xls、.xlsx文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
      window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank');
    }).catch(() => {
      console.log('取消预览')