Commit acaad5caec7bb19f4211dc789fb256bbef35a535
1 parent
d3b75617
fix(src/views/chart): 修复单个摄像头,部分配置项回显问题
Showing
2 changed files
with
10 additions
and
4 deletions
... | ... | @@ -82,7 +82,7 @@ const sourceTypes = [ |
82 | 82 | |
83 | 83 | const originationOption = ref([]) |
84 | 84 | |
85 | -const url = ref('') | |
85 | +const url = ref<string | null>(null) | |
86 | 86 | |
87 | 87 | const videoOptions = ref<videoListInterface[]>([]) |
88 | 88 | |
... | ... | @@ -116,6 +116,8 @@ const getVideoUrlById = async (id: string) => { |
116 | 116 | |
117 | 117 | const handleChecked = (value: string) => { |
118 | 118 | props.optionData.dataset = '' |
119 | + props.optionData.organization = '' | |
120 | + url.value = null | |
119 | 121 | if (value === sourceTypeEnum.PLATFORM) { |
120 | 122 | getOriginationList() |
121 | 123 | } |
... | ... | @@ -126,17 +128,20 @@ const handleSelect = (_: string, e: videoListInterface) => { |
126 | 128 | //1表示,需要从服务端调取接口换取播放的地址,0则不需要 |
127 | 129 | if (accessMode === AccessMode.Streaming) { |
128 | 130 | getVideoUrlById(id) |
131 | + url.value = id | |
132 | + props.optionData.videoId = id | |
129 | 133 | } else { |
130 | 134 | props.optionData.dataset = value as string |
131 | 135 | } |
132 | 136 | } |
133 | 137 | |
134 | -onMounted(() => { | |
138 | +onMounted(async() => { | |
135 | 139 | if (props.optionData.sourceType === sourceTypeEnum.PLATFORM) { |
136 | 140 | getOriginationList() |
137 | 141 | if (props.optionData.organization) { |
138 | - getVideoLists(props.optionData.organization) | |
142 | + await getVideoLists(props.optionData.organization) | |
139 | 143 | } |
144 | + url.value = props.optionData.videoId | |
140 | 145 | } |
141 | 146 | }) |
142 | 147 | ... | ... |