浏览代码

reactor:修复查询替换后传参的问题;

zhangchong 2 月之前
父节点
当前提交
6399ca3f86

+ 3 - 2
src/views/auxiliary/area/index.vue

@@ -126,7 +126,8 @@ const onEditArea = (row: any) => {
 };
 // 删除当前行
 const onDelArea = (row: any) => {
-	ElMessageBox.confirm(`此操作将永久删除次区域:${row.areaName}, 是否继续?`, '提示', {
+	const areaName = row.areaName.replace(/<span class="keyword-highlight">(.*?)<\/span>/g, '$1');
+	ElMessageBox.confirm(`此操作将永久删除次区域:${areaName}, 是否继续?`, '提示', {
 		confirmButtonText: '确定',
 		cancelButtonText: '取消',
 		type: 'warning',
@@ -142,7 +143,7 @@ const onDelArea = (row: any) => {
 // 获取所有部门结构
 const tableData = ref<EmptyArrayType>([]);
 const list = ref<any[]>([]);
-const requestParams = ref<string>("");
+const requestParams = ref<string>('');
 const queryList = async () => {
 	state.loading = true;
 	try {

+ 5 - 4
src/views/auxiliary/clearCache/index.vue

@@ -60,7 +60,7 @@
 </template>
 
 <script lang="tsx" setup name="auxiliaryClearCache">
-import { computed, onMounted, reactive, ref, unref } from 'vue';
+import { computed, onMounted, reactive, ref } from 'vue';
 import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
 import { clearCache, getAllCacheKey } from '@/api/auxiliary/clearCache';
 import XEUtils from 'xe-utils';
@@ -146,7 +146,7 @@ const isChecked = computed(() => {
 });
 // 删除缓存
 const cacheKeysRemove = () => {
-	const ids = checkTable.value.map((item: any) => item.id);
+	const ids = checkTable.value.map((item: any) => item.id.replace(/<span class="keyword-highlight">(.*?)<\/span>/g, '$1'));
 	ElMessageBox.confirm(`您确定要删除选中的缓存key,是否继续?`, '提示', {
 		confirmButtonText: '确认',
 		cancelButtonText: '取消',
@@ -165,7 +165,8 @@ const cacheKeysRemove = () => {
 };
 // 删除缓存
 const onDelete = (row: any) => {
-	ElMessageBox.confirm(`您确定要删除缓存 ${row.id}?`, '提示', {
+	const id = row.id.replace(/<span class="keyword-highlight">(.*?)<\/span>/g, '$1');
+	ElMessageBox.confirm(`您确定要删除缓存 ${id}?`, '提示', {
 		confirmButtonText: '确认',
 		cancelButtonText: '取消',
 		type: 'warning',
@@ -174,7 +175,7 @@ const onDelete = (row: any) => {
 		autofocus: false,
 	})
 		.then(() => {
-			clearCache({ keys: [row.id] }).then(() => {
+			clearCache({ keys: [id] }).then(() => {
 				ElMessage.success('操作成功');
 				queryList();
 			});

+ 2 - 1
src/views/case/type/index.vue

@@ -122,7 +122,8 @@ const onOpenEdit = (row: any) => {
 
 // 删除当前行
 const onDelete = (row: any) => {
-	ElMessageBox.confirm(`是否确认删除该类型?删除后不可恢复`, '提示', {
+  const typeName = row.name.replace(/<span class="keyword-highlight">(.*?)<\/span>/g, '$1');
+	ElMessageBox.confirm(`是否确认删除:${typeName}?删除后不可恢复`, '提示', {
 		confirmButtonText: '确定',
 		cancelButtonText: '取消',
 		type: 'warning',

+ 2 - 1
src/views/knowledge/config/type/index.vue

@@ -124,7 +124,8 @@ const onOpenEdit = (row: any) => {
 
 // 删除当前行
 const onDelete = (row: any) => {
-	ElMessageBox.confirm(`是否确认删除该类型?删除后不可恢复`, '提示', {
+  const typeName = row.name.replace(/<span class="keyword-highlight">(.*?)<\/span>/g, '$1');
+	ElMessageBox.confirm(`是否确认删除:${typeName}?删除后不可恢复`, '提示', {
 		confirmButtonText: '确定',
 		cancelButtonText: '取消',
 		type: 'warning',

+ 2 - 1
src/views/plan/type/index.vue

@@ -123,7 +123,8 @@ const onOpenEdit = (row: any) => {
 
 // 删除当前行
 const onDelete = (row: any) => {
-	ElMessageBox.confirm(`是否确认删除该类型?删除后不可恢复`, '提示', {
+  const typeName = row.name.replace(/<span class="keyword-highlight">(.*?)<\/span>/g, '$1');
+	ElMessageBox.confirm(`是否确认删除:${typeName}?删除后不可恢复`, '提示', {
 		confirmButtonText: '确定',
 		cancelButtonText: '取消',
 		type: 'warning',

+ 19 - 0
src/views/statistics/order/detailHotspotArea.vue

@@ -294,6 +294,25 @@ const queryList = () => {
 					state.loading = false;
 				});
 			break;
+		case 'orgHotspot': // 热点类型部门统计
+			exportMethod.value = departmentHotSmallDetailExport; // 导出接口
+			requestParams.value = {
+				PageIndex: state.queryParams.PageIndex,
+				PageSize: state.queryParams.PageSize,
+				HotspotCode: routeQueryParams.HotspotCode,
+				StartTime: state.queryParams.crTime[0],
+				EndTime: state.queryParams.crTime[1],
+			};
+			departmentHotSmallDetail(requestParams.value)
+				.then((res: any) => {
+					state.tableData = res.result?.items ?? [];
+					state.total = res.result?.total ?? 0;
+					state.loading = false;
+				})
+				.catch(() => {
+					state.loading = false;
+				});
+			break;
 		default:
 			break;
 	}

+ 62 - 26
src/views/statistics/order/orgHotspot.vue

@@ -1,37 +1,38 @@
 <template>
 	<div class="statistics-order-hotspot-container layout-padding">
-    <div class="layout-padding-auto layout-padding-view pd20">
-      <div class="table-search-content">
-        <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
+		<div class="layout-padding-auto layout-padding-view pd20">
+			<div class="table-search-content">
+				<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
 					<el-form-item prop="crTime">
-						<statistical-time v-model="state.queryParams.crTime" @change="handleQuery" ref="statisticalTimeRef" :disabled="state.loading"/>
+						<statistical-time v-model="state.queryParams.crTime" @change="handleQuery" ref="statisticalTimeRef" :disabled="state.loading" />
 					</el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
-            <el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
-              <SvgIcon name="ele-Refresh" class="mr5" />重置
-            </el-button>
-          </el-form-item>
-        </el-form>
-      </div>
+					<el-form-item>
+						<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+						<el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
+							<SvgIcon name="ele-Refresh" class="mr5" />重置
+						</el-button>
+					</el-form-item>
+				</el-form>
+			</div>
 			<div style="overflow: hidden; width: 100%; height: 100%; flex: 1">
 				<vxe-grid v-bind="gridOptions"> </vxe-grid>
 			</div>
 		</div>
 	</div>
 </template>
-<script setup lang="ts" name="statisticsOrderOrgHotspot">
+<script setup lang="tsx" name="statisticsOrderOrgHotspot">
 import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
 import { FormInstance } from 'element-plus';
-import { departmentHotDetail } from '@/api/statistics/order';
-import { defaultDate, } from "@/utils/constants";
+import { departmentHotDetail, departmentUnsatisfiedExport } from '@/api/statistics/order';
+import { defaultDate } from '@/utils/constants';
 import XEUtils from 'xe-utils';
-
+import { useRouter } from 'vue-router';
+import Other from '@/utils/other';
 
 const StatisticalTime = defineAsyncComponent(() => import('@/components/StatisticalTime/index.vue')); // 日期类型选择组件
 // 定义变量内容
 const ruleFormRef = ref<RefType>(); // 表单ref
-const state = reactive(<any>{
+const state = reactive({
 	queryParams: {
 		// 查询条件
 		crTime: defaultDate, // 时间默认今天开始到今天结束
@@ -40,6 +41,7 @@ const state = reactive(<any>{
 	loading: false, // 加载
 	total: 0, // 总数
 });
+const requestParams = ref<EmptyObjectType>({});
 const gridOptions = reactive<any>({
 	loading: false,
 	border: true,
@@ -50,7 +52,7 @@ const gridOptions = reactive<any>({
 	},
 	scrollY: {
 		enabled: true,
-		gt: 100
+		gt: 100,
 	},
 	toolbarConfig: {
 		zoom: true,
@@ -60,12 +62,13 @@ const gridOptions = reactive<any>({
 				queryList();
 			},
 		},
+		tools: [{ toolRender: { name: 'exportAll' } }],
 	},
 	customConfig: {
-		storage: true
+		storage: true,
 	},
 	id: 'statisticsOrderOrgHotspot',
-	rowConfig: { isHover: true, height: 30,isCurrent:true,useKey:true },
+	rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
 	height: 'auto',
 	columns: [],
 	data: [],
@@ -80,6 +83,11 @@ const gridOptions = reactive<any>({
 			}),
 		];
 	},
+	params: {
+		exportMethod: departmentUnsatisfiedExport,
+		exportParams: requestParams,
+		isSpecialExport: true,
+	},
 });
 /** 搜索按钮操作 */
 const handleQuery = () => {
@@ -90,11 +98,11 @@ const handleQuery = () => {
 const queryList = () => {
 	state.loading = true;
 	gridOptions.loading = true;
-	let request:EmptyObjectType = {};
-	request.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
-	request.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
-	Reflect.deleteProperty(request, 'crTime');
-	departmentHotDetail(request)
+	requestParams.value = Other.deepClone(state.queryParams);
+	requestParams.value.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
+	requestParams.value.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
+	Reflect.deleteProperty(requestParams.value, 'crTime');
+	departmentHotDetail(requestParams.value)
 		.then((res: any) => {
 			const columns = res.result?.hotSpot ?? [];
 			gridOptions.columns = columns.map((item: any) => {
@@ -104,6 +112,15 @@ const queryList = () => {
 					id: item.id,
 					field: item.id,
 					title: item.hotSpotName,
+					slots: {
+						default(scope: any) {
+							return (
+								<el-button type="primary" onClick={() => linkDetail(scope)} link>
+									{scope.row[item.id]}
+								</el-button>
+							);
+						},
+					},
 				};
 			});
 			gridOptions.columns.unshift(
@@ -120,8 +137,8 @@ const queryList = () => {
 				}
 			);
 			let tableData = res.result?.data ?? [];
+			let arr: EmptyArrayType = [];
 			// 判断部门名称是否重复 重复的合并数据 并去除重复数据
-			const arr = <any>[];
 			tableData.forEach((item: any) => {
 				const index = arr.findIndex((v: any) => v.OrgName === item.OrgName);
 				if (index === -1) {
@@ -130,6 +147,7 @@ const queryList = () => {
 					arr[index] = Object.assign(arr[index], item);
 				}
 			});
+
 			// 添加合计
 			arr.forEach((item: any) => {
 				item.sum = 0;
@@ -156,6 +174,24 @@ const resetQuery = (formEl: FormInstance | undefined) => {
 	statisticalTimeRef.value.reset();
 	queryList();
 };
+// 查看详情
+const router = useRouter();
+const linkDetail = (scope: any) => {
+	const columnKey = Object.keys(scope.row).find((item) => item === scope.column.property);
+	const startTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
+	const endTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
+
+	router.push({
+		path: '/statistics/order/detailHotspotArea',
+		query: {
+			StartTime: requestParams.value.StartTime,
+			EndTime: requestParams.value.EndTime,
+			HotspotCode: row.hotspotCode,
+			tagsViewName: `热点类型部门统计明细`,
+			type: 'orgHotspot',
+		},
+	});
+};
 onMounted(() => {
 	queryList();
 });

+ 14 - 14
src/views/statistics/order/visitDiscontent.vue

@@ -49,7 +49,7 @@ const state = reactive<any>({
 		// 查询条件
 		OrgName: null, // 关键词
 		crTime: defaultDate, // 时间默认今天开始到今天结束
-		OrgProcessingResults:'',
+		OrgProcessingResults: '',
 	},
 	loading: false, // 加载
 	tableData: [],
@@ -68,7 +68,7 @@ const gridOptions = reactive<any>({
 	},
 	scrollY: {
 		enabled: true,
-		gt: 100
+		gt: 100,
 	},
 	toolbarConfig: {
 		zoom: true,
@@ -78,15 +78,13 @@ const gridOptions = reactive<any>({
 				queryList();
 			},
 		},
-		tools:[
-			{ toolRender: { name: 'exportAll' } }
-		]
+		tools: [{ toolRender: { name: 'exportAll' } }],
 	},
 	customConfig: {
-		storage: true
+		storage: true,
 	},
 	id: 'statisticsVisitDiscontent',
-	rowConfig: { isHover: true, height: 30,isCurrent:true,useKey:true },
+	rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
 	height: 'auto',
 	columns: [],
 	data: [],
@@ -101,9 +99,11 @@ const gridOptions = reactive<any>({
 			}),
 		];
 	},
-	params:{
-		exportMethod: departmentUnsatisfiedExport, exportParams: requestParams,isSpecialExport:true
-	}
+	params: {
+		exportMethod: departmentUnsatisfiedExport,
+		exportParams: requestParams,
+		isSpecialExport: true,
+	},
 });
 /** 搜索按钮操作 */
 const handleQuery = () => {
@@ -130,14 +130,14 @@ const queryList = () => {
 					minWidth: 120,
 					align: 'center',
 					slots: {
-						default (scope:any) {
+						default(scope: any) {
 							return (
 								<el-button type="primary" onClick={() => linkDetail(scope)} link>
 									{scope.row[item.dicDataValue]}
 								</el-button>
-							)
-						}
-					}
+							);
+						},
+					},
 				};
 			});
 			gridOptions.columns.unshift({

+ 2 - 1
src/views/system/config/dict/index.vue

@@ -237,7 +237,8 @@ const onOpenEditUser = (row: any) => {
 };
 // 删除字典
 const onDelete = (row: any) => {
-	ElMessageBox.confirm(`此操作将永久删除字典:${row.dicDataName}, 是否继续?`, '提示', {
+  const dictName = row.dicDataName.replace(/<span class="keyword-highlight">(.*?)<\/span>/g, '$1');
+	ElMessageBox.confirm(`此操作将永久删除字典:${dictName}, 是否继续?`, '提示', {
 		confirmButtonText: '确定',
 		cancelButtonText: '取消',
 		type: 'warning',

+ 2 - 1
src/views/system/menu/index.vue

@@ -151,7 +151,8 @@ const onOpenEditMenu = (row: RouteRecordRaw) => {
 };
 // 删除当前行
 const onTableRowDel = (row: any) => {
-	ElMessageBox.confirm(`此操作将永久删除菜单:${row.pageName}, 是否继续?`, '提示', {
+  const pageName = row.pageName.replace(/<span class="keyword-highlight">(.*?)<\/span>/g, '$1');
+	ElMessageBox.confirm(`此操作将永久删除菜单:${pageName}, 是否继续?`, '提示', {
 		confirmButtonText: '确定',
 		cancelButtonText: '取消',
 		type: 'warning',

+ 2 - 1
src/views/system/organize/index.vue

@@ -164,7 +164,8 @@ const onOpenEditOrg = (row: any) => {
 // 	}).catch(() => { });
 // };
 const onDelete = (row: any) => {
-	ElMessageBox.confirm(`此操作将永久删除部门:${row.name}, 是否继续?`, '提示', {
+  const orgName = row.name.replace(/<span class="keyword-highlight">(.*?)<\/span>/g, '$1');
+	ElMessageBox.confirm(`此操作将永久删除部门:${orgName}, 是否继续?`, '提示', {
 		confirmButtonText: '确定',
 		cancelButtonText: '取消',
 		type: 'warning',