ทะเบียนประวัติ: ปรับโค้ด+แก้บัค
This commit is contained in:
parent
a8018dc6a9
commit
8269eb8e3c
2 changed files with 6 additions and 21 deletions
|
|
@ -21,6 +21,7 @@ const {
|
|||
} = mixin;
|
||||
|
||||
const store = useProfileDataStore();
|
||||
const { fetchPerson, filterSelector } = store;
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id.toString());
|
||||
const dialog = ref<boolean>(false);
|
||||
|
|
@ -121,7 +122,6 @@ async function fetchHistoryData(id: string) {
|
|||
await http
|
||||
.get(config.API.profileNewFamilyHisByFamilyId(id))
|
||||
.then(async (res) => {
|
||||
console.log(res.data.result);
|
||||
historyRows.value = res.data.result;
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -243,23 +243,8 @@ onMounted(async () => {
|
|||
) {
|
||||
await fetchPerson();
|
||||
}
|
||||
prefixFilter.value = store.Ops.prefixOps;
|
||||
await fetchData(id.value);
|
||||
});
|
||||
|
||||
function filterSelector(val: string, update: Function, refData: string) {
|
||||
switch (refData) {
|
||||
case "prefixOps":
|
||||
update(() => {
|
||||
store.Ops.prefixOps = prefixFilter.value.filter(
|
||||
(v: any) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -800,9 +785,9 @@ function filterSelector(val: string, update: Function, refData: string) {
|
|||
:options="store.Ops.prefixOps"
|
||||
option-label="name"
|
||||
option-value="name"
|
||||
@filter="(inputValue:string,
|
||||
doneFn:Function) => filterSelector(inputValue, doneFn,'prefixOps'
|
||||
) "
|
||||
@filter="(inputValue: any,
|
||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'prefixOps'
|
||||
)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col">
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ const educationOptionFilter = ref([
|
|||
{ label: "ไม่ใช่", value: false },
|
||||
]);
|
||||
|
||||
const educationLevelOption = ref([]);
|
||||
const educationLevelOption = ref<any>([]);
|
||||
const educationLevelOptionFilter = ref([]);
|
||||
|
||||
const historyDialog = ref<boolean>(false);
|
||||
|
|
@ -1044,7 +1044,7 @@ onMounted(async () => {
|
|||
bg-color="white"
|
||||
v-model="educationData.isEducation"
|
||||
:options="educationOption"
|
||||
option-value="label"
|
||||
option-value="value"
|
||||
option-label="label"
|
||||
input-debounce="0"
|
||||
use-input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue