Commit 95a3ce008c05635791ddf1df7f094a8a27522e2e

Authored by fengtao
2 parents 571b5b77 31c3bfe8

Merge branch 'main_dev' into fix/edge/08-01

@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <Dropdown placement="bottomLeft" :overlayClassName="`${prefixCls}-dropdown-overlay`"> 2 <Dropdown placement="bottomLeft" :overlayClassName="`${prefixCls}-dropdown-overlay`">
3 <span :class="[prefixCls, `${prefixCls}--${theme}`]" class="flex"> 3 <span :class="[prefixCls, `${prefixCls}--${theme}`]" class="flex">
4 <img :class="`${prefixCls}__header`" :src="getUserInfo.avatar" /> 4 <img :class="`${prefixCls}__header`" :src="getUserInfo.avatar" />
5 - <span :class="`${prefixCls}__info hidden md:block`"> 5 + <span :class="`${prefixCls}__info hidden md:block w-30 truncate`">
6 <span :class="`${prefixCls}__name `" class="truncate"> 6 <span :class="`${prefixCls}__name `" class="truncate">
7 {{ getUserInfo.realName }} 7 {{ getUserInfo.realName }}
8 </span> 8 </span>
@@ -92,10 +92,11 @@ @@ -92,10 +92,11 @@
92 const { getResult } = useFingerprint(); 92 const { getResult } = useFingerprint();
93 const beforeVideoPlay = async (record: CameraRecordItem) => { 93 const beforeVideoPlay = async (record: CameraRecordItem) => {
94 if (isNullOrUnDef(record.accessMode)) return; 94 if (isNullOrUnDef(record.accessMode)) return;
95 - const { url, type } = await getPlayUrl(record); 95 + const { url, type, withToken } = (await getPlayUrl(record)) || {};
96 record.playSourceUrl = url; 96 record.playSourceUrl = url;
97 record.streamType = type; 97 record.streamType = type;
98 record.isTransform = true; 98 record.isTransform = true;
  99 + record.withToken = withToken;
99 }; 100 };
100 101
101 const gridLayout = ref({ gutter: 1, column: 2 }); 102 const gridLayout = ref({ gutter: 1, column: 2 });
@@ -632,9 +632,7 @@ export const formGBTSchema: QFormSchema[] = [ @@ -632,9 +632,7 @@ export const formGBTSchema: QFormSchema[] = [
632 }, 632 },
633 ]; 633 ];
634 634
635 -export async function getPlayUrl(  
636 - params: CameraRecord  
637 -): Promise<{ url: string; type: PlayerStreamType }> { 635 +export async function getPlayUrl(params: CameraRecord) {
638 const { accessMode } = params; 636 const { accessMode } = params;
639 if (accessMode === AccessMode.ManuallyEnter) { 637 if (accessMode === AccessMode.ManuallyEnter) {
640 const { videoUrl } = params; 638 const { videoUrl } = params;
@@ -644,7 +642,11 @@ export async function getPlayUrl( @@ -644,7 +642,11 @@ export async function getPlayUrl(
644 if (isRTSPPlay) { 642 if (isRTSPPlay) {
645 const { getResult } = useFingerprint(); 643 const { getResult } = useFingerprint();
646 const fingerprint = await getResult(); 644 const fingerprint = await getResult();
647 - return { url: getFlvPlayUrl(videoUrl, fingerprint.visitorId), type: 'flv' }; 645 + return {
  646 + url: getFlvPlayUrl(videoUrl, fingerprint.visitorId),
  647 + type: 'flv',
  648 + withToken: true,
  649 + };
648 } else { 650 } else {
649 return { url: videoUrl, type: 'auto' }; 651 return { url: videoUrl, type: 'auto' };
650 } 652 }
@@ -8,7 +8,6 @@ @@ -8,7 +8,6 @@
8 import { createOrEditEdgeInstance } from '/@/api/edgeManage/edgeInstance'; 8 import { createOrEditEdgeInstance } from '/@/api/edgeManage/edgeInstance';
9 import { EdgeInstanceItemType } from '/@/api/edgeManage/model/edgeInstance'; 9 import { EdgeInstanceItemType } from '/@/api/edgeManage/model/edgeInstance';
10 import { buildUUID, randomString } from '/@/utils/uuid'; 10 import { buildUUID, randomString } from '/@/utils/uuid';
11 - import { CopyOutlined } from '@ant-design/icons-vue';  
12 import { handeleCopy } from '/@/views/device/profiles/step/topic'; 11 import { handeleCopy } from '/@/views/device/profiles/step/topic';
13 12
14 const emits = defineEmits(['success', 'register']); 13 const emits = defineEmits(['success', 'register']);
@@ -99,21 +98,17 @@ @@ -99,21 +98,17 @@
99 <template #routingKey="{ model, field }"> 98 <template #routingKey="{ model, field }">
100 <div class="!flex justify-between items-center gap-5"> 99 <div class="!flex justify-between items-center gap-5">
101 <a-input disabled v-model:value="model[field]" /> 100 <a-input disabled v-model:value="model[field]" />
102 - <CopyOutlined  
103 - @click="handleCopyRoutingKey(model[field])"  
104 - class="cursor-pointer"  
105 - style="font-size: 32px"  
106 - /> 101 + <a-button type="link" @click="handleCopyRoutingKey(model[field])" class="cursor-pointer"
  102 + >复制</a-button
  103 + >
107 </div> 104 </div>
108 </template> 105 </template>
109 <template #secret="{ model, field }"> 106 <template #secret="{ model, field }">
110 <div class="!flex justify-between items-center gap-5"> 107 <div class="!flex justify-between items-center gap-5">
111 <a-input disabled v-model:value="model[field]" /> 108 <a-input disabled v-model:value="model[field]" />
112 - <CopyOutlined  
113 - @click="handleCopySecret(model[field])"  
114 - class="cursor-pointer"  
115 - style="font-size: 32px"  
116 - /> 109 + <a-button type="link" @click="handleCopySecret(model[field])" class="cursor-pointer"
  110 + >复制</a-button
  111 + >
117 </div> 112 </div>
118 </template> 113 </template>
119 </BasicForm> 114 </BasicForm>
@@ -30,16 +30,17 @@ @@ -30,16 +30,17 @@
30 const { config } = props; 30 const { config } = props;
31 const { option } = config; 31 const { option } = config;
32 const { videoConfig, uuid } = option || {}; 32 const { videoConfig, uuid } = option || {};
33 - const { type, url } = await getPlayUrl({  
34 - id: videoConfig?.id,  
35 - accessMode: videoConfig?.accessMode,  
36 - playProtocol: videoConfig?.playProtocol,  
37 - videoUrl: videoConfig?.videoUrl,  
38 - params: {  
39 - deviceId: videoConfig?.deviceId,  
40 - channelNo: videoConfig?.channelId,  
41 - },  
42 - } as unknown as CameraRecord); 33 + const { type, url } =
  34 + (await getPlayUrl({
  35 + id: videoConfig?.id,
  36 + accessMode: videoConfig?.accessMode,
  37 + playProtocol: videoConfig?.playProtocol,
  38 + videoUrl: videoConfig?.videoUrl,
  39 + params: {
  40 + deviceId: videoConfig?.deviceId,
  41 + channelNo: videoConfig?.channelId,
  42 + },
  43 + } as unknown as CameraRecord)) || {};
43 playType.value = type; 44 playType.value = type;
44 playUrl.value = url; 45 playUrl.value = url;
45 if (!uuid) return; 46 if (!uuid) return;