Merge branch 'develop' into devTee
This commit is contained in:
commit
77ae7e5bed
11 changed files with 1590 additions and 1546 deletions
|
|
@ -92,23 +92,23 @@ const objectPositionSelectRef: FormPositionSelectRef = {
|
||||||
/** ฟังก์ชั่นตรวจสอบความถูกต้องของข้อมูลในฟอร์ม */
|
/** ฟังก์ชั่นตรวจสอบความถูกต้องของข้อมูลในฟอร์ม */
|
||||||
function validateFormPositionEdit() {
|
function validateFormPositionEdit() {
|
||||||
isDisValidate.value = false;
|
isDisValidate.value = false;
|
||||||
const hasError = [];
|
// const hasError = [];
|
||||||
for (const key in objectPositionSelectRef) {
|
// for (const key in objectPositionSelectRef) {
|
||||||
if (Object.prototype.hasOwnProperty.call(objectPositionSelectRef, key)) {
|
// if (Object.prototype.hasOwnProperty.call(objectPositionSelectRef, key)) {
|
||||||
const property = objectPositionSelectRef[key];
|
// const property = objectPositionSelectRef[key];
|
||||||
if (property.value && typeof property.value.validate === "function") {
|
// if (property.value && typeof property.value.validate === "function") {
|
||||||
const isValid = property.value.validate();
|
// const isValid = property.value.validate();
|
||||||
hasError.push(isValid);
|
// hasError.push(isValid);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (hasError.every((result) => result === true)) {
|
// if (hasError.every((result) => result === true)) {
|
||||||
if (isEditCheck.value == true) {
|
if (isEditCheck.value == true) {
|
||||||
saveSelectEdit();
|
saveSelectEdit();
|
||||||
} else {
|
} else {
|
||||||
onSubmitSelectEdit();
|
onSubmitSelectEdit();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveSelectEdit() {
|
function saveSelectEdit() {
|
||||||
|
|
@ -313,6 +313,7 @@ watch(
|
||||||
if (modal.value === true) {
|
if (modal.value === true) {
|
||||||
await fetchType();
|
await fetchType();
|
||||||
await fetchExecutive();
|
await fetchExecutive();
|
||||||
|
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
const dataList = props.data;
|
const dataList = props.data;
|
||||||
console.log(dataList);
|
console.log(dataList);
|
||||||
|
|
@ -342,7 +343,12 @@ watch(
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
<q-card-section class="q-pa-none">
|
<q-card-section class="q-pa-none">
|
||||||
<form @submit.prevent="validateFormPositionEdit">
|
<q-form
|
||||||
|
greedy
|
||||||
|
@submit.prevent
|
||||||
|
@validation-success="validateFormPositionEdit"
|
||||||
|
>
|
||||||
|
<!-- @submit.prevent="validateFormPositionEdit" -->
|
||||||
<div class="row q-col-gutter-sm col-12 q-pa-sm">
|
<div class="row q-col-gutter-sm col-12 q-pa-sm">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -517,7 +523,7 @@ watch(
|
||||||
color="public"
|
color="public"
|
||||||
/>
|
/>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</form>
|
</q-form>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,6 @@ function onSubmit() {
|
||||||
level.value !== 0 ? formData.orgLevelSub : undefined,
|
level.value !== 0 ? formData.orgLevelSub : undefined,
|
||||||
[nameId]: rootId,
|
[nameId]: rootId,
|
||||||
};
|
};
|
||||||
console.log(body);
|
|
||||||
|
|
||||||
if (actionType.value === "ADD") {
|
if (actionType.value === "ADD") {
|
||||||
await http
|
await http
|
||||||
|
|
@ -375,7 +374,6 @@ function selectOrgLevele(val: string, status: boolean = true) {
|
||||||
for="#ocNo"
|
for="#ocNo"
|
||||||
:label="level == 0 ? 'รหัสหน่วยงาน' : 'รหัสส่วนราชการ'"
|
:label="level == 0 ? 'รหัสหน่วยงาน' : 'รหัสส่วนราชการ'"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="inputNumber"
|
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
!!val ||
|
!!val ||
|
||||||
|
|
@ -482,14 +480,4 @@ function selectOrgLevele(val: string, status: boolean = true) {
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
.inputNumber >>> input[type="number"] {
|
|
||||||
-moz-appearance: textfield;
|
|
||||||
}
|
|
||||||
.inputNumber >>> input::-webkit-outer-spin-button,
|
|
||||||
.inputNumber >>> input::-webkit-inner-spin-button {
|
|
||||||
appearance: none;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
-moz-appearance: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -544,8 +544,6 @@ watch(
|
||||||
);
|
);
|
||||||
|
|
||||||
async function addPosition(data: RowDetailPositions) {
|
async function addPosition(data: RowDetailPositions) {
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
const isIdExist = await rows.value.some(
|
const isIdExist = await rows.value.some(
|
||||||
(item: any) =>
|
(item: any) =>
|
||||||
item.posExecutiveId == data.posExecutiveId &&
|
item.posExecutiveId == data.posExecutiveId &&
|
||||||
|
|
@ -817,7 +815,7 @@ async function emitSearch(keyword: string, typeSelect: string) {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="teal"
|
color="teal"
|
||||||
@click="() => (modalAdd = true)"
|
@click="() => ((modalAdd = true), (dataCopy = null))"
|
||||||
><q-tooltip>สร้างตำแหน่ง</q-tooltip></q-btn
|
><q-tooltip>สร้างตำแหน่ง</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
interface ArrayFileList {
|
interface ArrayFileList {
|
||||||
id:string
|
id: string;
|
||||||
pathName:string
|
pathName: string;
|
||||||
fileName:string
|
fileName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -40,7 +40,14 @@ const fileList = ref<ArrayFileList[]>([]);
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { success, messageError, showLoader, dialogConfirm, hideLoader,dialogRemove } = mixin;
|
const {
|
||||||
|
success,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
dialogConfirm,
|
||||||
|
hideLoader,
|
||||||
|
dialogRemove,
|
||||||
|
} = mixin;
|
||||||
const profileId = ref<string>(
|
const profileId = ref<string>(
|
||||||
route.params.personalId ? route.params.personalId.toString() : ""
|
route.params.personalId ? route.params.personalId.toString() : ""
|
||||||
);
|
);
|
||||||
|
|
@ -51,30 +58,28 @@ const file = ref<any>([]);
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
const dataMain = ref<any>([]);
|
const dataMain = ref<any>([]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// const getData = async () => {
|
// const getData = async () => {
|
||||||
// if (props.datainformation) {
|
// if (props.datainformation) {
|
||||||
// dataMain.value = props.datainformation;
|
// dataMain.value = props.datainformation;
|
||||||
// files.value = dataMain.value.docs;
|
// files.value = dataMain.value.docs;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// โค้ดเก่ายังไม่ได้ใช้
|
// โค้ดเก่ายังไม่ได้ใช้
|
||||||
// if (profileId.value) {
|
// if (profileId.value) {
|
||||||
// showLoader();
|
// showLoader();
|
||||||
// await http
|
// await http
|
||||||
// .get(config.API.profilePaperId(profileId.value))
|
// .get(config.API.profilePaperId(profileId.value))
|
||||||
// .then((res) => {
|
// .then((res) => {
|
||||||
// const data = res.data.result;
|
// const data = res.data.result;
|
||||||
// files.value = data;
|
// files.value = data;
|
||||||
// })
|
// })
|
||||||
// .catch((e) => {
|
// .catch((e) => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
// })
|
// })
|
||||||
// .finally(() => {
|
// .finally(() => {
|
||||||
// hideLoader();
|
// hideLoader();
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
|
|
||||||
const deleteData = async (id: string) => {
|
const deleteData = async (id: string) => {
|
||||||
|
|
@ -229,7 +234,7 @@ async function uploadFileDoc(uploadUrl: string, file: any) {
|
||||||
* ดาวน์โหลดลิงค์ไฟล์
|
* ดาวน์โหลดลิงค์ไฟล์
|
||||||
* @param fileName file name
|
* @param fileName file name
|
||||||
*/
|
*/
|
||||||
function downloadFile(fileName: string) {
|
function downloadFile(fileName: string) {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(
|
.get(
|
||||||
|
|
@ -269,7 +274,6 @@ function deleteFile(fileName: string) {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getData();
|
getData();
|
||||||
success($q, `ลบไฟล์สำเร็จ`);
|
success($q, `ลบไฟล์สำเร็จ`);
|
||||||
|
|
@ -286,7 +290,7 @@ function deleteFile(fileName: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getData() {
|
async function getData() {
|
||||||
showLoader()
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.file("ระบบบรรจุ แต่งตั้ง", "เอกสารหลักฐาน", profileId.value)
|
config.API.file("ระบบบรรจุ แต่งตั้ง", "เอกสารหลักฐาน", profileId.value)
|
||||||
|
|
@ -298,17 +302,16 @@ async function getData() {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader()
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-card flat bordered class="col-12 row q-px-lg q-py-md">
|
<q-card flat bordered class="col-12 q-px-lg q-py-md q-mt-md no-border">
|
||||||
<HeaderTop
|
<HeaderTop
|
||||||
v-model:edit="edit"
|
v-model:edit="edit"
|
||||||
header="เอกสารหลักฐาน"
|
header="เอกสารหลักฐาน"
|
||||||
|
|
@ -318,8 +321,7 @@ onMounted(async () => {
|
||||||
:disable="statusEdit"
|
:disable="statusEdit"
|
||||||
:save="uploadData"
|
:save="uploadData"
|
||||||
/>
|
/>
|
||||||
<q-card class="row col-12">
|
<q-card class="row col-12">
|
||||||
|
|
||||||
<div class="row col-12 q-col-gutter-y-sm q-pa-sm">
|
<div class="row col-12 q-col-gutter-y-sm q-pa-sm">
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<q-file
|
<q-file
|
||||||
|
|
|
||||||
|
|
@ -139,8 +139,6 @@ function updateSelected(data: TreeMain) {
|
||||||
const isAll = ref<boolean>(false);
|
const isAll = ref<boolean>(false);
|
||||||
const isBlank = ref<boolean>(false);
|
const isBlank = ref<boolean>(false);
|
||||||
async function fetchDataTable(id: string, level: number = 0) {
|
async function fetchDataTable(id: string, level: number = 0) {
|
||||||
console.log(props.dataRow);
|
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
const body = {
|
const body = {
|
||||||
node: level,
|
node: level,
|
||||||
|
|
@ -196,9 +194,6 @@ async function fetchPosFind(level: number, id: string) {
|
||||||
.post(config.API.orgPosFind, body)
|
.post(config.API.orgPosFind, body)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
console.log(props?.dataRow);
|
|
||||||
|
|
||||||
expanded.value = data;
|
expanded.value = data;
|
||||||
nodeId.value = id;
|
nodeId.value = id;
|
||||||
positionId.value = props?.dataRow?.posmasterId;
|
positionId.value = props?.dataRow?.posmasterId;
|
||||||
|
|
@ -224,7 +219,6 @@ async function onClickSubmit() {
|
||||||
} else {
|
} else {
|
||||||
dialogConfirm($q, async () => {
|
dialogConfirm($q, async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
||||||
const body = {
|
const body = {
|
||||||
personalId: props?.dataRow?.personalId,
|
personalId: props?.dataRow?.personalId,
|
||||||
node: dataPosMaster.node,
|
node: dataPosMaster.node,
|
||||||
|
|
@ -239,6 +233,7 @@ async function onClickSubmit() {
|
||||||
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
|
posLevelId: selectedPos.value[0].posLevelId, //ชื่อตำแหน่ง
|
||||||
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
posLevelName: selectedPos.value[0].posLevelName, //ชื่อตำแหน่ง
|
||||||
reportingDate: datePos.value,
|
reportingDate: datePos.value,
|
||||||
|
posmasterId: dataPosMaster.id,
|
||||||
typeCommand: props.typeCommand,
|
typeCommand: props.typeCommand,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -277,8 +272,6 @@ watch(
|
||||||
() => modal.value,
|
() => modal.value,
|
||||||
async () => {
|
async () => {
|
||||||
if (modal.value) {
|
if (modal.value) {
|
||||||
console.log(props?.dataRow);
|
|
||||||
|
|
||||||
await fetchOrganizationActive();
|
await fetchOrganizationActive();
|
||||||
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
|
if (props?.dataRow?.node !== null && props?.dataRow?.nodeId !== null) {
|
||||||
await fetchPosFind(props?.dataRow?.node, props?.dataRow?.nodeId);
|
await fetchPosFind(props?.dataRow?.node, props?.dataRow?.nodeId);
|
||||||
|
|
@ -319,22 +312,18 @@ function filterNodeFn(data: any, id: string) {
|
||||||
watch(
|
watch(
|
||||||
() => isAll.value,
|
() => isAll.value,
|
||||||
(value, oldVal) => {
|
(value, oldVal) => {
|
||||||
console.log("value", value);
|
if (value !== oldVal) {
|
||||||
console.log("oldVal", oldVal);
|
fetchDataTable(nodeId.value, nodeLevel.value);
|
||||||
isAll.value = value;
|
}
|
||||||
|
|
||||||
fetchDataTable(nodeId.value, nodeLevel.value);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => isBlank.value,
|
() => isBlank.value,
|
||||||
(value, oldVal) => {
|
(value, oldVal) => {
|
||||||
console.log("isBlank value", value);
|
if (value !== oldVal) {
|
||||||
console.log("isBlank oldVal", oldVal);
|
fetchDataTable(nodeId.value, nodeLevel.value);
|
||||||
isBlank.value = value;
|
}
|
||||||
|
|
||||||
fetchDataTable(nodeId.value, nodeLevel.value);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -234,14 +234,14 @@ function convertBmaOfficer(val: string) {
|
||||||
* แปลงสถานะบรรจุ
|
* แปลงสถานะบรรจุ
|
||||||
* @param val type
|
* @param val type
|
||||||
*/
|
*/
|
||||||
function convertContainStatus(val: string) {
|
function convertContainStatus(val: string, type: string = "") {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "UN-CONTAIN":
|
case "UN-CONTAIN":
|
||||||
return "ยังไม่บรรจุ";
|
return "ยังไม่บรรจุ";
|
||||||
case "PREPARE-CONTAIN":
|
case "PREPARE-CONTAIN":
|
||||||
return "เตรียมบรรจุ";
|
return "เตรียม" + (type != "" ? type : "บรรจุ");
|
||||||
case "CONTAIN":
|
case "CONTAIN":
|
||||||
return "บรรจุแล้ว";
|
return (type != "" ? type : "บรรจุ") + "แล้ว";
|
||||||
case "DISCLAIM":
|
case "DISCLAIM":
|
||||||
return "สละสิทธิ์";
|
return "สละสิทธิ์";
|
||||||
default:
|
default:
|
||||||
|
|
@ -249,6 +249,21 @@ function convertContainStatus(val: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function convertTypeCommand(val: string) {
|
||||||
|
switch (val) {
|
||||||
|
case "APPOINTED":
|
||||||
|
return "บรรจุแต่งตั้ง";
|
||||||
|
case "APPOINT":
|
||||||
|
return "แต่งตั้ง";
|
||||||
|
case "SLIP":
|
||||||
|
return "เลื่อน";
|
||||||
|
case "MOVE":
|
||||||
|
return "ย้าย";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* แปลงสถานะการส่งรายชื่อ
|
* แปลงสถานะการส่งรายชื่อ
|
||||||
* @param val true/false
|
* @param val true/false
|
||||||
|
|
@ -322,7 +337,11 @@ async function getTable() {
|
||||||
posLevelCandidateName: data.posLevelCandidateName,
|
posLevelCandidateName: data.posLevelCandidateName,
|
||||||
posmasterId: data.posmasterId,
|
posmasterId: data.posmasterId,
|
||||||
|
|
||||||
statusName: convertContainStatus(data.statusId),
|
statusName:
|
||||||
|
convertContainStatus(data.statusId) +
|
||||||
|
(data.typeCommand != ""
|
||||||
|
? convertTypeCommand(data.typeCommand)
|
||||||
|
: ""),
|
||||||
organizationName:
|
organizationName:
|
||||||
data.root +
|
data.root +
|
||||||
" " +
|
" " +
|
||||||
|
|
@ -854,7 +873,9 @@ onMounted(async () => {
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
v-if="
|
v-if="
|
||||||
(roleAdmin && props.row.statusId === 'UN-CONTAIN') ||
|
(props.row.bmaOfficer !== 'บุคคลภายนอก' &&
|
||||||
|
roleAdmin &&
|
||||||
|
props.row.statusId === 'UN-CONTAIN') ||
|
||||||
(props.row.draft === 'รอส่งตัว' &&
|
(props.row.draft === 'รอส่งตัว' &&
|
||||||
props.row.statusId !== 'DISCLAIM')
|
props.row.statusId !== 'DISCLAIM')
|
||||||
"
|
"
|
||||||
|
|
@ -884,7 +905,9 @@ onMounted(async () => {
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
v-if="
|
v-if="
|
||||||
(roleAdmin && props.row.statusId === 'UN-CONTAIN') ||
|
(props.row.bmaOfficer !== 'บุคคลภายนอก' &&
|
||||||
|
roleAdmin &&
|
||||||
|
props.row.statusId === 'UN-CONTAIN') ||
|
||||||
(props.row.draft === 'รอส่งตัว' &&
|
(props.row.draft === 'รอส่งตัว' &&
|
||||||
props.row.statusId !== 'DISCLAIM')
|
props.row.statusId !== 'DISCLAIM')
|
||||||
"
|
"
|
||||||
|
|
@ -910,7 +933,9 @@ onMounted(async () => {
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
v-if="
|
v-if="
|
||||||
(roleAdmin && props.row.statusId === 'UN-CONTAIN') ||
|
(props.row.bmaOfficer !== 'บุคคลภายนอก' &&
|
||||||
|
roleAdmin &&
|
||||||
|
props.row.statusId === 'UN-CONTAIN') ||
|
||||||
(props.row.draft === 'รอส่งตัว' &&
|
(props.row.draft === 'รอส่งตัว' &&
|
||||||
props.row.statusId !== 'DISCLAIM')
|
props.row.statusId !== 'DISCLAIM')
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ export const useSelectOrgStore = defineStore("selectorg", () => {
|
||||||
isPosition: e.isPosition,
|
isPosition: e.isPosition,
|
||||||
posMasterNo:
|
posMasterNo:
|
||||||
e.orgShortname +
|
e.orgShortname +
|
||||||
e.posMasterNoPrefix +
|
(e.posMasterNoPrefix != null ? e.posMasterNoPrefix : "") +
|
||||||
e.posMasterNo +
|
e.posMasterNo +
|
||||||
e.posMasterNoSuffix,
|
(e.posMasterNoSuffix != null ? e.posMasterNoSuffix : ""),
|
||||||
positionName: e.positionName,
|
positionName: e.positionName,
|
||||||
posTypeName: e.posTypeName,
|
posTypeName: e.posTypeName,
|
||||||
posLevelName: e.posLevelName,
|
posLevelName: e.posLevelName,
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -130,8 +130,6 @@ const getCommandDetail = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -96,22 +96,22 @@ function fetchData() {
|
||||||
formData.developmentProjectTechniqueActuals =
|
formData.developmentProjectTechniqueActuals =
|
||||||
data.developmentProjectTechniqueActuals;
|
data.developmentProjectTechniqueActuals;
|
||||||
formData.projectModalPlanned = data.projectModalPlanned;
|
formData.projectModalPlanned = data.projectModalPlanned;
|
||||||
expanded.value = [
|
const arrayExpanded = [
|
||||||
data.strategyChild1Planned,
|
data.strategyChild1Planned,
|
||||||
data.strategyChild2Planned,
|
data.strategyChild2Planned,
|
||||||
data.strategyChild3Planned,
|
data.strategyChild3Planned,
|
||||||
data.strategyChild4Planned,
|
data.strategyChild4Planned,
|
||||||
data.strategyChild5Planned,
|
data.strategyChild5Planned,
|
||||||
];
|
];
|
||||||
expanded2.value = [
|
const arrayExpanded2 = [
|
||||||
data.strategyChild1Actual,
|
data.strategyChild1Actual,
|
||||||
data.strategyChild2Actual,
|
data.strategyChild2Actual,
|
||||||
data.strategyChild3Actual,
|
data.strategyChild3Actual,
|
||||||
data.strategyChild4Actual,
|
data.strategyChild4Actual,
|
||||||
data.strategyChild5Actual,
|
data.strategyChild5Actual,
|
||||||
];
|
];
|
||||||
const filteredArray = expanded.value.filter((item) => item !== null);
|
const filteredArray = arrayExpanded.filter((item) => item !== null);
|
||||||
const filteredArray2 = expanded2.value.filter((item) => item !== null);
|
const filteredArray2 = arrayExpanded2.filter((item) => item !== null);
|
||||||
const lastItem = filteredArray[filteredArray.length - 1];
|
const lastItem = filteredArray[filteredArray.length - 1];
|
||||||
const lastItem2 = filteredArray2[filteredArray2.length - 1];
|
const lastItem2 = filteredArray2[filteredArray2.length - 1];
|
||||||
formData.strategyChildPlannedId =
|
formData.strategyChildPlannedId =
|
||||||
|
|
@ -122,6 +122,9 @@ function fetchData() {
|
||||||
lastItem2 !== undefined ? lastItem2 : null;
|
lastItem2 !== undefined ? lastItem2 : null;
|
||||||
formData.strategyChildActualNode =
|
formData.strategyChildActualNode =
|
||||||
lastItem2 !== undefined ? filteredArray2.length : null;
|
lastItem2 !== undefined ? filteredArray2.length : null;
|
||||||
|
|
||||||
|
expanded.value = arrayExpanded.filter((e) => e !== null).slice(0, -1);
|
||||||
|
expanded2.value = arrayExpanded2.filter((e) => e !== null).slice(0, -1);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
|
|
@ -359,20 +359,20 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
<q-th auto-width />
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width />
|
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
v-if="props.row.isDone"
|
||||||
name="mdi-check"
|
name="mdi-check"
|
||||||
color="green"
|
color="green"
|
||||||
size="xs"
|
size="xs"
|
||||||
v-if="props.row.isDone"
|
|
||||||
>
|
>
|
||||||
<q-tooltip>ส่งไปบันทึกที่ทะเบียนประวัติแล้ว</q-tooltip>
|
<q-tooltip>ส่งไปบันทึกที่ทะเบียนประวัติแล้ว</q-tooltip>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue