Merge branch 'develop' into devTee
This commit is contained in:
commit
08cfdff6db
18 changed files with 301 additions and 271 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import env from "../index";
|
import env from "../index";
|
||||||
const placement = `${env.API_PLACEMENT_URI}/placement`;
|
const placement = `${env.API_PLACEMENT_URI}/placement`;
|
||||||
|
const disciplineReportList = `${env.API_URI}/discipline/complaint/report`;
|
||||||
const orgTree = `${env.API_URI_ORG_TREE}`;
|
const orgTree = `${env.API_URI_ORG_TREE}`;
|
||||||
const order = `${env.API_PLACEMENT_URI}`;
|
const order = `${env.API_PLACEMENT_URI}`;
|
||||||
const receive = `${env.API_PLACEMENT_URI}/placement/Receive`;
|
const receive = `${env.API_PLACEMENT_URI}/placement/Receive`;
|
||||||
|
|
@ -10,7 +11,6 @@ const placemenRelocation = `${placement}/relocation`;
|
||||||
const placemenOther = `${env.API_URI}/retirement/other`;
|
const placemenOther = `${env.API_URI}/retirement/other`;
|
||||||
const placemenAppointment = `${placement}/appointment`;
|
const placemenAppointment = `${placement}/appointment`;
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
MainDetail: (year: number) => `${placement}/exam/${year}`,
|
MainDetail: (year: number) => `${placement}/exam/${year}`,
|
||||||
yearOptions: () => `${placement}/fiscal`,
|
yearOptions: () => `${placement}/fiscal`,
|
||||||
|
|
@ -60,10 +60,10 @@ export default {
|
||||||
// clear Position
|
// clear Position
|
||||||
clearPosition: (personalId: string) =>
|
clearPosition: (personalId: string) =>
|
||||||
`${placement}/position/clear/${personalId}`,
|
`${placement}/position/clear/${personalId}`,
|
||||||
// Document
|
// Document
|
||||||
documentByid: (personalId: string) => `${placement}/doc/${personalId}`,
|
documentByid: (personalId: string) => `${placement}/doc/${personalId}`,
|
||||||
documentDelid: (personalId: string, docid: string) => `${placement}/doc/${personalId}/${docid}`,
|
documentDelid: (personalId: string, docid: string) =>
|
||||||
|
`${placement}/doc/${personalId}/${docid}`,
|
||||||
|
|
||||||
// order
|
// order
|
||||||
organizationsOrder: () => `${order}/order/organizations`,
|
organizationsOrder: () => `${order}/order/organizations`,
|
||||||
|
|
@ -99,7 +99,7 @@ export default {
|
||||||
orderReady: (id: string) => `${order}/order/ready/${id}`,
|
orderReady: (id: string) => `${order}/order/ready/${id}`,
|
||||||
attachmentOrder: (orderId: string) => `${order}/order/attachment/${orderId}`,
|
attachmentOrder: (orderId: string) => `${order}/order/attachment/${orderId}`,
|
||||||
searchOrderprofile: () => `${order}/order/search/profile/command`,
|
searchOrderprofile: () => `${order}/order/search/profile/command`,
|
||||||
|
disciplineReportList,
|
||||||
//receive ระบบรับโอน
|
//receive ระบบรับโอน
|
||||||
receiveData: () => `${receive}`,
|
receiveData: () => `${receive}`,
|
||||||
receiveReport: `${receive}/report`,
|
receiveReport: `${receive}/report`,
|
||||||
|
|
@ -168,7 +168,9 @@ export default {
|
||||||
//appoint-employee
|
//appoint-employee
|
||||||
appointEmployee: () => `${placement}/appointment/temp`,
|
appointEmployee: () => `${placement}/appointment/temp`,
|
||||||
appointEmployeeByid: (id: string) => `${placement}/appointment/temp/${id}`,
|
appointEmployeeByid: (id: string) => `${placement}/appointment/temp/${id}`,
|
||||||
appointEmployeePosition: (id: string) => `${placement}/appointment/temp/position/${id}`,
|
appointEmployeePosition: (id: string) =>
|
||||||
appointEmployeeOrder: (typeId: string) => `${placement}/appointment/temp/report/${typeId}`,
|
`${placement}/appointment/temp/position/${id}`,
|
||||||
|
appointEmployeeOrder: (typeId: string) =>
|
||||||
|
`${placement}/appointment/temp/report/${typeId}`,
|
||||||
apppointmentPositionUse: () => `${placement}/appointment/temp/use`,
|
apppointmentPositionUse: () => `${placement}/appointment/temp/use`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export default [
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [9],
|
Key: [9],
|
||||||
Role: "coin",
|
Role: "leave",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -29,7 +29,7 @@ export default [
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [9],
|
Key: [9],
|
||||||
Role: "coin",
|
Role: "leave",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -39,7 +39,7 @@ export default [
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [9],
|
Key: [9],
|
||||||
Role: "coin",
|
Role: "leave",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -49,7 +49,7 @@ export default [
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [9],
|
Key: [9],
|
||||||
Role: "coin",
|
Role: "leave",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -59,7 +59,7 @@ export default [
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [9],
|
Key: [9],
|
||||||
Role: "coin",
|
Role: "leave",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -69,7 +69,7 @@ export default [
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [9],
|
Key: [9],
|
||||||
Role: "coin",
|
Role: "leave",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -79,7 +79,7 @@ export default [
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [9],
|
Key: [9],
|
||||||
Role: "coin",
|
Role: "leave",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -89,7 +89,7 @@ export default [
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [9],
|
Key: [9],
|
||||||
Role: "coin",
|
Role: "leave",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -99,7 +99,7 @@ export default [
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [9],
|
Key: [9],
|
||||||
Role: "coin",
|
Role: "leave",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
|
@ -109,7 +109,7 @@ export default [
|
||||||
// meta: {
|
// meta: {
|
||||||
// Auth: true,
|
// Auth: true,
|
||||||
// Key: [9],
|
// Key: [9],
|
||||||
// Role: "coin",
|
// Role: "leave",
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
|
|
@ -119,7 +119,7 @@ export default [
|
||||||
// meta: {
|
// meta: {
|
||||||
// Auth: true,
|
// Auth: true,
|
||||||
// Key: [9],
|
// Key: [9],
|
||||||
// Role: "coin",
|
// Role: "leave",
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ onMounted(() => {
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="
|
@click="
|
||||||
route.name == 'disciplineOrderDatail'
|
route.name == 'disciplineOrderDatail' || route.name == 'disciplineOrderAdd'
|
||||||
? router.push(`/discipline-order`)
|
? router.push(`/discipline-order`)
|
||||||
: router.push(`/order`)
|
: router.push(`/order`)
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,12 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import type { treeTab } from "@/modules/05_placement/interface/index/Main";
|
import type { treeTab } from "@/modules/05_placement/interface/index/Main";
|
||||||
import type { ResponseOrganiz } from "@/modules/05_placement/interface/response/Order";
|
import type { ResponseOrganiz } from "@/modules/05_placement/interface/response/Order";
|
||||||
|
import type { complaintLists } from "@/modules/10_order/interface/response/Order";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { DataOption1, OrederResult } from "@/modules/10_order/interface/index/Main";
|
import type {
|
||||||
|
DataOption1,
|
||||||
|
OrederResult,
|
||||||
|
} from "@/modules/10_order/interface/index/Main";
|
||||||
|
|
||||||
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||||
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
||||||
|
|
@ -121,12 +125,6 @@ const caseFault = ref<string>("");
|
||||||
const result = ref<string>("");
|
const result = ref<string>("");
|
||||||
const refRaw = ref<string>("");
|
const refRaw = ref<string>("");
|
||||||
const complaintId = ref<string>("");
|
const complaintId = ref<string>("");
|
||||||
const complaintOption = ref<DataOption1[]>([
|
|
||||||
{
|
|
||||||
id: "00000000-0000-0000-0000-000000000000",
|
|
||||||
name: "ทุจริตต่อหน้าที่",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const typeOrderFilter = ref<any>({
|
const typeOrderFilter = ref<any>({
|
||||||
typeOrderOption: [],
|
typeOrderOption: [],
|
||||||
|
|
@ -138,6 +136,13 @@ onMounted(async () => {
|
||||||
} else {
|
} else {
|
||||||
await fecthTypeOption("noData");
|
await fecthTypeOption("noData");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
route.name == "disciplineOrderDatail" ||
|
||||||
|
route.name == "disciplineOrderAdd"
|
||||||
|
) {
|
||||||
|
await getComplaint();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// เลือกคำสั่งโดย
|
// เลือกคำสั่งโดย
|
||||||
watch(byOrder, async () => {
|
watch(byOrder, async () => {
|
||||||
|
|
@ -312,13 +317,62 @@ const fecthCommand = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const selectCMP = (selectOrder: OrederResult) => {
|
const selectCMP = async (selectOrder: OrederResult) => {
|
||||||
if (selectOrder != null) {
|
if (selectOrder != null) {
|
||||||
fecthExamRoundOption(selectOrder.commandCode);
|
fecthExamRoundOption(selectOrder.commandCode);
|
||||||
if (selectOrder.commandCode === "C-PM-10") {
|
if (selectOrder.commandCode === "C-PM-10") {
|
||||||
nodeTree();
|
nodeTree();
|
||||||
}
|
}
|
||||||
nameOrder.value = DataStore.nameOrderFilter(selectOrder.commandCode);
|
nameOrder.value = DataStore.nameOrderFilter(selectOrder.commandCode);
|
||||||
|
|
||||||
|
// บรรจุ แต่งตั้ง ย้าย 01 - 04
|
||||||
|
if (
|
||||||
|
selectOrder.commandCode == "C-PM-01" ||
|
||||||
|
selectOrder.commandCode == "C-PM-02" ||
|
||||||
|
selectOrder.commandCode == "C-PM-03" ||
|
||||||
|
selectOrder.commandCode == "C-PM-04"
|
||||||
|
) {
|
||||||
|
fecthExamRoundOption(selectOrder.commandCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// คำสั่งวินัย
|
||||||
|
// console.log(DataStore.complaintLists)
|
||||||
|
DataStore.complaintOption = [];
|
||||||
|
if (
|
||||||
|
selectOrder.commandCode == "C-PM-25" ||
|
||||||
|
selectOrder.commandCode == "C-PM-26"
|
||||||
|
) {
|
||||||
|
await DataStore.complaintLists
|
||||||
|
.filter((x: complaintLists) => x.isDisciplinary === true)
|
||||||
|
.map((val: complaintLists) => {
|
||||||
|
DataStore.complaintOption.push({ id: val.id, name: val.title });
|
||||||
|
});
|
||||||
|
} else if (selectOrder.commandCode == "C-PM-32") {
|
||||||
|
await DataStore.complaintLists
|
||||||
|
.filter(
|
||||||
|
(x: complaintLists) =>
|
||||||
|
x.isInvestigate === true ||
|
||||||
|
x.isDisciplinary === true ||
|
||||||
|
x.isResult === true
|
||||||
|
)
|
||||||
|
.map((val: complaintLists) => {
|
||||||
|
DataStore.complaintOption.push({ id: val.id, name: val.title });
|
||||||
|
});
|
||||||
|
} else if (
|
||||||
|
selectOrder.commandCode == "C-PM-19" ||
|
||||||
|
selectOrder.commandCode == "C-PM-20" ||
|
||||||
|
selectOrder.commandCode == "C-PM-27" ||
|
||||||
|
selectOrder.commandCode == "C-PM-28" ||
|
||||||
|
selectOrder.commandCode == "C-PM-29" ||
|
||||||
|
selectOrder.commandCode == "C-PM-30" ||
|
||||||
|
selectOrder.commandCode == "C-PM-31"
|
||||||
|
) {
|
||||||
|
await DataStore.complaintLists
|
||||||
|
.filter((x: complaintLists) => x.isResult === true)
|
||||||
|
.map((val: complaintLists) => {
|
||||||
|
DataStore.complaintOption.push({ id: val.id, name: val.title });
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//01-04
|
//01-04
|
||||||
examRound.value = "";
|
examRound.value = "";
|
||||||
|
|
@ -391,6 +445,21 @@ const fecthExamRoundOption = async (commandCode: string) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ดึงรายการเรื่องร้องเรียนจาก API
|
||||||
|
*/
|
||||||
|
async function getComplaint() {
|
||||||
|
await http
|
||||||
|
.get(config.API.disciplineReportList)
|
||||||
|
.then((res: any) => {
|
||||||
|
const dataArr = res.data.result;
|
||||||
|
DataStore.complaintLists = dataArr;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// บันทึกข้อมูล
|
// บันทึกข้อมูล
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
let signBy = null;
|
let signBy = null;
|
||||||
|
|
@ -557,6 +626,7 @@ const submit = async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// สร้างคำสัง
|
// สร้างคำสัง
|
||||||
const createListOrder = async (formData: Object, type: string) => {
|
const createListOrder = async (formData: Object, type: string) => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -1936,7 +2006,7 @@ const getClass = (val: boolean) => {
|
||||||
:label="`${'เรื่องร้องเรียน'}`"
|
:label="`${'เรื่องร้องเรียน'}`"
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="complaintOption"
|
:options="DataStore.complaintOption"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
|
|
@ -2160,7 +2230,7 @@ const getClass = (val: boolean) => {
|
||||||
:label="`${'เรื่องร้องเรียน'}`"
|
:label="`${'เรื่องร้องเรียน'}`"
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="complaintOption"
|
:options="DataStore.complaintOption"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ interface ResponseData {
|
||||||
personalId: string;
|
personalId: string;
|
||||||
selectStatus: boolean;
|
selectStatus: boolean;
|
||||||
sequence: number;
|
sequence: number;
|
||||||
refRecordId: string
|
refRecordId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ResponseOrganiz {
|
interface ResponseOrganiz {
|
||||||
|
|
@ -41,4 +41,14 @@ interface DataCopyOrder {
|
||||||
mutiselect: number[];
|
mutiselect: number[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export type { ResponseData, ResponseOrganiz, ResponseCopyOrder, DataCopyOrder };
|
interface complaintLists {
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
dateConsideration: Date | null;
|
||||||
|
isComplaint: boolean;
|
||||||
|
isInvestigate: boolean;
|
||||||
|
isDisciplinary: boolean;
|
||||||
|
isResult: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type { ResponseData, ResponseOrganiz, ResponseCopyOrder, DataCopyOrder, complaintLists };
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,18 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type { FormOrderPlacementMainData } from "@/modules/10_order/interface/request/Main";
|
import type { FormOrderPlacementMainData } from "@/modules/10_order/interface/request/Main";
|
||||||
|
import type { complaintLists } from "@/modules/10_order/interface/response/Order";
|
||||||
|
import type { DataOption1 } from "@/modules/10_order/interface/index/Main";
|
||||||
|
|
||||||
export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
||||||
interface placementOrder {
|
interface placementOrder {
|
||||||
mappingPosition: { columns: String[] };
|
mappingPosition: { columns: String[] };
|
||||||
}
|
}
|
||||||
|
|
||||||
const placementOrderData = ref<placementOrder>({
|
const placementOrderData = ref<placementOrder>({
|
||||||
mappingPosition: { columns: [] },
|
mappingPosition: { columns: [] },
|
||||||
});
|
});
|
||||||
|
|
||||||
const changePlacementColumns = (system: String, val: String[]) => {
|
const changePlacementColumns = (system: String, val: String[]) => {
|
||||||
if (system == "mappingPosition")
|
if (system == "mappingPosition")
|
||||||
placementOrderData.value.mappingPosition.columns = val;
|
placementOrderData.value.mappingPosition.columns = val;
|
||||||
|
|
@ -168,6 +172,9 @@ export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const complaintLists = ref<complaintLists[]>([]);
|
||||||
|
const complaintOption = ref<DataOption1[]>([]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
placementOrderData,
|
placementOrderData,
|
||||||
changePlacementColumns,
|
changePlacementColumns,
|
||||||
|
|
@ -178,5 +185,7 @@ export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
||||||
DataMainYearSetOrder,
|
DataMainYearSetOrder,
|
||||||
DataMainOrder,
|
DataMainOrder,
|
||||||
nameOrderFilter,
|
nameOrderFilter,
|
||||||
|
complaintLists,
|
||||||
|
complaintOption,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, reactive } from "vue";
|
import { onMounted, ref, reactive } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type {
|
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||||
FormCommand,
|
|
||||||
FormCommandRef,
|
|
||||||
} from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
|
||||||
|
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
import Stepper from "@/modules/12_evaluatePersonal/components/Detail/Stepper.vue";
|
import Stepper from "@/modules/12_evaluatePersonal/components/Detail/Stepper.vue";
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row col-12">
|
<div class="row col-12 q-pa-md">
|
||||||
<div class="toptitle">กรรมการและการประชุม</div>
|
<div class="toptitle">กรรมการและการประชุม</div>
|
||||||
|
|
||||||
<div class="row col-12 q-gutter-md">
|
<div class="row col-12 q-gutter-md">
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,21 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
/** importComponents */
|
||||||
import HeaderDialog from "@/components/DialogHeader.vue";
|
import HeaderDialog from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/**use*/
|
||||||
const mixins = useCounterMixin();
|
const mixins = useCounterMixin();
|
||||||
const { showLoader, hideLoader, date2Thai } = mixins;
|
const $q = useQuasar();
|
||||||
|
|
||||||
|
const { showLoader, hideLoader, date2Thai, messageError } = mixins;
|
||||||
|
|
||||||
/** รับ props Tab 1 */
|
/** รับ props Tab 1 */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -91,7 +97,9 @@ async function fetchListHistory(id: string) {
|
||||||
}));
|
}));
|
||||||
row.value = list;
|
row.value = list;
|
||||||
})
|
})
|
||||||
.catch((err) => {})
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,9 @@ function getFile(volume: number) {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const link = res.data.downloadUrl;
|
const link = res.data.downloadUrl;
|
||||||
const type = res.data.fileType;
|
const type = res.data.fileType;
|
||||||
|
|
||||||
getPDF(link, type);
|
getPDF(link, type);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch(() => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|
@ -116,8 +115,8 @@ function numToThai(val: number) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getFile(selectedItem.value);
|
await getFile(selectedItem.value);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,26 @@ import { ref, onMounted, defineProps, watch } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
/** importType*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { Director } from "@/modules/11_discipline/interface/request/disciplinary";
|
import type { Director } from "@/modules/11_discipline/interface/request/disciplinary";
|
||||||
import type {
|
|
||||||
responseType,
|
|
||||||
directorType,
|
|
||||||
} from "@/modules/11_discipline/interface/index/Main";
|
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
import DialogDirector from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/DialogDirector.vue";
|
import DialogDirector from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/DialogDirector.vue";
|
||||||
|
|
||||||
/** import store*/
|
/** import store*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
|
||||||
const router = useRouter();
|
/**use*/
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
|
const { showLoader, hideLoader, messageError, dialogConfirm, success } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
|
@ -30,10 +31,10 @@ const props = defineProps({
|
||||||
fetchdata: {
|
fetchdata: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => "",
|
default: () => "",
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
const { showLoader, hideLoader, messageError, dialogConfirm, success } = mixin;
|
|
||||||
|
|
||||||
|
/** คอลัมน์ กรรมการ */
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -98,40 +99,6 @@ function onClickClose() {
|
||||||
modalAddDirector.value = false;
|
modalAddDirector.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function เรียกรายชื่อกรรมการ*/
|
|
||||||
async function fetchDListDirector() {
|
|
||||||
// showLoader();
|
|
||||||
// await http
|
|
||||||
// .get(config.API.directorList(page.value, rowsPerPage.value, filter.value))
|
|
||||||
// .then((res) => {
|
|
||||||
// maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
|
||||||
// const data = res.data.result.data;
|
|
||||||
// let datalistDirector: responseType[] = data.map((e: directorType) => ({
|
|
||||||
// id: e.id,
|
|
||||||
// directorId: e.directorId,
|
|
||||||
// name: `${e.prefix}${e.firstName} ${e.lastName}`,
|
|
||||||
// prefix: e.prefix,
|
|
||||||
// firstName: e.firstName,
|
|
||||||
// lastName: e.lastName,
|
|
||||||
// position: e.position,
|
|
||||||
// email: e.email,
|
|
||||||
// phone: e.phone,
|
|
||||||
// total: e.total,
|
|
||||||
// duty: e.duty,
|
|
||||||
// }));
|
|
||||||
// // /** หารานชื่อกรรมการที่ไม่ซ้ำ*/
|
|
||||||
// listDirector.value = datalistDirector.filter(
|
|
||||||
// (i) => !rows.value.some((e) => e.directorId === i.id)
|
|
||||||
// );
|
|
||||||
// })
|
|
||||||
// .catch((err) => {
|
|
||||||
// messageError($q, err);
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function อัดเดท Paging กรรมการ
|
* function อัดเดท Paging กรรมการ
|
||||||
* @param rpp ต่อหน้า
|
* @param rpp ต่อหน้า
|
||||||
|
|
@ -154,28 +121,27 @@ function returnDirector(data: any) {
|
||||||
.put(config.API.evaluationChooseDirectors(id.value), {
|
.put(config.API.evaluationChooseDirectors(id.value), {
|
||||||
directors: dataList,
|
directors: dataList,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
success($q, "บันทึกสำเร็จ")
|
success($q, "บันทึกสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
props.fetchdata();
|
||||||
props.fetchdata()
|
|
||||||
onClickClose();
|
onClickClose();
|
||||||
|
hideLoader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getList() {
|
/** function เรียกรายชื่อกรรมการ*/
|
||||||
|
async function getList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.evaluateDirectorMain())
|
.get(config.API.evaluateDirectorMain())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
|
||||||
listDirector.value = data.map((item: any) => ({
|
listDirector.value = data.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
|
|
@ -206,15 +172,15 @@ watch(
|
||||||
() => {
|
() => {
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
rows.value = props.data.map((item: any) => ({
|
rows.value = props.data.map((item: any) => ({
|
||||||
id:item.id,
|
id: item.id,
|
||||||
name:`${item.prefix}${item.firstName} ${item.lastName}`,
|
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
prefix:item.prefix,
|
prefix: item.prefix,
|
||||||
firstName:item.firstName,
|
firstName: item.firstName,
|
||||||
lastName:item.lastName,
|
lastName: item.lastName,
|
||||||
position:item.position,
|
position: item.position,
|
||||||
positionName:item.positionName,
|
positionName: item.positionName,
|
||||||
email:item.email,
|
email: item.email,
|
||||||
phone:item.phone,
|
phone: item.phone,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -285,7 +251,6 @@ onMounted(() => {
|
||||||
:clickClose="onClickClose"
|
:clickClose="onClickClose"
|
||||||
:rows2="listDirector"
|
:rows2="listDirector"
|
||||||
v-model:filterKeyword2="filter"
|
v-model:filterKeyword2="filter"
|
||||||
:get-list="fetchDListDirector"
|
|
||||||
:rowsPerPage="rowsPerPage"
|
:rowsPerPage="rowsPerPage"
|
||||||
:page="page"
|
:page="page"
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,23 @@
|
||||||
import { ref, onMounted, watch, defineProps } from "vue";
|
import { ref, onMounted, watch, defineProps } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useRoute } from "vue-router";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
const router = useRouter();
|
/** importComponents*/
|
||||||
|
import DialogMeet from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/DialogMeet.vue";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
|
/** props*/
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
|
@ -20,11 +27,17 @@ const props = defineProps({
|
||||||
fetchdata: {
|
fetchdata: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => "",
|
default: () => "",
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
const { showLoader, hideLoader, messageError, dialogConfirm, date2Thai, success } =
|
|
||||||
mixin;
|
const {
|
||||||
import DialogMeet from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/DialogMeet.vue";
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
messageError,
|
||||||
|
dialogConfirm,
|
||||||
|
date2Thai,
|
||||||
|
success,
|
||||||
|
} = mixin;
|
||||||
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -90,8 +103,6 @@ function onClickClose() {
|
||||||
modalAdd.value = false;
|
modalAdd.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchListMeet() {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function อัดเดท Paging กรรมการ
|
* function อัดเดท Paging กรรมการ
|
||||||
* @param rpp ต่อหน้า
|
* @param rpp ต่อหน้า
|
||||||
|
|
@ -115,32 +126,25 @@ function returnData(data: any) {
|
||||||
meetings: dataList,
|
meetings: dataList,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "บันทึกสำเร็จ")
|
success($q, "บันทึกสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
props.fetchdata();
|
||||||
props.fetchdata()
|
|
||||||
onClickClose();
|
onClickClose();
|
||||||
|
hideLoader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** function เรียกข้อมูลการประชุม*/
|
||||||
async function getList() {
|
async function getList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(config.API.meeting())
|
||||||
config.API
|
|
||||||
.meeting
|
|
||||||
// currentPage.value,
|
|
||||||
// rowsPerPage.value,
|
|
||||||
// filterKeyword.value
|
|
||||||
()
|
|
||||||
)
|
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
listMeet.value = data.map((item: any) => ({
|
listMeet.value = data.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
|
|
@ -168,15 +172,11 @@ async function getList() {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.data,
|
() => props.data,
|
||||||
() => {
|
() => {
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
console.log(props.data)
|
|
||||||
rows.value = props.data.map((item: any) => ({
|
rows.value = props.data.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
date: `${date2Thai(item.dateStart as Date, false, true)} - ${date2Thai(
|
date: `${date2Thai(item.dateStart as Date, false, true)} - ${date2Thai(
|
||||||
|
|
@ -192,6 +192,10 @@ watch(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await getList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
|
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
|
||||||
|
|
@ -253,7 +257,6 @@ watch(
|
||||||
:clickClose="onClickClose"
|
:clickClose="onClickClose"
|
||||||
:rows2="listMeet"
|
:rows2="listMeet"
|
||||||
v-model:filterKeyword2="filter"
|
v-model:filterKeyword2="filter"
|
||||||
:get-list="fetchListMeet"
|
|
||||||
:rowsPerPage="rowsPerPage"
|
:rowsPerPage="rowsPerPage"
|
||||||
:page="page"
|
:page="page"
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,50 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watchEffect, watch, type PropType } from "vue";
|
import { ref, computed, watchEffect, watch, type PropType } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
/** importType*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
const selected = ref<directorType[]>([]);
|
const selected = ref<directorType[]>([]);
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
/** รับ props มาจากหน้าหลัก */
|
||||||
|
const props = defineProps({
|
||||||
|
Modal: Boolean,
|
||||||
|
clickClose: Function,
|
||||||
|
getData: Function,
|
||||||
|
rows2: Array,
|
||||||
|
filterKeyword2: String,
|
||||||
|
filterTable: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
maxPage: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
rowsPerPage: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
getList: {
|
||||||
|
type: Function,
|
||||||
|
default: () => "",
|
||||||
|
},
|
||||||
|
selectedRow: {
|
||||||
|
type: Array as PropType<directorType[]>,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
|
|
||||||
/** ค้นหาคอลัม */
|
/** ค้นหาคอลัม */
|
||||||
const visibleColumns2 = ref<string[]>([
|
const visibleColumns2 = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
|
|
@ -70,39 +103,6 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** รับ props มาจากหน้าหลัก */
|
|
||||||
const props = defineProps({
|
|
||||||
Modal: Boolean,
|
|
||||||
clickClose: Function,
|
|
||||||
getData: Function,
|
|
||||||
rows2: Array,
|
|
||||||
filterKeyword2: String,
|
|
||||||
filterTable: {
|
|
||||||
type: String,
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
maxPage: {
|
|
||||||
type: Number,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
rowsPerPage: {
|
|
||||||
type: Number,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
type: Number,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
getList: {
|
|
||||||
type: Function,
|
|
||||||
default: () => "",
|
|
||||||
},
|
|
||||||
selectedRow: {
|
|
||||||
type: Array as PropType<directorType[]>,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
/** แสดงจำนวนในตาราง */
|
/** แสดงจำนวนในตาราง */
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
descending: true,
|
descending: true,
|
||||||
|
|
@ -146,7 +146,6 @@ function updateProp(newPagination: any, page: number) {
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
if (props.Modal === true) {
|
if (props.Modal === true) {
|
||||||
selected.value = props.selectedRow;
|
selected.value = props.selectedRow;
|
||||||
props.getList();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,55 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watchEffect, watch, type PropType } from "vue";
|
import { ref, computed, watchEffect, watch, type PropType } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
/** importType*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
import type { directorType } from "@/modules/11_discipline/interface/index/Main";
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
const selected = ref<directorType[]>([]);
|
const selected = ref<directorType[]>([]);
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
/** ค้นหาคอลัม */
|
|
||||||
const visibleColumns2 = ref<string[]>([
|
/** รับ props มาจากหน้าหลัก */
|
||||||
"no",
|
const props = defineProps({
|
||||||
"name",
|
Modal: Boolean,
|
||||||
"position",
|
clickClose: Function,
|
||||||
"duty",
|
getData: Function,
|
||||||
"email",
|
rows2: Array,
|
||||||
"phone",
|
filterKeyword2: String,
|
||||||
"role",
|
filterTable: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
maxPage: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
rowsPerPage: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
getList: {
|
||||||
|
type: Function,
|
||||||
|
default: () => "",
|
||||||
|
},
|
||||||
|
selectedRow: {
|
||||||
|
type: Array as PropType<directorType[]>,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
/** emit*/
|
||||||
|
const emit = defineEmits([
|
||||||
|
"update:filterKeyword2",
|
||||||
|
"update:selected",
|
||||||
|
"update:pagination",
|
||||||
|
"returnDirector",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/**ข้อมูลหัว ตาราง*/
|
/**ข้อมูลหัว ตาราง*/
|
||||||
|
|
@ -72,39 +101,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** รับ props มาจากหน้าหลัก */
|
|
||||||
const props = defineProps({
|
|
||||||
Modal: Boolean,
|
|
||||||
clickClose: Function,
|
|
||||||
getData: Function,
|
|
||||||
rows2: Array,
|
|
||||||
filterKeyword2: String,
|
|
||||||
filterTable: {
|
|
||||||
type: String,
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
maxPage: {
|
|
||||||
type: Number,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
rowsPerPage: {
|
|
||||||
type: Number,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
type: Number,
|
|
||||||
require: true,
|
|
||||||
},
|
|
||||||
getList: {
|
|
||||||
type: Function,
|
|
||||||
default: () => "",
|
|
||||||
},
|
|
||||||
selectedRow: {
|
|
||||||
type: Array as PropType<directorType[]>,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
/** แสดงจำนวนในตาราง */
|
/** แสดงจำนวนในตาราง */
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
descending: true,
|
descending: true,
|
||||||
|
|
@ -118,13 +114,6 @@ const checkSelected = computed(() => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits([
|
|
||||||
"update:filterKeyword2",
|
|
||||||
"update:selected",
|
|
||||||
"update:pagination",
|
|
||||||
"returnDirector",
|
|
||||||
]);
|
|
||||||
|
|
||||||
/** เลือกกรรมการ */
|
/** เลือกกรรมการ */
|
||||||
async function onClickAddMeet() {
|
async function onClickAddMeet() {
|
||||||
emit("returnDirector", selected.value);
|
emit("returnDirector", selected.value);
|
||||||
|
|
@ -148,7 +137,6 @@ function updateProp(newPagination: any, page: number) {
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
if (props.Modal === true) {
|
if (props.Modal === true) {
|
||||||
selected.value = props.selectedRow;
|
selected.value = props.selectedRow;
|
||||||
props.getList();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,23 +67,22 @@ watch(props.data, async () => {
|
||||||
formData.position = props.data.position;
|
formData.position = props.data.position;
|
||||||
formData.phone = props.data.phone;
|
formData.phone = props.data.phone;
|
||||||
formData.email = props.data.email;
|
formData.email = props.data.email;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เพิ่มบุคลากร
|
* เพิ่มบุคลากร
|
||||||
*/
|
*/
|
||||||
function addEmployee() {
|
function addEmployee() {
|
||||||
if (idCard.value.length === 13) {
|
showLoader();
|
||||||
|
if (idCard.value.length === 17) {
|
||||||
console.log("idCard===>", idCard.value);
|
console.log("idCard===>", idCard.value);
|
||||||
showLoader();
|
|
||||||
http
|
http
|
||||||
.post(config.API.profileSearchPersonal(), {
|
.post(config.API.profileSearchPersonal(), {
|
||||||
fieldName: "idcard",
|
fieldName: "idcard",
|
||||||
keyword: idCard.value,
|
keyword: idCard.value,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
const dataApi = res.data.result;
|
const dataApi = res.data.result;
|
||||||
if (dataApi.length > 0) {
|
if (dataApi.length > 0) {
|
||||||
const dataList = dataApi[0];
|
const dataList = dataApi[0];
|
||||||
|
|
@ -104,12 +103,9 @@ function addEmployee() {
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
if (idCard.value.length !== 13) {
|
|
||||||
hideLoader();
|
|
||||||
dialogMessageNotify($q, "กรุณากรอกเลขบัตรประชาชนให้ครบ 13 หลัก");
|
|
||||||
} else {
|
} else {
|
||||||
console.log("nodata");
|
dialogMessageNotify($q, "กรุณากรอกเลขบัตรประชาชนให้ครบ 13 หลัก");
|
||||||
|
hideLoader();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -183,6 +179,7 @@ function inputEdit(val: boolean) {
|
||||||
ref="idCardRef"
|
ref="idCardRef"
|
||||||
for="idCardRef"
|
for="idCardRef"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
mask="#-####-#####-##-#"
|
||||||
:rules="[(val: string) => !!val || `${'กรุณากรอกรหัสบัตรประชาชน'}`]"
|
:rules="[(val: string) => !!val || `${'กรุณากรอกรหัสบัตรประชาชน'}`]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
const pdfSrcStore = ref<any>();
|
const pdfSrcStore = ref<any>();
|
||||||
const numOfPagesStore = ref<any>();
|
const numOfPagesStore = ref<any>();
|
||||||
|
|
||||||
|
/** คอลัมน์ ใบอนุญาตประกอบวิชาชีพ*/
|
||||||
const columnsCertificates = ref<QTableProps["columns"]>([
|
const columnsCertificates = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "certificateType",
|
name: "certificateType",
|
||||||
|
|
@ -74,6 +75,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/** คอลัมน์ ประวัติการรับราชการ*/
|
||||||
const columnSalaries = ref<QTableProps["columns"]>([
|
const columnSalaries = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "date",
|
name: "date",
|
||||||
|
|
@ -167,6 +169,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/** คอลัมน์ ประวัติการฝึกอบรมดูงาน*/
|
||||||
const columnTraining = ref<QTableProps["columns"]>([
|
const columnTraining = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
|
|
@ -233,6 +236,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => {
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/** คอลัมน์ ผลงานที่เคยเสนอขอประเมิน*/
|
||||||
const columnProjectsProposed = ref<QTableProps["columns"]>([
|
const columnProjectsProposed = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "receivedDate",
|
name: "receivedDate",
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type {
|
|
||||||
DataResponseList,
|
|
||||||
MainList,
|
|
||||||
} from "@/modules/12_evaluatePersonal/interface/index/meeting";
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
// store ระบบวินัย >> ข้อมูลพื้นฐาน >> กรรมการ
|
// store ระบบวินัย >> ข้อมูลพื้นฐาน >> กรรมการ
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { useRouter } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
/** importType*/
|
||||||
import type { OptionStatus } from "@/modules/12_evaluatePersonal/interface/index/Main";
|
import type { OptionStatus } from "@/modules/12_evaluatePersonal/interface/index/Main";
|
||||||
|
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
|
|
@ -18,6 +19,7 @@ const mixin = useCounterMixin();
|
||||||
const store = useEvalutuonStore();
|
const store = useEvalutuonStore();
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const { showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
|
/** request body*/
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(0);
|
const maxPage = ref<number>(0);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
|
|
@ -92,13 +94,13 @@ function resetFilter() {
|
||||||
|
|
||||||
/** function เรียกรายการคำขอประเมิน*/
|
/** function เรียกรายการคำขอประเมิน*/
|
||||||
async function fetchEvaluteList() {
|
async function fetchEvaluteList() {
|
||||||
|
showLoader();
|
||||||
const body = {
|
const body = {
|
||||||
page: currentPage.value,
|
page: currentPage.value,
|
||||||
pageSize: pageSize.value,
|
pageSize: pageSize.value,
|
||||||
keyword: filter.value,
|
keyword: filter.value,
|
||||||
status: selectedStatus.value,
|
status: selectedStatus.value,
|
||||||
};
|
};
|
||||||
showLoader();
|
|
||||||
await http
|
await http
|
||||||
.put(config.API.evaluationMain(), body)
|
.put(config.API.evaluationMain(), body)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -109,7 +111,7 @@ async function fetchEvaluteList() {
|
||||||
store.fetchData(data);
|
store.fetchData(data);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
@ -269,47 +271,15 @@ onMounted(async () => {
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
@update:pagination="updatePagination"
|
@update:pagination="updatePagination"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
|
||||||
ทั้งหมด {{ total }} รายการ
|
|
||||||
<q-pagination
|
|
||||||
v-model="currentPage"
|
|
||||||
active-color="primary"
|
|
||||||
color="dark"
|
|
||||||
:max="Number(maxPage)"
|
|
||||||
size="sm"
|
|
||||||
boundary-links
|
|
||||||
direction-links
|
|
||||||
></q-pagination>
|
|
||||||
</template>
|
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width></q-th>
|
|
||||||
<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-th>
|
|
||||||
</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 v-for="col in props.cols" :key="col.name" :props="props">
|
|
||||||
<div v-if="col.name == 'no'">
|
|
||||||
{{ (page - 1) * rowsPerPage + props.rowIndex + 1 }}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value }}
|
|
||||||
</div>
|
|
||||||
</q-td> -->
|
|
||||||
<q-td auto-width>
|
|
||||||
<q-icon
|
|
||||||
v-if="props.row.isDefault === true"
|
|
||||||
name="mdi-bookmark"
|
|
||||||
size="xs"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip>เวลา Default</q-tooltip>
|
|
||||||
</q-icon>
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
|
|
@ -325,6 +295,18 @@ onMounted(async () => {
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ total }} รายการ
|
||||||
|
<q-pagination
|
||||||
|
v-model="currentPage"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="Number(maxPage)"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue