update screen 33, 44, 20, fix bug Grid
This commit is contained in:

parent
b4f8e41c7e
commit
9603353ab3
@ -4,14 +4,14 @@
|
||||
:data="chkGridData"
|
||||
:columns="chkGridColumns"
|
||||
:options="chkGridOptions"
|
||||
@mousedown="focusChangeEvt"
|
||||
@mousedown="onMousedown"
|
||||
@click="startEditing"
|
||||
@editingFinish="editingFinish"
|
||||
@dblclick="dblClick"
|
||||
@mouseover="mouseoverEvent"
|
||||
@mouseout="mouseoutEvent"
|
||||
@focusChange="focusChangeEvt"
|
||||
/>
|
||||
<!-- @focusChange="focusChangeEvt" -->
|
||||
</template>
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
@ -184,13 +184,13 @@ export default {
|
||||
}),
|
||||
// true : 현재 행 혹은 연결된 그리드가 수정중인 상태
|
||||
checkGridState() {
|
||||
var rowStatList = ['I', 'U', 'D'];
|
||||
var row = this.gridInstance.invoke('getFocusedCell');
|
||||
const rowStatList = ['I', 'U', 'D'];
|
||||
const row = this.gridInstance.invoke('getFocusedCell');
|
||||
|
||||
if (row) {
|
||||
var rowData = this.gridInstance.invoke('getRow', row.rowKey);
|
||||
const rowData = this.gridInstance.invoke('getRow', row.rowKey);
|
||||
if (rowData) {
|
||||
var rowStat = rowData['rowStat'];
|
||||
const rowStat = rowData['rowStat'];
|
||||
if (rowStatList.includes(rowStat)) {
|
||||
return true;
|
||||
}
|
||||
@ -198,8 +198,8 @@ export default {
|
||||
}
|
||||
|
||||
if (this.preventFocusChangeEventTargetGridList) {
|
||||
for (var gridInstance of this.preventFocusChangeEventTargetGridList) {
|
||||
var dataArr = gridInstance.save();
|
||||
for (let gridInstance of this.preventFocusChangeEventTargetGridList) {
|
||||
const dataArr = gridInstance.save();
|
||||
|
||||
if (dataArr.length > 0) {
|
||||
return true;
|
||||
@ -251,9 +251,11 @@ export default {
|
||||
this.gridInstance.invoke('check', rowData.rowKey, instance);
|
||||
},
|
||||
setSelectionRange(rowKey) {
|
||||
// console.log("------------------DEBUG-------setSelectionRange:", rowKey);
|
||||
const rowDatas = this.gridInstance.invoke('getData');
|
||||
rowDatas.forEach(item => {
|
||||
if (item.rowKey == rowKey) {
|
||||
// console.log("------------------DEBUG-------setSelectionRange---item:", item);
|
||||
this.gridInstance.invoke(
|
||||
'addRowClassName',
|
||||
item.rowKey,
|
||||
@ -268,6 +270,10 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
onMousedown(evt) {
|
||||
// console.log("------------------DEBUG-------onMousedown:", evt);
|
||||
this.focusChangeEvt(evt);
|
||||
},
|
||||
focusChangeEvt(e) {
|
||||
// console.log("------------------DEBUG-------focusChangeEvt:", e);
|
||||
// console.log('focusChangeEvt1...')
|
||||
@ -290,7 +296,7 @@ export default {
|
||||
this.sendSelectedRowData(e.rowKey);
|
||||
},
|
||||
startEditing(e) {
|
||||
// console.log("------------DEBUG-----startEditing----", e);
|
||||
// console.log("------------------DEBUG-------startEditing:", e);
|
||||
// console.log('startEditing1...')
|
||||
if (this.preventFocusChangeEvent(e)) {
|
||||
// console.log('prevent startEditing')
|
||||
@ -317,6 +323,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async editingFinish(e) {
|
||||
// console.log('------------------DEBUG-------editingFinish:', e);
|
||||
// console.log("Editing END E::", e);
|
||||
// editor 간 이동시 수정되는 문제 수정
|
||||
// e.rowEditingFg: grid의 한 row를 한번에 수정할 시 각각의 cell 마다 click 이벤트가 발생하지 않아 this.editorStartKey값이 제대로 입력 되지 않는 경우를 대비하여 만든 Fg
|
||||
@ -678,6 +685,7 @@ export default {
|
||||
? this.gridInstance.invoke('getFocusedCell').rowKey
|
||||
: eventRowKey;
|
||||
var rowData = this.gridInstance.invoke('getRow', rowKey);
|
||||
// console.log('------------------DEBUG-------sendSelectedRowData:', {eventRowKey, rowKey});
|
||||
this.$emit('sendSelectedRowStatInfo', rowData);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user