popup เพิ่มข้อมูลทะเบียนประวัติ ข้าราชการ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-29 17:38:49 +07:00
parent d7a79c2169
commit 0c02d66e20
8 changed files with 767 additions and 10 deletions

View file

@ -61,7 +61,7 @@
color="grey-6"
@click="goToUserRegistry()"
/>
<q-tooltip>ทะเบยนประว</q-tooltip>
<q-tooltip>ทะเบยนประวd</q-tooltip>
</q-btn>
</div>
<div class="q-pl-lg q-pt-sm q-gutter-xs textSub">

View file

@ -27,9 +27,128 @@ async function fetchDataTree() {
lazy: true,
},
];
// const data = [
// {
// orgRootId: "00000000-0000-0000-0000-000000000000",
// orgLevel: 0,
// orgRootName: "",
// orgRootShortName: "..",
// orgRootCode: "04",
// orgCode: "0400",
// orgRootOrder: 1,
// orgRootPhoneEx: "0849562355",
// orgRootPhoneIn: "0845124512",
// orgRootFax: "021576452",
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
// orgChild1: [
// {
// orgChild1Id: "00000000-0000-0000-0000-000000000000",
// orgLevel: 1,
// orgChild1Name: "",
// orgChild1ShortName: "..",
// orgChild1Code: "01",
// orgCode: "0401",
// orgChild1Order: 1,
// orgRootCode: "04",
// orgChild1PhoneEx: "0849562355",
// orgChild1PhoneIn: "0845124512",
// orgChild1Fax: "021576452",
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
// orgChild2: [
// {
// orgChild2Id: "00000000-0000-0000-0000-000000000000",
// orgLevel: 2,
// orgChild2Name: "",
// orgChild2ShortName: "..",
// orgChild2Code: "01",
// orgCode: "0401",
// orgChild2Order: 1,
// orgRootCode: "04",
// orgChild2PhoneEx: "0849562355",
// orgChild2PhoneIn: "0845124512",
// orgChild2Fax: "021576452",
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
// orgChild3: [
// {
// orgChild3Id: "00000000-0000-0000-0000-000000000000",
// orgLevel: 3,
// orgChild3Name: "",
// orgChild3ShortName: "..",
// orgChild3Code: "01",
// orgCode: "0401",
// orgChild3Order: 1,
// orgRootCode: "04",
// orgChild3PhoneEx: "0849562355",
// orgChild3PhoneIn: "0845124512",
// orgChild3Fax: "021576452",
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
// lazy: true,
// orgChild4: [
// {
// orgChild4Id: "00000000-0000-0000-0000-000000000000",
// orgLevel: 4,
// orgChild4Name: "",
// orgChild4ShortName: "..",
// orgChild4Code: "01",
// orgCode: "0401",
// orgChild4Order: 1,
// orgChild4PhoneEx: "0849562355",
// orgChild4PhoneIn: "0845124512",
// orgChild4Fax: "021576452",
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
// lazy: true,
// orgRootCode: "04",
// },
// ],
// },
// ],
// },
// ],
// },
// ],
// },
// {
// orgRootId: "00000000-0000-0000-0000-000000000001",
// orgLevel: 0,
// orgRootName: "2",
// orgRootShortName: "..",
// orgRootCode: "04",
// orgCode: "0400",
// orgRootOrder: 1,
// orgRootPhoneEx: "0849562355",
// orgRootPhoneIn: "0845124512",
// orgRootFax: "021576452",
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
// orgChild1: [
// {
// orgChild1Id: "00000000-0000-0000-0000-000000000000",
// orgLevel: 1,
// orgChild1Name: "2",
// orgChild1ShortName: "..",
// orgChild1Code: "01",
// orgCode: "0401",
// orgChild1Order: 1,
// orgRootCode: "04",
// orgChild1PhoneEx: "0849562355",
// orgChild1PhoneIn: "0845124512",
// orgChild1Fax: "021576452",
// orgRevisionId: "00000000-0000-0000-0000-000000000000",
// orgChild2: [],
// },
// ],
// },
// ];
nodeTree.value = data;
console.log(nodeTree.value);
}
onMounted(() => {
fetchDataTree();
});

View file

@ -134,14 +134,7 @@ const updateSelected = (target: any) => {
};
const onLazyLoad = (details: { node: any; key: any; done: any; fail: any }) => {
// call fail() if any error occurs
// setTimeout(() => {
// simulate loading and setting an empty node
// if (details.key.indexOf("data empty") > -1) {
// details.done([]);
// return;
// }
console.log(details.node.organizationName);
if (details.node.organizationId == "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx01") {
details.done([

View file

@ -20,6 +20,17 @@
<q-space />
<div class="items-center row col-12 q-gutter-x-sm">
<PopupHistory />
<q-btn
color="primary"
dense
flat
round
@click="ocClickAddEmployee"
icon="add"
>
<q-tooltip>เพมขอมลทะเบยนประว าราชการ</q-tooltip>
</q-btn>
<q-btn
size="13px"
color="grey-7"
@ -431,12 +442,14 @@
<slot v-bind="props" name="columns"></slot>
</template>
</q-table>
<PopupADdEmployee v-model:modal="modalEmployee" />
</template>
<script setup lang="ts">
import { ref, useAttrs } from "vue";
import type { Pagination } from "@/modules/04_registry/interface/index/Main";
import type { DataOption } from "@/modules/04_registry/components/profileType";
import PopupHistory from "./PopupHistory.vue";
import PopupADdEmployee from "@/components/DialogAddEmployee.vue";
const attrs = ref<any>(useAttrs());
const table = ref<any>(null);
@ -607,6 +620,11 @@ const resetFilter = () => {
emit("update:inputfilter", "");
filterRef.value.focus();
};
const modalEmployee = ref<boolean>(false);
function ocClickAddEmployee() {
modalEmployee.value = !modalEmployee.value;
}
</script>
<style lang="scss">
.icon-color {

View file

@ -48,6 +48,7 @@
</div>
</q-scroll-area>
</q-drawer>
<q-page-container class="q-ma-sm">
<ProfileTable
style="height: 77vh"

View file

@ -296,7 +296,7 @@ const saveData = async () => {
// post api
const addData = async () => {
const formData = new FormData();
if (fileData.value != null) formData.append("File", fileData.value); //
// if (fileData.value != null) formData.append("File", fileData.value); //
if (informaData.value.cardid != undefined)
formData.append("citizenId", informaData.value.cardid);
if (informaData.value.prefixId != undefined)