วินัยรองรับลูกจ้างประจำ กทม.
This commit is contained in:
parent
77a3e7b57f
commit
9bb81be90d
20 changed files with 370 additions and 106 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue