1.0.2
This commit is contained in:
21
public/pdf.worker.min.js
vendored
Normal file
21
public/pdf.worker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@ const API_CONFIG = {
|
|||||||
EXTERNAL_URL: 'http://apihis.circleharmonyhospital.cn:8982/platform-api',
|
EXTERNAL_URL: 'http://apihis.circleharmonyhospital.cn:8982/platform-api',
|
||||||
BASE_URL: import.meta.env.MODE === 'development'
|
BASE_URL: import.meta.env.MODE === 'development'
|
||||||
? '/platform-api'
|
? '/platform-api'
|
||||||
: 'http://apihis.circleharmonyhospital.cn:8982/platform-api',
|
: '/platform-api',
|
||||||
TIMEOUT: 120000,
|
TIMEOUT: 120000,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ request.interceptors.response.use(
|
|||||||
localStorage.removeItem('operatorName');
|
localStorage.removeItem('operatorName');
|
||||||
localStorage.removeItem('operatorUsername');
|
localStorage.removeItem('operatorUsername');
|
||||||
// 跳转到首页并添加登录参数
|
// 跳转到首页并添加登录参数
|
||||||
const baseUrl = import.meta.env.NODE_ENV === 'development' ? '/' : '/tijian-zongkong/';
|
const baseUrl = import.meta.env.MODE === 'development' ? '/' : '/tijian-zongkong/';
|
||||||
window.location.href = `${baseUrl}#/home?login=true`;
|
window.location.href = `${baseUrl}#/home?login=true`;
|
||||||
// navigate('/home?login=true');
|
// navigate('/home?login=true');
|
||||||
// return;
|
// return;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
21
src/assets/pdf.worker.min.mjs
Normal file
21
src/assets/pdf.worker.min.mjs
Normal file
File diff suppressed because one or more lines are too long
BIN
src/assets/sign.png
Normal file
BIN
src/assets/sign.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import * as pdfjsLib from 'pdfjs-dist';
|
import * as pdfjsLib from 'pdfjs-dist/legacy/build/pdf.mjs';
|
||||||
|
|
||||||
import { getDaojiandanPdf as getDaojiandanPdfApi, submitDaojiandanSign, editDaojiandanPrintStatus } from '../../api';
|
import { getDaojiandanPdf as getDaojiandanPdfApi, submitDaojiandanSign, editDaojiandanPrintStatus } from '../../api';
|
||||||
import type { ExamClient } from '../../data/mockData';
|
import type { ExamClient } from '../../data/mockData';
|
||||||
@@ -24,7 +24,7 @@ if (typeof (Promise as any).try === 'undefined') {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pdfjsLib.GlobalWorkerOptions.workerSrc = '/pdf.worker.min.mjs';
|
pdfjsLib.GlobalWorkerOptions.workerSrc = import.meta.env.MODE === 'development' ? '/pdf.worker.min.js' : '/tijian-zongkong/pdf.worker.min.js';
|
||||||
|
|
||||||
|
|
||||||
export const ExamPrintPanel = ({ client }: { client: ExamClient }) => {
|
export const ExamPrintPanel = ({ client }: { client: ExamClient }) => {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import * as pdfjsLib from 'pdfjs-dist/legacy/build/pdf.mjs';
|
import * as pdfjsLib from 'pdfjs-dist/legacy/build/pdf.mjs';
|
||||||
import pdfWorkerSrc from 'pdfjs-dist/build/pdf.worker.min.mjs?url';
|
|
||||||
|
|
||||||
import type { OutputTongyishuFileInfo, OutputTijianPdfFileInfo, OutputPhysicalExamItemInfo } from '../../api';
|
import type { OutputTongyishuFileInfo, OutputTijianPdfFileInfo, OutputPhysicalExamItemInfo } from '../../api';
|
||||||
import {
|
import {
|
||||||
@@ -38,7 +37,7 @@ if (typeof (Promise as any).try === 'undefined') {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pdfjsLib.GlobalWorkerOptions.workerSrc = pdfWorkerSrc;
|
pdfjsLib.GlobalWorkerOptions.workerSrc = import.meta.env.MODE === 'development' ? '/pdf.worker.min.js' : '/tijian-zongkong/pdf.worker.min.js';
|
||||||
|
|
||||||
interface ExamSignPanelProps {
|
interface ExamSignPanelProps {
|
||||||
examId?: number;
|
examId?: number;
|
||||||
@@ -2057,7 +2056,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
<span className='truncate'>{item.pdf_name.length > 10 ? item.pdf_name.slice(0, 10) + "..." : item.pdf_name}</span>
|
<span className='truncate'>{item.pdf_name.length > 10 ? item.pdf_name.slice(0, 10) + "..." : item.pdf_name}</span>
|
||||||
{item.combination_code !== undefined && signedCombinationCodes.includes(Number(item.combination_code)) && (
|
{item.combination_code !== undefined && signedCombinationCodes.includes(Number(item.combination_code)) && (
|
||||||
<img
|
<img
|
||||||
src='/sign.png'
|
src={import.meta.env.MODE === 'development' ? '/sign.png' : '/tijian-zongkong/sign.png'}
|
||||||
alt='已签名'
|
alt='已签名'
|
||||||
className='w-16 h-16 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none select-none'
|
className='w-16 h-16 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none select-none'
|
||||||
loading='lazy'
|
loading='lazy'
|
||||||
@@ -2109,7 +2108,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
<span className='truncate'>导检单</span>
|
<span className='truncate'>导检单</span>
|
||||||
{isDaojiandanSigned && (
|
{isDaojiandanSigned && (
|
||||||
<img
|
<img
|
||||||
src='/sign.png'
|
src={import.meta.env.MODE === 'development' ? '/sign.png' : '/tijian-zongkong/sign.png'}
|
||||||
alt='已签名'
|
alt='已签名'
|
||||||
className='w-16 h-16 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none select-none'
|
className='w-16 h-16 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none select-none'
|
||||||
loading='lazy'
|
loading='lazy'
|
||||||
@@ -2232,7 +2231,7 @@ export const ExamSignPanel = ({ examId, onBusyChange }: ExamSignPanelProps) => {
|
|||||||
)}
|
)}
|
||||||
{isSigned && (
|
{isSigned && (
|
||||||
<img
|
<img
|
||||||
src='/sign.png'
|
src={import.meta.env.MODE === 'development' ? '/sign.png' : '/tijian-zongkong/sign.png'}
|
||||||
alt='已签名'
|
alt='已签名'
|
||||||
className='w-16 h-16 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none select-none'
|
className='w-16 h-16 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none select-none'
|
||||||
loading='lazy'
|
loading='lazy'
|
||||||
|
|||||||
Reference in New Issue
Block a user