luoyb
2021-02-04 49e0f2751e7950085cc6e13fbbf8817c187ca459
feat(信息录入): 提交和翻页

1.完成所有录入信息列表的翻页功能
2.完成所有录入信息列表提交功能

BREAKING CHANGE:
BREAKING
CHANGE:
BREAKING
CHANGE:
BREAKING
CHANGE:
https://www.teambition.com/task/6014db9870005800443d7994
1个文件已修改
336 ■■■■ 已修改文件
src/views/user/Informationinput.vue 336 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/Informationinput.vue
@@ -1925,7 +1925,7 @@
      queryParams: {}, // 查询参数
      sort: {}, // 排序
      pagination: { // 分页参数
        size: 5,
        size: 20,
        num: 1
      },
      tableUrl: '',
@@ -2519,18 +2519,6 @@
    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: {
    // 翻页插件翻页方法
@@ -2581,6 +2569,78 @@
          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() {
@@ -2599,9 +2659,10 @@
      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) => {
@@ -2617,8 +2678,7 @@
          }
          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) => {
@@ -2634,8 +2694,7 @@
          }
          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) => {
@@ -2651,8 +2710,7 @@
          }
          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) => {
@@ -2668,8 +2726,7 @@
          }
          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) => {
@@ -2685,8 +2742,7 @@
          }
          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) => {
@@ -2702,8 +2758,7 @@
          }
          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) => {
@@ -2719,8 +2774,7 @@
          }
          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) => {
@@ -2736,8 +2790,7 @@
          }
          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) => {
@@ -2753,8 +2806,7 @@
          }
          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) => {
@@ -2770,8 +2822,7 @@
          }
          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) => {
@@ -2787,8 +2838,7 @@
          }
          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) => {
@@ -2804,8 +2854,7 @@
          }
          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) => {
@@ -2821,8 +2870,7 @@
          }
          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) => {
@@ -2861,6 +2909,214 @@
            })
          }
          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() {