yubo
2026-03-10 757c9e97c980118cabb5a2a08c4fd35bbbcaa062
src/views/remind/probation.vue
@@ -117,16 +117,24 @@
        <el-button @click="dialogIsShow()">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 通用导出对话框 -->
    <export-dialog
      :visible.sync="exportDialogVisible"
      :selected-fields="exportConfig.selectedFields"
      @confirm="handleExportConfirm"
    />
  </div>
</template>
<script>
import Pagination from '@/components/Pagination'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { dateDifference } from '@/utils/myUtil'
import ExportDialog from '@/components/ExportEmpBase.vue'
export default {
  components: {
    Pagination
    Pagination,
    ExportDialog
  },
  data() {
    return {
@@ -175,6 +183,24 @@
      contractRules: {
        empName: [{ required: true, message: '请选择员工', trigger: 'change' }],
        probationDate: [{ required: true, message: '请选择日期', trigger: 'change' }]
      },
      exportDialogVisible: false,
      exportConfig: {
        selectedFields: [
          'empNumb', // 员工编号
          'allDeptName', // 部门 (护卫点)
          'jobName', // 岗位
          'empName', // 姓名
          'certificateNumb', // 身份证号码
          'birthdate', // 出生日期
          'insuranceTypeName', // 社保档位
          'socialNumb', // 社保电脑号
          'entryDate', // 入职日期
          'probationDate', // 转正日期
          'probationStatusName' // 转正状态
        ],
        exportUrl: 'hr/empBaseInfo/export/probation', // 需要后端提供接口
        fileName: '员工转正提醒.xls'
      }
    }
  },
@@ -340,6 +366,27 @@
          })
        }
      })
    },
    // 显示导出对话框
    showDcyg() {
      this.exportDialogVisible = true
    },
    // 确认导出
    handleExportConfirm(selectedFields) {
      const params = { ...this.queryParams }
      params.empStatus = '0'
      params.exportField = selectedFields.join(',')
      this.$download(
        this.exportConfig.exportUrl,
        { ...params },
        this.exportConfig.fileName
      ).then(() => {
        this.$message({
          message: '下载成功!',
          type: 'success'
        })
      })
    }
  }
}