แก้ วินัย เพิ่ม api
This commit is contained in:
parent
fc55ffc928
commit
142fc30d8b
13 changed files with 134 additions and 145 deletions
|
|
@ -24,16 +24,16 @@ export default {
|
||||||
complaintbyId: (id: string) => `${disciplineMain}/complaint/${id}`,
|
complaintbyId: (id: string) => `${disciplineMain}/complaint/${id}`,
|
||||||
complaintReject: (id: string) => `${disciplineMain}/complaint/reject/${id}`,
|
complaintReject: (id: string) => `${disciplineMain}/complaint/reject/${id}`,
|
||||||
complaintResume: (id: string) => `${disciplineMain}/complaint/resume/${id}`,
|
complaintResume: (id: string) => `${disciplineMain}/complaint/resume/${id}`,
|
||||||
complaintList: (page: number, pageSize: number, keyword: string) =>
|
complaintList: (page: number, pageSize: number, keyword: string,status:string) =>
|
||||||
`${disciplineMain}/complaint?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
`${disciplineMain}/complaint?page=${page}&pageSize=${pageSize}&keyword=${keyword}&status=${status}`,
|
||||||
complaintFileUpload: (id: string) => `${disciplineMain}/complaint/file/${id}`,
|
complaintFileUpload: (id: string) => `${disciplineMain}/complaint/file/${id}`,
|
||||||
complaintFileDelete: (id: string, docId: string) =>
|
complaintFileDelete: (id: string, docId: string) =>
|
||||||
`${disciplineMain}/complaint/file/${id}/${docId}`,
|
`${disciplineMain}/complaint/file/${id}/${docId}`,
|
||||||
complaintApprove: (id: string) => `${disciplineMain}/complaint/approve/${id}`,
|
complaintApprove: (id: string) => `${disciplineMain}/complaint/approve/${id}`,
|
||||||
|
|
||||||
/** API สืบสวนข้อเท็จจริง*/
|
/** API สืบสวนข้อเท็จจริง*/
|
||||||
investigateMain: (page: number, pageSize: number, keyword: string) =>
|
investigateMain: (page: number, pageSize: number, keyword: string,status:string) =>
|
||||||
`${investigate}?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
`${investigate}?page=${page}&pageSize=${pageSize}&keyword=${keyword}&status=${status}`,
|
||||||
investigateById: (id: string) => `${investigate}/${id}`,
|
investigateById: (id: string) => `${investigate}/${id}`,
|
||||||
|
|
||||||
investigateRelevantUploadFile: (id: string) =>
|
investigateRelevantUploadFile: (id: string) =>
|
||||||
|
|
@ -104,4 +104,6 @@ export default {
|
||||||
appealUpLoadFile: (id: string) => `${appeal}/file/${id}`,
|
appealUpLoadFile: (id: string) => `${appeal}/file/${id}`,
|
||||||
appealDeleteFile: (id: string, docId: string) =>
|
appealDeleteFile: (id: string, docId: string) =>
|
||||||
`${appeal}/file/${id}/${docId}`,
|
`${appeal}/file/${id}/${docId}`,
|
||||||
|
|
||||||
|
historyDirectorbyId:(id:string,type:string) => `${disciplineMain}/director/${type}/${id}`
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,8 @@ async function getList() {
|
||||||
config.API.complaintList(
|
config.API.complaintList(
|
||||||
page.value,
|
page.value,
|
||||||
rowsPerPage.value,
|
rowsPerPage.value,
|
||||||
filterKeyword.value
|
filterKeyword.value,
|
||||||
|
statusFilter.value
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
//
|
//
|
||||||
|
|
@ -69,9 +70,6 @@ function filterFn() {
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
function dataUpdate() {
|
|
||||||
console.log(statusFilter.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function resetFilter() {
|
function resetFilter() {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
|
|
@ -104,7 +102,7 @@ onMounted(async () => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:options="complainstStore.statusOptions"
|
:options="complainstStore.statusOptions"
|
||||||
@update:model-value="dataUpdate"
|
@update:model-value="getList()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ const data = reactive<FormData>({
|
||||||
organizationId: "",
|
organizationId: "",
|
||||||
persons: [],
|
persons: [],
|
||||||
investigationExtendHistory: [],
|
investigationExtendHistory: [],
|
||||||
|
isDisciplinary:false
|
||||||
});
|
});
|
||||||
|
|
||||||
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
/** ข้อมูล v-model ของฟอร์มเรื่องร้องเรียน */
|
||||||
|
|
@ -162,6 +163,7 @@ function getData() {
|
||||||
data.investigationStatusResult = dataList.investigationStatusResult;
|
data.investigationStatusResult = dataList.investigationStatusResult;
|
||||||
data.investigationExtendStatus = dataList.investigationExtendStatus;
|
data.investigationExtendStatus = dataList.investigationExtendStatus;
|
||||||
data.investigationDaysExtend = dataList.investigationDaysExtend;
|
data.investigationDaysExtend = dataList.investigationDaysExtend;
|
||||||
|
data.isDisciplinary = dataList.isDisciplinary;
|
||||||
data.investigationExtendHistory =
|
data.investigationExtendHistory =
|
||||||
dataList.investigationExtendHistory ?? [];
|
dataList.investigationExtendHistory ?? [];
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,7 @@ const formData = reactive<FormData>({
|
||||||
organizationId: "",
|
organizationId: "",
|
||||||
persons: [],
|
persons: [],
|
||||||
investigationExtendHistory: [],
|
investigationExtendHistory: [],
|
||||||
|
isDisciplinary:false
|
||||||
});
|
});
|
||||||
|
|
||||||
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
/** maping ref เข้าตัวแปรเพื่อเตรียมตรวจสอบ */
|
||||||
|
|
@ -292,7 +293,7 @@ watch(props.data, async () => {
|
||||||
|
|
||||||
mainStore.rowsAdd = props.data.persons;
|
mainStore.rowsAdd = props.data.persons;
|
||||||
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
mainStore.rowsCheck = mainStore.rowsAdd.filter(
|
||||||
(item: any) => item.isSend === "NEW"
|
(item: any) => item.isDisciplinary === false && item.isSend === 'NEW'
|
||||||
);
|
);
|
||||||
|
|
||||||
const dataMap = props.data.directors.map((item: any) => ({
|
const dataMap = props.data.directors.map((item: any) => ({
|
||||||
|
|
@ -679,7 +680,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="col-xs-12 col-sm-4"
|
class="col-xs-12 col-sm-4"
|
||||||
v-if="route.name === 'disciplineInvestigatefactsEdit'"
|
v-if="route.name === 'disciplineInvestigatefactsEdit' && mainStore.rowsCheck.length >0"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
class="q-pa-sm"
|
class="q-pa-sm"
|
||||||
|
|
@ -1200,7 +1201,7 @@ onMounted(async () => {
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<q-card
|
<q-card
|
||||||
bordered
|
bordered
|
||||||
class="row col-12"
|
class="col-12"
|
||||||
style="border: 1px solid #d6dee1"
|
style="border: 1px solid #d6dee1"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
@ -1211,8 +1212,8 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
|
|
||||||
<div class="col-xs-12 q-pa-sm row">
|
|
||||||
<div class="row col-12 q-col-gutter-md">
|
<div class="row col-12 q-col-gutter-sm q-pa-sm">
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-select
|
<q-select
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
|
|
@ -1274,24 +1275,24 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
:class="inputEdit(isReadonly)"
|
||||||
|
outlined
|
||||||
|
ref="resultRef"
|
||||||
|
:readonly="isReadonly"
|
||||||
|
dense
|
||||||
|
borderless
|
||||||
|
v-model="formData.result"
|
||||||
|
hide-bottom-space
|
||||||
|
:label="`${'เหตุผล'}`"
|
||||||
|
type="textarea"
|
||||||
|
@update:model-value="changeFormData()"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row col-12">
|
|
||||||
<q-input
|
|
||||||
:class="inputEdit(isReadonly)"
|
|
||||||
outlined
|
|
||||||
ref="resultRef"
|
|
||||||
:readonly="isReadonly"
|
|
||||||
dense
|
|
||||||
borderless
|
|
||||||
v-model="formData.result"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'เหตุผล'}`"
|
|
||||||
type="textarea"
|
|
||||||
@update:model-value="changeFormData()"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,8 @@ async function getList() {
|
||||||
config.API.investigateMain(
|
config.API.investigateMain(
|
||||||
currentPage.value,
|
currentPage.value,
|
||||||
rowsPerPage.value,
|
rowsPerPage.value,
|
||||||
filterKeyword.value
|
filterKeyword.value,
|
||||||
|
statusFilter.value
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -123,7 +124,7 @@ onMounted(async () => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:options="dataInvestigate.statusOptions"
|
:options="dataInvestigate.statusOptions"
|
||||||
@update:model-value="dataUpdate"
|
@update:model-value="getList()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,13 @@ const router = useRouter();
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
|
const status = ref<string>("ALL");
|
||||||
async function fetchListDisciplinary() {
|
async function fetchListDisciplinary() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.disciplineDisciplinary() +
|
config.API.disciplineDisciplinary() +
|
||||||
`?page=${page.value}&pageSize=${rowsPerPage.value}&keyword=${filter.value}`
|
`?page=${page.value}&pageSize=${rowsPerPage.value}&keyword=${filter.value}&status=${status.value}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
|
|
@ -55,6 +55,11 @@ async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
||||||
await fetchListDisciplinary();
|
await fetchListDisciplinary();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function filterStatus(statusReturn: string) {
|
||||||
|
status.value = statusReturn;
|
||||||
|
fetchListDisciplinary()
|
||||||
|
}
|
||||||
|
|
||||||
/**เมื่อเริ่มโหลดหน้า
|
/**เมื่อเริ่มโหลดหน้า
|
||||||
* ส่งข้อมูลจำลองไปยัง store
|
* ส่งข้อมูลจำลองไปยัง store
|
||||||
*/
|
*/
|
||||||
|
|
@ -86,6 +91,7 @@ onMounted(async () => {
|
||||||
:fetchListDisciplinary="fetchListDisciplinary"
|
:fetchListDisciplinary="fetchListDisciplinary"
|
||||||
@update:pagination="updatePagingProp"
|
@update:pagination="updatePagingProp"
|
||||||
v-model:open-edit="openEdit"
|
v-model:open-edit="openEdit"
|
||||||
|
:filterStatus="filterStatus"
|
||||||
>
|
>
|
||||||
</Table>
|
</Table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
filterStatus: {
|
||||||
|
type: Function,
|
||||||
|
default: () => console.log("not function"),
|
||||||
|
},
|
||||||
nornmalData: {
|
nornmalData: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
defualt: true,
|
defualt: true,
|
||||||
|
|
@ -114,7 +118,7 @@ watch(
|
||||||
);
|
);
|
||||||
|
|
||||||
function dataUpdate() {
|
function dataUpdate() {
|
||||||
console.log(statusFilter.value);
|
props.filterStatus(statusFilter.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterFn() {
|
function filterFn() {
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,14 @@ const page = ref<number>(1);
|
||||||
const pageSize = ref<number>(10);
|
const pageSize = ref<number>(10);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
|
const status = ref<string>("ALL");
|
||||||
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
||||||
async function fetchListResult() {
|
async function fetchListResult() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.listResult() +
|
config.API.listResult() +
|
||||||
`?page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}`
|
`?page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}&status=${status.value}`
|
||||||
)
|
)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
|
|
@ -66,6 +66,11 @@ function openEdit(id: string) {
|
||||||
router.push(`/discipline-result/${id}`);
|
router.push(`/discipline-result/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function filterStatus(statusReturn: string) {
|
||||||
|
status.value = statusReturn;
|
||||||
|
fetchListResult();
|
||||||
|
}
|
||||||
|
|
||||||
/**เมื่อเริ่มโหลดหน้า
|
/**เมื่อเริ่มโหลดหน้า
|
||||||
* ส่งข้อมูลจำลองไปยัง store
|
* ส่งข้อมูลจำลองไปยัง store
|
||||||
*/
|
*/
|
||||||
|
|
@ -97,6 +102,7 @@ onMounted(async () => {
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
@update:queryString="updateQueryString"
|
@update:queryString="updateQueryString"
|
||||||
v-model:open-edit="openEdit"
|
v-model:open-edit="openEdit"
|
||||||
|
:filterStatus="filterStatus"
|
||||||
>
|
>
|
||||||
</Table>
|
</Table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
filterStatus: {
|
||||||
|
type: Function,
|
||||||
|
default: () => console.log("not function"),
|
||||||
|
},
|
||||||
nornmalData: {
|
nornmalData: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
defualt: true,
|
defualt: true,
|
||||||
|
|
@ -94,7 +98,7 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
function dataUpdate() {
|
function dataUpdate() {
|
||||||
console.log(statusFilter.value);
|
props.filterStatus(statusFilter.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateInput(value: string | number | null) {
|
function updateInput(value: string | number | null) {
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,16 @@ import {
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import { QForm, useQuasar } from "quasar";
|
import { QForm, useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import type { DirectorRowsResponse } from "@/modules/11_discipline/interface/response/director";
|
||||||
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
|
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
||||||
const listCheck = ref<string>("");
|
const listCheck = ref<number>();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: Boolean,
|
modal: Boolean,
|
||||||
title: {
|
title: {
|
||||||
|
|
@ -23,87 +26,43 @@ const props = defineProps({
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
close: Function,
|
close: Function,
|
||||||
|
type: String,
|
||||||
|
dataList: Object,
|
||||||
});
|
});
|
||||||
const dataList = ref<any>();
|
const dataList = ref<any>();
|
||||||
const listInvestigateDetail = [
|
const listInvestigateDetail = ref<any>([]);
|
||||||
{
|
|
||||||
id: "1",
|
|
||||||
title: "test1",
|
|
||||||
type: "x1",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "2",
|
|
||||||
title: "test2",
|
|
||||||
type: "x2",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "3",
|
|
||||||
title: "test3",
|
|
||||||
type: "x3",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "4",
|
|
||||||
title: "test4",
|
|
||||||
type: "x4",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "5",
|
|
||||||
title: "test5",
|
|
||||||
type: "x5",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "6",
|
|
||||||
title: "test6",
|
|
||||||
type: "x6",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "7",
|
|
||||||
title: "test7",
|
|
||||||
type: "x7",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
function clickList(id: string, type: string) {
|
function clickList(index: number, data: any) {
|
||||||
const data = [
|
listCheck.value = index;
|
||||||
{
|
dataList.value = data.map((i: any) => ({
|
||||||
id: "1",
|
commandNo: i.commandNo,
|
||||||
title: "นาย 1",
|
duty: i.duty,
|
||||||
type: "x1",
|
prefix: i.prefix,
|
||||||
},
|
firstName: i.firstName,
|
||||||
{
|
lastName: i.lastName,
|
||||||
id: "2",
|
fullName:`${i.prefix}${i.firstName} ${i.lastName}`
|
||||||
title: "นาย 2",
|
}));
|
||||||
type: "x1",
|
console.log(data);
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "3",
|
|
||||||
title: "นาย 3",
|
|
||||||
type: "x2",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "4",
|
|
||||||
title: "นาย 4",
|
|
||||||
type: "x2",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "5",
|
|
||||||
title: "นาย 5",
|
|
||||||
type: "x3",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "6",
|
|
||||||
title: "นาย 6",
|
|
||||||
type: "x3",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "7",
|
|
||||||
title: "นาย 7",
|
|
||||||
type: "x4",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
dataList.value = data.filter((r) => r.type == type);
|
|
||||||
listCheck.value = id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(props, () => {
|
||||||
|
if (props) {
|
||||||
|
const data: DirectorRowsResponse = props.dataList as DirectorRowsResponse;
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.historyDirectorbyId(data.id, props.type as string))
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res.data.result);
|
||||||
|
listInvestigateDetail.value = res.data.result;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -123,26 +82,26 @@ function clickList(id: string, type: string) {
|
||||||
<div
|
<div
|
||||||
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
|
class="col-xs-12 col-sm-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
|
||||||
>
|
>
|
||||||
รายการเรื่องร้องเรียน
|
รายการเรื่องร้องเรียน
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<q-scroll-area
|
<q-scroll-area
|
||||||
style="height: 300px;"
|
style="height: 300px"
|
||||||
class="bg-white rounded-borders q-px-sm row col-12"
|
class="bg-white rounded-borders q-px-xs row col-12"
|
||||||
>
|
>
|
||||||
<q-list
|
<q-list
|
||||||
v-for="(item, index) in listInvestigateDetail"
|
v-for="(item, index) in listInvestigateDetail"
|
||||||
:key="item.id"
|
:key="index"
|
||||||
bordered
|
bordered
|
||||||
separator
|
separator
|
||||||
>
|
>
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
v-ripple
|
v-ripple
|
||||||
:active="listCheck === item.id"
|
:active="listCheck === index"
|
||||||
active-class="my-menu-link"
|
active-class="my-menu-link"
|
||||||
@click="clickList(item.id, item.type)"
|
@click="clickList(index, item.director)"
|
||||||
>
|
>
|
||||||
<q-item-section>{{ item.title }}</q-item-section>
|
<q-item-section>{{ item.title }}</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
@ -165,16 +124,16 @@ function clickList(id: string, type: string) {
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<q-scroll-area
|
<q-scroll-area
|
||||||
style="height: 300px"
|
style="height: 300px"
|
||||||
class="bg-white rounded-borders q-px-sm row col-12"
|
class="bg-white rounded-borders q-px-xs row col-12"
|
||||||
>
|
>
|
||||||
<q-list
|
<q-list
|
||||||
v-for="(item, index) in dataList"
|
v-for="(item, index) in dataList"
|
||||||
:key="item.id"
|
:key="index"
|
||||||
bordered
|
bordered
|
||||||
separator
|
separator
|
||||||
>
|
>
|
||||||
<q-item clickable v-ripple>
|
<q-item clickable v-ripple>
|
||||||
<q-item-section>{{ item.title }}</q-item-section>
|
<q-item-section>{{ item.fullName }}</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-scroll-area>
|
</q-scroll-area>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { useDisciplineDirectorDataStore } from "@/modules/11_discipline/store/Di
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import DialogTotal from "@/modules/11_discipline/components/6_BasicInformation/Director/DialogInvestigateTotal.vue";
|
import DialogTotal from "@/modules/11_discipline/components/6_BasicInformation/Director/DialogInvestigateTotal.vue";
|
||||||
|
import type { DirectorRowsResponse } from "@/modules/11_discipline/interface/response/director";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDisciplineDirectorDataStore();
|
const dataStore = useDisciplineDirectorDataStore();
|
||||||
|
|
@ -18,6 +19,8 @@ const maxPage = ref<number>(1);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const rowsPerPage = ref<number>(10);
|
const rowsPerPage = ref<number>(10);
|
||||||
const modalDetail = ref<boolean>(false);
|
const modalDetail = ref<boolean>(false);
|
||||||
|
const type = ref<string>('')
|
||||||
|
const dataPopUp = ref<DirectorRowsResponse>()
|
||||||
/**
|
/**
|
||||||
* ค้นหาในตาราง
|
* ค้นหาในตาราง
|
||||||
*/
|
*/
|
||||||
|
|
@ -111,9 +114,15 @@ function filterFn() {
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDetail(title: string) {
|
function openDetail(data: DirectorRowsResponse, typeChange: string) {
|
||||||
titleInvestigate.value = title;
|
if (typeChange == "investigate") {
|
||||||
|
titleInvestigate.value = `รายการสืบสวนข้อเท็จจริงของ ${data.fullName}`;
|
||||||
|
} else if (typeChange == "disciplinary") {
|
||||||
|
titleInvestigate.value = `รายการสอบสวนความผิดทางวินัยของ ${data.fullName}`;
|
||||||
|
}
|
||||||
|
dataPopUp.value = data
|
||||||
modalDetail.value = true;
|
modalDetail.value = true;
|
||||||
|
type.value = typeChange
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDetail() {
|
function closeDetail() {
|
||||||
|
|
@ -232,9 +241,7 @@ onMounted(() => {
|
||||||
props.row.totalInvestigate > 0
|
props.row.totalInvestigate > 0
|
||||||
"
|
"
|
||||||
class="text-blue"
|
class="text-blue"
|
||||||
@click="
|
@click="openDetail(props.row, 'investigate')"
|
||||||
openDetail(`รายการสืบสวนข้อเท็จจริงของ ${props.row.fullName}`)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ props.row.totalInvestigate }}
|
{{ props.row.totalInvestigate }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -244,11 +251,7 @@ onMounted(() => {
|
||||||
props.row.totalDisciplinary > 0
|
props.row.totalDisciplinary > 0
|
||||||
"
|
"
|
||||||
class="text-blue"
|
class="text-blue"
|
||||||
@click="
|
@click="openDetail(props.row, 'disciplinary')"
|
||||||
openDetail(
|
|
||||||
`รายการสอบสวนความผิดทางวินัยของ ${props.row.fullName}`
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ props.row.totalDisciplinary }}
|
{{ props.row.totalDisciplinary }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -282,5 +285,7 @@ onMounted(() => {
|
||||||
:modal="modalDetail"
|
:modal="modalDetail"
|
||||||
:title="titleInvestigate"
|
:title="titleInvestigate"
|
||||||
:close="closeDetail"
|
:close="closeDetail"
|
||||||
|
:type="type"
|
||||||
|
:data-list="dataPopUp"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ interface FormData {
|
||||||
organizationId: string;
|
organizationId: string;
|
||||||
persons: object | null;
|
persons: object | null;
|
||||||
investigationExtendHistory: ExtendHistoryObject[];
|
investigationExtendHistory: ExtendHistoryObject[];
|
||||||
|
isDisciplinary:boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ExtendHistoryObject {
|
interface ExtendHistoryObject {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
interface DirectorRows {
|
interface DirectorRows {
|
||||||
id:string
|
id: string
|
||||||
prefix:string
|
prefix: string
|
||||||
firstName:string
|
firstName: string
|
||||||
lastName:string
|
lastName: string
|
||||||
position: string;
|
position: string;
|
||||||
email: string;
|
email: string;
|
||||||
phone: string;
|
phone: string;
|
||||||
|
|
@ -10,11 +10,11 @@ interface DirectorRows {
|
||||||
totalDisciplinary: number
|
totalDisciplinary: number
|
||||||
}
|
}
|
||||||
interface DirectorRowsResponse {
|
interface DirectorRowsResponse {
|
||||||
id:string
|
id: string
|
||||||
fullName:string
|
fullName: string
|
||||||
position:string
|
position: string
|
||||||
email:string
|
email: string
|
||||||
phone:string
|
phone: string
|
||||||
totalInvestigate: number
|
totalInvestigate: number
|
||||||
totalDisciplinary: number
|
totalDisciplinary: number
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue