Преглед изворни кода

添加项目登记更改项目模块

user5 пре 5 година
родитељ
комит
2b67103e2f

+ 73 - 2
src/main/java/com/jeeplus/common/bos/BosController.java

@@ -1,15 +1,24 @@
 package com.jeeplus.common.bos;
 
+import com.jeeplus.common.config.FileGlobal;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.json.AjaxJson;
 import com.jeeplus.common.ossutil.OssClient;
-import com.jeeplus.modules.iim.entity.MailPage;
+import com.jeeplus.common.utils.FileUtils;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.security.SystemAuthorizingRealm;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.Calendar;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -17,10 +26,15 @@ import java.util.Map;
 @RequestMapping(value = "${adminPath}/bos/")
 public class BosController {
     private final String url = "http://jsjyoa.oss-cn-hangzhou.aliyuncs.com/";
+    private final  String upLoadUrl = Global.getConfig("upLoadUrl");
     @RequestMapping("upload")
     @ResponseBody
-    public Map upload(HttpServletRequest request, MultipartFile file) {
+    public Map upload(HttpServletRequest request, MultipartFile file) throws IOException {
         Map map = new HashMap();
+        /*AjaxJson webupload = this.webupload(request, file);
+        map.put("msg",webupload.getMsg());
+        map.put("code","1");
+        map.put("url",webupload.getBody().get("url"));*/
         String storeAs = request.getParameter("storeAs");
         try {
             String path = storeAs;
@@ -58,4 +72,61 @@ public class BosController {
         return map;
     }
 
+    @RequestMapping("toUpload")
+    @ResponseBody
+    public Map toUpload(MultipartFile uploadFile) {
+        Map map = new HashMap();
+        try {
+            String name = uploadFile.getOriginalFilename();
+            String path = upLoadUrl+System.currentTimeMillis()+"/"+name;
+            File destFile = new File(path);
+            if (!destFile.exists()){
+                destFile.mkdirs();
+            }
+            uploadFile.transferTo(destFile);
+            map.put("msg","上传成功");
+            map.put("code","1");
+            map.put("url",url+path);
+        }catch (Exception e){
+            map.put("msg","上传失败");
+            map.put("code","0");
+        }
+        return map;
+    }
+
+    /**
+     * 上传文件到本地
+     * @return
+     * @throws IOException
+     * @throws IllegalStateException
+     */
+    @RequiresPermissions("user")
+    @RequestMapping(value = "webupload/upload")
+    @ResponseBody
+    public AjaxJson webupload(HttpServletRequest request, MultipartFile file) throws IllegalStateException, IOException {
+        AjaxJson j = new AjaxJson();
+
+        User currentUser = UserUtils.getUser();
+        Calendar cal = Calendar.getInstance();
+        int year = cal.get(Calendar.YEAR);
+        int month = cal.get(Calendar.MONTH )+1;
+        SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
+        String fileUrl = FileGlobal.getAttachmentUrl2()+year+"/"+month+"/"+System.currentTimeMillis()+"/";
+        String fileDir = FileGlobal.getAttachmentDir2()+year+"/"+month+"/"+System.currentTimeMillis()+"/";
+        // 判断文件是否为空
+        if (!file.isEmpty()) {
+            // 文件保存路径
+            // 转存文件
+            FileUtils.createDirectory(fileDir);
+            String name = file.getOriginalFilename();
+            String filePath = fileDir +  name;
+            //File newFile = FileUtils.getAvailableFile(filePath,0);
+            File newFile = new File(filePath);
+            file.transferTo(newFile);
+            j.put("id", newFile.getAbsolutePath());
+            j.put("url", fileUrl+ newFile.getName());
+        }
+        return j;
+    }
+
 }

+ 340 - 0
src/main/java/com/jeeplus/common/config/FileGlobal.java

@@ -0,0 +1,340 @@
+package com.jeeplus.common.config;
+
+import com.google.common.collect.Maps;
+import com.jeeplus.common.utils.FileUtils;
+import com.jeeplus.common.utils.PropertiesLoader;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.Servlets;
+import com.jeeplus.modules.sys.security.SystemAuthorizingRealm;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.apache.ibatis.io.Resources;
+import org.springframework.core.io.DefaultResourceLoader;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.Map;
+import java.util.Properties;
+
+public class FileGlobal {
+
+    /**
+     * 当前对象实例
+     */
+    private static FileGlobal global = new FileGlobal();
+
+    /**
+     * 保存全局属性值
+     */
+    private static Map<String, String> map = Maps.newHashMap();
+
+    /**
+     * 属性文件加载对象
+     */
+    private static PropertiesLoader loader = new PropertiesLoader("/properties/jeeplus.properties");
+
+    /**
+     * 显示/隐藏
+     */
+    public static final String SHOW = "1";
+    public static final String HIDE = "0";
+
+    /**
+     * 是/否
+     */
+    public static final String YES = "1";
+    public static final String NO = "0";
+
+    /**
+     * 对/错
+     */
+    public static final String TRUE = "true";
+    public static final String FALSE = "false";
+
+    /**
+     * 上传文件基础虚拟路径
+     */
+    public static final String USERFILES_BASE_URL = "/freemarker/";
+
+    public static final String FILES_FILESERVER = "/fileServer/";
+
+
+    /**
+     * 判断服务器系统类型,1是windows系统,2是linux系统
+     */
+    public static final String SYS_TYPE = System.getProperty("os.name").toLowerCase().startsWith("win") ? "1" : "2";
+
+
+
+    /**
+     * 共享文档物理存储地址
+     *
+     * @return
+     */
+    public static String getShareBaseDir() {
+        String dir = Global.getUserfilesBaseDir() + Global.USERFILES_BASE_URL + "共享文档/";
+        FileUtils.createDirectory(dir);
+        return dir;
+    }
+
+    /**
+     * 共享文档网络访问地址
+     *
+     * @return
+     */
+    public static String getShareBaseUrl() {
+        SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
+        return Servlets.getRequest().getContextPath() + Global.USERFILES_BASE_URL + "/共享文档/";
+    }
+
+    /**
+     * 我的文档物理存储地址
+     *
+     * @return
+     */
+    public static String getMyDocDir() {
+        SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
+        String dir = Global.getUserfilesBaseDir() + Global.USERFILES_BASE_URL + principal + "/我的文档/";
+        FileUtils.createDirectory(dir);
+        return dir;
+    }
+
+    /**
+     * 我的文档网络访问地址
+     *
+     * @return
+     */
+    public static String getMyDocUrl() {
+        SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
+        return Servlets.getRequest().getContextPath() + Global.USERFILES_BASE_URL + principal + "/我的文档/";
+    }
+
+    /**
+     * 程序附件物理存储地址
+     *
+     * @return
+     */
+    public static String getAttachmentDir() {
+        SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
+        String dir = Global.getUserfilesBaseDir() + Global.USERFILES_BASE_URL;
+        FileUtils.createDirectory(dir);
+        return dir;
+    }
+
+    /**
+     * 程序附件物理存储地址
+     *
+     * @return
+     */
+    public static String getAttachmentDir2() {
+        SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
+        String dir = "";
+        String FILE_PREFIX = loader.getProperty("linux.file.store.prefix");
+        if (SYS_TYPE.equals("1")) {
+            dir = FileGlobal.getUserfilesBaseDir() + FileGlobal.FILES_FILESERVER;
+        } else {
+            //liunx file store prefix
+            dir =  FILE_PREFIX + Servlets.getRequest().getContextPath() + FileGlobal.FILES_FILESERVER;
+        }
+
+        FileUtils.createDirectory(dir);
+        return dir;
+    }
+
+    /**
+     * 程序附件网络访问地址
+     *
+     * @return
+     */
+    public static String getAttachmentUrl() {
+
+        SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
+        return Servlets.getRequest().getContextPath() + Global.USERFILES_BASE_URL;
+    }
+
+
+    /**
+     * 程序附件网络访问地址
+     *
+     * @return
+     */
+    public static String getAttachmentUrl2() {
+
+        SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
+        return Servlets.getRequest().getContextPath() + FileGlobal.FILES_FILESERVER;
+    }
+
+    /**
+     * 绝对地址转换为网络地址
+     *
+     * @return
+     */
+    public static String transDirToUrl(String dir) {
+        return Servlets.getRequest().getContextPath() + "/" + dir.substring(Global.getUserfilesBaseDir().length());
+    }
+
+    /**
+     * 获取当前对象实例
+     */
+    public static FileGlobal getInstance() {
+        return global;
+    }
+
+    /**
+     * 获取配置
+     */
+    public static String getConfig(String key) {
+        String value = map.get(key);
+        if (value == null) {
+            value = loader.getProperty(key);
+            map.put(key, value != null ? value : StringUtils.EMPTY);
+        }
+        return value;
+    }
+
+    /**
+     * 获取管理端根路径
+     */
+    public static String getAdminPath() {
+        return getConfig("adminPath");
+    }
+
+
+    /**
+     * 获取管理端根路径
+     */
+    public static String getDefaultTheme() {
+        return getConfig("defaultTheme");
+    }
+
+    /**
+     * 获取前端根路径
+     */
+    public static String getFrontPath() {
+        return getConfig("frontPath");
+    }
+
+    /**
+     * 获取URL后缀
+     */
+    public static String getUrlSuffix() {
+        return getConfig("urlSuffix");
+    }
+
+    /**
+     * 是否是演示模式,演示模式下不能修改用户、角色、密码、菜单、授权
+     */
+    public static Boolean isDemoMode() {
+        String dm = getConfig("demoMode");
+        return "true".equals(dm) || "1".equals(dm);
+    }
+
+    /**
+     * 在修改系统用户和角色时是否同步到Activiti
+     */
+    public static Boolean isSynActivitiIndetity() {
+        String dm = getConfig("activiti.isSynActivitiIndetity");
+        return "true".equals(dm) || "1".equals(dm);
+    }
+
+    /**
+     * 页面获取常量
+     */
+    public static Object getConst(String field) {
+        try {
+            return Global.class.getField(field).get(null);
+        } catch (Exception e) {
+            // 异常代表无配置,这里什么也不做
+        }
+        return null;
+    }
+
+    /**
+     * 获取上传文件的根目录
+     *
+     * @return
+     */
+    public static String getUserfilesBaseDir() {
+        String dir = getConfig("userfiles.basedir");
+        if (StringUtils.isBlank(dir)) {
+            return "";
+        }
+        if (!dir.endsWith("/")) {
+            dir += "/";
+        }
+//		System.out.println("userfiles.basedir: " + dir);
+        return dir;
+    }
+
+    /**
+     * 获取工程路径
+     *
+     * @return
+     */
+    public static String getProjectPath() {
+        // 如果配置了工程路径,则直接返回,否则自动获取。
+        String projectPath = Global.getConfig("projectPath");
+        if (StringUtils.isNotBlank(projectPath)) {
+            return projectPath;
+        }
+        try {
+            File file = new DefaultResourceLoader().getResource("").getFile();
+            if (file != null) {
+                while (true) {
+                    File f = new File(file.getPath() + File.separator + "src" + File.separator + "main");
+                    if (f == null || f.exists()) {
+                        break;
+                    }
+                    if (file.getParentFile() != null) {
+                        file = file.getParentFile();
+                    } else {
+                        break;
+                    }
+                }
+                projectPath = file.toString();
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return projectPath;
+    }
+
+    /**
+     * 写入properties信息
+     *
+     * @param key   名称
+     * @param value 值
+     */
+    public static void modifyConfig(String key, String value) {
+        try {
+            // 从输入流中读取属性列表(键和元素对)
+            Properties prop = getProperties();
+            prop.setProperty(key, value);
+            String path = Global.class.getResource("/properties/jeeplus.properties").getPath();
+            FileOutputStream outputFile = new FileOutputStream(path);
+            prop.store(outputFile, "modify");
+            outputFile.close();
+            outputFile.flush();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 返回 Properties
+     *
+     * @param
+     * @return
+     */
+    public static Properties getProperties() {
+        Properties prop = new Properties();
+        try {
+            Reader reader = Resources.getResourceAsReader("/properties/jeeplus.properties");
+            prop.load(reader);
+        } catch (Exception e) {
+            return null;
+        }
+        return prop;
+    }
+}

+ 5 - 5
src/main/java/com/jeeplus/common/config/Global.java

@@ -31,12 +31,12 @@ public class Global {
 	 * 当前对象实例
 	 */
 	private static Global global = new Global();
-	
+
 	/**
 	 * 保存全局属性值
 	 */
 	private static Map<String, String> map = Maps.newHashMap();
-	
+
 	/**
 	 * 属性文件加载对象
 	 */
@@ -53,18 +53,18 @@ public class Global {
 	 */
 	public static final String YES = "1";
 	public static final String NO = "0";
-	
+
 	/**
 	 * 对/错
 	 */
 	public static final String TRUE = "true";
 	public static final String FALSE = "false";
-	
+
 	/**
 	 * 上传文件基础虚拟路径
 	 */
 	public static final String USERFILES_BASE_URL = "/userfiles/";
-	
+
 	/**
 	 * 获取当前对象实例
 	 */

+ 38 - 31
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsAlterService.java

@@ -8,17 +8,16 @@ import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.Collections3;
 import com.jeeplus.common.utils.MenuStatusEnum;
-import com.jeeplus.common.websocket.onchat.ChatServerPool;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.act.utils.ProcessDefCache;
 import com.jeeplus.modules.projectrecord.dao.ProjectClientLinkmanDao;
 import com.jeeplus.modules.projectrecord.dao.ProjectRecordsAlterDao;
+import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecordsAlter;
 import com.jeeplus.modules.projectrecord.enums.AlterStatusEnum;
 import com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum;
-import com.jeeplus.modules.sys.entity.Dict;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.service.DictService;
@@ -42,8 +41,6 @@ import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
-import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
-import org.activiti.engine.ActivitiObjectNotFoundException;
 import org.activiti.engine.HistoryService;
 import org.activiti.engine.IdentityService;
 import org.activiti.engine.RuntimeService;
@@ -52,16 +49,12 @@ import org.activiti.engine.history.HistoricTaskInstanceQuery;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.apache.commons.beanutils.BeanUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.java_websocket.WebSocket;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 项目登记Service
@@ -199,20 +192,32 @@ public class ProjectRecordsAlterService extends CrudService<ProjectRecordsAlterD
 	 * @param isEntrust   是否委托方
 	 */
 	private void saveLinkmanInfos(String projectId, List<WorkClientLinkman> linkmanList, boolean isEntrust) {
-		assert (projectId != null);
-        if(linkmanList == null || linkmanList.isEmpty()){
-            return;
+        if (null != linkmanList) {
+            List<WorkClientLinkman> newLinkmanList = new ArrayList<WorkClientLinkman>();
+            Iterator<WorkClientLinkman> iterator = linkmanList.iterator();
+            while (iterator.hasNext()) {
+                WorkClientLinkman next = iterator.next();
+                if (null == next.getId()) {
+                    iterator.remove();
+                } else {
+                    newLinkmanList.add(next);
+                }
+            }
+            assert (projectId != null);
+            if (newLinkmanList == null || newLinkmanList.isEmpty()) {
+                return;
+            }
+            HashMap<String, Object> map = new HashMap<>(5);
+            map.put("projectId", projectId);
+            map.put("linkmanList", newLinkmanList);
+            int entrust = 0;
+            if (isEntrust) {
+                entrust = 1;
+            }
+            clientLinkmanDao.deleteProjectLinkmans(projectId, entrust);
+            map.put("isEntrust", entrust);
+            clientLinkmanDao.batchInsert(map);
         }
-		HashMap<String, Object> map = new HashMap<>(5);
-		map.put("projectId", projectId);
-		map.put("linkmanList", linkmanList);
-		int entrust = 0;
-		if (isEntrust) {
-			entrust = 1;
-		}
-		clientLinkmanDao.deleteProjectLinkmans(projectId, entrust);
-		map.put("isEntrust", entrust);
-		clientLinkmanDao.batchInsert(map);
 	}
 
 	/**
@@ -802,17 +807,19 @@ public class ProjectRecordsAlterService extends CrudService<ProjectRecordsAlterD
 	}
 
 	public void queryContractInfo(ProjectRecordsAlter projectRecords) {
-		WorkContractInfo workContractInfo = contractInfoService.get(projectRecords.getWorkContractInfo().getId());
-		workContractInfo.setConstructionProjectTypeStr(DictUtils.getDictLabel(String.valueOf(workContractInfo.getConstructionProjectType()), "construction_project_type", ""));
-        if(workContractInfo.getWorkClientInfoList()!=null&&!workContractInfo.getWorkClientInfoList().isEmpty()){
-            StringBuilder workClinetInfoIds = new StringBuilder();
-            for (WorkClientInfo workClientInfo : workContractInfo.getWorkClientInfoList()) {
-                workClinetInfoIds.append(workClientInfo.getId()).append(",");
+        if (null != projectRecords.getWorkContractInfo() && !"".equals( projectRecords.getWorkContractInfo().getId())) {
+            WorkContractInfo workContractInfo = contractInfoService.get(projectRecords.getWorkContractInfo().getId());
+            workContractInfo.setConstructionProjectTypeStr(DictUtils.getDictLabel(String.valueOf(workContractInfo.getConstructionProjectType()), "construction_project_type", ""));
+            if (workContractInfo.getWorkClientInfoList() != null && !workContractInfo.getWorkClientInfoList().isEmpty()) {
+                StringBuilder workClinetInfoIds = new StringBuilder();
+                for (WorkClientInfo workClientInfo : workContractInfo.getWorkClientInfoList()) {
+                    workClinetInfoIds.append(workClientInfo.getId()).append(",");
+                }
+                workClinetInfoIds.deleteCharAt(workClinetInfoIds.length() - 1);
+                workContractInfo.setWorkClinetInfoIds(workClinetInfoIds.toString());
             }
-            workClinetInfoIds.deleteCharAt(workClinetInfoIds.length()-1);
-            workContractInfo.setWorkClinetInfoIds(workClinetInfoIds.toString());
+            projectRecords.setWorkContractInfo(workContractInfo);
         }
-		projectRecords.setWorkContractInfo(workContractInfo);
 	}
 
 	private void notifyProjectLeaders (ProjectRecordsAlter projectRecords, User createUser, String str){

+ 13 - 7
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsService.java

@@ -234,13 +234,19 @@ public class ProjectRecordsService extends CrudService<ProjectRecordsDao, Projec
 		WorkClientInfo workClientInfo = new WorkClientInfo();
 		Office company= new Office();
 		Office office =  new Office();
-        if(StringUtils.isNotBlank((projectRecords.getWorkContractInfo().getId()))){
-            //有合同状态
-			workContractInfo = workContractInfoDao.get(projectRecords.getWorkContractInfo().getId());
-			company.setId(workContractInfo.getCompanyId());
-//			office.setId(workContractInfo.getChargeCompany());
-			office.setId(UserUtils.getUser().getOffice().getId());
-        }else{
+		if (null != projectRecords.getWorkContractInfo()){
+			if(StringUtils.isNotBlank((projectRecords.getWorkContractInfo().getId()))){
+				//有合同状态
+				workContractInfo = workContractInfoDao.get(projectRecords.getWorkContractInfo().getId());
+				company.setId(workContractInfo.getCompanyId());
+				//			office.setId(workContractInfo.getChargeCompany());
+				office.setId(UserUtils.getUser().getOffice().getId());
+			}else{
+                //无合同
+                company.setId(UserUtils.getUser().getCompany().getId());
+                office.setId(UserUtils.getUser().getOffice().getId());
+            }
+		}else{
         	//无合同
 			company.setId(UserUtils.getUser().getCompany().getId());
 			office.setId(UserUtils.getUser().getOffice().getId());

+ 24 - 24
src/main/webapp/webpage/modules/projectrecord/projectRecordsList.jsp

@@ -182,23 +182,23 @@
 <div class="wrapper wrapper-content">
 	<sys:message content="${message}"/>
 	<div class="layui-row">
-		<%--<div class="full-width fl">--%>
-			<%--<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">--%>
-				<%--<ul class="list-tabs" >--%>
-					<%--<li class="active"><a href="${ctx}/project/projectRecords/list">项目登记列表</a></li>--%>
-					<%--<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>--%>
-				<%--</ul>--%>
-			<%--</div>--%>
+		<div class="full-width fl">
+			<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
+				<ul class="list-tabs" >
+					<li class="active"><a href="${ctx}/project/projectRecords/list">项目登记列表</a></li>
+					<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>
+				</ul>
+			</div>
 
-			<%--&lt;%&ndash;<div class="layui-row" id="tabDiv">&ndash;%&gt;--%>
-			<%--&lt;%&ndash;<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">&ndash;%&gt;--%>
-			<%--&lt;%&ndash;<ul class="layui-tab-title">&ndash;%&gt;--%>
-			<%--&lt;%&ndash;<li class="layui-this"><a href="${ctx}/project/projectRecords/list">项目登记列表</a></li>&ndash;%&gt;--%>
-			<%--&lt;%&ndash;<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>&ndash;%&gt;--%>
-			<%--&lt;%&ndash;</ul>&ndash;%&gt;--%>
-			<%--&lt;%&ndash;</div>&ndash;%&gt;--%>
-			<%--&lt;%&ndash;</div>&ndash;%&gt;--%>
-		<%--</div>--%>
+			<%--<div class="layui-row" id="tabDiv">
+			<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
+			<ul class="layui-tab-title">
+			<li class="layui-this"><a href="${ctx}/project/projectRecords/list">项目登记列表</a></li>
+			<li><a href="${ctx}/project/projectRecordsAlter/list">项目变更列表</a></li>
+			</ul>
+			</div>
+			</div>--%>
+		</div>
 		<div class="full-width fl">
 			<div class="layui-row contentShadow shadowLR" id="queryDiv">
 				<form:form id="searchForm" modelAttribute="projectRecords" action="${ctx}/project/projectRecords/" method="post" class="form-inline">
@@ -343,10 +343,10 @@
                         {
                             xml+="<a href=\"#\" onclick=\"openDialogre('修改项目', '${ctx}/project/projectRecords/form?id=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
                         }
-                        <%--if(d.canedit2 != undefined && d.canedit2 =="1")--%>
-                        <%--{--%>
-                            <%--xml+="<a href=\"#\" onclick=\"openDialogre('调整项目', '${ctx}/project/projectRecords/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";--%>
-                        <%--}--%>
+                        if(d.canedit2 != undefined && d.canedit2 =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('调整项目', '${ctx}/project/projectRecords/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        }
                         if(d.canrecall != undefined && d.canrecall =="1")
                         {
                             xml+="<a href=\"#\" onclick=\"openDialogre('调整项目', '${ctx}/project/projectRecords/form?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
@@ -359,10 +359,10 @@
                         {
                             xml+="<a href=\"${ctx}/project/projectRecords/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该项目审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
                         }
-                        <%--if(d.canedit3 != undefined && d.canedit3 =="1")--%>
-                        <%--{--%>
-                            <%--xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogre('项目变更管理', '${ctx}/project/projectRecordsAlter/form?alterBeforeRecords.id='+encodeURIComponent('" + d.id + "'),'95%','95%','','送审,暂存,关闭')\" style=\"color: white;background: darkseagreen\" class=\"op-btn op-btn-op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";--%>
-                        <%--}--%>
+                        if(d.canedit3 != undefined && d.canedit3 =="1")
+                        {
+                            xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogre('项目变更管理', '${ctx}/project/projectRecordsAlter/form?alterBeforeRecords.id='+encodeURIComponent('" + d.id + "'),'95%','95%','','送审,暂存,关闭')\" style=\"color: white;background: darkseagreen\" class=\"op-btn op-btn-op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";
+                        }
                         return xml;
 
                     }}