diff --git a/components/common/modal/EgrpPysclQtyPop.vue b/components/common/modal/EgrpPysclQtyPop.vue index 78ccbcc..4e640f6 100644 --- a/components/common/modal/EgrpPysclQtyPop.vue +++ b/components/common/modal/EgrpPysclQtyPop.vue @@ -71,14 +71,12 @@ - - - 확인 - 닫기 - 삭제 + 삭제 + 확인 @@ -298,46 +296,46 @@ export default { }, async setSelectValueList01() { // form으로 popup 사용할 때 인자로 eqpmKindId, eqpmGrpId 보내줘야한다. - // let res = await this.postApiReturn({ - // apiKey: 'selectEqpmGrpCodeList', - // resKey: 'eqpmGrpCodeLists', - // sendParam: { - // eqpmKindId: - // this.item.eqpmKindId != undefined - // ? this.item.eqpmKindId - // : this.searchParam.eqpmKindId, - // }, - // // form을 통해 popup을 사용할 경우 -> this.item.eqpmKindId 사용 - // // 부모 페이지에서 설비종류인 eqpmKindId 값을 꼭 가져와야한다. - // }); - // if (res.length > 0) { - // this.selectValueList01 = await res.map(obj => { - // return { - // text: obj.eqpmGrpNm, - // value: obj.eqpmGrpId, - // }; - // }); - // // form을 통해 popup을 사용할 경우 -> this.item.eqpmGrpId 사용 - // // 부모 페이지에서 설비그룹을 선택한 값이 있다면(eqpmGrpId) 그 값으로 바인딩 아닐 경우 조회한 데이터의 첫번째 값으로 선택 - // // console.log('this.item.eqpmGrpId : ', this.item.eqpmGrpId); - // // console.log('this.searchParam.eqpmGrpId : ', this.searchParam.eqpmGrpId); - // this.selectValue01 = - // this.item.eqpmGrpId != undefined - // ? this.item.eqpmGrpId - // : this.searchParam.eqpmGrpId != undefined - // ? this.searchParam.eqpmGrpId - // : this.selectValueList01[0].value; - // } else { - // this.selectValueList01 = []; - // this.selectValue01 = null; - // } + let res = await this.postApiReturn({ + apiKey: 'selectEqpmGrpCodeList', + resKey: 'eqpmGrpCodeLists', + sendParam: { + eqpmKindId: + this.item.eqpmKindId != undefined + ? this.item.eqpmKindId + : this.searchParam.eqpmKindId, + }, + // form을 통해 popup을 사용할 경우 -> this.item.eqpmKindId 사용 + // 부모 페이지에서 설비종류인 eqpmKindId 값을 꼭 가져와야한다. + }); + if (res.length > 0) { + this.selectValueList01 = await res.map(obj => { + return { + text: obj.eqpmGrpNm, + value: obj.eqpmGrpId, + }; + }); + // form을 통해 popup을 사용할 경우 -> this.item.eqpmGrpId 사용 + // 부모 페이지에서 설비그룹을 선택한 값이 있다면(eqpmGrpId) 그 값으로 바인딩 아닐 경우 조회한 데이터의 첫번째 값으로 선택 + // console.log('this.item.eqpmGrpId : ', this.item.eqpmGrpId); + // console.log('this.searchParam.eqpmGrpId : ', this.searchParam.eqpmGrpId); + this.selectValue01 = + this.item.eqpmGrpId != undefined + ? this.item.eqpmGrpId + : this.searchParam.eqpmGrpId != undefined + ? this.searchParam.eqpmGrpId + : this.selectValueList01[0].value; + } else { + this.selectValueList01 = []; + this.selectValue01 = null; + } - this.selectValueList01 = [ - { label: '냉동기고온', value: '냉동기고온' }, - { label: '냉동기저온', value: '냉동기저온' }, - { label: '공조기', value: '공조기' }, - { label: '보일러', value: '보일러' } - ]; + // this.selectValueList01 = [ + // { label: '냉동기고온', value: '냉동기고온' }, + // { label: '냉동기저온', value: '냉동기저온' }, + // { label: '공조기', value: '공조기' }, + // { label: '보일러', value: '보일러' } + // ]; }, search() { this.getGridData(); @@ -388,44 +386,35 @@ export default { this.loadGrid = false; let res = []; - // res = await this.postApiReturn({ - // apiKey: 'selectEgrpPysclQtyPop', - // resKey: 'egrpPysclQtyData', - // sendParam: { - // searchWord: this.searchWord, - // eqpmGrpId: this.selectValue01, - // openMode: this.item.openMode, - // }, - // }); - // let newRes = []; - // let tempTagList = this.pyscPopVal.split('/*wq2a/'); - // let tagList = tempTagList.filter(item => item != ''); - // if (tagList.length > 0) { - // newRes = res.filter(item => { - // return !tagList.includes(item.pysclQtyId); - // }); - // res = newRes; - // } - - // //이미 선택된 값들 제거(배열) - // if (this.item.dataList) { - // if (this.item.dataList.length > 0) { - // newRes = res.filter(item => { - // return !this.item.dataList.includes(item.pysclQtyId); - // }); - // res = newRes; - // } - // } - - res = [ - { - 'pysclQtyId': 'PYSCL00001', - 'pysclQtyCd': 'AMP_1A', - 'pysclQtyNm': '회로1 전류A', - 'pysclQtyTpNm': 'TAG' + res = await this.postApiReturn({ + apiKey: 'selectEgrpPysclQtyPop', + resKey: 'egrpPysclQtyData', + sendParam: { + searchWord: this.searchWord, + eqpmGrpId: this.selectValue01, + openMode: this.item.openMode, + }, + }); + let newRes = []; + let tempTagList = this.pyscPopVal.split('/*wq2a/'); + let tagList = tempTagList.filter(item => item != ''); + if (tagList.length > 0) { + newRes = res.filter(item => { + return !tagList.includes(item.pysclQtyId); + }); + res = newRes; + } + //이미 선택된 값들 제거(배열) + if (this.item.dataList) { + if (this.item.dataList.length > 0) { + newRes = res.filter(item => { + return !this.item.dataList.includes(item.pysclQtyId); + }); + res = newRes; } - ] + } + this.setModalGridData({ modalKey: this.myModalKey, gridKey: this.grid_01, diff --git a/components/common/modal/EqpmBaseInfoPop.vue b/components/common/modal/EqpmBaseInfoPop.vue index c885c7e..3364341 100644 --- a/components/common/modal/EqpmBaseInfoPop.vue +++ b/components/common/modal/EqpmBaseInfoPop.vue @@ -2,12 +2,8 @@ @@ -30,9 +26,9 @@
-
- 확인 - 닫기 + 닫기 + 확인 + @@ -274,36 +270,30 @@ export default { this.gridInit(); }, async setSelectValueList01() { - // let res = await this.postApiReturn({ - // apiKey: 'selectEqpmGrpCodeList', - // resKey: 'eqpmGrpCodeLists', - // sendParam: { eqpmKindId: this.searchParam.eqpmKindId }, - // // 부모 페이지에서 설비종류인 eqpmKindId 값을 꼭 가져와야한다. - // }); - // if (res.length > 0) { - // this.selectValueList01 = await res.map(obj => { - // return { - // text: obj.eqpmGrpNm, - // value: obj.eqpmGrpId, - // }; - // }); - // // 부모 페이지에서 설비그룹을 선택한 값이 있다면(eqpmGrpId) 그 값으로 바인딩 아닐 경우 조회한 데이터의 첫번째 값으로 선택 - // this.selectValue01 = - // this.searchParam.eqpmGrpId != undefined - // ? this.searchParam.eqpmGrpId - // : this.selectValueList01[0].value; - // // this.selectValue01 = this.selectValueList01[0].value; - // } else { - // this.selectValueList01 = []; - // this.selectValue01 = null; - // } + let res = await this.postApiReturn({ + apiKey: 'selectEqpmGrpCodeList', + resKey: 'eqpmGrpCodeLists', + sendParam: { eqpmKindId: this.searchParam.eqpmKindId }, + // 부모 페이지에서 설비종류인 eqpmKindId 값을 꼭 가져와야한다. + }); + if (res.length > 0) { + this.selectValueList01 = await res.map(obj => { + return { + text: obj.eqpmGrpNm, + value: obj.eqpmGrpId, + }; + }); + // 부모 페이지에서 설비그룹을 선택한 값이 있다면(eqpmGrpId) 그 값으로 바인딩 아닐 경우 조회한 데이터의 첫번째 값으로 선택 + this.selectValue01 = + this.searchParam.eqpmGrpId != undefined + ? this.searchParam.eqpmGrpId + : this.selectValueList01[0].value; + // this.selectValue01 = this.selectValueList01[0].value; + } else { + this.selectValueList01 = []; + this.selectValue01 = null; + } - this.selectValueList01 = [ - { label: '냉동기고온', value: '냉동기고온' }, - { label: '냉동기저온', value: '냉동기저온' }, - { label: '공조기', value: '공조기' }, - { label: '보일러', value: '보일러' } - ]; }, search() { this.getGridData(); @@ -341,34 +331,26 @@ export default { }, async getGridData() { this.loadGrid = false; - // let res = []; - // let res = await this.postApiReturn({ - // apiKey: 'selectEqpmBaseInfoPop', - // resKey: 'epqmBaseInfoData', - // sendParam: { - // eqpmGrpId: this.selectValue01, - // searchWord: this.searchWord, - // // openMode : this.item.openMode == undefined ? this.openMode : this.item.openMode - // }, - // }); - // // grid와 popup eqpmId 값 중복되는 것 제거하는 로직 - 시작 - // let newRes = []; - // if (this.bindingGridEqpmIdList.length > 0) { - // newRes = res.filter(item => { - // return !this.bindingGridEqpmIdList.includes(item.eqpmId); - // }); - // res = newRes; - // } + + let res = await this.postApiReturn({ + apiKey: 'selectEqpmBaseInfoPop', + resKey: 'epqmBaseInfoData', + sendParam: { + eqpmGrpId: this.selectValue01, + searchWord: this.searchWord, + // openMode : this.item.openMode == undefined ? this.openMode : this.item.openMode + }, + }); + // grid와 popup eqpmId 값 중복되는 것 제거하는 로직 - 시작 + let newRes = []; + if (this.bindingGridEqpmIdList.length > 0) { + newRes = res.filter(item => { + return !this.bindingGridEqpmIdList.includes(item.eqpmId); + }); + res = newRes; + } // grid와 popup eqpmId 값 중복되는 것 제거하는 로직 - 끝 - const res = [ - { - 'eqpmId': 'PYSCL00001', - 'eqpmNm': 'AMP_1A', - - } - ] - this.setModalGridData({ modalKey: this.myModalKey, gridKey: this.gridName, @@ -441,9 +423,9 @@ export default { // this.dialog = false; // return; // } - // if (this.myBindingData.length <= 0) { - // return alert('설비상세 리스트를 먼저 선택해주세요.'); - // } + if (this.myBindingData.length <= 0) { + return alert('설비상세 리스트를 먼저 선택해주세요.'); + } this.dialog = !val; }, }, @@ -481,7 +463,7 @@ var eqpmBaseInfoPop = { // .v-dialog { // .v-card { // &__title { - + // @if $theme ==dark { // background-color: #2d3355; diff --git a/components/common/modal/EqpmCalcPop.vue b/components/common/modal/EqpmCalcPop.vue index 80fca18..3029819 100644 --- a/components/common/modal/EqpmCalcPop.vue +++ b/components/common/modal/EqpmCalcPop.vue @@ -36,7 +36,7 @@ 계산설명 - + - + 조회 - 확인 - 닫기 + 닫기 + 확인 @@ -306,38 +304,22 @@ export default { }, async getGridData() { this.loadGrid = false; - // let res = await this.postApiReturn({ - // apiKey: 'selectEqpmCalcPop', - // resKey: 'eqpmCalcPopData', - // sendParam: { - // calcDescLike: this.searchWord, - // openMode: this.item.openMode != undefined ? this.item.openMode : this.openMode - // }, - // }); - // if (this.myBindingData['calcProc'] != '' || this.myBindingData['calcProc'] != null || this.myBindingData['calcProc'] != undefined) { - // let newRes = []; - // newRes = res.filter(item => { - // return item.calcProc != this.myBindingData['calcProc'] - // }); - // res = newRes; - // } - - const res = [ - { - 'calcProc': 'AVG_CNT2', - 'argCnt': '2', - 'calcDesc': '두개 변수에 대한 평균' - + let res = await this.postApiReturn({ + apiKey: 'selectEqpmCalcPop', + resKey: 'eqpmCalcPopData', + sendParam: { + calcDescLike: this.searchWord, + openMode: this.item.openMode != undefined ? this.item.openMode : this.openMode }, - - { 'calcProc': 'PROC001', argCnt: 2, 'calcDesc': '덧셈 연산' }, - { 'calcProc': 'PROC002', argCnt: 1, 'calcDesc': '제곱 연산' }, - { 'calcProc': 'PROC003', argCnt: 2, 'calcDesc': '곱셈 연산' }, - { 'calcProc': 'PROC004', argCnt: 1, 'calcDesc': '루트 연산' }, - { 'calcProc': 'PROC005', argCnt: 3, 'calcDesc': '최대값 계산' }, - { 'calcProc': 'PROC006', argCnt: 3, 'calcDesc': '최소값 계산' }, - - ] + }); + if (this.myBindingData['calcProc'] != '' || this.myBindingData['calcProc'] != null || this.myBindingData['calcProc'] != undefined) { + let newRes = []; + newRes = res.filter(item => { + return item.calcProc != this.myBindingData['calcProc'] + }); + res = newRes; + } + this.setModalGridData({ modalKey: this.myModalKey, gridKey: this.grid_01, diff --git a/pages/ems/base/EffcIdxMngPage.vue b/pages/ems/base/EffcIdxMngPage.vue index a20abd3..62f2855 100644 --- a/pages/ems/base/EffcIdxMngPage.vue +++ b/pages/ems/base/EffcIdxMngPage.vue @@ -16,8 +16,8 @@
- - + +
효율지표 리스트 @@ -32,7 +32,7 @@
- + 효율지표 상세 diff --git a/pages/ems/base/EqpmGrpPysclQtyMngPage.vue b/pages/ems/base/EqpmGrpPysclQtyMngPage.vue index 8f0364c..c10abb3 100644 --- a/pages/ems/base/EqpmGrpPysclQtyMngPage.vue +++ b/pages/ems/base/EqpmGrpPysclQtyMngPage.vue @@ -29,10 +29,10 @@
- - + + - + 물리량 리스트 + :preventFocusChangeEventTargetGridList="editingGridList" /> - + 물리량 상세 @@ -136,7 +136,7 @@
+ :parentPrgmId="myPrgmId" @getRowsData="getRowData2" />
@@ -223,7 +223,7 @@ export default { formatterSelectList01: [], formatterSelectList02: [], - loadGrid: true, + loadGrid: false, dataPathExample: { "rowGrid": { data: [ @@ -279,59 +279,7 @@ export default { } }, - dataPathExample2: { - "rowGrid2": { - data: - [ - { - "argSeq": "1", - "argPysclQtyId": "001", - "eqpmGrpId": "EQPM-GRP-A", - "pysclQtyCd": "TEMP001" - }, - { - "argSeq": "2", - "argPysclQtyId": "002", - "eqpmGrpId": "EQPM-GRP-B", - "pysclQtyCd": "PRESS001" - }, - { - "argSeq": "3", - "argPysclQtyId": "003", - "eqpmGrpId": "EQPM-GRP-C", - "pysclQtyCd": "FLOW001" - }, - { - "argSeq": "4", - "argPysclQtyId": "004", - "eqpmGrpId": "EQPM-GRP-D", - "pysclQtyCd": "HUMID001" - }, - { - "argSeq": "5", - "argPysclQtyId": "005", - "eqpmGrpId": "EQPM-GRP-E", - "pysclQtyCd": "VOLT001" - } - ] - - - , - column: [ - { header: '순번', name: 'argSeq', editor: 'text' }, - { header: '물리량 ID', name: 'argPysclQtyId' }, - { - header: '설비그룹', - name: 'eqpmGrpId', - - }, - { header: '물리량 코드', name: 'pysclQtyCd' }, - - ], - - } - }, - loadGrid2: true, + loadGrid2: false, detailList: myDetail, readOnlyValueList: [ @@ -1001,6 +949,10 @@ export default { columnOptions: { resizable: true, }, + header: { + height: 37, + }, + rowHeight: 'auto', }; this.setGridOption({ @@ -1066,6 +1018,10 @@ export default { columnOptions: { resizable: true, }, + header: { + height: 37, + }, + rowHeight: 'auto', }; this.setGridOption({ diff --git a/pages/ems/base/GdIdxMngPage.vue b/pages/ems/base/GdIdxMngPage.vue index c4e36e5..b47d272 100644 --- a/pages/ems/base/GdIdxMngPage.vue +++ b/pages/ems/base/GdIdxMngPage.vue @@ -37,11 +37,11 @@ :btnActionsFnc="btnActions" />
-
+
-
+
@@ -112,7 +112,7 @@ export default { myPrgmId: myPrgmId, initedFlag: false, gridName: 'rowGrid', - loadGrid: true, + loadGrid: false, detailList: myDetail, selectValue01: null, selectValueList01: [], @@ -125,102 +125,102 @@ export default { // pysclQtyId3 : null, // pysclQtyId4 : null // } - dataPathExample: { - "rowGrid": { - data: [ + // dataPathExample: { + // "rowGrid": { + // data: [ - { - gdIdxId: 'GD001', - gdIdxNm: '온도 가이드', - eqpmGrpId: 'EQ001', - upTotMeth: 'AVG', - careStndVal: 50, - warnStndVal: 70, - alrmMsg: '온도가 기준치를 초과했습니다.', - }, - { - gdIdxId: 'GD002', - gdIdxNm: '습도 가이드', - eqpmGrpId: 'EQ002', - upTotMeth: 'MAX', - careStndVal: 30, - warnStndVal: 60, - alrmMsg: '습도가 기준치를 초과했습니다.', - }, - { - gdIdxId: 'GD003', - gdIdxNm: '압력 가이드', - eqpmGrpId: 'EQ003', - upTotMeth: 'SUM', - careStndVal: 100, - warnStndVal: 150, - alrmMsg: '압력이 기준치를 초과했습니다.', - } + // { + // gdIdxId: 'GD001', + // gdIdxNm: '온도 가이드', + // eqpmGrpId: 'EQ001', + // upTotMeth: 'AVG', + // careStndVal: 50, + // warnStndVal: 70, + // alrmMsg: '온도가 기준치를 초과했습니다.', + // }, + // { + // gdIdxId: 'GD002', + // gdIdxNm: '습도 가이드', + // eqpmGrpId: 'EQ002', + // upTotMeth: 'MAX', + // careStndVal: 30, + // warnStndVal: 60, + // alrmMsg: '습도가 기준치를 초과했습니다.', + // }, + // { + // gdIdxId: 'GD003', + // gdIdxNm: '압력 가이드', + // eqpmGrpId: 'EQ003', + // upTotMeth: 'SUM', + // careStndVal: 100, + // warnStndVal: 150, + // alrmMsg: '압력이 기준치를 초과했습니다.', + // } - ], - column: [ - { - header: '가이드', - name: 'gdIdxId', - width: 100, - align: 'center', - }, - { - header: '가이드명', - name: 'gdIdxNm', - width: 210, - align: 'left', - }, - { - header: '설비그룹ID', - name: 'eqpmGrpId', - width: 100, - align: 'center', - // formatter({ value }) { - // let retVal = ''; - // const newValue = _this.pageData.eqpmGrpList.filter(item => item.value == value); - // if (newValue.length > 0) { - // retVal = newValue[0].text; - // } - // return retVal; - // }, - }, - { - header: '상위집계방법', - name: 'upTotMeth', - width: 100, - align: 'center', - // formatter({ value }) { - // let retVal = ''; - // const newValue = _this.pageData.upTotMethList.filter(item => item.commCd == value); - // if (newValue.length > 0) { - // retVal = newValue[0].commCdNm; - // } - // return retVal; - // }, - }, - { - header: '주의기준', - name: 'careStndVal', - width: 100, - align: 'right', - }, - { - header: '경고기준', - name: 'warnStndVal', - width: 100, - align: 'right', - }, - { - header: '알람메세지', - name: 'alrmMsg', - minWidth: 860, - align: 'left', - } - ] + // ], + // column: [ + // { + // header: '가이드', + // name: 'gdIdxId', + // width: 100, + // align: 'center', + // }, + // { + // header: '가이드명', + // name: 'gdIdxNm', + // width: 210, + // align: 'left', + // }, + // { + // header: '설비그룹ID', + // name: 'eqpmGrpId', + // width: 100, + // align: 'center', + // // formatter({ value }) { + // // let retVal = ''; + // // const newValue = _this.pageData.eqpmGrpList.filter(item => item.value == value); + // // if (newValue.length > 0) { + // // retVal = newValue[0].text; + // // } + // // return retVal; + // // }, + // }, + // { + // header: '상위집계방법', + // name: 'upTotMeth', + // width: 100, + // align: 'center', + // // formatter({ value }) { + // // let retVal = ''; + // // const newValue = _this.pageData.upTotMethList.filter(item => item.commCd == value); + // // if (newValue.length > 0) { + // // retVal = newValue[0].commCdNm; + // // } + // // return retVal; + // // }, + // }, + // { + // header: '주의기준', + // name: 'careStndVal', + // width: 100, + // align: 'right', + // }, + // { + // header: '경고기준', + // name: 'warnStndVal', + // width: 100, + // align: 'right', + // }, + // { + // header: '알람메세지', + // name: 'alrmMsg', + // minWidth: 860, + // align: 'left', + // } + // ] - } - } + // } + // } }; }, computed: { @@ -352,60 +352,46 @@ export default { }); }, async getEqpmKind() { - // let res = await this.postApiReturn({ - // apiKey: 'selectEqpmKindCodeList', - // resKey: 'eqpmKindCodeLists', - // sendParam: {}, - // }); - // if (res.length > 0) { - // this.selectValueList01 = await res.map(item => { - // return { - // text: item.eqpmKindNm, - // value: item.eqpmKindId, - // }; - // }); - // this.selectValue01 = this.selectValueList01[0].value; - // } else { - // this.selectValueList01 = []; - // this.selectValue01 = null; - // } - - this.selectValueList01 = [ - { label: 'Etcher', value: 'EQK001' }, - { label: 'Deposition', value: 'EQK002' }, - { label: 'Inspection', value: 'EQK003' }, - ]; - - this.selectValue01 = 'EQK001'; + let res = await this.postApiReturn({ + apiKey: 'selectEqpmKindCodeList', + resKey: 'eqpmKindCodeLists', + sendParam: {}, + }); + if (res.length > 0) { + this.selectValueList01 = await res.map(item => { + return { + text: item.eqpmKindNm, + value: item.eqpmKindId, + }; + }); + this.selectValue01 = this.selectValueList01[0].value; + } else { + this.selectValueList01 = []; + this.selectValue01 = null; + } this.setPageData({ eqpmKindList: this.selectValueList01, eqpmKindId: this.selectValue01, }); }, async getEqpmGrp() { - // let res = await this.postApiReturn({ - // apiKey: 'selectEqpmGrpCodeList', - // resKey: 'eqpmGrpCodeLists', - // sendParam: { eqpmKindId: this.selectValue01 }, - // }); - // if (res.length > 0) { - // this.selectValueList02 = await res.map(item => { - // return { - // text: item.eqpmGrpNm, - // value: item.eqpmGrpId, - // }; - // }); - // this.selectValue02 = this.selectValueList02[0].value; - // } else { - // this.selectValueList02 = []; - // this.selectValue02 = null; - // } - this.selectValueList02 = [ - { label: '냉동기고온', value: '냉동기고온' }, - { label: '냉동기저온', value: '냉동기저온' }, - { label: '공조기', value: '공조기' }, - { label: '보일러', value: '보일러' } - ]; + let res = await this.postApiReturn({ + apiKey: 'selectEqpmGrpCodeList', + resKey: 'eqpmGrpCodeLists', + sendParam: { eqpmKindId: this.selectValue01 }, + }); + if (res.length > 0) { + this.selectValueList02 = await res.map(item => { + return { + text: item.eqpmGrpNm, + value: item.eqpmGrpId, + }; + }); + this.selectValue02 = this.selectValueList02[0].value; + } else { + this.selectValueList02 = []; + this.selectValue02 = null; + } this.setPageData({ eqpmGrpList: this.selectValueList02, @@ -419,6 +405,10 @@ export default { columnOptions: { resizable: true, }, + header: { + height: 37, + }, + rowHeight: 'auto', }; this.setGridOption({ gridKey: this.gridName, @@ -636,100 +626,100 @@ export default { async getRowGridData() { this.loadGrid = false; let res = []; - const newRes = [ - { - comId: 'COM001', - gdIdxId: 'GD001', - gdIdxNm: '온도 가이드', - eqpmGrpId: 'EQ001', - upTotMeth: 'AVG', - sortSeq: 1, - pysclQtyId1: 'TEMP', - pysclQtyId2: null, - pysclQtyId3: null, - pysclQtyId4: null, - ctgr1: '환경', - ctgr2: '내부', - careStndVal: 50, - warnStndVal: 70, - gdMeth: '자동', - useFg: '1', - alrmMsg: '온도가 기준치를 초과했습니다.', - calcProc: 'PROC001', - calcDesc: '평균 계산', - calcMeth: '(A+B)/2', - unit: 'C', - argCnt: 2, - rowStat: null, - }, - { - comId: 'COM002', - gdIdxId: 'GD002', - gdIdxNm: '습도 가이드', - eqpmGrpId: 'EQ002', - upTotMeth: 'MAX', - sortSeq: 2, - pysclQtyId1: 'HUMID', - pysclQtyId2: null, - pysclQtyId3: null, - pysclQtyId4: null, - ctgr1: '환경', - ctgr2: '외부', - careStndVal: 30, - warnStndVal: 60, - gdMeth: '수동', - useFg: '0', - alrmMsg: '습도가 기준치를 초과했습니다.', - calcProc: 'PROC002', - calcDesc: '최대값 계산', - calcMeth: 'MAX(A,B)', - unit: '%', - argCnt: 2, - rowStat: null, - }, - ]; - - // res = await this.postApiReturn({ - // apiKey: 'selectEqpmGdIdxDataList', - // resKey: 'eqpmGdIdxDataList', - // sendParam: { - // eqpmGrpId: this.selectValue02, - // gdIdxNmLike: this.pageData.gdIdxNm, - // }, - // }); - // const newRes = res.map(item => { - // const newObj = { - // ...item, + // const newRes = [ + // { + // comId: 'COM001', + // gdIdxId: 'GD001', + // gdIdxNm: '온도 가이드', + // eqpmGrpId: 'EQ001', + // upTotMeth: 'AVG', + // sortSeq: 1, + // pysclQtyId1: 'TEMP', + // pysclQtyId2: null, + // pysclQtyId3: null, + // pysclQtyId4: null, + // ctgr1: '환경', + // ctgr2: '내부', + // careStndVal: 50, + // warnStndVal: 70, + // gdMeth: '자동', + // useFg: '1', + // alrmMsg: '온도가 기준치를 초과했습니다.', + // calcProc: 'PROC001', + // calcDesc: '평균 계산', + // calcMeth: '(A+B)/2', + // unit: 'C', + // argCnt: 2, // rowStat: null, - // }; - // return newObj; - // }); + // }, + // { + // comId: 'COM002', + // gdIdxId: 'GD002', + // gdIdxNm: '습도 가이드', + // eqpmGrpId: 'EQ002', + // upTotMeth: 'MAX', + // sortSeq: 2, + // pysclQtyId1: 'HUMID', + // pysclQtyId2: null, + // pysclQtyId3: null, + // pysclQtyId4: null, + // ctgr1: '환경', + // ctgr2: '외부', + // careStndVal: 30, + // warnStndVal: 60, + // gdMeth: '수동', + // useFg: '0', + // alrmMsg: '습도가 기준치를 초과했습니다.', + // calcProc: 'PROC002', + // calcDesc: '최대값 계산', + // calcMeth: 'MAX(A,B)', + // unit: '%', + // argCnt: 2, + // rowStat: null, + // }, + // ]; + + res = await this.postApiReturn({ + apiKey: 'selectEqpmGdIdxDataList', + resKey: 'eqpmGdIdxDataList', + sendParam: { + eqpmGrpId: this.selectValue02, + gdIdxNmLike: this.pageData.gdIdxNm, + }, + }); + const newRes = res.map(item => { + const newObj = { + ...item, + rowStat: null, + }; + return newObj; + }); this.setGridData({ gridKey: this.gridName, value: newRes, }); //this.loadGrid = true; - // this.$nextTick(() => { - // if (newRes.length > 0) { - // try { - // this.$refs[this.gridName].focus({ - // //rowKey: 0, - // rowKey: - // this.pageData.rowGridSelectKey == '' || - // this.pageData.rowGridSelectKey == null - // ? 0 - // : this.pageData.rowGridSelectKey == - // this.$refs[this.gridName].getData().length - 1 - // ? this.pageData.rowGridSelectKey - // : 0, - // columnName: 'gdIdxId', - // setScroll: true, - // }); - // } catch (error) { } - // } else { - // this.detailDataInit(); - // } - // }); + this.$nextTick(() => { + if (newRes.length > 0) { + try { + this.$refs[this.gridName].focus({ + //rowKey: 0, + rowKey: + this.pageData.rowGridSelectKey == '' || + this.pageData.rowGridSelectKey == null + ? 0 + : this.pageData.rowGridSelectKey == + this.$refs[this.gridName].getData().length - 1 + ? this.pageData.rowGridSelectKey + : 0, + columnName: 'gdIdxId', + setScroll: true, + }); + } catch (error) { } + } else { + this.detailDataInit(); + } + }); this.loadGrid = true; }, async getRowData(data) { diff --git a/pages/ems/base/GdStndMngPage.vue b/pages/ems/base/GdStndMngPage.vue index db727c9..bc638f9 100644 --- a/pages/ems/base/GdStndMngPage.vue +++ b/pages/ems/base/GdStndMngPage.vue @@ -29,7 +29,7 @@ - + @@ -115,8 +115,8 @@ - - + +
설비상세 리스트 @@ -126,12 +126,12 @@
+ />
- +
설비가이드 기준 정보 @@ -201,7 +201,7 @@ export default { readonlyFg: true, initedFlag: false, gridName: 'rowGrid', - loadGrid: true, + loadGrid: false, detailList: myDetail, selectValue01: null, selectValueList01: [], @@ -209,62 +209,62 @@ export default { selectValueList02: [], selectValue03: null, selectValueList03: [], - dataPathExample: { - "rowGrid": { - data: [ + // dataPathExample: { + // "rowGrid": { + // data: [ - { - eqpmId: 'EQ001', - originEqpmId: 'ORIG001', - eqpmNm: '냉각기 A', - careStndVal: 75, - warnStndVal: 90, - }, - { - eqpmId: 'EQ002', - originEqpmId: 'ORIG002', - eqpmNm: '펌프 B', - careStndVal: 60, - warnStndVal: 80, - }, - { - eqpmId: 'EQ003', - originEqpmId: 'ORIG003', - eqpmNm: '모터 C', - careStndVal: 50, - warnStndVal: 70, - }, - { - eqpmId: 'EQ004', - originEqpmId: 'ORIG004', - eqpmNm: '밸브 D', - careStndVal: 65, - warnStndVal: 85, - }, - { - eqpmId: 'EQ005', - originEqpmId: 'ORIG005', - eqpmNm: '컨트롤러 E', - careStndVal: 55, - warnStndVal: 75, - }, + // { + // eqpmId: 'EQ001', + // originEqpmId: 'ORIG001', + // eqpmNm: '냉각기 A', + // careStndVal: 75, + // warnStndVal: 90, + // }, + // { + // eqpmId: 'EQ002', + // originEqpmId: 'ORIG002', + // eqpmNm: '펌프 B', + // careStndVal: 60, + // warnStndVal: 80, + // }, + // { + // eqpmId: 'EQ003', + // originEqpmId: 'ORIG003', + // eqpmNm: '모터 C', + // careStndVal: 50, + // warnStndVal: 70, + // }, + // { + // eqpmId: 'EQ004', + // originEqpmId: 'ORIG004', + // eqpmNm: '밸브 D', + // careStndVal: 65, + // warnStndVal: 85, + // }, + // { + // eqpmId: 'EQ005', + // originEqpmId: 'ORIG005', + // eqpmNm: '컨트롤러 E', + // careStndVal: 55, + // warnStndVal: 75, + // }, - ], - column: [ - { header: '설비', name: 'eqpmId', align: 'left' }, - { - header: 'origin설비', - name: 'originEqpmId', - align: 'center', - hidden: true, - }, - { header: '설비명', name: 'eqpmNm', align: 'left' }, - { header: '주의기준', name: 'careStndVal', align: 'right' }, - { header: '심각기준', name: 'warnStndVal', align: 'right' }, - ] + // ], + // column: [ + // { header: '설비', name: 'eqpmId', align: 'left' }, + // { + // header: 'origin설비', + // name: 'originEqpmId', + // align: 'center', + // hidden: true, + // }, + // { header: '설비명', name: 'eqpmNm', align: 'left' }, + // { header: '주의기준', name: 'careStndVal', align: 'right' }, + // { header: '심각기준', name: 'warnStndVal', align: 'right' }, + // ] - } - } + // } + // } }; }, computed: { @@ -408,6 +408,10 @@ export default { columnOptions: { resizable: true, }, + header: { + height: 37, + }, + rowHeight: 'auto', }; this.setGridOption({ gridKey: this.gridName, @@ -511,69 +515,69 @@ export default { this.loadGrid = false; let res = []; - // if (this.selectValue01 && this.selectValue02 && this.selectValue03) { - // res = await this.postApiReturn({ - // apiKey: 'selectEqpmGdDetl', - // resKey: 'eqpmGdDetlData', - // sendParam: { - // gdIdxId: this.selectValue03, - // }, - // }); - // } + if (this.selectValue01 && this.selectValue02 && this.selectValue03) { + res = await this.postApiReturn({ + apiKey: 'selectEqpmGdDetl', + resKey: 'eqpmGdDetlData', + sendParam: { + gdIdxId: this.selectValue03, + }, + }); + } - // // grid에서 eqpmId를 기억해서 popup에서 중복되는 값을 제거하는데 사용하기위해 저장 - 시작 - // let eqpmIdList = res.map(item => { - // return item.eqpmId; - // }); - // this.setPageData({ nowGridEqpmIdList: eqpmIdList }); - // // grid에서 eqpmId를 기억해서 popup에서 중복되는 값을 제거하는데 사용하기위해 저장 - 끝 - // const newRes = res.map(item => { - // const newObj = { - // ...item, - // rowStat: null, - // }; - // return newObj; - // }); - const newRes = [ + // grid에서 eqpmId를 기억해서 popup에서 중복되는 값을 제거하는데 사용하기위해 저장 - 시작 + let eqpmIdList = res.map(item => { + return item.eqpmId; + }); + this.setPageData({ nowGridEqpmIdList: eqpmIdList }); + // grid에서 eqpmId를 기억해서 popup에서 중복되는 값을 제거하는데 사용하기위해 저장 - 끝 + const newRes = res.map(item => { + const newObj = { + ...item, + rowStat: null, + }; + return newObj; + }); + // const newRes = [ - { - eqpmId: 'EQ001', - originEqpmId: 'ORIG001', - eqpmNm: '냉각기 A', - careStndVal: 75, - warnStndVal: 90, - }, - { - eqpmId: 'EQ002', - originEqpmId: 'ORIG002', - eqpmNm: '펌프 B', - careStndVal: 60, - warnStndVal: 80, - }, - { - eqpmId: 'EQ003', - originEqpmId: 'ORIG003', - eqpmNm: '모터 C', - careStndVal: 50, - warnStndVal: 70, - }, - { - eqpmId: 'EQ004', - originEqpmId: 'ORIG004', - eqpmNm: '밸브 D', - careStndVal: 65, - warnStndVal: 85, - }, - { - eqpmId: 'EQ005', - originEqpmId: 'ORIG005', - eqpmNm: '컨트롤러 E', - careStndVal: 55, - warnStndVal: 75, - }, + // { + // eqpmId: 'EQ001', + // originEqpmId: 'ORIG001', + // eqpmNm: '냉각기 A', + // careStndVal: 75, + // warnStndVal: 90, + // }, + // { + // eqpmId: 'EQ002', + // originEqpmId: 'ORIG002', + // eqpmNm: '펌프 B', + // careStndVal: 60, + // warnStndVal: 80, + // }, + // { + // eqpmId: 'EQ003', + // originEqpmId: 'ORIG003', + // eqpmNm: '모터 C', + // careStndVal: 50, + // warnStndVal: 70, + // }, + // { + // eqpmId: 'EQ004', + // originEqpmId: 'ORIG004', + // eqpmNm: '밸브 D', + // careStndVal: 65, + // warnStndVal: 85, + // }, + // { + // eqpmId: 'EQ005', + // originEqpmId: 'ORIG005', + // eqpmNm: '컨트롤러 E', + // careStndVal: 55, + // warnStndVal: 75, + // }, - ] + // ] this.setGridData({ gridKey: this.gridName, value: newRes,