马宇豪
2023-10-07 21e03c21386fb124774df48c8bb1fe3b185dbb48
src/views/coalMine/cPeopleManage/index.vue
@@ -51,7 +51,11 @@
          {{getNationName(scope.row.nationCode)}}
        </template>
      </el-table-column>
      <el-table-column label="最高学历" align="center" prop="eduLevel"/>
      <el-table-column label="最高学历" align="center" prop="eduLevel">
        <template #default="scope">
          {{getDegreeName(scope.row.eduLevel)}}
        </template>
      </el-table-column>
      <el-table-column label="证件照片" align="center" prop="photoPath">
        <template #default="scope">
          <el-button type="text" @click="viewFile(scope.row.photoAttachment)">预览</el-button>
@@ -114,7 +118,7 @@
import { getToken } from "@/utils/auth";
export default {
  name: "cPeopleManage",
  dicts: ['sys_nation_code'],
  dicts: ['sys_nation_code','sys_highest_education_code'],
  components: { peopleDialog, experienceDialog, certDialog, trainDialog, examDialog },
  data() {
    return {
@@ -155,7 +159,15 @@
      if(obj){
        return obj.label
      }else{
        return '无'
        return '未知'
      }
    },
    getDegreeName(code){
      let obj = JSON.parse(JSON.stringify(this.dict.type.sys_highest_education_code)).find(i=>i.value == code)
      if(obj){
        return obj.label
      }else{
        return '未知'
      }
    },
    openPeople(data,type){
@@ -203,11 +215,13 @@
      this.getPage()
    },
    resetQuery(){
      this.$refs['queryForm'].resetFields()
      this.queryParams = {
        code: '',
        name: '',
        pageNum: 1,
        pageSize: 10
      }
      this.getPage()
    },
    handleAdd(){
    },
    viewFile(file){
      axios.get(process.env.VUE_APP_BASE_API + file.fileUrl,{headers:{'Content-Type': 'application/json','Authorization': "Bearer " + getToken()},responseType: 'blob'}).then(res=>{