| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-divider>无人机设置</el-divider> |
| | | |
| | | <el-divider v-if="deviceInfo">无人机设置</el-divider> |
| | | <!-- 设置 0:白热,1:黑热,2:描红,3:医疗,5:彩虹 1,6:铁红,8:北极,11:熔岩,12:热铁,13:彩虹 2 --> |
| | | <div class="control-cmd-box"> |
| | | <div class="control-cmd-item"> |
| | | <div class="control-cmd-item-left">调色盘样式</div> |
| | | <div class="control-cmd-item" v-for="(item, index) in cameras"> |
| | | <div class="control-cmd-item-left">调色盘样式 {{ item.payload_index }}</div> |
| | | <div class="control-cmd-item-right"> |
| | | <el-select @change="changs" v-model="valueStyle" placeholder="请选择"> |
| | | <el-select @change="changs($event, item)" v-model="valueStyle" placeholder="请选择"> |
| | | <el-option v-for="item in paletteOptions" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | |
| | | // 定义一个数据videoList |
| | | const videoList = reactive([]) |
| | | // 摄像头信息 |
| | | let cameras = reactive([]) |
| | | // 无人机信息 |
| | | let deviceInfo = ref() |
| | | |
| | | // 调色盘选项数据 |
| | | const paletteOptions = [ |
| | |
| | | watch( |
| | | () => Store.state.device.videoSurveillance, |
| | | newObj => { |
| | | // console.log('视频类型监听中', newObj) |
| | | // if (newObj && newObj.live_status && newObj.live_status.length) { |
| | | // let arr = newObj.live_status || [] |
| | | // if (videoList.length == arr.length) { |
| | | // return |
| | | // } |
| | | // arr.forEach(element => { |
| | | // let video_id = element.video_id |
| | | // element.payIndex = video_id.split('/')[1].split('-')[1] |
| | | // }) |
| | | // // videoList.length = 0 // 清空数组 |
| | | // videoList.push(...arr) // 添加新元素 |
| | | // } |
| | | console.log('视频类型监听中', newObj) |
| | | if (newObj && newObj.live_status && newObj.live_status.length) { |
| | | let arr = newObj.live_status || [] |
| | | if (videoList.length == arr.length) { |
| | | return |
| | | } |
| | | arr.forEach(element => { |
| | | let video_id = element.video_id |
| | | element.payIndex = video_id.split('/')[1].split('-')[1] |
| | | }) |
| | | // videoList.length = 0 // 清空数组 |
| | | videoList.push(...arr) // 添加新元素 |
| | | } |
| | | }, |
| | | { |
| | | immediate: true, |
| | |
| | | devices['device'] = value.deviceInfo[props.deviceInfo.child_sn] |
| | | devices['dock'] = value.dockInfo[props.deviceInfo.device_sn] |
| | | devices['gateway'] = value.gatewayInfo |
| | | let cameraList = value.deviceInfo[props.deviceInfo.child_sn]?.cameras || [] |
| | | cameras = reactive([...cameraList]) |
| | | deviceInfo = ref(value.deviceInfo[props.deviceInfo.child_sn]) |
| | | updateDeviceCmdInfoByOsd(cmdList.value, devices) |
| | | } |
| | | }, |
| | |
| | | useConnectWebSocket(messageHandler, webSorketUrl) |
| | | |
| | | // 添加 changs 方法 |
| | | async function changs (value) { |
| | | async function changs (value, item) { |
| | | const payload = { |
| | | thermal_current_palette_style: value |
| | | [item.payload_index]: { |
| | | thermal_current_palette_style: value |
| | | } |
| | | } |
| | | console.log('payload1111111', payload) |
| | | console.log('deviceInfo22222222', props.sn) |
| | | console.log('deviceInfo22222222', props.deviceInfo.workspace_id) |
| | | console.log('payload', payload) |
| | | let data = await setThermalCurrentPaletteStyle(props.sn, props.deviceInfo.workspace_id, payload) |
| | | if (data.code === 0) { |
| | | message.success('修改成功') |