yubo
2026-04-06 6448ec15bfe0b65fb822a662105bceddc23b58d8
src/views/dashboard/tjUser.vue
@@ -2,9 +2,11 @@
  <el-dialog
    :title="title"
    top="50px"
    width="80%"
    :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;">
@@ -20,23 +22,27 @@
        ref="multipleTable"
        :data="list"
        row-key="prop1"
        width="50%"
        stripe
        border
        :cell-style="{padding:'7px 0','text-align':'center'}"
        :header-cell-style="{'height':'5.3vh','background-color':'#e6e6e6','text-align':'center'}"
        style="width: 100%;"
      >
        <el-table-column type="selection" :reserve-selection="false" width="55" />
        <el-table-column prop="empNumb" label="员工编号" width="180" />
        <el-table-column prop="deptName" label="护卫点" width="180" />
        <el-table-column prop="empName" label="员工姓名" width="180" />
        <el-table-column prop="certificateNumb" label="身份证号码" width="180" />
        <el-table-column prop="jobName" label="岗位" width="180" />
        <el-table-column prop="hospital" label="体检医院" width="180" />
        <el-table-column prop="physicalExamDate" label="体检日期" width="180" />
        <el-table-column prop="physicalExamType" label="体检类型" width="180" />
        <el-table-column prop="bloodPressure" label="血压" width="180" />
        <el-table-column prop="transaminase" label="转氨酶" width="180" />
        <el-table-column prop="ecg" label="心电图" width="180" />
        <el-table-column prop="conclusion" label="体检结论" width="180" />
        <el-table-column prop="reviewRecord" label="复查记录" width="180" />
        <el-table-column prop="remark" label="备注" width="180" />
        <el-table-column show-overflow-tooltip type="index" width="55" label="序号" />
        <el-table-column show-overflow-tooltip prop="empNumb" label="编号" width="100" />
        <el-table-column show-overflow-tooltip prop="allDeptName" label="部门(护卫点)" width="300" />
        <el-table-column show-overflow-tooltip prop="empName" label="姓名" width="80" />
        <el-table-column show-overflow-tooltip prop="certificateNumb" label="身份证号码" width="120" />
        <el-table-column show-overflow-tooltip prop="jobName" label="岗位" width="80" />
        <el-table-column show-overflow-tooltip prop="hospital" label="体检医院" width="100" />
        <el-table-column show-overflow-tooltip prop="physicalExamDate" label="体检日期" width="100" />
        <el-table-column show-overflow-tooltip prop="physicalExamType" :formatter="typeFormat" label="体检类型" width="80" />
        <el-table-column show-overflow-tooltip prop="bloodPressure" label="血压" width="60" />
        <el-table-column show-overflow-tooltip prop="transaminase" label="转氨酶" width="70" />
        <el-table-column show-overflow-tooltip prop="ecg" label="心电图" width="70" />
        <el-table-column show-overflow-tooltip prop="conclusion" label="体检结论" min-width="100" />
        <el-table-column show-overflow-tooltip prop="reviewRecord" label="复查记录" min-width="100" />
        <el-table-column show-overflow-tooltip prop="remark" label="备注" />
      </el-table>
      <pagination
        v-show="total>0"
@@ -52,10 +58,12 @@
<script>
// 引用翻页组件
import Pagination from '@/components/Pagination'
import dictMixin from '../../utils/dictMixin'
export default {
  components: {
    Pagination
  },
  mixins: [dictMixin],
  props: {
    dialogVisible: {
      type: Boolean,
@@ -87,7 +95,7 @@
      }, // 查询参数
      sort: {}, // 排序
      pagination: { // 分页参数
        size: 5,
        size: 15,
        num: 1
      },
      list: [], // 给table显示的数据
@@ -95,6 +103,8 @@
        children: 'children',
        label: 'label'
      }
      // ecgOptions: [],
      // physicalExamTypeOptions: []
    }
  },
  computed: {
@@ -102,9 +112,33 @@
      get() {
        return this.dialogVisible
      }
    }
    },
    // 字典选项计算属性
    physicalExamTypeOptions() { return this.getDictOptions('PHYSICALEXAMTYPE') },
    ecgOptions() { return this.getDictOptions('ECG') }
  },
  mounted() {
    // 字典数据已在登录时预加载,直接从 Vuex 获取
    this.initDictTypes(['PHYSICALEXAMTYPE', 'ECG'])
  },
  methods: {
    typeFormat(row, column) {
      return this.selectDictLabel(this.physicalExamTypeOptions, row.physicalExamType)
    },
    ecgNameFormat(row, column) {
      return this.selectDictLabel(this.ecgOptions, row.ecg)
    },
    transPhysicalExamType(physicalExamType) {
      switch (physicalExamType) {
        case '1':
          return '入职体检'
        case '2':
          return '员工体检'
      }
    },
    beforeClose(done) {
      this.$emit('cancleChooseUser')
    },
    search() {
      this.fetch({
        ...this.queryParams