fixing column บรรจุ แต่งตั้ง ย้าย
This commit is contained in:
parent
bb2d03e499
commit
9cde68ab4f
74 changed files with 620 additions and 626 deletions
|
|
@ -349,9 +349,9 @@ onMounted(async () => {
|
|||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="data.position"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
|
||||
hide-bottom-space
|
||||
:label="`${'ตำแหน่งประเภท'}`"
|
||||
:label="`${'ประเภทตำแหน่ง'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "positionLevel",
|
||||
align: "left",
|
||||
label: "ระดับ",
|
||||
label: "ระดับตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "positionLevel",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
|
|||
|
|
@ -218,10 +218,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
]);
|
||||
|
||||
/**
|
||||
* แปลง option ที่รับมาเป็น ไทย
|
||||
* @param val ค่าที่ได้จาก API
|
||||
* @returns ส่ง name ที่ id ตรงกันออกไป
|
||||
*/
|
||||
* แปลง option ที่รับมาเป็น ไทย
|
||||
* @param val ค่าที่ได้จาก API
|
||||
* @returns ส่ง name ที่ id ตรงกันออกไป
|
||||
*/
|
||||
function convertComplaintType(val: string) {
|
||||
const result = complainantoptionsMain.value.find(
|
||||
(x: any) => x.id == val
|
||||
|
|
@ -248,10 +248,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
}
|
||||
|
||||
/**
|
||||
* แปลง status เป็น text
|
||||
* @param val status
|
||||
* @returns text
|
||||
*/
|
||||
* แปลง status เป็น text
|
||||
* @param val status
|
||||
* @returns text
|
||||
*/
|
||||
function convertStatus(val: string) {
|
||||
switch (val) {
|
||||
case "NEW":
|
||||
|
|
@ -266,10 +266,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
}
|
||||
|
||||
/**
|
||||
* แปลง option ที่รับมาเป็น ไทย
|
||||
* @param val ค่าที่ได้จาก API
|
||||
* @returns ส่ง name ที่ id ตรงกันออกไป
|
||||
*/
|
||||
* แปลง option ที่รับมาเป็น ไทย
|
||||
* @param val ค่าที่ได้จาก API
|
||||
* @returns ส่ง name ที่ id ตรงกันออกไป
|
||||
*/
|
||||
function convertOffenseDetailst(val: string) {
|
||||
return (
|
||||
offenseDetailstOptions.value.find((x: any) => x.id == val)?.name ?? "-"
|
||||
|
|
@ -277,10 +277,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
}
|
||||
|
||||
/**
|
||||
* แปลง option ที่รับมาเป็น ไทย
|
||||
* @param val ค่าที่ได้จาก API
|
||||
* @returns ส่ง name ที่ id ตรงกันออกไป
|
||||
*/
|
||||
* แปลง option ที่รับมาเป็น ไทย
|
||||
* @param val ค่าที่ได้จาก API
|
||||
* @returns ส่ง name ที่ id ตรงกันออกไป
|
||||
*/
|
||||
function convertStatusResult(val: string) {
|
||||
const result = statusResultOptions.value.find(
|
||||
(x: any) => x.id == val
|
||||
|
|
@ -293,26 +293,23 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
* @param data ข้อมูลรายการบุคคล
|
||||
*/
|
||||
function fetchData(data: ArrayPersonAdd[]) {
|
||||
const dataList:any = data.map((item: any) => (
|
||||
{
|
||||
id: item.id,
|
||||
idcard: item.idcard,
|
||||
name: item.name,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
position: item.position,
|
||||
positionLevel: item.positionLevel,
|
||||
salary: item.salary === null ? '-':item.salary,
|
||||
personId: item.personId,
|
||||
posNo: item.posNo === null ? '-':item.posNo,
|
||||
organization: item.organization,
|
||||
}
|
||||
))
|
||||
const dataList: any = data.map((item: any) => ({
|
||||
id: item.id,
|
||||
idcard: item.idcard,
|
||||
name: item.name,
|
||||
prefix: item.prefix,
|
||||
firstName: item.firstName,
|
||||
lastName: item.lastName,
|
||||
position: item.position,
|
||||
positionLevel: item.positionLevel,
|
||||
salary: item.salary === null ? "-" : item.salary,
|
||||
personId: item.personId,
|
||||
posNo: item.posNo === null ? "-" : item.posNo,
|
||||
organization: item.organization,
|
||||
}));
|
||||
rowsAdd.value = dataList;
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
complainantoptionsMain,
|
||||
convertFault,
|
||||
|
|
@ -330,6 +327,6 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
statusResultOptions,
|
||||
convertStatusResult,
|
||||
rowsCheck,
|
||||
causeTextOptions
|
||||
causeTextOptions,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue