feat: 세력장수 장수명, 아이콘 클릭시 감찰부
This commit is contained in:
@@ -133,7 +133,7 @@ $showGeneral = General::createGeneralObjFromDB($gen);
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<form name=form1 method=post>
|
<form name=form1 method=get>
|
||||||
정렬순서 :
|
정렬순서 :
|
||||||
<select name='query_type' size=1>
|
<select name='query_type' size=1>
|
||||||
<?php foreach ($queryMap as $queryType => [$queryTypeText,]) : ?>
|
<?php foreach ($queryMap as $queryType => [$queryTypeText,]) : ?>
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
:toolbarID="toolbarID"
|
:toolbarID="toolbarID"
|
||||||
role="pageNationGeneral"
|
role="pageNationGeneral"
|
||||||
:height="'fill'"
|
:height="'fill'"
|
||||||
|
:availableGeneralClick="true"
|
||||||
|
@generalClick="openBattleCenter"
|
||||||
/>
|
/>
|
||||||
<!--<BottomBar />-->
|
<!--<BottomBar />-->
|
||||||
</BContainer>
|
</BContainer>
|
||||||
@@ -93,6 +95,10 @@ async function reload() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openBattleCenter(generalID: number){
|
||||||
|
window.open(`b_battleCenter.php?gen=${generalID}`)
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await reload();
|
await reload();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -69,6 +69,7 @@
|
|||||||
:defaultColDef="defaultColDef"
|
:defaultColDef="defaultColDef"
|
||||||
:suppressColumnMoveAnimation="suppressColumnMoveAnimation"
|
:suppressColumnMoveAnimation="suppressColumnMoveAnimation"
|
||||||
@grid-ready="onGridReady"
|
@grid-ready="onGridReady"
|
||||||
|
@cell-clicked="onCellClicked"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -89,6 +90,7 @@ import type {
|
|||||||
GridApi,
|
GridApi,
|
||||||
GridReadyEvent,
|
GridReadyEvent,
|
||||||
RowNode,
|
RowNode,
|
||||||
|
CellClickedEvent,
|
||||||
} from "ag-grid-community";
|
} from "ag-grid-community";
|
||||||
import { ProvidedColumnGroup } from "ag-grid-community";
|
import { ProvidedColumnGroup } from "ag-grid-community";
|
||||||
import { getNpcColor } from "@/common_legacy";
|
import { getNpcColor } from "@/common_legacy";
|
||||||
@@ -133,8 +135,17 @@ const props = defineProps({
|
|||||||
required: false,
|
required: false,
|
||||||
default: "generic",
|
default: "generic",
|
||||||
},
|
},
|
||||||
|
availableGeneralClick: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'generalClick', generalID: number): void
|
||||||
|
}>();
|
||||||
|
|
||||||
const suppressColumnMoveAnimation = ref(true);
|
const suppressColumnMoveAnimation = ref(true);
|
||||||
const gameConstStore = unwrap(inject<Ref<GameConstStore>>("gameConstStore"));
|
const gameConstStore = unwrap(inject<Ref<GameConstStore>>("gameConstStore"));
|
||||||
|
|
||||||
@@ -314,6 +325,14 @@ function onGridReady(params: GridReadyEvent) {
|
|||||||
}, 1);
|
}, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onCellClicked(event: CellClickedEvent){
|
||||||
|
const colID = event.column.getColId();
|
||||||
|
if(colID === 'icon' || colID === 'name'){
|
||||||
|
const generalItem = event.data as GeneralListItem;
|
||||||
|
emit('generalClick', generalItem.no);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getRowHeight(): number {
|
function getRowHeight(): number {
|
||||||
return rowHeight.value;
|
return rowHeight.value;
|
||||||
}
|
}
|
||||||
@@ -503,7 +522,7 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
|
|||||||
return style as CellStyle;
|
return style as CellStyle;
|
||||||
},
|
},
|
||||||
filterValueGetter: ({ data }) => convertSearch초성(data.name),
|
filterValueGetter: ({ data }) => convertSearch초성(data.name),
|
||||||
cellClass: defaultCellClass,
|
cellClass: ['clickable-cell', ...defaultCellClass],
|
||||||
filter: true,
|
filter: true,
|
||||||
hide: false,
|
hide: false,
|
||||||
lockVisible: true,
|
lockVisible: true,
|
||||||
@@ -1056,6 +1075,10 @@ watch(columnRawDefs, (val) => {
|
|||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.component-general-list {
|
.component-general-list {
|
||||||
|
.clickable-cell:hover{
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
.ag-root-wrapper .cell-middle {
|
.ag-root-wrapper .cell-middle {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user