Kaynağa Gözat

reactor:对接预警;

zhangchong 1 ay önce
ebeveyn
işleme
0d10a576dc

+ 1 - 1
.env.development

@@ -3,7 +3,7 @@ VITE_MODE_NAME=development
 # 防止部署多套系统到同一域名不同目录时,变量共用的问题 设置不同的前缀
 VITE_STORAGE_NAME=dev
 # 业务系统基础请求地址
-VITE_API_URL=http://110.188.24.28:50300
+VITE_API_URL=http://110.188.24.28:50100
 # 业务系统socket请求地址
 VITE_API_SOCKET_URL=http://110.188.24.28:50100/hubs/hotline
 # 业务系统文件上传上传请求地址

+ 1 - 1
src/components/OrderDetail/File-list.vue

@@ -7,7 +7,7 @@
 		}"
 	>
 		<template #buttons>
-			<el-button type="primary" @click="onUpload">补传附件</el-button>
+			<el-button type="primary" @click="onUpload" v-auth="'buseiness:order:supplyFiles'">补传附件</el-button>
 			<el-button type="primary" @click="onDownloadBatch" :disabled="isChecked"
 				>批量下载<span v-if="checkTable.length">({{ checkTable.length }})</span></el-button
 			>

+ 31 - 9
src/components/OrderDetail/index.vue

@@ -219,15 +219,33 @@
 							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="['YiBin'].includes(themeConfig.appScope) && state.ruleForm.focusOnEventsName">
 								<el-form-item label="重点关注事件"> {{ state.ruleForm.focusOnEventsName }} </el-form-item>
 							</el-col>
-							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="['YiBin'].includes(themeConfig.appScope)">
-								<el-form-item label="预警词语"> {{ state.ruleForm.focusOnEventsName }} </el-form-item>
-							</el-col>
-							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="['YiBin'].includes(themeConfig.appScope)">
-								<el-form-item label="座席预警预判"> {{ state.ruleForm.focusOnEventsName }} </el-form-item>
-							</el-col>
-							<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" v-if="['YiBin'].includes(themeConfig.appScope)">
-								<el-form-item label="派单组预警预判" label-width="110px"> {{ state.ruleForm.focusOnEventsName }} </el-form-item>
-							</el-col>
+							<template v-if="['YiBin'].includes(themeConfig.appScope) && AppConfigInfo.isEarly">
+								<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6">
+									<el-form-item label="预警词语">
+										<template #label>
+											<p class="flex-center-align">
+												预警词语
+												<el-tooltip content="次数是指工单内含有预警词语的工单数量" placement="top-start" trigger="hover">
+													<SvgIcon name="ele-QuestionFilled" class="ml3"></SvgIcon>
+												</el-tooltip>
+											</p>
+										</template>
+										<div>
+											<div v-for="item in earlyResponse.orderEarlyInfo">
+												<p>
+													{{ item.keyWord }} (<span>近一周:{{ item.weekNum }}次</span> <span>近一个月:{{ item.monthNum }}次</span>)
+												</p>
+											</div>
+										</div>
+									</el-form-item>
+								</el-col>
+								<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6">
+									<el-form-item label="座席预警预判"> </el-form-item>
+								</el-col>
+								<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6">
+									<el-form-item label="派单组预警预判" label-width="110px"> </el-form-item>
+								</el-col>
+							</template>
 							<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
 								<el-form-item label="工单标题">
 									{{ state.ruleForm.title }} <el-tag class="ml10" v-if="state.ruleForm?.workflowId">{{ state.ruleForm.statusText }}</el-tag>
@@ -890,6 +908,9 @@ const prefixOptionsAdd = computed(() => {
 	return ['ZiGong', 'LuZhou'].includes(themeConfig.value.appScope);
 });
 // 查看工单详情
+const earlyResponse = ref<EmptyObjectType>({
+	orderEarlyInfo: [],
+});
 const getOrderDetail = async (id: string) => {
 	state.loading = true;
 	try {
@@ -902,6 +923,7 @@ const getOrderDetail = async (id: string) => {
 		if (AppConfigInfo.value.isEarly) {
 			const earlyRes = await getOrderEarlyInfo(id); // 查询预警详情
 			console.log(earlyRes, 'earlyRes');
+			earlyResponse.value = earlyRes.result ?? {};
 		}
 	} catch (error: any) {
 		state.loading = false;

+ 22 - 0
src/components/ProcessAudit/index.vue

@@ -572,6 +572,28 @@
 						</el-col>
 					</template>
 				</template>
+				<!-- 在派单组并且是开启了预警管理 -->
+				<template v-if="AppConfigInfo.isEarly && isPaidan">
+					<p class="border-title mb10">预警信息</p>
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
+						<el-form-item label="预警词语">
+
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
+						<el-form-item label="坐席预警判断">
+
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
+						<el-form-item label="预警选择" prop="nextMainHandler" :rules="[{ required: false, message: '请选择预警选择', trigger: 'change' }]">
+							<el-select v-model="state.ruleForm.nextMainHandler" placeholder="请选择主办" filterable style="width: 240px">
+								<el-option v-for="item in state.handlerMainOptions" :key="item.key" :label="item.value" :value="item.key" />
+							</el-select>
+							<el-text type="danger">已启动自动预警,选择预警名称</el-text>
+						</el-form-item>
+					</el-col>
+				</template>
 			</el-row>
 		</el-form>
 		<template #footer>

+ 1 - 1
src/views/early/push/components/Push-add.vue

@@ -2,7 +2,7 @@
 	<el-dialog v-model="state.dialogVisible" width="60%" draggable title="新增推送" @close="close" append-to-body destroy-on-close>
 		<el-form :model="state.ruleForm" label-width="110px" ref="ruleFormRef" :disabled="loading">
 			<p class="border-title mb10">基本信息</p>
-			<el-form-item label="推送报告名称" prop="earlyWarningPushName" :rules="[{ required: true, message: '请填推送报告名称', trigger: 'blur' }]">
+			<el-form-item label="推送报告名称" prop="earlyWarningPushName" :rules="[{ required: true, message: '请填推送报告名称', trigger: 'blur' }]">
 				<el-input v-model="state.ruleForm.earlyWarningPushName" placeholder="请填写推送报告名称" clearable></el-input>
 			</el-form-item>
 			<el-form-item label="推送部门" prop="pushOrgs" :rules="[{ required: true, message: '请选择推送部门', trigger: 'change' }]">

+ 1 - 1
src/views/early/setting/index.vue

@@ -165,7 +165,7 @@ const onEdit = (row: any) => {
 };
 // 删除
 const onDelete = (row: any) => {
-	ElMessageBox.confirm(`您确定要删除预警设置【${row.phoneNumber}】吗?`, '提示', {
+	ElMessageBox.confirm(`您确定要删除预警设置【${row.earlyWarningName}】吗?`, '提示', {
 		confirmButtonText: '确认',
 		cancelButtonText: '取消',
 		type: 'warning',

+ 1 - 1
src/views/todo/seats/accept/Order-repeat-select.vue

@@ -155,7 +155,7 @@ const selectConfirm = () => {
 };
 // 清除选中
 const clearSelection = () => {
-	tableRef.value.clearCheckboxRow();
+	tableRef.value?.clearCheckboxRow();
 	checkTable.value = [];
 };
 // 暴露变量

+ 20 - 18
src/views/todo/seats/accept/lzAccept.vue

@@ -516,8 +516,8 @@ const state = reactive<any>({
 			dicDataName: '咨询',
 		},
 		tags: [], // 工单标签
-		longitude:null,//经度
-		latitude:null,//纬度
+		longitude: null, //经度
+		latitude: null, //纬度
 	},
 	formLoading: false, // 表单加载状态
 	hotspotExternal: [], // 热点分类外部数据
@@ -588,7 +588,13 @@ const changeAcceptType = (val: any) => {
 // 选择是否市州互转
 const changeTransPond = (val: any) => {
 	if (!val) {
-		ElMessageBox.confirm(`确认要清除选择的互转市州?`, '提示', {
+		setTimeout(() => {
+			state.ruleForm.transpondCityValue = null;
+			state.ruleForm.transpondCityName = null;
+			state.ruleForm.transpondCityId = null;
+			state.ruleForm.transpondCityObj = null;
+		}, 100);
+		/*		ElMessageBox.confirm(`确认要清除选择的互转市州?`, '提示', {
 			confirmButtonText: '确认',
 			cancelButtonText: '取消',
 			type: 'warning',
@@ -597,16 +603,11 @@ const changeTransPond = (val: any) => {
 			autofocus: false,
 		})
 			.then(() => {
-				setTimeout(() => {
-					state.ruleForm.transpondCityValue = null;
-					state.ruleForm.transpondCityName = null;
-					state.ruleForm.transpondCityId = null;
-					state.ruleForm.transpondCityObj = null;
-				}, 100);
+			
 			})
 			.catch(() => {
 				state.ruleForm.transpond = true;
-			});
+			});*/
 	}
 };
 // 选择市州互转
@@ -742,7 +743,12 @@ const isRepeatChange = (val: string) => {
 };
 // 清除重复件
 const clearRepeat = () => {
-	ElMessageBox.confirm(`确认要清除选择的重复工单?`, '提示', {
+	orderRepeatSelectRef.value?.clearSelection();
+	setTimeout(() => {
+		state.ruleForm.duplicateTitle = null;
+		state.ruleForm.duplicateIds = [];
+	}, 100);
+	/*	ElMessageBox.confirm(`确认要清除选择的重复工单?`, '提示', {
 		confirmButtonText: '确认',
 		cancelButtonText: '取消',
 		type: 'warning',
@@ -751,15 +757,11 @@ const clearRepeat = () => {
 		autofocus: false,
 	})
 		.then(() => {
-			orderRepeatSelectRef.value.clearSelection();
-			setTimeout(() => {
-				state.ruleForm.duplicateTitle = null;
-				state.ruleForm.duplicateIds = [];
-			}, 100);
+
 		})
 		.catch(() => {
 			state.ruleForm.isRepeat = 'true';
-		});
+		});*/
 };
 // 选择重复件
 const orderRepeatSelectRef = ref<RefType>();
@@ -813,7 +815,7 @@ const saveExpandForm = (val: any) => {
 };
 // 受理内容失去焦点查询知识库
 const blurContent = () => {
-	if(state.ruleForm.content){
+	if (state.ruleForm.content) {
 		knowledgeRef.value.knowledgeRetrievalPaged();
 	}
 };

+ 72 - 17
src/views/todo/seats/accept/ybAccept.vue

@@ -405,6 +405,43 @@
 										</el-col>
 									</el-row>
 								</el-col>
+								<!-- 宜宾特殊需求,可配置开关 是否开启预警 -->
+								<template v-if="AppConfigInfo.isEarly">
+									<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+										<el-form-item
+											label="预警类型"
+											prop="seatEarlyWarningTypeValue"
+											:rules="[{ required: state.ruleForm.seatEarlyWarningLevelValue, message: '请选择预警类型', trigger: 'change' }]"
+										>
+											<el-select
+												v-model="state.ruleForm.seatEarlyWarningTypeValue"
+												placeholder="请选择预警类型"
+												class="w100"
+												@change="selectEarlyType"
+												clearable
+											>
+												<el-option v-for="item in earlyWarningType" :key="item.dicDataValue" :label="item.dicDataName" :value="item.dicDataValue" />
+											</el-select>
+										</el-form-item>
+									</el-col>
+									<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
+										<el-form-item
+											label="预警级别"
+											prop="seatEarlyWarningLevelValue"
+											:rules="[{ required: state.ruleForm.seatEarlyWarningTypeValue, message: '请选择预警级别', trigger: 'change' }]"
+										>
+											<el-select
+												v-model="state.ruleForm.seatEarlyWarningLevelValue"
+												placeholder="请选择预警级别"
+												class="w100"
+												@change="selectEarlyLevel"
+												clearable
+											>
+												<el-option v-for="item in earlyWarningLevel" :key="item.dicDataValue" :label="item.dicDataName" :value="item.dicDataValue" />
+											</el-select>
+										</el-form-item>
+									</el-col>
+								</template>
 								<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
 									<el-form-item
 										label="工单标题"
@@ -617,6 +654,10 @@ const state = reactive<any>({
 		knowledgeQuote: [], // 知识库引用
 		longitude: null, //经度
 		latitude: null, //纬度
+		seatEarlyWarningTypeValue: null, //预警类型
+		seatEarlyWarningTypeName:null, //预警类型名称
+		seatEarlyWarningLevelValue:null, // 预警级别
+		seatEarlyWarningLevelName:null, // 预警级别名称
 	},
 	formLoading: false, // 表单加载状态
 	hotspotExternal: [], // 热点分类外部数据
@@ -837,7 +878,12 @@ const isRepeatChange = (val: string) => {
 };
 // 清除重复件
 const clearRepeat = () => {
-	ElMessageBox.confirm(`确认要清除选择的重复工单?`, '提示', {
+	orderRepeatSelectRef.value?.clearSelection();
+	setTimeout(() => {
+		state.ruleForm.duplicateTitle = null;
+		state.ruleForm.duplicateIds = [];
+	}, 100);
+/*	ElMessageBox.confirm(`确认要清除选择的重复工单?`, '提示', {
 		confirmButtonText: '确认',
 		cancelButtonText: '取消',
 		type: 'warning',
@@ -846,15 +892,9 @@ const clearRepeat = () => {
 		autofocus: false,
 	})
 		.then(() => {
-			orderRepeatSelectRef.value.clearSelection();
-			setTimeout(() => {
-				state.ruleForm.duplicateTitle = null;
-				state.ruleForm.duplicateIds = [];
-			}, 100);
+
 		})
-		.catch(() => {
-			state.ruleForm.isRepeat = 'true';
-		});
+		.catch(() => {});*/
 };
 // 选择重复件
 const orderRepeatSelectRef = ref<RefType>();
@@ -870,7 +910,13 @@ const orderRepeatSuccess = (row: any) => {
 // 选择是否市州互转
 const changeTransPond = (val: any) => {
 	if (!val) {
-		ElMessageBox.confirm(`确认要清除选择的互转市州?`, '提示', {
+		setTimeout(() => {
+			state.ruleForm.transpondCityValue = null;
+			state.ruleForm.transpondCityName = null;
+			state.ruleForm.transpondCityId = null;
+			state.ruleForm.transpondCityObj = null;
+		}, 100);
+	/*	ElMessageBox.confirm(`确认要清除选择的互转市州?`, '提示', {
 			confirmButtonText: '确认',
 			cancelButtonText: '取消',
 			type: 'warning',
@@ -879,16 +925,11 @@ const changeTransPond = (val: any) => {
 			autofocus: false,
 		})
 			.then(() => {
-				setTimeout(() => {
-					state.ruleForm.transpondCityValue = null;
-					state.ruleForm.transpondCityName = null;
-					state.ruleForm.transpondCityId = null;
-					state.ruleForm.transpondCityObj = null;
-				}, 100);
+
 			})
 			.catch(() => {
 				state.ruleForm.transpond = true;
-			});
+			});*/
 	}
 };
 const historyOrderRef = ref<RefType>(); // 历史工单组件
@@ -1449,14 +1490,28 @@ const handleBeforeUnload = (event: any) => {
 	event.returnValue = ''; // 对于某些浏览器,设置 returnValue
 };
 // 查询预警基础参数
+const earlyWarningLevel = ref<EmptyArrayType>([]); // 预警级别选项
+const earlyWarningType = ref<EmptyArrayType>([]); // 预警类型选项
 const warningBaseData = async () => {
 	try {
 		const { result } = await getEarlyBaseData();
+		earlyWarningLevel.value = result?.earlyWarningLevel ?? [];
+		earlyWarningType.value = result?.earlyWarningType ?? [];
 		console.log(result);
 	} catch (error) {
 		console.log(error);
 	}
 };
+// 选择预警类型
+const selectEarlyType = (val: any) => {
+	const item = earlyWarningType.value.find((item: any) => item.dicDataValue === val);
+	state.ruleForm.seatEarlyWarningTypeName = item?.dicDataName;
+};
+// 选择预警级别
+const selectEarlyLevel = (val: any) => {
+	const item = earlyWarningLevel.value.find((item: any) => item.dicDataValue === val);
+	state.ruleForm.seatEarlyWarningLevelName = item?.dicDataName;
+};
 onMounted(async () => {
 	await loadBaseData();
 	state.tagsViewList = await Session.get('tagsViewList');

+ 17 - 15
src/views/todo/seats/accept/zgAccept.vue

@@ -618,7 +618,13 @@ const changeIndustry = (val: any) => {
 // 选择是否市州互转
 const changeTransPond = (val: any) => {
 	if (!val) {
-		ElMessageBox.confirm(`确认要清除选择的互转市州?`, '提示', {
+		setTimeout(() => {
+			state.ruleForm.transpondCityValue = null;
+			state.ruleForm.transpondCityName = null;
+			state.ruleForm.transpondCityId = null;
+			state.ruleForm.transpondCityObj = null;
+		}, 100);
+/*		ElMessageBox.confirm(`确认要清除选择的互转市州?`, '提示', {
 			confirmButtonText: '确认',
 			cancelButtonText: '取消',
 			type: 'warning',
@@ -627,16 +633,11 @@ const changeTransPond = (val: any) => {
 			autofocus: false,
 		})
 			.then(() => {
-				setTimeout(() => {
-					state.ruleForm.transpondCityValue = null;
-					state.ruleForm.transpondCityName = null;
-					state.ruleForm.transpondCityId = null;
-					state.ruleForm.transpondCityObj = null;
-				}, 100);
+
 			})
 			.catch(() => {
 				state.ruleForm.transpond = true;
-			});
+			});*/
 	}
 };
 // 选择市州互转
@@ -772,7 +773,12 @@ const isRepeatChange = (val: string) => {
 };
 // 清除重复件
 const clearRepeat = () => {
-	ElMessageBox.confirm(`确认要清除选择的重复工单?`, '提示', {
+	orderRepeatSelectRef.value?.clearSelection();
+	setTimeout(() => {
+		state.ruleForm.duplicateTitle = null;
+		state.ruleForm.duplicateIds = [];
+	}, 100);
+/*	ElMessageBox.confirm(`确认要清除选择的重复工单?`, '提示', {
 		confirmButtonText: '确认',
 		cancelButtonText: '取消',
 		type: 'warning',
@@ -781,15 +787,11 @@ const clearRepeat = () => {
 		autofocus: false,
 	})
 		.then(() => {
-			orderRepeatSelectRef.value.clearSelection();
-			setTimeout(() => {
-				state.ruleForm.duplicateTitle = null;
-				state.ruleForm.duplicateIds = [];
-			}, 100);
+
 		})
 		.catch(() => {
 			state.ruleForm.isRepeat = 'true';
-		});
+		});*/
 };
 // 选择重复件
 const orderRepeatSelectRef = ref<RefType>();