Browse Source

值班人员 获取列表提交

wangqin
Joe 1 year ago
parent
commit
fbc7620365
  1. 96
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue
  2. 10
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

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

@ -39,39 +39,41 @@
值班中心 值班中心
</div> </div>
</template> </template>
<template #content-DateDuty="{ data }"> <template #content-date="{ data }">
<div class="item"> <div class="item">
<img src="@screen/images/form/calendar.svg" /> <img src="@screen/images/form/calendar.svg" />
{{ data['值班日期'] }} {{ data.date }}
</div> </div>
</template> </template>
<template #content-Stationary="{ data }"> <template #content-organizationName="{ data }">
<div class="parent"> <div class="parent">
<div class="item"> <div class="item">
<img src="@screen/images/form/location.svg" /> <img src="@screen/images/form/location.svg" />
{{ data['驻点'] }} {{ data['organizationName'] }}
</div> </div>
</div> </div>
</template> </template>
<template #content-DayShift="{ data }"> <template #content-key_1="{ data }">
<div class="item-parent"> <div class="item-parent" v-if="data.key_1 && data.key_1.length">
<div class="item"> <div class="item" v-for="item in data.key_1">
<img src="@screen/images/form/people.svg" /> <img src="@screen/images/form/people.svg" />
{{ data['白班'] }} {{ item.name }}
</div>
<div class="item">
<img src="@screen/images/form/phone.svg" />
{{ data['白班'] }}
</div> </div>
</div> </div>
<div class="no-data" v-else>
无值班人员
</div>
</template> </template>
<template #content-GraveyardShift="{ data }"> <template #content-key_2="{ data }">
<div class="item-parent"> <div class="item-parent" v-if="data.key_2 && data.key_2.length">
<div class="item" v-for="item in 15"> <div class="item" v-for="item in data.key_2">
<img src="@screen/images/form/people.svg" /> <img src="@screen/images/form/people.svg" />
{{ data['夜班'] }} {{ item.name }}
</div> </div>
</div> </div>
<div class="no-data" v-else>
无值班人员
</div>
</template> </template>
<template #operation-content> <template #operation-content>
<ButtonGradient class="operate-button" @click.native="handleModifyDutyInformationTable(true)"> <ButtonGradient class="operate-button" @click.native="handleModifyDutyInformationTable(true)">
@ -112,6 +114,7 @@ import { searchFormList } from "./data";
import request from "@/utils/request"; import request from "@/utils/request";
import { setLoading } from "@screen/utils/index.js" import { setLoading } from "@screen/utils/index.js"
import { delay, exportFile } from "@screen/utils/common"; import { delay, exportFile } from "@screen/utils/common";
import { SchedulingEnum } from "@screen/utils/enum.js"
export default { export default {
name: 'DutyOfficer', name: 'DutyOfficer',
@ -127,33 +130,26 @@ export default {
return { return {
columns: [ columns: [
{ {
key: "DateDuty", key: "date",
title: "值班日期", title: "值班日期",
width: "210px" width: "210px"
}, },
{ {
key: "Stationary", key: "organizationName",
title: "驻点", title: "驻点",
width: "240px" width: "240px"
}, },
{ {
key: "DayShift", key: "key_1",
title: "白班", title: "白班",
width: "510px" width: "510px"
}, },
{ {
key: "GraveyardShift", key: "key_2",
title: "夜班", title: "夜班",
width: "510px" width: "510px"
}, },
], ],
// data: Array.from({ length: 15 }).map((_, index) => ({
// "id": index,
// "": "2023-12-21",
// "": "",
// "": "",
// "": "",
// })),
data: [], data: [],
operateRecordVisible: false, operateRecordVisible: false,
@ -199,22 +195,37 @@ export default {
await delay(150); await delay(150);
closeLoading(); request({
url: `/business/shifts/list`,
method: "get",
params: {
...this.searchData,
...this.getPagination()
}
}).then(result => {
if (result.code != 200) return;
this.data = result.rows.map(item => {
const result = {
date: item.date,
organizationName: item.organizationName[0].organizationName,
}
item.organizationName.forEach(item => {
const key = `key_${item.scheduling}`;
if (!result[key]) result[key] = [];
result[key].push({
name: item.name,
});
})
// request({ return result
// url: `/business/employees/list`, });
// method: "get", this.total = result.total;
// params: { }).finally(() => {
// ...this.searchData, closeLoading();
// ...this.getPagination() })
// }
// }).then(result => {
// if (result.code != 200) return;
// this.data = result.rows;
// this.total = result.total;
// }).finally(() => {
// closeLoading();
// })
} }
} }
} }
@ -246,6 +257,7 @@ export default {
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
overflow-y: auto; overflow-y: auto;
max-height: 150px; max-height: 150px;
height: 100%;
} }
.operate-button { .operate-button {

10
ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

@ -244,3 +244,13 @@ export const LaneOccupancyList = Object.keys(LaneOccupancy).map((key) => {
label: LaneOccupancy[key].text, label: LaneOccupancy[key].text,
}; };
}); });
// 排班
export const SchedulingEnum = {
1: {
text: "白班",
},
2: {
text: "夜班",
},
};

Loading…
Cancel
Save