luoyb
2021-03-17 fa855a79a71e83de4eab26779fb29e6c6f0c52a2
src/views/user/Informationinput.vue
@@ -3,53 +3,53 @@
    <el-container>
      <el-aside width="175px">
        <el-timeline style="padding-left: 15px">
          <el-timeline-item @click.native="isShow(showArr[0].show, 0)">
          <el-timeline-item v-show="timelineShow('empBaseinfo:list')" @click.native="isShow(showArr[0].show, 0)">
            <span :class="thisShowIndex===0?'selectedTimeline':''">基本信息</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[1].show, 1)">
          <el-timeline-item v-show="timelineShow('empWorkexperience:list')" @click.native="isShow(showArr[1].show, 1)">
            <span :class="thisShowIndex===1?'selectedTimeline':''">工作经历</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[2].show, 2)">
          <el-timeline-item v-show="timelineShow('empPhysicalexam:list')" @click.native="isShow(showArr[2].show, 2)">
            <span :class="thisShowIndex===2?'selectedTimeline':''">体检信息</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[3].show, 3)">
          <el-timeline-item v-show="timelineShow('empContractinfo:list')" @click.native="isShow(showArr[3].show, 3)">
            <span :class="thisShowIndex===3?'selectedTimeline':''">合同信息</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[4].show, 4)">
          <el-timeline-item v-show="timelineShow('empDimissionattend:list')" @click.native="isShow(showArr[4].show, 4)">
            <span :class="thisShowIndex===4?'selectedTimeline':''">离职当月考勤</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[5].show, 5)">
          <el-timeline-item v-show="timelineShow('empLeaveinfo:list')" @click.native="isShow(showArr[5].show, 5)">
            <span :class="thisShowIndex===5?'selectedTimeline':''">请假记录</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[6].show, 6)">
          <el-timeline-item v-show="timelineShow('empResign:list')" @click.native="isShow(showArr[6].show, 6)">
            <span :class="thisShowIndex===6?'selectedTimeline':''">辞职申请</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[7].show, 7)">
          <el-timeline-item v-show="timelineShow('empUnemployment:list')" @click.native="isShow(showArr[7].show, 7)">
            <span :class="thisShowIndex===7?'selectedTimeline':''">失业金领取</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[8].show, 8)">
          <el-timeline-item v-show="timelineShow('empInsurance:list')" @click.native="isShow(showArr[8].show, 8)">
            <span :class="thisShowIndex===8?'selectedTimeline':''">社保申请</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[9].show, 9)">
          <el-timeline-item v-show="timelineShow('empAccidentcases:list')" @click.native="isShow(showArr[9].show, 9)">
            <span :class="thisShowIndex===9?'selectedTimeline':''">意外险案件</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[10].show, 10)">
          <el-timeline-item v-show="timelineShow('empOccupational:list')" @click.native="isShow(showArr[10].show, 10)">
            <span :class="thisShowIndex===10?'selectedTimeline':''">工伤案件</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[11].show, 11)">
          <el-timeline-item v-show="timelineShow('empLabortrouble:list')" @click.native="isShow(showArr[11].show, 11)">
            <span :class="thisShowIndex===11?'selectedTimeline':''">劳资案件</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[12].show, 12)">
          <el-timeline-item v-show="timelineShow('empBadrecord:list')" @click.native="isShow(showArr[12].show, 12)">
            <span :class="thisShowIndex===12?'selectedTimeline':''">不良记录</span>
          </el-timeline-item>
          <el-timeline-item @click.native="isShow(showArr[13].show, 13)">
          <el-timeline-item v-show="timelineShow('empRemarkinfo:list')" @click.native="isShow(showArr[13].show, 13)">
            <span :class="thisShowIndex===13?'selectedTimeline':''">备注信息</span>
          </el-timeline-item>
        </el-timeline>
      </el-aside>
      <el-main>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-button class="commonBtn" @click.native="dialogIsShow('0')">新增</el-button>
            <el-button class="commonBtn" style="background-color: #409EFF" @click.native="butDelete()">删除</el-button>
            <el-button class="commonBtn" style="float: right" @click.native="showDryg(0)">导入员工信息</el-button>
@@ -625,7 +625,7 @@
          :limit.sync="pagination.size"
          @pagination="search"
        />
        <el-col :span="24">
        <el-col>
          <div style="width: 250px;margin: 20px auto 0;">
            <el-button class="nomalBtn" @click="deleteFrom()">取消</el-button>
            <el-button class="commonBtn" @click="submitTo()">提交</el-button>
@@ -650,7 +650,6 @@
                :headers="headers()"
                :on-success="importHandleAvatarSuccess"
                :on-error="importHandleAvatarError"
                :file-list="fileList"
                :auto-upload="false"
              >
                <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
@@ -907,9 +906,9 @@
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
              <el-col>
                <el-form-item label="相关证件" prop="certificateList">
                  <el-select v-model="empBaseInfoForm.certificateList" placeholder="请选择相关证件">
                  <el-select v-model="empBaseInfoForm.certificateList" multiple placeholder="请选择相关证件">
                    <el-option
                      v-for="dict in certificateListOptions"
                      :key="dict.dicItemCode"
@@ -965,7 +964,7 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="工作单位" prop="workUnit">
              <el-input v-model="workExperienceForm.workUnit" />
            </el-form-item>
@@ -994,7 +993,7 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="主要工作内容" prop="jobContent">
              <el-input v-model="workExperienceForm.jobContent" type="textarea" />
            </el-form-item>
@@ -1087,7 +1086,7 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="体检结论" prop="conclusion">
              <el-input v-model="physicalExamForm.conclusion" />
            </el-form-item>
@@ -1102,7 +1101,7 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注" prop="remark">
              <el-input v-model="physicalExamForm.remark" type="textarea" />
            </el-form-item>
@@ -1190,7 +1189,7 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注" prop="remark">
              <el-input v-model="contractInfoForm.remark" type="textarea" />
            </el-form-item>
@@ -1271,7 +1270,7 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注" prop="remark">
              <el-input v-model="dimissionAttendForm.remark" type="textarea" />
            </el-form-item>
@@ -1367,7 +1366,7 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注">
              <el-input v-model="leaveInfoForm.remark" type="textarea" />
            </el-form-item>
@@ -1420,14 +1419,14 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="辞职事由" prop="reason">
              <el-input v-model="resignForm.reason" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注">
              <el-input v-model="resignForm.remark" type="textarea" />
            </el-form-item>
@@ -1493,7 +1492,7 @@
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注">
              <el-input v-model="unemploymentForm.remark" type="textarea" />
            </el-form-item>
@@ -1585,7 +1584,7 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注">
              <el-input v-model="insuranceForm.remark" type="textarea" />
            </el-form-item>
@@ -1651,7 +1650,7 @@
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="受伤经过描述" prop="injuredDescribe">
              <el-input v-model="accidentCasesForm.injuredDescribe" type="textarea" />
            </el-form-item>
@@ -1798,7 +1797,7 @@
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="受伤经过描述" prop="injuredDescribe">
              <el-input v-model="occupationalForm.injuredDescribe" type="textarea" />
            </el-form-item>
@@ -1923,7 +1922,7 @@
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注">
              <el-input v-model="occupationalForm.remark" type="textarea" />
            </el-form-item>
@@ -2017,14 +2016,14 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="仲裁事由" prop="arbitrationReason">
              <el-input v-model="laborTroubleForm.arbitrationReason" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注" prop="remark">
              <el-input v-model="laborTroubleForm.remark" type="textarea" />
            </el-form-item>
@@ -2083,14 +2082,14 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="不良记录描述" prop="badContent">
              <el-input v-model="badRecordForm.badContent" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注">
              <el-input v-model="badRecordForm.remark" type="textarea" />
            </el-form-item>
@@ -2146,7 +2145,7 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
          <el-col>
            <el-form-item label="备注" prop="remarkContent">
              <el-input v-model="remarkInfoForm.remarkContent" type="textarea" />
            </el-form-item>
@@ -2972,7 +2971,7 @@
        empId: '',
        customerId: '',
        archivesNumb: '',
        deptId: '',
        deptId: null,
        deptName: '',
        allDeptName: '',
        empNumb: '',
@@ -3068,10 +3067,12 @@
      arbitrationTypeOptions: [],
      changeTypeOptions: [],
      dimissionTypeOptions: [],
      sexOptions: []
      sexOptions: [],
      permissions: {}
    }
  },
  mounted() {
    this.permissions = JSON.parse(localStorage.getItem('PERMISSIONS'))
    this.getDicts('PLITICAL').then(response => {
      this.statusOptions = response.data
    })
@@ -3150,6 +3151,14 @@
    this.initJob()
  },
  methods: {
    timelineShow(name) {
      for (const v of this.permissions) {
        if (v === name) {
          return true
        }
      }
      return false
    },
    importHandleAvatarError() {
      this.$notify.error({
        title: '错误',
@@ -4234,7 +4243,7 @@
      this.empBaseInfoForm.empId = ''
      this.empBaseInfoForm.customerId = ''
      this.empBaseInfoForm.archivesNumb = ''
      this.empBaseInfoForm.deptId = ''
      this.empBaseInfoForm.deptId = null
      this.empBaseInfoForm.deptName = ''
      this.empBaseInfoForm.allDeptName = ''
      this.empBaseInfoForm.empNumb = ''
@@ -4284,6 +4293,11 @@
    },
    editEmpBase(row) {
      this.isAdd = false
      let certificateList = []
      if (row.certificateList && typeof row.certificateList === 'string') {
        certificateList = row.certificateList.split(',')
        row.certificateList = certificateList
      }
      this.empBaseInfoForm.empId = row.empId
      this.empBaseInfoForm.customerId = row.customerId
      this.empBaseInfoForm.archivesNumb = row.archivesNumb
@@ -4379,6 +4393,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    selectWorkExperience() {
      this.tableUrl = 'hr/empWorkExperience/list'
@@ -4432,6 +4449,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanWorkExperience() {
      this.workExperienceForm.empId = ''
@@ -4531,6 +4551,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanPhysicalExam() {
      this.physicalExamForm.empId = ''
@@ -4635,6 +4658,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanContractInfo() {
      this.contractInfoForm.empId = ''
@@ -4743,6 +4769,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanDimissionAttend() {
      this.dimissionAttendForm.empId = ''
@@ -4849,6 +4878,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanLeaveInfo() {
      this.leaveInfoForm.empId = ''
@@ -4957,6 +4989,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanResign() {
      this.resignForm.empId = ''
@@ -5059,6 +5094,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanUnemployment() {
      this.unemploymentForm.empId = ''
@@ -5163,6 +5201,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanInsurance() {
      this.insuranceForm.empId = ''
@@ -5270,6 +5311,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanAccidentCases() {
      this.accidentCasesForm.empId = ''
@@ -5402,6 +5446,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanOccupational() {
      this.occupationalForm.empId = ''
@@ -5554,6 +5601,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanLaborTrouble() {
      this.laborTroubleForm.empId = ''
@@ -5687,6 +5737,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    editBadRecord(row) {
      this.isAdd = false
@@ -5763,6 +5816,9 @@
          }
        }
      })
      setTimeout(() => {
        this.$refs[formName].clearValidate()
      }, 1500)
    },
    cleanRemarkInfo() {
      this.remarkInfoForm.empId = ''
@@ -5866,6 +5922,7 @@
        this[this.inputForName].certificateNumb = data.certificateNumb
        this[this.inputForName].deptId = data.deptId
        this[this.inputForName].deptName = data.deptName
        this[this.inputForName].allDeptName = data.allDeptName
        this[this.inputForName].JobId = data.jobId
        this[this.inputForName].jobName = data.jobName
        this[this.inputForName].sex = data.sex === '1' ? '男' : '女'