zhangchong 1 месяц назад
Родитель
Сommit
15ff7d4e8a

+ 23 - 2
src/api/early/manage.ts

@@ -13,7 +13,7 @@ export const getEarlyManageList = (params?: object) => {
 		method: 'get',
 		params,
 	});
-}
+};
 /**
  * @description 获取预警管理详情
  * @param {string}  id
@@ -23,4 +23,25 @@ export const getEarlyManageDetail = (id: string) => {
 		url: `/api/v1/Early/get-earlyorder/${id}`,
 		method: 'get',
 	});
-}
+};
+/**
+ * @description 获取预警基础参数
+ * @param {object}  params
+ */
+export const getEarlyBaseData = (params?: object) => {
+	return request({
+		url: `/api/v1/order/early-base-data`,
+		method: 'get',
+		params,
+	});
+};
+/**
+ * @description 获取工单详情预警信息
+ * @param {string}  id
+ */
+export const getOrderEarlyInfo = (id: string) => {
+	return request({
+		url: `/api/v1/order/orderearly/${id}`,
+		method: 'get',
+	});
+};

+ 19 - 2
src/components/OrderDetail/index.vue

@@ -219,6 +219,15 @@
 							<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>
 							<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>
@@ -757,6 +766,8 @@ import { useUserInfo } from '@/stores/userInfo';
 import { storeToRefs } from 'pinia';
 import { useThemeConfig } from '@/stores/themeConfig';
 import { useRouter } from 'vue-router';
+import { getOrderEarlyInfo } from '@/api/early/manage';
+import { useAppConfig } from '@/stores/appConfig';
 
 // 引入组件
 const OrderExpandDetail = defineAsyncComponent(() => import('@/views/business/order/components/Order-expand-detail.vue')); // 扩展信息
@@ -851,6 +862,8 @@ const state = reactive<any>({
 	workflow: {}, // 工单流程内容
 	orderId: '', //工单id
 });
+const appConfigStore = useAppConfig();
+const { AppConfigInfo } = storeToRefs(appConfigStore); // 系统配置信息
 const ruleFormRef = ref<RefType>(); // 表单ref
 // 高亮关键词
 const showKeyWord = (val: string[], keywordArr: string[]) => {
@@ -886,6 +899,10 @@ const getOrderDetail = async (id: string) => {
 		state.workflow = state.ruleForm?.workflow ?? {};
 		state.orderComplements = result?.orderComplements ?? [];
 		state.loading = false;
+		if (AppConfigInfo.value.isEarly) {
+			const earlyRes = await getOrderEarlyInfo(id); // 查询预警详情
+			console.log(earlyRes, 'earlyRes');
+		}
 	} catch (error: any) {
 		state.loading = false;
 		state.dialogVisible = false;
@@ -924,9 +941,9 @@ const getMapInfo = async () => {
 	markData.value = { ...markData.value, ...state.ruleForm };
 };
 // 获取附件列表
-const getFileList = ()=>{
+const getFileList = () => {
 	// console.log(state.ruleForm);
-}
+};
 // 打开弹窗
 const openDialog = (val: any) => {
 	if (!val || !val.id) {

+ 1 - 0
src/router/backEnd.ts

@@ -78,6 +78,7 @@ const getAppConfigFn = async () => {
 			recordDownLoadPrefix: result.recordDownLoadPrefix ?? '', // 录音下载前缀
 			luzhouhcp: result.luzhouhcp ?? false, // 是否开启泸州好差评
 			locationCenter: result.locationCenter ?? [], // 城市中心点
+			isEarly: result.isEarly ?? false, // 是否开启预警
 		});
 		/*	console.log(
 			`是否开启小休审批${result.isRestApproval},自动话后整理时间${result.talkingDealTime}秒,

+ 1 - 0
src/stores/appConfig.ts

@@ -32,6 +32,7 @@ export const useAppConfig = defineStore('AppConfig', {
 			recordDownLoadPrefix: '', // 录音下载前缀
 			locationCenter: [], // 城市中心点
 			luzhouhcp:false, // 是否开启泸州好差评
+			isEarly: false, // 是否开启预警
 		},
 	}),
 	actions: {

+ 1 - 0
src/types/pinia.d.ts

@@ -142,6 +142,7 @@ declare interface AppConfigState {
 		recordDownLoadPrefix: string; // 录音下载前缀
 		locationCenter: number[]; // 城市中心点
 		luzhouhcp: boolean; // 是否开启泸州好差评
+		isEarly: boolean; // 是否开启预警
 		fileExt: string;
 		[x: string]: any;
 	};

+ 1 - 1
src/views/snapshot/statistics/pointList.vue

@@ -159,7 +159,7 @@ const gridOptions = reactive<any>({
 		{ field: 'outPoints', title: '已兑换积分' },
 		{ field: 'validPoints', title: '当前可用积分' },
 		{ field: 'rank', title: '当前排名', sortable: true },
-		{ title: '操作', width: 120, fixed: 'right', align: 'center', slots: { default: 'action' } },
+		{ title: '操作', width: 130, fixed: 'right', align: 'center', slots: { default: 'action' } },
 	],
 	data: [],
 	sortConfig: {

+ 20 - 7
src/views/todo/seats/accept/ybAccept.vue

@@ -482,7 +482,7 @@
 								<repeat-event ref="repeatEventRef" @orderAddRepeat="orderAddRepeat" :repeatIds="state.ruleForm.repeatableEventDetails" />
 							</el-tab-pane>
 							<el-tab-pane label="知识库" name="knowledge">
-								<Knowledge ref="knowledgeRef" :formData="state.ruleForm" @changeYYType="changeYYType"/>
+								<Knowledge ref="knowledgeRef" :formData="state.ruleForm" @changeYYType="changeYYType" />
 							</el-tab-pane>
 						</el-tabs>
 					</el-card>
@@ -532,6 +532,7 @@ import { removeDuplicate } from '@/utils/arrayOperation';
 import { Local, Session } from '@/utils/storage';
 import { watchPausable } from '@vueuse/core';
 import { useThemeConfig } from '@/stores/themeConfig';
+import { getEarlyBaseData } from '@/api/early/manage';
 
 // 引入组件
 const VoiceAssistant = defineAsyncComponent(() => import('@/views/todo/seats/accept/Voice-assistant.vue')); // 语音助手
@@ -583,10 +584,10 @@ const state = reactive<any>({
 		eventCategoryId: null, // 事件分类
 		incidentTime: null, // 事发时间
 		incidentPurpose: null, // 事件目的
-/*		areaCode: themeConfig.value.cityCode, // 区域编码
+		/*		areaCode: themeConfig.value.cityCode, // 区域编码
 		city: themeConfig.value.cityName, // 市*/
-		areaCode:null, // 区域编码
-		city:null, // 市
+		areaCode: null, // 区域编码
+		city: null, // 市
 		street: null, // 街道
 		isRepeat: 'false', // 是否重复工单 默认否
 		pushType: null, // 推送类型
@@ -614,8 +615,8 @@ const state = reactive<any>({
 			dicDataName: '咨询',
 		},
 		knowledgeQuote: [], // 知识库引用
-		longitude:null,//经度
-		latitude:null,//纬度
+		longitude: null, //经度
+		latitude: null, //纬度
 	},
 	formLoading: false, // 表单加载状态
 	hotspotExternal: [], // 热点分类外部数据
@@ -949,7 +950,7 @@ const changeFocusEvent = (val: string[]) => {
 };
 // 受理内容失去焦点查询知识库
 const blurContent = () => {
-	if(state.ruleForm.content){
+	if (state.ruleForm.content) {
 		knowledgeRef.value.knowledgeRetrievalPaged();
 	}
 };
@@ -1447,10 +1448,22 @@ const handleBeforeUnload = (event: any) => {
 	event.preventDefault();
 	event.returnValue = ''; // 对于某些浏览器,设置 returnValue
 };
+// 查询预警基础参数
+const warningBaseData = async () => {
+	try {
+		const { result } = await getEarlyBaseData();
+		console.log(result);
+	} catch (error) {
+		console.log(error);
+	}
+};
 onMounted(async () => {
 	await loadBaseData();
 	state.tagsViewList = await Session.get('tagsViewList');
 	window.addEventListener('beforeunload', handleBeforeUnload);
+	if (AppConfigInfo.value.isEarly) {
+		await warningBaseData();
+	}
 });
 onUnmounted(() => {
 	window.removeEventListener('beforeunload', handleBeforeUnload);