Browse Source

值班人员 记录完成

wangqin
Joe 10 months ago
parent
commit
bc9d5db00b
  1. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue
  2. 50
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/OperateRecord.vue
  3. 21
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue

8
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue

@ -254,20 +254,20 @@ export default {
(this.data.dayShift || []).forEach(item => {
const findIndex = this.dayShift.findIndex(_item => _item.id === item.id);
if (findIndex === -1) deleteIds.push(item.id)
if (findIndex === -1) deleteIds.push(item.delId)
});
(this.data.graveyardShift || []).forEach(item => {
const findIndex = this.graveyardShift.findIndex(_item => _item.id === item.id);
if (findIndex === -1) deleteIds.push(item.id)
if (findIndex === -1) deleteIds.push(item.delId)
})
Promise.allSettled([
request({
deleteIds?.length ? request({
url: `/business/shifts/${deleteIds.join()}`,
method: "DELETE",
data: {}
}),
}) : Promise.resolve(),
this.updateData(this.data)
])
.then(([del, update]) => {

50
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/OperateRecord.vue

@ -1,7 +1,9 @@
<template>
<Dialog v-model="visibleModel" title="操作记录">
<div class="OperateRecord">
<TimeLine :data="timeLine2List" direction="right" />
<TimeLine v-if="timeLine2List.length" :data="timeLine2List" direction="right" />
<div class="no-data" v-else>暂无操作记录</div>
<div class="bottom">
<Button>确认</Button>
@ -16,6 +18,8 @@ import Dialog from "@screen/components/Dialog/index.vue";
import TimeLine from "@screen/components/TimeLine/TimeLine2/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import request from "@/utils/request";
export default {
name: 'OperateRecord',
components: {
@ -27,29 +31,59 @@ export default {
visible: {
type: Boolean,
default: false
},
data: {
type: Object,
default: null
}
},
emit: ['close'],
data() {
return {
timeLine2List: Array.from({ length: 6 }).map(() => ({
// title: "",
time: "2023-12-21 16:35:44",
name: "甘易玫",
desc: "描述性文字文字文字文字文字文字文字文字描述性文字文字文字文字文字文字文字文字",
posts: '淄博发展公司管理员'
})),
// timeLine2List: Array.from({ length: 6 }).map(() => ({
// // title: "",
// time: "2023-12-21 16:35:44",
// name: "",
// desc: "",
// posts: ''
// })),
timeLine2List: []
}
},
computed: {
visibleModel: {
get() {
if (this.visible) this.getData();
return this.visible
},
set(bool) {
this.$emit('close', bool);
}
}
},
methods: {
getData() {
request({
url: `/business/shifts/recordList`,
method: "POST",
data: {
date: this.data.date,
station: this.data.station,
}
})
.then(result => {
if (result.code != 200) return Message.error("获取失败");
this.timeLine2List = result.rows.map(item => ({
time: item.operationTime,
name: item.nickName,
desc: item.modifyContent,
posts: "操作员"
}))
})
.catch(() => {
Message.error("获取失败")
})
}
}
}
</script>

21
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue

@ -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("删除失败");

Loading…
Cancel
Save