吉安感知网项目-前端
张含笑
2026-01-29 9fb4de853fc8aab2000f312ba2b8907e3dc9a61d
feat:调整
2 files modified
15 ■■■■ changed files
applications/drone-command/src/views/audioCall.vue 12 ●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/orderDataManage/dataObjection/FormDiaLog.vue 3 ●●●● patch | view | raw | blame | history
applications/drone-command/src/views/audioCall.vue
@@ -36,7 +36,7 @@
  import { ref, computed, onBeforeUnmount } from 'vue'
  
  /** ✅ 你的 WS 地址前缀(后面拼 userId) */
  const WS_BASE = 'wss://域名/ws/chat?userId='
const WS_BASE = 'wss://wrj.shuixiongit.com/ws/chat?userId='
  
  const uid = ref('2')
  const peerUid = ref('3')
@@ -64,11 +64,13 @@
    const s = String(seconds.value % 60).padStart(2, '0')
    return `${m}:${s}`
  })
  function startTimer() {
    stopTimer()
    seconds.value = 0
    timer = setInterval(() => seconds.value++, 1000)
  }
  function stopTimer() {
    if (timer) clearInterval(timer)
    timer = null
@@ -76,6 +78,7 @@
  
  // 心跳
  let pingTimer = null
  function startPing() {
    stopPing()
    // 每 25 秒发一次 ping(你后端有 PING/PONG)
@@ -83,6 +86,7 @@
      if (connected.value) send('ping', 'system', null)
    }, 25000)
  }
  function stopPing() {
    if (pingTimer) clearInterval(pingTimer)
    pingTimer = null
@@ -131,7 +135,8 @@
      const stream = e.streams[0]
      if (remoteAudio.value) {
        remoteAudio.value.srcObject = stream
        remoteAudio.value.play().catch(() => {})
            remoteAudio.value.play().catch(() => {
            })
      }
    }
  
@@ -406,7 +411,8 @@
  function cleanup(sendToPeer) {
    try {
      if (sendToPeer) send('hangup', peerUid.value, null)
    } catch {}
    } catch {
    }
  
    stopTimer()
  
applications/task-work-order/src/views/orderView/orderDataManage/dataObjection/FormDiaLog.vue
@@ -292,7 +292,7 @@
    catalogResourceName: fieldRules(true),
    objectionDesc: fieldRules(true),
    objectionBasis: fieldRules(true),
    // attachId: dialogMode.value === 'add' ? fieldRules(true) : fieldRules(false)
    attachId: fieldRules(true)
}
@@ -375,6 +375,7 @@
// 提交数据的通用函数
async function submitForm(objectionStatus) {
formData.value.attachId = uploadedFiles.value.length > 0 ? uploadedFiles.value.length : ''
  const isValid = await formRef.value?.validate().catch(() => false)
  if (!isValid) return