上传

/**
	 * 上传附件按钮
	 * @param processInstanceId
	 * @param taskId
	 * @param rootDir
	 * @param maxSize
	 * @param flag
	 * @return
	 */
	public String getUploadButton(int processInstanceId, int taskId, String entityType, String rootDir, int maxSize, boolean flag){
		StringBuffer button = new StringBuffer();
		if(flag){
			button.append("<div style=\"float: right;\">")
			.append("<input type=button value=\"上 传\" onClick=\"openModalWindow('./login.wf?sid=").append(uc.getSessionId()).append("&cmd=TBS_OPEN_UPLOAD_PAGE&flowInstanceId=")
			.append(processInstanceId).append("&taskId=").append(taskId).append("&rootDir=").append(rootDir).append("&maxFileSize=").append(maxSize)
			.append("',680,480,'"+entityType+"');\" style=\"background-image:url(../tbs_img/work/button.gif); border:0; font-size:12px; color:#FFFFFF; width:76;\" /></div>");
		}
		return button.toString();
	}
	
	/**
	 * 上传附件按钮(自定义group名、file名)
	 * @param flag1
	 * @param flag2
	 * @param entityType
	 * @param rootDir
	 * @param maxSize
	 * @param flag
	 * @return
	 */
	public String getUploadButton(String flag1, String flag2, String entityType, String rootDir, int maxSize, boolean flag){
		StringBuffer button = new StringBuffer();
		if(flag){
			button.append("<div style=\"float: right;\">")
				.append("<input type=button value=\"上 传\" onClick=\"openModalWindow('./login.wf?sid=").append(uc.getSessionId())
				.append("&cmd=TBS_OPEN_UPLOAD_PAGE&flowInstanceId=").append(flag1).append("&taskId=").append(flag2)
				.append("&rootDir=").append(rootDir).append("&maxFileSize=").append(maxSize).append("',680,480,'").append(entityType)
				.append("');\" style=\"background-image:url(../tbs_img/work/button.gif); border:0; font-size:12px; color:#FFFFFF; width:76;\" /></div>");
		}else {
			button.append(" ");
		}
		return button.toString();
	}

  

posted @ 2018-05-25 17:32  demon09  阅读(166)  评论(0编辑  收藏  举报