Explorar o código

reactor:工单受理调整;

zhangchong hai 1 ano
pai
achega
64878840e3
Modificáronse 2 ficheiros con 13 adicións e 13 borrados
  1. 12 12
      src/layout/navBars/tagsView/tagsView.vue
  2. 1 1
      src/utils/request.ts

+ 12 - 12
src/layout/navBars/tagsView/tagsView.vue

@@ -100,7 +100,7 @@ const state = reactive<TagsViewState>({
 	sortable: '',
 	tagsRefsIndex: 0,
 	tagsViewList: [],
-	tagsViewRoutesList: []
+	tagsViewRoutesList: [],
 });
 // 获取用户信息配置
 const userInfosConfig = computed(() => {
@@ -153,12 +153,12 @@ const initTagsView = async () => {
 		state.tagsViewList = await Session.get('tagsViewList');
 	} else {
 		state.tagsViewRoutesList.map((v: RouteItem) => {
-      if (v.meta?.isAffix && !v.meta.isHide) {
-        v.url = setTagsViewHighlight(v);
-        state.tagsViewList.push({...v});
-        storesKeepALiveNames.addCachedView(v);
-      }
-    });
+			if (v.meta?.isAffix && !v.meta.isHide) {
+				v.url = setTagsViewHighlight(v);
+				state.tagsViewList.push({ ...v });
+				storesKeepALiveNames.addCachedView(v);
+			}
+		});
 		await addTagsView(route.path, <any>route);
 	}
 	// 初始化当前元素(li)的下标
@@ -238,7 +238,7 @@ const addTagsView = (path: string, to?: any) => {
 		else item.query = to?.query ? to?.query : route.query;
 		item.url = setTagsViewHighlight(item);
 		await storesKeepALiveNames.addCachedView(item);
-		state.tagsViewList.push({...item});
+		state.tagsViewList.push({ ...item });
 		await addBrowserSetSession(state.tagsViewList);
 	});
 };
@@ -265,8 +265,8 @@ const closeCurrentTagsView = (path: string) => {
 		if (!v.meta?.isAffix) {
 			if (getThemeConfig.value.isShareTagsView ? v.path === path : v.url === path) {
 				state.tagsViewList.splice(k, 1);
-        const fi = state.tagsViewList.filter((i: any) => i.name === v.name);
-        if(!fi) storesKeepALiveNames.delCachedView(v); // 动态路由会有多个 如果有多个不清除缓存
+				const fi = state.tagsViewList.filter((i: any) => i.name === v.name);
+				if (!fi.length) storesKeepALiveNames.delCachedView(v); // 动态路由会有多个 如果有多个不清除缓存
 				setTimeout(() => {
 					if (state.tagsViewList.length === k && getThemeConfig.value.isShareTagsView ? state.routePath === path : state.routeActive === path) {
 						// 最后一个且高亮时
@@ -576,7 +576,7 @@ onUnmounted(() => {
 	// 取消监听布局配置开启 TagsView 共用
 	mittBus.off('openShareTagsView', () => {});
 	// 取消窗口 resize 监听
-	window.removeEventListener('resize', onSortableResize,true);
+	window.removeEventListener('resize', onSortableResize, true);
 });
 // 页面更新时
 onBeforeUpdate(() => {
@@ -623,7 +623,7 @@ watch(
 	&-ul {
 		list-style: none;
 		margin: 0;
-    display: flex;
+		display: flex;
 		align-items: center;
 		color: var(--el-text-color-regular);
 		font-size: 12px;

+ 1 - 1
src/utils/request.ts

@@ -27,7 +27,7 @@ export default function myAxios(axiosConfig: any, customOptions?: customOptionsT
 	// 自定义配置
 	let custom_options = Object.assign(
 		{
-			repeat_request_cancel: true, // 是否开启取消重复请求, 默认为 true
+			repeat_request_cancel: false, // 是否开启取消重复请求, 默认为 true
 			loading: false, // 是否开启全屏loading层效果, 默认为false
 			reduct_data_format: true, // 是否开启简洁的数据结构响应 减少一层data, 默认为true
 			error_message_show: true, // 是否开启接口错误信息展示,默认为true