diff --git a/src/api/media/device.ts b/src/api/media/device.ts new file mode 100644 index 00000000..d16d117e --- /dev/null +++ b/src/api/media/device.ts @@ -0,0 +1,13 @@ +import server from '@/utils/request' + +export default { + // 列表 + list: (data: any) => server.post(`/media/device/_query/`, data), + // 详情 + detail: (id: string): any => server.get(`/media/device/${id}`), + // 新增 + save: (data: any) => server.post(`/media/device/${data.channel}`, data), + // 修改 + update: (data: any) => server.put(`/media/device/${data.channel}/${data.id}`, data), + del: (id: string) => server.remove(`/media/device/${id}`), +} \ No newline at end of file diff --git a/src/components/AIcon/index.tsx b/src/components/AIcon/index.tsx index 7a8a21b3..4ebea3b2 100644 --- a/src/components/AIcon/index.tsx +++ b/src/components/AIcon/index.tsx @@ -45,7 +45,10 @@ const iconKeys = [ 'InfoCircleOutlined', 'SearchOutlined', 'EllipsisOutlined', - 'ClockCircleOutlined' + 'ClockCircleOutlined', + 'PartitionOutlined', + 'ShareAltOutlined', + 'playCircleOutlined', ] const Icon = (props: {type: string}) => { diff --git a/src/views/media/Device/Save/index.vue b/src/views/media/Device/Save/index.vue new file mode 100644 index 00000000..e84d2a3b --- /dev/null +++ b/src/views/media/Device/Save/index.vue @@ -0,0 +1,7 @@ + + save + + + + + diff --git a/src/views/media/Device/index.vue b/src/views/media/Device/index.vue new file mode 100644 index 00000000..141caa50 --- /dev/null +++ b/src/views/media/Device/index.vue @@ -0,0 +1,334 @@ + + + + + + 新增 + + + + + + + + + + + {{ slotProps.name }} + + + + 厂商 + {{ slotProps.manufacturer }} + + + + 通道数量 + + {{ slotProps.channelNumber }} + + + 型号 + {{ slotProps.model }} + + + + 接入方式 + + + {{ providerType[slotProps.provider] }} + + + + + + + + + + + + + + + {{ item.text }} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/media/Device/typings.d.ts b/src/views/media/Device/typings.d.ts new file mode 100644 index 00000000..995964b8 --- /dev/null +++ b/src/views/media/Device/typings.d.ts @@ -0,0 +1,24 @@ +type BaseItem = { + id: string; + name: string; +}; +type State = { + value: string; + text: string; +}; + +export type DeviceItem = { + photoUrl?: string; + channelNumber: number; + createTime: number; + firmware: string; + gatewayId: string; + host: string; + manufacturer: string; + model: string; + port: number; + provider: string; + state: State; + streamMode: string; + transport: string; +} & BaseItem;