Merge branch 'oat_dev' into develop
This commit is contained in:
commit
aa7283f268
2 changed files with 60 additions and 8 deletions
|
|
@ -673,6 +673,7 @@ onMounted(async () => {
|
||||||
:options="Ops.levelOptions"
|
:options="Ops.levelOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
|
clearable
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
@filter="(inputValue:string,
|
@filter="(inputValue:string,
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'levelOptions'
|
doneFn:Function) => filterSelector(inputValue, doneFn,'levelOptions'
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,13 @@ const educationOption = ref([
|
||||||
{ label: "ไม่ใช่", value: false },
|
{ label: "ไม่ใช่", value: false },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const educationOptionFilter = ref([
|
||||||
|
{ label: "ใช่", value: true },
|
||||||
|
{ label: "ไม่ใช่", value: false },
|
||||||
|
]);
|
||||||
|
|
||||||
|
let educationLevelOption: any = [];
|
||||||
|
|
||||||
const historyDialog = ref<boolean>(false);
|
const historyDialog = ref<boolean>(false);
|
||||||
const educationData = reactive<RequestItemsObject>({
|
const educationData = reactive<RequestItemsObject>({
|
||||||
isDate: isDate.value === "false" ? false : true,
|
isDate: isDate.value === "false" ? false : true,
|
||||||
|
|
@ -291,6 +298,20 @@ async function onSubmit() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function filterSelector(val: string, update: Function, refData: string) {
|
||||||
|
switch (refData) {
|
||||||
|
case "options":
|
||||||
|
update(() => {
|
||||||
|
educationOption.value = educationOptionFilter.value.filter(
|
||||||
|
(v: any) => v.label.indexOf(val) > -1
|
||||||
|
);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function clearForm() {
|
function clearForm() {
|
||||||
isDate.value = "false";
|
isDate.value = "false";
|
||||||
educationData.educationLevel = "";
|
educationData.educationLevel = "";
|
||||||
|
|
@ -350,7 +371,23 @@ async function fetchData(id: string) {
|
||||||
.get(config.API.profileNewEducationByProfileId(id))
|
.get(config.API.profileNewEducationByProfileId(id))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
rows.value = res.data.result;
|
rows.value = res.data.result;
|
||||||
console.log(rows.value);
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function fetchEducationLevel() {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.orgEducationLevel)
|
||||||
|
.then(async (res) => {
|
||||||
|
res.data.result.map((r: any) => {
|
||||||
|
educationLevelOption.push(r.name);
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -433,6 +470,7 @@ function deleteData(idData: string) {
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
|
fetchEducationLevel();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -619,7 +657,6 @@ onMounted(async () => {
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ console.log(props) }}
|
|
||||||
<div class="col-3 q-pa-sm label-color">ระดับการศึกษา</div>
|
<div class="col-3 q-pa-sm label-color">ระดับการศึกษา</div>
|
||||||
<div class="col-4 q-pa-sm">{{ props.cols[0].value }}</div>
|
<div class="col-4 q-pa-sm">{{ props.cols[0].value }}</div>
|
||||||
<div class="col-2 q-pa-sm label-color">สถานศึกษา</div>
|
<div class="col-2 q-pa-sm label-color">สถานศึกษา</div>
|
||||||
|
|
@ -714,14 +751,22 @@ onMounted(async () => {
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="row q-pa-md q-col-gutter-sm">
|
<div class="row q-pa-md q-col-gutter-sm">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-select
|
||||||
outlined
|
outlined
|
||||||
v-model="educationData.educationLevel"
|
|
||||||
label="ระดับการศึกษา"
|
|
||||||
bg-color="white"
|
|
||||||
dense
|
dense
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกระดับการศึกษา'}`]"
|
emit-value
|
||||||
hide-bottom-space
|
map-options
|
||||||
|
bg-color="white"
|
||||||
|
v-model="educationData.educationLevel"
|
||||||
|
:options="educationLevelOption"
|
||||||
|
input-debounce="0"
|
||||||
|
use-input
|
||||||
|
@filter="(inputValue:string,
|
||||||
|
doneFn:Function) => filterSelector(inputValue, doneFn,'options'
|
||||||
|
) "
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือกระดับการศึกษา'}`]"
|
||||||
|
label="ระดับการศึกษา"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
|
|
@ -981,11 +1026,17 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
clearable
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
v-model="educationData.isEducation"
|
v-model="educationData.isEducation"
|
||||||
:options="educationOption"
|
:options="educationOption"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
|
input-debounce="0"
|
||||||
|
use-input
|
||||||
|
@filter="(inputValue:string,
|
||||||
|
doneFn:Function) => filterSelector(inputValue, doneFn,'options'
|
||||||
|
) "
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
val !== null || `${'กรุณาเลือกวุฒิการศึกษาในตำแหน่ง'}`,
|
val !== null || `${'กรุณาเลือกวุฒิการศึกษาในตำแหน่ง'}`,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue