瀏覽代碼

预算看板代码添加删除功能

user5 3 年之前
父節點
當前提交
9818701bb0

+ 16 - 0
src/main/java/com/jeeplus/modules/sg/budgetSpectaculars/web/ProjectBasicsController.java

@@ -197,4 +197,20 @@ public class ProjectBasicsController extends BaseController {
         return j;
     }
 
+    /**
+     * 批量删除利库资源池
+     */
+    @ResponseBody
+    @RequiresPermissions("budgetSpectaculars:budgetSpectaculars:delete")
+    @RequestMapping(value = "deleteAll")
+    public AjaxJson deleteAll(String ids) {
+        AjaxJson j = new AjaxJson();
+        String idArray[] =ids.split(",");
+        for(String id : idArray){
+            service.delete(service.get(id));
+        }
+        j.setMsg("删除利库资源池成功");
+        return j;
+    }
+
 }

+ 2 - 2
src/main/webapp/webpage/modules/sg/project/projectBasics/projectBasicsList.js

@@ -79,11 +79,11 @@ $(document).ready(function() {
                	onShowSearch: function () {
 			$("#search-collapse").slideToggle();
 		},
-               columns: [/*{
+               columns: [{
 		        checkbox: true
 
 		    }
-			,*/{
+			,{
                     field: 'projectName',
                     title: '项目名称',
                     sortable: true,

+ 5 - 0
src/main/webapp/webpage/modules/sg/project/projectBasics/projectBasicsList.jsp

@@ -66,6 +66,11 @@
 						<i class="fa fa-folder-open-o"></i> 导入手工维护信息
 					</button>
 				</shiro:hasPermission>
+				<shiro:hasPermission name="budgetSpectaculars:budgetSpectaculars:delete">
+					<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
+						<i class="glyphicon glyphicon-remove"></i> 删除
+					</button>
+				</shiro:hasPermission>
 			</div>
 
 	<!-- 表格 -->