zhangchong 1 год назад
Родитель
Сommit
68c04a10be
4 измененных файлов с 26 добавлено и 15 удалено
  1. 1 1
      .env.development
  2. 1 1
      .env.production
  3. 1 1
      src/views/statistics/call/index.vue
  4. 23 12
      src/views/system/workforce/scheduling.vue

+ 1 - 1
.env.development

@@ -1,4 +1,4 @@
-# 本地环境
+# 开发环境
 VITE_MODE_NAME=development
 
 # 防止部署多套系统到同一域名不同目录时,变量共用的问题 设置不同的前缀

+ 1 - 1
.env.production

@@ -1,4 +1,4 @@
-# 线上环境
+# 测试环境
 VITE_MODE_NAME=production
 
 # 防止部署多套系统到同一域名不同目录时,变量共用的问题 设置不同的前缀

+ 1 - 1
src/views/statistics/call/index.vue

@@ -54,7 +54,7 @@ const proTableRef = ref<RefType>(); // 表格ref
 // 表格配置项
 const columns = ref<any[]>([
 	{ prop: 'hourRange', label: '时段', align: 'center' },
-	{ prop: 'hour', label: '呼入数量', align: 'center', sortable: true },
+	{ prop: 'total', label: '呼入数量', align: 'center', sortable: true },
 	{ prop: 'answered', label: '接通数量', align: 'center', sortable: true },
 	{ prop: 'hanguped', label: '挂断数量', align: 'center', sortable: true },
 ]);

+ 23 - 12
src/views/system/workforce/scheduling.vue

@@ -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);
 };
 // 获取班次列表