fix fetch StructrueTree
This commit is contained in:
parent
74fa0f664c
commit
e8c830454a
3 changed files with 59 additions and 17 deletions
|
|
@ -13,7 +13,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import avatar from "@/assets/avatar_user.jpg";
|
||||
import { useStructureTree } from "@/stores/structureTree";
|
||||
|
||||
|
|
@ -40,6 +40,7 @@ const store = useRegistryNewDataStore();
|
|||
const { fetchStructureTree } = useStructureTree();
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const empType = ref<string>("officer"); // officer / employee / perm
|
||||
const dataPersonMain = ref<DataPerson[]>([]); //ข้อมูลรายการที่ค้นหาข้อมูลทะเบียนประวัติ
|
||||
|
|
@ -391,6 +392,10 @@ function getSearch() {
|
|||
fetchDataPerson();
|
||||
}
|
||||
|
||||
function goToAdvancedSearch() {
|
||||
router.push("/report/registry");
|
||||
}
|
||||
|
||||
/** hook เมื่อมีการเรียกใช้ Components*/
|
||||
onMounted(async () => {
|
||||
await Promise.all([selectType(), fetchTree()]);
|
||||
|
|
@ -596,12 +601,23 @@ onMounted(async () => {
|
|||
|
||||
<q-space />
|
||||
<div class="q-pt-sm q-pr-sm">
|
||||
<a href="/report/registry" class="text-white">
|
||||
<!-- <a href="/report/registry" class="text-white">
|
||||
การค้นหาขั้นสูง
|
||||
<q-tooltip
|
||||
>ไปยังหน้าการค้นหาขั้นสูง (Advanced search)</q-tooltip
|
||||
>
|
||||
</a>
|
||||
</a> -->
|
||||
<q-btn
|
||||
flat
|
||||
@click="goToAdvancedSearch"
|
||||
class="text-white"
|
||||
style="text-decoration: underline"
|
||||
label="การค้นหาขั้นสูง"
|
||||
>
|
||||
<q-tooltip
|
||||
>ไปยังหน้าการค้นหาขั้นสูง (Advanced search)</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<q-separator
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue