แก้วินัย

This commit is contained in:
setthawutttty 2024-01-05 15:24:22 +07:00
parent 386e1a9811
commit 6646f8f6f4
9 changed files with 98 additions and 62 deletions

View file

@ -497,6 +497,7 @@ onMounted(() => {
>
<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"
@ -512,6 +513,15 @@ onMounted(() => {
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<td>
<router-link
target="_blank"
:to="`/registry/${props.row.personId}`"
><q-icon name="info" color="info" size="sm"
><q-tooltip>อมลในทะเบยนประว</q-tooltip>
</q-icon></router-link
>
</td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -520,24 +530,17 @@ onMounted(() => {
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'info'">
<router-link
target="_blank"
:to="`/registry/${props.row.personId}`"
><q-icon name="info" color="info" size="sm"
><q-tooltip
>อมลในทะเบยนประว</q-tooltip
>
</q-icon></router-link
>
{{ col.value }}
</div>
<div
v-else-if="col.name === 'organization'"
class="table_ellipsis"
>
{{ props.row.organization }}
</div>
<div
v-else-if="col.name === 'salary'"
>
{{ props.row.salary.toLocaleString() }}
</div>
<div v-else>
{{ col.value }}
</div>

View file

@ -298,17 +298,17 @@ watch(props.data, async () => {
);
const dataMap = props.data.directors.map((item: any) => ({
id: item.id ? item.id:'-',
directorId: item.directorId ? item.directorId:'-',
id: item.id ? item.id : "-",
directorId: item.directorId ? item.directorId : "-",
name: `${item.prefix}${item.firstName} ${item.lastName}`,
prefix: item.prefix ? item.prefix:'-',
firstName: item.firstName ? item.firstName:'-',
lastName: item.lastName ? item.lastName:'-',
position: item.position ? item.position:'-',
email: item.email ? item.email:'-',
phone: item.phone ? item.phone:'-',
commandNo: item.commandNo ? item.commandNo:'-',
duty: item.duty ? item.duty:'-',
prefix: item.prefix ? item.prefix : "-",
firstName: item.firstName ? item.firstName : "-",
lastName: item.lastName ? item.lastName : "-",
position: item.position ? item.position : "-",
email: item.email ? item.email : "-",
phone: item.phone ? item.phone : "-",
commandNo: item.commandNo ? item.commandNo : "-",
duty: item.duty ? item.duty : "-",
check: "props",
}));
@ -741,6 +741,7 @@ onMounted(async () => {
>
<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"
@ -756,6 +757,17 @@ onMounted(async () => {
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<td>
<router-link
target="_blank"
:to="`/registry/${props.row.personId}`"
><q-icon name="info" color="info" size="sm"
><q-tooltip
>อมลในทะเบยนประว</q-tooltip
>
</q-icon></router-link
>
</td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -764,23 +776,15 @@ onMounted(async () => {
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'info'">
<router-link
target="_blank"
:to="`/registry/${props.row.personId}`"
><q-icon name="info" color="info" size="sm"
><q-tooltip
>อมลในทะเบยนประว</q-tooltip
>
</q-icon></router-link
>
</div>
<div
v-else-if="col.name === 'organization'"
class="table_ellipsis"
>
{{ props.row.organization }}
</div>
<div v-else-if="col.name === 'salary'">
{{ props.row.salary.toLocaleString() }}
</div>
<div v-else>
{{ col.value }}
</div>

View file

@ -328,17 +328,17 @@ async function fetchDatadetail() {
);
/** MAP รายชื่อกรรมการ หน้าหลัก */
const dataMap = props.data.director.map((item: any) => ({
idRaw: item.id ? item.id:'-',
id: item.directorId ? item.directorId:'-',
idRaw: item.id ? item.id : "-",
id: item.directorId ? item.directorId : "-",
name: `${item.prefix}${item.firstName} ${item.lastName}`,
prefix: item.prefix ? item.prefix:'-',
firstName: item.firstName ? item.firstName:'-',
lastName: item.lastName ? item.lastName:'-',
position: item.position ? item.position:'-',
email: item.email ? item.email:'-',
phone: item.phone ? item.phone:'-',
duty: item.duty ? item.duty:'-',
commandNo: item.commandNo ? item.commandNo:'-',
prefix: item.prefix ? item.prefix : "-",
firstName: item.firstName ? item.firstName : "-",
lastName: item.lastName ? item.lastName : "-",
position: item.position ? item.position : "-",
email: item.email ? item.email : "-",
phone: item.phone ? item.phone : "-",
duty: item.duty ? item.duty : "-",
commandNo: item.commandNo ? item.commandNo : "-",
check: "props",
}));
@ -540,7 +540,7 @@ function emitPerson(data: PersonsArray[]) {
}
function openEditDirector(data: any) {
console.log(data)
console.log(data);
editDirectorId.value = data.idRaw;
modalEditDirector.value = true;
dutyVal.value = data.duty;
@ -766,6 +766,7 @@ onMounted(async () => {
>
<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"
@ -781,6 +782,17 @@ onMounted(async () => {
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<td>
<router-link
target="_blank"
:to="`/registry/${props.row.personId}`"
><q-icon name="info" color="info" size="sm"
><q-tooltip
>อมลในทะเบยนประว</q-tooltip
>
</q-icon></router-link
>
</td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -789,23 +801,15 @@ onMounted(async () => {
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'info'">
<router-link
target="_blank"
:to="`/registry/${props.row.personId}`"
><q-icon name="info" color="info" size="sm"
><q-tooltip
>อมลในทะเบยนประว</q-tooltip
>
</q-icon></router-link
>
</div>
<div
v-else-if="col.name === 'organization'"
class="table_ellipsis"
>
{{ props.row.organization }}
</div>
<div v-else-if="col.name === 'salary'">
{{ props.row.salary.toLocaleString() }}
</div>
<div v-else>
{{ col.value }}
</div>

View file

@ -65,6 +65,7 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
organizationId: "",
persons: [],
investigationExtendHistory: [],
isDisciplinary:false
});
const personObjComplaint = reactive<ArrayPerson>({

View file

@ -379,6 +379,11 @@ function closeDetail() {
>
{{ props.row.organization }}
</div>
<div
v-else-if="col.name === 'salary'"
>
{{ props.row.salary.toLocaleString() }}
</div>
<div v-else>
{{ col.value }}
</div>

View file

@ -314,7 +314,7 @@ function returnDetail(data: any) {
<q-card bordered>
<div class="col-12 row q-pa-md">
<div class="row col-12 q-col-gutter-md">
<div class="row col-12" v-if="data === null">
<div class="row col-12 q-col-gutter-sm" v-if="data === null">
<div class="row col-12 q-col-gutter-sm items-start">
<div class="col-12 col-sm-6 col-md-3">
<q-select
@ -337,6 +337,7 @@ function returnDetail(data: any) {
v-model="search"
outlined
clearable
hide-bottom-space
dense
label="คำค้น"
:rules="[(val) => !!val || `กรุณากรอกคำค้น`]"
@ -354,6 +355,8 @@ function returnDetail(data: any) {
</q-btn>
</div>
</div>
<div class="col-12">
<d-table
ref="table"

View file

@ -59,6 +59,7 @@ const visibleColumns = ref<string[]>([
"citizenId",
"caseType",
"caseNumber",
"description",
"lastUpdatedAt",
"status",
]);
@ -136,6 +137,17 @@ const columns = ref<QTableProps["columns"]>([
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "description",
align: "left",
label: "รายละเอียด",
sortable: true,
field: "description",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "lastUpdatedAt",
align: "left",
@ -185,10 +197,8 @@ function editPage(id: string) {
router.push(`/discipline-appealcomplain/${id}`);
}
function filterFn() {
console.log("enter", filterKeyword.value);
getData();
console.log("enter", filterKeyword.value);
getData();
}
function close() {
@ -440,7 +450,13 @@ onMounted(async () => {
1
}}
</div>
<div>
<div
v-else-if="col.name === 'description'"
class="table_ellipsis"
>
{{ props.row.description }}
</div>
<div v-else>
{{ col.value }}
</div>
</q-td>

View file

@ -70,6 +70,7 @@ export const useAppealComplainStore = defineStore(
status: statusTothai(e.status)
}));
rows.value = dataList;
console.log(rows.value)
}
function getRow(data: RowAddList[]) {
if (data) {

View file

@ -109,7 +109,6 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
/** หัวข้อที่เเสดงในตารางผู้ถูกร้องเรียน */
const visibleColumnsRespondent = ref<string[]>([
"info",
"no",
"idcard",
"name",