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