Browse Source

工程管理1

xs 5 years atrás
parent
commit
ab1ddebd7e
1 changed files with 15 additions and 1 deletions
  1. 15 1
      src/main/webapp/webpage/modules/sg/project/management.jsp

+ 15 - 1
src/main/webapp/webpage/modules/sg/project/management.jsp

@@ -319,7 +319,21 @@
     function addProject(){
         layer.prompt({title: '请输入工程名称', formType: 3}, function(text, index){
             layer.close(index);
-            layer.msg('添加成功'+text, {icon: 1});
+            $.ajax({
+                type: "post",
+                url: "#",
+                data:{name:text},
+                dataType: "json",
+                success: function(data){
+                    if(data.result!=null){
+                        layer.msg(data.result, {icon: 1});
+                        window.location.reload();
+                    }else{
+                        layer.msg('添加失败', {icon: 1});
+                    },
+                }
+            });
+
         });
     }
 </script>