feat: image-editor paintweb 적용 진행

main
minuk926 2 years ago
parent 4c88db1334
commit 3d7785526f

@ -10,7 +10,7 @@ import kr.xit.fims.biz.ec.model.CtznStmtDTO;
@Mapper @Mapper
public interface IEcCtznSttemntMapper { public interface IEcCtznSttemntMapper {
List<CtznStmtDTO> selectEcCtznSttemnts(Map<String, Object> paraMap, RowBounds rowBounds); List<CtznStmtDTO> selectEcCtznSttemnts(final Map<String, Object> paraMap, final RowBounds rowBounds);
CtznStmtDTO selectEcCtznSttemnt(final CtznStmtDTO.Request dto); CtznStmtDTO selectEcCtznSttemnt(final CtznStmtDTO.Request dto);
List<CtznStmtDTO.CtznStmtDtl> selectEcCtznSttemntDetails(final CtznStmtDTO.Request dto); List<CtznStmtDTO.CtznStmtDtl> selectEcCtznSttemntDetails(final CtznStmtDTO.Request dto);
CtznStmtDTO.CtznStmtDtl selectEcCtznSttemntDetail(final CtznStmtDTO.Request dto); CtznStmtDTO.CtznStmtDtl selectEcCtznSttemntDetail(final CtznStmtDTO.Request dto);
@ -18,4 +18,7 @@ public interface IEcCtznSttemntMapper {
int insertEcCtznSttemnt(final CtznStmtDTO dto); int insertEcCtznSttemnt(final CtznStmtDTO dto);
int insertEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dtl); int insertEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dtl);
List<CtznStmtDTO> selectCtznSttemnts(final Map<String, Object> paraMap, final RowBounds rowBounds);
} }

@ -120,10 +120,14 @@
<select id="selectEcCtznSttemntDetails" resultType="kr.xit.fims.biz.ec.model.CtznStmtDTO$CtznStmtDtl"> <select id="selectEcCtznSttemntDetails" resultType="kr.xit.fims.biz.ec.model.CtznStmtDTO$CtznStmtDtl">
/* ec-ctzn-sttemnt-mysql-mapper|selectEcCtznSttemntDetails-민원연계(국민신문고) 상세(목록) 조회|julim */ /* ec-ctzn-sttemnt-mysql-mapper|selectEcCtznSttemntDetails-민원연계(국민신문고) 상세(목록) 조회|julim */
<include refid="sqlEcCtznStmtDtl"/> <include refid="sqlEcCtznStmtDtl"/>
WHERE interface_seq_n = #{interfaceSeqN} <where>
<if test='interfaceSeqN != null and interfaceSeqN != ""'>
AND interface_seq_n = #{interfaceSeqN}
</if>
<if test='ctznSttemntDetailSn != null and ctznSttemntDetailSn != ""'> <if test='ctznSttemntDetailSn != null and ctznSttemntDetailSn != ""'>
AND ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn} AND ctzn_sttemnt_detail_sn = #{ctznSttemntDetailSn}
</if> </if>
</where>
</select> </select>
<select id="selectEcCtznSttemntDetail" resultType="kr.xit.fims.biz.ec.model.CtznStmtDTO$CtznStmtDtl"> <select id="selectEcCtznSttemntDetail" resultType="kr.xit.fims.biz.ec.model.CtznStmtDTO$CtznStmtDtl">
@ -174,4 +178,34 @@
) )
</insert> </insert>
<resultMap id="resultMapCtznStmt" type="kr.xit.fims.biz.ec.model.CtznStmtDTO">
<result column="interface_seq_n" property="interfaceSeqN"/>
<result column="instt_code" property="insttCode"/>
<result column="sys_code" property="sysCode"/>
<result column="cvpl_se" property="cvplSe"/>
<result column="cvpl_reqst_no" property="cvplReqstNo"/>
<result column="cvpl_rcept_no" property="cvplRceptNo"/>
<result column="cvpl_applcnt_nm" property="cvplApplcntNm"/>
<result column="cvpl_applcnt_zip" property="cvplApplcntZip"/>
<result column="cvpl_applcnt_adres" property="cvplApplcntAdres"/>
<result column="cvpl_applcnt_moblphon_no" property="cvplApplcntMoblphonNo"/>
<result column="cvpl_applcnt_email_adres" property="cvplApplcntEmailAdres"/>
<result column="cvpl_applcnt_tlphon_no" property="cvplApplcntTlphonNo"/>
<result column="cvpl_reqst_sj" property="cvplReqstSj"/>
<result column="cvpl_reqst_cn" property="cvplReqstCn"/>
<result column="cvpl_reqst_dt" property="cvplReqstDt"/>
<result column="cvpl_rcept_dt" property="cvplRceptDt"/>
<result column="cvpl_process_pd" property="cvplProcessPd"/>
<result column="cvpl_regist_dt" property="cvplRegistDt"/>
<result column="ctzn_sttemnt_process_sttus" property="ctznSttemntProcessSttus"/>
<result column="register" property="register"/>
<result column="updt_dt" property="updtDt"/>
<result column="updusr" property="updusr"/>
<collection column="{interfaceSeqN=interface_seq_n}" property="stmtDtlDTOs" select="selectEcCtznSttemntDetails" javaType="List" />
</resultMap>
<select id="selectCtznSttemnts" resultMap="resultMapCtznStmt">
/* ec-ctzn-sttemnt-mysql-mapper|selectCtznSttemnts-민원연계(국민신문고) 목록 조회|julim */
<include refid="sqlEcCtznStmt"/>
</select>
</mapper> </mapper>

@ -150,6 +150,13 @@
} }
} }
}, },
{
header: '순번',
name: 'ctznSttemntDetailSn',
width: 80,
sortable: false,
align: 'center'
},
{ {
header: '기관코드', header: '기관코드',
name: 'insttCode', name: 'insttCode',
@ -214,7 +221,8 @@
initialRequest: true, // 화면 load시 조회 안함 - default initialRequest: true, // 화면 load시 조회 안함 - default
api: { api: {
readData: { readData: {
url: '<c:url value="/fims/biz/ec/findCtznStmts.do"/>' <%--url: '<c:url value="/fims/biz/ec/findCtznStmts.do"/>'--%>
url: '<c:url value="/fims/biz/ec/findCtznStmtDtls.do"/>'
,serializer: (params) => fnAddPageInfo(document.frmSearch, params) ,serializer: (params) => fnAddPageInfo(document.frmSearch, params)
} }
} }

@ -255,6 +255,7 @@
x.style = 'height:150px;'; x.style = 'height:150px;';
//x.setAttribute("width", "304"); //x.setAttribute("width", "304");
//x.setAttribute("height", "228"); //x.setAttribute("height", "228");
x.setAttribute("title", dtl.orginlFileNm);
x.setAttribute("alt", dtl.orginlFileNm); x.setAttribute("alt", dtl.orginlFileNm);
document.querySelector('#ctznImg').appendChild(x); document.querySelector('#ctznImg').appendChild(x);

@ -1,4 +1,37 @@
/* Download an img */ /* Download an img */
function imgDownload(cmmFileDtls, appendElementId) {
const url = '<c:url value="/framework/biz/cmm/file/download.do"/>';
cmmFileDtls.forEach((dtl, idx) => {
fetch(
url
, {
method: 'post'
, body: JSON.stringify(dtl)
}
)
.then((response) => response.blob())
.then((blob) => {
const url = URL.createObjectURL(blob);
var x = document.createElement("img");
x.setAttribute("src", url);
//x.style = 'width:150px; display: block;';
x.style = 'height:150px;';
//x.setAttribute("width", "304");
//x.setAttribute("height", "228");
x.setAttribute("title", dtl.orginlFileNm);
x.setAttribute("alt", dtl.orginlFileNm);
document.querySelector(appendElementId).appendChild(x);
// Revoke Blob URL after DOM updates..
//window.URL.revokeObjectURL(objectURL);
}
);
})
}
function download(img) { function download(img) {
var link = document.createElement("a"); var link = document.createElement("a");
link.href = img.src; link.href = img.src;
@ -61,9 +94,8 @@ function addDownloadBtn() {
btn.style.top = btn.style.left = "0px"; btn.style.top = btn.style.left = "0px";
document.body.appendChild(btn); document.body.appendChild(btn);
} }
addDownloadBtn();
addDownloadBtn();
images = document.querySelectorAll("img"); images = document.querySelectorAll("img");
@ -89,8 +121,6 @@ for (i of images) {
} }
for (let i = 1; i < 35; i++) { for (let i = 1; i < 35; i++) {
setTimeout(() => { setTimeout(() => {
fetch(`https://testing-images/images-${i}.jpg`) fetch(`https://testing-images/images-${i}.jpg`)
@ -111,7 +141,6 @@ for(let i=1; i<35; i++){
} }
urls.forEach(function (e) { urls.forEach(function (e) {
fetch(e.download) fetch(e.download)
.then(res => res.blob()) .then(res => res.blob())
@ -121,15 +150,9 @@ urls.forEach(function (e) {
}); });
<div id="tui-image-editor-container"></div> <div id="tui-image-editor-container"></div>
<link <link
rel="stylesheet" rel="stylesheet"
href="/resources/3rd-party/tui/image-editor-3.15.3/tui-image-editor.css" href="/resources/3rd-party/tui/image-editor-3.15.3/tui-image-editor.css"
@ -137,14 +160,12 @@ urls.forEach(function (e) {
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/3.6.0/fabric.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/3.6.0/fabric.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.min.js"></script> <script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.js"></script> <script type="text/javascript" src="https://uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js"></script> <script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js"></script>
<script type="text/javascript" src="/resources/3rd-party/tui/image-editor-3.15.3/tui-image-editor.js"></script> <script type="text/javascript" src="/resources/3rd-party/tui/image-editor-3.15.3/tui-image-editor.js"></script>
<script type="text/javascript"> <script type="text/javascript">
const options = { const options = {
includeUI: { includeUI: {
loadImage: { loadImage: {
@ -163,7 +184,9 @@ const options = {
rotatingPointOffset: 70, rotatingPointOffset: 70,
} }
}; };
const imageEditor = new tui.ImageEditor(document.querySelector('#tui-image-editor-container'), options); const imageEditor = new tui.ImageEditor(document.querySelector('#tui-image-editor-container'), options
)
;
tui.usageStatistics = false; tui.usageStatistics = false;
// window.onresize = function () { // window.onresize = function () {
// imageEditor.ui.resizeEditor(); // imageEditor.ui.resizeEditor();

Loading…
Cancel
Save