diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 49bdd44..abf1b06 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -9,7 +9,7 @@ serverproperties: spring: thymeleaf: prefix: classpath:/templates/ - cache: false + cache: true check-template: true datasource: diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 7ef289a..9efaa1c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,4 +1,4 @@ #控制配置文件调用 spring: profiles: - active: prod \ No newline at end of file + active: dev \ No newline at end of file diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 272ad8e..e80b7f5 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -25,13 +25,13 @@ - - /www/cmsfile/%d/info.%d.log - - + F:\JAVA Workspace\Temp\log\%d\info.%d.log + + + - - + + ERROR @@ -44,8 +44,8 @@ - - /www/cmsfile/%d/error.%d.log + F:\JAVA Workspace\Temp\log\error.%d.log + diff --git a/src/main/resources/static/js/homepage.js b/src/main/resources/static/js/homepage.js index f0672b2..3d5271a 100644 --- a/src/main/resources/static/js/homepage.js +++ b/src/main/resources/static/js/homepage.js @@ -163,15 +163,11 @@ var Main = { }, mounted() { this.$nextTick(() => { - var that = this; - axios.get(getRootPath_web()+'/download/findone') - .then(function (response) { - console.log(response.data); - that.DownloadList = response.data; - }) - .catch(function (error) { - console.log(error); - }); + let that = this; + /*setInterval(function(){ + that.getFileList(); + },1000);*/ + this.getFileList(); axios.get(getRootPath_web()+'/home/findAllHomework') .then(function (response) { console.log(response.data); @@ -202,6 +198,18 @@ var Main = { }) }, methods: { + getFileList(){ + let that = this; + axios.get(getRootPath_web()+'/download/findone') + .then(function (response) { + //console.log(response.data); + that.DownloadList = response.data; + }) + .catch(function (error) { + console.log(error); + that.openNotiError("失败", "获取文件列表失败!"); + }); + }, openNotiSuccess(title, content) { this.$notify({ title: title, @@ -279,7 +287,10 @@ var Main = { console.log(row.colfileid); }, submitUpload() { + let that = this; this.$refs.upload.submit(); + this.openNotiSuccess("成功", "文件上传成功!"); + setTimeout(function () {that.getFileList();},1000); }, handleRemove(file, fileList) { console.log(file, fileList); @@ -315,7 +326,8 @@ var Main = { if (response.data===true){ //that.$refs[formName].submit; //return true; - that.openNotiSuccess("成功", "删除成功!") + that.openNotiSuccess("成功", "删除成功!"); + that.getFileList(); }else if (response.data===false){ that.openNotiError("失败", "删除失败!"); }else { diff --git a/src/main/resources/templates/home/home.html b/src/main/resources/templates/home/home.html index 300cf12..9e56a5c 100644 --- a/src/main/resources/templates/home/home.html +++ b/src/main/resources/templates/home/home.html @@ -237,6 +237,10 @@ + + + +