Browse Source

fix:工单详情报错修复;

zhangchong 1 year ago
parent
commit
fc4a1c5951
2 changed files with 4 additions and 3 deletions
  1. 2 1
      src/utils/PhoneScript.ts
  2. 2 2
      src/views/business/order/components/Order-detail.vue

+ 2 - 1
src/utils/PhoneScript.ts

@@ -23,7 +23,8 @@ let timer: any = null;
 let time = 0;
 // 开始计时
 const startTime = debounce(() => {
-    let talkTime = telStatusInfo.value.callTime
+    // @ts-ignore
+    let talkTime = telStatusInfo.value?.callTime ?? 0;
     if (talkTime) {
         time = Number(talkTime);
         timer = setInterval(() => {

+ 2 - 2
src/views/business/order/components/Order-detail.vue

@@ -400,8 +400,8 @@ const getDetail = async (id: string) => {
 	try {
 		const res: any = await orderDetail(id);
 		state.ruleForm = res.result;
-		state.workflow = state.ruleForm?.workflow;
-		state.supplements = res.result?.workflow?.supplements;
+		state.workflow = state.ruleForm?.workflow ?? {};
+		state.supplements = res.result?.workflow?.supplements ?? [];
 		state.loading = false;
 		state.isShowDialog = true;
 	} catch (error) {