แก้ วินัย
This commit is contained in:
parent
a7d5af4600
commit
b2d86fa59d
9 changed files with 76 additions and 42 deletions
|
|
@ -829,7 +829,6 @@ onMounted(async () => {
|
|||
fill-input
|
||||
:options="option"
|
||||
label="หน่วยงานที่ถูกร้องเรียน"
|
||||
clearable
|
||||
@update:model-value="changeFormData()"
|
||||
use-input
|
||||
@filter="filterOptionFn"
|
||||
|
|
@ -872,7 +871,6 @@ onMounted(async () => {
|
|||
map-options
|
||||
hide-selected
|
||||
fill-input
|
||||
clearable
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
use-input
|
||||
|
|
|
|||
|
|
@ -271,17 +271,19 @@ async function fetchDatadetail() {
|
|||
props.data.disciplinaryDateInvestigation ?? null;
|
||||
formData.disciplinaryDateResult =
|
||||
props.data.disciplinaryDateResult ?? null;
|
||||
disciplineDisciplinary_DocSummaryEvidences.value =
|
||||
props.data.disciplineDisciplinary_DocSummaryEvidences;
|
||||
disciplineDisciplinary_DocRecordAccusers.value =
|
||||
props.data.disciplineDisciplinary_DocRecordAccusers;
|
||||
disciplineDisciplinary_DocWitnessess.value =
|
||||
props.data.disciplineDisciplinary_DocWitnessess;
|
||||
disciplineDisciplinary_DocOthers.value =
|
||||
props.data.disciplineDisciplinary_DocOthers;
|
||||
|
||||
disciplineDisciplinary_DocRelevants.value =
|
||||
props.data.disciplineDisciplinary_DocRelevants;
|
||||
props.data.disciplineDisciplinary_DocRelevants ?? [];
|
||||
disciplineDisciplinary_DocSummaryEvidences.value =
|
||||
props.data.disciplineDisciplinary_DocSummaryEvidences ?? [];
|
||||
disciplineDisciplinary_DocRecordAccusers.value =
|
||||
props.data.disciplineDisciplinary_DocRecordAccusers ?? [];
|
||||
disciplineDisciplinary_DocRecordAccusers.value =
|
||||
props.data.disciplineDisciplinary_DocRecordAccusers ?? [];
|
||||
disciplineDisciplinary_DocWitnessess.value =
|
||||
props.data.disciplineDisciplinary_DocWitnessess ?? [];
|
||||
disciplineDisciplinary_DocOthers.value =
|
||||
props.data.disciplineDisciplinary_DocOthers ?? [];
|
||||
|
||||
investigateDis.rowSent = formData.persons.map((person: any) => ({
|
||||
id: person.id,
|
||||
|
|
@ -398,21 +400,19 @@ async function fetchDatadetail() {
|
|||
rows.value = dataMap;
|
||||
const dataList = dataMap.map((item: any) => item.id);
|
||||
formData.directors = dataList;
|
||||
} else if (countNum.value === 2) {
|
||||
} else if (countNum.value >= 2) {
|
||||
disciplineDisciplinary_DocRelevants.value =
|
||||
props.data.disciplineDisciplinary_DocRelevants;
|
||||
} else if (countNum.value === 3) {
|
||||
props.data.disciplineDisciplinary_DocRelevants ?? [];
|
||||
disciplineDisciplinary_DocSummaryEvidences.value =
|
||||
props.data.disciplineDisciplinary_DocSummaryEvidences;
|
||||
} else if (countNum.value === 4) {
|
||||
props.data.disciplineDisciplinary_DocSummaryEvidences ?? [];
|
||||
disciplineDisciplinary_DocRecordAccusers.value =
|
||||
props.data.disciplineDisciplinary_DocRecordAccusers;
|
||||
} else if (countNum.value === 5) {
|
||||
props.data.disciplineDisciplinary_DocRecordAccusers ?? [];
|
||||
disciplineDisciplinary_DocRecordAccusers.value =
|
||||
props.data.disciplineDisciplinary_DocRecordAccusers ?? [];
|
||||
disciplineDisciplinary_DocWitnessess.value =
|
||||
props.data.disciplineDisciplinary_DocWitnessess;
|
||||
} else if (countNum.value === 6) {
|
||||
props.data.disciplineDisciplinary_DocWitnessess ?? [];
|
||||
disciplineDisciplinary_DocOthers.value =
|
||||
props.data.disciplineDisciplinary_DocOthers;
|
||||
props.data.disciplineDisciplinary_DocOthers ?? [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -620,7 +620,7 @@ watch(
|
|||
dense
|
||||
color="red"
|
||||
class="q-ml-sm"
|
||||
icon="mdi-delete-outline"
|
||||
icon="mdi-delete"
|
||||
@click="deleteFile(data.id)"
|
||||
><q-tooltip>ลบไฟล์</q-tooltip></q-btn
|
||||
>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ async function onSubmit(data: any) {
|
|||
formData.append("year", data.year);
|
||||
formData.append("caseType", data.caseType);
|
||||
formData.append("oc", data.oc);
|
||||
formData.append("position", data.position);
|
||||
formData.append("profileType", data.profileType);
|
||||
formData.append("caseNumber", data.caseNumber);
|
||||
formData.append("caseNumber", data.caseNumber);
|
||||
formData.append("file", data.file);
|
||||
showLoader();
|
||||
|
|
|
|||
|
|
@ -69,7 +69,9 @@ async function onSubmit(data: any) {
|
|||
oc: data.oc,
|
||||
position: data.position,
|
||||
status: data.status,
|
||||
...(data.profileType ? { profileType: data.profileType } : {}),
|
||||
};
|
||||
|
||||
showLoader();
|
||||
http
|
||||
.put(config.API.appealByID(id.value), dataList)
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ const optionStatus = ref<any[]>(dataStore.statusOptionsEdit);
|
|||
/** หัวข้อที่เเสดงในตารางผู้ถูกร้องเรียน */
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"profileType",
|
||||
"citizenId",
|
||||
"fullname",
|
||||
"oc",
|
||||
|
|
@ -115,6 +116,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "profileType",
|
||||
align: "left",
|
||||
label: "สถานภาพ",
|
||||
sortable: true,
|
||||
field: "profileType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "citizenId",
|
||||
align: "left",
|
||||
|
|
@ -183,22 +193,19 @@ function toggleModal() {
|
|||
modalPerson.value = !modalPerson.value;
|
||||
}
|
||||
|
||||
async function addPerson(data: any) {
|
||||
toggleModal();
|
||||
}
|
||||
|
||||
/**
|
||||
* เก็บค่า list บุคคลไว้ใน row
|
||||
* @param returnData ชุดข้อมูล บุคคล
|
||||
*/
|
||||
function handleSave(returnData: any) {
|
||||
async function addPerson(data: any, type?: string) {
|
||||
modalPerson.value = false;
|
||||
dataStore.rowsAdd = returnData.map((item: any) => ({
|
||||
dataStore.rowsAdd = data.map((item: any) => ({
|
||||
profileId: item.personId,
|
||||
fullname: item.name,
|
||||
citizenId: item.idcard,
|
||||
oc: item.organization,
|
||||
position: item.position,
|
||||
profileType: item.profileType
|
||||
? item.profileType
|
||||
: type == "officer"
|
||||
? "OFFICER"
|
||||
: "EMPLOYEE",
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
@ -328,6 +335,7 @@ function onSubmit() {
|
|||
file: formData.file,
|
||||
oc: dataRow[0].oc,
|
||||
position: dataRow[0].position,
|
||||
profileType: dataRow[0].profileType,
|
||||
status: formData.status,
|
||||
};
|
||||
props.onSubmit(data);
|
||||
|
|
@ -522,6 +530,15 @@ onMounted(() => {
|
|||
>
|
||||
{{ props.row.oc }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? mainStore.convertType(
|
||||
props.row.profileType
|
||||
)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
|
|
@ -750,7 +767,6 @@ onMounted(() => {
|
|||
:close="toggleModal"
|
||||
:save="addPerson"
|
||||
:selected-data="mainStore.rowsAdd"
|
||||
@returnData="handleSave"
|
||||
selecetSwitch="single"
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,12 +14,13 @@ import type { RowList } from "@/modules/11_discipline/interface/response/appealC
|
|||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||
|
||||
import DialogStatus from "@/modules/11_discipline/components/8_AppealComplain/dialog/DialogEditStatus.vue";
|
||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/Main";
|
||||
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, messageError, hideLoader, dialogConfirm } = mixin;
|
||||
|
||||
const mainStore = useDisciplineMainStore();
|
||||
const modalStatusEdit = ref<boolean>(false);
|
||||
/** stoer */
|
||||
const dataStore = useAppealComplainStore();
|
||||
|
|
@ -49,6 +50,7 @@ const pagination = ref({
|
|||
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"profileType",
|
||||
"type",
|
||||
"title",
|
||||
"fullname",
|
||||
|
|
@ -72,6 +74,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "profileType",
|
||||
align: "left",
|
||||
label: "สถานภาพ",
|
||||
sortable: true,
|
||||
field: "profileType",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "type",
|
||||
align: "left",
|
||||
|
|
@ -563,6 +574,13 @@ onMounted(async () => {
|
|||
<div v-else-if="col.name === 'title'" class="table_ellipsis">
|
||||
{{ props.row.title }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'profileType'">
|
||||
{{
|
||||
props.row.profileType
|
||||
? mainStore.convertType(props.row.profileType)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="col.name === 'description'"
|
||||
class="table_ellipsis"
|
||||
|
|
|
|||
|
|
@ -91,10 +91,9 @@ async function uploadFile() {
|
|||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.finally(async () => {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -114,15 +113,14 @@ async function removeFile(id: string) {
|
|||
await http
|
||||
.delete(config.API.disciplineByIdDoc(props.type, props.id, id))
|
||||
.then(() => {
|
||||
success($q, "ลบไฟล์สำเร็จ");
|
||||
props.fetchData();
|
||||
success($q, "ลบไฟล์สำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.finally(async () => {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ interface RowAddList {
|
|||
citizenId: string;
|
||||
oc: string;
|
||||
position: string;
|
||||
profileType?: string;
|
||||
}
|
||||
|
||||
interface EditDataList {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue