Prechádzať zdrojové kódy

reactor:工单受理调整;

zhangchong 1 rok pred
rodič
commit
0646e3c3c2

+ 8 - 5
src/views/todo/seats/accept/Citizen-portrait.vue

@@ -236,11 +236,14 @@ const closeTag = (item: any) => {
 		})
 		.catch(() => {});
 };
-onMounted(async () => {
-  await nextTick()
-	getCitizen();
-  console.log('321')
-});
+watch(
+  () => props.orderInfo,
+  (newVal: any) => {
+    state.orderInfo = newVal;
+    getCitizen();
+  },
+  { immediate: true }
+);
 defineExpose({
 	getCitizen,
 });

+ 10 - 1
src/views/todo/seats/accept/History.vue

@@ -37,7 +37,7 @@
 	/>
 </template>
 <script setup lang="ts" name="orderAcceptHistory">
-import {nextTick, onMounted, reactive, ref} from 'vue';
+import {nextTick, onMounted, reactive, ref, watch} from 'vue';
 import { FormInstance } from 'element-plus';
 import { throttle } from '/@/utils/tools';
 import { historyOrder } from '/@/api/business/order';
@@ -152,6 +152,15 @@ onMounted(async () => {
   await nextTick()
 	searchHistory();
 });
+watch(
+  () => props.ruleForm.contact,
+  (newVal: any) => {
+    if (newVal) {
+      searchHistory();
+    }
+  },
+  { immediate: true }
+);
 defineExpose({
 	multipleSelection,
 	multipleTableRef,

+ 7 - 7
src/views/todo/seats/accept/Voice-assistant.vue

@@ -4,18 +4,18 @@
 		<el-scrollbar class="h100" noresize ref="scrollbarRef" max-height="400px" v-if="messageList.length">
 			<div class="chat-box" ref="chatBoxRef">
 				<div v-for="(item, index) in messageList" :key="index" class="chat-item" :class="item.body?.content?.callSentenceInfo?.role">
-					<div v-if="item.body?.content?.callSentenceInfo?.role === 'agent'" class="agent">
-						<img v-lazy="getImageUrl('order/service.png')" alt="" class="agent-avatar" src="" />
-						<div class="agent-name">{{ item.body?.content?.calledNumber }}</div>
-						<div class="agent-content">{{ item.body?.content?.callSentenceInfo.text }}</div>
-						<div class="agent-date">{{ formatDate(item.timestamps, 'YYYY-mm-dd HH:MM:SS') }}</div>
-					</div>
-					<div v-else class="user">
+					<div v-if="item.body?.content?.callSentenceInfo?.role === 'user'" class="user">
 						<img v-lazy="getImageUrl('order/user.png')" alt="" class="user-avatar" src="" />
 						<div class="user-name">{{ item.body?.content?.callerNumber }}</div>
 						<div class="user-content">{{ item.body?.content?.callSentenceInfo.text }}</div>
 						<div class="user-date">{{ formatDate(item.timestamps, 'YYYY-mm-dd HH:MM:SS') }}</div>
 					</div>
+          <div v-else class="agent">
+            <img v-lazy="getImageUrl('order/service.png')" alt="" class="agent-avatar" src="" />
+            <div class="agent-name">{{ item.body?.content?.calledNumber }}</div>
+            <div class="agent-content">{{ item.body?.content?.callSentenceInfo.text }}</div>
+            <div class="agent-date">{{ formatDate(item.timestamps, 'YYYY-mm-dd HH:MM:SS') }}</div>
+          </div>
 				</div>
 				<el-text class="end-call" tag="p" v-if="talkEnd">-- 通话结束 --</el-text>
 			</div>

+ 0 - 1
src/views/todo/seats/accept/index.vue

@@ -1095,7 +1095,6 @@ const loadExtra = async () => {
 onBeforeMount(() => {
 	loadBaseData();
 	loadForm();
-  console.log('123')
 });
 onMounted(async () => {
 	await loadAddress();