이지우 - 사용자 체험교실 > 나의강의실 > 운영확정 : 새로운 운영 지침 첨부파일 노출
This commit is contained in:
parent
e685f3c350
commit
27436ce45e
@ -139,7 +139,6 @@ public class NotifyManageServiceImpl extends EgovAbstractServiceImpl implements
|
|||||||
|
|
||||||
|
|
||||||
NotifyManageVO notifyManageVO = new NotifyManageVO();
|
NotifyManageVO notifyManageVO = new NotifyManageVO();
|
||||||
notifyManageVO.setCmmNotifyOrd(veaCmmNotifyOrdGnrService.getNextStringId());
|
|
||||||
notifyManageVO.setLctrDivCd(lctrDivCd);
|
notifyManageVO.setLctrDivCd(lctrDivCd);
|
||||||
notifyManageVO.setNotifyCn("["+loginVO.getId()+"] 교육신청을 하였습니다.");
|
notifyManageVO.setNotifyCn("["+loginVO.getId()+"] 교육신청을 하였습니다.");
|
||||||
String notifyPath = "";
|
String notifyPath = "";
|
||||||
@ -150,6 +149,7 @@ public class NotifyManageServiceImpl extends EgovAbstractServiceImpl implements
|
|||||||
notifyManageVO.setEduAplctOrd(eduAplctOrd);
|
notifyManageVO.setEduAplctOrd(eduAplctOrd);
|
||||||
notifyManageVO.setFrstRegisterId(loginVO.getUniqId());
|
notifyManageVO.setFrstRegisterId(loginVO.getUniqId());
|
||||||
for(NotifyManageVO vo : notifyManageListVO) {
|
for(NotifyManageVO vo : notifyManageListVO) {
|
||||||
|
notifyManageVO.setCmmNotifyOrd(veaCmmNotifyOrdGnrService.getNextStringId());
|
||||||
notifyManageVO.setToUserId(vo.getMngUserId());
|
notifyManageVO.setToUserId(vo.getMngUserId());
|
||||||
notifyManageDAO.insertNotifyInfo(notifyManageVO);
|
notifyManageDAO.insertNotifyInfo(notifyManageVO);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -189,20 +189,6 @@ public class ExprnClsrmAplctController {
|
|||||||
detailVO = vEPrcsAplctPrdService.selectDetailNewOne(detailVO);
|
detailVO = vEPrcsAplctPrdService.selectDetailNewOne(detailVO);
|
||||||
model.addAttribute("detailVO", detailVO);
|
model.addAttribute("detailVO", detailVO);
|
||||||
|
|
||||||
VEPrcsDetailVO vEPrcsDetailVO = new VEPrcsDetailVO();
|
|
||||||
|
|
||||||
VEPrcsDetailVO info = vEPrcsAplctPrdService.selectPagingList(vEPrcsDetailVO).get(0);
|
|
||||||
model.addAttribute("info", info);
|
|
||||||
|
|
||||||
//파일 정보 가져오기
|
|
||||||
FileVO fileVO_cn = new FileVO();
|
|
||||||
fileVO_cn.setAtchFileId(info.getCnAtchFileId());
|
|
||||||
List<FileVO> result_cn = fileService.selectFileInfs(fileVO_cn);
|
|
||||||
model.addAttribute("fileList", result_cn);
|
|
||||||
model.addAttribute("fileListCnt", result_cn.size());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnClsrmAplctGuide";
|
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnClsrmAplctGuide";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -560,11 +546,24 @@ public class ExprnClsrmAplctController {
|
|||||||
if(vEPrcsDetailVO != null) {
|
if(vEPrcsDetailVO != null) {
|
||||||
model.addAttribute("endPnttm", vEPrcsDetailVO.getEndPnttm());
|
model.addAttribute("endPnttm", vEPrcsDetailVO.getEndPnttm());
|
||||||
}
|
}
|
||||||
if("10".equals(Type) || "20".equals(Type)) { //type1 - 운영신청
|
if("10".equals(Type)) { //type1 - 운영신청
|
||||||
//등록일이 과정신청기간에 포함 되는지 확인 - 신청기간에 포함되며 신청 단계의 경우 수정 기능 추가
|
//등록일이 과정신청기간에 포함 되는지 확인 - 신청기간에 포함되며 신청 단계의 경우 수정 기능 추가
|
||||||
int cnt = vEEduAplctService.selectCntAplctPrd(vEEduAplctVO);
|
int cnt = vEEduAplctService.selectCntAplctPrd(vEEduAplctVO);
|
||||||
model.addAttribute("cnt", cnt);
|
model.addAttribute("cnt", cnt);
|
||||||
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnAplctDashboard";
|
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnAplctDashboard";
|
||||||
|
}else if("20".equals(Type)) { //운영확정 - 교육신청 안내 공고
|
||||||
|
|
||||||
|
VEPrcsDetailVO detailVO = new VEPrcsDetailVO();
|
||||||
|
detailVO.setLctrDivCd("30"); //저작권 체험교실 구분 값
|
||||||
|
detailVO.setPrcsAplctPrdOrd(vEEduAplctVO.getPrcsOrd());
|
||||||
|
detailVO.setUseYn("N"); //사용여부 상관없이 조회하기 위한 임시 플래그 값
|
||||||
|
detailVO = vEPrcsAplctPrdService.selectDetailByOrd(detailVO);
|
||||||
|
if(detailVO == null) { //체험교실 시 신청시 신청안내 게시글이 삭제된 경우 최신 신청안내 글 조회
|
||||||
|
detailVO = vEPrcsAplctPrdService.selectDetailNewOne(detailVO);
|
||||||
|
}
|
||||||
|
model.addAttribute("detailVO", detailVO);
|
||||||
|
return "/web/ve/aplct/cpyrgExprnClsrm/exprnClsrmInfo/exprnConfirmDashboard";
|
||||||
|
|
||||||
}else if("40".equals(Type)) { //서류제출
|
}else if("40".equals(Type)) { //서류제출
|
||||||
|
|
||||||
//거래선 파일 정보 가져오기
|
//거래선 파일 정보 가져오기
|
||||||
|
|||||||
@ -214,6 +214,8 @@ public class VEPrcsDetailVO extends ComDefaultVO implements Serializable {
|
|||||||
|
|
||||||
private String prvtMemoCn; //비공개 메모
|
private String prvtMemoCn; //비공개 메모
|
||||||
|
|
||||||
|
private String oprtnAtchFileId; //체험교실 운영지침 안내 파일 ID
|
||||||
|
|
||||||
public String getEduPrcsOrd() {
|
public String getEduPrcsOrd() {
|
||||||
return eduPrcsOrd;
|
return eduPrcsOrd;
|
||||||
}
|
}
|
||||||
@ -1042,6 +1044,12 @@ public class VEPrcsDetailVO extends ComDefaultVO implements Serializable {
|
|||||||
public void setPrvtMemoCn(String prvtMemoCn) {
|
public void setPrvtMemoCn(String prvtMemoCn) {
|
||||||
this.prvtMemoCn = prvtMemoCn;
|
this.prvtMemoCn = prvtMemoCn;
|
||||||
}
|
}
|
||||||
|
public String getOprtnAtchFileId() {
|
||||||
|
return oprtnAtchFileId;
|
||||||
|
}
|
||||||
|
public void setOprtnAtchFileId(String oprtnAtchFileId) {
|
||||||
|
this.oprtnAtchFileId = oprtnAtchFileId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -245,7 +245,6 @@ public class OprtnAplctAnncmMngController {
|
|||||||
List<FileVO> result_cn = fileService.selectFileInfs(fileVO_cn);
|
List<FileVO> result_cn = fileService.selectFileInfs(fileVO_cn);
|
||||||
model.addAttribute("fileList", result_cn);
|
model.addAttribute("fileList", result_cn);
|
||||||
model.addAttribute("fileListCnt", result_cn.size());
|
model.addAttribute("fileListCnt", result_cn.size());
|
||||||
|
|
||||||
|
|
||||||
return "oprtn/cpyrgExprnClsrm/oprtnAplctAnncmMngDetail";
|
return "oprtn/cpyrgExprnClsrm/oprtnAplctAnncmMngDetail";
|
||||||
}
|
}
|
||||||
@ -329,6 +328,12 @@ public class OprtnAplctAnncmMngController {
|
|||||||
model.addAttribute("fileList_cn", result_cn);
|
model.addAttribute("fileList_cn", result_cn);
|
||||||
model.addAttribute("fileListCnt_cn", result_cn.size());
|
model.addAttribute("fileListCnt_cn", result_cn.size());
|
||||||
|
|
||||||
|
FileVO fileVO_oprtn = new FileVO();
|
||||||
|
fileVO_oprtn.setAtchFileId(info.getOprtnAtchFileId());
|
||||||
|
List<FileVO> result_oprtn = fileService.selectFileInfs(fileVO_oprtn);
|
||||||
|
model.addAttribute("fileList_oprtn", result_oprtn);
|
||||||
|
model.addAttribute("fileListCnt_oprtn", result_oprtn.size());
|
||||||
|
|
||||||
return "oprtn/cpyrgExprnClsrm/oprtnAplctAnncmMngUpdate";
|
return "oprtn/cpyrgExprnClsrm/oprtnAplctAnncmMngUpdate";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,6 +375,9 @@ public class OprtnAplctAnncmMngController {
|
|||||||
|
|
||||||
String cnAtchFileId = "";
|
String cnAtchFileId = "";
|
||||||
cnAtchFileId = vEPrcsDetailVO.getCnAtchFileId();
|
cnAtchFileId = vEPrcsDetailVO.getCnAtchFileId();
|
||||||
|
|
||||||
|
String oprtnAtchFileId = "";
|
||||||
|
oprtnAtchFileId = vEPrcsDetailVO.getOprtnAtchFileId();
|
||||||
|
|
||||||
//DB에서 실제 첨부파일 존재 여부 확인
|
//DB에서 실제 첨부파일 존재 여부 확인
|
||||||
FileVO fileVO = new FileVO();
|
FileVO fileVO = new FileVO();
|
||||||
@ -386,6 +394,13 @@ public class OprtnAplctAnncmMngController {
|
|||||||
cnAtchFileId = "";
|
cnAtchFileId = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileVO oprtnFileVO = new FileVO();
|
||||||
|
oprtnFileVO.setAtchFileId(oprtnAtchFileId);
|
||||||
|
List<FileVO> oprtnResult = fileService.selectFileInfs(oprtnFileVO);
|
||||||
|
if (oprtnResult.size()<=0) {
|
||||||
|
oprtnAtchFileId = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//step3.파일 처리====================================
|
//step3.파일 처리====================================
|
||||||
//파일 정상 처리 여부와 첨부 파일 정보
|
//파일 정상 처리 여부와 첨부 파일 정보
|
||||||
@ -399,16 +414,22 @@ public class OprtnAplctAnncmMngController {
|
|||||||
int i_limit_size_cn = 100; // file MB
|
int i_limit_size_cn = 100; // file MB
|
||||||
String s_file_exts_cn = "jpg|jpeg|png|gif|bmp|pdf|doc|docx|xls|xlsx|ppt|pptx|hwp|txt"; // file exts
|
String s_file_exts_cn = "jpg|jpeg|png|gif|bmp|pdf|doc|docx|xls|xlsx|ppt|pptx|hwp|txt"; // file exts
|
||||||
|
|
||||||
|
int i_file_limit_oprtn = 2; // file count
|
||||||
|
int i_limit_size_oprtn = 100; // file MB
|
||||||
|
String s_file_exts_oprtn = "jpg|jpeg|png|gif|bmp|pdf|doc|docx|xls|xlsx|ppt|pptx|hwp|txt"; // file exts
|
||||||
|
|
||||||
final Map<String, MultipartFile> files = multiRequest.getFileMap();
|
final Map<String, MultipartFile> files = multiRequest.getFileMap();
|
||||||
|
|
||||||
Map<String, MultipartFile> files_ori = new HashMap<String, MultipartFile>();
|
Map<String, MultipartFile> files_ori = new HashMap<String, MultipartFile>();
|
||||||
Map<String, MultipartFile> files_cn = new HashMap<String, MultipartFile>();
|
Map<String, MultipartFile> files_cn = new HashMap<String, MultipartFile>();
|
||||||
|
Map<String, MultipartFile> files_oprtn = new HashMap<String, MultipartFile>();
|
||||||
|
|
||||||
|
|
||||||
files.forEach((k,v) -> {
|
files.forEach((k,v) -> {
|
||||||
if( k.contains("file_cn") || k.contains("file_temp_cn")) {
|
if( k.contains("file_cn") || k.contains("file_temp_cn")) {
|
||||||
files_cn.put(k, v);
|
files_cn.put(k, v);
|
||||||
|
}else if(k.contains("file_oprtn") || k.contains("file_temp_oprtn")){
|
||||||
|
files_oprtn.put(k, v);
|
||||||
}else {
|
}else {
|
||||||
files_ori.put(k, v);
|
files_ori.put(k, v);
|
||||||
}
|
}
|
||||||
@ -467,6 +488,28 @@ public class OprtnAplctAnncmMngController {
|
|||||||
|
|
||||||
if ("ERROR".equals(cnAtchFileId)) return modelAndView;
|
if ("ERROR".equals(cnAtchFileId)) return modelAndView;
|
||||||
|
|
||||||
|
if ("".equals(oprtnAtchFileId)) {
|
||||||
|
oprtnAtchFileId = checkFileUtil.fileValCheckNdbInsertCustom(
|
||||||
|
files_oprtn, modelAndView
|
||||||
|
, "ATCH_"
|
||||||
|
, s_file_exts_oprtn
|
||||||
|
, i_limit_size_oprtn
|
||||||
|
, i_file_limit_oprtn
|
||||||
|
); //EXT, MB size and ea
|
||||||
|
vEPrcsDetailVO.setOprtnAtchFileId(oprtnAtchFileId);
|
||||||
|
}else {
|
||||||
|
oprtnAtchFileId = checkFileUtil.fileValCheckNdbUpdateCustom(
|
||||||
|
files_oprtn, modelAndView
|
||||||
|
, "ATCH_"
|
||||||
|
, s_file_exts_oprtn
|
||||||
|
, i_limit_size_oprtn
|
||||||
|
, i_file_limit_oprtn
|
||||||
|
, oprtnAtchFileId
|
||||||
|
); //EXT, MB size and ea
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("ERROR".equals(cnAtchFileId)) return modelAndView;
|
||||||
|
|
||||||
//step3.파일 처리====================================
|
//step3.파일 처리====================================
|
||||||
|
|
||||||
|
|
||||||
@ -539,16 +582,25 @@ public class OprtnAplctAnncmMngController {
|
|||||||
int i_file_limit_cn = 50; // file count
|
int i_file_limit_cn = 50; // file count
|
||||||
int i_limit_size_cn = 100; // file MB
|
int i_limit_size_cn = 100; // file MB
|
||||||
String s_file_exts_cn = "jpg|jpeg|png|gif|bmp|pdf|doc|docx|xls|xlsx|ppt|pptx|hwp|txt"; // file exts
|
String s_file_exts_cn = "jpg|jpeg|png|gif|bmp|pdf|doc|docx|xls|xlsx|ppt|pptx|hwp|txt"; // file exts
|
||||||
|
|
||||||
|
int i_file_limit_oprtn = 2; // file count
|
||||||
|
int i_limit_size_oprtn = 100; // file MB
|
||||||
|
String s_file_exts_oprtn = "jpg|jpeg|png|gif|bmp|pdf|doc|docx|xls|xlsx|ppt|pptx|hwp|txt"; // file exts
|
||||||
|
|
||||||
final Map<String, MultipartFile> files = multiRequest.getFileMap();
|
final Map<String, MultipartFile> files = multiRequest.getFileMap();
|
||||||
|
|
||||||
Map<String, MultipartFile> files_ori = new HashMap<String, MultipartFile>();
|
Map<String, MultipartFile> files_ori = new HashMap<String, MultipartFile>();
|
||||||
Map<String, MultipartFile> files_cn = new HashMap<String, MultipartFile>();
|
Map<String, MultipartFile> files_cn = new HashMap<String, MultipartFile>();
|
||||||
|
Map<String, MultipartFile> files_oprtn = new HashMap<String, MultipartFile>();
|
||||||
|
|
||||||
files.forEach((k,v) -> {
|
files.forEach((k,v) -> {
|
||||||
if( k.contains("file_cn") || k.contains("file_temp_cn")) {
|
if( k.contains("file_cn") || k.contains("file_temp_cn")) {
|
||||||
files_cn.put(k, v);
|
files_cn.put(k, v);
|
||||||
|
}else if(k.contains("file_oprtn") || k.contains("file_temp_oprtn")){
|
||||||
|
files_oprtn.put(k, v);
|
||||||
}else {
|
}else {
|
||||||
files_ori.put(k, v);
|
files_ori.put(k, v);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -572,6 +624,16 @@ public class OprtnAplctAnncmMngController {
|
|||||||
|
|
||||||
if ("ERROR".equals(s_cnAtchFileId)) return modelAndView;
|
if ("ERROR".equals(s_cnAtchFileId)) return modelAndView;
|
||||||
|
|
||||||
|
String s_oprtnAtchFileId = checkFileUtil.fileValCheckNdbInsertCustom(
|
||||||
|
files_oprtn, modelAndView
|
||||||
|
, "ATCH_" //file_name_prefix
|
||||||
|
, s_file_exts_oprtn
|
||||||
|
, i_limit_size_oprtn
|
||||||
|
, i_file_limit_oprtn
|
||||||
|
); //EXT, MB size and ea
|
||||||
|
|
||||||
|
if ("ERROR".equals(s_cnAtchFileId)) return modelAndView;
|
||||||
|
|
||||||
//step2.파일 처리====================================
|
//step2.파일 처리====================================
|
||||||
|
|
||||||
|
|
||||||
@ -581,6 +643,7 @@ public class OprtnAplctAnncmMngController {
|
|||||||
String prcsAplctPrdOrd = prcsAplctPrdGnrService.getNextStringId(); // 고유ID
|
String prcsAplctPrdOrd = prcsAplctPrdGnrService.getNextStringId(); // 고유ID
|
||||||
vEPrcsDetailVO.setAtchFileId(s_scholSealAtchFileId); //학교장직인 첨부파일
|
vEPrcsDetailVO.setAtchFileId(s_scholSealAtchFileId); //학교장직인 첨부파일
|
||||||
vEPrcsDetailVO.setCnAtchFileId(s_cnAtchFileId); //안내 첨부파일
|
vEPrcsDetailVO.setCnAtchFileId(s_cnAtchFileId); //안내 첨부파일
|
||||||
|
vEPrcsDetailVO.setOprtnAtchFileId(s_oprtnAtchFileId); //운영 지침 안내 첨부파일
|
||||||
|
|
||||||
vEPrcsDetailVO.setPrcsAplctPrdOrd(prcsAplctPrdOrd);
|
vEPrcsDetailVO.setPrcsAplctPrdOrd(prcsAplctPrdOrd);
|
||||||
|
|
||||||
|
|||||||
@ -79,6 +79,7 @@
|
|||||||
,a.edu_ddln_pnttm AS eduDdlnPnttm
|
,a.edu_ddln_pnttm AS eduDdlnPnttm
|
||||||
,a.dprtm_nm AS dprtmNm
|
,a.dprtm_nm AS dprtmNm
|
||||||
,a.cn_atch_file_id AS cnAtchFileId
|
,a.cn_atch_file_id AS cnAtchFileId
|
||||||
|
,a.oprtn_atch_file_id AS oprtnAtchFileId
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@ -87,6 +88,7 @@
|
|||||||
/* VEPrcsAplctPrdDAO.insert */
|
/* VEPrcsAplctPrdDAO.insert */
|
||||||
INSERT INTO <include refid="VEPrcsAplctPrdDAO.table_name"/> (
|
INSERT INTO <include refid="VEPrcsAplctPrdDAO.table_name"/> (
|
||||||
<include refid="VEPrcsAplctPrdDAO.column_name"/>
|
<include refid="VEPrcsAplctPrdDAO.column_name"/>
|
||||||
|
,oprtn_atch_file_id
|
||||||
|
|
||||||
)VALUES(
|
)VALUES(
|
||||||
|
|
||||||
@ -119,6 +121,7 @@
|
|||||||
,#cnAtchFileId#
|
,#cnAtchFileId#
|
||||||
|
|
||||||
,#prcsCn#
|
,#prcsCn#
|
||||||
|
,#oprtnAtchFileId#
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -242,6 +245,10 @@
|
|||||||
, prcs_cn = #prcsCn#
|
, prcs_cn = #prcsCn#
|
||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
|
|
||||||
|
<isNotEmpty property="oprtnAtchFileId">
|
||||||
|
, oprtn_atch_file_id = #oprtnAtchFileId#
|
||||||
|
</isNotEmpty>
|
||||||
|
|
||||||
WHERE
|
WHERE
|
||||||
prcs_aplct_prd_ord = #prcsAplctPrdOrd#
|
prcs_aplct_prd_ord = #prcsAplctPrdOrd#
|
||||||
</update>
|
</update>
|
||||||
@ -540,7 +547,8 @@
|
|||||||
)
|
)
|
||||||
AS atchFileNm,
|
AS atchFileNm,
|
||||||
a.dprtm_nm AS dprtmNm ,
|
a.dprtm_nm AS dprtmNm ,
|
||||||
a.cn_atch_file_id AS cnAtchFileId
|
a.cn_atch_file_id AS cnAtchFileId,
|
||||||
|
a.oprtn_atch_file_id AS oprtnAtchFileId
|
||||||
FROM ve_prcs_aplct_prd a
|
FROM ve_prcs_aplct_prd a
|
||||||
WHERE 1 = 1
|
WHERE 1 = 1
|
||||||
<isNotEmpty property="lctrDivCd">
|
<isNotEmpty property="lctrDivCd">
|
||||||
@ -1347,7 +1355,9 @@
|
|||||||
a.anncm_cn AS anncmCn,
|
a.anncm_cn AS anncmCn,
|
||||||
a.popup_cn AS popupCn,
|
a.popup_cn AS popupCn,
|
||||||
a.atch_file_id AS atchFileId,
|
a.atch_file_id AS atchFileId,
|
||||||
|
a.oprtn_atch_file_id AS oprtnAtchFileId,
|
||||||
a.title AS title ,
|
a.title AS title ,
|
||||||
|
a.dprtm_nm AS dprtmNm,
|
||||||
(SELECT orignl_file_nm
|
(SELECT orignl_file_nm
|
||||||
FROM lettnfiledetail
|
FROM lettnfiledetail
|
||||||
WHERE atch_file_id = a.atch_file_id LIMIT 1
|
WHERE atch_file_id = a.atch_file_id LIMIT 1
|
||||||
@ -1358,8 +1368,10 @@
|
|||||||
<isNotEmpty property="lctrDivCd">
|
<isNotEmpty property="lctrDivCd">
|
||||||
AND a.lctr_div_cd=#lctrDivCd#
|
AND a.lctr_div_cd=#lctrDivCd#
|
||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
|
<isNotEqual property="useYn" compareValue="N">
|
||||||
AND
|
AND
|
||||||
a.use_yn = 'Y'
|
a.use_yn = 'Y'
|
||||||
|
</isNotEqual>
|
||||||
AND
|
AND
|
||||||
a.prcs_aplct_prd_ord = #prcsAplctPrdOrd#
|
a.prcs_aplct_prd_ord = #prcsAplctPrdOrd#
|
||||||
ORDER BY a.strt_pnttm DESC
|
ORDER BY a.strt_pnttm DESC
|
||||||
|
|||||||
@ -341,7 +341,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<p>작성자</p>
|
<p>담당부서</p>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<c:out value="${info.dprtmNm}" />
|
<c:out value="${info.dprtmNm}" />
|
||||||
@ -358,6 +358,17 @@
|
|||||||
</c:import>
|
</c:import>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">
|
||||||
|
<p>운영지침 첨부파일</p>
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<c:import url="/cmm/fms/selectBBSFileInfs.do" charEncoding="utf-8">
|
||||||
|
<c:param name="param_atchFileId" value="${info.oprtnAtchFileId}" />
|
||||||
|
<c:param name="pdf_view" value="Y" />
|
||||||
|
</c:import>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<%-- <tr>
|
<%-- <tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<p>안내내용</p>
|
<p>안내내용</p>
|
||||||
|
|||||||
@ -39,6 +39,9 @@
|
|||||||
$("#filebutton_cn").on('click', function(){
|
$("#filebutton_cn").on('click', function(){
|
||||||
$("#file_temp_cn").click();
|
$("#file_temp_cn").click();
|
||||||
});
|
});
|
||||||
|
$("#filebutton_oprtn").on('click', function(){
|
||||||
|
$("#file_temp_oprtn").click();
|
||||||
|
});
|
||||||
|
|
||||||
//파일첨부관련 설정들===============================================
|
//파일첨부관련 설정들===============================================
|
||||||
});
|
});
|
||||||
@ -205,6 +208,10 @@
|
|||||||
_fileForm2_cn.forEach(function(obj, idx) {
|
_fileForm2_cn.forEach(function(obj, idx) {
|
||||||
if (obj) data.append("file_cn"+idx, obj.fileObj);
|
if (obj) data.append("file_cn"+idx, obj.fileObj);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
_fileForm2_oprtn.forEach(function(obj, idx) {
|
||||||
|
if (obj) data.append("file_oprtn"+idx, obj.fileObj);
|
||||||
|
});
|
||||||
|
|
||||||
if(confirm("저장하시겠습니까?")){
|
if(confirm("저장하시겠습니까?")){
|
||||||
var url = "${pageContext.request.contextPath}/kccadr/oprtn/cpyrgExprnClsrm/oprtnAplctAnncmMngRegAjax.do";
|
var url = "${pageContext.request.contextPath}/kccadr/oprtn/cpyrgExprnClsrm/oprtnAplctAnncmMngRegAjax.do";
|
||||||
@ -712,6 +719,78 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- 안내첨부파일 end -->
|
<!-- 안내첨부파일 end -->
|
||||||
|
|
||||||
|
<!-- 운영지침 첨부파일 start -->
|
||||||
|
<tr>
|
||||||
|
<th scope="row">
|
||||||
|
<p>운영지침 첨부파일</p>
|
||||||
|
</th>
|
||||||
|
<td class="upload_area_oprtn">
|
||||||
|
<input type="file" id="file_temp_oprtn" name="file_temp_oprtn" class="uploadFile" style="display:none"/>
|
||||||
|
<button type="button" id="filebutton_oprtn" class="btn_type01">파일 첨부하기</button>
|
||||||
|
<div class="file_wrap file_upload_box_oprtn no_img_box_oprtn">
|
||||||
|
<table class="tbType02">
|
||||||
|
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 60%;">
|
||||||
|
<col style="width: auto;">
|
||||||
|
<col style="width: 20%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<th scope="col">파일 명</th>
|
||||||
|
<th scope="col">종류</th>
|
||||||
|
<th scope="col">크기</th>
|
||||||
|
<th scope="col">삭제</th>
|
||||||
|
</thead>
|
||||||
|
<tbody class="tb_file_before">
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<p>첨부하실 파일을 <span>마우스로 끌어서</span> 넣어주세요.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="file_wrap fileAfter_oprtn file_list_div_oprtn">
|
||||||
|
<table class="tbType02">
|
||||||
|
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 60%">
|
||||||
|
<col style="width: 10%">
|
||||||
|
<col style="width: 20%">
|
||||||
|
<col style="width: 10%">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<th scope="col">파일 명</th>
|
||||||
|
<th scope="col">종류</th>
|
||||||
|
<th scope="col">크기</th>
|
||||||
|
<th scope="col">삭제</th>
|
||||||
|
</thead>
|
||||||
|
<tbody id="tbody_fiielist_oprtn" class="tb_file_after">
|
||||||
|
<c:forEach var="fileList_oprtn" items="${fileList_oprtn}" varStatus="status">
|
||||||
|
<tr class="item_<c:out value='${fileList_oprtn.atchFileId}' />_<c:out value='${fileList_oprtn.fileSn}' />_oprtn uploaded_obj_oprtn">
|
||||||
|
<input type="hidden" name="fileSize_oprtn" class="item_file_size_oprtn" value="${fileList_oprtn.fileSize}">
|
||||||
|
<td class="td_filename_oprtn">
|
||||||
|
<span class="file_name_text_oprtn"><c:out value='${fileList_oprtn.orignlFileNm}' /></span>
|
||||||
|
</td>
|
||||||
|
<td class="td_filesort_oprtn">
|
||||||
|
<span class="file_filesort_text_oprtn" value="<c:out value="${fileList_oprtn.fileExtsn}"/>"><c:out value="${fileList_oprtn.fileExtsn}"/></span>
|
||||||
|
</td>
|
||||||
|
<td class="td_filesize_oprtn">
|
||||||
|
<span class="file_size_text_oprtn" value="<c:out value="${fileList_oprtn.fileMg}"/>"><c:out value="${fileList_oprtn.fileMg}"/></span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<button type="button" class="btn_del" onclick="delAtchPhotoFile_oprtn('<c:out value='${fileList_oprtn.atchFileId}' />', '<c:out value='${fileList_oprtn.fileSn}' />'); return false;" title="파일삭제"><i></i></button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- 운영지침 첨부파일 end -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,9 @@
|
|||||||
$("#filebutton_cn").on('click', function(){
|
$("#filebutton_cn").on('click', function(){
|
||||||
$("#file_temp_cn").click();
|
$("#file_temp_cn").click();
|
||||||
});
|
});
|
||||||
|
$("#filebutton_oprtn").on('click', function(){
|
||||||
|
$("#file_temp_oprtn").click();
|
||||||
|
});
|
||||||
|
|
||||||
//파일첨부관련 설정들===============================================
|
//파일첨부관련 설정들===============================================
|
||||||
|
|
||||||
@ -92,30 +95,7 @@
|
|||||||
CHECK_NM = false;
|
CHECK_NM = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function fncAddUser(){
|
|
||||||
var obj = $(".memList:first").clone(true);
|
|
||||||
/*
|
|
||||||
var len = $(".memList").length;
|
|
||||||
$.each(obj.find("input"), function(idx, objInput){
|
|
||||||
objInput.name = objInput.name.replace(/\[.*\]/,'['+(len+1)+']');
|
|
||||||
console.log(objInput.name);
|
|
||||||
if(objInput.name.indexOf("memGrade") < 0){
|
|
||||||
objInput.value = '';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
obj.find("button").attr("id", obj.find("button").attr("id").replace(/[0-9]/gi, len+2));
|
|
||||||
obj.find("tr:last > td").text("");
|
|
||||||
*/
|
|
||||||
$(".memList:last").after(obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fncDelUser(){
|
|
||||||
if($(".memList").length <= 1){
|
|
||||||
alert("담당자은 최소1개가 존재해야합니다.");
|
|
||||||
}else{
|
|
||||||
$(".memList:last").remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function fncSave(){
|
function fncSave(){
|
||||||
//ckediter
|
//ckediter
|
||||||
@ -179,6 +159,10 @@
|
|||||||
_fileForm2_cn.forEach(function(obj, idx) {
|
_fileForm2_cn.forEach(function(obj, idx) {
|
||||||
if (obj) data.append("file_cn"+idx, obj.fileObj);
|
if (obj) data.append("file_cn"+idx, obj.fileObj);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
_fileForm2_oprtn.forEach(function(obj, idx) {
|
||||||
|
if (obj) data.append("file_oprtn"+idx, obj.fileObj);
|
||||||
|
});
|
||||||
|
|
||||||
if(confirm("저장하시겠습니까?")){
|
if(confirm("저장하시겠습니까?")){
|
||||||
var url = "${pageContext.request.contextPath}/kccadr/oprtn/cpyrgExprnClsrm/oprtnAplctAnncmMngMdfyAjax.do";
|
var url = "${pageContext.request.contextPath}/kccadr/oprtn/cpyrgExprnClsrm/oprtnAplctAnncmMngMdfyAjax.do";
|
||||||
@ -284,6 +268,7 @@
|
|||||||
<input type="hidden" name="prcsAplctPrdOrd" value="<c:out value='${info.prcsAplctPrdOrd}' />" />
|
<input type="hidden" name="prcsAplctPrdOrd" value="<c:out value='${info.prcsAplctPrdOrd}' />" />
|
||||||
<input type="hidden" name="atchFileId" value="<c:out value='${info.atchFileId}' />" />
|
<input type="hidden" name="atchFileId" value="<c:out value='${info.atchFileId}' />" />
|
||||||
<input type="hidden" name="cnAtchFileId" value="<c:out value='${info.cnAtchFileId}' />" />
|
<input type="hidden" name="cnAtchFileId" value="<c:out value='${info.cnAtchFileId}' />" />
|
||||||
|
<input type="hidden" name="oprtnAtchFileId" value="<c:out value='${info.oprtnAtchFileId}' />" />
|
||||||
<input type="hidden" name="strtPnttm"/>
|
<input type="hidden" name="strtPnttm"/>
|
||||||
<input type="hidden" name="endPnttm"/>
|
<input type="hidden" name="endPnttm"/>
|
||||||
|
|
||||||
@ -723,6 +708,80 @@
|
|||||||
<!-- 안내첨부파일 end -->
|
<!-- 안내첨부파일 end -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 운영지침 첨부파일 start -->
|
||||||
|
<tr>
|
||||||
|
<th scope="row">
|
||||||
|
<p class="req_text"><span>필수입력 항목</span>*</p>
|
||||||
|
<p>운영지침 첨부파일</p>
|
||||||
|
</th>
|
||||||
|
<td class="upload_area_oprtn">
|
||||||
|
<input type="file" id="file_temp_oprtn" name="file_temp_oprtn" class="uploadFile" style="display:none"/>
|
||||||
|
<button type="button" id="filebutton_oprtn" class="btn_type01">파일 첨부하기</button>
|
||||||
|
<div class="file_wrap file_upload_box_oprtn no_img_box_oprtn">
|
||||||
|
<table class="tbType02">
|
||||||
|
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 60%;">
|
||||||
|
<col style="width: auto;">
|
||||||
|
<col style="width: 20%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<th scope="col">파일 명</th>
|
||||||
|
<th scope="col">종류</th>
|
||||||
|
<th scope="col">크기</th>
|
||||||
|
<th scope="col">삭제</th>
|
||||||
|
</thead>
|
||||||
|
<tbody class="tb_file_before">
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<p>첨부하실 파일을 <span>마우스로 끌어서</span> 넣어주세요.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="file_wrap fileAfter_oprtn file_list_div_oprtn">
|
||||||
|
<table class="tbType02">
|
||||||
|
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 60%">
|
||||||
|
<col style="width: 10%">
|
||||||
|
<col style="width: 20%">
|
||||||
|
<col style="width: 10%">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<th scope="col">파일 명</th>
|
||||||
|
<th scope="col">종류</th>
|
||||||
|
<th scope="col">크기</th>
|
||||||
|
<th scope="col">삭제</th>
|
||||||
|
</thead>
|
||||||
|
<tbody id="tbody_fiielist_oprtn" class="tb_file_after">
|
||||||
|
<c:forEach var="fileList_oprtn" items="${fileList_oprtn}" varStatus="status">
|
||||||
|
<tr class="item_<c:out value='${fileList_oprtn.atchFileId}' />_<c:out value='${fileList_oprtn.fileSn}' />_oprtn uploaded_obj_oprtn">
|
||||||
|
<input type="hidden" name="fileSize_oprtn" class="item_file_size_oprtn" value="${fileList_oprtn.fileSize}">
|
||||||
|
<td class="td_filename_oprtn">
|
||||||
|
<span class="file_name_text_oprtn"><c:out value='${fileList_oprtn.orignlFileNm}' /></span>
|
||||||
|
</td>
|
||||||
|
<td class="td_filesort_oprtn">
|
||||||
|
<span class="file_filesort_text_oprtn" value="<c:out value="${fileList_oprtn.fileExtsn}"/>"><c:out value="${fileList_oprtn.fileExtsn}"/></span>
|
||||||
|
</td>
|
||||||
|
<td class="td_filesize_oprtn">
|
||||||
|
<span class="file_size_text_oprtn" value="<c:out value="${fileList_oprtn.fileMg}"/>"><c:out value="${fileList_oprtn.fileMg}"/></span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<button type="button" class="btn_del" onclick="delAtchPhotoFile_oprtn('<c:out value='${fileList_oprtn.atchFileId}' />', '<c:out value='${fileList_oprtn.fileSn}' />'); return false;" title="파일삭제"><i></i></button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- 운영지침 첨부파일 end -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,55 @@
|
|||||||
|
<%@ page contentType="text/html; charset=utf-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||||
|
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
|
||||||
|
<%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0" %>
|
||||||
|
<un:useConstants var="VeConstants" className="kcc.ve.cmm.VeConstants" />
|
||||||
|
<% pageContext.setAttribute("replaceChar", "\n"); %>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
|
<spring:eval expression="@property['Globals.Innorix.License']" var="license"/>
|
||||||
|
<script src="<c:url value='/innorix/innorix_${license}.js' />"></script>
|
||||||
|
<script src="<c:url value='/js/kccadr/innorixCommon.js' />"></script>
|
||||||
|
|
||||||
|
<script type="text/javaScript" language="javascript">
|
||||||
|
$( document ).ready(function(){
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="cont_wrap" id="sub" style="margin-top:20px;">
|
||||||
|
<div class="cont_tit">
|
||||||
|
<h2>운영신청 안내</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="list_view">
|
||||||
|
<div class="view_top">
|
||||||
|
<p class="view_title"><c:out value="${fn:substring(detailVO.frstRegistPnttm, 2, 4)}" />년 체험교실 운영 지침 안내</p>
|
||||||
|
<div class="view_info">
|
||||||
|
<p>담당부서 <span><c:out value="${detailVO.dprtmNm}"/></span></p>
|
||||||
|
<p>등록일<span><c:out value="${detailVO.frstRegistPnttm}" /></span></p>
|
||||||
|
</div>
|
||||||
|
<div class="view_info info_con">
|
||||||
|
<dl>
|
||||||
|
<dd>
|
||||||
|
<!-- pdf 미리보기는 요청 시 오픈 -->
|
||||||
|
<%-- <c:import url="/cmm/fms/selectBBSFileInfsCustom.do" charEncoding="utf-8">
|
||||||
|
<c:param name="param_atchFileId" value="${detailVO.cnAtchFileId}" />
|
||||||
|
<c:param name="pdf_view" value="Y" />
|
||||||
|
</c:import> --%>
|
||||||
|
<c:import url="/cmm/fms/selectBBSFileInfs.do" charEncoding="utf-8">
|
||||||
|
<c:param name="param_atchFileId" value="${detailVO.oprtnAtchFileId}" />
|
||||||
|
<c:param name="pdf_view" value="Y" />
|
||||||
|
</c:import>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%-- <c:out value="${fn:replace(fn:replace(fn:replace(detailVO.anncmCn, crlt , '<'), crgt , '>'), crlf , '<br/>')}" escapeXml="false"/> --%>
|
||||||
|
</div>
|
||||||
@ -76,6 +76,49 @@ $(document).ready(function(){ //공통 js
|
|||||||
var printPopup ;
|
var printPopup ;
|
||||||
printPopup= window.open("/offedu/tempPrint.html","print_open","width=760,height=750,top=0,left=0,noresizable,toolbar=no,status=no,scrollbars=yes,directory=n");
|
printPopup= window.open("/offedu/tempPrint.html","print_open","width=760,height=750,top=0,left=0,noresizable,toolbar=no,status=no,scrollbars=yes,directory=n");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*체험교실 안내 > 운영지침 첨부파일 관련*/
|
||||||
|
|
||||||
|
//파일업로드 드래그앤 드롭
|
||||||
|
var objDragAndDropOprtn = $(".upload_area_oprtn");
|
||||||
|
$(document).on("dragenter",".upload_area_oprtn",function(e){
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
//$(this).css('border', '2px solid #0B85A1');
|
||||||
|
});
|
||||||
|
$(document).on("dragover",".upload_area_oprtn",function(e){
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
$(document).on("drop",".upload_area_oprtn",function(e){
|
||||||
|
//$(this).css('border', '2px dotted #0B85A1');
|
||||||
|
e.preventDefault();
|
||||||
|
var files = e.originalEvent.dataTransfer.files;
|
||||||
|
handleFileUpload_oprtn(files,objDragAndDropOprtn); //파일업로드
|
||||||
|
});
|
||||||
|
|
||||||
|
drawUploadArea_oprtn();
|
||||||
|
$(function(){ //단일 파일업로드
|
||||||
|
$('#file_temp_oprtn').change(function(e){
|
||||||
|
var objUpload = $(".upload_area_oprtn");
|
||||||
|
var files = $('#file_temp_oprtn')[0].files;
|
||||||
|
handleFileUpload_oprtn(files,objUpload); //파일업로드
|
||||||
|
if($("#file_temp_oprtn").length > 0){
|
||||||
|
$("#file_temp_oprtn").val(""); //파일지우기
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/*//최대 업로드 파일갯수 화면 노출 세팅
|
||||||
|
if($("[name='limitcount']").length>0){
|
||||||
|
if($('.limitcount_li').length > 0){
|
||||||
|
$('.limitcount_li').text($("[name='limitcount']").val());
|
||||||
|
}
|
||||||
|
|
||||||
|
}*/
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//목록 정렬 항목 클릭
|
//목록 정렬 항목 클릭
|
||||||
@ -704,3 +747,219 @@ function goWebSave(method_parm){ //method_parm :관리자로그 메소드에서
|
|||||||
return this.removeClass(pFromClass).addClass(pToClass);
|
return this.removeClass(pFromClass).addClass(pToClass);
|
||||||
};
|
};
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|
||||||
|
|
||||||
|
/*체험교실 안내 > 운영지침 첨부파일 관련*/
|
||||||
|
|
||||||
|
/*파일 드래그앤 드롭*/
|
||||||
|
/* 파일등록 */
|
||||||
|
var _fileIdx_oprtn = 0;
|
||||||
|
var _fileForm2_oprtn = new Array();
|
||||||
|
function handleFileUpload_oprtn(files,obj) //업로드 function
|
||||||
|
{
|
||||||
|
var limitsize = 50*1024*1024; //파일 제한 체크(50개, 50MB)
|
||||||
|
var limitcount = 2 ;
|
||||||
|
|
||||||
|
if($('#tbody_fiielist_oprtn').find('tr').length + files.length > limitcount ){
|
||||||
|
alert("업로드 파일은 최대 "+limitcount+"개 입니다.");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
for (var i = 0; i < files.length; i++){
|
||||||
|
if(files[i].size > limitsize){
|
||||||
|
alert(files[i].name+"파일 사이즈가"+getStrFileSize(files[i].size)+"로 50MB이하만 업로드 가능합니다.");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < files.length; i++){
|
||||||
|
var fileNm = files[i].name;
|
||||||
|
if (fileNm != "") {
|
||||||
|
var ext = fileNm.slice(fileNm.lastIndexOf(".") + 1).toLowerCase();
|
||||||
|
var allowedExtensions = ["jpg", "jpeg", "png", "gif", "bmp", "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "hwp", "txt"];
|
||||||
|
if (!allowedExtensions.includes(ext)) {
|
||||||
|
alert("jpg, jpeg, png, pdf, doc, docx, xls, xlsx, ppt, pptx, hwp, txt 파일만 업로드 가능합니다.");
|
||||||
|
e.stopImmediatePropagation(); // block js file upload
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < files.length; i++)
|
||||||
|
{
|
||||||
|
var fd = new FormData();
|
||||||
|
fd.append('file', files[i]);
|
||||||
|
var tmpObj = new Object();
|
||||||
|
tmpObj.name = "file_" + _fileIdx_oprtn;
|
||||||
|
tmpObj.fileObj = files[i];
|
||||||
|
|
||||||
|
_fileForm2_oprtn.push(tmpObj);
|
||||||
|
sendFileToServer_oprtn(fd, obj, files[i], _fileIdx_oprtn);
|
||||||
|
_fileIdx_oprtn++;
|
||||||
|
|
||||||
|
var totalfileSize = 0;
|
||||||
|
$('.totalfileCount').text($('.item_file_size_oprtn').length) ;
|
||||||
|
$('.item_file_size_oprtn').each(function(){
|
||||||
|
totalfileSize += $(this).val()*1 ;
|
||||||
|
});
|
||||||
|
$('.totalfileSize').text(getStrFileSize(totalfileSize)) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendFileToServer_oprtn(formData, obj , fileObj, _fileIdx_oprtn)
|
||||||
|
{
|
||||||
|
$('.no_img_box_oprtn').hide(); //list 박스 형식 변경
|
||||||
|
$('.file_list_div_oprtn').show();
|
||||||
|
var list_html = "";
|
||||||
|
var tt = "";
|
||||||
|
|
||||||
|
var fileNm = fileObj.name;
|
||||||
|
var fileExt = fileNm.split('.').pop().toLowerCase();
|
||||||
|
|
||||||
|
list_html += '<tr class="item_'+tt+' uploaded_obj">';
|
||||||
|
|
||||||
|
//list_html += '<td class="td_check"><input type="checkbox" class="delBtn" alt=""><label for=""></label></td>';
|
||||||
|
//list_html += '<td class="td_filename"><img src="'+getfile_img(fileObj.name)+'" alt=""><span class="file_name_text">'+fileObj.name+'</span></td>';
|
||||||
|
list_html += '<td class="td_filename_oprtn file_name"><img src="'+getfile_img(fileObj.name)+'" alt=""><span class="file_name_text">'+fileObj.name+'</span></td>';
|
||||||
|
list_html += '<td class="td_filesort_oprtn file_extension"><span class="file_filesort_text" value='+fileExt+'>.'+fileExt+'</span></td>';
|
||||||
|
list_html += '<td class="td_filesize_oprtn file_size"><span class="file_size_text" value='+fileObj.size+'>'+getStrFileSize(fileObj.size)+'</span></td>';
|
||||||
|
//list_html += '<td class="file_date">'+getDate()+'</td>';
|
||||||
|
list_html += '<td class="file_del"><button type="button" class="btn_del" onclick="delete_item_oprtn(this, '+_fileIdx_oprtn+')" title="';
|
||||||
|
list_html += fileObj.name;
|
||||||
|
list_html += ' 삭제"><i></i></button></td>';
|
||||||
|
list_html += '<input type="hidden" name="fileSize_oprtn" class="item_file_size_oprtn" value="'+fileObj.size+'">';
|
||||||
|
list_html += '<input type="hidden" name="atchFileIds_oprtn" class="imsi" value="'+tt+'">';
|
||||||
|
list_html += '</tr>';
|
||||||
|
$('#tbody_fiielist_oprtn').append(list_html);
|
||||||
|
}
|
||||||
|
|
||||||
|
function delAtchFile_oprtn(itemId , fileSn){
|
||||||
|
if(!confirm("삭제하시겠습니까?")){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
/*url: "/offedu/uss/ion/fms/fmsfileDeleteAjax.do",*/
|
||||||
|
url: "/offedu/web/fms/fmsfileDeleteAjax.do",
|
||||||
|
data:{ "atchFileId" : itemId , "fileSn" : fileSn},
|
||||||
|
dataType:'json',
|
||||||
|
cache: false,
|
||||||
|
async: false,
|
||||||
|
timeout: 600000,
|
||||||
|
success: function (returnData, status) {
|
||||||
|
if(status == 'success'){
|
||||||
|
if(returnData.result == 'fail'){
|
||||||
|
alert("삭제처리가 실패하였습니다.");
|
||||||
|
}else if(returnData.result == 'auth_fail'){
|
||||||
|
alert("세션이 종료되었습니다.");
|
||||||
|
}else if(returnData.result =='success'){
|
||||||
|
$('.item_'+returnData.fmsFileVO.atchFileId+"_"+returnData.fmsFileVO.fileSn).remove();
|
||||||
|
alert("삭제되었습니다.");
|
||||||
|
drawUploadArea_oprtn();
|
||||||
|
// $('.td_txt_exist > img').attr('src', '/images/no_img.jpg') ;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
alert("삭제처리에 실패하였습니다.");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (e) {
|
||||||
|
console.log("ERROR : ", e);
|
||||||
|
alert("삭제처리에 실패하였습니다.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 임시파일 삭제버튼 클릭시 */
|
||||||
|
function delete_item_oprtn(obj, fileIdx){
|
||||||
|
$(obj).closest("tr").remove();
|
||||||
|
_fileForm2_oprtn.forEach(function(fobj, idx) {
|
||||||
|
if (fobj.name == ("file_oprtn" + fileIdx)) _fileForm2_oprtn[idx] = "";
|
||||||
|
});
|
||||||
|
|
||||||
|
if($('.item_file_size_oprtn').length == 0){
|
||||||
|
$('.file_upload_box_oprtn ').show();
|
||||||
|
$('.upload_box_text').show();
|
||||||
|
$('.fileAfter_oprtn').hide();
|
||||||
|
}else{
|
||||||
|
var totalfileSize = 0;
|
||||||
|
$('.totalfileCount').text($('.item_file_size_oprtn').length) ;
|
||||||
|
$('.item_file_size_oprtn').each(function(){
|
||||||
|
totalfileSize += $(this).val()*1 ;
|
||||||
|
});
|
||||||
|
$('.totalfileSize').text(getStrFileSize(totalfileSize)) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function drawUploadArea_oprtn(){
|
||||||
|
$('.no_img_box_oprtn').hide(); //list 박스 형식 변경
|
||||||
|
$('.file_list_div_oprtn').show();
|
||||||
|
|
||||||
|
$('.file_name_text').each(function(index, item){
|
||||||
|
$(this).parent().find('img').attr('src', getfile_img($(this).text())) ; //이미지 변경
|
||||||
|
});
|
||||||
|
$('.file_size_text').each(function(index, item){
|
||||||
|
$(this).text(getStrFileSize($(this).attr('value')))
|
||||||
|
});
|
||||||
|
|
||||||
|
var totalfileSize = 0;
|
||||||
|
$('.totalfileCount').text($('.item_file_size_oprtn').length) ;
|
||||||
|
$('.item_file_size_oprtn').each(function(){
|
||||||
|
totalfileSize += $(this).val()*1 ;
|
||||||
|
});
|
||||||
|
$('.totalfileSize').text(getStrFileSize(totalfileSize)) ;
|
||||||
|
|
||||||
|
|
||||||
|
//if( $("#tbody_fiielist_oprtn > [class^=item]").length == 0 && $("#tbody_fiielist_oprtn > [class^=item]").length > 0 ){
|
||||||
|
if( $("#tbody_fiielist_oprtn > [class^=item]").length == 0){
|
||||||
|
$('.no_img_box_oprtn').show();
|
||||||
|
$('.file_list_div_oprtn ').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($('.fileTable').length > 0 ){
|
||||||
|
//$('.fileTable').remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 등록되어 있는 파일 삭제버튼 클릭시 */
|
||||||
|
function delAtchPhotoFile_oprtn(itemId , fileSn){
|
||||||
|
if(!confirm("삭제하시겠습니까?")){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/offedu/uss/ion/fms/fmsfileDeleteAjax.do",
|
||||||
|
data:{ "atchFileId" : itemId , "fileSn" : fileSn},
|
||||||
|
dataType:'json',
|
||||||
|
cache: false,
|
||||||
|
async: false,
|
||||||
|
timeout: 600000,
|
||||||
|
success: function (returnData, status) {
|
||||||
|
if(status == 'success'){
|
||||||
|
if(returnData.result == 'fail'){
|
||||||
|
alert("삭제처리가 실패하였습니다.");
|
||||||
|
}else if(returnData.result == 'auth_fail'){
|
||||||
|
alert("세션이 종료되었습니다.");
|
||||||
|
}else if(returnData.result =='success'){
|
||||||
|
$('.item_'+returnData.fmsFileVO.atchFileId+"_"+returnData.fmsFileVO.fileSn+"_oprtn").remove();
|
||||||
|
alert("삭제되었습니다.");
|
||||||
|
drawUploadArea_oprtn();
|
||||||
|
$('.put_photo_box').html('<img src="/offedu/visitEdu/usr/publish/images/content/img_add.png" alt="이미지를 넣어주세요">');
|
||||||
|
/*강사 디테일 첨부파일 ID 삭제*/
|
||||||
|
/*각각 jsp파일에 function존재*/
|
||||||
|
atchFileIdDelete();
|
||||||
|
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
alert("삭제처리에 실패하였습니다.");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (e) {
|
||||||
|
console.log("ERROR : ", e);
|
||||||
|
alert("삭제처리에 실패하였습니다.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
deleteLodingBar();
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user