打印按钮
This commit is contained in:
@@ -907,6 +907,9 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.print-button, .close-button {
|
||||
display: none;
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
page-break-after: always;
|
||||
@@ -920,6 +923,37 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
margin: 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 {
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -928,6 +962,10 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
</style>
|
||||
</head>
|
||||
<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) => {
|
||||
@@ -1121,7 +1159,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.print-button {
|
||||
.print-button, .close-button {
|
||||
display: none;
|
||||
}
|
||||
img {
|
||||
@@ -1137,22 +1175,37 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.print-button {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
padding: 10px 20px;
|
||||
background-color: #2563eb;
|
||||
color: white;
|
||||
.print-button, .close-button {
|
||||
padding: 4px 12px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
z-index: 1000;
|
||||
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 {
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -1161,7 +1214,10 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
</style>
|
||||
</head>
|
||||
<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) => {
|
||||
@@ -1235,7 +1291,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.print-button {
|
||||
.print-button, .close-button {
|
||||
display: none;
|
||||
}
|
||||
img {
|
||||
@@ -1251,22 +1307,37 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.print-button {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
padding: 10px 20px;
|
||||
background-color: #2563eb;
|
||||
color: white;
|
||||
.print-button, .close-button {
|
||||
padding: 4px 12px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
z-index: 1000;
|
||||
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 {
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -1275,7 +1346,10 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
</style>
|
||||
</head>
|
||||
<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) => {
|
||||
@@ -1479,7 +1553,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.print-button {
|
||||
.print-button, .close-button {
|
||||
display: none;
|
||||
}
|
||||
img {
|
||||
@@ -1495,22 +1569,37 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.print-button {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
padding: 10px 20px;
|
||||
background-color: #2563eb;
|
||||
color: white;
|
||||
.print-button, .close-button {
|
||||
padding: 4px 12px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
z-index: 1000;
|
||||
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 {
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -1519,7 +1608,10 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
||||
</style>
|
||||
</head>
|
||||
<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) => {
|
||||
|
||||
Reference in New Issue
Block a user