ui รายการอุทธรณ์ร้องทุกข์ *ยังไม่เสร็จดี
This commit is contained in:
parent
e410268bfc
commit
163a3b07a6
9 changed files with 1085 additions and 2 deletions
96
src/modules/11_discipline/store/AppealComplainStore.ts
Normal file
96
src/modules/11_discipline/store/AppealComplainStore.ts
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataOption } from '@/modules/11_discipline/interface/index/Main'
|
||||
import type { MainList, RowList } from '@/modules/11_discipline/interface/response/appealComplain'
|
||||
|
||||
export const useAppealComplainStore = defineStore(
|
||||
"AppealComplainStore",
|
||||
() => {
|
||||
const rows = ref<RowList[]>([]);
|
||||
const visibleColumns = ref<string[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([]);
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const { date2Thai } = mixin
|
||||
function fetchAppealComplain(data: MainList[]) {
|
||||
let dataList: RowList[] = data.map((e: MainList) => ({
|
||||
id: e.id,
|
||||
type: e.type,
|
||||
title: e.title,
|
||||
name: `${e.prefix}${e.firstName} ${e.lastName}`,
|
||||
prefix: e.prefix,
|
||||
firstName: e.firstName,
|
||||
lastName: e.lastName,
|
||||
idCard: e.idCard,
|
||||
caseType: e.caseType,
|
||||
caseNo: e.caseNo,
|
||||
dateEdit: date2Thai(e.dateEdit),
|
||||
status: statusTothai(e.status),
|
||||
}));
|
||||
rows.value = dataList;
|
||||
}
|
||||
|
||||
const statusTothai = (val: string) => {
|
||||
switch (val) {
|
||||
case "NEW":
|
||||
return "ใหม่";
|
||||
case "STOP":
|
||||
return "ยุติเรื่อง";
|
||||
case "SEND_INVESTIGATE":
|
||||
return "มีมูลส่งไปสืบสวนแล้ว";
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
};
|
||||
|
||||
const typeOptions = ref<DataOption[]>([
|
||||
{ id: "APPEAL", name: "อุทธรณ์" },
|
||||
{ id: "COMPLAIN", name: "ร้องทุกข์" },
|
||||
]);
|
||||
const fiscalyearOP = ref<DataOption[]>([
|
||||
{ id: "0", name: "ทั้งหมด" },
|
||||
])
|
||||
|
||||
const statusOptions = ref<DataOption[]>([
|
||||
{ id: "NEW", name: "ใหม่" },
|
||||
{ id: "xx1", name: "ได้รับเอกสารแล้ว" },
|
||||
{ id: "xx2", name: "รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "xx3", name: "ไม่รับอุทธรณ์/ร้องทุกข์" },
|
||||
{ id: "xx4", name: "ตั้งองค์คณะวินิจฉัย" },
|
||||
{ id: "xx5", name: "สรุปผลการพิจารณา" },
|
||||
{ id: "xx6", name: "ปิดคำร้อง" },
|
||||
]);
|
||||
|
||||
// function filterSelector(val: string, update: Function, type: string) {
|
||||
// update(() => {
|
||||
// const needle = val.toLowerCase();
|
||||
// if (type === "yearSelect") {
|
||||
// complainantoptions.value = mainStore.complainantoptionsMain.filter(
|
||||
// (v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||
// );
|
||||
// } else if (type === "filteragencytoptions") {
|
||||
// agencytoptions.value = consideredAgencytoptions.value.filter(
|
||||
// (v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||
// );
|
||||
// } else if (type === "filtercomplainantOP") {
|
||||
// optionListName.value = optionListNameMain.value.filter(
|
||||
// (v: any) => v.name.toLowerCase().indexOf(needle) > -1
|
||||
// );
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
return {
|
||||
rows,
|
||||
visibleColumns,
|
||||
columns,
|
||||
fetchAppealComplain,
|
||||
// filterSelector,
|
||||
typeOptions,
|
||||
statusOptions,
|
||||
fiscalyearOP,
|
||||
};
|
||||
}
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue