วินัยรองรับลูกจ้างประจำ กทม.
This commit is contained in:
parent
77a3e7b57f
commit
9bb81be90d
20 changed files with 370 additions and 106 deletions
|
|
@ -2,7 +2,7 @@
|
|||
import { ref } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRouter,useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -22,6 +22,7 @@ import DialogHeader from "@/components/DialogHeader.vue";
|
|||
//use
|
||||
const myForm = ref<QForm>();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const $q = useQuasar();
|
||||
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
||||
|
||||
|
|
@ -29,7 +30,7 @@ const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
|||
const modal = defineModel<boolean>("modal", { required: true }); //แสดง popup ประวัติถือครองตำแหน่ง
|
||||
|
||||
//ตัวแปร
|
||||
const employeeClass = ref<string>(""); //ประเภทข้า่รายการ
|
||||
const employeeClass = ref<string>(route.name == "registryNew" ? 'officer':'perm'); //ประเภทข้า่รายการ
|
||||
const typeKeyword = ref<string>("");
|
||||
const Keyword = ref<string>("");
|
||||
const positionKeyword = ref<string>("");
|
||||
|
|
@ -252,23 +253,23 @@ function closeDialog() {
|
|||
|
||||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card style="width: 850px; max-width: 80vw">
|
||||
<q-card style="width: 60vw; max-width: 80vw">
|
||||
<DialogHeader :tittle="'ประวัติถือครองตำแหน่ง'" :close="closeDialog" />
|
||||
|
||||
<q-separator />
|
||||
|
||||
<q-card-section class="q-pa-sm">
|
||||
<q-form ref="myForm">
|
||||
<div class="col-12 bg-grey-2 q-pa-sm">
|
||||
<div class="col-12 row q-pb-sm q-col-gutter-sm items-center"></div>
|
||||
<q-toolbar>
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="bg-grey-2 q-pa-sm">
|
||||
<div class="row q-col-gutter-sm no-warp full-width">
|
||||
<div class="col-3">
|
||||
<q-select
|
||||
hide-bottom-space
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
bg-color="white"
|
||||
v-model="employeeClass"
|
||||
emit-value
|
||||
map-options
|
||||
|
|
@ -279,15 +280,17 @@ function closeDialog() {
|
|||
use-input
|
||||
input-debounce="0"
|
||||
@update:model-value="changeEmployeeClass"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<q-select
|
||||
hide-bottom-space
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ฟิลด์ที่จะค้น'}`]"
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
bg-color="white"
|
||||
v-model="typeKeyword"
|
||||
emit-value
|
||||
map-options
|
||||
|
|
@ -298,19 +301,61 @@ function closeDialog() {
|
|||
use-input
|
||||
input-debounce="0"
|
||||
@update:model-value="selectTypeKeyword(typeKeyword)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-3" v-if="typeKeyword === 'no'">
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
bg-color="white"
|
||||
v-model="Keyword"
|
||||
placeholder="ตำแหน่งเลขที่"
|
||||
:rules="[(val:string) => !!val || `${'กรุณากรอก ตำแหน่งเลขที่'}`]"
|
||||
hide-bottom-space
|
||||
style="width: 250px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-space />
|
||||
<q-btn
|
||||
outline
|
||||
color="primary"
|
||||
label="ค้นหา"
|
||||
@click="clickSearch(employeeClass)"
|
||||
icon="mdi-magnify"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<div class="col-3" v-if="typeKeyword === 'position'">
|
||||
<q-select
|
||||
hide-bottom-space
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ตำแหน่ง'}`]"
|
||||
outlined
|
||||
dense
|
||||
v-model="positionKeyword"
|
||||
emit-value
|
||||
bg-color="white"
|
||||
map-options
|
||||
:options="options"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:label="`${' เลือกตำแหน่ง'}`"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="filterFn"
|
||||
style="width: 250px"
|
||||
behavior="menu"
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template></q-select
|
||||
>
|
||||
</div>
|
||||
<div :class="typeKeyword ? 'col-3':'col-3 offset-3'">
|
||||
<q-btn
|
||||
class="on-right bg-white full-width"
|
||||
outline
|
||||
color="primary"
|
||||
label="ค้นหา"
|
||||
@click="clickSearch(employeeClass)"
|
||||
icon="mdi-magnify"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 q-mt-sm">
|
||||
|
|
|
|||
|
|
@ -82,8 +82,9 @@ function fetchOptionGroup() {
|
|||
/**
|
||||
* function fetch รายชื่อข้อมูลทะเบียนประวัติ
|
||||
*/
|
||||
function fetchDataPerson() {
|
||||
async function fetchDataPerson() {
|
||||
showLoader();
|
||||
dataPersonMain.value = [];
|
||||
let queryParams: QueryParams = {
|
||||
page: store.formFilter.page,
|
||||
pageSize: store.formFilter.pageSize,
|
||||
|
|
@ -129,58 +130,67 @@ function fetchDataPerson() {
|
|||
queryParams.isAll = store.formFilter.isAll;
|
||||
}
|
||||
|
||||
http
|
||||
await http
|
||||
.get(
|
||||
config.API.registryNew(empType.value !== "officer" ? "-employee" : ""),
|
||||
{ params: queryParams }
|
||||
)
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
const dataList = await res.data.result.data;
|
||||
maxPage.value = Math.ceil(
|
||||
res.data.result.total / store.formFilter.pageSize
|
||||
);
|
||||
dataPersonMain.value = res.data.result.data;
|
||||
dataPersonMain.value = dataList;
|
||||
total.value = res.data.result.total;
|
||||
isShowBtnFilter.value = true;
|
||||
insertAvatar(res.data.result.data);
|
||||
if (dataList) {
|
||||
insertAvatar(dataList).then(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.finally(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
* function fetch รูปโปรไฟล์
|
||||
* @param items ข้อมูลคน
|
||||
*/
|
||||
function insertAvatar(items: DataPerson[]) {
|
||||
items.map((x: DataPerson, index: number) => {
|
||||
if (x.avatarName != null) {
|
||||
http
|
||||
.get(
|
||||
config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", x.id, x.avatarName)
|
||||
)
|
||||
.then((img) => {
|
||||
async function insertAvatar(items: DataPerson[]) {
|
||||
await Promise.all(
|
||||
items.map(async (x: DataPerson, index: number) => {
|
||||
try {
|
||||
if (x.avatarName != null) {
|
||||
const img = await http.get(
|
||||
config.API.fileByFile(
|
||||
"ทะเบียนประวัติ",
|
||||
"โปรไฟล์",
|
||||
x.id,
|
||||
x.avatarName
|
||||
)
|
||||
);
|
||||
dataPersonMain.value[index] = {
|
||||
...x,
|
||||
avatar: img.data.downloadUrl,
|
||||
};
|
||||
})
|
||||
.catch(() => {
|
||||
} else {
|
||||
dataPersonMain.value[index] = {
|
||||
...x,
|
||||
avatar: avatar,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
dataPersonMain.value[index] = {
|
||||
...x,
|
||||
avatar: avatar,
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
dataPersonMain.value[index] = {
|
||||
...x,
|
||||
avatar: avatar,
|
||||
};
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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