diff --git a/src/api/device/instance.ts b/src/api/device/instance.ts index 9562fd06..9f4cf6f9 100644 --- a/src/api/device/instance.ts +++ b/src/api/device/instance.ts @@ -571,3 +571,6 @@ export const queryLog = (deviceId: string, data: Record) => ser */ export const queryLogsType = () => server.get(`/dictionary/device-log-type/items`) +export const getDeviceNumber = (data?:any) => server.post('/device-instance/_count', data) + + diff --git a/src/components/NormalUpload/index.vue b/src/components/NormalUpload/index.vue index 42cc2455..1ed86af6 100644 --- a/src/components/NormalUpload/index.vue +++ b/src/components/NormalUpload/index.vue @@ -40,14 +40,13 @@ import { FILE_UPLOAD } from '@/api/comm'; import { TOKEN_KEY } from '@/utils/variable'; import { LocalStore, onlyMessage } from '@/utils/comm'; -import { downloadFile, downloadFileByUrl } from '@/utils/utils'; +import { downloadFileByUrl } from '@/utils/utils'; import { deviceImport, - deviceTemplateDownload, templateDownload, } from '@/api/device/instance'; import { EventSourcePolyfill } from 'event-source-polyfill'; -import { message } from 'ant-design-vue'; +import { message } from 'jetlinks-ui-components'; type Emits = { (e: 'update:modelValue', data: string[]): void; @@ -73,6 +72,15 @@ const props = defineProps({ }; }, }, + url: { + type: Object, + default: () => { + return { + fileType: 'xlsx', + autoDeploy: false, + }; + }, + }, }); const importLoading = ref(false); @@ -81,7 +89,6 @@ const count = ref(0); const errMessage = ref(''); const downFile = async (type: string) => { - // downloadFile(deviceTemplateDownload(props.product, type)); const res: any = await templateDownload(props.product, type); if (res) { const blob = new Blob([res], { type: type }); diff --git a/src/views/device/Instance/Process/index.vue b/src/views/device/Instance/Process/index.vue index eb6fe298..0437cc9d 100644 --- a/src/views/device/Instance/Process/index.vue +++ b/src/views/device/Instance/Process/index.vue @@ -23,7 +23,7 @@ @@ -188,3 +193,4 @@ getConfig(); color: @primary-color; } + diff --git a/src/views/iot-card/CardManagement/UploadFile.vue b/src/views/iot-card/CardManagement/UploadFile.vue new file mode 100644 index 00000000..ed5e3b72 --- /dev/null +++ b/src/views/iot-card/CardManagement/UploadFile.vue @@ -0,0 +1,115 @@ + + + \ No newline at end of file