打印按钮
This commit is contained in:
@@ -907,6 +907,9 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
.print-button, .close-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
page-break-after: always;
|
page-break-after: always;
|
||||||
@@ -920,6 +923,37 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
.print-button, .close-button {
|
||||||
|
padding: 4px 12px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
.print-button {
|
||||||
|
background-color: #2563eb;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.print-button:hover {
|
||||||
|
background-color: #1d4ed8;
|
||||||
|
}
|
||||||
|
.close-button {
|
||||||
|
background-color: transparent;
|
||||||
|
color: #374151;
|
||||||
|
}
|
||||||
|
.close-button:hover {
|
||||||
|
background-color: #e5e7eb;
|
||||||
|
}
|
||||||
|
.button-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 20px;
|
||||||
|
right: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -928,6 +962,10 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div class="button-container">
|
||||||
|
<button class="close-button" onclick="window.close()">关闭</button>
|
||||||
|
<button class="print-button" onclick="window.print()">打印</button>
|
||||||
|
</div>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
canvasImages.forEach((imgData) => {
|
canvasImages.forEach((imgData) => {
|
||||||
@@ -1121,7 +1159,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.print-button {
|
.print-button, .close-button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
@@ -1137,22 +1175,37 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.print-button {
|
.print-button, .close-button {
|
||||||
position: fixed;
|
padding: 4px 12px;
|
||||||
top: 20px;
|
|
||||||
right: 20px;
|
|
||||||
padding: 10px 20px;
|
|
||||||
background-color: #2563eb;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
z-index: 1000;
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
.print-button {
|
||||||
|
background-color: #2563eb;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
.print-button:hover {
|
.print-button:hover {
|
||||||
background-color: #1d4ed8;
|
background-color: #1d4ed8;
|
||||||
}
|
}
|
||||||
|
.close-button {
|
||||||
|
background-color: transparent;
|
||||||
|
color: #374151;
|
||||||
|
}
|
||||||
|
.close-button:hover {
|
||||||
|
background-color: #e5e7eb;
|
||||||
|
}
|
||||||
|
.button-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 20px;
|
||||||
|
right: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -1161,7 +1214,10 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<button class="print-button" onclick="window.print()">打印</button>
|
<div class="button-container">
|
||||||
|
<button class="close-button" onclick="window.close()">关闭</button>
|
||||||
|
<button class="print-button" onclick="window.print()">打印</button>
|
||||||
|
</div>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
canvasImages.forEach((imgData) => {
|
canvasImages.forEach((imgData) => {
|
||||||
@@ -1235,7 +1291,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.print-button {
|
.print-button, .close-button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
@@ -1251,22 +1307,37 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.print-button {
|
.print-button, .close-button {
|
||||||
position: fixed;
|
padding: 4px 12px;
|
||||||
top: 20px;
|
|
||||||
right: 20px;
|
|
||||||
padding: 10px 20px;
|
|
||||||
background-color: #2563eb;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
z-index: 1000;
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
.print-button {
|
||||||
|
background-color: #2563eb;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
.print-button:hover {
|
.print-button:hover {
|
||||||
background-color: #1d4ed8;
|
background-color: #1d4ed8;
|
||||||
}
|
}
|
||||||
|
.close-button {
|
||||||
|
background-color: transparent;
|
||||||
|
color: #374151;
|
||||||
|
}
|
||||||
|
.close-button:hover {
|
||||||
|
background-color: #e5e7eb;
|
||||||
|
}
|
||||||
|
.button-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 20px;
|
||||||
|
right: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -1275,7 +1346,10 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<button class="print-button" onclick="window.print()">打印</button>
|
<div class="button-container">
|
||||||
|
<button class="close-button" onclick="window.close()">关闭</button>
|
||||||
|
<button class="print-button" onclick="window.print()">打印</button>
|
||||||
|
</div>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
canvasImages.forEach((imgData) => {
|
canvasImages.forEach((imgData) => {
|
||||||
@@ -1479,7 +1553,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.print-button {
|
.print-button, .close-button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
@@ -1495,22 +1569,37 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.print-button {
|
.print-button, .close-button {
|
||||||
position: fixed;
|
padding: 4px 12px;
|
||||||
top: 20px;
|
|
||||||
right: 20px;
|
|
||||||
padding: 10px 20px;
|
|
||||||
background-color: #2563eb;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
z-index: 1000;
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
.print-button {
|
||||||
|
background-color: #2563eb;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
.print-button:hover {
|
.print-button:hover {
|
||||||
background-color: #1d4ed8;
|
background-color: #1d4ed8;
|
||||||
}
|
}
|
||||||
|
.close-button {
|
||||||
|
background-color: transparent;
|
||||||
|
color: #374151;
|
||||||
|
}
|
||||||
|
.close-button:hover {
|
||||||
|
background-color: #e5e7eb;
|
||||||
|
}
|
||||||
|
.button-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 20px;
|
||||||
|
right: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -1519,7 +1608,10 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<button class="print-button" onclick="window.print()">打印</button>
|
<div class="button-container">
|
||||||
|
<button class="close-button" onclick="window.close()">关闭</button>
|
||||||
|
<button class="print-button" onclick="window.print()">打印</button>
|
||||||
|
</div>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
allImages.forEach((imgData) => {
|
allImages.forEach((imgData) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user