closed #14
This commit is contained in:
parent
c1e485519a
commit
f00e98766c
2 changed files with 8 additions and 7 deletions
|
|
@ -29,6 +29,7 @@ const props = defineProps({
|
||||||
fetchActive: {
|
fetchActive: {
|
||||||
type: Function,
|
type: Function,
|
||||||
require: true,
|
require: true,
|
||||||
|
default: () => "fetchActive function",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -84,7 +85,6 @@ function validateForm() {
|
||||||
}
|
}
|
||||||
if (hasError.every((result) => result === true)) {
|
if (hasError.every((result) => result === true)) {
|
||||||
onSubmit();
|
onSubmit();
|
||||||
} else {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,7 +102,7 @@ function onSubmit() {
|
||||||
store.draftId = res.data.result.id;
|
store.draftId = res.data.result.id;
|
||||||
store.statusView = "list";
|
store.statusView = "list";
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
props.fetchActive?.();
|
props.fetchActive();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ const modalDateTime = ref<boolean>(false); // ตั้งเวลาเผย
|
||||||
|
|
||||||
/** สถานะ*/
|
/** สถานะ*/
|
||||||
const isStatusData = ref<boolean>(false); // แสดงตั้งเวลาเผยแพร่
|
const isStatusData = ref<boolean>(false); // แสดงตั้งเวลาเผยแพร่
|
||||||
const ishasActive = ref<boolean>(false); // สถานะการทำงาน
|
// const ishasActive = ref<boolean>(false); // สถานะการทำงาน
|
||||||
const ishasDraft = ref<boolean>(false); // สถานะแบบร่าง
|
// const ishasDraft = ref<boolean>(false); // สถานะแบบร่าง
|
||||||
/** List เพิ่มโครงสร้าง*/
|
/** List เพิ่มโครงสร้าง*/
|
||||||
const itemStructure = ref<DataOption[]>([
|
const itemStructure = ref<DataOption[]>([
|
||||||
{
|
{
|
||||||
|
|
@ -73,10 +73,10 @@ async function fetchOrganizationActive() {
|
||||||
isStatusData.value = true;
|
isStatusData.value = true;
|
||||||
if (isStatusData.value) {
|
if (isStatusData.value) {
|
||||||
if (data.activeName === null) {
|
if (data.activeName === null) {
|
||||||
ishasActive.value = true;
|
// ishasActive.value = true;
|
||||||
store.typeOrganizational = "draft";
|
store.typeOrganizational = "draft";
|
||||||
} else if (data.draftName === null) {
|
} else if (data.draftName === null) {
|
||||||
ishasDraft.value = true;
|
// ishasDraft.value = true;
|
||||||
store.typeOrganizational = "current";
|
store.typeOrganizational = "current";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -225,6 +225,7 @@ onMounted(async () => {
|
||||||
:outline="store.typeOrganizational === 'current' ? false : true"
|
:outline="store.typeOrganizational === 'current' ? false : true"
|
||||||
color="blue"
|
color="blue"
|
||||||
label="ปัจจุบัน"
|
label="ปัจจุบัน"
|
||||||
|
:disable="store.activeId == '' || store.activeId == null"
|
||||||
@click="
|
@click="
|
||||||
(store.typeOrganizational = 'current'),
|
(store.typeOrganizational = 'current'),
|
||||||
(labelHistory = 'ประวัติโครงสร้าง')
|
(labelHistory = 'ประวัติโครงสร้าง')
|
||||||
|
|
@ -237,11 +238,11 @@ onMounted(async () => {
|
||||||
:outline="store.typeOrganizational === 'draft' ? false : true"
|
:outline="store.typeOrganizational === 'draft' ? false : true"
|
||||||
color="blue"
|
color="blue"
|
||||||
label="แบบร่าง"
|
label="แบบร่าง"
|
||||||
|
:disable="store.draftId == '' || store.draftId == null"
|
||||||
@click="
|
@click="
|
||||||
(store.typeOrganizational = 'draft'),
|
(store.typeOrganizational = 'draft'),
|
||||||
(labelHistory = 'ประวัติโครงสร้าง')
|
(labelHistory = 'ประวัติโครงสร้าง')
|
||||||
"
|
"
|
||||||
:disable="ishasDraft"
|
|
||||||
/>
|
/>
|
||||||
<q-btn-dropdown
|
<q-btn-dropdown
|
||||||
v-if="itemHistory.length !== 0"
|
v-if="itemHistory.length !== 0"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue