|
@@ -55,21 +55,22 @@ const columns = ref<any[]>([{ prop: 'schedulingUserName', label: '姓名', width
|
|
|
const numberList = ref<any[]>([]); // 班次列表
|
|
|
/** 通话记录列表 */
|
|
|
const queryList = async () => {
|
|
|
- /*state.loading = true;
|
|
|
+ state.loading = true;
|
|
|
try {
|
|
|
columns.value = [{ prop: 'schedulingUserName', label: '姓名', width: 120, fixed: 'left', align: 'center' }];
|
|
|
const days = dayjs(month.value).daysInMonth(); // 获取当月有多少天
|
|
|
for (let i = 1; i <= days; i++) {
|
|
|
const num = i < 10 ? `0${i}` : i;
|
|
|
columns.value.push({
|
|
|
- prop: `${dayjs(month.value).format('YYYY-MM')}-${i}`,
|
|
|
+ prop: `${dayjs(month.value).format('YYYY-MM')}-${num}`,
|
|
|
label: `${num}日`,
|
|
|
align: 'center',
|
|
|
render: (scope) => {
|
|
|
- /!* {scope.row?.schedulingTime === `${dayjs(month.value).format('YYYY-MM')}-${num}`
|
|
|
+ /* {scope.row?.schedulingTime === `${dayjs(month.value).format('YYYY-MM')}-${num}`
|
|
|
? `${scope.row[dayjs(month.value).format(`YYYY-MM-${num}`)]}`
|
|
|
- : ''}*!/
|
|
|
+ : ''}*/
|
|
|
const value = `${scope.row[dayjs(month.value).format(`YYYY-MM-${num}`)]}`;
|
|
|
+ console.log(value);
|
|
|
return (
|
|
|
<>
|
|
|
{value !== 'undefined' && value ? (
|
|
@@ -79,7 +80,7 @@ const queryList = async () => {
|
|
|
title={'点击修改' + scope.row?.schedulingUserName + dayjs(month.value).format('YYYY-MM') + '-' + num + '排班'}
|
|
|
onClick={() => changeScheduling(scope)}
|
|
|
>
|
|
|
- {`${scope.row[dayjs(month.value).format(`YYYY-MM-${num}`)]}`}
|
|
|
+ {`${scope.row[dayjs(month.value).format(`YYYY-MM-${num}`)]?.name}`}
|
|
|
</el-button>
|
|
|
) : (
|
|
|
''
|
|
@@ -89,7 +90,7 @@ const queryList = async () => {
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
- /!*const request = {
|
|
|
+ /*const request = {
|
|
|
...state.queryParams,
|
|
|
StartTime: `${month.value}-01`,
|
|
|
EndTime: `${month.value}-${days}`,
|
|
@@ -103,21 +104,30 @@ const queryList = async () => {
|
|
|
[`${dayjs(item.schedulingTime).format('YYYY-MM-DD')}`]: item.schedulingShift?.name,
|
|
|
};
|
|
|
});
|
|
|
- state.total = response.result?.total ?? 0;*!/
|
|
|
+ state.total = response.result?.total ?? 0;*/
|
|
|
+ console.log(columns.value);
|
|
|
state.tableData = [
|
|
|
{
|
|
|
schedulingUserName: '张冲',
|
|
|
- '2024-03-01': '班次1',
|
|
|
- '2024-03-02': '班次2',
|
|
|
- '2024-03-03': '班次3',
|
|
|
- '2024-03-04': '',
|
|
|
+ '2024-04-01': {
|
|
|
+ name: '班次1',
|
|
|
+ id: 1,
|
|
|
+ },
|
|
|
+ '2024-04-02': {
|
|
|
+ name: '班次2',
|
|
|
+ id: 2,
|
|
|
+ },
|
|
|
+ '2024-04-03': {
|
|
|
+ name: '班次3',
|
|
|
+ id: 3,
|
|
|
+ },
|
|
|
},
|
|
|
];
|
|
|
state.loading = false;
|
|
|
} catch (e) {
|
|
|
state.loading = false;
|
|
|
console.log(e);
|
|
|
- }*/
|
|
|
+ }
|
|
|
};
|
|
|
// 批量排班
|
|
|
const multipleSchedulingRef = ref<RefType>(); // 批量排班ref
|
|
@@ -127,6 +137,7 @@ const scheduler = () => {
|
|
|
// 单个排班
|
|
|
const schedulingRef = ref<RefType>(); // 单个排班
|
|
|
const changeScheduling = (row) => {
|
|
|
+ console.log(row)
|
|
|
schedulingRef.value.openDialog(row);
|
|
|
};
|
|
|
// 获取班次列表
|