commit
734c688e2a
13 changed files with 74 additions and 37 deletions
|
|
@ -45,9 +45,11 @@ interface tableType {
|
|||
}
|
||||
|
||||
const rows = ref<tableType[]>([]);
|
||||
const rowsMain = ref<tableType[]>([]);
|
||||
const type = ref<string>("citizenId");
|
||||
const search = ref<string>("");
|
||||
const selected = ref<any>([]);
|
||||
const isSelect = ref<boolean>(false);
|
||||
|
||||
const employeeClass = ref<string>("officer");
|
||||
const employeeClassOption = ref<typeOp[]>([
|
||||
|
|
@ -105,6 +107,8 @@ const emit = defineEmits(["returnData"]);
|
|||
async function close() {
|
||||
modal.value = false;
|
||||
rows.value = [];
|
||||
rowsMain.value = [];
|
||||
selected.value = [];
|
||||
employeeClass.value = "officer";
|
||||
search.value = "";
|
||||
}
|
||||
|
|
@ -196,24 +200,26 @@ async function getSearch() {
|
|||
child3DnaId: e.child3DnaId,
|
||||
child4DnaId: e.child4DnaId,
|
||||
}));
|
||||
rowsMain.value = list;
|
||||
rows.value = list;
|
||||
|
||||
if (route.name == "disciplineInvestigatefactsEdit") {
|
||||
const idIsSend = mainStore.rowsAdd
|
||||
.filter(
|
||||
(item: any) => item.isSend === "DONE" || item.isAncestorDNA === true
|
||||
)
|
||||
.map((item: any) => item.personId);
|
||||
rows.value = list.filter(
|
||||
(item: any) => !idIsSend.includes(item.personId)
|
||||
);
|
||||
} else {
|
||||
const idIsSend = mainStore.rowsAdd
|
||||
.filter((item: any) => item.isAncestorDNA === true)
|
||||
.map((item: any) => item.personId);
|
||||
rows.value = list.filter(
|
||||
(item: any) => !idIsSend.includes(item.personId)
|
||||
);
|
||||
}
|
||||
// if (route.name == "disciplineInvestigatefactsEdit") {
|
||||
// const idIsSend = mainStore.rowsAdd
|
||||
// .filter(
|
||||
// (item: any) => item.isSend === "DONE" || item.isAncestorDNA === true
|
||||
// )
|
||||
// .map((item: any) => item.personId);
|
||||
// rows.value = list.filter(
|
||||
// (item: any) => !idIsSend.includes(item.personId)
|
||||
// );
|
||||
// } else {
|
||||
// const idIsSend = mainStore.rowsAdd
|
||||
// .filter((item: any) => item.isAncestorDNA === true)
|
||||
// .map((item: any) => item.personId);
|
||||
// rows.value = list.filter(
|
||||
// (item: any) => !idIsSend.includes(item.personId)
|
||||
// );
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -226,20 +232,33 @@ async function getSearch() {
|
|||
function updateSelect() {
|
||||
search.value = "";
|
||||
}
|
||||
watch(
|
||||
() => props.selectedData,
|
||||
() => {
|
||||
if (props.selectedData) {
|
||||
selected.value = props.selectedData;
|
||||
}
|
||||
}
|
||||
);
|
||||
// watch(
|
||||
// () => props.selectedData,
|
||||
// () => {
|
||||
// if (props.selectedData) {
|
||||
// selected.value = props.selectedData;
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
|
||||
function updatePagination(newPagination: any) {
|
||||
pagination.value.page = 1;
|
||||
pagination.value.rowsPerPage = newPagination.rowsPerPage;
|
||||
}
|
||||
|
||||
function checkList(propsRow: tableType) {
|
||||
// const filterCondition =
|
||||
// route.name === "disciplineInvestigatefactsEdit"
|
||||
// ? (item: any) => item.isSend === "DONE" || item.isAncestorDNA === true
|
||||
// : (item: any) => item.isAncestorDNA === true;
|
||||
|
||||
const idIsSend = mainStore.rowsAdd
|
||||
// .filter(filterCondition)
|
||||
.map((item: any) => item.personId);
|
||||
|
||||
return !idIsSend.includes(propsRow.personId);
|
||||
}
|
||||
|
||||
watch(
|
||||
() => pagination.value.rowsPerPage,
|
||||
async () => {
|
||||
|
|
@ -384,11 +403,20 @@ watch(
|
|||
<q-tr :props="props" class="cursor-pointer">
|
||||
<td class="text-center">
|
||||
<q-checkbox
|
||||
v-if="checkList(props.row)"
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/>
|
||||
<q-checkbox
|
||||
v-else
|
||||
disable
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="isSelect"
|
||||
/>
|
||||
</td>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'">
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ function handleSave(returnData: any) {
|
|||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นสำหรับอัพโหลดไฟล์เอกสารหลักฐาน
|
||||
* ฟังก์ชั่นสำหรับอัปโหลดไฟล์เอกสารหลักฐาน
|
||||
*/
|
||||
function upLoadFileDoc() {
|
||||
const Data = new FormData();
|
||||
|
|
@ -195,7 +195,7 @@ function upLoadFileDoc() {
|
|||
countNum.value = 2;
|
||||
formData.documentFile = null;
|
||||
|
||||
success($q, "อัพโหลดไฟล์สำเร็จ");
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -960,7 +960,7 @@ onMounted(async () => {
|
|||
<div class="row"><q-separator vertical /></div>
|
||||
</div>
|
||||
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
<!-- อัปโหลดไฟล์ -->
|
||||
<div class="col-sm-12 col-md-3">
|
||||
<div flat class="q-pa-md">
|
||||
<div class="col-12 row q-col-gutter-md">
|
||||
|
|
|
|||
|
|
@ -173,10 +173,12 @@ onMounted(() => {
|
|||
@click="onDetail(props.row.id)"
|
||||
><q-tooltip>รายละเอียด</q-tooltip></q-btn
|
||||
>
|
||||
|
||||
<q-btn
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
props.row.statusMain != 'SEND_INVESTIGATE'
|
||||
"
|
||||
id="addComplaints"
|
||||
for="addComplaints"
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ function onclickViewinfo(id: string, type: string) {
|
|||
isEmpType.value = type;
|
||||
}
|
||||
|
||||
/** อัพเดต ปิด/เปิดเมนู ทะเบียนประวัติ */
|
||||
/** อัปเดต ปิด/เปิดเมนู ทะเบียนประวัติ */
|
||||
function updatemodalPersonal(modal: boolean) {
|
||||
modalPersonal.value = modal;
|
||||
}
|
||||
|
|
@ -1287,7 +1287,6 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- วันที่สืบสวน (List Log) -->
|
||||
<div
|
||||
v-if="
|
||||
formData.investigationExtendHistory !== null &&
|
||||
|
|
@ -1761,7 +1760,7 @@ onMounted(async () => {
|
|||
</q-form>
|
||||
</div>
|
||||
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
<!-- อัปโหลดไฟล์ -->
|
||||
<DialogDuty
|
||||
:modal="modalEditDirector"
|
||||
:close-popup="closeEditDirector"
|
||||
|
|
|
|||
|
|
@ -161,6 +161,8 @@ async function fetchDetailInvestigate() {
|
|||
)
|
||||
)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
|
||||
const dataList = res.data.result;
|
||||
dataInvestigatefacts.id = dataList.id;
|
||||
dataInvestigatefacts.idComplaint = dataList.idComplaint;
|
||||
|
|
@ -191,6 +193,8 @@ async function fetchDetailInvestigate() {
|
|||
dataList.investigationDaysExtend;
|
||||
dataInvestigatefacts.organizationId = dataList.organizationId;
|
||||
dataInvestigatefacts.organization = dataList.organization;
|
||||
dataInvestigatefacts.investigationExtendHistory =
|
||||
dataList.investigationExtendHistory;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
|
|||
|
|
@ -1849,7 +1849,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
<div class="row"><q-separator vertical /></div>
|
||||
</div>
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
<!-- อัปโหลดไฟล์ -->
|
||||
<div class="col-xs-12 col-sm-12 col-md-3">
|
||||
<div class="q-col-gutter-md row q-pa-md">
|
||||
<!-- ยังไม่มี api -->
|
||||
|
|
|
|||
|
|
@ -244,7 +244,8 @@ function filterOptionFn(val: string, update: Function) {
|
|||
<q-btn
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
props.row.startMain !== 'DONE'
|
||||
"
|
||||
flat
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -633,7 +633,7 @@ watch(
|
|||
<div class="row"><q-separator vertical /></div>
|
||||
</div>
|
||||
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
<!-- อัปโหลดไฟล์ -->
|
||||
<div class="col-sm-12 col-md-3 q-pa-md">
|
||||
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
|
||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
|
|
|
|||
|
|
@ -658,7 +658,7 @@ onMounted(() => {
|
|||
</div>
|
||||
<div class="row"><q-separator vertical /></div>
|
||||
</div>
|
||||
<!-- อัพโหลดไฟล์ -->
|
||||
<!-- อัปโหลดไฟล์ -->
|
||||
<div v-if="isReadonly" class="col-sm-12 col-md-3 q-pa-md">
|
||||
<q-card
|
||||
bordered
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ async function uploadFile() {
|
|||
.then(() => {
|
||||
file.value = null;
|
||||
props.fetchData();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ interface DataListRow {
|
|||
levelConsideration: string;
|
||||
dateConsideration: string | null;
|
||||
status: string;
|
||||
statusMain?: string;
|
||||
}
|
||||
interface DataAdd {
|
||||
id: string;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ export const useComplainstDataStore = defineStore(
|
|||
? date2Thai(e.dateConsideration)
|
||||
: "-",
|
||||
status: e.status ? statusTothai(e.status) : "-",
|
||||
statusMain: e.status,
|
||||
}));
|
||||
rows.value = dataList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,6 +277,7 @@ export const useInvestigateDisStore = defineStore(
|
|||
)}`
|
||||
: "-",
|
||||
status: convertStatus(e.status) ?? "-",
|
||||
startMain: e.status,
|
||||
dateReceived: e.dateReceived ? date2Thai(e.dateReceived) : "-",
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue