修复重复打印

This commit is contained in:
2022-06-22 13:37:18 +08:00
parent c3630f1927
commit b97ff138cd
3 changed files with 12 additions and 6 deletions

View File

@ -6,9 +6,12 @@
#\u5BA2\u6237\u7AEF\u66F4\u65B0\u5730\u5740 #\u5BA2\u6237\u7AEF\u66F4\u65B0\u5730\u5740
update_url=http://192.168.1.158:8889/file update_url=http://192.168.1.158:8889/file
#\u5BA2\u6237\u7AEF\u5730\u5740\u914D\u7F6E #\u5BA2\u6237\u7AEF\u5730\u5740\u914D\u7F6E
pharmacy=https://test.yunclinic.cn:7443/pharmacy pharmacy=https://tests.yunclinic.cn/pharmacy
doctor=https://test.yunclinic.cn:7443/doctor #doctor=localhost:8080/doctor
pharmacist=https://test.yunclinic.cn:7443/pharmacist #pharmacist=localhost:8080/pharmacist
#pharmacy=https://pharmacy.yunclinic.cn/pharmacy
doctor=https://tests.yunclinic.cn/doctor
pharmacist=https://tests.yunclinic.cn/pharmacist
#windows\u7684C:/Users/\u7528\u6237/\u76EE\u5F55\u4E0B\u7684\u5185\u5BB9(\u5982\u679C\u662Fmac\u4E0B\u7684\u6CE8\u610F\u4FEE\u6539\u8FD9\u4E24\u4E2A\u76EE\u5F55) #windows\u7684C:/Users/\u7528\u6237/\u76EE\u5F55\u4E0B\u7684\u5185\u5BB9(\u5982\u679C\u662Fmac\u4E0B\u7684\u6CE8\u610F\u4FEE\u6539\u8FD9\u4E24\u4E2A\u76EE\u5F55)
#\u5BA2\u6237\u7AEF\u7528\u6237\u521B\u5EFA\u5FEB\u6377\u65B9\u5F0F\u5B58\u653E\u76EE\u5F55->lnks.json(window) #\u5BA2\u6237\u7AEF\u7528\u6237\u521B\u5EFA\u5FEB\u6377\u65B9\u5F0F\u5B58\u653E\u76EE\u5F55->lnks.json(window)

View File

@ -1,11 +1,11 @@
{ {
"name": "JUSTAR", "name": "JUSTAR",
"version": "2.1.2", "version": "2.1.3",
"description": "钜星科技便民问诊系统", "description": "钜星科技便民问诊系统",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"start": "chcp 65001 && electron . doctor--default", "start": "chcp 65001 && electron . pharmacy--default",
"pack": "electron-builder --dir", "pack": "electron-builder --dir",
"dist": "electron-builder" "dist": "electron-builder"
}, },

View File

@ -78,7 +78,7 @@ let print_monitor={
//开启打印监听 //开启打印监听
openPrinting:function(win){ openPrinting:function(win){
ipcMain.on('print', function (event, json_data) { ipcMain.once('print', function (event, json_data) {
let data = JSON.parse(json_data) let data = JSON.parse(json_data)
log.info("打印开始,打印地址为:【"+json_data+"】") log.info("打印开始,打印地址为:【"+json_data+"】")
print_operation.printing(data.pdf_url, data.printer,win); print_operation.printing(data.pdf_url, data.printer,win);
@ -94,6 +94,9 @@ let print_monitor={
win.on("close", (e) => { win.on("close", (e) => {
ipcMain.removeAllListeners('close_listPrinter'); ipcMain.removeAllListeners('close_listPrinter');
}); });
win.on("close",(e) => {
ipcMain.removeAllListeners('print');
});
} }
} }