| | |
| | | <div class="main-card"> |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="dialogAddRecord = true">新建</el-button> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="dialogAddRecord = true">新增</el-button> |
| | | <!-- <el-button type="warning" :icon="Edit" size="default" plain>修改</el-button>--> |
| | | <el-button type="danger" :icon="Delete" size="default" plain @click="deleteBatchBtn">删除</el-button> |
| | | </el-col> |
| | |
| | | import { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue'; |
| | | import { ElTable } from 'element-plus'; |
| | | import { FormInstance, FormRules, ElMessage } from 'element-plus'; |
| | | import { workingHoursApi } from '/@/api/basicDateManage/personShiftManage/workingHours'; |
| | | import {workingHoursSetApi} from "/@/api/basicDateManage/personShiftManage/workingHoursSet"; |
| | | import { workingHoursApi } from '/@/api/systemManage/basicDateManage/personShiftManage/workingHours'; |
| | | import { workingHoursSetApi } from '/@/api/systemManage/basicDateManage/personShiftManage/workingHoursSet'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface stateType { |
| | |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: res.data.msg |
| | | message: '添加成功!' |
| | | }); |
| | | getListByPage(); |
| | | } else { |
| | |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: res.data.msg |
| | | message: '修改成功!' |
| | | }); |
| | | getListByPage(); |
| | | } else { |
| | |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: res.data.msg |
| | | message: '删除成功!' |
| | | }); |
| | | getListByPage(); |
| | | } else { |
| | |
| | | // 批量删除 |
| | | const deleteBatchBtn = async () => { |
| | | if (state.deleteArr.length > 0) { |
| | | state.deleteSetDialog = true |
| | | state.deleteSetDialog = true; |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | const conFirmDeleteBatch = async () => { |
| | | let res = await workingHoursApi().deleteBatchWorkTimePeriod({ ids: state.deleteArr }); |
| | | if (res.data.code === '200') { |
| | | state.deleteSetDialog = false |
| | | state.deleteSetDialog = false; |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: res.data.msg |
| | | message: '删除成功!' |
| | | }); |
| | | getListByPage() |
| | | getListByPage(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | state.deleteSetDialog = false |
| | | state.deleteSetDialog = false; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | const handleSizeChange = (val: number) => { |
| | | state.pageSize = val; |
| | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: calc(100vh - 114px); |
| | | height: calc(100vh - 144px); |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | .homeCard { |