-
+
+
+
@@ -11,14 +13,14 @@
import { computed, defineComponent, ref } from 'vue'
import { useMyStore } from './store'
import GMap from '/@/components/GMap.vue'
-
+import zhCN from 'ant-design-vue/es/locale/zh_CN'
export default defineComponent({
name: 'App',
components: { GMap },
setup () {
const store = useMyStore()
- return {}
+ return { zhCN }
}
})
diff --git a/src/api/http/type.ts b/src/api/http/type.ts
index f7d7982..bf3e5b8 100644
--- a/src/api/http/type.ts
+++ b/src/api/http/type.ts
@@ -23,6 +23,11 @@ export interface IWorkspaceResponse
{
data: T;
message: string;
}
+export interface idData{
+ ids?:any,
+ file_name?:string,
+ father_id:string|number
+}
export type IStatus = 'WAITING' | 'DOING' | 'SUCCESS' | 'FAILED';
diff --git a/src/api/manage.ts b/src/api/manage.ts
index d2d0d52..2a2818d 100644
--- a/src/api/manage.ts
+++ b/src/api/manage.ts
@@ -69,6 +69,13 @@ export const getLiveCapacity = async function (body: {}): Promise> {
+ const url = `${HTTP_PREFIX}/live/capacity?sn=${id}`
+ const result = await request.get(url)
+ return result.data
+}
+
// Start Livestream
export const startLivestream = async function (body: {}): Promise> {
const url = `${HTTP_PREFIX}/live/streams/start`
diff --git a/src/api/media.ts b/src/api/media.ts
index 59ed04e..132ccfe 100644
--- a/src/api/media.ts
+++ b/src/api/media.ts
@@ -1,10 +1,15 @@
import { message } from 'ant-design-vue'
-import request, { IPage, IWorkspaceResponse } from '/@/api/http/request'
+import request, { IPage, IWorkspaceResponse, idData } from '/@/api/http/request'
const HTTP_PREFIX = '/media/api/v1'
// Get Media Files
-export const getMediaFiles = async function (wid: string, pagination: IPage, pathId: string): Promise> {
- const url = `${HTTP_PREFIX}/files/${wid}/files?page=${pagination.page}&page_size=${pagination.page_size}&path_id=${pathId}`
+export const getMediaFiles = async function (wid: string, pagination: IPage, pathId?: string): Promise> {
+ let url = ''
+ if (pathId) {
+ url = `${HTTP_PREFIX}/files/${wid}/files?page=${pagination.page}&page_size=${pagination.page_size}&father_id=${pathId}`
+ } else {
+ url = `${HTTP_PREFIX}/files/${wid}/files?page=${pagination.page}&page_size=${pagination.page_size}`
+ }
const result = await request.get(url)
return result.data
}
@@ -24,10 +29,21 @@ export const downloadMediaFile = async function (workspaceId: string, fileId: st
return result.data
}
}
-
-// Get Media getFolder
-export const getFolder = async function (workspaceId: string, type: boolean): Promise> {
- const url = `${HTTP_PREFIX}/files/${workspaceId}/folder/${type}`
+// 新增或修改文件夹
+export const operateFile = async (wid: string, body:idData): Promise> => {
+ const url = `${HTTP_PREFIX}/files/${wid}/folder`
+ const result = await request.post(url, body)
+ return result.data
+}
+// 删除文件
+export const deleteFile = async (wid: string, id:any): Promise> => {
+ const url = `${HTTP_PREFIX}/files/${wid}/folder`
+ const result = await request.delete(url + '?id_arr=' + id)
+ return result.data
+}
+// 文件数
+export const floderTreeData = async (wid: string): Promise> => {
+ const url = `${HTTP_PREFIX}/files/${wid}/folder/tree`
const result = await request.get(url)
return result.data
}
diff --git a/src/assets/icons/folder.svg b/src/assets/icons/folder.svg
new file mode 100644
index 0000000..8777f01
--- /dev/null
+++ b/src/assets/icons/folder.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/icons/zip.svg b/src/assets/icons/zip.svg
new file mode 100644
index 0000000..c915c0a
--- /dev/null
+++ b/src/assets/icons/zip.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/GMap.vue b/src/components/GMap.vue
index db81615..762993f 100644
--- a/src/components/GMap.vue
+++ b/src/components/GMap.vue
@@ -140,14 +140,14 @@
{{ 10 > (deviceInfo.device.battery.remain_flight_time % 60) ? '0' : ''}}{{deviceInfo.device.battery.remain_flight_time % 60 }}
-