diff --git a/src/components/OneFile/OneFile.vue b/src/components/OneFile/OneFile.vue index eda86b1..ed44791 100644 --- a/src/components/OneFile/OneFile.vue +++ b/src/components/OneFile/OneFile.vue @@ -77,7 +77,7 @@
- 提交 + 提交
@@ -122,30 +122,37 @@ export default { openSubmit(){ this.dialogVisible=true; }, - submit(){ - axios({ - method: 'post', - // 请求的地址 - url: 'http://localhost:8082/helloGithub_war_exploded/insertFileByAdmin', - // URL 中的查询参数 - params: this.form, - }).then(function (res) { - if(res.data.code===200){ - Vue.prototype.$notify({ - title: '成功', - message: ('i', {style: 'color: teal'}, res.data.msg+'请等待审核'), - type: 'success', - offset: 50 - }); - }else{ - Vue.prototype.$notify.error({ - title: '错误', - message: res.data.msg, - offset: 50 - }); - } + submit(formName){ + this.$refs[formName].validate((valid) => { + if (valid) { + axios({ + method: 'post', + // 请求的地址 + url: 'http://localhost:8082/helloGithub_war_exploded/insertFileByAdmin', + // URL 中的查询参数 + params: this.form, + }).then(function (res) { + if(res.data.code===200){ + Vue.prototype.$notify({ + title: '成功', + message: ('i', {style: 'color: teal'}, res.data.msg+'请等待审核'), + type: 'success', + offset: 50 + }); + }else{ + Vue.prototype.$notify.error({ + title: '错误', + message: res.data.msg, + offset: 50 + }); + } + }) + }else{ + return false; + } }) + }, goBack() { window.history.go(-1); diff --git a/src/components/System/AdminHeader.vue b/src/components/System/AdminHeader.vue index 3652498..435e98b 100644 --- a/src/components/System/AdminHeader.vue +++ b/src/components/System/AdminHeader.vue @@ -11,9 +11,9 @@ class="el-menu-demo" mode="horizontal" text-color="#ffffff"> - - 大屏展示 - + + +
diff --git a/src/components/System/AdminHome.vue b/src/components/System/AdminHome.vue index 156d61c..a6a0bc9 100644 --- a/src/components/System/AdminHome.vue +++ b/src/components/System/AdminHome.vue @@ -300,9 +300,9 @@ export default { that.date=res.data.Date; that.Month=res.data.Month; that.Year=res.data.Year; - setTimeout(()=>{ - that.eChart2(that.date,'echart2'); - },1000); + + that.eChart2(that.date,'echart2'); + @@ -413,9 +413,9 @@ export default { xData.push(a.categoryName); yData.push(a.num); }); - setTimeout(()=>{ - that.echart_Pie(xData,yData,'echart1'); - },1000) + + that.echart_Pie(xData,yData,'echart1'); + }); },