pagedit
This commit is contained in:
@@ -30,8 +30,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted, defineExpose, defineEmits } from 'vue'
|
||||
import useWebSocket from '../../utils/websocket'
|
||||
import { Loading } from '@element-plus/icons-vue'
|
||||
const videoElement = ref<HTMLVideoElement | null>(null)
|
||||
// const cameraOne = ref("")
|
||||
// const cameraTwo = ref("");
|
||||
const imgOneVal = ref('')
|
||||
@@ -50,8 +48,8 @@ const handleTwoMessage = (e: any) => {
|
||||
}
|
||||
}
|
||||
const cameraNumber = ref<Number>(0)
|
||||
const ws = useWebSocket(handleMessage, import.meta.env.VITE_WB_CAMERA_ONE_URL)
|
||||
const wsTwo = useWebSocket(
|
||||
const ws: any = useWebSocket(handleMessage, import.meta.env.VITE_WB_CAMERA_ONE_URL)
|
||||
const wsTwo: any = useWebSocket(
|
||||
handleTwoMessage,
|
||||
import.meta.env.VITE_WB_CAMERA_TWO_URL
|
||||
)
|
||||
@@ -65,13 +63,11 @@ const closeCamera = () => {
|
||||
const closeWs = () => {
|
||||
if (ws) {
|
||||
ws.handleClose()
|
||||
ws = null
|
||||
}
|
||||
}
|
||||
const closeWsTwo = () => {
|
||||
if (wsTwo) {
|
||||
wsTwo.handleClose()
|
||||
wsTwo = null
|
||||
}
|
||||
}
|
||||
defineExpose({ cameraNumber })
|
||||
|
||||
@@ -105,52 +105,52 @@ import { generateTitle } from '../../utils/i18n'
|
||||
const getIcon = () => {
|
||||
return isCollapse.value ? ArrowLeft : ArrowRight
|
||||
}
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
reasoningList: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
})
|
||||
const chartList = ref<Array<any>>([
|
||||
{
|
||||
type: 'G1',
|
||||
group_name: 'Planner'
|
||||
},
|
||||
{
|
||||
type: 'G2',
|
||||
group_name: 'Retrieval'
|
||||
},
|
||||
{
|
||||
type: 'G3',
|
||||
group_name: 'Generate'
|
||||
},
|
||||
{
|
||||
type: 'G4',
|
||||
group_name: 'Converter'
|
||||
},
|
||||
{
|
||||
type: 'G5',
|
||||
group_name: 'Executor'
|
||||
},
|
||||
{
|
||||
type: 'G6',
|
||||
group_name: 'Optimize'
|
||||
}
|
||||
])
|
||||
// const chartList = ref<Array<any>>([
|
||||
// {
|
||||
// type: 'G1',
|
||||
// group_name: 'Planner'
|
||||
// },
|
||||
// {
|
||||
// type: 'G2',
|
||||
// group_name: 'Retrieval'
|
||||
// },
|
||||
// {
|
||||
// type: 'G3',
|
||||
// group_name: 'Generate'
|
||||
// },
|
||||
// {
|
||||
// type: 'G4',
|
||||
// group_name: 'Converter'
|
||||
// },
|
||||
// {
|
||||
// type: 'G5',
|
||||
// group_name: 'Executor'
|
||||
// },
|
||||
// {
|
||||
// type: 'G6',
|
||||
// group_name: 'Optimize'
|
||||
// }
|
||||
// ])
|
||||
const emits = defineEmits(['changeStatusFun'])
|
||||
const getStatus = (val: any) => {
|
||||
let arr: any = props.reasoningList
|
||||
if (arr.length) {
|
||||
let children: any = arr[arr.length - 1].children
|
||||
if (!children.length) {
|
||||
return false
|
||||
}
|
||||
let group_name = children[children.length - 1].group_name.toLowerCase()
|
||||
return group_name === val.toLowerCase()
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
// const getStatus = (val: any) => {
|
||||
// let arr: any = props.reasoningList
|
||||
// if (arr.length) {
|
||||
// let children: any = arr[arr.length - 1].children
|
||||
// if (!children.length) {
|
||||
// return false
|
||||
// }
|
||||
// let group_name = children[children.length - 1].group_name.toLowerCase()
|
||||
// return group_name === val.toLowerCase()
|
||||
// } else {
|
||||
// return false
|
||||
// }
|
||||
// }
|
||||
const changeStatusFun = () => {
|
||||
isCollapse.value = !isCollapse.value
|
||||
emits('changeStatusFun', isCollapse.value)
|
||||
|
||||
Reference in New Issue
Block a user