liuxiangqi пре 1 година
родитељ
комит
e1f493c8bc

+ 1 - 1
src/views/enterprise/project/components/addProject.vue

@@ -179,7 +179,7 @@
       getYears(){
         let optionsArray = new Array();
         let years= new Date().getFullYear();
-        for(var i=years;i>=years-3;i++){
+        for(var i=years;i>=years-3;i--){
           let anOption = {};
           anOption.dictValue=i;
           anOption.dictLabel=i;

+ 9 - 18
src/views/enterprise/project/components/ent-edit.vue

@@ -555,25 +555,16 @@ export default {
             this.form.projectStartDate = ''
             this.form.projectEndDate = ''
           }
-          let _self = this;
-          this.$confirm('是否确认保存?', "警告", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(function() {
-            declareUpdateApi(_self.form).then(res => {
-              _self.$alert('企业研发项目情况保存成功', '提示', {
-                confirmButtonText: '确定',
-                callback: action => {
-                  _self.loading = false
-                  _self.$store.dispatch("tagsView/delView", _self.$route);
-                  _self.$router.go(-1);
-                }
-              })
+          declareUpdateApi(this.form).then(res => {
+            this.$alert('企业研发项目情况保存成功', '提示', {
+              confirmButtonText: '确定',
+              callback: action => {
+                this.loading = false
+                this.$store.dispatch("tagsView/delView", this.$route);
+                this.$router.go(-1);
+              }
             })
-          }).catch(() => {
-              _self.loading = false
-          });
+          })
         }
       })
     }