วินัย => แสดงรายการทั้งหมด , ตัวชี้วัดตามแผน => ปรับ tree
This commit is contained in:
parent
f7d8256682
commit
7cce2fd1fb
13 changed files with 157 additions and 115 deletions
|
|
@ -28,6 +28,7 @@ const filterKeyword = ref<string>("");
|
||||||
const maxPage = ref<number>(1);
|
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 toptitle = ref<number>(0);
|
||||||
const statusFilter = ref<string>("NEW");
|
const statusFilter = ref<string>("NEW");
|
||||||
|
|
||||||
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
||||||
|
|
@ -50,6 +51,7 @@ async function getList() {
|
||||||
//
|
//
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
|
toptitle.value = res.data.result.total;
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
fetchComplainst(data);
|
fetchComplainst(data);
|
||||||
})
|
})
|
||||||
|
|
@ -166,6 +168,7 @@ onMounted(async () => {
|
||||||
:page="page"
|
:page="page"
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
@update:pagination="updatePagingProp"
|
@update:pagination="updatePagingProp"
|
||||||
|
:toptitle="toptitle"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@ const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
require: true,
|
require: true,
|
||||||
},
|
},
|
||||||
|
toptitle: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
/** หัวข้อที่เเสดงในตาราง */
|
/** หัวข้อที่เเสดงในตาราง */
|
||||||
|
|
@ -178,17 +182,6 @@ onMounted(() => {
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
|
||||||
<q-pagination
|
|
||||||
v-model="currentPage"
|
|
||||||
active-color="primary"
|
|
||||||
color="dark"
|
|
||||||
:max="Number(props.maxPage)"
|
|
||||||
size="sm"
|
|
||||||
boundary-links
|
|
||||||
direction-links
|
|
||||||
></q-pagination>
|
|
||||||
</template>
|
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
|
@ -220,6 +213,18 @@ onMounted(() => {
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ props.toptitle }}รายการ
|
||||||
|
<q-pagination
|
||||||
|
v-model="currentPage"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="Number(props.maxPage)"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
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 toptitle = ref<number>(0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*pagination ของตาราง
|
*pagination ของตาราง
|
||||||
|
|
@ -70,6 +71,8 @@ async function getList() {
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
|
toptitle.value = res.data.result.total;
|
||||||
|
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
dataInvestigate.fecthList(data);
|
dataInvestigate.fecthList(data);
|
||||||
})
|
})
|
||||||
|
|
@ -181,17 +184,6 @@ onMounted(async () => {
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
|
||||||
<q-pagination
|
|
||||||
v-model="currentPage"
|
|
||||||
active-color="primary"
|
|
||||||
color="dark"
|
|
||||||
:max="Number(maxPage)"
|
|
||||||
size="sm"
|
|
||||||
boundary-links
|
|
||||||
direction-links
|
|
||||||
></q-pagination>
|
|
||||||
</template>
|
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th
|
<q-th
|
||||||
|
|
@ -236,6 +228,18 @@ onMounted(async () => {
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ toptitle }}รายการ
|
||||||
|
<q-pagination
|
||||||
|
v-model="currentPage"
|
||||||
|
active-color="primary"
|
||||||
|
color="dark"
|
||||||
|
:max="Number(maxPage)"
|
||||||
|
size="sm"
|
||||||
|
boundary-links
|
||||||
|
direction-links
|
||||||
|
></q-pagination>
|
||||||
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ 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 totalList = ref<number>();
|
||||||
|
|
||||||
const status = ref<string>("NEW");
|
const status = ref<string>("NEW");
|
||||||
async function fetchListDisciplinary() {
|
async function fetchListDisciplinary() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -33,6 +35,7 @@ async function fetchListDisciplinary() {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
|
totalList.value = res.data.result.total;
|
||||||
fetchList(data);
|
fetchList(data);
|
||||||
})
|
})
|
||||||
.catch((err) => {})
|
.catch((err) => {})
|
||||||
|
|
@ -57,7 +60,7 @@ async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
||||||
|
|
||||||
function filterStatus(statusReturn: string) {
|
function filterStatus(statusReturn: string) {
|
||||||
status.value = statusReturn;
|
status.value = statusReturn;
|
||||||
fetchListDisciplinary()
|
fetchListDisciplinary();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**เมื่อเริ่มโหลดหน้า
|
/**เมื่อเริ่มโหลดหน้า
|
||||||
|
|
@ -88,6 +91,7 @@ onMounted(async () => {
|
||||||
:rowsPerPage="rowsPerPage"
|
:rowsPerPage="rowsPerPage"
|
||||||
:page="page"
|
:page="page"
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
|
:totalList="totalList"
|
||||||
:fetchListDisciplinary="fetchListDisciplinary"
|
:fetchListDisciplinary="fetchListDisciplinary"
|
||||||
@update:pagination="updatePagingProp"
|
@update:pagination="updatePagingProp"
|
||||||
v-model:open-edit="openEdit"
|
v-model:open-edit="openEdit"
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,10 @@ const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
require: true,
|
require: true,
|
||||||
},
|
},
|
||||||
|
totalList: {
|
||||||
|
type: Number,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
|
|
@ -195,6 +199,7 @@ function filterFn() {
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ props.totalList }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="currentPage"
|
v-model="currentPage"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ const initialPagination = ref<Pagination>({
|
||||||
const page = ref<number>(1);
|
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 totalList = ref<number>(0);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const status = ref<string>("DONE");
|
const status = ref<string>("DONE");
|
||||||
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
||||||
|
|
@ -38,6 +39,7 @@ async function fetchListResult() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
maxPage.value = Math.ceil(res.data.result.total / pageSize.value);
|
maxPage.value = Math.ceil(res.data.result.total / pageSize.value);
|
||||||
|
totalList.value = res.data.result.total;
|
||||||
await fetchList(data);
|
await fetchList(data);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -97,6 +99,7 @@ onMounted(async () => {
|
||||||
:fetchListResult="fetchListResult"
|
:fetchListResult="fetchListResult"
|
||||||
:pageSize="pageSize"
|
:pageSize="pageSize"
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
|
:totalList="totalList"
|
||||||
@update:queryString="updateQueryString"
|
@update:queryString="updateQueryString"
|
||||||
v-model:open-edit="openEdit"
|
v-model:open-edit="openEdit"
|
||||||
:filterStatus="filterStatus"
|
:filterStatus="filterStatus"
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,9 @@ const props = defineProps({
|
||||||
maxPage: {
|
maxPage: {
|
||||||
type: Number,
|
type: Number,
|
||||||
},
|
},
|
||||||
|
totalList: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
|
|
@ -208,6 +211,7 @@ function filterFn() {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ props.totalList }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="currentPage"
|
v-model="currentPage"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,10 @@ const pagination = ref({
|
||||||
/**
|
/**
|
||||||
* clickไปหน้าเพิ่มchanel
|
* clickไปหน้าเพิ่มchanel
|
||||||
*/
|
*/
|
||||||
function clickAdd(){
|
function clickAdd() {
|
||||||
dataStore.getType('')
|
dataStore.getType("");
|
||||||
router.push(`/discipline/channel/add`);
|
router.push(`/discipline/channel/add`);
|
||||||
};
|
}
|
||||||
|
|
||||||
/** get data */
|
/** get data */
|
||||||
async function getComplaintChanal() {
|
async function getComplaintChanal() {
|
||||||
|
|
@ -91,9 +91,9 @@ async function deleteData(id: string) {
|
||||||
* ไปหน้า แก้ไข
|
* ไปหน้า แก้ไข
|
||||||
* @param id type
|
* @param id type
|
||||||
*/
|
*/
|
||||||
function editPage(data:typeItem){
|
function editPage(data: typeItem) {
|
||||||
dataStore.getType(data.name)
|
dataStore.getType(data.name);
|
||||||
router.push(`/discipline/channel/${data.id}`)
|
router.push(`/discipline/channel/${data.id}`);
|
||||||
}
|
}
|
||||||
/**เมื่อเริ่มโหลดหน้า เรียกใช้ฟังชั่น*/
|
/**เมื่อเริ่มโหลดหน้า เรียกใช้ฟังชั่น*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
@ -188,7 +188,7 @@ onMounted(() => {
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value}}
|
{{ col.value ?? "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td>
|
<q-td>
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,11 @@ const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
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 totalList = ref<number>(0);
|
||||||
|
|
||||||
const modalDetail = ref<boolean>(false);
|
const modalDetail = ref<boolean>(false);
|
||||||
const type = ref<string>('')
|
const type = ref<string>("");
|
||||||
const dataPopUp = ref<DirectorRowsResponse>()
|
const dataPopUp = ref<DirectorRowsResponse>();
|
||||||
/**
|
/**
|
||||||
* ค้นหาในตาราง
|
* ค้นหาในตาราง
|
||||||
*/
|
*/
|
||||||
|
|
@ -64,6 +66,7 @@ async function getList() {
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
|
totalList.value = res.data.result.total;
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
dataStore.fetchData(data);
|
dataStore.fetchData(data);
|
||||||
})
|
})
|
||||||
|
|
@ -120,9 +123,9 @@ function openDetail(data: DirectorRowsResponse, typeChange: string) {
|
||||||
} else if (typeChange == "disciplinary") {
|
} else if (typeChange == "disciplinary") {
|
||||||
titleInvestigate.value = `รายการสอบสวนความผิดทางวินัยของ ${data.fullName}`;
|
titleInvestigate.value = `รายการสอบสวนความผิดทางวินัยของ ${data.fullName}`;
|
||||||
}
|
}
|
||||||
dataPopUp.value = data
|
dataPopUp.value = data;
|
||||||
modalDetail.value = true;
|
modalDetail.value = true;
|
||||||
type.value = typeChange
|
type.value = typeChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDetail() {
|
function closeDetail() {
|
||||||
|
|
@ -207,6 +210,7 @@ onMounted(() => {
|
||||||
:visible-columns="dataStore.visibleColumns"
|
:visible-columns="dataStore.visibleColumns"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ totalList }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="currentPage"
|
v-model="currentPage"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
|
|
@ -258,7 +262,7 @@ onMounted(() => {
|
||||||
v-else
|
v-else
|
||||||
@click="$router.push(`/discipline/director/${props.row.id}`)"
|
@click="$router.push(`/discipline/director/${props.row.id}`)"
|
||||||
>
|
>
|
||||||
{{ col.value }}
|
{{ col.value ?? "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,9 @@ function resetFilter() {
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
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 totalList = ref<number>(0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*pagination ของตาราง
|
*pagination ของตาราง
|
||||||
|
|
@ -180,6 +182,7 @@ async function getList() {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
|
totalList.value = res.data.result.total;
|
||||||
dataStore.getData(data);
|
dataStore.getData(data);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -311,6 +314,7 @@ onMounted(() => {
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ totalList }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="currentPage"
|
v-model="currentPage"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
|
|
@ -345,16 +349,16 @@ onMounted(() => {
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name === 'title'" class="table_ellipsis">
|
<div v-else-if="col.name === 'title'" class="table_ellipsis">
|
||||||
{{ props.row.title }}
|
{{ props.row.title ? props.row.title : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="col.name === 'organization'"
|
v-else-if="col.name === 'organization'"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ props.row.organization }}
|
{{ props.row.organization ? props.row.organization : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value ?? "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ const dataRow = ref<RowList[]>([]);
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
|
const totalList = ref<number>(0);
|
||||||
|
|
||||||
const rowsPerPage = ref<number>(10);
|
const rowsPerPage = ref<number>(10);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -236,6 +238,7 @@ async function getData() {
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
|
totalList.value = res.data.result.total;
|
||||||
fetchAppealComplain(res.data.result.data);
|
fetchAppealComplain(res.data.result.data);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -277,57 +280,57 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||||
<div class="row q-mb-sm q-col-gutter-sm">
|
<div class="row q-mb-sm q-col-gutter-sm">
|
||||||
<div>
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
id="addComplaints"
|
id="addComplaints"
|
||||||
for="addComplaints"
|
for="addComplaints"
|
||||||
size="12px"
|
size="12px"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-plus"
|
icon="mdi-plus"
|
||||||
@click="redirectToPageadd()"
|
@click="redirectToPageadd()"
|
||||||
><q-tooltip>เพิ่มการอุทธรณ์/ร้องทุกข์</q-tooltip></q-btn
|
><q-tooltip>เพิ่มการอุทธรณ์/ร้องทุกข์</q-tooltip></q-btn
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<q-space />
|
|
||||||
<q-input
|
|
||||||
for="#search"
|
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
|
||||||
standout
|
|
||||||
dense
|
|
||||||
v-model="filterKeyword"
|
|
||||||
ref="filterRef"
|
|
||||||
outlined
|
|
||||||
placeholder="ค้นหา"
|
|
||||||
@keydown.enter.prevent="filterFn"
|
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
</div>
|
||||||
<q-icon
|
<q-space />
|
||||||
v-if="filterKeyword !== ''"
|
<q-input
|
||||||
name="clear"
|
for="#search"
|
||||||
class="cursor-pointer"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
@click="resetFilter"
|
standout
|
||||||
/>
|
dense
|
||||||
</template>
|
v-model="filterKeyword"
|
||||||
</q-input>
|
ref="filterRef"
|
||||||
|
outlined
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter.prevent="filterFn"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="filterKeyword !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
id="visibleColumns"
|
id="visibleColumns"
|
||||||
for="visibleColumns"
|
for="visibleColumns"
|
||||||
v-model="dataStore.visibleColumns"
|
v-model="dataStore.visibleColumns"
|
||||||
multiple
|
multiple
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
options-dense
|
options-dense
|
||||||
:display-value="$q.lang.table.columns"
|
:display-value="$q.lang.table.columns"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
:options="dataStore.columns"
|
:options="dataStore.columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
options-cover
|
options-cover
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row q-mb-sm">
|
<div class="col-12 row q-mb-sm">
|
||||||
<q-card bordered class="col-12 filter-card q-pa-sm">
|
<q-card bordered class="col-12 filter-card q-pa-sm">
|
||||||
|
|
@ -404,7 +407,6 @@ onMounted(async () => {
|
||||||
@update:model-value="dataUpdate"
|
@update:model-value="dataUpdate"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -425,6 +427,7 @@ onMounted(async () => {
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
>
|
>
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
|
ทั้งหมด {{ totalList }} รายการ
|
||||||
<q-pagination
|
<q-pagination
|
||||||
v-model="currentPage"
|
v-model="currentPage"
|
||||||
active-color="primary"
|
active-color="primary"
|
||||||
|
|
@ -469,10 +472,10 @@ onMounted(async () => {
|
||||||
v-else-if="col.name === 'description'"
|
v-else-if="col.name === 'description'"
|
||||||
class="table_ellipsis"
|
class="table_ellipsis"
|
||||||
>
|
>
|
||||||
{{ props.row.description }}
|
{{ props.row.description ? props.row.description : "-" }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value ?? "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ const pagination = ref({
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังชั่น redirect
|
* ฟังชั่น redirect
|
||||||
* @param id id ออกคำสั่ง
|
* @param id id ออกคำสั่ง
|
||||||
* @param status status
|
* @param status status
|
||||||
*/
|
*/
|
||||||
|
|
@ -249,8 +249,8 @@ onMounted(() => {
|
||||||
<div v-if="col.name === 'no'">
|
<div v-if="col.name === 'no'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div v-else>
|
||||||
{{ col.value }}
|
{{ col.value ?? "-" }}
|
||||||
</div>
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -17,22 +17,17 @@ const router = useRouter();
|
||||||
const heightSize = ref<string>("224");
|
const heightSize = ref<string>("224");
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const node = ref<any>([]);
|
const node = ref<any>([]);
|
||||||
const expanded = ref<any>([]);
|
const expanded = ref<string[]>([]);
|
||||||
const ticked = ref<any>([]);
|
|
||||||
const orgName = ref<string>("");
|
const orgName = ref<string>("");
|
||||||
const nodeId = ref<string>("");
|
const nodeId = ref<string>("");
|
||||||
|
|
||||||
const notFound = ref<string>("ไม่พบข้อมูลที่ค้นหา");
|
|
||||||
const noData = ref<string>("ไม่มีข้อมูล");
|
|
||||||
const id = ref<string>(route.params.id ? route.params.id.toLocaleString() : "");
|
const id = ref<string>(route.params.id ? route.params.id.toLocaleString() : "");
|
||||||
const {
|
const {
|
||||||
dialogConfirm,
|
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
messageError,
|
messageError,
|
||||||
success,
|
success,
|
||||||
date2Thai,
|
dialogConfirm,
|
||||||
calculateDurationYmd,
|
|
||||||
dialogMessageNotify,
|
dialogMessageNotify,
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
const title = ref<string>(route.params.id ? "แก้ไข" : "เพิ่ม");
|
const title = ref<string>(route.params.id ? "แก้ไข" : "เพิ่ม");
|
||||||
|
|
@ -149,15 +144,20 @@ function onSubmit() {
|
||||||
if (form.nodeId == null) {
|
if (form.nodeId == null) {
|
||||||
dialogMessageNotify($q, "กรุณาเลือกหน่วยงาน/ส่วนราชการ");
|
dialogMessageNotify($q, "กรุณาเลือกหน่วยงาน/ส่วนราชการ");
|
||||||
} else {
|
} else {
|
||||||
showLoader();
|
dialogConfirm($q, () => {
|
||||||
http[id.value ? "put" : "post"](url, body)
|
showLoader();
|
||||||
.then((res) => {
|
http[id.value ? "put" : "post"](url, body)
|
||||||
success($q, "บันทึกสำเร็จ");
|
.then(() => {
|
||||||
id.value ? getDetail() : router.push(`/KPI-indicator-role`);
|
success($q, "บันทึกสำเร็จ");
|
||||||
})
|
id.value ? getDetail() : router.push(`/KPI-indicator-role`);
|
||||||
.finally(() => {
|
})
|
||||||
hideLoader();
|
.catch((err) => {
|
||||||
});
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -189,6 +189,14 @@ function getDetail() {
|
||||||
form.node = data.node;
|
form.node = data.node;
|
||||||
form.nodeId = data.nodeId;
|
form.nodeId = data.nodeId;
|
||||||
form.orgRevisionId = data.orgRevisionId;
|
form.orgRevisionId = data.orgRevisionId;
|
||||||
|
const arrayExpanded = [
|
||||||
|
data.root,
|
||||||
|
data.child1,
|
||||||
|
data.child2,
|
||||||
|
data.child3,
|
||||||
|
data.child4,
|
||||||
|
];
|
||||||
|
expanded.value = arrayExpanded.filter((e) => e !== null).slice(0, -1);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -228,11 +236,6 @@ async function fetchTree(id: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateTicked(val: any) {
|
|
||||||
ticked.value = [];
|
|
||||||
ticked.value.push(val[val.length - 1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateSelected(data: any) {
|
function updateSelected(data: any) {
|
||||||
nodeId.value = data.orgTreeId;
|
nodeId.value = data.orgTreeId;
|
||||||
orgName.value = data.orgTreeName;
|
orgName.value = data.orgTreeName;
|
||||||
|
|
@ -482,7 +485,7 @@ onMounted(() => {
|
||||||
<q-tree
|
<q-tree
|
||||||
dense
|
dense
|
||||||
:nodes="node"
|
:nodes="node"
|
||||||
node-key="orgTreeName"
|
node-key="orgTreeId"
|
||||||
label-key="orgTreeName"
|
label-key="orgTreeName"
|
||||||
v-model:expanded="expanded"
|
v-model:expanded="expanded"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue