祖安之光
2025-10-21 f3c73a86f00061125e1946125c2f7499064a5708
src/views/build/conpanyFunctionConsult/companyInfo/overview/index.vue
@@ -8,6 +8,7 @@
              plain
              icon="Plus"
              @click="openDialog('add',{})"
              v-hasPermi="['companyInfo:overview:add']"
          >新增</el-button>
        </el-form-item>
        <el-form-item label="企业名称:" v-if="data.isAdmin" style="margin-left: 20px">
@@ -42,22 +43,30 @@
        <el-form-item v-if="data.isAdmin">
          <el-button type="primary" style="margin-left: 30px" @click="searchClick">查询</el-button>
          <el-button plain @click="reset">重置</el-button>
        </el-form-item>
        <el-form-item>
          <el-button  type="primary" style="margin-left: 15px" icon="Upload" @click="exportData">导入</el-button>
          <el-button  type="primary" style="margin-left: 15px" icon="Upload" @click="exportData" v-hasPermi="['companyInfo:overview:add']">导入</el-button>
        </el-form-item>
      </el-form>
    </div>
    <!-- 表格数据 -->
    <el-table v-loading="loading" :data="dataList" :border="true">
    <el-table v-loading="loading" :data="dataList" :border="true" >
      <el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
      <el-table-column label="企业名称" prop="companyName" align="center"  />
      <el-table-column label="公司概况" prop="companySummary" align="center"  width="600" >
        <template #default="scope">
          <div  style="height: 250px;" v-html="scope.row.companySummary"  ></div>
        </template>
      </el-table-column>
      <el-table-column label="营业执照" prop="fileName" align="center" >
        <template #default="scope">
          <el-link  style="" type="primary" @click="openFile(scope.row.filePath,scope.row.fileName)">{{scope.row.fileName}}</el-link>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
        <template #default="scope">
          <el-button link type="primary"  @click="openDialog('review',scope.row)" >查看</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="openDialog('edit',scope.row)" v-hasPermi="['companyInfo:overview:edit']">编辑</el-button>
          <el-button link type="danger"  @click="handleDelete(scope.row)" v-hasPermi="['companyInfo:overview:del']">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
@@ -131,6 +140,9 @@
import {Download, Upload} from "@element-plus/icons-vue";
import {uploadTemplate} from "@/api/staffManage/staff";
import {uploadInOverview} from "@/api/companyInfo/basicInfo";
import {renderAsync} from "docx-preview";
import axios from "axios";
import {getToken} from "@/utils/auth";
const { proxy } = getCurrentInstance();
const loading = ref(false);
const noticeRef = ref();
@@ -344,11 +356,6 @@
      formData.append('file', file.raw)
    })
    formData.append('companyId',data.isAdmin ? state.form.companyId : data.queryParams.companyId)
    // const param = {
    //   file: formData,
    //   companyId: data.isAdmin ? state.form.companyId : data.queryParams.companyId
    // }
    console.log('form',formData)
    const res = await uploadInOverview(formData)
    if(res.code == 200){
      ElMessage({
@@ -368,6 +375,10 @@
    }
  }
}
const openFile = async(path)=>{
  window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank');
}
</script>
<style lang="scss">
.pag-container{