迁移大屏UI库和应用
This commit is contained in:
		
							
								
								
									
										48
									
								
								project/dvui/components/AiMonitor/AiMonitor.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								project/dvui/components/AiMonitor/AiMonitor.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,48 @@ | ||||
| <template> | ||||
|   <section class="AiMonitor"> | ||||
|     <template v-if="type=='cmcc'"> | ||||
|       <iframe :src="src" allow="autoplay *; microphone *; fullscreen *" allowfullscreen allowtransparency | ||||
|               allowusermedia frameBorder="no"/> | ||||
|     </template> | ||||
|     <hikversion-monitor v-else-if="type=='hik'" :src="src"/> | ||||
|     <dhVideo v-else-if="type=='dahua'" :src="src"/> | ||||
|     <slwVideo v-else-if="type=='slw'" :src="src"/> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import HikversionMonitor from "./hikversionMonitor"; | ||||
| import dhVideo from "./dhVideo"; | ||||
| import slwVideo from "./slwVideo"; | ||||
|  | ||||
| export default { | ||||
|   name: "AiMonitor", | ||||
|   components: {HikversionMonitor, dhVideo, slwVideo}, | ||||
|   props: { | ||||
|     /** | ||||
|      * 视频源 | ||||
|      */ | ||||
|     src: {default: ""}, | ||||
|     /** | ||||
|      * 组件类型 | ||||
|      * cmcc 中移物联,hik 海康威视 | ||||
|      * @values cmcc,hik | ||||
|      */ | ||||
|     type: {default: "cmcc"}, | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AiMonitor { | ||||
|   width: 100%; | ||||
|   height: 100%; | ||||
|   min-width: 100px; | ||||
|   min-height: 60px; | ||||
|  | ||||
|   iframe { | ||||
|     width: 100%; | ||||
|     height: 100%; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user