fixing registy
This commit is contained in:
parent
3666cd61a9
commit
96a1722435
5 changed files with 22 additions and 11 deletions
|
|
@ -352,9 +352,13 @@ watch(
|
|||
class="text-weight-medium"
|
||||
>
|
||||
{{
|
||||
`${props.row.prefix ? props.row.prefix : ""}${
|
||||
props.row.firstName
|
||||
} ${props.row.lastName}`
|
||||
`${
|
||||
props.row.rank
|
||||
? props.row.rank
|
||||
: props.row.prefix
|
||||
? props.row.prefix
|
||||
: ""
|
||||
}${props.row.firstName} ${props.row.lastName}`
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
|
|
@ -367,9 +371,13 @@ watch(
|
|||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
{{
|
||||
`${props.row.prefix ? props.row.prefix : ""}${
|
||||
props.row.firstName
|
||||
} ${props.row.lastName}`
|
||||
`${
|
||||
props.row.rank
|
||||
? props.row.rank
|
||||
: props.row.prefix
|
||||
? props.row.prefix
|
||||
: ""
|
||||
}${props.row.firstName} ${props.row.lastName}`
|
||||
}}
|
||||
<q-icon name="mdi-open-in-new" size="xs"></q-icon>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ interface FormFilter {
|
|||
pageSize: number;
|
||||
keyword: string;
|
||||
type: string;
|
||||
searchType?: string;
|
||||
posType: string;
|
||||
posLevel: string;
|
||||
retireYear: string | null;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ interface DataPerson {
|
|||
posTypeId: string;
|
||||
position: string;
|
||||
prefix: string;
|
||||
rank?: string;
|
||||
}
|
||||
|
||||
export type { DataType, DataLevel, DataPerson };
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
|||
isAll: true,
|
||||
nodeId: null,
|
||||
node: null,
|
||||
searchType: "fullName",
|
||||
});
|
||||
|
||||
const labelOption = reactive({
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const isShowFilter = ref<boolean>(true);
|
|||
const isShowBtnFilter = ref<boolean>(false);
|
||||
const empType = ref<string>("officer"); // officer / employee / perm
|
||||
|
||||
const searchType = ref<string>("fullName");
|
||||
// const searchType = ref<string>("fullName");
|
||||
const node = ref<any>([]);
|
||||
const expanded = ref<any>([]);
|
||||
const maxPage = ref<number>(1);
|
||||
|
|
@ -117,7 +117,7 @@ function fetchDataPerson() {
|
|||
|
||||
if (store.formFilter.keyword) {
|
||||
queryParams = Object.assign({}, queryParams, {
|
||||
searchField: searchType.value,
|
||||
searchField: store.formFilter.searchType,
|
||||
searchKeyword: store.formFilter.keyword,
|
||||
});
|
||||
}
|
||||
|
|
@ -264,9 +264,9 @@ async function selectType() {
|
|||
empType.value === "officer"
|
||||
? "เลือกหน่วยงาน/ส่วนราชการ"
|
||||
: "เลือกหน่วยงาน";
|
||||
store.formFilter.searchType = "fullName";
|
||||
} else {
|
||||
// แต่ถ้าประเภทเดิมระบบจะใช้ filter เดิมที่เคยค้นหาไว้
|
||||
|
||||
if (
|
||||
store.formFilter.keyword != "" ||
|
||||
store.labelOption.posType != "ทั้งหมด" ||
|
||||
|
|
@ -391,7 +391,7 @@ onMounted(async () => {
|
|||
<q-select
|
||||
borderless
|
||||
bg-color="white"
|
||||
v-model="searchType"
|
||||
v-model="store.formFilter.searchType"
|
||||
:options="store.searchTypeOption"
|
||||
emit-value
|
||||
dense
|
||||
|
|
@ -572,7 +572,7 @@ onMounted(async () => {
|
|||
inset
|
||||
vertical
|
||||
class="lineFil"
|
||||
v-if="empType !== 'officer'"
|
||||
v-if="empType !== 'officer' && store.formFilter.nodeId"
|
||||
/>
|
||||
|
||||
<q-toggle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue