..
孔祥富
2021-03-08 47801ad8c56d9f7d24eefa4cedd6a13bb96972cc
..
1个文件已添加
5个文件已修改
273 ■■■■■ 已修改文件
src/views/dashboard/ctUser.vue 209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dashboard/index.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dashboard/ygUser.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/febs/system/user/Edit.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/archivesEdit.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/inemployees.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dashboard/ctUser.vue
New file
@@ -0,0 +1,209 @@
<template>
  <el-dialog
    :title="title"
    top="50px"
    width="70%"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :visible.sync="isVisible"
    :before-close="beforeClose"
  >
    <div class="app-container">
      <div class="filter-container" style="margin-left: -340px;">
        <el-input v-model="queryParams.name" placeholder="姓名/身份证号/护卫点/员工编号" class="filter-item search-item" />
        <el-button class="filter-item" type="primary" @click="search">
          {{ $t('table.search') }}
        </el-button>
        <el-button class="filter-item" type="success" @click="reset">
          {{ $t('table.reset') }}
        </el-button>
      </div>
      <el-table
        ref="multipleTable"
        :data="list"
        row-key="prop1"
        stripe
        :header-cell-style="{'height':'5.3vh','background-color':'#e6e6e6'}"
        style="width: 100%;"
      >
        <el-table-column show-overflow-tooltip type="selection" :reserve-selection="false" width="55" />
        <el-table-column show-overflow-tooltip prop="empNumb" label="员工编号" width="80 " />
        <el-table-column show-overflow-tooltip prop="deptName" label="护卫点" width="60" />
        <el-table-column show-overflow-tooltip prop="jobName" label="岗位" width="60" />
        <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="60" />
        <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" />
        <el-table-column show-overflow-tooltip prop="sex" :formatter="sexFormat" label="性别" width="50" />
        <el-table-column show-overflow-tooltip prop="age" label="年龄" width="50" />
        <el-table-column show-overflow-tooltip prop="education" :formatter="educationFormat" label="最高学历" width="60" />
        <el-table-column show-overflow-tooltip prop="empType" :formatter="empTypeFormat" label="员工类别" width="60" />
        <el-table-column show-overflow-tooltip prop="nativePlace" :formatter="nativePlaceFormat" label="籍贯" width="60" />
        <el-table-column show-overflow-tooltip prop="telePhone" label="联系电话" width="80" />
        <el-table-column show-overflow-tooltip prop="entryDate" label="入职日期" width="80" />
        <el-table-column show-overflow-tooltip prop="empStatus" label="员工状态" width="50">
          <template slot-scope="scope">
            <span>{{ gzdStateList[scope.row.empStatus] }}&nbsp;</span>
          </template>
        </el-table-column>
        <el-table-column show-overflow-tooltip prop="dimissionDate" label="离职日期" width="80" />
        <el-table-column show-overflow-tooltip prop="dimissionTypeName" label="离职类别" width="60" />
        <el-table-column show-overflow-tooltip prop="applayDate" label="辞职申请日期" />
        <el-table-column show-overflow-tooltip prop="reason" label="辞职事由" width="60" />
        <el-table-column show-overflow-tooltip prop="reporter" label="汇报人" width="60" />
      </el-table>
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="pagination.num"
        :limit.sync="pagination.size"
        @pagination="search"
      />
      <el-button type="danger" @click="cancleChoose">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
// 引用翻页组件
import Pagination from '@/components/Pagination'
export default {
  components: {
    Pagination
  },
  props: {
    dialogVisible: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: ''
    },
    multipleselect: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      gzdStateList: {
        0: '在职',
        1: '离职',
        2: '退休'
      },
      show: false,
      headerHeight: '70px',
      deptTree: [],
      selection: [],
      multipleSelection: [],
      total: 0, // 总数量
      queryParams: {
        name: null,
        btime: null,
        etime: null,
        index: null,
        number: null
      }, // 查询参数
      sort: {}, // 排序
      pagination: { // 分页参数
        size: 5,
        num: 1
      },
      list: [], // 给table显示的数据
      defaultProps: {
        children: 'children',
        label: 'label'
      },
      educationOptions: [],
      nativePlaceOptions: [],
      sexOptions: [],
      empTypeOptions: [],
      nationOptions: []
    }
  },
  computed: {
    isVisible: {
      get() {
        return this.dialogVisible
      }
    }
  },
  mounted() {
    this.getDicts('EDUCATION').then(response => {
      this.educationOptions = response.data
    })
    this.getDicts('NATIVEPLACE').then(response => {
      this.nativePlaceOptions = response.data
    })
    this.getDicts('sex').then(response => {
      this.sexOptions = response.data
    })
    this.getDicts('empType').then(response => {
      this.empTypeOptions = response.data
    })
    this.getDicts('NATION').then(response => {
      this.nationOptions = response.data
    })
  },
  methods: {
    educationFormat(row, column) {
      return this.selectDictLabel(this.educationOptions, row.education)
    },
    nativePlaceFormat(row, column) {
      return this.selectDictLabel(this.nativePlaceOptions, row.nativePlace)
    },
    empTypeFormat(row, column) {
      return this.selectDictLabel(this.empTypeOptions, row.empType)
    },
    sexFormat(row, column) {
      return this.selectDictLabel(this.sexOptions, row.sex)
    },
    nationFormat(row, column) {
      return this.selectDictLabel(this.nationOptions, row.nation)
    },
    beforeClose(done) {
      this.$emit('cancleChooseUser')
    },
    search() {
      this.fetch({
        ...this.queryParams
      })
    },
    reset() {
      this.queryParams.name = null
      this.search()
    },
    // 翻页方法
    setjobUser(btime, etime, index, number) {
      this.queryParams.btime = btime
      this.queryParams.etime = etime
      this.queryParams.index = index
      this.queryParams.number = number
      this.queryParams.name = null
      this.search()
    },
    fetch(params = {}) {
      var that = this
      params.pageSize = this.pagination.size
      params.pageNum = this.pagination.num
      this.$get('hr/statistics/empBaseInfoList', {
        ...params
      }).then((r) => {
        const data = r.data.data
        that.total = data.total
        that.list = data.rows
      })
    },
    cancleChoose() {
      this.$emit('cancleChooseUser')
    }
  }
}
</script>
<style lang="scss" scoped>
  .link_button {
    color: #169BD5;
  }
  .del_button {
    color: #D9001B;
  }
</style>
src/views/dashboard/index.vue
@@ -74,7 +74,7 @@
        </el-card>
      </el-col>
      <el-col>
        <el-card shadow="always" class="card-info" @click.native="showXzyg('辞职申请人数','7')">
        <el-card shadow="always" class="card-info" @click.native="showCtyg('辞职申请人数','7')">
          <p class="card-number">{{ total.czyg }}</p>
          <p>辞职申请人数</p>
        </el-card>
@@ -243,6 +243,7 @@
    <qj-user ref="qjUser" :dialog-visible="dialog.dialogShowqj" :title="title" @cancleChooseUser="cancleqjUser" />
    <yg-user ref="ygUser" :dialog-visible="dialog.dialogShowyg" :title="title" @cancleChooseUser="cancleygUser" />
    <sfz-user ref="sfzUser" :dialog-visible="dialog.dialogShowSfz" :title="title" @cancleChooseUser="cancleSfzUser" />
    <ct-user ref="ygUser" :dialog-visible="dialog.dialogShowct" :title="title" @cancleChooseUser="canclectUser" />
  </div>
</template>
<script>
@@ -259,9 +260,10 @@
import LzUser from './lzUser'
import QjUser from './qjUser'
import YgUser from './ygUser'
import CtUser from './ctUser'
import SfzUser from './sfzUser'
export default {
  components: { SfzUser, YgUser, QjUser, LzUser, GsUser, YwUser, SbUser, YjUser, TjUser, TgUser, BlUser, CqUser, HtUser, OnTheJobUser },
  components: { SfzUser, YgUser, QjUser, LzUser, GsUser, YwUser, SbUser, YjUser, TjUser, TgUser, BlUser, CqUser, HtUser, OnTheJobUser, CtUser },
  data() {
    return {
      dialog: {
@@ -275,6 +277,7 @@
        dialogShowsb: false,
        dialogShowyw: false,
        dialogShowgs: false,
        dialogShowct: false,
        dialogShowlz: false,
        dialogShowqj: false,
        dialogShowCq: false,
@@ -474,6 +477,15 @@
        this.dialog.isVisible = true
      }
    },
    showCtyg(title, number) {
      this.title = title
      const values = this.value2
      const btime = values[0]
      const etime = values[1]
      const index = this.selectIndex
      this.$refs.ygUser.setjobUser(btime, etime, index, number)
      this.dialog.dialogShowyg = true
    },
    cancleChooseUser() {
      this.dialog.isVisible = false
    },
@@ -513,6 +525,9 @@
    cancleygUser() {
      this.dialog.dialogShowyg = false
    },
    canclectUser() {
      this.dialog.dialogShowct = false
    },
    cancleSfzUser() {
      this.dialog.dialogShowSfz = false
    },
src/views/dashboard/ygUser.vue
@@ -46,9 +46,6 @@
        </el-table-column>
        <el-table-column show-overflow-tooltip prop="dimissionDate" label="离职日期" width="80" />
        <el-table-column show-overflow-tooltip prop="dimissionTypeName" label="离职类别" width="60" />
        <el-table-column show-overflow-tooltip prop="applayDate" label="辞职申请日期" />
        <el-table-column show-overflow-tooltip prop="reason" label="辞职事由" width="60" />
        <el-table-column show-overflow-tooltip prop="reporter" label="汇报人" width="60" />
      </el-table>
      <pagination
        v-show="total>0"
src/views/febs/system/user/Edit.vue
@@ -180,6 +180,8 @@
      for (let i = 0; i < this.baseinfo.length; i++) {
        if (this.baseinfo[i].certificateNumb === data) {
          this.user.nickName = this.baseinfo[i].empName
          this.user.deptId = this.baseinfo[i].deptId
          this.user.mobile = this.baseinfo[i].telePhone
        }
      }
    },
src/views/user/archivesEdit.vue
@@ -4160,13 +4160,23 @@
      })
    },
    ExportSavePdf(params = {}) {
      params.pageSize = this.pagination.size
      params.pageNum = this.pagination.num
      params.empNumb = this.empBaseInfoForm.empNumb
      this.$download('hr/pdf/contract', {
        ...params
      }, `${this.empBaseInfoForm.empName}.pdf`)
      this.$confirm('是否确定要导出档案,请耐心等待?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        params.pageSize = this.pagination.size
        params.pageNum = this.pagination.num
        params.empNumb = this.empBaseInfoForm.empNumb
        this.$download('hr/pdf/contract', {
          ...params
        }, `${this.empBaseInfoForm.empName}.pdf`)
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消'
        })
      })
    },
    initleaveInfoData(params = {}) {
      params.pageSize = this.pagination.size
src/views/user/inemployees.vue
@@ -181,7 +181,6 @@
            <el-button type="danger" class="hr-but-all" @click="showYgdg(0)">员工调岗</el-button>
            <!-- <el-button type="danger" class="hr-but-all" @click="showDryg(0)">导入员工</el-button> -->
            <el-button type="danger" class="hr-but-all" @click="exportExcel()">导出员工</el-button>
            <el-button type="danger" class="hr-but-all" @click="doDcda">导出档案</el-button>
            <el-button type="primary" style="background-color: #409EFF" @click="showGbda(0)">关闭档案</el-button>
          </el-col>
        </el-row>
@@ -1826,14 +1825,21 @@
      }
    },
    doDcda() {
      this.$confirm('是否确定要导出档案?', '提示', {
      this.$confirm('是否确定要导出档案,请耐心等待?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$message({
          type: 'success',
          message: '导出成功!'
        var params = this.queryParams
        this.$post('hr/pdf/exportWithField', {
          ...params
        }).then((r) => {
          const data = r.data.data
          for (let i = 0; i < data.length; i++) {
            this.$download('hr/pdf/contract', {
              empNumb: data[i].empNumb
            }, `${data[i].empName}.pdf`)
          }
        })
      }).catch(() => {
        this.$message({