fix(startDateSuspend):sort
This commit is contained in:
parent
ad80eae285
commit
dc3989acae
2 changed files with 236 additions and 288 deletions
|
|
@ -82,13 +82,8 @@ export default {
|
||||||
`${discipline}/director/${disciplineId}/${id}`,
|
`${discipline}/director/${disciplineId}/${id}`,
|
||||||
|
|
||||||
/** ผู้ถูกพักราชการ */
|
/** ผู้ถูกพักราชการ */
|
||||||
suspendMain: (
|
suspendMain: suspend,
|
||||||
page: number,
|
|
||||||
pageSize: number,
|
|
||||||
keyword: string,
|
|
||||||
type: string
|
|
||||||
) =>
|
|
||||||
`${suspend}?page=${page}&pageSize=${pageSize}&keyword=${keyword}&profileType=${type}`,
|
|
||||||
suspendById: (id: string) => `${suspend}/${id}`,
|
suspendById: (id: string) => `${suspend}/${id}`,
|
||||||
|
|
||||||
suspendReport: () => `${suspend}/report`,
|
suspendReport: () => `${suspend}/report`,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
|
|
@ -7,33 +7,28 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
||||||
|
import { usePagination } from "@/composables/usePagination";
|
||||||
import type {
|
|
||||||
dataType,
|
|
||||||
DataOption,
|
|
||||||
} from "@/modules/11_discipline/interface/response/suspend";
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
|
|
||||||
import DialogSendToCommand from "@/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue";
|
|
||||||
import {
|
import {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
checkPermissionList,
|
checkPermissionList,
|
||||||
checkPermissionCreate,
|
checkPermissionCreate,
|
||||||
} from "@/utils/permissions";
|
} from "@/utils/permissions";
|
||||||
|
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
import type {
|
||||||
|
dataType,
|
||||||
|
DataOption,
|
||||||
|
} from "@/modules/11_discipline/interface/response/suspend";
|
||||||
|
|
||||||
|
import DialogSendToCommand from "@/modules/11_discipline/components/7_ListSuspend/DialogSendToCommand.vue";
|
||||||
|
|
||||||
/** use */
|
/** use */
|
||||||
const dataStore = useDisciplineSuspendStore();
|
const dataStore = useDisciplineSuspendStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const { messageError, showLoader, hideLoader, date2Thai, convertDateToAPI } =
|
||||||
const {
|
useCounterMixin();
|
||||||
messageError,
|
const { pagination, params, onRequest } = usePagination("", getList);
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
success,
|
|
||||||
date2Thai,
|
|
||||||
convertDateToAPI,
|
|
||||||
} = mixin;
|
|
||||||
|
|
||||||
const date = ref<any>(null);
|
const date = ref<any>(null);
|
||||||
const employeeClass = ref<string>("");
|
const employeeClass = ref<string>("");
|
||||||
|
|
@ -49,19 +44,18 @@ const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"profileType",
|
"profileType",
|
||||||
"title",
|
"title",
|
||||||
"name",
|
"firstName",
|
||||||
"position",
|
"position",
|
||||||
"positionType",
|
"positionType",
|
||||||
"positionLevel",
|
"positionLevel",
|
||||||
"organization",
|
"organization",
|
||||||
"dateTotal",
|
"startDateSuspend",
|
||||||
"descriptionSuspend",
|
"descriptionSuspend",
|
||||||
"status",
|
"status",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const filterRef = ref<any>(null);
|
|
||||||
|
|
||||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
const rows2 = ref<dataType[]>([]);
|
const rows2 = ref<dataType[]>([]);
|
||||||
|
|
@ -79,7 +73,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
name: "profileType",
|
name: "profileType",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทตำแหน่ง",
|
label: "ประเภทตำแหน่ง",
|
||||||
sortable: true,
|
sortable: false,
|
||||||
field: "profileType",
|
field: "profileType",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
@ -94,7 +88,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "firstName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ชื่อ - นามสกุล",
|
label: "ชื่อ - นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
|
@ -135,7 +129,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateTotal",
|
name: "startDateSuspend",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันที่เริ่มต้น-สิ้นสุดคำสั่ง",
|
label: "วันที่เริ่มต้น-สิ้นสุดคำสั่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
|
@ -156,28 +150,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
name: "status",
|
name: "status",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สถานะ",
|
label: "สถานะ",
|
||||||
sortable: true,
|
sortable: false,
|
||||||
field: "status",
|
field: "status",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const openModal = () => (modal.value = true);
|
function openModal() {
|
||||||
|
modal.value = true;
|
||||||
const total = ref<number>(0);
|
|
||||||
const totalList = ref<number>(1);
|
|
||||||
const pagination = ref({
|
|
||||||
sortBy: "createdAt",
|
|
||||||
descending: true,
|
|
||||||
page: 1,
|
|
||||||
rowsPerPage: 10,
|
|
||||||
});
|
|
||||||
|
|
||||||
function resetFilter() {
|
|
||||||
filterKeyword.value = "";
|
|
||||||
filterRef.value.focus();
|
|
||||||
getSearch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** เปิด popup ส่งไปออกคำสั่ง โดย PENDING*/
|
/** เปิด popup ส่งไปออกคำสั่ง โดย PENDING*/
|
||||||
|
|
@ -201,28 +182,22 @@ function openModalOrder() {
|
||||||
/** ดึงข้อมูลหน้าหลัก */
|
/** ดึงข้อมูลหน้าหลัก */
|
||||||
async function getList() {
|
async function getList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
const params: Record<string, any> = {};
|
const paramsNew = {
|
||||||
if (date.value && date.value.length === 2) {
|
...params.value,
|
||||||
params.startDate = convertDateToAPI(date.value[0]);
|
keyword: filterKeyword.value.trim(),
|
||||||
params.endDate = convertDateToAPI(date.value[1]);
|
profileType: employeeClass.value,
|
||||||
}
|
...(date.value?.length === 2 && {
|
||||||
|
startDate: convertDateToAPI(date.value[0]),
|
||||||
|
endDate: convertDateToAPI(date.value[1]),
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(config.API.suspendMain, { params: paramsNew })
|
||||||
config.API.suspendMain(
|
|
||||||
pagination.value.page,
|
|
||||||
pagination.value.rowsPerPage,
|
|
||||||
filterKeyword.value.trim(),
|
|
||||||
employeeClass.value
|
|
||||||
),
|
|
||||||
{ params }
|
|
||||||
)
|
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result.data;
|
const result = await res.data.result;
|
||||||
totalList.value = Math.ceil(
|
pagination.value.rowsNumber = result.total;
|
||||||
res.data.result.total / pagination.value.rowsPerPage
|
await dataStore.getData(result.data);
|
||||||
);
|
|
||||||
total.value = res.data.result.total;
|
|
||||||
await dataStore.getData(data);
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -232,27 +207,11 @@ async function getList() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterFn() {
|
|
||||||
getSearch();
|
|
||||||
}
|
|
||||||
|
|
||||||
function updatePagination(newPagination: any) {
|
|
||||||
pagination.value.page = 1;
|
|
||||||
pagination.value.rowsPerPage = newPagination.rowsPerPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getSearch() {
|
function getSearch() {
|
||||||
pagination.value.page = 1;
|
pagination.value.page = 1;
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
|
||||||
() => pagination.value.rowsPerPage,
|
|
||||||
async () => {
|
|
||||||
getSearch();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
function convertType(val: string) {
|
function convertType(val: string) {
|
||||||
const data = val?.toLocaleUpperCase();
|
const data = val?.toLocaleUpperCase();
|
||||||
switch (data) {
|
switch (data) {
|
||||||
|
|
@ -275,221 +234,215 @@ onMounted(async () => {
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
รายชื่อผู้ถูกพักราชการ
|
รายชื่อผู้ถูกพักราชการ
|
||||||
</div>
|
</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm">
|
<q-card flat bordered>
|
||||||
<q-separator />
|
<div class="row q-pa-md q-col-gutter-sm">
|
||||||
<div class="row q-pa-md">
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row col-12 q-col-gutter-sm items-center">
|
<div class="row q-col-gutter-sm">
|
||||||
<div>
|
<div class="col-xs-12 col-sm-7 col-md-6 col-lg-5">
|
||||||
<q-select
|
<div class="row col-12 q-col-gutter-sm items-center">
|
||||||
v-model="employeeClass"
|
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
|
||||||
outlined
|
<q-select
|
||||||
dense
|
v-model="employeeClass"
|
||||||
options-dense
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="employeeClassOption"
|
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
label="ประเภทตำแหน่ง"
|
|
||||||
style="min-width: 200px"
|
|
||||||
@update:model-value="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<datepicker
|
|
||||||
v-model="date"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
range
|
|
||||||
:enableTimePicker="false"
|
|
||||||
@update:model-value="getList()"
|
|
||||||
style="min-width: 280px"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">{{ year + 543 }}</template>
|
|
||||||
<template #year-overlay-value="{ value }">{{
|
|
||||||
parseInt(value + 543)
|
|
||||||
}}</template>
|
|
||||||
<template #trigger>
|
|
||||||
<q-input
|
|
||||||
class="bg-white"
|
|
||||||
dense
|
|
||||||
outlined
|
outlined
|
||||||
:label="`${'วันที่เริ่มต้น-สิ้นสุดคำสั่ง'}`"
|
dense
|
||||||
:model-value="
|
options-dense
|
||||||
date ? `${date2Thai(date[0])} - ${date2Thai(date[1])}` : ''
|
emit-value
|
||||||
"
|
map-options
|
||||||
|
:options="employeeClassOption"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
label="ประเภทตำแหน่ง"
|
||||||
|
@update:model-value="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
|
||||||
|
<datepicker
|
||||||
|
v-model="date"
|
||||||
|
:locale="'th'"
|
||||||
|
autoApply
|
||||||
|
range
|
||||||
|
:enableTimePicker="false"
|
||||||
|
@update:model-value="getList()"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template #year="{ year }">{{ year + 543 }}</template>
|
||||||
<q-icon
|
<template #year-overlay-value="{ value }">{{
|
||||||
size="18px"
|
parseInt(value + 543)
|
||||||
name="event"
|
}}</template>
|
||||||
class="cursor-pointer"
|
<template #trigger>
|
||||||
color="primary"
|
<q-input
|
||||||
></q-icon>
|
class="bg-white"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
:label="`${'วันที่เริ่มต้น-สิ้นสุดคำสั่ง'}`"
|
||||||
|
:model-value="
|
||||||
|
date
|
||||||
|
? `${date2Thai(date[0])} - ${date2Thai(date[1])}`
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon
|
||||||
|
size="18px"
|
||||||
|
name="event"
|
||||||
|
class="cursor-pointer"
|
||||||
|
color="primary"
|
||||||
|
></q-icon>
|
||||||
|
</template>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="date !== null"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click.prevent.stop="(date = null), getList()"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
<div class="col-1 row justify-center">
|
||||||
|
<q-btn
|
||||||
|
v-if="
|
||||||
|
checkPermission($route)?.attrIsUpdate &&
|
||||||
|
checkPermissionList(['COMMAND']) &&
|
||||||
|
checkPermissionCreate('COMMAND')
|
||||||
|
"
|
||||||
|
@click="openModalOrder"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
color="primary"
|
||||||
|
icon="mdi-account-arrow-right"
|
||||||
|
>
|
||||||
|
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<q-space />
|
||||||
|
<div class="col-xs-12 col-sm-4 col-md-5 col-lg-4">
|
||||||
|
<div class="row q-col-gutter-sm items-center">
|
||||||
|
<div class="col-7">
|
||||||
|
<q-input
|
||||||
|
for="#search"
|
||||||
|
standout
|
||||||
|
dense
|
||||||
|
v-model="filterKeyword"
|
||||||
|
ref="filterRef"
|
||||||
|
outlined
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter.prevent="getSearch"
|
||||||
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon
|
<q-icon name="search" />
|
||||||
v-if="date !== null"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click.prevent.stop="(date = null), getList()"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</div>
|
||||||
</datepicker>
|
<div class="col-5">
|
||||||
|
<q-select
|
||||||
|
v-model="dataStore.visibleColumns"
|
||||||
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="columns"
|
||||||
|
option-value="name"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<q-btn
|
|
||||||
v-if="
|
|
||||||
checkPermission($route)?.attrIsUpdate &&
|
|
||||||
checkPermissionList(['COMMAND']) &&
|
|
||||||
checkPermissionCreate('COMMAND')
|
|
||||||
"
|
|
||||||
@click="openModalOrder"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
color="primary"
|
|
||||||
icon="mdi-account-arrow-right"
|
|
||||||
>
|
|
||||||
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
|
||||||
<q-space />
|
|
||||||
|
|
||||||
<q-input
|
|
||||||
for="#search"
|
|
||||||
standout
|
|
||||||
dense
|
|
||||||
v-model="filterKeyword"
|
|
||||||
ref="filterRef"
|
|
||||||
outlined
|
|
||||||
placeholder="ค้นหา"
|
|
||||||
@keydown.enter.prevent="filterFn"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon name="search" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
|
|
||||||
<q-select
|
|
||||||
v-model="dataStore.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>
|
||||||
|
|
||||||
<div class="col-12 q-pt-sm">
|
<div class="col-12">
|
||||||
<d-table
|
<p-table
|
||||||
:columns="dataStore.columns"
|
:columns="dataStore.columns"
|
||||||
:rows="dataStore.rows"
|
:rows="dataStore.rows"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="dataStore.visibleColumns"
|
:visible-columns="dataStore.visibleColumns"
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
@update:pagination="updatePagination"
|
v-model:pagination="pagination"
|
||||||
>
|
@request="onRequest"
|
||||||
<template v-slot:pagination="scope">
|
>
|
||||||
ทั้งหมด {{ total }} รายการ
|
<template v-slot:header="props">
|
||||||
<q-pagination
|
<q-tr :props="props">
|
||||||
v-model="pagination.page"
|
<q-th auto-width />
|
||||||
active-color="primary"
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
color="dark"
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
:max="Number(totalList)"
|
</q-th>
|
||||||
size="sm"
|
</q-tr>
|
||||||
boundary-links
|
</template>
|
||||||
direction-links
|
<template v-slot:body="props">
|
||||||
:max-pages="5"
|
<q-tr :props="props">
|
||||||
@update:model-value="getList"
|
<q-td auto-width>
|
||||||
></q-pagination>
|
<q-btn
|
||||||
</template>
|
v-if="checkPermission($route)?.attrIsGet"
|
||||||
<template v-slot:header="props">
|
@click="
|
||||||
<q-tr :props="props">
|
router.push(`/discipline-suspend-detail/${props.row.id}`)
|
||||||
<q-th auto-width />
|
"
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
flat
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
dense
|
||||||
</q-th>
|
round
|
||||||
<!-- <q-th auto-width /> -->
|
color="info"
|
||||||
</q-tr>
|
icon="mdi-eye"
|
||||||
</template>
|
>
|
||||||
<template v-slot:body="props">
|
<q-tooltip>รายละเอียด</q-tooltip>
|
||||||
<q-tr :props="props">
|
</q-btn>
|
||||||
<q-td auto-width>
|
<q-btn
|
||||||
<q-btn
|
v-if="
|
||||||
v-if="checkPermission($route)?.attrIsGet"
|
checkPermission($route)?.attrIsUpdate &&
|
||||||
@click="
|
checkPermission($route)?.attrIsGet
|
||||||
router.push(`/discipline-suspend-detail/${props.row.id}`)
|
"
|
||||||
"
|
@click="router.push(`/discipline-suspend/${props.row.id}`)"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
color="info"
|
color="edit"
|
||||||
icon="mdi-eye"
|
icon="edit"
|
||||||
>
|
>
|
||||||
<q-tooltip>รายละเอียด</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
</q-td>
|
||||||
v-if="
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
checkPermission($route)?.attrIsUpdate &&
|
<div v-if="col.name == 'no'">
|
||||||
checkPermission($route)?.attrIsGet
|
{{ props.rowIndex + 1 }}
|
||||||
"
|
</div>
|
||||||
@click="router.push(`/discipline-suspend/${props.row.id}`)"
|
<div
|
||||||
flat
|
v-else-if="col.name === 'firstName'"
|
||||||
dense
|
class="table_ellipsis"
|
||||||
round
|
>
|
||||||
color="edit"
|
{{ props.row.prefix ? props.row.prefix : ""
|
||||||
icon="edit"
|
}}{{ props.row.firstName ? props.row.firstName : "" }}
|
||||||
>
|
{{ props.row.lastName ? props.row.lastName : "" }}
|
||||||
<q-tooltip>แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย</q-tooltip>
|
</div>
|
||||||
</q-btn>
|
<div v-else-if="col.name === 'title'" class="table_ellipsis">
|
||||||
</q-td>
|
{{ props.row.title ? props.row.title : "-" }}
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
</div>
|
||||||
<div v-if="col.name == 'no'">
|
<div v-else-if="col.name === 'profileType'">
|
||||||
{{
|
{{
|
||||||
(pagination.page - 1) * pagination.rowsPerPage +
|
props.row.profileType
|
||||||
props.rowIndex +
|
? convertType(props.row.profileType.toUpperCase())
|
||||||
1
|
: "-"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name === 'name'" class="table_ellipsis">
|
<div
|
||||||
{{ props.row.prefix ? props.row.prefix : ""
|
v-else-if="col.name === 'organization'"
|
||||||
}}{{ props.row.firstName ? props.row.firstName : "" }}
|
class="text-html"
|
||||||
{{ props.row.lastName ? props.row.lastName : "" }}
|
style="width: 250px"
|
||||||
</div>
|
>
|
||||||
<div v-else-if="col.name === 'title'" class="table_ellipsis">
|
{{ props.row.organization ? props.row.organization : "-" }}
|
||||||
{{ props.row.title ? props.row.title : "-" }}
|
</div>
|
||||||
</div>
|
<div v-else>
|
||||||
<div v-else-if="col.name === 'profileType'">
|
{{ col.value ?? "-" }}
|
||||||
{{
|
</div>
|
||||||
props.row.profileType
|
</q-td>
|
||||||
? convertType(props.row.profileType.toUpperCase())
|
</q-tr>
|
||||||
: "-"
|
</template>
|
||||||
}}
|
</p-table>
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-else-if="col.name === 'organization'"
|
|
||||||
class="text-html"
|
|
||||||
style="width: 250px"
|
|
||||||
>
|
|
||||||
{{ props.row.organization ? props.row.organization : "-" }}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value ?? "-" }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue