Merge branch 'nice_dev' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-07 10:48:14 +07:00
commit a69a2bbd29
4 changed files with 53 additions and 21 deletions

View file

@ -23,7 +23,7 @@
@click="selectData(props)"
class="cursor-pointer"
>
<div
<!-- <div
v-if="
col.name == 'receiveDate' ||
col.name == 'dateAnnounce' ||
@ -32,8 +32,8 @@
class="table_ellipsis"
>
{{ col.value == null ? null : date2Thai(col.value) }}
</div>
<div v-else-if="col.name == 'year'" class="table_ellipsis">
</div> -->
<div v-if="col.name == 'year'" class="table_ellipsis">
{{ col.value + 543 }}
</div>
<div v-else class="table_ellipsis">
@ -532,7 +532,7 @@ const checkValidate = ref<boolean>(false); //validate data ผ่านหรื
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const rows = ref<RequestItemsObject[]>([]);
const rows = ref<any>([]);
const filter = ref<string>(""); //search data table
const visibleColumns = ref<String[]>([]);
profileData.insignia.columns.length == 0
@ -550,6 +550,7 @@ profileData.insignia.columns.length == 0
"dateAnnounce",
"refCommandNo",
"refCommandDate",
"createdAt"
])
: (visibleColumns.value = profileData.insignia.columns);
const columns = ref<QTableProps["columns"]>([
@ -961,13 +962,13 @@ const fetchData = async () => {
volume: e.volume,
section: e.section,
page: e.page,
receiveDate: new Date(e.receiveDate),
dateAnnounce: new Date(e.dateAnnounce),
receiveDate: date2Thai(e.receiveDate),
dateAnnounce: date2Thai(e.dateAnnounce),
refCommandNo: e.refCommandNo,
refCommandDate:
e.refCommandDate == null ? null : new Date(e.refCommandDate),
e.refCommandDate == null ? null : date2Thai(e.refCommandDate),
createdFullName: e.createdFullName,
createdAt: new Date(e.createdAt),
createdAt: date2Thai(e.createdAt),
});
});
})

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted, watch, reactive, computed, } from "vue";
import { ref, onMounted, watch, reactive, computed } from "vue";
import { useQuasar, QForm } from "quasar";
import type { QTableProps } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
@ -216,7 +216,7 @@ const getTable = async () => {
await http
.get(config.API.personalList(examIdString))
.then(async (res: any) => {
// console.log(res);
console.log(res);
dataRes.value = res.data.result;
rowsAll.value = [];
(rowsFilter.value = []),
@ -226,7 +226,7 @@ const getTable = async () => {
idCard: data.idCard,
fullName: data.fullName + " " + data.idCard,
name: data.fullName,
profilePhoto: data.profilePhoto,
profilePhoto: data.profilePhoto ?? "",
organizationName:
data.organizationName +
" " +
@ -616,11 +616,15 @@ const paginationLabel = (start: number, end: number, total: number) => {
<q-item v-ripple>
<q-item-section avatar>
<img
v-if="props.row.avatar == null"
v-if="props.row.profilePhoto == ''"
src="@/assets/avatar_user.jpg"
class="col-4 img-info"
/>
<img v-else :src="props.row.avatar" class="col-4 img-info" />
<img
v-else
:src="props.row.profilePhoto"
class="col-4 img-info"
/>
</q-item-section>
<q-item-section>

View file

@ -43,10 +43,12 @@ export const useResultDataStore = defineStore("insigniaResult", () => {
position: e.position,
status: status(e.status),
dateReceive: date2Thai(e.dateReceive),
name: e.fullName,
name: e.prefix + e.fullName,
type: e.requestInsignia,
employeeType: profileType(e.profileType),
profileType: e.profileType,
volumeNo: e.volumeNo,
section: e.section,
page: e.page,
number: e.no,
vatnumber: e.number,

View file

@ -85,7 +85,6 @@ const fecthInsigniaType = async () => {
.catch((err) => {
messageError($q, err);
console.log("fecthInsigniaType");
});
};
const visibleColumns = ref<String[]>([
@ -96,6 +95,8 @@ const visibleColumns = ref<String[]>([
"type",
"dateReceive",
"employeeType",
"volumeNo",
"section",
"page",
"number",
"vatnumber",
@ -114,7 +115,6 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "status",
align: "left",
@ -142,6 +142,15 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "employeeType",
align: "left",
label: "สถานภาพ",
field: "employeeType",
sortable: true,
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "type",
align: "left",
@ -161,14 +170,24 @@ const columns = ref<QTableProps["columns"]>([
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "employeeType",
name: "volumeNo",
align: "left",
label: "สถานภาพ",
field: "employeeType",
label: "เล่มในราชกิจนุเบกษา",
field: "volumeNo",
sortable: true,
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "section",
align: "left",
label: "ตอนในราชกิจนุเบกษา",
field: "section",
sortable: true,
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "page",
align: "left",
@ -540,7 +559,10 @@ const paginationLabel = (start: number, end: number, total: number) => {
:borderless="false"
style="min-width: 150px"
@update:model-value="
DataStore.searchData(DataStore.invoiceType,DataStore.employeeClass)
DataStore.searchData(
DataStore.invoiceType,
DataStore.employeeClass
)
"
/>
</div>
@ -561,7 +583,10 @@ const paginationLabel = (start: number, end: number, total: number) => {
:borderless="false"
style="min-width: 150px"
@update:model-value="
DataStore.searchData(DataStore.invoiceType,DataStore.employeeClass)
DataStore.searchData(
DataStore.invoiceType,
DataStore.employeeClass
)
"
/>
</div>