Procházet zdrojové kódy

reactor:质检页面必填项优化(开始扣分时间点,结束扣分时间点)调整为非必填;

zhangchong před 7 měsíci
rodič
revize
a820a63a33
1 změnil soubory, kde provedl 19 přidání a 25 odebrání
  1. 19 25
      src/views/statistics/center/acceptCenter.vue

+ 19 - 25
src/views/statistics/center/acceptCenter.vue

@@ -39,7 +39,7 @@
 				</el-col>
 				<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
 					<el-button @click="changePieType" type="primary">切换图表</el-button>
-					<v-chart class="chart" :option="option" :loading="state.loading" autoresize/>
+					<v-chart class="chart" :option="option" :loading="state.loading" autoresize />
 				</el-col>
 				<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
 					<ProTable
@@ -126,11 +126,11 @@
 	</div>
 </template>
 <script setup lang="tsx" name="statisticsCenterAcceptCenter">
-import { onMounted, reactive, ref,onBeforeUnmount } from 'vue';
+import { onMounted, reactive, ref, onBeforeUnmount } from 'vue';
 import { FormInstance } from 'element-plus';
 import { defaultDate, shortcuts } from '@/utils/constants';
 import Other from '@/utils/other';
-import { centerAccept, centerAcceptExport,onBeforeMount } from '@/api/statistics/center';
+import { centerAccept, centerAcceptExport, onBeforeMount } from '@/api/statistics/center';
 import { useRouter } from 'vue-router';
 import { useResizeObserver, useWindowSize } from '@vueuse/core';
 
@@ -221,36 +221,30 @@ const queryList = async () => {
 				Reflect.deleteProperty(requestParams.value, 'crTime');
 				const response = await centerAccept(requestParams.value);
 				const xData = response.result.map((item: any) => item.time).filter((item: any) => item !== '合计');
-				const noResponseData = response.result.filter((item: any) => item.time !== '合计');
 				const seriesData = [
 					{
 						type: 'bar',
-						data: noResponseData.map((item: any) => item.handleNum),
+						data: response.result.map((item: any) => item.handleNum),
 						name: '待办件',
-						label: {
-							show: true,
-							position: 'top'
-						},
 					},
 					{
 						type: 'bar',
-						data: noResponseData.map((item: any) => item.noHandleNum),
+						data: response.result.map((item: any) => item.noHandleNum),
 						name: '已办件',
-						label: {
-							show: true,
-							position: 'top'
-						},
 					},
 				];
 				const legendData = ['待办件', '已办件'];
-				pieData.value = seriesData.map((item: any) => {
-					return {
-						value: item.data.reduce((accumulator: number, currentValue: number) => {
-							return accumulator + currentValue;
-						}, 0),
-						name: item.name,
-					};
-				});
+				const totalResult = response.result.find((item: any) => item.time === '合计');
+				pieData.value = [
+					{
+						name: '已办件',
+						value: totalResult.handleNum,
+					},
+					{
+						name: '待办件',
+						value: totalResult.noHandleNum,
+					},
+				];
 				setOption(legendData, xData, seriesData);
 				state.tableData = response.result ?? [];
 				state.loading = false;
@@ -417,9 +411,9 @@ const linkDetail = (scope: any, type: string = '') => {
 			path: '/statistics/center/detailAcceptCenter',
 			query: {
 				StartTime: scope.row.time,
-				EndTime:scope.row.time,
+				EndTime: scope.row.time,
 				tagsViewName: `中心受理统计坐席统计`,
-				type:'seat'
+				type: 'seat',
 			},
 		});
 	} else {
@@ -427,7 +421,7 @@ const linkDetail = (scope: any, type: string = '') => {
 			path: '/statistics/center/detailAcceptCenter',
 			query: {
 				StartTime: scope.row.time,
-				EndTime:scope.row.time,
+				EndTime: scope.row.time,
 				tagsViewName: `中心受理统计日期统计`,
 			},
 		});