diff --git a/src/components/input/UploadImageInput.vue b/src/components/input/UploadImageInput.vue index 6ff7de1..7b97caa 100644 --- a/src/components/input/UploadImageInput.vue +++ b/src/components/input/UploadImageInput.vue @@ -103,7 +103,7 @@ export default { fileList: [], isLocked: false, // true表示输入框正在输入状态 timer: null, - uploadState: 0, // 文件上传状态, 0 没有文件上传, 1 正在上传, 2 上传成功 + uploadState: 0, // 文件上传状态, 0 没有文件上传, 1 正在上传, 2 上传成功, 3 不支持自动上传, 4 加载中 uploadTip: '', dialogSelectFile: false, uploadPercentage: 0 @@ -187,11 +187,17 @@ export default { that.uploadState = 4 that.urlToBlob(that.currentValue, response => { that.uploadState = 1 + let fileName = that.getFileNameByUrl(that.currentValue) + if (response.type.startsWith("image") && fileName.indexOf(".")) { + let suffix = response.type.replace("image/",".") + fileName += suffix + } const file = new window.File( [response], - that.getFileNameByUrl(that.currentValue), + fileName, { type: response.type } ); + console.log(file) let data = new FormData() data.append("files", file) data.append("username", that.$store.state.user.name) diff --git a/src/views/setting/sys/logList.vue b/src/views/setting/sys/logList.vue index 0b16330..38f8f8e 100644 --- a/src/views/setting/sys/logList.vue +++ b/src/views/setting/sys/logList.vue @@ -6,9 +6,9 @@ - + - + - + - + + + + + + - +
查询 @@ -93,10 +98,7 @@ export default { pageSize: 12, pageTotal: 0 }, - options: this.type === 'LOGIN' ? [{ - value: 'LOGIN', - label: '登录' - }] : [{ + options: [{ value: 'LOGIN', label: '登录' }, { @@ -110,9 +112,11 @@ export default { label: 'WebDAV' }], typeValue: this.type, + isLoginType: this.type === 'LOGIN', // 查询条件 queryCondition: { username: undefined, + operationModule: undefined, type: this.type, startTime: undefined, endTime: undefined