diff --git a/src/api/cs-device-boot/fileService.ts b/src/api/cs-device-boot/fileService.ts new file mode 100644 index 0000000..7a09ec3 --- /dev/null +++ b/src/api/cs-device-boot/fileService.ts @@ -0,0 +1,41 @@ +import createAxios from '@/utils/request' + +// 设备文件根目录查询 +export function getDeviceRootPath(nDid) { + return createAxios({ + url: '/cs-device-boot/deviceFile/askDeviceRootPath?nDid=' + nDid, + method: 'POST' + }) +} + +// 设备文件-目录信息询问 +export function getFileServiceFileOrDir(data) { + return createAxios({ + url: `cs-device-boot/deviceFile/askDeviceFileOrDir?nDid=${data.nDid}&name=${data.name}&type=${data.type}`, + method: 'POST' + }) +} + +//设备文件下载 +export function downLoadDeviceFile(data) { + return createAxios({ + url: `/cs-device-boot/deviceFile/downloadFile?nDid=${data.nDid}&name=${data.name}&fileCheck=${data.fileCheck}&size=${data.size}`, + method: 'POST' + }) +} + +//上传文件至装置 +export function uploadDeviceFile(data) { + let form = new FormData() + form.append('file', data.file) + form.append('filePath', data.filePath) + form.append('id', data.id) + return createAxios({ + url: `/access-boot/analyzeModel/uploadDevFile`, + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: form + }) +} diff --git a/src/views/auth/menu/popupApi.vue b/src/views/auth/menu/popupApi.vue index bc5c3ae..eced413 100644 --- a/src/views/auth/menu/popupApi.vue +++ b/src/views/auth/menu/popupApi.vue @@ -59,7 +59,7 @@ const rules = { code: [ { required: true, message: '标识不能为空', trigger: 'blur' }, { - pattern: /^[a-zA-Z_]{1}[a-zA-Z0-9_]{2,15}$/, + pattern: /^[a-zA-Z_]{1}[a-zA-Z0-9_]{2,20}$/, message: '请输入至少3-20位英文', min: 3, max: 20, diff --git a/src/views/govern/device/control/analysisList/index.vue b/src/views/govern/device/control/analysisList/index.vue index 233bff7..c121689 100644 --- a/src/views/govern/device/control/analysisList/index.vue +++ b/src/views/govern/device/control/analysisList/index.vue @@ -80,7 +80,7 @@ const updateViewportHeight = async () => { // height.value = window.innerHeight; height.value = window.innerHeight < 1080 ? 180 : 400 tableStore.table.publicHeight = height.value - await tableStore.index() + // await tableStore.index() } onMounted(() => { diff --git a/src/views/govern/device/fileService/index.vue b/src/views/govern/device/fileService/index.vue new file mode 100644 index 0000000..efc223c --- /dev/null +++ b/src/views/govern/device/fileService/index.vue @@ -0,0 +1,239 @@ + + + + + + diff --git a/src/views/govern/device/fileService/popup.vue b/src/views/govern/device/fileService/popup.vue new file mode 100644 index 0000000..da9319a --- /dev/null +++ b/src/views/govern/device/fileService/popup.vue @@ -0,0 +1,83 @@ + + + +