|
|
@ -97,7 +97,7 @@ |
|
|
|
</template> |
|
|
|
</SpecialTable> |
|
|
|
|
|
|
|
<OperateRecord :visible="operateRecordVisible" @close="handleOperateRecord(false)" /> |
|
|
|
<OperateRecord :visible="operateRecordVisible" @close="handleOperateRecord(false)" :data="dialogData" /> |
|
|
|
|
|
|
|
<ModifyDutyInformationTable :visible="modifyDutyInformationTableVisible" :data="dialogData" |
|
|
|
@close="handleModifyDutyInformationTable(false)" /> |
|
|
@ -115,7 +115,6 @@ import { searchFormList } from "./data"; |
|
|
|
import request from "@/utils/request"; |
|
|
|
import { setLoading } from "@screen/utils/index.js" |
|
|
|
import { delay, exportFile, confirm } from "@screen/utils/common"; |
|
|
|
import { SchedulingEnum } from "@screen/utils/enum.js" |
|
|
|
import { Message } from "element-ui"; |
|
|
|
|
|
|
|
export default { |
|
|
@ -163,14 +162,19 @@ export default { |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleOperateRecord(bool) { |
|
|
|
handleOperateRecord(bool, data) { |
|
|
|
this.operateRecordVisible = bool; |
|
|
|
this.dialogData = data; |
|
|
|
}, |
|
|
|
handleModifyDutyInformationTable(bool, data) { |
|
|
|
if (!bool) this.setCurrentPage(1); |
|
|
|
|
|
|
|
this.modifyDutyInformationTableVisible = bool; |
|
|
|
this.dialogData = data; |
|
|
|
this.dialogData = { |
|
|
|
...data, |
|
|
|
dayShift: (data.dayShift || []).map(item => ({ ...item, delId: item.id, id: item.employeesId })), |
|
|
|
graveyardShift: (data.graveyardShift || []).map(item => ({ ...item, id: item.employeesId })) |
|
|
|
}; |
|
|
|
}, |
|
|
|
handleExport() { |
|
|
|
exportFile({ |
|
|
@ -239,9 +243,12 @@ export default { |
|
|
|
await confirm({ message: "是否要删除该值班信息?" }); |
|
|
|
|
|
|
|
request({ |
|
|
|
url: `/business/shifts/${data.id}`, |
|
|
|
method: "DELETE", |
|
|
|
data: {} |
|
|
|
url: `/business/shifts/delete`, |
|
|
|
method: "POST", |
|
|
|
data: { |
|
|
|
date: data.date, |
|
|
|
station: data.station, |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(result => { |
|
|
|
if (result.code != 200) return Message.error("删除失败"); |
|
|
|