วินัยรองรับลูกจ้างประจำ กทม.
This commit is contained in:
parent
77a3e7b57f
commit
9bb81be90d
20 changed files with 370 additions and 106 deletions
|
|
@ -86,6 +86,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "profileType",
|
||||
align: "left",
|
||||
label: "สถานภาพ",
|
||||
sortable: false,
|
||||
field: "profileType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "idcard",
|
||||
align: "left",
|
||||
|
|
@ -157,6 +166,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
/** หัวข้อที่เเสดงในตาราง */
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"profileType",
|
||||
"idcard",
|
||||
"name",
|
||||
"posNo",
|
||||
|
|
|
|||
|
|
@ -201,10 +201,10 @@ function upLoadFileDoc() {
|
|||
* ฟังก์ชั่นเพิ่มรายชื่อผู้ถูกสอบสวนจาก popup มายังรายการผู้ถูกสอบสวนหน้าหลัก
|
||||
* @param data ข้อมูลรายชื่อผู้ถูกสอบสวนเป็น array
|
||||
*/
|
||||
async function addPerson(data: any) {
|
||||
async function addPerson(data: any, type?: string) {
|
||||
toggleModal();
|
||||
changeFormData();
|
||||
await mainStore.fetchData(data);
|
||||
await mainStore.fetchData(data, type);
|
||||
}
|
||||
|
||||
/** ดึงข้อมูล active */
|
||||
|
|
@ -629,6 +629,13 @@ onMounted(async () => {
|
|||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? mainStore.convertType(props.row.profileType)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
|
|
@ -1101,7 +1108,6 @@ onMounted(async () => {
|
|||
:close="toggleModal"
|
||||
:save="addPerson"
|
||||
:selected-data="mainStore.rowsAdd"
|
||||
@returnData="handleSave"
|
||||
/>
|
||||
|
||||
<PopupPersonal
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { useInvestigateFactStore } from "@/modules/11_discipline/store/Investiga
|
|||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||
|
||||
import type { ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
||||
import type {
|
||||
FormData as FormDataComplaint,
|
||||
ArrayPerson,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { useInvestigateDisStore } from "@/modules/11_discipline/store/Investigat
|
|||
import { useInvestigateFactStore } from "@/modules/11_discipline/store/InvestigateFactStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import type { FormData } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
||||
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
|
||||
|
||||
import CalandarDialog from "@/modules/11_discipline/components/2_InvestigateFacts/CalandarDialog.vue";
|
||||
|
|
@ -33,7 +33,7 @@ const checkRoutePermisson = ref<boolean>(
|
|||
const id = ref<string>(route.params.id as string);
|
||||
const modalPerson = ref<boolean>(false);
|
||||
const toggleModal = () => (modalPerson.value = !modalPerson.value);
|
||||
|
||||
const isEmpType = ref<string>('')
|
||||
/**เรียกใช้ store */
|
||||
const investigateFactStore = useInvestigateFactStore();
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
|
@ -313,16 +313,8 @@ function confirmDelete(id: string) {
|
|||
.finally(() => {});
|
||||
}
|
||||
|
||||
async function addPerson(data: any) {
|
||||
await mainStore.fetchData(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังชั่น รับค่าจาก คอมโพเเนน
|
||||
* @param returnData ค่าที่ได้คืนมา
|
||||
*/
|
||||
function handleSave(returnData: any) {
|
||||
addPerson(returnData);
|
||||
async function addPerson(data: any, type: string) {
|
||||
await mainStore.fetchData(data, type);
|
||||
changeFormData();
|
||||
toggleModal();
|
||||
}
|
||||
|
|
@ -552,9 +544,10 @@ async function saveDuty(id: string, duty: string, resolution: string) {
|
|||
}
|
||||
|
||||
/** ดูข้อมูลในทะเบียนประวัติ */
|
||||
function onclickViewinfo(id: string) {
|
||||
function onclickViewinfo(id: string,type:string) {
|
||||
modalPersonal.value = true;
|
||||
personId.value = id;
|
||||
isEmpType.value = type
|
||||
}
|
||||
|
||||
/** อัพเดต ปิด/เปิดเมนู ทะเบียนประวัติ */
|
||||
|
|
@ -658,6 +651,7 @@ watch(props.data, async () => {
|
|||
idcard: person.idcard,
|
||||
name: person.name,
|
||||
prefix: person.prefix,
|
||||
profileType: person.profileType,
|
||||
firstName: person.firstName,
|
||||
lastName: person.lastName,
|
||||
position: person.position,
|
||||
|
|
@ -958,7 +952,12 @@ onMounted(async () => {
|
|||
round
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click="onclickViewinfo(props.row.personId)"
|
||||
@click="
|
||||
onclickViewinfo(
|
||||
props.row.personId,
|
||||
props.row.profileType
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -994,6 +993,13 @@ onMounted(async () => {
|
|||
<div v-else-if="col.name === 'salary'">
|
||||
{{ props.row.salary.toLocaleString() }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? mainStore.convertType(props.row.profileType)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value ?? "-" }}
|
||||
</div>
|
||||
|
|
@ -1755,7 +1761,7 @@ onMounted(async () => {
|
|||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||
:close="toggleModal"
|
||||
:selected-data="mainStore.rowsAdd"
|
||||
@returnData="handleSave"
|
||||
:save="addPerson"
|
||||
/>
|
||||
|
||||
<DialogDirector
|
||||
|
|
@ -1796,6 +1802,7 @@ onMounted(async () => {
|
|||
:modal="modalPersonal"
|
||||
:id="personId"
|
||||
@update:modal="updatemodalPersonal"
|
||||
v-model:is-employee="isEmpType"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import type {
|
|||
ArrayPerson,
|
||||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
||||
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ const calendarModal = ref<boolean>(false);
|
|||
const calendarModalclose = () => (calendarModal.value = !calendarModal.value);
|
||||
const modalPopup = ref<boolean>(false);
|
||||
|
||||
const isEmpType = ref<string>("");
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineDisciplinaryDetail"
|
||||
);
|
||||
|
|
@ -286,6 +287,7 @@ async function fetchDatadetail() {
|
|||
id: person.id,
|
||||
idcard: person.idcard,
|
||||
name: person.name,
|
||||
profileType: person.profileType,
|
||||
prefix: person.prefix,
|
||||
firstName: person.firstName,
|
||||
lastName: person.lastName,
|
||||
|
|
@ -334,6 +336,7 @@ async function fetchDatadetail() {
|
|||
idcard: person.idcard,
|
||||
name: person.name,
|
||||
prefix: person.prefix,
|
||||
profileType: person.profileType,
|
||||
firstName: person.firstName,
|
||||
lastName: person.lastName,
|
||||
posLevelName: person.posLevelName,
|
||||
|
|
@ -397,14 +400,6 @@ function returnCount(num: number) {
|
|||
|
||||
async function addPerson(data: any) {
|
||||
await mainStore.fetchData(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังชั่น รับค่าจาก คอมโพเเนน
|
||||
* @param returnData ค่าที่ได้คืนมา
|
||||
*/
|
||||
function handleSave(returnData: any) {
|
||||
addPerson(returnData);
|
||||
changeFormData();
|
||||
toggleModal();
|
||||
}
|
||||
|
|
@ -630,9 +625,10 @@ async function saveDuty(id: string, duty: string, resolution: string) {
|
|||
});
|
||||
}
|
||||
|
||||
function onclickViewinfo(id: string) {
|
||||
function onclickViewinfo(id: string, type: string) {
|
||||
modalPersonal.value = true;
|
||||
personId.value = id;
|
||||
isEmpType.value = type;
|
||||
}
|
||||
|
||||
function updatemodalPersonal(modal: boolean) {
|
||||
|
|
@ -918,7 +914,12 @@ onMounted(async () => {
|
|||
round
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click="onclickViewinfo(props.row.personId)"
|
||||
@click="
|
||||
onclickViewinfo(
|
||||
props.row.personId,
|
||||
props.row.profileType
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -955,6 +956,13 @@ onMounted(async () => {
|
|||
<div v-else-if="col.name === 'salary'">
|
||||
{{ props.row.salary.toLocaleString() }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? mainStore.convertType(props.row.profileType)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
@ -1946,7 +1954,6 @@ onMounted(async () => {
|
|||
:close="toggleModal"
|
||||
:save="addPerson"
|
||||
:selected-data="mainStore.rowsAdd"
|
||||
@returnData="handleSave"
|
||||
/>
|
||||
|
||||
<DialogDirector
|
||||
|
|
@ -1986,6 +1993,7 @@ onMounted(async () => {
|
|||
:modal="modalPersonal"
|
||||
:id="personId"
|
||||
@update:modal="updatemodalPersonal"
|
||||
v-model:is-employee="isEmpType"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import config from "@/app.config";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useCommandMainStore } from "@/modules/18_command/store/Main";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||
|
||||
import type { ListCommand } from "@/modules/18_command/interface/index/Main";
|
||||
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
|
||||
|
|
@ -18,6 +19,8 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom
|
|||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const storeCommand = useCommandMainStore();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
|
|
@ -278,7 +281,13 @@ watch(
|
|||
<div v-else-if="col.name === 'salary'">
|
||||
{{ props.row.salary.toLocaleString() }}
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? mainStore.convertType(props.row.profileType)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value ?? "-" }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||
|
||||
import type { DataListRow } from "@/modules/11_discipline/interface/request/result";
|
||||
import type { DataListRow } from "@/modules/11_discipline/interface/request/Result";
|
||||
import type {
|
||||
FormData as FormDataComplaint,
|
||||
ArrayPerson,
|
||||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
||||
|
||||
import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/DialogSendToCommand.vue";
|
||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
|
|
|
|||
|
|
@ -13,13 +13,14 @@ import type {
|
|||
FormData,
|
||||
FormRef,
|
||||
DataOption,
|
||||
} from "@/modules/11_discipline/interface/request/result";
|
||||
} from "@/modules/11_discipline/interface/request/Result";
|
||||
|
||||
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const isEmpType = ref<string>('')
|
||||
const dataStore = useDisciplineResultStore();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
|
|
@ -227,9 +228,10 @@ function closeDetail() {
|
|||
}
|
||||
|
||||
/** เปิดรายละเอียด */
|
||||
function onclickViewinfo(id: string) {
|
||||
function onclickViewinfo(id: string,type:string) {
|
||||
modalPersonal.value = true;
|
||||
personId.value = id;
|
||||
isEmpType.value = type
|
||||
}
|
||||
|
||||
function updatemodalPersonal(modal: boolean) {
|
||||
|
|
@ -394,7 +396,7 @@ watch(
|
|||
round
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click="onclickViewinfo(props.row.personId)"
|
||||
@click="onclickViewinfo(props.row.personId,props.row.profileType)"
|
||||
>
|
||||
<q-tooltip>ดูข้อมูลในทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -431,6 +433,13 @@ watch(
|
|||
: ""
|
||||
}}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? mainStore.convertType(props.row.profileType)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
|
|
@ -644,6 +653,7 @@ watch(
|
|||
<PopupPersonal
|
||||
:modal="modalPersonal"
|
||||
:id="personId"
|
||||
v-model:is-employee="isEmpType"
|
||||
@update:modal="updatemodalPersonal"
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import { useCommandMainStore } from "@/modules/18_command/store/Main";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { dataType } from "@/modules/11_discipline/interface/response/Suspend";
|
||||
import type { dataType } from "@/modules/11_discipline/interface/response/suspend";
|
||||
import type { ListCommand } from "@/modules/18_command/interface/index/Main";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
|
@ -56,6 +56,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "profileType",
|
||||
align: "left",
|
||||
label: "สถานภาพ",
|
||||
sortable: true,
|
||||
field: "profileType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "name",
|
||||
align: "left",
|
||||
|
|
@ -106,6 +115,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
/** คอลัมน์ที่แสดง */
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"profileType",
|
||||
"name",
|
||||
"position",
|
||||
"positionLevel",
|
||||
|
|
@ -154,6 +164,15 @@ function serchDataTable() {
|
|||
);
|
||||
}
|
||||
|
||||
function convertType(val: string) {
|
||||
switch (val) {
|
||||
case "OFFICER":
|
||||
return "ข้าราชการ กทม. สามัญ";
|
||||
case "EMPLOYEE":
|
||||
return "ลูกจ้างประจำ กทม.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* เมื่อ props.modal เป็น true
|
||||
* กำหนดให้ selected เป็นค่าว่างและกำหนด filter ประเภทตำแหน่งตามประเภทการสอบ
|
||||
|
|
@ -270,6 +289,13 @@ watch(
|
|||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? convertType(props.row.profileType.toUpperCase())
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@ import config from "@/app.config";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore";
|
||||
|
||||
import type { dataType } from "@/modules/11_discipline/interface/response/Suspend";
|
||||
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";
|
||||
|
|
@ -21,11 +24,18 @@ const router = useRouter();
|
|||
const mixin = useCounterMixin();
|
||||
const { messageError, showLoader, hideLoader, success } = mixin;
|
||||
|
||||
const employeeClass = ref<string>("");
|
||||
const employeeClassOption = ref<DataOption[]>([
|
||||
{ id: "", name: "ทั้งหมด" },
|
||||
{ id: "OFFICER", name: "ข้าราชการ กทม. สามัญ" },
|
||||
{ id: "EMPLOYEE", name: "ลูกจ้างประจำ กทม." },
|
||||
]);
|
||||
const modal = ref<boolean>(false);
|
||||
|
||||
/** คอลัมน์ที่แสดง */
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"profileType",
|
||||
"title",
|
||||
"name",
|
||||
"positionType",
|
||||
|
|
@ -52,6 +62,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "profileType",
|
||||
align: "left",
|
||||
label: "สถานภาพ",
|
||||
sortable: true,
|
||||
field: "profileType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "title",
|
||||
align: "left",
|
||||
|
|
@ -165,7 +184,8 @@ async function getList() {
|
|||
config.API.suspendMain(
|
||||
pagination.value.page,
|
||||
pagination.value.rowsPerPage,
|
||||
filterKeyword.value.trim()
|
||||
filterKeyword.value.trim(),
|
||||
employeeClass.value
|
||||
)
|
||||
)
|
||||
.then(async (res) => {
|
||||
|
|
@ -205,6 +225,15 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
function convertType(val: string) {
|
||||
switch (val) {
|
||||
case "OFFICER":
|
||||
return "ข้าราชการ กทม. สามัญ";
|
||||
case "EMPLOYEE":
|
||||
return "ลูกจ้างประจำ กทม.";
|
||||
}
|
||||
}
|
||||
|
||||
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
|
||||
onMounted(async () => {
|
||||
await getList();
|
||||
|
|
@ -221,7 +250,23 @@ onMounted(async () => {
|
|||
<q-separator />
|
||||
<div class="row q-pa-md">
|
||||
<div class="col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="row col-12 q-col-gutter-sm items-center">
|
||||
<div>
|
||||
<q-select
|
||||
v-model="employeeClass"
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="employeeClassOption"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
label="สถานภาพ"
|
||||
style="min-width: 250px"
|
||||
@update:model-value="getList"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
|
|
@ -346,6 +391,13 @@ onMounted(async () => {
|
|||
<div v-else-if="col.name === 'title'" class="table_ellipsis">
|
||||
{{ props.row.title ? props.row.title : "-" }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? convertType(props.row.profileType.toUpperCase())
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="col.name === 'organization'"
|
||||
class="table_ellipsis"
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCommand.vue";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const mixin = useCounterMixin();
|
||||
const $q = useQuasar();
|
||||
const { dialogConfirm, dialogMessageNotify, onSearchDataTable } = mixin;
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const dataMapToSend = computed(() => {
|
||||
return selected.value.map((i: any) => ({
|
||||
|
|
@ -214,7 +216,13 @@ watch(
|
|||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? mainStore.convertType(props.row.profileType)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ interface listData {
|
|||
offenseDetails: string;
|
||||
disciplinaryFaultLevel: string;
|
||||
disciplinaryCaseFault: string;
|
||||
profileType: string;
|
||||
}
|
||||
|
||||
interface dataType {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,15 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "profileType",
|
||||
align: "left",
|
||||
label: "สถานภาพ",
|
||||
sortable: true,
|
||||
field: "profileType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "idcard",
|
||||
align: "left",
|
||||
|
|
@ -115,6 +124,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
/** หัวข้อที่เเสดงในตารางผู้ถูกร้องเรียน */
|
||||
const visibleColumnsRespondent = ref<string[]>([
|
||||
"no",
|
||||
"profileType",
|
||||
"idcard",
|
||||
"name",
|
||||
"posNo",
|
||||
|
|
@ -125,16 +135,17 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
]);
|
||||
|
||||
/** หัวตารางกรรมการ */
|
||||
// {
|
||||
// name: "info",
|
||||
// align: "left",
|
||||
// label: "",
|
||||
// sortable: false,
|
||||
// field: "info",
|
||||
// headerStyle: "font-size: 14px",
|
||||
// style: "font-size: 14px",
|
||||
// },
|
||||
const columnsDirector = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "info",
|
||||
align: "left",
|
||||
label: "",
|
||||
sortable: false,
|
||||
field: "info",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
{
|
||||
name: "no",
|
||||
align: "left",
|
||||
|
|
@ -144,6 +155,15 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "profileType",
|
||||
align: "left",
|
||||
label: "สถานภาพ",
|
||||
sortable: true,
|
||||
field: "profileType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "idcard",
|
||||
align: "left",
|
||||
|
|
@ -220,9 +240,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
]);
|
||||
|
||||
/** หัวข้อที่เเสดงในตารางกรรมการ */
|
||||
// "info",
|
||||
const visibleColumnsDirector = ref<string[]>([
|
||||
"info",
|
||||
"no",
|
||||
"profileType",
|
||||
"idcard",
|
||||
"name",
|
||||
"posNo",
|
||||
|
|
@ -407,8 +428,13 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
* จัดเก็บข้อมูลไว้ เพื่อใช้ใน POPUP
|
||||
* @param data ข้อมูลรายการบุคคล
|
||||
*/
|
||||
async function fetchData(data: ArrayPersonAdd[]) {
|
||||
async function fetchData(data: ArrayPersonAdd[], type?: string) {
|
||||
const dataList: any = data.map((item: any) => ({
|
||||
profileType: item.profileType
|
||||
? item.profileType
|
||||
: type == "officer"
|
||||
? "OFFICER"
|
||||
: "EMPLOYEE",
|
||||
id: item.id,
|
||||
idcard: item.idcard,
|
||||
name: item.name,
|
||||
|
|
@ -442,7 +468,13 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
posLevelId: item.posLevelId,
|
||||
posLevelName: item.posLevelName,
|
||||
}));
|
||||
rowsAdd.value = dataList;
|
||||
|
||||
const newItems = dataList.filter(
|
||||
(newItem: any) => !rowsAdd.value.some((existingItem: any) => existingItem.personId === newItem.personId)
|
||||
);
|
||||
|
||||
// เพิ่มข้อมูลใหม่เข้า rowsAdd
|
||||
rowsAdd.value = [...rowsAdd.value, ...newItems];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -454,6 +486,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
id: item.id,
|
||||
idcard: item.idcard,
|
||||
name: item.name,
|
||||
profileType: item.profileType,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
|
|
@ -488,6 +521,14 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
rowsSend.value = dataList;
|
||||
}
|
||||
|
||||
function convertType(val: string) {
|
||||
switch (val) {
|
||||
case "OFFICER":
|
||||
return "ข้าราชการ กทม. สามัญ";
|
||||
case "EMPLOYEE":
|
||||
return "ลูกจ้างประจำ กทม.";
|
||||
}
|
||||
}
|
||||
return {
|
||||
complainantoptionsMain,
|
||||
convertFault,
|
||||
|
|
@ -513,5 +554,6 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
pathDiscip,
|
||||
pathComplaintsChannal,
|
||||
pathDirector,
|
||||
convertType,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import type {
|
|||
listData,
|
||||
dataType,
|
||||
DataOption,
|
||||
} from "@/modules/11_discipline/interface/response/Suspend";
|
||||
} from "@/modules/11_discipline/interface/response/suspend";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
export const useDisciplineSuspendStore = defineStore(
|
||||
|
|
@ -38,6 +38,7 @@ export const useDisciplineSuspendStore = defineStore(
|
|||
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
profileType: item.profileType,
|
||||
lastName: item.lastName,
|
||||
organization: item.organization,
|
||||
position: item.position,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue