lvkun 2 лет назад
Родитель
Сommit
6ce4381c0e

+ 2 - 2
README.md

@@ -1,4 +1,4 @@
-#things-ui
+# things-ui
 
 ## MicroComponents
 
@@ -42,7 +42,7 @@ npm run build:package  该指令全是将目前已有的模块分别打包
 | lowcode  | 低代码   | http://49.232.161.110:5556               |
 | user  | 用户群组   | /user             |
 | login | 登陆页 | /login |
-
+| login | 登陆页 | /login |
 #### 使用说明
 
 当运行 npm run build:package iot rts 时 , 将会打包`物联网`与`视联网`两个模块

+ 3 - 3
config/proxy.ts

@@ -10,10 +10,10 @@ module.exports = {
       changeOrigin: true,
       pathRewrite: { '^/user': '' }
     },
-    '/cvss': {
-      target: 'http://124.222.113.37:8080',
+    '/cvs': {
+      target: 'http://127.0.0.1:8888',
       changeOrigin: true,
-      pathRewrite: { '^/cvss': '' }
+      pathRewrite: { '^/cvs': '' }
     },
     '/iot': {
       target: 'http://124.222.113.37:8888',

+ 0 - 20
public/demo.html

@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="UTF-8" />
-    <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
-    <meta
-      http-equiv="Content-Security-Policy"
-      content="default-src 'self'; script-src 'self'"
-    />
-    <meta
-      http-equiv="X-Content-Security-Policy"
-      content="default-src 'self'; script-src 'self'"
-    />
-    <title>Hello from Electron renderer!</title>
-  </head>
-  <body>
-    <h1>Hello from Electron renderer!</h1>
-    <p>👋</p>
-  </body>
-</html>

+ 0 - 207
src/api/rts/stream.ts

@@ -1,207 +0,0 @@
-import request from '@/service/request'
-
-export const getStreams = () => {
-  return request<RTS.STREAM.List[]>({
-    url: '/api/streams',
-    method: 'GET'
-  })
-}
-
-export const getStreamsDetail = (streamPath: string) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: `/api/stream?streamPath=${streamPath}`,
-    method: 'GET'
-  })
-}
-
-export const getSnap = (streamPath: string) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: `/snap/${streamPath}`,
-    method: 'GET'
-  })
-}
-
-export const closeStream = (streamPath: string) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: `/api/closestream?streamPath=${streamPath}`,
-    method: 'GET'
-  })
-}
-
-export const getPullList = () => {
-  return request<RTS.PullStream.Detail[]>({
-    url: '/api/list/pull',
-    method: 'GET'
-  })
-}
-
-export const stopPull = (url: string) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: `/api/stoppull?url=${url}`,
-    method: 'GET'
-  })
-}
-
-export const createRtspPull = (params: {streamPath: string, target: string, save: number}) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: '/rtsp/api/pull',
-    method: 'GET',
-    params
-  })
-}
-
-export const createRtmpPull = (params: {streamPath: string, target: string, save: number}) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: '/rtmp/api/pull',
-    method: 'GET',
-    params
-  })
-}
-
-export const getPushList = () => {
-  return request<RTS.PullStream.Detail[]>({
-    url: '/api/list/push',
-    method: 'GET'
-  })
-}
-
-export const stopPush = (url: string) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: `/api/stoppush?url=${url}`,
-    method: 'GET'
-  })
-}
-
-export const createRtspPush = (params: {streamPath: string, target: string, save: number}) => {
-  return request<RTS.PullStream.Detail[]>({
-    url: '/rtsp/api/push',
-    method: 'GET',
-    params
-  })
-}
-
-export const createRtmpPush = (params: {streamPath: string, target: string, save: number}) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: '/rtsp/api/push',
-    method: 'GET',
-    params
-  })
-}
-
-/** 查看存储列表 */
-export const getRecordList = (type: 'mp4' | 'ts' | 'flv') => {
-  return request<RTS.STREAM.Detail[]>({
-    url: `/record/api/list?type=${type}`,
-    method: 'GET'
-  })
-}
-
-/** 正在存储的视频流 */
-export const getRecording = () => {
-  return request<RTS.STREAM.Detail[]>({
-    url: '/record/api/list/recording',
-    method: 'GET'
-  })
-}
-
-/** 开始存储 */
-export const postRecord = (params: {type: 'mp4' | 'ts' | 'flv', streamPath: string }) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: '/record/api/start',
-    method: 'GET',
-    params
-  })
-}
-
-/** 停止录制 */
-export const stopRecord = (id: string) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: `/record/api/stop?id=${id}`,
-    method: 'GET'
-  })
-}
-
-/** 录制播放 */
-// url: `/record/${id}.${format}`,
-export const playRecord = (id: string, format: 'flv'| 'mp4' | 'm3u8' | 'h264'| 'h265') => {
-  return request<string>({
-    url: `/record/${id}`,
-    method: 'GET'
-  })
-}
-
-/** 获取配置 RTSP */
-export const getConfig = (name: 'RTSP' | 'RTMP' | 'HLS' | 'HDL' | 'GB28181') => {
-  return request<any>({
-    url: `/api/getconfig?name=${name}`,
-    method: 'GET'
-  })
-}
-
-/** 保存配置 RTSP */
-export const postConfig = (name: 'RTSP' | 'RTMP' | 'HLS' | 'HDL' | 'GB28181', data: string) => {
-  return request<any>({
-    url: `/api/modifyconfig?name=${name}`,
-    method: 'POST',
-    data
-  })
-}
-
-export const updateConfig = (name: 'RTSP' | 'RTMP' | 'HLS' | 'HDL' | 'GB28181') => {
-  return request<string>({
-    url: `/api/updateconfig?name=${name}`,
-    method: 'GET'
-  })
-}
-
-/** 系统监控 */
-export const getSummary = () => {
-  return request<RTS.SUMMARY.Detail>({
-    url: '/api/summary',
-    method: 'GET'
-  })
-}
-
-/** 系统监控 流 */
-export const getMonitorStream = (params: {time: string, streamPath: string}) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: '/monitor/api/list/stream',
-    method: 'GET',
-    params
-  })
-}
-
-/** 系统监控 轨道 */
-export const getMonitorTrack = (params: {time: string, streamPath: string}) => {
-  return request<RTS.STREAM.Detail[]>({
-    url: '/monitor/api/list/track?streamPath=xxxx',
-    method: 'GET',
-    params
-  })
-}
-
-/** 国标设备 */
-export const getGB28181Device = () => {
-  return request<RTS.GB2881.Detail[]>({
-    url: '/gb28181/api/list',
-    method: 'GET'
-  })
-}
-
-/** 国标设备录像 */
-export const getGB28181Record = (params: {id: string, channel: string, startTime:string, endTime:string}) => {
-  return request<RTS.GB2881.Record[]>({
-    url: '/gb28181/api/records',
-    method: 'GET',
-    params
-  })
-}
-
-/** 国标设备录像 */
-export const controlGB28181 = (params: {id: string, channel: string, ptzcmd:string}) => {
-  return request<string>({
-    url: '/gb28181/api/control',
-    method: 'GET',
-    params
-  })
-}

BIN
src/assets/logo/logo-blue-v2.png


BIN
src/assets/logo/logo-blue.png


+ 4 - 9
src/controller/cvs/spaceController.ts

@@ -5,14 +5,9 @@ export class SpaceController {
   static type = [
     { key: 'RTMP', value: 'RTMP', label: 'RTMP' },
     { key: 'GB28181', value: 'GB28181', label: 'GB28181' },
-    { key: 'RTSP', value: 'RTSP', label: 'RTSP' }
-  ]
-
-  static area = [
-    { key: '华北', value: '华北', label: '华北' },
-    { key: '华南', value: '华南', label: '华南' },
-    { key: '华东', value: '华东', label: '华东' },
-    { key: '华中', value: '华中', label: '华中' }
+    { key: 'RTSP', value: 'RTSP', label: 'RTSP' },
+    { key: 'PULL_RTMP', value: 'PULL_RTMP', label: 'RTMP拉流' },
+    { key: 'PULL_RTSP', value: 'PULL_RTSP', label: 'RTSP拉流' }
   ]
 
   static statusMap = new Map([
@@ -29,7 +24,7 @@ export class SpaceController {
   ])
 
   // 录像格式
-  static recordFormat = ['FLV', 'TS', 'MP4', 'RAW']
+  static recordFormat = ['FLV', 'TS', 'MP4', 'FMP4', 'RAW']
 
   static async page (params: COMMON.API.QueryParams) {
     return await getSpace(params)

+ 0 - 1
src/controller/rts/index.ts

@@ -1 +0,0 @@
-export { RtsController } from './rts'

+ 0 - 111
src/controller/rts/rts.ts

@@ -1,111 +0,0 @@
-import { closeStream, createRtmpPull, createRtmpPush, createRtspPull, createRtspPush, getConfig, getPullList, getPushList, getRecording, getRecordList, getStreams, getSummary, playRecord, postConfig, postRecord, stopPull, stopPush, stopRecord, updateConfig, controlGB28181, getGB28181Device, getGB28181Record } from '@/api/rts/stream'
-import { message } from 'ant-design-vue'
-
-export class RtsController {
-  static StateMap = new Map([
-    [0, { name: '等待发布', key: 0 }],
-    [1, { name: '发布中', key: 1 }],
-    [2, { name: '等待关闭', key: 2 }],
-    [3, { name: '已经关闭', key: 3 }]
-  ])
-
-  static protocolList = ['RTSP', 'RTMP', 'HLS', 'HDL', 'GB28181']
-
-  static async getStreams () {
-    return getStreams()
-  }
-
-  static async cloeStreams (streamPath: string) {
-    await closeStream(streamPath)
-    message.success('关闭成功')
-  }
-
-  static async listPullList () {
-    return await getPullList()
-  }
-
-  static async stopPull (remoteurl: string) {
-    await stopPull(remoteurl)
-    message.success('停止拉流成功')
-  }
-
-  static async createPull (params: {streamPath: string, target: string, save: number, name: 'RTSP' | 'RTMP'}) {
-    if (params.name === 'RTMP') {
-      await createRtmpPull(params)
-    } else {
-      await createRtspPull(params)
-    }
-    message.success('新增成功')
-  }
-
-  static async listPush () {
-    return await getPushList()
-  }
-
-  static async stopPush (remoteurl: string) {
-    await stopPush(remoteurl)
-    message.success('停止推流成功')
-  }
-
-  static async createPush (params: {streamPath: string, target: string, save: number, name: 'RTSP' | 'RTMP'}) {
-    if (params.name === 'RTSP') {
-      await createRtspPush(params)
-    } else {
-      await createRtmpPush(params)
-    }
-    message.success('新增成功')
-  }
-
-  static async listRecord (type: 'mp4' | 'ts' | 'flv') {
-    return await getRecordList(type)
-  }
-
-  static async listRecording () {
-    return await getRecording()
-  }
-
-  /** 开始录制 */
-  static async recordVideo (params: {type: 'mp4' | 'ts' | 'flv', streamPath: string}) {
-    await postRecord(params)
-    message.success('录制成功')
-  }
-
-  static async playRecord (id: string, format: 'flv'| 'mp4' | 'm3u8' | 'h264'| 'h265') {
-    return await playRecord(id, format)
-  }
-
-  static async stopRecord (id: string) {
-    await stopRecord(id)
-    message.success('停止录制成功')
-  }
-
-  static async protocol (name: 'RTSP' | 'RTMP' | 'HLS' | 'HDL' | 'GB28181') {
-    return await getConfig(name)
-  }
-
-  static async postProtocol (name: 'RTSP' | 'RTMP' | 'HLS' | 'HDL' | 'GB28181', data: string) {
-    await postConfig(name, data)
-    message.success('修改协议成功')
-  }
-
-  static async updateProtocol (name: 'RTSP' | 'RTMP' | 'HLS' | 'HDL' | 'GB28181') {
-    await updateConfig(name)
-    message.success('更新成功')
-  }
-
-  static async summary () {
-    return await getSummary()
-  }
-
-  static async listGB28181 () {
-    return await getGB28181Device()
-  }
-
-  static async getGB28181Record (params: {id: string, channel: string, startTime:string, endTime:string}) {
-    return await getGB28181Record(params)
-  }
-
-  static async controlGB28181 (params: {id: string, channel: string, ptzcmd:string}) {
-    return await controlGB28181(params)
-  }
-}

+ 1 - 1
src/hooks/effect.ts

@@ -55,7 +55,7 @@ export const usePort = (title: string) => {
   if (title === '物联网') {
     setBaseUrl('/iot')
   } else if (title === '视联网') {
-    setBaseUrl('/cvss')
+    setBaseUrl('/cvs')
   } else if (title === '用户群组') {
     setBaseUrl('/user')
   } else {

+ 1 - 1
src/layout/navbar.vue

@@ -126,7 +126,7 @@ const changeRouter = (route: ROUTER.RoutesProps) => {
   justify-content: flex-start;
   align-items: center;
   img {
-    width: 50px;
+    width: 115px;
     height: 50px;
     display: block;
   }

+ 3 - 0
src/pages/Iot/device/simulator.vue

@@ -0,0 +1,3 @@
+<template>
+  <a-card></a-card>
+</template>

+ 9 - 0
src/pages/cvs/nodes/index.vue

@@ -0,0 +1,9 @@
+<template>
+<a-card>
+  nodes
+</a-card>
+</template>
+<script lang='ts' setup >
+</script>
+<style lang='less' scoped >
+</style>

+ 0 - 23
src/pages/demo/index.vue

@@ -1,23 +0,0 @@
-<template>
-  <a-card>
-    <div>
-      {{commonStore.count}}
-      {{commonStore.state.sum}}
-      {{commonStore.gettersSum}}
-      {{commonStore.state.hero.age}}
-    </div>
-
-    <a-button @click="commonStore.increment()" >increment</a-button>
-    <a-button @click="commonStore.subtraction()" >subtraction</a-button>
-  </a-card>
-</template>
-
-<script lang="ts" setup >
-
-import { useCommonStore } from '@/store/modules/commonStore/commonStore'
-
-console.log(useCommonStore)
-
-const commonStore = useCommonStore()
-
-</script>

+ 0 - 135
src/pages/rts/gb28181/index.vue

@@ -1,135 +0,0 @@
-<template>
-    <a-card>
-        <a-table
-        style="margin-top: 20px;"
-        :columns="columns"
-        :data-source="state.dataSource"
-        :loading="state.loading"
-        >
-        <template #bodyCell="{column, record}">
-        <template v-if="column.key === 'action'">
-            <a-space>
-              <a @click="goGB28181Records(record.id)">查看录像</a>
-              <a @click="openModal(record.id)" >控制</a>
-            </a-space>
-          </template>
-      </template>
-        </a-table>
-    </a-card>
-    <a-modal
-    title="控制设备"
-    :open="state.controlVisible"
-    ok-text="确定"
-    cancel-text="取消"
-    @cancel="closeModel"
-    @ok="controlGB28181Device"
-  >
-   <a-form :label-col="{span: 4}" :wrapper-col="{span: 14}">
-    <a-form-item label="通道" v-bind="controlParamsState.channel">
-      <a-input allowClear v-model:value="controlParamsState.channel"  />
-    </a-form-item>
-    <a-form-item label="命令"  v-bind="controlParamsState.ptzcmd">
-      <a-input  allowClear v-model:value="controlParamsState.ptzcmd"  />
-    </a-form-item>
-   </a-form>
-  </a-modal>
-</template>
-<script lang="ts" setup >
-import { RtsController } from '@/controller/rts'
-import { onMounted, reactive } from 'vue'
-
-const columns = [
-  {
-    title: 'ID',
-    dataIndex: 'ID'
-  },
-  {
-    title: '名称',
-    dataIndex: 'Name'
-  },
-  {
-    title: '制造商',
-    dataIndex: 'Manufacturer'
-  },
-  {
-    title: '注册时间',
-    dataIndex: 'RegisterTime'
-  },
-  {
-    title: '状态',
-    dataIndex: 'Status'
-  },
-  {
-    title: '网络地址',
-    dataIndex: 'NetAddr'
-  },
-  {
-    title: 'Owner',
-    dataIndex: 'Owner'
-  },
-  {
-    title: 'gps时间',
-    dataIndex: 'GpsTime'
-  },
-  {
-    title: '经度',
-    dataIndex: 'Longitude'
-  },
-  {
-    title: '纬度',
-    dataIndex: 'Latitude'
-  },
-  {
-    title: '操作',
-    dataIndex: 'action',
-    key: 'action'
-  }
-]
-const controlParamsState = reactive({
-  id: '',
-  channel: '',
-  ptzcmd: ''
-})
-
-const state = reactive<{
-  dataSource: RTS.GB2881.Detail[]
-  loading: boolean
-  controlVisible: boolean
-  detail: Partial<RTS.GB2881.Detail>
-}>({
-  loading: false,
-  controlVisible: false,
-  detail: {},
-  dataSource: []
-})
-
-const getGB28181List = async () => {
-  const { data } = await RtsController.listGB28181()
-  state.dataSource = data
-}
-
-const goGB28181Records = async (id :string) => {
-  router.push({ path: '/gb28181/record', query: { id } })
-}
-
-const controlGB28181Device = async () => {
-  const { data } = await RtsController.controlGB28181(controlParamsState)
-  console.log(data)
-}
-
-onMounted(() => {
-  getGB28181List()
-})
-
-const openModal = (id:string) => {
-  state.controlVisible = true
-  controlParamsState.id = id
-}
-
-const closeModel = () => {
-  state.controlVisible = false
-}
-</script>
-
-<style lang="less" scoped >
-</style>

+ 0 - 100
src/pages/rts/gb28181/record.vue

@@ -1,100 +0,0 @@
-<template>
-    <a-card>
-        <a-row>
-            <a-space>
-                <a-col>
-                    <a-range-picker v-model:value="time" :format="['DD/MM/YYYY', 'DD/MM/YYYY']" />
-                </a-col>
-                <a-col>
-                    <a-button type="primary" @click="getGB28181Record">搜索</a-button>
-                </a-col>
-            </a-space>
-        </a-row>
-        <a-table
-            style="margin-top: 20px;"
-            :columns="columns"
-            :data-source="state.dataSource"
-            :loading="state.loading">
-        </a-table>
-    </a-card>
-</template>
-
-<script lang="ts" setup >
-import { RtsController } from '@/controller/rts'
-import { reactive } from 'vue'
-import { useRoute } from 'vue-router'
-const route = useRoute()
-const deviceId = route.query.id as string
-const time = ref([])
-const columns = [
-  {
-    title: '设备id',
-    dataIndex: 'DeviceID'
-  },
-  {
-    title: '名称',
-    dataIndex: 'Name'
-  },
-  {
-    title: '文件地址',
-    dataIndex: 'FilePath'
-  },
-  {
-    title: '地址',
-    dataIndex: 'Address'
-  },
-  {
-    title: '开始时间',
-    dataIndex: 'StartTime'
-  },
-  {
-    title: '结束时间',
-    dataIndex: 'EndTime'
-  },
-  {
-    title: 'Secrecy',
-    dataIndex: 'Secrecy'
-  },
-  {
-    title: 'gps时间',
-    dataIndex: 'Type'
-  }
-]
-
-const state = reactive<{
-    dataSource: RTS.GB2881.Record[]
-    loading: boolean
-    visible: boolean
-    deviceId: string
-    detail: Partial<RTS.GB2881.Record>
-}>({
-  loading: false,
-  visible: false,
-  detail: {},
-  deviceId: deviceId,
-  dataSource: []
-})
-
-const queryParamsState = reactive({
-  id: deviceId,
-  channel: '',
-  startTime: '',
-  endTime: ''
-})
-
-const getGB28181Record = async () => {
-  const { data } = await RtsController.listGB28181(queryParamsState)
-  state.dataSource = data
-}
-
-watch(
-  () => time.value,
-  () => {
-    queryParamsState.start = time.value[0]
-    queryParamsState.end = time.value[1]
-  }
-)
-
-</script>
-
-<style lang="less" scoped ></style>

+ 0 - 98
src/pages/rts/monitor/index.vue

@@ -1,98 +0,0 @@
-<template>
-   <a-row :gutter="[8, 8]" >
-      <a-col :xs="24" :md="24" :lg="12" >
-        <a-alert :message=" 'Address: ' + state.summary.Address" type="info" />
-      </a-col>
-      <a-col :xs="24" :md="24" :lg="12" >
-        <a-alert :message=" 'CPUUsage:' + state.summary.CPUUsage" type="info" />
-      </a-col>
-    </a-row>
-  <a-card style="margin-top: 20px;" >
-    <a-row :gutter="[12, 12]" >
-      <a-col  :xs="24" :md="24" :lg="12">
-        <a-spin :spinning="state.loading" >
-          <a-descriptions title="Memory" bordered :column="2">
-            <a-descriptions-item label="Total">{{state.summary.Memory?.Total}}</a-descriptions-item>
-            <a-descriptions-item label="Usage">{{state.summary.Memory?.Usage}}</a-descriptions-item>
-            <a-descriptions-item label="Used">{{state.summary.Memory?.Used}}</a-descriptions-item>
-            <a-descriptions-item label="Free">{{state.summary.Memory?.Free}}</a-descriptions-item>
-          </a-descriptions>
-        </a-spin>
-      </a-col>
-      <a-col :xs="24" :md="24" :lg="12">
-        <a-spin :spinning="state.loading" >
-          <a-descriptions title="HardDisk" bordered :column="2">
-            <a-descriptions-item label="Total">{{state.summary.HardDisk?.Total}}</a-descriptions-item>
-            <a-descriptions-item label="Usage">{{state.summary.HardDisk?.Usage}}</a-descriptions-item>
-            <a-descriptions-item label="Used">{{state.summary.HardDisk?.Used}}</a-descriptions-item>
-            <a-descriptions-item label="Free">{{state.summary.HardDisk?.Free}}</a-descriptions-item>
-          </a-descriptions>
-        </a-spin>
-      </a-col>
-      <a-col :xs="24" :md="24" :lg="24">
-        <a-spin :spinning="state.loading" >
-          <a-descriptions title="NetWork" bordered :column="2">
-
-          </a-descriptions>
-          <a-table
-              :columns="columns"
-              :data-source="state.summary.NetWork"
-              :pagination="false"
-            >
-
-            </a-table>
-        </a-spin>
-      </a-col>
-    </a-row>
-  </a-card>
-</template>
-<script lang="ts" setup >
-import { RtsController } from '@/controller/rts'
-import { onMounted, reactive } from 'vue'
-
-const columns = [
-  {
-    title: '名称',
-    dataIndex: 'Name'
-  },
-  {
-    title: 'Receive',
-    dataIndex: 'Receive'
-  },
-  {
-    title: 'Sent',
-    dataIndex: 'Sent'
-  },
-  {
-    title: 'ReceiveSpeed',
-    dataIndex: 'ReceiveSpeedame'
-  },
-  {
-    title: 'SentSpeed',
-    dataIndex: 'SentSpeed'
-  }
-]
-
-const state = reactive<{
-  loading: boolean,
-  summary: Partial<RTS.SUMMARY.Detail>
-}>({
-  loading: false,
-  summary: {}
-})
-
-const getSummary = async () => {
-  state.loading = true
-  const { data } = await RtsController.summary()
-  state.loading = false
-  state.summary = data
-}
-
-onMounted(() => {
-  getSummary()
-})
-
-</script>
-
-<style lang="less" scoped >
-</style>

+ 0 - 84
src/pages/rts/protocol/index.vue

@@ -1,84 +0,0 @@
-<template>
-  <a-spin :spinning="state.loading" >
-  <a-card
-    style="min-height: 600px;"
-  >
-    <a-row justify="space-between" style="margin-bottom: 20px;" >
-      <a-col span="12" >
-        <a-select allowClear placeholder="请选择协议" v-model:value="state.name" style="width: 170px;" >
-          <a-select-option
-            v-for="item in protocolList"
-            :key="item"
-          >
-            {{item}}
-          </a-select-option>
-        </a-select>
-      </a-col>
-      <a-col  >
-        <a-space>
-          <a-button type="primary" @click="saveProtocol"> 保存 </a-button>
-          <a-button type="primary" @click="reloadProtocol"> 更新 </a-button>
-        </a-space>
-      </a-col>
-    </a-row>
-    <code-mirror-tsx
-      :key="state.name"
-      v-if="state.bodyJson"
-      :body-json="state.bodyJson"
-      body-type="json"
-      ref="codeMirrorRef"
-    />
-    <a-empty  style="margin-top: 200px;" v-else :image="Empty.PRESENTED_IMAGE_SIMPLE" description="请在左上角选择协议"/>
-
-  </a-card>
-</a-spin>
-</template>
-<script lang="ts" setup >
-import { RtsController } from '@/controller/rts'
-import { onMounted, reactive, ref, watch } from 'vue'
-import { CodeMirrorTsx } from '@/components/CodeMirror/index'
-import { useScheduler } from '@/hooks'
-import { Empty } from 'ant-design-vue'
-
-const protocolList = ['RTSP', 'RTMP', 'HLS', 'HDL', 'GB28181']
-
-const codeMirrorRef = ref()
-
-const state = reactive<{
-  name: RTS.protocol | '',
-  bodyJson: string
-  loading: boolean
-}>({
-  name: 'RTSP',
-  bodyJson: '',
-  loading: false
-})
-
-watch(
-  () => state.name,
-  () => getProtocol()
-)
-const { start, stop } = useScheduler(() => state.loading = false, 2000)
-
-const reloadProtocol = async () => {
-  await RtsController.updateProtocol(state.name as RTS.protocol)
-}
-
-const saveProtocol = async () => {
-  await RtsController.postProtocol(state.name as RTS.protocol, codeMirrorRef.value.getValue())
-}
-
-const getProtocol = async () => {
-  state.loading = true
-  const { data } = await RtsController.protocol(state.name as RTS.protocol)
-  start()
-  state.bodyJson = JSON.stringify(data)
-}
-
-onMounted(() => {
-  getProtocol()
-})
-</script>
-
-<style lang="less" scoped >
-</style>

+ 0 - 163
src/pages/rts/pull/index.vue

@@ -1,163 +0,0 @@
-<template>
-  <a-card>
-    <a-row justify="end" >
-      <a-col  >
-        <a-button type="primary" @click="openModal">创建拉流</a-button>
-      </a-col>
-    </a-row>
-    <a-table
-      style="margin-top: 20px;"
-      :columns="columns"
-      :data-source="state.dataSource"
-      :loading="state.loading"
-    >
-      <template #bodyCell="{column, record}" >
-        <template v-if="column.key === 'StartTime'" >
-          {{dayjs(record.StartTime).format('YYYY/MM/DD HH:mm:ss')}}
-        </template>
-        <template v-if="column.key === 'action'"  >
-          <a-space>
-            <a @click="stopPull(record.RemoteURL)" >停止</a>
-          </a-space>
-        </template>
-      </template>
-    </a-table>
-  </a-card>
-
-  <modal-pro
-    label="创建拉流"
-    :open="state.visible"
-    @cancel="state.visible = false "
-    @ok="ok"
-  >
-    <a-form :label-col="{span: 5}" >
-      <a-form-item label="拉流类型" >
-        <a-select allowClear v-model:value="bodyParamsState.name" >
-          <a-select-option
-            v-for="item in pullList"
-            :key="item.key"
-            :value="item.value"
-          >
-            {{item.value}}
-          </a-select-option>
-        </a-select>
-      </a-form-item>
-      <a-form-item label="拉流地址" v-bind='validateInfos.target' >
-        <a-input allowClear v-model:value="bodyParamsState.target" > </a-input>
-      </a-form-item>
-      <a-form-item label="视频流标识" v-bind='validateInfos.streamPath' >
-        <a-input allowClear v-model:value="bodyParamsState.streamPath" > </a-input>
-      </a-form-item>
-    </a-form>
-  </modal-pro>
-</template>
-<script lang="ts" setup >
-import { RtsController } from '@/controller/rts'
-import { onMounted, reactive } from 'vue'
-import { Form } from 'ant-design-vue'
-import dayjs from 'dayjs'
-
-const columns = [
-  {
-    title: 'ID',
-    dataIndex: 'ID'
-  },
-  {
-    title: '拉流类型',
-    dataIndex: 'Type'
-  },
-  {
-    title: '流地址',
-    dataIndex: 'StreamPath'
-  },
-  {
-    title: '被拉流地址',
-    dataIndex: 'RemoteURL'
-  },
-  {
-    title: '重联次数',
-    dataIndex: 'ReConnectCount'
-  },
-  {
-    title: '拉流参数',
-    dataIndex: 'Args'
-  },
-  {
-    title: '开始时间',
-    dataIndex: 'StartTime',
-    key: 'StartTime'
-  },
-  {
-    title: '操作',
-    dataIndex: 'action',
-    key: 'action'
-  }
-]
-
-const useForm = Form.useForm
-
-const pullList = [
-  {
-    key: 'RTSP',
-    value: 'RTSP'
-  },
-  {
-    key: 'RTMP',
-    value: 'RTMP'
-  }
-]
-
-const bodyParamsState = reactive({
-  name: 'RTSP',
-  target: '',
-  streamPath: '',
-  save: 2
-})
-
-const state = reactive<{
-  dataSource: RTS.PullStream.Detail[]
-  loading: boolean
-  visible: boolean
-  detail: Partial<RTS.PullStream.Detail>
-}>({
-  loading: false,
-  visible: false,
-  detail: {},
-  dataSource: []
-})
-
-const { resetFields, validate, validateInfos } = useForm(bodyParamsState, reactive({
-  streamPath: [{ required: 'true', message: '请填写视频流标识' }],
-  target: [{ required: 'true', message: '请填写流地址' }]
-}))
-
-const openModal = () => {
-  state.visible = true
-}
-
-const ok = () => {
-  validate().then(async () => {
-    await RtsController.createPull(bodyParamsState)
-    state.visible = false
-    getPullList()
-  })
-}
-
-const stopPull = async (remoteurl: string) => {
-  await RtsController.stopPull(remoteurl)
-}
-
-const getPullList = async () => {
-  const { data } = await RtsController.listPullList()
-  state.dataSource = data
-}
-
-onMounted(() => {
-  getPullList()
-})
-
-</script>
-
-<style lang="less" scoped >
-
-</style>

+ 0 - 164
src/pages/rts/push/index.vue

@@ -1,164 +0,0 @@
-<template>
-  <a-card>
-    <a-row justify="end" >
-      <a-col  >
-        <a-button type="primary" @click="openModal">创建推流</a-button>
-      </a-col>
-    </a-row>
-    <a-table
-      style="margin-top: 20px;"
-      :columns="columns"
-      :data-source="state.dataSource"
-      :loading="state.loading"
-    >
-      <template #bodyCell="{column, record}" >
-        <template v-if="column.key === 'StartTime'" >
-          {{dayjs(record.StartTime).format('YYYY/MM/DD HH:mm:ss')}}
-        </template>
-        <template v-if="column.key === 'action'"  >
-          <a-space>
-            <a @click="stopPush(record.RemoteURL)" >停止</a>
-          </a-space>
-        </template>
-      </template>
-    </a-table>
-  </a-card>
-
-  <modal-pro
-    label="创建推流"
-    :open="state.visible"
-    @cancel="state.visible = false "
-    @ok="ok"
-  >
-    <a-form :label-col="{span: 5}" >
-      <a-form-item label="推流类型" >
-        <a-select allowClear v-model:value="bodyParamsState.name" >
-          <a-select-option
-            v-for="item in pullList"
-            :key="item.key"
-            :value="item.value"
-          >
-            {{item.value}}
-          </a-select-option>
-        </a-select>
-      </a-form-item>
-      <a-form-item label="推流地址" v-bind='validateInfos.target' >
-        <a-input allowClear v-model:value="bodyParamsState.target" > </a-input>
-      </a-form-item>
-      <a-form-item label="视频流标识" v-bind='validateInfos.streamPath' >
-        <a-input allowClear v-model:value="bodyParamsState.streamPath" > </a-input>
-      </a-form-item>
-    </a-form>
-  </modal-pro>
-</template>
-<script lang="ts" setup >
-import { RtsController } from '@/controller/rts'
-import { onMounted, reactive } from 'vue'
-import { Form } from 'ant-design-vue'
-import dayjs from 'dayjs'
-
-const columns = [
-  {
-    title: 'ID',
-    dataIndex: 'ID'
-  },
-  {
-    title: '推流类型',
-    dataIndex: 'Type'
-  },
-  {
-    title: '流地址',
-    dataIndex: 'StreamPath'
-  },
-  {
-    title: '流id',
-    dataIndex: 'StreamID'
-  },
-  {
-    title: '重连参数',
-    dataIndex: 'ReConnectCount'
-  },
-  {
-    title: '推流参数',
-    dataIndex: 'Args'
-  },
-  {
-    title: '开始时间',
-    dataIndex: 'StartTime',
-    key: 'StartTime'
-  },
-  {
-    title: '操作',
-    dataIndex: 'action',
-    key: 'action'
-  }
-]
-
-const useForm = Form.useForm
-
-const pullList = [
-  {
-    key: 'RTSP',
-    value: 'RTSP'
-  },
-  {
-    key: 'RTMP',
-    value: 'RTMP'
-  }
-]
-
-const bodyParamsState = reactive({
-  name: 'RTSP',
-  target: '',
-  streamPath: '',
-  save: 2
-})
-
-const state = reactive<{
-  dataSource: RTS.PullStream.Detail[]
-  loading: boolean
-  visible: boolean
-  detail: Partial<RTS.PullStream.Detail>
-}>({
-  loading: false,
-  visible: false,
-  detail: {},
-  dataSource: []
-})
-
-const { resetFields, validate, validateInfos } = useForm(bodyParamsState, reactive({
-  streamPath: [{ required: 'true', message: '请填写流地址' }],
-  target: [{ required: 'true', message: '请填写流地址' }]
-}))
-
-const openModal = () => {
-  state.visible = true
-}
-
-const ok = () => {
-  validate().then(async () => {
-    await RtsController.createPush(bodyParamsState)
-    state.visible = false
-    getPushList()
-  })
-}
-
-const stopPush = async (remoteurl: string) => {
-  await RtsController.stopPush(remoteurl)
-  getPushList()
-}
-
-const getPushList = async () => {
-  const { data } = await RtsController.listPush()
-  state.dataSource = data
-}
-
-onMounted(() => {
-  getPushList()
-})
-
-</script>
-
-<style lang="less" scoped >
-
-</style>

+ 0 - 238
src/pages/rts/record/index.vue

@@ -1,238 +0,0 @@
-<template>
-  <a-card
-    title="存储列表"
-  >
-  <a-row justify="space-between" >
-    <a-col>
-      <a-select allowClear v-model:value="recordState.type" style="width: 170px;" >
-          <a-select-option
-            v-for="item in typeList"
-            :key="item"
-            :value="item"
-          >
-            {{item}}
-          </a-select-option>
-        </a-select>
-    </a-col>
-    <a-col>
-      <a-button type="primary" @click="openRecordModal">开始存储</a-button>
-    </a-col>
-  </a-row>
-  <a-table
-      style="margin-top: 20px;"
-      :columns="recordColumns"
-      :data-source="state.recordDataSource"
-      :loading="state.recordLoading"
-      :pagination="false"
-    >
-    <template #bodyCell="{column, record}" >
-        <template v-if="column.key === 'action'"  >
-          <a-space>
-            <!-- <a @click="openModal(record)" >详情</a> -->
-            <a @click="recordPlay(record)" >flv播放</a>
-          </a-space>
-        </template>
-      </template>
-    </a-table>
-  </a-card>
-  <a-card
-    title="正在存储的视频流"
-    style="margin-top: 20px;"
-  >
-    <a-table
-      :columns="columns"
-      :data-source="state.recordingDataSource"
-      :loading="state.loading"
-      :pagination="false"
-    >
-    <template #bodyCell="{column, record}" >
-        <template v-if="column.key === 'action'"  >
-          <a-space>
-            <a @click="stopRcord(record)" >停止录制</a>
-          </a-space>
-        </template>
-      </template>
-    </a-table>
-  </a-card>
-
-  <modal-pro
-    style="width: 700px;"
-    label="视频流详情"
-    :open="state.visible"
-    @cancel="state.visible = false"
-    @ok="state.visible = false"
-    destroyOnClose
-  >
-    <video-player-tsx :video-url="`/rts/record/${state.recordDetail.Path}`" />
-  </modal-pro>
-
-  <modal-pro
-    label="录制视频"
-    :open="state.recordVisible"
-    @cancel="state.recordVisible = false"
-    @ok="recordVideo"
-  >
-    <a-form :label-col="{span: 4}"  >
-      <a-form-item label="类型" >
-        <a-select allowClear v-model:value="recordState.type" >
-          <a-select-option
-            v-for="item in typeList"
-            :key="item"
-            :value="item"
-          >
-            {{item}}
-          </a-select-option>
-        </a-select>
-      </a-form-item>
-      <a-form-item label="视频流标识" >
-        <a-select allowClear v-model:value="recordState.streamPath" >
-          <a-select-option
-            v-for="item in state.streams"
-            :key="item.Path"
-            :value="item.Path"
-          >
-            {{item.Path}}
-          </a-select-option>
-        </a-select>
-      </a-form-item>
-    </a-form>
-  </modal-pro>
-</template>
-<script lang="ts" setup >
-import { RtsController } from '@/controller/rts'
-import { onMounted, reactive, watch } from 'vue'
-import { Form, message } from 'ant-design-vue'
-import { VideoPlayerTsx } from '@/components/VideoPlayer/index'
-import { getRecording } from '@/api/rts/stream'
-
-const useForm = Form.useForm
-
-const recordColumns = [
-  {
-    title: '存储地址',
-    dataIndex: 'Path'
-  },
-  {
-    title: '文件大小',
-    dataIndex: 'Size'
-  },
-  {
-    title: '时长',
-    dataIndex: 'Duration'
-  },
-  {
-    title: '操作',
-    dataIndex: 'action',
-    key: 'action'
-  }
-]
-
-const columns = [
-  {
-    title: 'id',
-    dataIndex: 'ID'
-  },
-  {
-    title: '录制类型',
-    dataIndex: 'Type'
-  },
-  {
-    title: '录制开始时间',
-    dataIndex: 'StartTime'
-  },
-  {
-    title: '录制参数',
-    dataIndex: 'Config'
-  },
-  {
-    title: '操作',
-    dataIndex: 'action',
-    key: 'action'
-  }
-]
-
-const typeList = ['mp4', 'ts', 'flv']
-
-const recordState = reactive({
-  type: 'flv',
-  streamPath: 'app/name'
-})
-
-const state = reactive({
-  loading: false,
-  recordLoading: false,
-  visible: false,
-  recordVisible: false,
-  recordingDataSource: [],
-  recordDataSource: [],
-  recordDetail: {},
-  detail: {},
-  streams: [],
-  type: 'flv',
-  videoUrl: '',
-  videoStream: ''
-})
-
-watch(
-  () => recordState.type,
-  () => getRecordList()
-)
-
-const stopRcord = async (record) => {
-  await RtsController.stopRecord(record.ID)
-  getRecording()
-}
-
-const recordVideo = async () => {
-  if (!recordState.streamPath) {
-    message.warn('请填写标识流地址')
-    return
-  }
-
-  await RtsController.recordVideo(recordState)
-  state.recordVisible = false
-}
-
-const recordPlay = async (record) => {
-  const data = await RtsController.playRecord(record.Path, 'flv')
-  state.visible = true
-  state.videoStream = data
-  console.log(data)
-
-  getRecordingList()
-}
-
-const openRecordModal = () => {
-  state.recordVisible = true
-}
-
-const openModal = (record: RTS.STREAM.Detail) => {
-  state.detail = record
-  state.visible = false
-}
-
-const getStreamList = async () => {
-  const { data } = await RtsController.getStreams()
-  state.streams = data
-}
-
-const getRecordList = async () => {
-  state.recordLoading = true
-  const { data } = await RtsController.listRecord(recordState.type)
-  state.recordLoading = false
-  state.recordDataSource = data
-}
-
-const getRecordingList = async () => {
-  const { data } = await RtsController.listRecording()
-  state.recordingDataSource = data
-}
-
-onMounted(() => {
-  getRecordingList()
-  getStreamList()
-  getRecordList()
-})
-</script>
-
-<style></style>

+ 0 - 125
src/pages/rts/stream/index.vue

@@ -1,125 +0,0 @@
-<template>
-  <a-card>
-    <a-row>
-      <a-col></a-col>
-    </a-row>
-    <a-table
-      :loading="state.loading"
-      :columns="columns"
-      :data-source="state.dataSource"
-      :pagination="false"
-    >
-      <template #bodyCell="{column, record}" >
-        <template v-if="column.key === 'action'"  >
-          <a-space>
-            <a @click="openLive(record)" >实时播放</a>
-            <a @click="closeSteram(record.Path)" >关闭视频流</a>
-          </a-space>
-        </template>
-      </template>
-    </a-table>
-  </a-card>
-
-  <modal-pro
-    style="width: 700px;"
-    label="视频流详情"
-    :open="state.visible"
-    @cancel="state.visible = false"
-    @ok="state.visible = false"
-    destroyOnClose
-  >
-    <video-player-tsx :video-url="useFlvUrl(state.detail.Path!)" />
-  </modal-pro>
-</template>
-
-<script lang="ts" setup >
-import { RtsController } from '@/controller/rts'
-import { onMounted, reactive } from 'vue'
-import { VideoPlayerTsx } from '@/components/VideoPlayer/index'
-import { useFlvUrl } from '@/hooks/index'
-
-const columns = [
-  {
-    title: 'StreamPath',
-    dataIndex: 'Path',
-    key: 'Path'
-  },
-  {
-    title: '视频流状态',
-    dataIndex: 'State',
-    key: 'State'
-  },
-  {
-    title: '订阅拉流数量',
-    dataIndex: 'Subscribers',
-    key: 'Subscribers'
-  },
-  {
-    title: '音视频轨道',
-    dataIndex: 'Tracks',
-    key: 'Tracks'
-  },
-  {
-    title: '开始时间',
-    dataIndex: 'StartTime',
-    key: 'StartTime'
-  },
-  {
-    title: '视频流类型',
-    dataIndex: 'Type',
-    key: 'Type'
-  },
-  {
-    title: 'BPS',
-    dataIndex: 'BPS',
-    key: 'BPS'
-  },
-  {
-    title: '操作',
-    key: 'action'
-  }
-]
-
-const queryParamsState = reactive({
-
-})
-
-const state = reactive<{
-  loading: boolean,
-  dataSource: RTS.STREAM.Detail[]
-  detail: Partial<RTS.STREAM.Detail>
-  visible: boolean
-}>({
-  loading: false,
-  dataSource: [],
-  detail: {},
-  visible: false
-})
-
-const openLive = (record: RTS.STREAM.Detail) => {
-  state.visible = true
-  state.detail = record
-}
-
-const openModal = (record: RTS.STREAM.Detail) => {
-  state.detail = record
-  state.visible = false
-}
-
-const closeSteram = async (streamPath: string) => {
-  await RtsController.cloeStreams(streamPath)
-  getStreamList()
-}
-
-const getStreamList = async () => {
-  const { data } = await RtsController.getStreams()
-  state.dataSource = data
-}
-
-onMounted(() => {
-  getStreamList()
-})
-
-</script>
-
-<style></style>

+ 59 - 57
src/router/index.ts

@@ -70,6 +70,11 @@ const iot = {
           path: '/device/analysis',
           name: '设备分析',
           component: () => import('@/pages/iot/device/analysis.vue')
+        },
+        {
+          path: '/device/simulator',
+          name: '设备模拟器',
+          component: () => import('@/pages/iot/device/simulator.vue')
         }
       ]
     },
@@ -251,13 +256,13 @@ const schedule = {
           component: () => import('@/pages/schedule/dataLake/dataTool/index.vue')
         }
       ]
+    },
+    {
+      path: '/APICenter',
+      name: '数据编排',
+      icon: 'ApiOutlined',
+      component: () => import('@/pages/schedule/APICenter/index.vue')
     }
-    // {
-    //   path: '/APICenter',
-    //   name: '数据服务',
-    //   icon: 'ApiOutlined',
-    //   component: () => import('@/pages/schedule/APICenter/index.vue')
-    // }
   ]
 }
 
@@ -270,38 +275,38 @@ const view = {
   link: true
 }
 
-const lowcode = {
-  path: 'http://49.232.161.110:5556',
-  name: '低代码',
-  meta: {
-    title: '低代码'
-  },
-  link: true
-}
-
-const user = {
-  path: '/user',
-  name: '用户群组',
-  meta: {
-    title: '用户群组'
-  },
-  component: () => import('@/layout/layout.vue'),
-  redirect: '/manage',
-  children: [
-    {
-      path: '/manage',
-      name: '用户管理',
-      icon: 'TeamOutlined',
-      component: () => import('@/pages/user/manage/index.vue')
-    },
-    {
-      path: '/resource',
-      name: '资源管理',
-      icon: 'FolderOpenOutlined',
-      component: () => import('@/pages/user/resource/index.vue')
-    }
-  ]
-}
+// const lowcode = {
+//   path: 'http://49.232.161.110:5556',
+//   name: '低代码',
+//   meta: {
+//     title: '低代码'
+//   },
+//   link: true
+// }
+//
+// const user = {
+//   path: '/user',
+//   name: '用户群组',
+//   meta: {
+//     title: '用户群组'
+//   },
+//   component: () => import('@/layout/layout.vue'),
+//   redirect: '/manage',
+//   children: [
+//     {
+//       path: '/manage',
+//       name: '用户管理',
+//       icon: 'TeamOutlined',
+//       component: () => import('@/pages/user/manage/index.vue')
+//     },
+//     {
+//       path: '/resource',
+//       name: '资源管理',
+//       icon: 'FolderOpenOutlined',
+//       component: () => import('@/pages/user/resource/index.vue')
+//     }
+//   ]
+// }
 
 const login = {
   path: '/login',
@@ -321,6 +326,12 @@ const cvs = {
   component: () => import('@/layout/layout.vue'),
   redirect: '/cvs/video/space',
   children: [
+    {
+      path: '/cvs/csys',
+      name: '系统概览 ',
+      icon: '',
+      component: () => import('@/pages/cvs/csys/index.vue')
+    },
     {
       path: '/cvs/video',
       name: '视频接入',
@@ -387,12 +398,12 @@ const cvs = {
       name: '边缘设备',
       icon: '',
       children: [
-        // {
-        //   path: '/cvs/edge/task',
-        //   name: '任务管理',
-        //   icon: '',
-        //   component: () => import('@/pages/cvs/edge/task.vue')
-        // },
+        {
+          path: '/cvs/edge/task',
+          name: '任务管理',
+          icon: '',
+          component: () => import('@/pages/cvs/edge/task.vue')
+        },
         {
           path: '/cvs/dataSever/video',
           name: '视频管理',
@@ -402,24 +413,15 @@ const cvs = {
       ]
     },
     {
-      path: '/cvs/csys',
-      name: '系统概览 ',
+      path: '/cvs/nodes',
+      name: '节点管理 ',
       icon: '',
-      component: () => import('@/pages/cvs/csys/index.vue')
+      component: () => import('@/pages/cvs/nodes/index.vue')
     }
   ]
 }
 
-// }HQDZKE6BBJCJB0412
-
-const demo = {
-  path: '/demo',
-  name: 'demo',
-  icon: 'ProfileOutlined',
-  component: () => import('@/pages/demo/index.vue')
-}
-
-const _routes = [iot, schedule, view, lowcode, user, cvs] as any
+const _routes = [iot, cvs, schedule, view] as any
 
 if (_routes[0].link) {
   window.open(_routes[0].path)