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