Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-12-10 13:54:54 +07:00
commit 5f654f7567
9 changed files with 139 additions and 119 deletions

View file

@ -1,7 +1,6 @@
VITE_COMPETITIVE_EXAM_PANEL=VITE_COMPETITIVE_EXAM_PANEL
VITE_QUALIFY_DISABLE_EMAM_PANEL=VITE_QUALIFY_DISABLE_EMAM_PANEL
VITE_QUALIFY_EXAM_PANEL=VITE_QUALIFY_EXAM_PANEL
VITE_S3CLUSTER_PUBLIC_URL=VITE_S3CLUSTER_PUBLIC_URL
VITE_API_PUBLISH_URL=VITE_API_PUBLISH_URL
VITE_API_REPORT_URL=VITE_API_REPORT_URL
VITE_MANUAL_URL: VITE_MANUAL_URL

View file

@ -11,7 +11,6 @@ do
sed -i 's|VITE_COMPETITIVE_EXAM_PANEL|'${VITE_COMPETITIVE_EXAM_PANEL}'|g' $file
sed -i 's|VITE_QUALIFY_DISABLE_EMAM_PANEL|'${VITE_QUALIFY_DISABLE_EMAM_PANEL}'|g' $file
sed -i 's|VITE_QUALIFY_EXAM_PANEL|'${VITE_QUALIFY_EXAM_PANEL}'|g' $file
sed -i 's|VITE_S3CLUSTER_PUBLIC_URL|'${VITE_S3CLUSTER_PUBLIC_URL}'|g' $file
sed -i 's|VITE_API_PUBLISH_URL|'${VITE_API_PUBLISH_URL}'|g' $file
sed -i 's|VITE_API_REPORT_URL|'${VITE_API_REPORT_URL}'|g' $file
sed -i 's|VITE_MANUAL_URL|'${VITE_MANUAL_URL}'|g' $file

View file

@ -77,7 +77,6 @@ export const compettitivePanel = import.meta.env.VITE_COMPETITIVE_EXAM_PANEL;
export const qualifyDisableExamPanel = import.meta.env
.VITE_QUALIFY_DISABLE_EMAM_PANEL;
export const qualifyExamPanel = import.meta.env.VITE_QUALIFY_EXAM_PANEL;
export const s3ClusterUrl = import.meta.env.VITE_S3CLUSTER_PUBLIC_URL;
const API = {
//Metadata
@ -351,7 +350,6 @@ export default {
compettitivePanel,
qualifyDisableExamPanel,
qualifyExamPanel,
s3ClusterUrl,
manualConfig,
generatePopupPath,
};

View file

@ -29,6 +29,7 @@ const {
messageError,
dialogMessageNotify,
dialogConfirm,
onSearchDataTable,
} = useCounterMixin();
const route = useRoute();
@ -197,6 +198,8 @@ const visibleColumns = ref<string[]>([
/** Position*/
const positionNo = ref<PositionNo[]>([]); //
const positionNoMain = ref<PositionNo[]>([]); //
const positionId = ref<string>(""); //id
const seletcId = ref<string>(""); // id
const selectedPos = ref<any[]>([]); //
@ -278,6 +281,7 @@ async function fetchDataTable(id: string, level: number = 0) {
}
});
positionNo.value = dataMain;
positionNoMain.value = dataMain;
})
.catch((err) => {
messageError($q, err);
@ -416,6 +420,14 @@ async function onClickSelectPos(id: string) {
}
}
function serchDataTable() {
positionNo.value = onSearchDataTable(
filters.value,
positionNoMain.value,
columns.value ? columns.value : []
);
}
/** callback function เมื่อมีการเปิด popup*/
watch(
() => modal.value,
@ -489,12 +501,7 @@ onBeforeMount(async () => {
label="ค้นหา"
>
<template v-slot:append>
<q-icon
v-if="filterTree !== ''"
name="clear"
class="cursor-pointer"
@click="filterTree = ''"
/>
<q-icon name="search" color="grey-5" />
</template>
</q-input>
<q-tree
@ -503,7 +510,7 @@ onBeforeMount(async () => {
default-expand-all
:nodes="lazy"
node-key="orgTreeId"
label-key="orgTreeName"
label-key="labelName"
:filter="filterTree.trim()"
no-results-label="ไม่พบข้อมูลที่ค้นหา"
no-nodes-label="ไม่มีข้อมูล"
@ -566,7 +573,7 @@ onBeforeMount(async () => {
<div class="col-12"><q-separator /></div>
<div class="col-12 q-pa-md">
<q-toolbar style="padding: 0px">
<div class="row q-gutter-md">
<div class="row q-gutter-sm">
<q-checkbox
keep-color
v-model="isBlank"
@ -578,7 +585,7 @@ onBeforeMount(async () => {
</div>
<q-space />
<div class="row q-gutter-md">
<div class="row q-gutter-sm">
<q-checkbox
keep-color
v-model="isAll"
@ -595,6 +602,7 @@ onBeforeMount(async () => {
dense
v-model="filters"
label="ค้นหา"
@keydown.enter.pervent="serchDataTable"
>
<template v-slot:append>
<q-icon name="search" color="grey-5" />
@ -613,7 +621,6 @@ onBeforeMount(async () => {
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
</div>
@ -623,7 +630,6 @@ onBeforeMount(async () => {
ref="table"
:columns="columns"
:rows="positionNo"
:filter="filters"
row-key="id"
flat
bordered
@ -686,73 +692,6 @@ onBeforeMount(async () => {
</q-tr>
</template>
</d-table>
<!-- <d-table
ref="table"
:columns="columns"
:rows="positionNo"
:filter="filters"
row-key="id"
flat
bordered
:paging="true"
dense
:rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="visibleColumns"
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<span class="text-weight-medium">{{
col.label
}}</span>
</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"
@click="onClickSelectPos(props.row.id)"
:class="
props.row.id === positionId ? 'bg-blue-2' : ''
"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name === 'posMasterNo'">
{{
props.row.isSit
? col.value + " " + "(นั่งทับตำแหน่ง)"
: col.value
}}
</div>
<div v-else-if="col.name === 'isPosition'">
<div v-if="col.value">
<q-icon
name="done"
color="primary"
size="24px"
>
<q-tooltip>ตรงตามตำแหน </q-tooltip>
</q-icon>
</div>
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table> -->
</div>
</q-card>
</div>

View file

@ -17,7 +17,7 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
const $q = useQuasar();
const {
success,
onSearchDataTable,
messageError,
showLoader,
hideLoader,
@ -38,6 +38,7 @@ const props = defineProps({
const filter = ref<string>(""); //
const rows = ref<DataEmployee[]>([]); //
const rowsMain = ref<DataEmployee[]>([]); //
const selected = ref<DataEmployee[]>([]); //
const columns = ref<QTableProps["columns"]>([
{
@ -63,7 +64,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: (row) => `${row.prefix}${row.firstName} ${row.lastName}`,
field: "fullname",
format(val, row) {
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
headerStyle: "font-size: 14px; min-width: 200px",
style: "font-size: 14px; ",
},
@ -147,7 +151,10 @@ const columns = ref<QTableProps["columns"]>([
align: "left",
label: "สถานะ",
sortable: true,
field: (row) => statusText(row.draftOrgEmployeeStatus),
field: "statustext",
format(val, row) {
return statusText(row.draftOrgEmployeeStatus);
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -195,6 +202,8 @@ function fetchList() {
...e,
profileId: e.id,
}));
rowsMain.value = rows.value;
})
.catch((err) => {
messageError($q, err);
@ -209,6 +218,14 @@ function closeDialog() {
modal.value = false;
}
function serchDataTable() {
rows.value = onSearchDataTable(
filter.value,
rowsMain.value,
columns.value ? columns.value : []
);
}
/**
* ทำเม modal เป true
* ทำการเรยก fetchList เพอขอมลราชชอสงออกคำส
@ -235,10 +252,10 @@ watch(
borderless
outlined
dense
debounce="300"
v-model="filter"
ref="filterRef"
placeholder="ค้นหา"
@keydown.enter.pervent="serchDataTable"
style="max-width: auto"
>
<template v-slot:append>
@ -256,7 +273,6 @@ watch(
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
class="gt-xs q-ml-sm"
/>
@ -267,7 +283,6 @@ watch(
:rows="rows"
:columns="columns"
:visible-columns="visibleColumns"
:filter="filter"
row-key="id"
selection="multiple"
v-model:selected="selected"

View file

@ -20,11 +20,13 @@ const {
findPosMasterNoOld,
findOrgNameOld,
date2Thai,
onSearchDataTable,
} = mixin;
const modal = defineModel<boolean>("modal", { required: true });
const filterKeyword = ref<string>("");
const rows = ref<any[]>([]);
const rowsMain = ref<any[]>([]);
//
const columns = ref<QTableProps["columns"]>([
@ -210,6 +212,7 @@ function getData() {
.then((res) => {
const data = res.data.result;
rows.value = data;
rowsMain.value = data;
})
.catch((e) => {
messageError($q, e);
@ -218,12 +221,25 @@ function getData() {
hideLoader();
});
}
function serchDataTable() {
rows.value = onSearchDataTable(
filterKeyword.value,
rowsMain.value,
columns.value ? columns.value : []
);
}
watch(
() => modal.value,
(n) => {
if (n == true) {
getData();
} else rows.value = [];
} else {
rows.value = [];
rowsMain.value = [];
filterKeyword.value = "";
}
}
);
</script>
@ -233,13 +249,43 @@ watch(
<DialogHeader tittle="ข้อมูลการช่วยราชการ" :close="close" />
<q-separator />
<q-card-section>
<div class="row">
<div class="row q-col-gutter-sm">
<div class="col-12 row">
<q-space />
<div class="row q-col-gutter-sm">
<q-input
dense
outlined
v-model="filterKeyword"
label="ค้นหา"
@keydown.enter.pervent="serchDataTable"
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
<q-select
v-model="visibleColumns"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns"
option-value="name"
style="min-width: 140px"
/>
</div>
</div>
<div class="col-12">
<d-table
ref="table"
:columns="columns"
:rows="rows"
:filter="filterKeyword"
row-key="id"
flat
bordered

View file

@ -112,7 +112,6 @@ const columns = ref<QTableProps["columns"]>([
]);
const kpiUserPlannedId = ref<string>("");
const filterKeyword = ref<string>("");
const modal = ref<boolean>(false);
const isStatusEdit = ref<boolean>(false);
const modalEvaluate = ref<boolean>(false);
@ -257,7 +256,6 @@ watch(
ref="table"
:columns="columns"
:rows="rows"
:filter="filterKeyword"
row-key="id"
flat
bordered

View file

@ -20,7 +20,14 @@ interface ListMain {
const profileId = ref<string>("");
const $q = useQuasar();
const mixin = useCounterMixin();
const { messageError, findOrgName, showLoader, hideLoader, date2Thai } = mixin;
const {
messageError,
findOrgName,
showLoader,
hideLoader,
date2Thai,
onSearchDataTable,
} = mixin;
const mode = ref<any>($q.screen.gt.xs);
const profileImg = ref<string>("");
@ -41,6 +48,7 @@ const sizeImg = ref<string>("");
/** Table */
const rows = ref<ListMain[]>([]);
const rowsMain = ref<ListMain[]>([]);
const filter = ref<string>("");
const columns = ref<QTableProps["columns"]>([
{
@ -150,6 +158,7 @@ async function getList(id: string) {
.then(async (res) => {
const data = await res.data.result;
rows.value = data;
rowsMain.value = data;
})
.catch((e) => {
messageError($q, e);
@ -208,6 +217,14 @@ function onDetail(id: string) {
router.push(`/probation/detail/${profileId.value}/${id}`);
}
function serchDataTable() {
rows.value = onSearchDataTable(
filter.value,
rowsMain.value,
columns.value ? columns.value : []
);
}
onMounted(async () => {
await getMain();
});
@ -225,6 +242,11 @@ onMounted(async () => {
@click="router.go(-1)"
/>
รายละเอยดงานทไดบมอบหมาย
{{
formData.firstName
? `${formData.prefix}${formData.firstName} ${formData.lastName}`
: ""
}}
</div>
<div class="row q-col-gutter-md">
<div v-if="$q.screen.gt.xs" class="col-12">
@ -236,6 +258,7 @@ onMounted(async () => {
: "-"
}}</span>
</div>
<q-separator />
<q-resize-observer @resize="onResize" />
<q-card-section class="q-pa-md">
<div class="row">
@ -324,31 +347,21 @@ onMounted(async () => {
</q-list>
</q-card>
</div>
<div class="col-12 row">
<q-card bordered class="col-12 q-pa-md">
<div class="row">
<q-space />
<q-input
class="inputgreen"
outlined
dense
v-model="filter"
label="ค้นหา"
:style="mode ? `max-width: 200px` : `max-width: 150px`"
@keydown.enter.pervent="serchDataTable"
>
<template v-slot:append>
<q-icon
v-if="filter !== ''"
name="clear"
class="cursor-pointer"
@click="filter = ''"
/>
<q-icon
v-else
name="search"
class="cursor-pointer"
@click="filter = ''"
/>
<q-icon name="search" />
</template>
</q-input>
<q-select
@ -359,7 +372,6 @@ onMounted(async () => {
outlined
emit-value
map-options
options-dense
option-value="name"
style="min-width: 140px"
@ -378,7 +390,6 @@ onMounted(async () => {
:rows="rows"
:columns="columns"
:grid="!$q.screen.gt.xs"
:filter="filter.trim()"
:rows-per-page-options="[10, 25, 50, 100]"
:visible-columns="visibleColumns"
:virtual-scroll-sticky-size-start="48"

View file

@ -9,7 +9,7 @@ import type { QTableProps } from "quasar";
import type { ResRecord } from "@/modules/15_development/interface/response/Main";
const $q = useQuasar();
const { date2Thai } = useCounterMixin();
const { date2Thai, onSearchDataTable } = useCounterMixin();
//prosp
const isProfile = defineModel<boolean>("isProfile", { required: true });
@ -18,6 +18,8 @@ const listPerson = defineModel<ResRecord[]>("listPerson", { required: true });
// Table
const keyword = ref<string>("");
const rows = ref<ResRecord[]>([]);
const rowsMain = ref<ResRecord[]>([]);
// baseColumns
const baseColumns = ref<QTableProps["columns"]>([
{
@ -67,6 +69,11 @@ const baseColumns = ref<QTableProps["columns"]>([
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullName",
format(val, row) {
return row.firstName
? `${row.prefix}${row.firstName} ${row.lastName}`
: "-";
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
@ -239,6 +246,15 @@ function fetchDataProject() {
rows.value = listPerson.value.filter(
(e: ResRecord) => e.isProfile === isProfile.value
);
rowsMain.value = rows.value;
}
function serchDataTable() {
rows.value = onSearchDataTable(
keyword.value,
rowsMain.value,
columns.value ? columns.value : []
);
}
/** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */
@ -250,7 +266,14 @@ onMounted(() => {
<template>
<q-toolbar style="padding: 0px" class="q-mb-xs">
<q-space />
<q-input dense outlined v-model="keyword" label="ค้นหา" class="q-mr-sm">
<q-input
dense
outlined
v-model="keyword"
label="ค้นหา"
class="q-mr-sm"
@keydown.enter.pervent="serchDataTable"
>
<template v-slot:append>
<q-icon name="search" />
</template>
@ -281,7 +304,6 @@ onMounted(() => {
:columns="columns"
:rows="rows"
:paging="true"
:filter="keyword"
v-model:pagination="pagination"
:rows-per-page-options="[20, 50, 100]"
:visible-columns="visibleColumns"
@ -318,13 +340,6 @@ onMounted(() => {
</q-icon>
</div>
<div v-else-if="col.name == 'fullName'">
{{
props.row.firstName
? `${props.row.prefix}${props.row.firstName}${props.row.lastName}`
: "-"
}}
</div>
<div v-else-if="col.name === 'org'" class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>