| | |
| | | queryParams: {}, // 查询参数 |
| | | sort: {}, // 排序 |
| | | pagination: { // 分页参数 |
| | | size: 5, |
| | | size: 20, |
| | | num: 1 |
| | | }, |
| | | tableUrl: '', |
| | |
| | | this.initDept() |
| | | this.thisShowIndex = 1 |
| | | this.isShow(false, 0) |
| | | // this.selectBadRecord() |
| | | // this.selectEmpBase() |
| | | // this.selectWorkExperience() |
| | | // this.selectPhysicalExam() |
| | | // this.selectContractInfo() |
| | | // this.selectDimissionAttend() |
| | | // this.selectLeaveInfo() |
| | | // this.selectResign() |
| | | // this.selectUnemployment() |
| | | // this.selectAccidentCases() |
| | | // this.selectLaborTrouble() |
| | | // this.selectRemarkInfo() |
| | | }, |
| | | methods: { |
| | | // 翻页插件翻页方法 |
| | |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 2: |
| | | this.tableUrl = 'hr/empPhysicalExam/list' |
| | | this.tableDataName = 'physicalExamData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 3: |
| | | this.tableUrl = 'hr/empContractInfo/list' |
| | | this.tableDataName = 'contractInfoData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 4: |
| | | this.tableUrl = 'hr/empDimissionAttend/list' |
| | | this.tableDataName = 'dimissionAttendData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 5: |
| | | this.tableUrl = 'hr/empLeaveInfo/list' |
| | | this.tableDataName = 'leaveInfoData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 6: |
| | | this.tableUrl = 'hr/empResign/list' |
| | | this.tableDataName = 'resignData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 7: |
| | | this.tableUrl = 'hr/empUnemployment/list' |
| | | this.tableDataName = 'unemploymentData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 8: |
| | | this.tableUrl = 'hr/empInsurance/list' |
| | | this.tableDataName = 'insuranceData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 9: |
| | | this.tableUrl = 'hr/empAccidentCases/list' |
| | | this.tableDataName = 'accidentCasesData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 10: |
| | | this.tableUrl = 'hr/empOccupational/list' |
| | | this.tableDataName = 'occupationalData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 11: |
| | | this.tableUrl = 'hr/empLaborTrouble/list' |
| | | this.tableDataName = 'laborTroubleData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 12: |
| | | this.tableUrl = 'hr/empBadRecord/list' |
| | | this.tableDataName = 'badRecordData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | case 13: |
| | | this.tableUrl = 'hr/empRemarkInfo/list' |
| | | this.tableDataName = 'remarkInfoData' |
| | | this.queryParams.delFlag = 2 |
| | | this.search() |
| | | break |
| | | } |
| | | }, |
| | | initDept() { |
| | |
| | | this.$refs.deptTree.setCheckedKeys([]) |
| | | }, |
| | | butDelete() { |
| | | let selected |
| | | switch (this.thisShowIndex) { |
| | | case 0: |
| | | var selected = this.$refs.empBaseInfoTable.selection |
| | | selected = this.$refs.empBaseInfoTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 1: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.workExperienceTable.selection |
| | | selected = this.$refs.workExperienceTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 2: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.physicalExamTable.selection |
| | | selected = this.$refs.physicalExamTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 3: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.contractInfoTable.selection |
| | | selected = this.$refs.contractInfoTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 4: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.dimissionAttendTable.selection |
| | | selected = this.$refs.dimissionAttendTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 5: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.leaveInfoTable.selection |
| | | selected = this.$refs.leaveInfoTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 6: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.resignTable.selection |
| | | selected = this.$refs.resignTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 7: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.unemploymentTable.selection |
| | | selected = this.$refs.unemploymentTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 8: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.insuranceTable.selection |
| | | selected = this.$refs.insuranceTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 9: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.accidentCasesTable.selection |
| | | selected = this.$refs.accidentCasesTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 10: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.occupationalTable.selection |
| | | selected = this.$refs.occupationalTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 11: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.occupationalTable.selection |
| | | selected = this.$refs.occupationalTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 12: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.badRecordTable.selection |
| | | selected = this.$refs.badRecordTable.selection |
| | | if (selected.length > 0) { |
| | | const badIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | } |
| | | break |
| | | case 13: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.remarkInfoTable.selection |
| | | selected = this.$refs.remarkInfoTable.selection |
| | | if (selected.length > 0) { |
| | | const badIds = [] |
| | | selected.forEach((j) => { |
| | |
| | | }) |
| | | } |
| | | break |
| | | case 1: |
| | | selected = this.$refs.workExperienceTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.workExperienceId) |
| | | }) |
| | | this.$delete(`hr/empWorkExperience/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectWorkExperience() |
| | | }) |
| | | } |
| | | break |
| | | case 2: |
| | | selected = this.$refs.physicalExamTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.physicalExamId) |
| | | }) |
| | | this.$delete(`hr/empPhysicalExam/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectPhysicalExam() |
| | | }) |
| | | } |
| | | break |
| | | case 3: |
| | | selected = this.$refs.contractInfoTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.contractId) |
| | | }) |
| | | this.$delete(`hr/empContractInfo/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectContractInfo() |
| | | }) |
| | | } |
| | | break |
| | | case 4: |
| | | selected = this.$refs.dimissionAttendTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.dimissionAttendId) |
| | | }) |
| | | this.$delete(`hr/empDimissionAttend/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectDimissionAttend() |
| | | }) |
| | | } |
| | | break |
| | | case 5: |
| | | selected = this.$refs.leaveInfoTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.leaveId) |
| | | }) |
| | | this.$delete(`hr/empLeaveInfo/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectLeaveInfo() |
| | | }) |
| | | } |
| | | break |
| | | case 6: |
| | | selected = this.$refs.resignTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.resignId) |
| | | }) |
| | | this.$delete(`hr/empResign/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectResign() |
| | | }) |
| | | } |
| | | break |
| | | case 7: |
| | | selected = this.$refs.unemploymentTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.unemploymentId) |
| | | }) |
| | | this.$delete(`hr/empUnemployment/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectUnemployment() |
| | | }) |
| | | } |
| | | break |
| | | case 8: |
| | | selected = this.$refs.insuranceTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.insuranceId) |
| | | }) |
| | | this.$delete(`hr/empInsurance/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectInsurance() |
| | | }) |
| | | } |
| | | break |
| | | case 9: |
| | | selected = this.$refs.accidentCasesTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.accidentId) |
| | | }) |
| | | this.$delete(`hr/empAccidentCases/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectAccidentCases() |
| | | }) |
| | | } |
| | | break |
| | | case 10: |
| | | selected = this.$refs.occupationalTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.occupationalId) |
| | | }) |
| | | this.$delete(`hr/empOccupational/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectOccupational() |
| | | }) |
| | | } |
| | | break |
| | | case 11: |
| | | selected = this.$refs.occupationalTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.arbitrationId) |
| | | }) |
| | | this.$delete(`hr/empLaborTrouble/toNormal/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectLaborTrouble() |
| | | }) |
| | | } |
| | | break |
| | | case 12: |
| | | selected = this.$refs.badRecordTable.selection |
| | | if (selected.length > 0) { |
| | | const badIds = [] |
| | | selected.forEach((j) => { |
| | | badIds.push(j.badId) |
| | | }) |
| | | this.$delete(`hr/empBadRecord/toNormal/` + badIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectBadRecord() |
| | | }) |
| | | } |
| | | break |
| | | case 13: |
| | | selected = this.$refs.remarkInfoTable.selection |
| | | if (selected.length > 0) { |
| | | const badIds = [] |
| | | selected.forEach((j) => { |
| | | badIds.push(j.remarkId) |
| | | }) |
| | | this.$delete(`hr/empRemarkInfo/toNormal/` + badIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.submitSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectBadRecord() |
| | | }) |
| | | } |
| | | break |
| | | } |
| | | }, |
| | | selectEmpBase() { |