客户端升级

This commit is contained in:
2022-09-28 09:18:01 +08:00
parent 76c2834633
commit 8f537dff99
8 changed files with 22 additions and 18 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "JUSTAR", "name": "JUSTAR",
"version": "2.1.5", "version": "2.1.6",
"description": "钜星科技便民问诊系统", "description": "钜星科技便民问诊系统",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {

View File

@ -159,7 +159,7 @@ let main ={
} }
}, },
{ {
label:'版本号:2.1.5', label:'版本号:2.1.6',
icon: respath + path.sep+ "static"+ path.sep+"images"+ path.sep+"paste.png", icon: respath + path.sep+ "static"+ path.sep+"images"+ path.sep+"paste.png",
},] },]
}); });

View File

@ -1,4 +1,4 @@
# For documentation, see https://www.sumatrapdfreader.org/settings/settings3-3-1.html # For documentation, see https://www.sumatrapdfreader.org/settings/settings3.2.html
MainWindowBackground = #80fff200 MainWindowBackground = #80fff200
EscToExit = false EscToExit = false
@ -13,7 +13,6 @@ FixedPageUI [
SelectionColor = #f5fc0c SelectionColor = #f5fc0c
WindowMargin = 2 4 2 4 WindowMargin = 2 4 2 4
PageSpacing = 4 4 PageSpacing = 4 4
HideScrollbars = false
] ]
EbookUI [ EbookUI [
FontName = Georgia FontName = Georgia
@ -47,9 +46,6 @@ ForwardSearch [
HighlightColor = #6581ff HighlightColor = #6581ff
HighlightPermanent = false HighlightPermanent = false
] ]
Annotations [
HighlightColor = #ffff00
]
CustomScreenDPI = 0 CustomScreenDPI = 0
RememberStatePerDocument = true RememberStatePerDocument = true
@ -67,7 +63,6 @@ WindowPos = 0 0 0 0
ShowToc = true ShowToc = true
SidebarDx = 0 SidebarDx = 0
TocDy = 0 TocDy = 0
TreeFontSize = 0
ShowStartPage = true ShowStartPage = true
UseTabs = true UseTabs = true
@ -76,6 +71,6 @@ FileStates [
SessionData [ SessionData [
] ]
TimeOfLastUpdateCheck = 0 0 TimeOfLastUpdateCheck = 0 0
OpenCountWeek = 604 OpenCountWeek = 523
# Settings after this line have not been recognized by the current version # Settings after this line have not been recognized by the current version

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,11 @@
export interface Options {
printer?: string;
unix?: string[];
win32?: string[];
}
export function print(path: string, options?: any): Promise<void>;
export function getPrinters(): Promise<string[]>;
export function getDefaultPrinter(): Promise<string>;

View File

@ -63,8 +63,8 @@ let print_monitor={
print_operation.getPrinterList().then(listPrinter => { print_operation.getPrinterList().then(listPrinter => {
return listPrinter return listPrinter
}).then(listPrinter => { }).then(listPrinter => {
print_operation.getDefaultPrinter().then(defaultPrinter => {
let data ={} let data ={}
let defaultPrinter;
//获取打印缓存 //获取打印缓存
print_url = os.homedir()+path.sep+"AppData/Local/justarData/print/print.json" print_url = os.homedir()+path.sep+"AppData/Local/justarData/print/print.json"
log.info("打印机缓存文件:"+print_url); log.info("打印机缓存文件:"+print_url);
@ -89,7 +89,6 @@ let print_monitor={
}else{ }else{
data = { data = {
listPrinter: listPrinter, listPrinter: listPrinter,
defaultPrinter: defaultPrinter.name,
pdf_url: pdf_url pdf_url: pdf_url
} }
win.show(); win.show();
@ -98,7 +97,6 @@ let print_monitor={
win.webContents.send('printerData', json_data); win.webContents.send('printerData', json_data);
} }
});
}); });
}) })
}, },

View File

@ -100,14 +100,15 @@
let html = []; let html = [];
for (const printer of data.listPrinter) { for (const printer of data.listPrinter) {
if (printer.name === defaultPrinter) { if (printer.name === defaultPrinter) {
html.push(`<a href="#" class="list-group-item list-group-item-action active" data-name="${printer.name}"> html.push(`<a href="#" class="list-group-item list-group-item-action active" data-name="${printer}">
<i class="bi bi-printer-fill"></i> &nbsp;${printer.name} <i class="bi bi-printer-fill"></i> &nbsp;${printer}
</a> </a>
`) `)
printData.printer = printer;
continue; continue;
} }
html.push(`<a href="#" class="list-group-item list-group-item-action" data-name="${printer.name}"> html.push(`<a href="#" class="list-group-item list-group-item-action" data-name="${printer}">
<i class="bi bi-printer-fill"></i> &nbsp;${printer.name} <i class="bi bi-printer-fill"></i> &nbsp;${printer}
</a> </a>
`) `)
} }