diff --git a/src/api/archivesManage/fileImport.js b/src/api/archivesManage/fileImport.js index 695f82c..3ee6891 100644 --- a/src/api/archivesManage/fileImport.js +++ b/src/api/archivesManage/fileImport.js @@ -38,9 +38,18 @@ export function FetchInitImportLog(params) { }) } +// 导入日志详情 +export function FetchInitImportLogDetail(params) { + return request({ + url: 'api/unzip/initImportLogDetail' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + export default { zipUpload, FetchInitImportPreview, FetchImportZip, - FetchInitImportLog + FetchInitImportLog, + FetchInitImportLogDetail } diff --git a/src/api/home/securityDoor/securityDoor.js b/src/api/home/securityDoor/securityDoor.js index d786068..546a94e 100644 --- a/src/api/home/securityDoor/securityDoor.js +++ b/src/api/home/securityDoor/securityDoor.js @@ -1,10 +1,10 @@ -import request from '@/utils/request' - -export function securitydoor(params) { - return request({ - url: 'api/securitydoor/initSecurityDoorLog', - method: 'get', - params - }) -} -export default { securitydoor } +import request from '@/utils/request' + +export function securitydoor(params) { + return request({ + url: 'api/securitydoor/initSecurityDoorLog1', + method: 'get', + params + }) +} +export default { securitydoor } diff --git a/src/views/archivesManage/fileImport/dataImport/index.vue b/src/views/archivesManage/fileImport/dataImport/index.vue index 44a3186..b0ea731 100644 --- a/src/views/archivesManage/fileImport/dataImport/index.vue +++ b/src/views/archivesManage/fileImport/dataImport/index.vue @@ -9,7 +9,7 @@
- +
选择文件
上传限制文件类型:zip
@@ -23,7 +23,7 @@
案卷:{{ ajnum }} 条 / 卷内:{{ danum }} 条 / 资料:{{ djnum }}
- +
上一步 @@ -81,6 +81,7 @@ export default { components: { detail }, data() { return { + key: 0, file: null, fileList: [], ajnum: null, @@ -96,7 +97,9 @@ export default { }, isShow01: true, isShow02: false, - isShow03: false + isShow03: false, + timer: null, + isLogOrPreview: 'preview' } }, computed: { @@ -107,9 +110,12 @@ export default { created() { }, methods: { + // input-upload change handleFileChange(event) { const files = event.target.files this.file = files[0] + this.key++ + console.log(this.file) // const sizeLimit = this.file.size / 1024 / 1024 > 10 // if (sizeLimit) { // this.$message.warning('上传文件大小不能超过 10MB!') @@ -119,6 +125,7 @@ export default { this.fileList.push(files[i]) } }, + // delt file deleteFile(file) { this.$confirm('此操作将清空所选数据, 是否继续?', '提示', { confirmButtonText: '确定', @@ -139,19 +146,18 @@ export default { }) }) }, + // 上传文件 handleStep01() { if (this.fileList.length !== 0) { this.zipName = this.file.name.split('.')[0] // 选择文件 crudFileImport.zipUpload(this.baseApi + '/api/unzip/preview', this.file).then(res => { - console.log(res) if (res.data.code === 200) { if (res.data.data) { this.isShow01 = false this.isShow02 = true // 导入预览 crudFileImport.FetchInitImportPreview({ page: 0, size: 10, type: 1 }).then(res => { - console.log(res) this.ajnum = res.ajnum this.danum = res.danum this.djnum = res.djnum @@ -166,26 +172,31 @@ export default { return } }, + // 第二步 上一步 handleReturn02() { this.fileList = [] this.isShow01 = true this.isShow02 = false this.isShow03 = false }, + // 第二步 下一步 handleStep02() { this.isShow01 = false this.isShow02 = false this.isShow03 = true }, + // 第三步 取消 handleReturn03() { - this.isShow01 = false - this.isShow02 = true + this.isShow01 = true + this.isShow02 = false this.isShow03 = false + this.fileList = [] + this.file = null }, + // 确认导入 submitForm(formName) { this.$refs[formName].validate((valid) => { if (valid) { - // 导入 const params = { 'archivesImportType': this.form.archivesImportType, 'importArchive': this.form.importArchive, @@ -194,12 +205,15 @@ export default { 'name': this.zipName } crudFileImport.FetchImportZip(params).then(res => { - console.log(res) if (res) { this.$message({ type: 'success', message: '导入成功!' }) + this.timer = setTimeout(() => { + this.$emit('step-end', '1') + clearTimeout(this.timer) + }, 1000) } }) } else { @@ -254,7 +268,6 @@ export default { } } } - &.dot-img{ width: 55px; height: 30px; diff --git a/src/views/archivesManage/fileImport/importLog/index.vue b/src/views/archivesManage/fileImport/importLog/index.vue index da19b9f..ec423c4 100644 --- a/src/views/archivesManage/fileImport/importLog/index.vue +++ b/src/views/archivesManage/fileImport/importLog/index.vue @@ -2,7 +2,7 @@
@@ -10,12 +10,16 @@ - - - - + + + + + + @@ -26,12 +30,7 @@
-
-

导入方式:跳过

-

成功读取数据:10000

-

成功导入数据:500

-
- +
@@ -39,7 +38,7 @@