Browse Source

后台设备管理上传逻辑完善,界面完善

chenwen 2 years ago
parent
commit
82edd1002b

+ 1 - 1
src/main/java/com/jpsoft/proj/newsinfo/controller/EquipmentController.java

@@ -55,7 +55,7 @@ public class EquipmentController {
 		
 		
 		RespVO rst=UploadUtils.saveFile(request, "equipment");
 		RespVO rst=UploadUtils.saveFile(request, "equipment");
 		Map<String,Object>  rstMap=(Map<String,Object>)rst.getData();
 		Map<String,Object>  rstMap=(Map<String,Object>)rst.getData();
-		rstMap=MapUtils.trackMap(rstMap, "equPrice","filePath","accessPath","equSort","note");
+		rstMap=MapUtils.trackMap(rstMap, "equPrice","filePath","accessPath","equSort","note","displayNum");
 		
 		
 		String equId=service.add(rstMap);
 		String equId=service.add(rstMap);
 		
 		

+ 1 - 1
src/main/java/com/jpsoft/proj/utils/UploadUtils.java

@@ -81,7 +81,7 @@ public class UploadUtils {
 		String accessPath=SysConfigUtil.getConfig("accessPath")+"/upload/"+StringUtils.join(subPaths,"/")+"/"+newFileName;
 		String accessPath=SysConfigUtil.getConfig("accessPath")+"/upload/"+StringUtils.join(subPaths,"/")+"/"+newFileName;
 		
 		
 		uploadDatas.put("fileName", newFileName);
 		uploadDatas.put("fileName", newFileName);
-		uploadDatas.put("filePath", relPath);
+		uploadDatas.put("filePath", relPath+File.separator+newFileName);
 		uploadDatas.put("accessPath", accessPath);
 		uploadDatas.put("accessPath", accessPath);
 		
 		
 		return RespVOBuilder.ok(uploadDatas);
 		return RespVOBuilder.ok(uploadDatas);

+ 4 - 3
src/main/webapp/page/notice/equipmentQuery.js

@@ -30,8 +30,9 @@ layui.use(['element','mylayer','newtable','laydate','myform','page'], function (
 				  							 return {'rescue':'救援设备','intelligent':'智能设备'}[d.equSort]||'';
 				  							 return {'rescue':'救援设备','intelligent':'智能设备'}[d.equSort]||'';
 				  						 }},
 				  						 }},
 										 {field: 'equPrice', title: '价格', width:100},
 										 {field: 'equPrice', title: '价格', width:100},
-				  						 {field: 'note', title: '说明', width:140},
+				  						 {field: 'note', title: '说明', width:300},
 				  						 {field: 'linkPage', title: '链接', width:300},
 				  						 {field: 'linkPage', title: '链接', width:300},
+				  						 {field: 'displayNum', title: '显示序号', width:100},
 				  						 {field: 'modifyTimeFmt', title: '发布时间', width:160},
 				  						 {field: 'modifyTimeFmt', title: '发布时间', width:160},
 				  						 {field: 'operate', title: '操作', width:180,align:'center',toolbar:'#toolbar'}
 				  						 {field: 'operate', title: '操作', width:180,align:'center',toolbar:'#toolbar'}
 				  						
 				  						
@@ -73,8 +74,8 @@ layui.use(['element','mylayer','newtable','laydate','myform','page'], function (
 					if(layEvent === 'del'){
 					if(layEvent === 'del'){
 						layer.confirm("确定要删除该记录吗?", {icon: 3, title:'提示'}, function(index){
 						layer.confirm("确定要删除该记录吗?", {icon: 3, title:'提示'}, function(index){
 							page.ajax({
 							page.ajax({
-								 url:"ad/del.do",
-								 data:{adId:data.adId}
+								 url:"equ/del.do",
+								 data:{equId:data.equId}
 							 },function(resp){
 							 },function(resp){
 								 if(!resp.success){
 								 if(!resp.success){
 									 layer.msg(resp.error);
 									 layer.msg(resp.error);