Эх сурвалжийг харах

reactor:执法工单调整;

zhangchong 9 сар өмнө
parent
commit
36efadcdbf

+ 54 - 37
src/layout/navBars/breadcrumb/zgTel.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class="phoneControls" v-loading="state.loading">
+	<div class="phoneControls">
 		<el-popover :width="240" trigger="hover" v-model:visible="showPop">
 			<template #reference>
 				<div class="mr20 status-box">
@@ -183,7 +183,7 @@
 	<el-dialog v-model="state.dutyDialogVisible" draggable title="签入" width="500px" :show-close="false">
 		<el-form :model="state.dutyForm" label-width="80px" ref="dutyFormRef" @submit.native.prevent>
 			<el-form-item label="分机号" prop="telNo" :rules="[{ required: true, message: '请选择分机号', trigger: 'change' }]">
-				<el-select-v2
+				<!--				<el-select-v2
 					v-model="state.dutyForm.telNo"
 					:options="telsList"
 					placeholder="请选择分机号"
@@ -194,8 +194,8 @@
 						value: 'no',
 					}"
 					clearable
-				/>
-<!--        <el-input 	v-model="state.dutyForm.telNo"></el-input>-->
+				/>-->
+				<el-input v-model="state.dutyForm.telNo"></el-input>
 			</el-form-item>
 			<el-form-item label="技能组" prop="skillId" :rules="[{ required: true, message: '请选择技能组', trigger: 'change' }]">
 				<el-select-v2
@@ -289,7 +289,7 @@ import { callCenterIsOnThePhone, callCenterIsSignIn, callCenterWs, currentTel }
 import mittBus from '@/utils/mitt';
 import { callCenterSignIn, callCenterSignOut, getCallCenterGroupList, getCallCenterList } from '@/api/callCenter';
 import { getCurrentCityConfig } from '@/utils/appConfig';
-import {useTimeoutFn} from "@vueuse/shared/index";
+import { useTimeoutFn } from '@vueuse/shared/index';
 const state = reactive({
 	dutyDialogVisible: false,
 	loading: false,
@@ -321,7 +321,7 @@ const activeArr = computed(() => {
 		外呼中: ['hangup'], // 静音中
 		保持中: ['hangup', 'hold'], // 保持中
 		onTalkingDeal: ['TalkingDeal'], // 话后整理中
-		三方会议中: ['hangup', 'conference'], // 三方会议呼出中 只能挂断和踢人
+		三方会议中: ['hangup'], // 三方会议中 只能挂断
 	};
 	let arr = <EmptyArrayType>[];
 	if (currentState.value in switchCases) {
@@ -375,7 +375,7 @@ const callId = ref(''); // 通话ID
 const m_IsCallOut = ref(false); // 是否呼出
 const m_IsCallIn = ref(false); // 是否是呼入
 const m_strOpenFlag = ref('2'); // 来电弹屏方式 1-接通弹屏;2-振铃弹屏
-const m_CallOutOpen = ref(true); // 呼出是否弹屏(用于未接统计“回拨”业务处理)
+const m_CallOutOpen = ref(false); // 呼出是否弹屏(用于未接统计“回拨”业务处理)
 const m_bIsOpen = ref(false); // 是否已经弹屏
 const m_bCallConnect = ref(false); // 是否在通话状态
 const m_isRing = ref(false); // 是否振铃中
@@ -729,6 +729,7 @@ const clickOnDuty = (formEl: FormInstance | undefined) => {
 		};
 		wsRef.value.open();
 		state.dutyDialogVisible = false;
+		state.loading = false;
 	});
 };
 // 签入消息回调
@@ -1167,6 +1168,7 @@ const retRehold = (data) => {
 // 外呼
 
 const onCallOut = () => {
+	state.loading = false;
 	state.outboundDialogVisible = true;
 };
 const outboundFormRef = ref<RefType>();
@@ -1228,6 +1230,7 @@ const retCallOut = (data) => {
  * 咨询
  */
 const onConsultOpen = () => {
+	state.loading = false;
 	state.consultDialogVisible = true;
 };
 const consultFormRef = ref<RefType>();
@@ -1353,6 +1356,7 @@ const retResTransfer = (data) => {
  * 盲转
  */
 const onTransferMzOpen = () => {
+	state.loading = false;
 	state.blindDialogVisible = true;
 };
 const blindFormRef = ref<RefType>();
@@ -1376,11 +1380,11 @@ const onTransferMz = (strCallNumber) => {
 	// 发送请求
 	e_TelSendMsg(objMsg);
 	state.loading = false;
-  console.log(`${getNowDateTime()}盲转消息:${JSON.stringify(objMsg)}`)
-  // 结束挂机
-  useTimeoutFn(()=>{
-    sendHangup();
-  },300)
+	console.log(`${getNowDateTime()}盲转消息:${JSON.stringify(objMsg)}`);
+	// 结束挂机
+	useTimeoutFn(() => {
+		sendHangup();
+	}, 300);
 };
 
 /*
@@ -1434,17 +1438,17 @@ const retResConference = (data) => {
 {“Event”: “EvtHangup”}
 */
 const sendHangup = () => {
-  const objMsg = {
-    Action: 'ReqHangup',
-    Param: {
-      Extension: m_strUserNo.value,
-    },
-  };
-  // 发送请求
-  e_TelSendMsg(objMsg);
-}
+	const objMsg = {
+		Action: 'ReqHangup',
+		Param: {
+			Extension: m_strUserNo.value,
+		},
+	};
+	// 发送请求
+	e_TelSendMsg(objMsg);
+};
 const onHangup = () => {
-	ElMessageBox.confirm(`确定要挂,是否继续?`, '提示', {
+	ElMessageBox.confirm(`确定要挂,是否继续?`, '提示', {
 		confirmButtonText: '确认',
 		cancelButtonText: '取消',
 		type: 'warning',
@@ -1453,7 +1457,7 @@ const onHangup = () => {
 		autofocus: false,
 	})
 		.then(() => {
-      sendHangup();
+			sendHangup();
 		})
 		.catch(() => {
 			state.loading = false;
@@ -1496,20 +1500,33 @@ const retHangup = (data?: any) => {
  * 评价
  */
 const i_evaluate = () => {
-	const objMsg = {
-		Action: 'ReqSatisfaction',
-		Param: {
-			Extension: m_strUserNo.value,
-		},
-	};
-	// 发送请求
-	e_TelSendMsg(objMsg);
-	state.loading = false;
-  console.log(`${getNowDateTime()}评价消息:${JSON.stringify(objMsg)}`)
-	// 结束挂机
-  useTimeoutFn(()=>{
-    sendHangup();
-  },300)
+	ElMessageBox.confirm(`确定要开启评价,评价后将直接挂机,是否继续?`, '提示', {
+		confirmButtonText: '确认',
+		cancelButtonText: '取消',
+		type: 'warning',
+		draggable: true,
+		cancelButtonClass: 'default-button',
+		autofocus: false,
+	})
+		.then(() => {
+			const objMsg = {
+				Action: 'ReqSatisfaction',
+				Param: {
+					Extension: m_strUserNo.value,
+				},
+			};
+			// 发送请求
+			e_TelSendMsg(objMsg);
+			state.loading = false;
+			console.log(`${getNowDateTime()}评价消息:${JSON.stringify(objMsg)}`);
+			// 结束挂机
+			useTimeoutFn(() => {
+				sendHangup();
+			}, 300);
+		})
+		.catch(() => {
+			state.loading = false;
+		});
 };
 /*
  * 监听

+ 2 - 2
src/utils/appConfig.ts

@@ -50,8 +50,8 @@ export const getCurrentCityConfig = () => {
 				loginBg: 'login/login_bg.png',
 				isShowLogo: false,
 				favicon: 'zigong/favicon.ico',
-				callCenterSocketUrl: isProduction() ? 'ws://171.94.154.2:7681' : ' ws://123.56.10.71:7681', // 呼叫中心socket地址
-				// callCenterSocketUrl: isProduction() ? 'ws://171.94.154.2:7681' : ' ws://171.94.154.2:7681', // 呼叫中心socket地址
+				// callCenterSocketUrl: isProduction() ? 'ws://171.94.154.2:7681' : ' ws://123.56.10.71:7681', // 呼叫中心socket地址
+				callCenterSocketUrl: isProduction() ? 'ws://171.94.154.2:7681' : ' ws://171.94.154.2:7681', // 呼叫中心socket地址
 				recordPrefix: isProduction() ? 'http://123.56.10.71:8066/' : 'http://123.56.10.71:8066/', // 播放录音地址前缀
 				recordDownLoadPrefix: isProduction() ? 'http://123.56.10.71:8066/' : 'http://123.56.10.71:8066/', // 录音地址下载前缀
 			};

+ 185 - 8
src/views/statistics/center/emergencyList.vue

@@ -1,11 +1,188 @@
-<script setup lang="ts">
-
-</script>
-
 <template>
-
+  <div class="statistics-center-emergency-List-container layout-pd">
+    <el-card shadow="never">
+      <el-row :gutter="10">
+        <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
+          <el-form-item label="受理时间" prop="crTime">
+            <el-date-picker
+                v-model="state.queryParams.crTime"
+                type="daterange"
+                unlink-panels
+                range-separator="至"
+                start-placeholder="开始时间"
+                end-placeholder="结束时间"
+                :shortcuts="shortcuts"
+                @change="handleQuery"
+                value-format="YYYY-MM-DD"
+                :clearable="false"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
+          <el-form-item label="受理类型" prop="AcceptType">
+            <el-select v-model="state.queryParams.AcceptType" placeholder="请选择受理类型" clearable class="w100" @change="handleQuery">
+              <el-option v-for="item in acceptTypeOptions" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
+          <el-form-item label="热点分类" prop="Hotspot">
+            <el-input v-model="state.queryParams.Hotspot" placeholder="热点分类名称" clearable @keyup.enter="handleQuery" />
+          </el-form-item>
+        </el-col>
+        <transition name="el-zoom-in-top" v-show="!searchCol">
+          <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
+            <el-form-item label="事发地址" prop="AreaCode">
+              <el-cascader
+                  :options="areaOptions"
+                  filterable
+                  :props="{ checkStrictly: true, value: 'id', label: 'areaName',emitPath:false }"
+                  placeholder="请选择事发地址"
+                  clearable
+                  class="w100"
+                  v-model="state.queryParams.AreaCode"
+                  @change="handleQuery"
+                  ref="areaRef"
+              >
+              </el-cascader>
+            </el-form-item>
+          </el-col>
+        </transition>
+        <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
+          <el-form-item label=" ">
+            <div class="flex-end w100">
+              <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-button link type="primary" @click="closeSearch" :loading="state.loading">
+                {{ searchCol ? '展开' : '收起' }}
+                <SvgIcon :class="{ 'is-reverse': searchCol }" name="ele-ArrowUp" class="mr5 arrow" size="18px" />
+              </el-button>
+            </div>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-card>
+    <el-card shadow="never">
+      <ProTable
+          ref="proTableRef"
+          :columns="columns"
+          :data="state.tableData"
+          @updateTable="queryList"
+          :loading="state.loading"
+          border
+          @sort-change="sortChange"
+          :total="state.total"
+          v-model:page-index="state.queryParams.PageIndex"
+          v-model:page-size="state.queryParams.PageSize"
+          role-key="orgId"
+          :toolButton="['refresh', 'setting', 'exportCurrent', 'exportAll']"
+          :exportMethod="centerReturnErrorExport"
+          :exportParams="requestParams"
+      >
+      </ProTable>
+    </el-card>
+  </div>
 </template>
+<script setup lang="tsx" name="statisticsCenterEmergencyList">
+import { onMounted, reactive, ref } from 'vue';
+import { FormInstance } from 'element-plus';
+import { centerReturnError, centerReturnErrorExport } from '@/api/statistics/center';
+import { defaultDate, shortcuts } from '@/utils/constants';
+import { useRouter } from 'vue-router';
+import Other from '@/utils/other';
 
-<style scoped lang="scss">
-
-</style>
+// 表格配置项
+const columns = ref<any[]>([
+  { prop: 'orgName', label: '部门名称', align: 'center' },
+  { prop: 'time', label: '记录日期', align: 'center' },
+  {
+    prop: 'num',
+    label: '数量',
+    align: 'center',
+    sortable: 'custom',
+    /*    render: (scope) => {
+      return (
+        <el-button type="primary" link onClick={() => linkDetail(scope.row)}>
+          {scope.row.num}
+        </el-button>
+      );
+    },*/
+  },
+]);
+// 定义变量内容
+const ruleFormRef = ref<RefType>(); // 表单ref
+const state = reactive<any>({
+  queryParams: {
+    // 查询条件
+    PageIndex: 1,
+    PageSize: 10,
+    OrgName: null, // 关键词
+    crTime: defaultDate, // 时间默认今天开始到今天结束
+    SortField: null,
+    SortRule: null,
+  },
+  tableData: [], //表单
+  loading: false, // 加载
+  total: 0, // 总数
+});
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  state.queryParams.PageIndex = 1;
+  queryList();
+};
+/** 获取列表 */
+const requestParams = ref({});
+const queryList = () => {
+  state.loading = true;
+  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');
+  centerReturnError(requestParams.value)
+      .then((res: any) => {
+        state.tableData = res.result?.items ?? [];
+        state.total = res.result?.total ?? 0;
+        state.loading = false;
+      })
+      .catch(() => {
+        state.loading = false;
+      });
+};
+// 排序
+const sortChange = (val: any) => {
+  state.queryParams.SortField = val.order ? val.prop : null;
+  // 0 升序 1 降序
+  state.queryParams.SortRule = val.order ? (val.order == 'descending' ? 1 : 0) : null;
+  queryList();
+};
+/** 重置按钮操作 */
+const resetQuery = (formEl: FormInstance | undefined) => {
+  if (!formEl) return;
+  formEl.resetFields();
+  queryList();
+};
+// 跳转详情
+const router = useRouter();
+const linkDetail = (row: any) => {
+  console.log('详情', row);
+  /*router.push({
+    name: 'statisticsDepartmentOverdueDetail',
+    query: {
+      StartTime: state.queryParams?.crTime[0],
+      EndTime: state.queryParams?.crTime[1],
+      id: row.orgId,
+    },
+  });*/
+};
+// 回退错件明细
+const onDetail = () => {
+  router.push({
+    name: 'statisticsCenterDetailWrongItem',
+  });
+};
+onMounted(() => {
+  queryList();
+});
+</script>