เเก้ฟิลเตอร์ส่วนราชการ
This commit is contained in:
parent
1a65afdebc
commit
c27a4a1c19
2 changed files with 7 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ import type {
|
||||||
import type { FormFilter } from "@/modules/04_registryPerson/interface/request/Main";
|
import type { FormFilter } from "@/modules/04_registryPerson/interface/request/Main";
|
||||||
|
|
||||||
export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||||
|
const routerName = ref<any>()
|
||||||
const searchTypeOption = ref<DataOption[]>([
|
const searchTypeOption = ref<DataOption[]>([
|
||||||
{ id: "fullName", name: "ชื่อ-นามสกุล" },
|
{ id: "fullName", name: "ชื่อ-นามสกุล" },
|
||||||
{ id: "citizenId", name: "เลขประจำตัวประชาชน" },
|
{ id: "citizenId", name: "เลขประจำตัวประชาชน" },
|
||||||
|
|
@ -163,5 +164,6 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||||
retireTypeEmpOps,
|
retireTypeEmpOps,
|
||||||
citizenId,
|
citizenId,
|
||||||
displayOrderOps,
|
displayOrderOps,
|
||||||
|
routerName
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -345,11 +345,14 @@ function clearSelect(t: string) {
|
||||||
*/
|
*/
|
||||||
async function fetchTree() {
|
async function fetchTree() {
|
||||||
const data = await fetchStructureTree(route.meta.Key as string);
|
const data = await fetchStructureTree(route.meta.Key as string);
|
||||||
|
if (store.routerName !== route.name) {
|
||||||
|
store.formFilter.node = null;
|
||||||
|
store.formFilter.nodeId = null;
|
||||||
|
store.routerName = route.name ? route.name : "";
|
||||||
|
}
|
||||||
if (data) {
|
if (data) {
|
||||||
isLoad.value = true;
|
isLoad.value = true;
|
||||||
node.value = data;
|
node.value = data;
|
||||||
store.formFilter.node = nodeData.node;
|
|
||||||
store.formFilter.nodeId = nodeData.nodeId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue