|
@@ -19,7 +19,7 @@ |
|
@@ -19,7 +19,7 @@ |
19
|
<setting-item-box v-if="optionData.sourceType === sourceTypeEnum.CUSTOM" name="源地址" :alone="true">
|
19
|
<setting-item-box v-if="optionData.sourceType === sourceTypeEnum.CUSTOM" name="源地址" :alone="true">
|
20
|
<setting-item>
|
20
|
<setting-item>
|
21
|
<n-input-group>
|
21
|
<n-input-group>
|
22
|
- <n-input v-model:value="optionData.dataset" size="small" placeholder="请输入源地址"></n-input>
|
22
|
+ <n-input v-model:value="optionData.customVideoUrl" size="small" placeholder="请输入源地址"></n-input>
|
23
|
</n-input-group>
|
23
|
</n-input-group>
|
24
|
</setting-item>
|
24
|
</setting-item>
|
25
|
</setting-item-box>
|
25
|
</setting-item-box>
|
|
@@ -59,9 +59,8 @@ import { PropType, ref, onMounted } from 'vue' |
|
@@ -59,9 +59,8 @@ import { PropType, ref, onMounted } from 'vue' |
59
|
import { AccessMode, option, sourceTypeEnum, videoListInterface, sourceTypeNameEnum, Dataset } from './config'
|
59
|
import { AccessMode, option, sourceTypeEnum, videoListInterface, sourceTypeNameEnum, Dataset } from './config'
|
60
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
60
|
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
|
61
|
import { NTreeSelect } from 'naive-ui'
|
61
|
import { NTreeSelect } from 'naive-ui'
|
62
|
-import { getOrganizationList, getVideoList, getVideoUrl } from '@/api/external/common/index'
|
62
|
+import { getOrganizationList, getVideoList } from '@/api/external/common/index'
|
63
|
import { TKUpload } from '@/components/external/Common/TKUpload'
|
63
|
import { TKUpload } from '@/components/external/Common/TKUpload'
|
64
|
-import { getVideoControlStart } from '@/api/external/flvPlay'
|
|
|
65
|
|
64
|
|
66
|
const props = defineProps({
|
65
|
const props = defineProps({
|
67
|
optionData: {
|
66
|
optionData: {
|
|
@@ -111,29 +110,11 @@ const getVideoLists = async (organizationId: string) => { |
|
@@ -111,29 +110,11 @@ const getVideoLists = async (organizationId: string) => { |
111
|
})
|
110
|
})
|
112
|
}
|
111
|
}
|
113
|
|
112
|
|
114
|
-//针对萤石云或者海康威视,根据视频id获取播放流地址
|
|
|
115
|
-const getVideoUrlById = async (id: string) => {
|
|
|
116
|
- const res = await getVideoUrl(id)
|
|
|
117
|
- if (!res) return
|
|
|
118
|
- const { url } = res.data
|
|
|
119
|
- props.optionData.dataset = url
|
|
|
120
|
-}
|
|
|
121
|
-
|
|
|
122
|
-//针对gbt28181,根据设备id和通道号获取播放流地址
|
|
|
123
|
-const getVideoControlList = async (deviceId: string, channelId: string) => {
|
|
|
124
|
- const {
|
|
|
125
|
- data: { flv }
|
|
|
126
|
- } = await getVideoControlStart({
|
|
|
127
|
- deviceId,
|
|
|
128
|
- channelId
|
|
|
129
|
- })
|
|
|
130
|
- props.optionData.dataset = flv
|
|
|
131
|
-}
|
|
|
132
|
-
|
|
|
133
|
const handleChecked = (value: string) => {
|
113
|
const handleChecked = (value: string) => {
|
134
|
props.optionData.dataset = {} as Dataset
|
114
|
props.optionData.dataset = {} as Dataset
|
135
|
props.optionData.organization = ''
|
115
|
props.optionData.organization = ''
|
136
|
props.optionData.videoId = null
|
116
|
props.optionData.videoId = null
|
|
|
117
|
+ props.optionData.customVideoUrl = ''
|
137
|
if (value === sourceTypeEnum.PLATFORM) {
|
118
|
if (value === sourceTypeEnum.PLATFORM) {
|
138
|
getOriginationList()
|
119
|
getOriginationList()
|
139
|
}
|
120
|
}
|
|
@@ -151,14 +132,6 @@ const handleSelect = (_: string, e: videoListInterface) => { |
|
@@ -151,14 +132,6 @@ const handleSelect = (_: string, e: videoListInterface) => { |
151
|
deviceId,
|
132
|
deviceId,
|
152
|
value
|
133
|
value
|
153
|
}
|
134
|
}
|
154
|
-
|
|
|
155
|
- // if (accessMode === AccessMode.Streaming) {
|
|
|
156
|
- // getVideoUrlById(id)
|
|
|
157
|
- // } else if (accessMode === AccessMode.GBT28181) {
|
|
|
158
|
- // getVideoControlList(deviceId, channelId)
|
|
|
159
|
- // } else {
|
|
|
160
|
- // getCustomUrl(customUrl)
|
|
|
161
|
- // }
|
|
|
162
|
}
|
135
|
}
|
163
|
|
136
|
|
164
|
onMounted(() => {
|
137
|
onMounted(() => {
|