วินัย => แสดงรายการทั้งหมด , ตัวชี้วัดตามแผน => ปรับ tree

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-04-26 14:23:14 +07:00
parent f7d8256682
commit 7cce2fd1fb
13 changed files with 157 additions and 115 deletions

View file

@ -38,10 +38,10 @@ const pagination = ref({
/**
* clickไปหนาเพมchanel
*/
function clickAdd(){
dataStore.getType('')
function clickAdd() {
dataStore.getType("");
router.push(`/discipline/channel/add`);
};
}
/** get data */
async function getComplaintChanal() {
@ -91,9 +91,9 @@ async function deleteData(id: string) {
* ไปหน แกไข
* @param id type
*/
function editPage(data:typeItem){
dataStore.getType(data.name)
router.push(`/discipline/channel/${data.id}`)
function editPage(data: typeItem) {
dataStore.getType(data.name);
router.push(`/discipline/channel/${data.id}`);
}
/**เมื่อเริ่มโหลดหน้า เรียกใช้ฟังชั่น*/
onMounted(() => {
@ -188,7 +188,7 @@ onMounted(() => {
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ col.value}}
{{ col.value ?? "-" }}
</div>
</q-td>
<q-td>

View file

@ -18,9 +18,11 @@ const currentPage = ref<number>(1);
const maxPage = ref<number>(1);
const page = ref<number>(1);
const rowsPerPage = ref<number>(10);
const totalList = ref<number>(0);
const modalDetail = ref<boolean>(false);
const type = ref<string>('')
const dataPopUp = ref<DirectorRowsResponse>()
const type = ref<string>("");
const dataPopUp = ref<DirectorRowsResponse>();
/**
* นหาในตาราง
*/
@ -64,6 +66,7 @@ async function getList() {
)
.then((res) => {
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
totalList.value = res.data.result.total;
const data = res.data.result.data;
dataStore.fetchData(data);
})
@ -120,9 +123,9 @@ function openDetail(data: DirectorRowsResponse, typeChange: string) {
} else if (typeChange == "disciplinary") {
titleInvestigate.value = `รายการสอบสวนความผิดทางวินัยของ ${data.fullName}`;
}
dataPopUp.value = data
dataPopUp.value = data;
modalDetail.value = true;
type.value = typeChange
type.value = typeChange;
}
function closeDetail() {
@ -207,6 +210,7 @@ onMounted(() => {
:visible-columns="dataStore.visibleColumns"
>
<template v-slot:pagination="scope">
งหมด {{ totalList }} รายการ
<q-pagination
v-model="currentPage"
active-color="primary"
@ -258,7 +262,7 @@ onMounted(() => {
v-else
@click="$router.push(`/discipline/director/${props.row.id}`)"
>
{{ col.value }}
{{ col.value ?? "-" }}
</div>
</q-td>
<q-td auto-width>