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