เพิ่ม api เเก้คำ เพิ่ม ฟิลเตอร์ status
This commit is contained in:
parent
9ea5056e36
commit
769db85cb1
5 changed files with 49 additions and 50 deletions
|
|
@ -89,7 +89,7 @@ const fecthlistappointment = async () => {
|
|||
console.log(res);
|
||||
let response = res.data.result;
|
||||
listRecevice.value = response;
|
||||
// console.log(response);
|
||||
console.log(response);
|
||||
rows.value = response.map((e: any) => ({
|
||||
personalId: e.id,
|
||||
citizenId: e.citizenId,
|
||||
|
|
@ -112,7 +112,7 @@ const fecthlistappointment = async () => {
|
|||
birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth),
|
||||
}));
|
||||
// console.log(rows.value);
|
||||
rows2.value = rows.value.filter((e: any) => e.orgName !== null);
|
||||
rows2.value = rows.value.filter((e: any) => e.orgName !== null && e.status !== 'ส่งรายชื่อไปออกคำสั่ง'&& e.status !== 'ออกคำสั่งเสร็จแล้ว');
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(typeof e);
|
||||
|
|
|
|||
|
|
@ -167,10 +167,10 @@
|
|||
{{ props.row.fileName }}
|
||||
</q-td>
|
||||
<q-td key="btnMicrosoft" :props="props">
|
||||
<q-btn flat dense round color="red" icon="picture_as_pdf" @click="filePdf(props.row.id,'pdf')">
|
||||
<q-btn flat dense round color="red" icon="picture_as_pdf" @click="fileDownload(props.row.no,'pdf')">
|
||||
<q-tooltip>ไฟล์ PDF</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn flat dense round color="blue" icon="mdi-file-word" @click="fileDoc(props.row.id,'docx')">
|
||||
<q-btn flat dense round color="blue" icon="mdi-file-word" @click="fileDownload(props.row.no,'docx')">
|
||||
<q-tooltip>ไฟล์ WORD</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
|
|
@ -423,8 +423,9 @@ const $q = useQuasar();
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const id = ref<string>("")
|
||||
const dataId = (route.params.id as string);
|
||||
|
||||
const dataId = route.params.id;
|
||||
const {
|
||||
date2Thai,
|
||||
messageError,
|
||||
|
|
@ -463,41 +464,34 @@ const responseData = ref<ResponseDataDetail>({
|
|||
status: "",
|
||||
fullname: "",
|
||||
});
|
||||
const filePdf = (id:number,type:string) =>{
|
||||
|
||||
}
|
||||
const fileDoc = (id:number,type:string) =>{
|
||||
|
||||
}
|
||||
// const downloadFile = (response: any, filename: string) => {
|
||||
// const link = document.createElement("a");
|
||||
// var fileName = filename;
|
||||
// link.href = window.URL.createObjectURL(new Blob([response.data]));
|
||||
// link.setAttribute("download", fileName);
|
||||
// document.body.appendChild(link);
|
||||
// link.click();
|
||||
// document.body.removeChild(link);
|
||||
// };
|
||||
|
||||
// const FileDownload = async (type: string) => {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.reportEvaluateRecord1(type, numTab.id), {
|
||||
// responseType: "blob",
|
||||
// })
|
||||
// .then(async (res) => {
|
||||
// downloadFile(
|
||||
// res,
|
||||
// `แบบบันทึกผล(ผู้ดูเเล)_${fullname.value}_ครั้งที่.${type}`
|
||||
// );
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
// };
|
||||
const downloadFile = (response: any, filename: string) => {
|
||||
const link = document.createElement("a");
|
||||
var fileName = filename;
|
||||
link.href = window.URL.createObjectURL(new Blob([response.data]));
|
||||
link.setAttribute("download", fileName);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
};
|
||||
const fileDownload = async (no:number,type:string) =>{
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.reportTransferFile(no,type,id.value), {
|
||||
responseType: "blob",
|
||||
})
|
||||
.then(async (res) => {
|
||||
downloadFile(
|
||||
res,
|
||||
`_ครั้งที่.${type}`
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
const rows = ref<TypeFile[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -538,27 +532,27 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const rowsFileDownload = ref<any[]>([{
|
||||
id:1,
|
||||
no:1,
|
||||
fileName: "คําร้องขอโอนไปถึงส่วนราชการอื่นนอก กรุงเทพมหานครที่ข้าราชการประสงค์ขอโอน",
|
||||
pathName: ""
|
||||
},{
|
||||
id:2,
|
||||
no:2,
|
||||
fileName: "หนังสือแจ้งสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานคร ให้ทราบตําแหน่งและตําแหน่งเลขที่ที่ดําเนินการให้โอน",
|
||||
pathName: ""
|
||||
},{
|
||||
id:3,
|
||||
no:3,
|
||||
fileName: "หนังสือยินยอมให้โอนและวันที่พร้อมจะให้โอนไปยัง หน่วยงานที่รับโอน",
|
||||
pathName: ""
|
||||
},{
|
||||
id:4,
|
||||
no:4,
|
||||
fileName: "หนังสือแจ้งสหกรณ์ออมทรัพย์กรุงเทพมหานครเพื่อขอ ตรวจสอบภาระหนี้สินสหกรณ์ออมทรัพย์",
|
||||
pathName: ""
|
||||
},{
|
||||
id:5,
|
||||
no:5,
|
||||
fileName: "หนังสือถึงสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานครเพื่อขอตรวจสอบพฤติการณ์ทางวินัย และภาระหนี้สินสวัสดิการ",
|
||||
pathName: ""
|
||||
},{
|
||||
id:6,
|
||||
no:6,
|
||||
fileName: "หนังสือถึงสถาบันพัฒนาข้าราชการกรุงเทพมหานครเพื่อขอตรวจสอบเรื่องภาระผูกพันการรับทุนและการลา ศึกษาต่อกับทางกรุงเทพมหานคร",
|
||||
pathName: ""
|
||||
}]);
|
||||
|
|
@ -569,7 +563,7 @@ const getData = async () => {
|
|||
.get(config.API.transferId(dataId.toString()))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
// console.log(data);
|
||||
id.value = data.id
|
||||
let list: TypeFile[] = [];
|
||||
if (data.docs.length > 0) {
|
||||
data.docs.map((doc: TypeFile) => {
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ const saveOrder = async () => {
|
|||
|
||||
<q-dialog v-model="modal">
|
||||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
<DialogHeader title="ส่งไปออกคำสั่งโอนออก" :close="closeModal" />
|
||||
<DialogHeader title="ส่งไปออกคำสั่ง" :close="closeModal" />
|
||||
<q-separator />
|
||||
<q-card-section class="q-pt-none">
|
||||
<div class="row justify-end">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue