แก้หน้าเพิ่มเรื่องร้องเรียน
This commit is contained in:
parent
01cbfe6245
commit
b49cdaf913
5 changed files with 243 additions and 42 deletions
|
|
@ -3,17 +3,39 @@ import { ref } from "vue";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||
import type { DataList, DataListRow } from "@/modules/11_discipline/interface/response/complaint"
|
||||
import type { DataList, DataListRow,DataAdd,DataAddResponse } from "@/modules/11_discipline/interface/response/complaint"
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const { date2Thai } = mixin
|
||||
|
||||
|
||||
// id
|
||||
// cardId
|
||||
// prefix
|
||||
// firstName
|
||||
// lastName
|
||||
// position
|
||||
// level
|
||||
// oc
|
||||
export const useComplainstDataStore = defineStore("DisciplineComplainst", () => {
|
||||
const rows = ref<DataListRow[]>([])
|
||||
const rowsAdd = ref<DataAdd[]>([])
|
||||
const visibleColumns = ref<string[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([]);
|
||||
|
||||
function fetchComplainstAdd(data: DataAddResponse[]) {
|
||||
let datalist = data.map((e: DataAddResponse) => ({
|
||||
id: e.id,
|
||||
cardId: e.cardId,
|
||||
fullName:`${e.prefix}${e.firstName} ${e.lastName}`,
|
||||
position: e.position,
|
||||
level: e.level,
|
||||
degree: e.degree,
|
||||
oc: e.oc,
|
||||
}))
|
||||
rowsAdd.value = datalist
|
||||
}
|
||||
|
||||
function fetchComplainst(data: DataList[]) {
|
||||
let datalist = data.map((e: DataList) => ({
|
||||
id: e.id,
|
||||
|
|
@ -71,6 +93,7 @@ export const useComplainstDataStore = defineStore("DisciplineComplainst", () =>
|
|||
|
||||
return {
|
||||
rows,
|
||||
rowsAdd,
|
||||
visibleColumns,
|
||||
columns,
|
||||
fetchComplainst,
|
||||
|
|
@ -79,6 +102,7 @@ export const useComplainstDataStore = defineStore("DisciplineComplainst", () =>
|
|||
complainantoptions,
|
||||
agencytoptions,
|
||||
optionListName,
|
||||
fetchComplainstAdd
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const useInvestigateFactStore = defineStore("DisciplineInvestigateFact",
|
|||
"interrogated",
|
||||
"fault",
|
||||
"status",
|
||||
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
]);
|
||||
|
||||
// หัวตาราง
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue