123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMZWT00110" position="absolute 0 0 930 700" titletext="자동구문관리" class="frm_POP" oninit="SMZWT00110_oninit" scrollbars="none">
- <Layouts>
- <Layout>
- <Grid position="absolute 12 107 917 657" id="grd_awtlist" binddataset="ds_grd_awtlist" autofittype="none" autosizingtype="row" extendsizetype="row" autoenter="select">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25"/>
- <Column size="141"/>
- <Column size="725"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell autosizecol="none"/>
- <Cell col="1" text="단어"/>
- <Cell col="2" text="구문"/>
- <Cell col="3"/>
- <Cell col="4"/>
- <Cell col="5"/>
- <Cell col="6"/>
- <Cell col="7"/>
- </Band>
- <Band id="body">
- <Cell displaytype="normal" style="align:center;" autosizecol="none"/>
- <Cell col="1" displaytype="text" edittype="textarea" text="bind:keyword" wordwrap="both" editacceptsenter="true" autosizerow="limitmin"/>
- <Cell col="2" displaytype="text" edittype="textarea" text="bind:sentense" editacceptsenter="true"/>
- <Cell col="3" displaytype="text" edittype="text" text="bind:sentensetype"/>
- <Cell col="4" displaytype="text" edittype="text" text="bind:awttype"/>
- <Cell col="5" displaytype="text" edittype="text" text="bind:userid"/>
- <Cell col="6" text="bind:awtseq"/>
- <Cell col="7" text="bind:backkeyword"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 683 86 747 105" id="button5" class="btn2" visible="false" text="엑셀입력"/>
- <Button position="absolute 617 86 681 105" id="button1" class="btn2" visible="false" text="엑셀저장"/>
- <Button position="absolute 749 86 802 105" id="button2" class="btn5" enable="false" text="행추가" onclick="button2_onclick"/>
- <Button position="absolute 804 86 857 105" id="button3" class="btn5" enable="false" text="행삭제" onclick="button3_onclick"/>
- <Button position="absolute 861 85 917 107" id="button4" class="btn4" enable="false" text="저장" onclick="button4_onclick"/>
- <Static text="단어는 최대 2000개까지 표시됩니다." position="absolute 14 670 293 685" id="caption4" style="font:굴림체,9,bold;"/>
- <Static text="※ 사용법 : 기록화면에서 약어를 입력하신 후 F10을 누르시면 구문이 COPY됩니다." position="absolute 16 90 531 105" id="cpt_usetxt" style="color:blue;"/>
- <Button position="absolute 521 86 574 105" id="button6" class="btn2" visible="false" text="도움말" onclick="button6_onclick"/>
- <Static position="absolute 831 670 917 685" align="align:right middle;" id="cpt_cnt" style="align:right middle;"/>
- <Button position="absolute 24 720 44 730" id="button7" text=""/>
- <Static id="stt_titleText" text="AWT 구문관리" onclick="stt_titleText_onclick" class="sta_POP_title" transparenthittest="true" position="absolute 12 8 161 28"/>
- <Button id="btn_close" taborder="1" onclick="btn_close_onclick" class="btn_POP_cls" position="absolute 896 12 910 25"/>
- <Shape id="roundrect1" type="roundrectangle" position="absolute 12 40 917 80"/>
- <Edit id="ipt_pKeyword" taborder="2" class="input_search" position="absolute 418 51 533 70"/>
- <Static id="caption8" text="유형 :" class="search_name" position="absolute 23 52 83 69"/>
- <Radio id="radio1" taborder="3" columncount="2" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 88 52 183 72" onitemchanged="radio1_onitemchanged">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">W</Col>
- <Col id="datacolumn">단어</Col>
- </Row>
- <Row>
- <Col id="codecolumn">S</Col>
- <Col id="datacolumn">구문</Col>
- </Row>
- </Rows>
- </Dataset>
- </Radio>
- <Radio id="rdo_awt" taborder="4" columncount="3" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 193 52 293 72" onitemchanged="rdo_awt_onitemchanged">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">P</Col>
- <Col id="datacolumn">개인</Col>
- </Row>
- <Row>
- <Col id="codecolumn">C</Col>
- <Col id="datacolumn">공용</Col>
- </Row>
- </Rows>
- </Dataset>
- </Radio>
- <Static id="caption1" text="단어 또는 약어 :" class="search_name" position="absolute 293 52 418 69"/>
- <Static id="caption2" text="구문 안의 단어 :" class="search_name" position="absolute 543 52 678 69"/>
- <Edit id="input1" taborder="5" class="input_search" position="absolute 668 51 828 70"/>
- <Button id="btn_search" taborder="6" text="조회" class="btn1" position="absolute 853 50 909 72" onclick="btn_search_onclick"/>
- <Shape id="line13" linetype="vertical" position="absolute 841 50 847 71"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grd_awtlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="keyword" type="STRING" size="255"/>
- <Column id="sentense" type="STRING" size="255"/>
- <Column id="sentensetype" type="STRING" size="255"/>
- <Column id="awttype" type="STRING" size="255"/>
- <Column id="userid" type="STRING" size="255"/>
- <Column id="awtseq" type="STRING" size="255"/>
- <Column id="backkeyword" type="STRING" size="255"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="sentensetype" type="STRING" size="256" sumtext="단어,구문구분"/>
- <Column id="keyword" type="STRING" size="256" sumtext="검색keyword"/>
- <Column id="sentense" type="STRING" size="256" sumtext="검색sentense"/>
- <Column id="awttype" type="STRING" size="256" sumtext="검색awttype"/>
- <Column id="userid" type="STRING" size="256" sumtext="검색userid"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="ipt_pKeyword" propid="value" datasetid="ds_send" columnid="keyword"/>
- <BindItem id="item1" compid="input1" propid="value" datasetid="ds_send" columnid="sentense"/>
- <BindItem id="item2" compid="rdo_awt" propid="value" datasetid="ds_send" columnid="awttype"/>
- <BindItem id="item3" compid="radio1" propid="value" datasetid="ds_send" columnid="sentensetype"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2014-12-23
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-12-23 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs"; // 전체공통 스크립트
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- function SMZWT00110_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
-
- // model.removenode("/root/main/awtlist");
- // model.makeNode("/root/main/awtlist");
-
- grdf_setRowTypeIcon(grd_awtlist, 0); //상태값 표시
-
- ds_send.clearData();
- ds_send.addRow();
- ds_send.setColumn(0, "sentensetype", "S");
- ds_send.setColumn(0, "awttype", "P");
- ds_send.setColumn(0, "keyword", "");
- ds_send.setColumn(0, "sentense", "");
- ds_send.setColumn(0, "userid", "");
-
- radio1.value = "S";
- rdo_awt.value = "P";
-
- if (rdo_awt.value == "C") {
- button1.enable = false;
- button2.enable = false;
- button3.enable = false;
- button4.enable = false;
- button5.enable = false;
-
- } else {
- button1.enable = true;
- button2.enable = true;
- button3.enable = true;
- button4.enable = true;
- button5.enable = true;
- }
-
- // var sInDsName = dsf_createDsRow("in_ds_search"
- // , [ {col: "sentensetype", val: group2.ipt_search_item.value}
- // ,{col: "keyword", val: group2.combo1.value}
- // ,{col: "sentense", val: cmb_menugrup.value}
- // ,{col: "awttype", val: cmb_menugrupauthlist.value}
- // ,{col: "userid", val: opt_menuauthcd.value} ]);
-
- var oParam = {};
- oParam.id = "TRZWT00100";
- oParam.service = "awtapp.AwtWord";
- oParam.method = "reqGetAwtWordList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_grd_awtlist=item";
- oParam.async = false;
- oParam.callback = "cf_TRZWT00100";
- tranf_submit(oParam);
-
-
- // grd_awtlist.clearStatus();
-
- if (ds_send.getColumn(0, "sentensetype") == "W") {
- grd_awtlist.setCellProperty("Head", 1, "text", "단어");
- grd_awtlist.setFormatColProperty(1, "size", 861);
- grd_awtlist.setFormatColProperty(2, "size", 0);
- cpt_usetxt.visible = false;
- } else {
- grd_awtlist.setCellProperty("Head", 1, "text", "약어");
- grd_awtlist.setFormatColProperty(1, "size", 141);
- grd_awtlist.setFormatColProperty(2, "size", 725);
- cpt_usetxt.visible = true;
- }
-
- var cnt = ds_grd_awtlist.getRowCount();
-
- if( cnt > 0 ){
- cpt_cnt.text = "( " + cnt + " 건 )";
- cpt_cnt.visible = true;
- }else{
- cpt_cnt.visible = false;
- }
- }
- function cf_TRZWT00100(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- else{
- ds_grd_awtlist.updatecontrol = false;
- for(var i = 0; i < ds_grd_awtlist.rowcount; i++){
- ds_grd_awtlist.setColumn(i, "backkeyword", ds_grd_awtlist.getColumn(i, "keyword"));
- }
- ds_grd_awtlist.updatecontrol = true;
- }
- }
- function btn_close_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- function radio1_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
- {
- if (obj.value == "W") {
- grd_awtlist.setCellProperty("Head", 1, "text", "단어");
- grd_awtlist.setFormatColProperty(1, "size", 861);
- grd_awtlist.setFormatColProperty(2, "size", 0);
- cpt_usetxt.visible = false;
- } else {
- grd_awtlist.setCellProperty("Head", 1, "text", "약어");
- grd_awtlist.setFormatColProperty(1, "size", 141);
- grd_awtlist.setFormatColProperty(2, "size", 725);
- cpt_usetxt.visible = true;
- }
- var oParam = {};
- oParam.id = "TRZWT00100";
- oParam.service = "awtapp.AwtWord";
- oParam.method = "reqGetAwtWordList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_grd_awtlist=item";
- oParam.async = false;
- oParam.callback = "cf_TRZWT00100";
- tranf_submit(oParam);
- // grd_awtlist.clearStatus();
- if (obj.value == "W") {
- grd_awtlist.setCellProperty("Head", 1, "text", "단어");
- grd_awtlist.setFormatColProperty(1, "size", 861);
- grd_awtlist.setFormatColProperty(2, "size", 0);
- cpt_usetxt.visible = false;
- } else {
- grd_awtlist.setCellProperty("Head", 1, "text", "약어");
- grd_awtlist.setFormatColProperty(1, "size", 141);
- grd_awtlist.setFormatColProperty(2, "size", 725);
- cpt_usetxt.visible = true;
- }
- var cnt = ds_grd_awtlist.getRowCount();
-
- if( cnt > 0 ){
- cpt_cnt.text = "( " + cnt + " 건 )";
- cpt_cnt.visible = true;
- }else{
- cpt_cnt.visible = false;
- }
- }
- function rdo_awt_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
- {
- if (obj.value == "C") {
- button1.enable = false;
- button2.enable = false;
- button3.enable = false;
- button4.enable = false;
- button5.enable = false;
- } else {
- button1.enable = true;
- button2.enable = true
- button3.enable = true;
- button4.enable = true;
- button5.enable = true;
- }
-
- var oParam = {};
- oParam.id = "TRZWT00100";
- oParam.service = "awtapp.AwtWord";
- oParam.method = "reqGetAwtWordList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_grd_awtlist=item";
- oParam.async = false;
- oParam.callback = "cf_TRZWT00100";
- tranf_submit(oParam);
-
- // grd_awtlist.clearStatus();
-
- if (ds_send.getColumn(0, "sentensetype") == "W") {
- grd_awtlist.setCellProperty("Head", 1, "text", "단어");
- grd_awtlist.setFormatColProperty(1, "size", 861);
- grd_awtlist.setFormatColProperty(2, "size", 0);
- cpt_usetxt.visible = false;
- } else {
- grd_awtlist.setCellProperty("Head", 1, "text", "약어");
- grd_awtlist.setFormatColProperty(1, "size", 141);
- grd_awtlist.setFormatColProperty(2, "size", 725);
- cpt_usetxt.visible = true;
- }
-
- var cnt = ds_grd_awtlist.getRowCount();
-
- if( cnt > 0 ){
- cpt_cnt.text = "( " + cnt + " 건 )";
- cpt_cnt.visible = true;
- }else{
- cpt_cnt.visible = false;
- }
- }
- function btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- var oParam = {};
- oParam.id = "TRZWT00100";
- oParam.service = "awtapp.AwtWord";
- oParam.method = "reqGetAwtWordList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_grd_awtlist=item";
- oParam.async = false;
- oParam.callback = "cf_TRZWT00100";
- tranf_submit(oParam);
- //trace(ds_grd_awtlist.saveXML());
- // grd_awtlist.clearStatus();
- if (ds_send.getColumn(0, "sentensetype") == "W") {
- grd_awtlist.setCellProperty("Head", 1, "text", "단어");
- grd_awtlist.setFormatColProperty(1, "size", 861);
- grd_awtlist.setFormatColProperty(2, "size", 0);
- cpt_usetxt.visible = false;
- } else {
- grd_awtlist.setCellProperty("Head", 1, "text", "약어");
- grd_awtlist.setFormatColProperty(1, "size", 141);
- grd_awtlist.setFormatColProperty(2, "size", 725);
- cpt_usetxt.visible = true;
- }
- var cnt = ds_grd_awtlist.getRowCount();
-
- if( cnt > 0 ){
- cpt_cnt.text = "( " + cnt + " 건 )";
- cpt_cnt.visible = true;
- }else{
- cpt_cnt.visible = false;
- }
- }
- function button2_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_grd_awtlist.addRow();
- ds_grd_awtlist.setColumn(ds_grd_awtlist.rowcount-1, "sentense", "구문을 \n입력해주세요.");
- grd_awtlist.setFocus();
- }
- function button3_onclick(obj:Button, e:ClickEventInfo)
- {
- var nRow = ds_grd_awtlist.rowposition;
-
- //Dataset 행삭제
- ds_grd_awtlist.updatecontrol = false;
-
- if (ds_grd_awtlist.getRowType(nRow) == Dataset.ROWTYPE_INSERT) {
- ds_grd_awtlist.deleteRow(nRow);
-
- }
- else {
- var bSucc = ds_grd_awtlist.setRowType(nRow, Dataset.ROWTYPE_DELETE);
- }
- ds_grd_awtlist.updatecontrol = true;
- }
- function button4_onclick(obj:Button, e:ClickEventInfo)
- {
- var cnt = 0;
- for (var i = 0; i < grd_awtlist.rowcount; i++) {
- cnt = 0;
- if(ds_send.getColumn(0, "sentensetype") == "W"){
- ds_grd_awtlist.setColumn(i, "sentense", ds_grd_awtlist.getColumn(i, "keyword"));
- }
- if(ds_send.getColumn(0, "sentensetype") == "S"){
- if(ds_grd_awtlist.getColumn(i, "keyword") == ""){
- sysf_messageBox("빈 값으로 단어를 저장할 수 없습니다.【 " + i + "번째 】", "C999");
- return;
- }
- if(ds_grd_awtlist.getColumn(i, "sentense") == ""){
- sysf_messageBox("빈 값으로 구문을 저장할 수 없습니다. \n【 " + i + "번째 단어 : " + ds_grd_awtlist.getColumn(i, "keyword") + " 】", "C999");
- return;
- }
- }
- ds_grd_awtlist.setColumn(i, "awttype", ds_send.getColumn(0, "awttype"));
- ds_grd_awtlist.setColumn(i, "sentensetype", ds_send.getColumn(0, "sentensetype"));
-
- for(var j = 0; j < grd_awtlist.rowcount; j++){
- if(ds_grd_awtlist.getColumn(i, "keyword") == ds_grd_awtlist.getColumn(j, "keyword")){
- cnt++;
- }
- }
- if( cnt > 1 ){
- sysf_messageBox("[" + ds_grd_awtlist.getColumn(i, "keyword") + "] 동일한 " + grd_awtlist.getCellProperty("Head", 2, "text") + "가 존재합니다." , "C999");
- return;
- }
-
- // TF와 같은 데이터 형태로 저장 하기 위해 \r\n 을 \n으로 바꿔서 저장함
- // 그래야 awt 를 통해서 나올 때 TF가 제대로 나옴
- var sentense = ds_grd_awtlist.getColumn(i, "sentense");
- sentense = sentense.replace(/\r\n/g, "\n");
- ds_grd_awtlist.setColumn(i, "sentense", sentense);
- }
-
- var oParam = {};
- oParam.id = "TXZWT00200";
- oParam.service = "awtapp.AwtWord";
- oParam.method = "reqExeAwtListUser";
- oParam.inds = "req=ds_grd_awtlist:U";
- oParam.outds = "null";
- oParam.async = false;
- oParam.typeStr = "m"; // AwtWordImpl.java에서 status 변수명이 m으로 되어 있음
- oParam.callback = "cf_TXZWT00200";
- tranf_submit(oParam);
- }
- function cf_TXZWT00200(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0){
- alert("저장에 실패하였습니다.");
- return;
- } else {
- alert("저장되었습니다.");
- btn_search.click();
- }
- }]]></Script>
- </Form>
- </FDL>
|