Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-09-16 01:05:00 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7a307931a461a95f13717b008184e010ed39a066
7a307931
1 parent
f432d707
feat. QRCode Print
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
web/src/views/main/doctor/DoctorMenuContainer.tsx
web/src/views/main/doctor/DoctorMenuPresenter.tsx
web/src/views/main/doctor/DoctorMenuContainer.tsx
View file @
7a30793
...
...
@@ -267,15 +267,21 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => {
Alert.onCheck(`${prescribeMedicine.name}(일 복용량:${dosage})\n을 처방하시겠습니까?`, async () => {
setQrcodeUrl(await QRCode.toDataURL(`${prescribeMedicine.name}/${prescribeMedicine.medicineId}/${dosage}/${userId}`, {
type : "image/png",
color : {
dark : '#337DFF', light : '#FFF'
},
color : {
dark : '#337DFF', light : '#FFF'
},
}));
Alert.onSuccess('처방 정보가 생성 되었습니다.', () => onSetNextStepPrescribe());
}, () => null);
};
const onPrintQrcode = async() => {
//toDo : QR코드 출력
Alert.onWarning('준비 중입니다.', () => null);
const onPrintQrcode = async(divId : string) => {
const printContent : any = document.getElementById(divId);
const windowOpen : any = window.open('', 'PrintQRCode');
windowOpen.document.writeln(printContent.innerHTML);
windowOpen.document.close();
windowOpen.focus();
windowOpen.print();
windowOpen.close();
};
const onPrescribeCancel = () => {
...
...
web/src/views/main/doctor/DoctorMenuPresenter.tsx
View file @
7a30793
...
...
@@ -67,7 +67,7 @@ interface DoctorMenuProps {
qrcodeUrl : string | null;
onPrescribeSubmit : () => void;
onPrintQrcode : () => void;
onPrintQrcode : (
arg0 : string
) => void;
onPrescribeCancel : () => void;
}
...
...
@@ -264,7 +264,9 @@ const DoctorMenuPresenter = (props : DoctorMenuProps) => {
/>
</styled.MedicineDosageSetWrapper>
:
<styled.MedicineQRCodeWrapper>
<styled.MedicineQRCodeWrapper
id = 'qrCodePrint'
>
<styled.MedicineQRCodeInfo>
*어플리케이션에서 QR코드를 스캔하면 약병에 약이 등록됩니다.
</styled.MedicineQRCodeInfo>
...
...
@@ -293,7 +295,7 @@ const DoctorMenuPresenter = (props : DoctorMenuProps) => {
:
<styled.MedicinePrescribeButton
isClose = {false}
onClick = {
props.onPrintQrcode
}
onClick = {
() => props.onPrintQrcode('qrCodePrint')
}
>
출력
</styled.MedicinePrescribeButton>
...
...
Please
register
or
login
to post a comment