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