buhuazhen
2 天以前 be4f26614373948e52c87705a3b35f77897df468
Merge branch 'dev_bhz' into ywx
已修改1个文件
23 ■■■■ 文件已修改
src/views/personnelManagement/scheduling/index.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/personnelManagement/scheduling/index.vue
@@ -106,6 +106,13 @@
          </template>
        </el-table-column>
      </el-table>
        <pagination
            v-if="tableCount > 0"
            :total="tableCount"
            :page="filterForm.current"
            :limit="filterForm.size"
            @pagination="paginationChange"
        />
    </div>
    <!-- 批量操作 -->
@@ -244,7 +251,9 @@
import {save, del, delByIds, listPage} from "@/api/personnelManagement/scheduling.js"
import {getStaffOnJob} from "@/api/personnelManagement/onboarding.js";
import dayjs from "dayjs";
import pagination from "@/components/PIMTable/Pagination.vue";
const tableCount = ref(0)
// 响应式数据
const scheduleDialog = ref(false)
const dialogType = ref('add')
@@ -255,7 +264,9 @@
const filterForm = reactive({
  staffName: '',
  shiftType: '',
  dateRange: []
  dateRange: [],
  current:1,
  size: 10
})
// 排班表单
@@ -304,7 +315,11 @@
    personList.value = res.data
  })
};
const paginationChange = (obj) => {
  filterForm.current = obj.page;
  filterForm.size = obj.limit;
  handleFilter();
};
const handleSelectStaff = (val) => {
  let obj = personList.value.find(item => item.id === val)
@@ -328,14 +343,14 @@
const handleFilter = async () => {
  tableLoading.value = true
  let searchForm = {
    staffName: filterForm.staffName,
    shiftType: filterForm.shiftType,
    ...filterForm,
    ...(filterForm.dateRange.length > 0 && {
      startDate: filterForm.dateRange[0],
      endDate: filterForm.dateRange[1],
    })
  }
  let resp = await listPage(searchForm)
  tableCount.value = resp.data.total
  scheduleList.value = resp.data.records.map(it => {
    return {
      ...it,