Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
src/views/CNAS/personnel/personnelInfo/tabs/personnel-information.vue
@@ -1,7 +1,7 @@
<template>
  <div>
    <div style="text-align: right;margin-bottom: 10px">
<!--       <el-button size="small" @click="$emit('goBackList')">返回</el-button>-->
      <!--       <el-button size="small" @click="$emit('goBackList')">返回</el-button>-->
      <el-button size="small" type="primary" @click="downPerson">下载档案</el-button>
      <el-button size="small" type="primary" @click="dialogVisible = true">人员分类</el-button>
      <el-button :loading="saveLoading" size="small" type="primary" @click="save">保存</el-button>
@@ -10,13 +10,13 @@
      <div style="display: flex;flex-direction: row;">
        <div style="width: 12em">
          <el-image :src="javaApi + '/img/' + form.pictureUrl" fit="fill"
                    style="width:100%;height: 300px;border: 1px solid #000;border-radius: 10px;margin-left: 6px;margin-top: 10px;">
            style="width:100%;height: 300px;border: 1px solid #000;border-radius: 10px;margin-left: 6px;margin-top: 10px;">
            <div slot="error" class="image-slot">
              <i class="el-icon-picture-outline" style="font-size: 40px;"></i>
            </div>
          </el-image>
          <el-image :src="javaApi + '/img/' + form.signatureUrl" fit="fill"
                    style="width:80%;height: 50px;border: 1px solid #000;border-radius: 10px;margin-left: 22px;margin-top: 20px;">
            style="width:80%;height: 50px;border: 1px solid #000;border-radius: 10px;margin-left: 22px;margin-top: 20px;">
            <div slot="error" class="image-slot">
              <i class="el-icon-picture-outline" style="font-size: 40px;"></i>
            </div>
@@ -61,7 +61,9 @@
              </el-col>
              <el-col :span="8">
                <el-form-item label="所属部门">
                  <el-cascader v-model="form.departLimsId" :options="department" :props="{ label: 'name', value: 'id',checkStrictly: true }"  filterable style="width: 100%;"></el-cascader>
                  <el-cascader v-model="form.departLimsId" :options="department"
                    :props="{ label: 'name', value: 'id', checkStrictly: true }" filterable
                    style="width: 100%;"></el-cascader>
                </el-form-item>
              </el-col>
            </el-row>
@@ -74,7 +76,7 @@
              <el-col :span="8">
                <el-form-item label="入集团时间">
                  <el-date-picker v-model="form.groupTime" format="yyyy-MM-dd" placeholder="选择日期" size="small"
                                  style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                    style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                  </el-date-picker>
                </el-form-item>
              </el-col>
@@ -95,14 +97,14 @@
              <el-col :span="8">
                <el-form-item label="工作时间">
                  <el-date-picker v-model="form.workingTime" format="yyyy-MM-dd" placeholder="选择日期" size="small"
                                  style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                    style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="合同到期时间">
                  <el-date-picker v-model="form.contractLifeTime" format="yyyy-MM-dd" placeholder="选择日期" size="small"
                                  style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                    style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                  </el-date-picker>
                </el-form-item>
              </el-col>
@@ -123,8 +125,7 @@
              <el-col :span="8">
                <el-form-item label="出生日期">
                  <el-date-picker v-model="form.dateBirth" format="yyyy-MM-dd" placeholder="选择日期" size="small"
                                  @change="getAge"
                                  style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                    @change="getAge" style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                  </el-date-picker>
                </el-form-item>
              </el-col>
@@ -147,8 +148,8 @@
              </el-col>
              <el-col :span="8">
                <el-form-item label="年龄">
                  <el-input-number v-model="form.age" :max="130" :min="1"
                                   controls-position="right" size="small" style="width: 99%;"></el-input-number>
                  <el-input-number v-model="form.age" :max="130" :min="1" controls-position="right" size="small"
                    style="width: 99%;"></el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="8">
@@ -163,9 +164,8 @@
            <el-row>
              <el-col :span="8">
                <el-form-item label="证件有效期">
                  <el-date-picker v-model="form.validityPeriod" format="yyyy-MM-dd" placeholder="选择日期"
                                  size="small" style="width: 99%;" type="date"
                                  value-format="yyyy-MM-dd HH:mm:ss">
                  <el-date-picker v-model="form.validityPeriod" format="yyyy-MM-dd" placeholder="选择日期" size="small"
                    style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                  </el-date-picker>
                </el-form-item>
              </el-col>
@@ -188,9 +188,8 @@
              </el-col>
              <el-col :span="8">
                <el-form-item label="入党/团时间">
                  <el-date-picker v-model="form.dumplingTime" format="yyyy-MM-dd" placeholder="选择日期"
                                  size="small" style="width: 99%;" type="date"
                                  value-format="yyyy-MM-dd HH:mm:ss">
                  <el-date-picker v-model="form.dumplingTime" format="yyyy-MM-dd" placeholder="选择日期" size="small"
                    style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                  </el-date-picker>
                </el-form-item>
              </el-col>
@@ -225,9 +224,8 @@
              </el-col>
              <el-col :span="8">
                <el-form-item label="毕业时间1">
                  <el-date-picker v-model="form.graduationTime1" format="yyyy-MM-dd" placeholder="选择日期"
                                  size="small" style="width: 99%;" type="date"
                                  value-format="yyyy-MM-dd HH:mm:ss">
                  <el-date-picker v-model="form.graduationTime1" format="yyyy-MM-dd" placeholder="选择日期" size="small"
                    style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                  </el-date-picker>
                </el-form-item>
              </el-col>
@@ -245,9 +243,8 @@
              </el-col>
              <el-col :span="8">
                <el-form-item label="毕业时间2">
                  <el-date-picker v-model="form.graduationTime2" format="yyyy-MM-dd" placeholder="选择日期"
                                  size="small" style="width: 99%;" type="date"
                                  value-format="yyyy-MM-dd HH:mm:ss">
                  <el-date-picker v-model="form.graduationTime2" format="yyyy-MM-dd" placeholder="选择日期" size="small"
                    style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                  </el-date-picker>
                </el-form-item>
              </el-col>
@@ -255,9 +252,8 @@
            <el-row>
              <el-col :span="8">
                <el-form-item label="登记时间">
                  <el-date-picker v-model="form.lastUpdateTime" format="yyyy-MM-dd" placeholder="选择日期"
                                  size="small" style="width: 99%;" type="date"
                                  value-format="yyyy-MM-dd HH:mm:ss">
                  <el-date-picker v-model="form.lastUpdateTime" format="yyyy-MM-dd" placeholder="选择日期" size="small"
                    style="width: 99%;" type="date" value-format="yyyy-MM-dd HH:mm:ss">
                  </el-date-picker>
                </el-form-item>
              </el-col>
@@ -272,20 +268,18 @@
                <el-form-item label="个人照片">
                  <el-input v-model="form.pictureUrl" disabled size="small">
                    <el-button v-if="form.pictureUrl" slot="append" icon="el-icon-delete-solid"
                               @click="deleteFile(form.pictureUrl, 'pictureUrl')"></el-button>
                      @click="deleteFile(form.pictureUrl, 'pictureUrl')"></el-button>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-upload ref="upload" :action="action"
                           :headers="uploadHeader"
                           :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'pictureUrl')"
                           :show-file-list="false"
                           style="float: left; margin: 0 10px 0 10px;">
                <el-upload ref="upload" :action="action" :headers="uploadHeader"
                  :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'pictureUrl')"
                  :show-file-list="false" style="float: left; margin: 0 10px 0 10px;">
                  <el-button slot="trigger" class="uploadFile" size="mini" type="primary">上传</el-button>
                </el-upload>
                <el-button v-if="form.pictureUrl" class="uploadFile" size="mini"
                           type="primary" @click="downloadFile(form.pictureUrl)">下载</el-button>
                <el-button v-if="form.pictureUrl" class="uploadFile" size="mini" type="primary"
                  @click="downloadFile(form.pictureUrl)">下载</el-button>
              </el-col>
            </el-row>
            <el-row>
@@ -293,71 +287,71 @@
                <el-form-item label="电子签名">
                  <el-input v-model="form.signatureUrl" disabled size="small">
                    <el-button v-if="form.signatureUrl" slot="append" icon="el-icon-delete-solid"
                               @click="deleteFile(form.signatureUrl, 'signatureUrl')"></el-button>
                      @click="deleteFile(form.signatureUrl, 'signatureUrl')"></el-button>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-upload ref="upload" :action="action"
                           :headers="uploadHeader"
                           :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'signatureUrl')"
                           :show-file-list="false"
                           style="float: left; margin: 0 10px 0 10px;">
                <el-upload ref="upload" :action="action" :headers="uploadHeader"
                  :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'signatureUrl')"
                  :show-file-list="false" style="float: left; margin: 0 10px 0 10px;">
                  <el-button slot="trigger" class="uploadFile" size="small" type="primary">上传</el-button>
                </el-upload>
                <el-button v-if="form.signatureUrl" class="uploadFile" size="small"
                           type="primary" @click="downloadFile(form.signatureUrl)">下载</el-button>
                <el-button v-if="form.signatureUrl" class="uploadFile" size="small" type="primary"
                  @click="downloadFile(form.signatureUrl)">下载</el-button>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="20">
                <el-form-item label="证书资料" >
                <el-form-item label="证书资料">
                </el-form-item>
              </el-col>
              <el-col :span="4">
                <el-button size="mini" style="float: right;margin-right: 25px" type="primary" @click="annexAdd(0)">新增</el-button>
                <el-button size="mini" style="float: right;margin-right: 25px" type="primary"
                  @click="annexAdd(0)">新增</el-button>
              </el-col>
            </el-row>
            <lims-table :tableData="annexList" :column="columnData2" style="width: 96%;margin-left: 34px"
                        height="200" :tableLoading="tableLoading2"></lims-table>
            <lims-table :tableData="annexList" :column="columnData2" style="width: 96%;margin-left: 34px" height="200"
              :tableLoading="tableLoading2"></lims-table>
            <el-row style="margin-top: 10px">
              <el-col :span="20">
                <el-form-item label="附件资料" >
                <el-form-item label="附件资料">
                </el-form-item>
              </el-col>
              <el-col :span="4">
                <el-upload ref='upload'
                           :action="fileAction"
                           :auto-upload="true" :data="{userId: clickNodeVal.userId}"
                           :before-upload="fileBeforeUpload"
                           :headers="uploadHeader" :on-error="onError"
                           :on-success="handleSuccessUp"
                           :show-file-list="false"
                           accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;">
                <el-upload ref='upload' :action="fileAction" :auto-upload="true" :data="{ userId: clickNodeVal.userId }"
                  :before-upload="fileBeforeUpload" :headers="uploadHeader" :on-error="onError"
                  :on-success="handleSuccessUp" :show-file-list="false"
                  accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
                  style="width: 80px !important;">
                  <el-button size="small" type="primary">附件上传</el-button>
                </el-upload>
              </el-col>
            </el-row>
            <lims-table :tableData="tableData" :column="columnData" style="width: 96%;float: right;"
                        height="200" :tableLoading="tableLoading"></lims-table>
            <lims-table :tableData="tableData" :column="columnData" style="width: 96%;float: right;" height="200"
              :tableLoading="tableLoading"></lims-table>
            <el-row style="margin-top: 10px">
              <el-col :span="20">
                <el-form-item label="工作经历" >
                <el-form-item label="工作经历">
                </el-form-item>
              </el-col>
              <el-col :span="4">
                <el-button size="mini" style="float: right;margin-right: 25px" type="primary" @click="annexAdd1('add')">新增</el-button>
                <el-button size="mini" style="float: right;margin-right: 25px" type="primary"
                  @click="annexAdd1('add')">新增</el-button>
              </el-col>
            </el-row>
            <el-table :data="tableData1" border height="200" style="width: 96%;float: right;" v-loading="tableLoading1">
            <el-table :data="tableData1" border height="200" style="width: 96%;float: right;"
                      :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
                      v-loading="tableLoading1">
              <el-table-column label="序号" type="index" width="55px" align="center">
              </el-table-column>
              <el-table-column label="工作经历" prop="workExperience">
              </el-table-column>
              <el-table-column align="center" label="操作">
                <template slot-scope="scope">
                  <el-button type="text" size="mini" @click="annexAdd1('edit',scope.row)">编辑</el-button>
                  <el-button type="text" size="mini" @click="deleteAnnex1(scope.row)" style="color: #f56c6c">删除</el-button>
                  <el-button type="text" size="mini" @click="annexAdd1('edit', scope.row)">编辑</el-button>
                  <el-button type="text" size="mini" @click="deleteAnnex1(scope.row)"
                    style="color: #f56c6c">删除</el-button>
                </template>
              </el-table-column>
            </el-table>
@@ -374,8 +368,7 @@
          </el-col>
          <el-col :span="20" style="text-align: left;">
            <el-checkbox-group v-model="checkList">
              <el-checkbox v-for="v in dict.type.personnl_type" :key="v.value"
                           :label="v.value"></el-checkbox>
              <el-checkbox v-for="v in dict.type.personnl_type" :key="v.value" :label="v.value"></el-checkbox>
            </el-checkbox-group>
          </el-col>
        </el-row>
@@ -387,7 +380,8 @@
    </el-dialog>
    <!-- 新增附件资料 -->
    <el-dialog :before-close="handleClose" :title="title" :visible.sync="dialogVisible1" width="40%" @open="getComparisonList">
    <el-dialog :before-close="handleClose" :title="title" :visible.sync="dialogVisible1" width="40%"
      @open="getComparisonList">
      <el-form ref="annex" :model="annex" :rules="rules" label-width="100px">
        <el-row>
          <el-col :span="16">
@@ -405,7 +399,7 @@
        </el-row>
        <el-row style="margin-top: 15px">
          <el-col :span="16">
            <el-form-item label="级别">
            <el-form-item label="级别" prop="level">
              <el-input v-model="annex.level" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
@@ -414,15 +408,15 @@
          <el-col :span="16">
            <el-form-item label="有效期" prop="periodValidity">
              <el-input v-model="annex.periodValidity" clearable size="small"></el-input>
<!--              <el-date-picker v-model="annex.periodValidity" format="yyyy-MM-dd" placeholder="选择日期" size="small"-->
<!--                              style="width: 99%;" type="date" value-format="yyyy-MM-dd">-->
<!--              </el-date-picker>-->
              <!--              <el-date-picker v-model="annex.periodValidity" format="yyyy-MM-dd" placeholder="选择日期" size="small"-->
              <!--                              style="width: 99%;" type="date" value-format="yyyy-MM-dd">-->
              <!--              </el-date-picker>-->
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="margin-top: 15px">
          <el-col :span="16">
            <el-form-item label="复印件">
            <el-form-item label="复印件" prop="copy">
              <el-input v-model="annex.copy" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
@@ -430,7 +424,7 @@
        <el-row style="margin-top: 15px">
          <el-col :span="16">
            <el-form-item label="原件">
            <el-form-item label="原件" prop="original">
              <el-input v-model="annex.original" clearable size="small"></el-input>
            </el-form-item>
          </el-col>
@@ -438,14 +432,12 @@
        <el-row style="margin-top: 15px">
          <el-col :span="16">
            <el-form-item label="文件">
              <el-upload
                :action="action"
                :before-upload="beforeAvatarUpload"
                :headers="uploadHeader"
                :on-success="(response,file,fileList) => onSuccess(response, file, fileList, 'fileName')"
              <el-upload :action="action" :before-upload="beforeAvatarUpload" :headers="uploadHeader"
                         ref="fileName"
                :on-success="(response, file, fileList) => onSuccess(response, file, fileList, 'fileName')"
                :show-file-list="false">
                <span v-if="annex.fileName">{{annex.fileName}}</span>
<!--                <img v-if="imageUrl" :src="imageUrl" class="avatar">-->
                <span v-if="annex.fileName">{{ annex.fileName }}</span>
                <!--                <img v-if="imageUrl" :src="imageUrl" class="avatar">-->
                <i v-else class="el-icon-upload avatar-uploader-icon"></i>
              </el-upload>
            </el-form-item>
@@ -463,7 +455,8 @@
        <el-row>
          <el-col :span="16">
            <el-form-item label="工作经历" prop="idNumber">
              <el-input type="textarea" v-model="annex2.workExperience" clearable size="small" style="width: 100%;"></el-input>
              <el-input type="textarea" v-model="annex2.workExperience" clearable size="small"
                style="width: 100%;"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
@@ -549,23 +542,23 @@
          label: '证件号',
          prop: 'idNumber',
          minWidth: '150px'
        },{
        }, {
          label: '发证单位',
          prop: 'issueUnit',
          minWidth: '150px'
        },{
        }, {
          label: '文件名称',
          prop: 'fileName',
          minWidth: '200px'
        },{
        }, {
          label: '级别',
          prop: 'level',
          minWidth: '150px'
        },{
        }, {
          label: '有效期',
          prop: 'periodValidity',
          minWidth: '150px'
        },{
        }, {
          label: '添加时间',
          prop: 'createTime',
          minWidth: '150px'
@@ -587,7 +580,7 @@
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.annexAdd(1,row)
                this.annexAdd(1, row)
              }
            },
            {
@@ -680,7 +673,7 @@
      isSave: false,
    }
  },
  components: {limsTable, fileDownload},
  components: { limsTable, fileDownload },
  created() {
    this.init()
    this.searchTableList()
@@ -696,11 +689,11 @@
  },
  methods: {
    // 下载档案
    downPerson(){
      exportPersonBasicInfoById({id: this.clickNodeVal.userId}).then(res => {
        const blob = new Blob([res],{ type: 'application/msword' });
    downPerson() {
      console.log('this.clickNodeVal.userId',this.clickNodeVal.userId)
      exportPersonBasicInfoById({ id: this.clickNodeVal.userId }).then(res => {
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '人员档案.docx');
        this.$message.success('导出成功')
      })
    },
    // 上传验证
@@ -715,11 +708,11 @@
        return Promise.reject(flag); //正确的终止
      }
    },
    onError(err, file, fileList,type) {
    onError(err, file, fileList, type) {
      this.$message.error('上传失败')
      this.$refs.upload.clearFiles()
    },
    handleSuccessUp(response, ) {
    handleSuccessUp(response,) {
      this.upLoading = false;
      if (response.code == 200) {
        this.$message.success('上传成功');
@@ -729,9 +722,9 @@
      }
    },
    // 查询附件列表
    searchTableList () {
    searchTableList() {
      this.tableLoading = true
      getBasicInfoFileList({userId: this.clickNodeVal.userId}).then(res => {
      getBasicInfoFileList({ userId: this.clickNodeVal.userId }).then(res => {
        this.tableLoading = false
        this.tableData = res.data
      }).catch(err => {
@@ -740,13 +733,13 @@
      })
    },
    // 下载
    upload (row) {
    upload(row) {
      let url = '';
      if(row.type==1){
        url = this.javaApi+'/img/'+row.fileUrl
        fileDownload.downloadIamge(url,row.fileName)
      }else{
        url = this.javaApi+'/word/'+row.fileUrl
      if (row.type == 1) {
        url = this.javaApi + '/img/' + row.fileUrl
        fileDownload.downloadIamge(url, row.fileName)
      } else {
        url = this.javaApi + '/word/' + row.fileUrl
        const link = document.createElement('a');
        link.href = url;
        link.download = row.fileName;
@@ -754,14 +747,14 @@
      }
    },
    // 删除
    delete (row) {
    delete(row) {
      this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading = true
        delBasicInfoFileList({basicInfoFileId: row.basicInfoFileId}).then(res => {
        delBasicInfoFileList({ basicInfoFileId: row.basicInfoFileId }).then(res => {
          this.tableLoading = false
          this.$message.success('删除成功')
          this.searchTableList();
@@ -776,7 +769,7 @@
      })
    },
    // 打开工作经历探况
    annexAdd1 (type, row) {
    annexAdd1(type, row) {
      this.operationType = type
      if (type === 'edit') {
        this.basicInfoWorkId = row.basicInfoWorkId
@@ -788,7 +781,7 @@
      this.dialogVisible2 = true
    },
    // 提交工作经历
    submitForm2 () {
    submitForm2() {
      const params = {
        workExperience: this.annex2.workExperience,
        userId: this.clickNodeVal.userId,
@@ -818,19 +811,19 @@
      }
    },
    // 关闭工作经历弹框
    handleClose2 () {
    handleClose2() {
      this.dialogVisible2 = false
      this.annex2.workExperience = ''
    },
    // 删除工作经历
    deleteAnnex1 (row) {
    deleteAnnex1(row) {
      this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading1 = true
        delBasicInfoWorkList({basicInfoWorkId: row.basicInfoWorkId}).then(res => {
        delBasicInfoWorkList({ basicInfoWorkId: row.basicInfoWorkId }).then(res => {
          this.tableLoading1 = false
          this.$message.success('删除成功')
          this.searchTableList2();
@@ -845,9 +838,9 @@
      });
    },
    // 查询工作经历列表
    searchTableList2 () {
    searchTableList2() {
      this.tableLoading1 = true
      getBasicInfoWorkList({userId: this.clickNodeVal.userId}).then(res => {
      getBasicInfoWorkList({ userId: this.clickNodeVal.userId }).then(res => {
        this.tableLoading1 = false
        this.tableData1 = res.data
      }).catch(err => {
@@ -855,15 +848,15 @@
        console.log('err---', err);
      })
    },
    annexAdd(type,row) {
      if(type === 1) {
    annexAdd(type, row) {
      if (type === 1) {
        this.title = '编辑附件资料'
        this.addOrupdate = 1
        getAnnex({id: row.id}).then(res => {
        getAnnex({ id: row.id }).then(res => {
          this.annex = res.data
          this.imageUrl = this.javaApi + '/img/' + res.data.fileName
        })
      }else {
      } else {
        this.title = '新增附件资料'
        this.addOrupdate = 2
      }
@@ -879,16 +872,18 @@
      })
    },
    addAnnex() {
      if(this.annex.fileName == "" || this.annex.fileName == null || this.annex.fileName == undefined) {
      if (this.annex.fileName == "" || this.annex.fileName == null || this.annex.fileName == undefined) {
        this.$message.error("请上传文件")
        return
      }
      this.annex.userId = this.clickNodeVal.userId
      if(this.addOrupdate === 1) {
      if (this.addOrupdate === 1) {
        updateAnnex(this.annex).then(res => {
          if(res.code == 200) {
            getAnnexByUserId({userId: this.clickNodeVal.userId}).then(res => {
          if (res.code == 200) {
            getAnnexByUserId({ userId: this.clickNodeVal.userId }).then(res => {
              this.imageUrl = ''
              this.$refs.fileName.clearFiles()
              this.annex.fileName = ''
              this.resetForm('annex')
              this.annexList = res.data
              this.dialogVisible1 = false
@@ -896,12 +891,14 @@
            })
          }
        })
      }else {
      } else {
        this.annex.id = null
        addAnnex(this.annex).then(res => {
          if(res.code == 200) {
            getAnnexByUserId({userId: this.clickNodeVal.userId}).then(res => {
          if (res.code == 200) {
            getAnnexByUserId({ userId: this.clickNodeVal.userId }).then(res => {
              this.imageUrl = ''
              this.$refs.fileName.clearFiles()
              this.annex.fileName = ''
              this.resetForm('annex')
              this.annexList = res.data
              this.dialogVisible1 = false
@@ -917,7 +914,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteAnnex({id: row.id}).then(res => {
        deleteAnnex({ id: row.id }).then(res => {
          this.$message.success('删除成功!')
          this.annexList = this.annexList.filter(item => item.id != row.id)
        })
@@ -949,7 +946,7 @@
      }
    },
    async onSuccess(response, file, fileList, entityVal) {
      if(entityVal == 'fileName') {
      if (entityVal == 'fileName') {
        this.annex.fileName = response.data
      }
      // 在保存赋值新文件
@@ -967,7 +964,7 @@
      }
    },
    getUserBasisInfo(userId) {
      getCNASPersonnelInfo({userId: userId}).then(res => {
      getCNASPersonnelInfo({ userId: userId }).then(res => {
        this.form = res.data.PersonBasicInfoDto
        this.department = res.data.department
        this.annexList = res.data.annexList
@@ -977,10 +974,10 @@
    async save() {
      this.saveLoading = true
      this.form.userId = this.clickNodeVal.userId
      if(Array.isArray(this.form.departLimsId)) {
        if(this.form.departLimsId.length > 0) {
      if (Array.isArray(this.form.departLimsId)) {
        if (this.form.departLimsId.length > 0) {
          this.form.departLimsId = this.form.departLimsId.join(',').trim() + ','
        }else {
        } else {
          this.form.departLimsId = ''
        }
      }
@@ -999,10 +996,10 @@
    },
    clickPersonnelClassificationSure() {
      this.dialogVisible = false
      this.form.personnelClassification = this.checkList.filter(m=>m).join(',')
      this.form.personnelClassification = this.checkList.filter(m => m).join(',')
    },
    async deleteFile(fileName, entityVal) {
      await deleteCNASFile({fileName: fileName}).then(res => {
      await deleteCNASFile({ fileName: fileName }).then(res => {
        this.$message.success('删除成功!')
        this.$set(this.form, entityVal, null)
        let index = this.successFileList.indexOf(fileName)
@@ -1012,9 +1009,11 @@
      })
    },
    cancellation() {
      this.dialogVisible1 = false
      this.imageUrl = ''
      this.resetForm('annex')
      this.$refs.fileName.clearFiles()
      this.annex.fileName = ''
      this.imageUrl = ''
      this.dialogVisible1 = false
    },
    handleClose(done) {
      this.imageUrl = ''
@@ -1033,7 +1032,7 @@
    resetForm(formName) {
      this.$refs[formName].resetFields();
    },
    getAge (val) {
    getAge(val) {
      this.form.age = this.calculateAge(val)
    },
    calculateAge(birthDateString) {
@@ -1076,40 +1075,38 @@
</script>
<style scoped>
>>>.el-table__body-wrapper::-webkit-scrollbar {
  height: 12px;
  /* 设置滚动条宽度 */
}
>>>.el-form-item {
    margin-bottom: 3px;
  margin-bottom: 3px;
}
.el-input {
    border-radius: 15px;
  border-radius: 15px;
}
.el-icon-picture-outline {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.uploadFile {
    margin-top: 2px;
    float: left;
  margin-top: 2px;
  float: left;
}
  .avatar-uploader-icon {
    font-size: 28px;
    color: #0f8bf1;
    width: 178px;
    height: 50px;
    text-align: center;
    border: 1px solid #d9d9d9;
  }
  .avatar {
    width: 178px;
    height: 178px;
    display: block;
  }
.avatar-uploader-icon {
  font-size: 28px;
  color: #0f8bf1;
  width: 178px;
  height: 50px;
  text-align: center;
  border: 1px solid #d9d9d9;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
</style>