From 4898664c53396d1a8ae0333198a94cf4d7fea5a5 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期四, 14 八月 2025 17:26:27 +0800 Subject: [PATCH] 测试完成 --- src/utils/sipService-cs.js | 2 src/views/index.vue | 2 src/store/modules/user.js | 4 ++ src/views/login.vue | 1 src/views/followvisit/record/detailpage/index.vue | 70 ++++++++++++++++++---------------- src/utils/sipService.js | 2 src/components/CallButton/index.vue | 4 + src/assets/order/example.mp3 | 0 8 files changed, 48 insertions(+), 37 deletions(-) diff --git a/src/assets/order/example.mp3 b/src/assets/order/example.mp3 new file mode 100644 index 0000000..1c210d7 --- /dev/null +++ b/src/assets/order/example.mp3 Binary files differ diff --git a/src/components/CallButton/index.vue b/src/components/CallButton/index.vue index 47931a4..4d055cd 100644 --- a/src/components/CallButton/index.vue +++ b/src/components/CallButton/index.vue @@ -37,7 +37,7 @@ }, }, data() { - const randomNum = Math.floor(Math.random() * 11) + 1000; // 鍐呴儴瀹氫箟 + const randomNum = Math.floor(Math.random() * 20) + 1000; // 鍐呴儴瀹氫箟 return { isCalling: false, callStatus: "idle", // idle, calling, connected, ended @@ -69,6 +69,8 @@ }, }, mounted() { + console.log('褰撳墠鍒嗘満鍙�',this.sipConfig); + sipService.init(this.sipConfig); sipService.onStatusChange = (status) => { this.sipStatus = status.text; diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 36c9b90..ab91acf 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -158,6 +158,10 @@ localStorage.setItem('orgname', '闈掔敯鍘夸腑鍖诲尰闄�'); localStorage.setItem('ZuHuID', '1429338802177000005'); localStorage.setItem('deptCode', ''); + }else if (orgid=='47240004533118111A1001') { + localStorage.setItem('orgname', '榫欐硥甯備汉姘戝尰闄�'); + localStorage.setItem('ZuHuID', '1429338802177000007'); + localStorage.setItem('deptCode', ''); } resolve() }).catch(error => { diff --git a/src/utils/sipService-bd.js b/src/utils/sipService-cs.js similarity index 98% rename from src/utils/sipService-bd.js rename to src/utils/sipService-cs.js index 8318c1a..1654ccc 100644 --- a/src/utils/sipService-bd.js +++ b/src/utils/sipService-cs.js @@ -160,7 +160,7 @@ }; }); this.currentSession.on('failed', (e) => { - this.updateCallStatus('failed', `鍛煎彨澶辫触2: ${e.cause}`); + this.updateCallStatus('failed', `鍛煎彨澶辫触2: ${e}`); }); this.currentSession.on('ended', () => { diff --git a/src/utils/sipService.js b/src/utils/sipService.js index 9088bad..baa65a9 100644 --- a/src/utils/sipService.js +++ b/src/utils/sipService.js @@ -63,7 +63,7 @@ const options = { sessionTimers: true, // 鍚敤浼氳瘽璁℃椂鍣� - sessionTimersExpires: 90, + sessionTimersExpires: 150, extraHeaders: ["Accept: application/sdp"], mediaConstraints: { audio: true, video: false }, rtcOfferConstraints: { diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue index ab859d4..0bcab1a 100644 --- a/src/views/followvisit/record/detailpage/index.vue +++ b/src/views/followvisit/record/detailpage/index.vue @@ -587,7 +587,7 @@ 瀹屾暣璇煶锛� <mini-audio :audio-source=" - voice ? voice : 'https://example.com/example.mp3' + voice ? voice : '@assets/order/example.mp3' " ></mini-audio> </div> @@ -611,7 +611,7 @@ :audio-source=" item.questionvoice ? item.questionvoice - : 'https://example.com/example.mp3' + : '@assets/order/example.mp3' " ></mini-audio> </div> @@ -1267,41 +1267,41 @@ }); }, // 楠岃瘉鐢佃瘽鍙风爜鏍煎紡骞惰繑鍥為敊璇俊鎭� -validatePhoneNumber(phone) { - if (!phone) { - return { isValid: false, message: '璇疯緭鍏ョ數璇濆彿鐮�' }; - } + validatePhoneNumber(phone) { + if (!phone) { + return { isValid: false, message: "璇疯緭鍏ョ數璇濆彿鐮�" }; + } - // 鎵嬫満鍙锋鍒� - const mobileRegex = /^1[3-9]\d{9}$/; + // 鎵嬫満鍙锋鍒� + const mobileRegex = /^1[3-9]\d{9}$/; - // 甯﹀尯鍙风殑鍥哄畾鐢佃瘽锛堝畬鏁存牸寮忥級 - const landlineFullRegex = /^0\d{2,3}-?\d{7,8}$/; + // 甯﹀尯鍙风殑鍥哄畾鐢佃瘽锛堝畬鏁存牸寮忥級 + const landlineFullRegex = /^0\d{2,3}-?\d{7,8}$/; - // 涓嶅甫鍖哄彿鐨勫浐瀹氱數璇濓紙浠呮湰鍦板彿鐮侊級 - const landlineLocalRegex = /^\d{7,8}$/; + // 涓嶅甫鍖哄彿鐨勫浐瀹氱數璇濓紙浠呮湰鍦板彿鐮侊級 + const landlineLocalRegex = /^\d{7,8}$/; - if (mobileRegex.test(phone)) { - return { isValid: true, type: 'mobile' }; - } else if (landlineFullRegex.test(phone)) { - return { isValid: true, type: 'landline' }; - } else if (landlineLocalRegex.test(phone)) { - return { - isValid: false, - message: '鏈湴鍙风爜璇锋坊鍔犲尯鍙凤紙濡�028-1234567锛�' - }; - } else { - return { - isValid: false, - message: '璇疯緭鍏ユ纭殑鐢佃瘽鍙风爜锛堟墜鏈哄彿鎴栧甫鍖哄彿鐨勫浐瀹氱數璇濓級' - }; - } -}, + if (mobileRegex.test(phone)) { + return { isValid: true, type: "mobile" }; + } else if (landlineFullRegex.test(phone)) { + return { isValid: true, type: "landline" }; + } else if (landlineLocalRegex.test(phone)) { + return { + isValid: false, + message: "鏈湴鍙风爜璇锋坊鍔犲尯鍙凤紙濡�028-1234567锛�", + }; + } else { + return { + isValid: false, + message: "璇疯緭鍏ユ纭殑鐢佃瘽鍙风爜锛堟墜鏈哄彿鎴栧甫鍖哄彿鐨勫浐瀹氱數璇濓級", + }; + } + }, -// 浣跨敤绀轰緥 -isValidPhone(phone) { - return this.validatePhoneNumber(phone).isValid; -}, + // 浣跨敤绀轰緥 + isValidPhone(phone) { + return this.validatePhoneNumber(phone).isValid; + }, handleCall(phone, type) { if (!this.isValidPhone(phone)) { this.$message.error("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜"); @@ -1324,7 +1324,7 @@ // 澶勭悊閫氳瘽鐘舵�佸彉鍖� handleCallStatusChange(status) { - console.log(status,'status'); + console.log(status, "status"); this.callStatus = status.type; @@ -1597,6 +1597,10 @@ setupsubtask() { this.$refs["zcform"].validate((valid) => { if (valid) { + if (this.form.date1 && new Date(this.form.date1) < new Date()) { + this.$message.error("闅忚鏃堕棿涓嶈兘灏忎簬褰撳墠鏃堕棿"); + return false; + } this.form.remark = this.form.remark + "銆�" + this.getCurrentTime() + "銆�"; let form = structuredClone(this.form); diff --git a/src/views/index.vue b/src/views/index.vue index d76be1a..f589df9 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -306,7 +306,7 @@ mypPieCharts: null, lastWidth: window.innerWidth, lastHeight: window.innerHeight, - radio1: "鏈�", + radio1: "鍛�", ticketStatistics: {}, timeTypeMap: { 鍛�: "day", diff --git a/src/views/login.vue b/src/views/login.vue index 68eb677..53079bd 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -119,6 +119,7 @@ { value: "47231022633110211A2101", label: "涓芥按甯備腑鍖婚櫌" }, { value: "47246102433112211A2101", label: "缂欎簯鍘夸腑鍖诲尰闄� " }, { value: "47240018433118111A2101", label: "榫欐硥甯備腑鍖诲尰闄� " }, + { value: "47240004533118111A1001", label: "榫欐硥甯備汉姘戝尰闄� " }, { value: "47243006833112611A2101", label: "搴嗗厓鍘夸腑鍖诲尰闄� " }, { value: "47234002X33112111A2101", label: "闈掔敯鍘夸腑鍖诲尰闄� " }, ], -- Gitblit v1.9.3