yaozc
2023-01-31 aa102c7ba6977ff40f3e02eba32a00a168fb3564
eladmin-web-master/src/views/attendance/attendanceLeave/index.vue
@@ -186,47 +186,47 @@
      <!--表格渲染-->
      <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
        <el-table-column type="selection" width="55" />
        <el-table-column prop="userName" label="申请人" width="100" fixed="left" show-overflow-tooltip>
        <el-table-column prop="userName" label="申请人" min-width="100" fixed="left" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag>{{ scope.row.userName }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="appUserName" label="审批者" width="100" fixed="left" show-overflow-tooltip>
        <el-table-column prop="appUserName" label="审批者" min-width="100" fixed="left" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag>{{ scope.row.appUserName }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="leaveType" label="请假类型" width="80" show-overflow-tooltip>
        <el-table-column prop="leaveType" label="请假类型" min-width="80" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag>{{ dict.label[dictLeaveType][scope.row.leaveType] }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="leaveStartTime" width="140" label="请假开始时间" show-overflow-tooltip>
        <el-table-column prop="leaveStartTime" min-width="140" label="请假开始时间" show-overflow-tooltip>
          <template slot-scope="scope">
            {{ scope.row.leaveDurationUnit === dictLeaveTimeTypeHour ? scope.row.leaveStartTime : crud.toDate(scope.row.leaveStartTime) }}
          </template>
        </el-table-column>
        <el-table-column prop="leaveEndTime" width="140" label="请假结束时间" show-overflow-tooltip>
        <el-table-column prop="leaveEndTime" min-width="140" label="请假结束时间" show-overflow-tooltip>
          <template slot-scope="scope">
            {{ scope.row.leaveDurationUnit === dictLeaveTimeTypeHour ? scope.row.leaveEndTime : crud.toDate(scope.row.leaveEndTime) }}
          </template>
        </el-table-column>
        <el-table-column prop="leaveDuration" label="请假时长" width="80" show-overflow-tooltip>
        <el-table-column prop="leaveDuration" label="请假时长" min-width="80" show-overflow-tooltip>
          <template slot-scope="scope">
            {{ scope.row.leaveDuration + '(' + dict.label[dictLeaveTimeType][scope.row.leaveDurationUnit] + ')' }}
          </template>
        </el-table-column>
        <el-table-column prop="leaveReason" label="请假原因" width="140" show-overflow-tooltip />
        <el-table-column prop="approvalStatus" label="审批状态" width="80" show-overflow-tooltip>
        <el-table-column prop="leaveReason" label="请假原因" min-width="140" show-overflow-tooltip />
        <el-table-column prop="approvalStatus" label="审批状态" min-width="80" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag v-if="scope.row.approvalStatus === dictAppRovalStatusUnderAppover" type="warning">{{ dict.label[dictApprovalStart][scope.row.approvalStatus] }}</el-tag>
            <el-tag v-if="scope.row.approvalStatus === dictAppRovalStatusPassed" type="success">{{ dict.label[dictApprovalStart][scope.row.approvalStatus] }}</el-tag>
            <el-tag v-if="scope.row.approvalStatus === dictAppRovalStatusReturn" type="danger">{{ dict.label[dictApprovalStart][scope.row.approvalStatus] }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="approvalDescription" label="审批说明" width="140" show-overflow-tooltip />
        <el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip />
        <el-table-column prop="createTime" width="140" label="创建时间" show-overflow-tooltip />
        <el-table-column prop="approvalDescription" label="审批说明" min-width="140" show-overflow-tooltip />
        <el-table-column prop="remarks" label="备注" min-width="140" show-overflow-tooltip />
        <el-table-column prop="createTime" min-width="140" label="创建时间" show-overflow-tooltip />
        <el-table-column v-if="checkPer(['admin','attendanceLeave:approve'])" label="审核操作" width="180px" align="center" fixed="right">
          <template slot-scope="scope">
            <el-button
@@ -294,7 +294,7 @@
  components: { pagination, crudOperation, rrOperation, udOperation },
  mixins: [presenter(), header(), form(defaultForm), crud()],
  cruds() {
    return CRUD({ title: '请假记录', url: 'api/attendanceLeave', idField: 'id', sort: 'id,desc', crudMethod: { ...crudAttendanceLeave }})
    return CRUD({ title: '请假记录', url: 'api/attendanceLeave', idField: 'id', sort: 'leaveStartTime,desc', crudMethod: { ...crudAttendanceLeave }})
  },
  // 数据字典
  dicts: [constant.LEAVE_TYPE, constant.APPROVAL_STATUS, constant.LEAVE_TIME_TYPE],