# RuoYi-Vue-Postgresql-Electron **Repository Path**: suxia2/ruo-yi-vue-postgresql-electron ## Basic Information - **Project Name**: RuoYi-Vue-Postgresql-Electron - **Description**: 若依 postgresql 版本的桌面版,主要集成了 web 桌面打印. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 76 - **Forks**: 28 - **Created**: 2022-01-10 - **Last Updated**: 2025-06-15 ## Categories & Tags **Categories**: backend **Tags**: None ## README # RuoYi-Vue-Postgresql-Electron #### 介绍 若依 postgresql 版本的桌面版,主要集成了 web 静默打印. #### 环境说明 1. nodejs 版本为 16.13.0 以上,如果该版本以下,[请使用electron4分支中的代码](https://gitee.com/suxia2/ruo-yi-vue-postgresql-electron/tree/electron4/). ### 修改说明 1. **此项目对应sql文件只需执行前两个. 为** 1. **[postgresql.sql](https://gitee.com/suxia2/RuoYi-Vue-Postgresql/blob/master/sql/postgresql.sql)** 2. **[postgresql_view.sql](https://gitee.com/suxia2/RuoYi-Vue-Postgresql/blob/master/sql/postgresql_view.sql)** 3. **[quartz.sql](https://gitee.com/suxia2/RuoYi-Vue-Postgresql/blob/master/sql/quartz.sql) 与[ry_20210908.sql](https://gitee.com/suxia2/RuoYi-Vue-Postgresql/blob/master/sql/ry_20210908.sql) 不需要执行 是mysql语法的,用于比对官方项目的sql文件更新.** 2. **如此项目报错请在 issue 中提问** ### 已知bug 1. 打包后无法引用 "clipboard", 把以下文件内容全部注释掉 ``` /src/directive/module/clipboard.js ``` #### 前端使用 ```bash # 克隆项目 git clone https://gitee.com/suxia2/ruo-yi-vue-postgresql-electron # 进入项目目录 cd ruoyi-ui # 安装依赖 npm install # 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 npm install --registry=https://registry.npm.taobao.org # 启动服务 npm run electron:serve # 打包服务 windows npm run electron:build # vue.config.js 中配置 详见文档 https://blog.csdn.net/honest1120110/article/details/116643392 pluginOptions: { electronBuilder: { // preload: 'src/preload.js', nodeIntegration: true, contextIsolation: false, enableRemoteModule: true, publish: [{ "provider": "xxxx有限公司", "url": "http://xxxxx/" }], "copyright": "Copyright © 2022", builderOptions:{ appId: 'com.ruoyi', productName: 'ruoyi', nsis:{ "oneClick": false, "allowElevation": true, "allowToChangeInstallationDirectory": true, }, win: { "icon": "build/app.ico", "target": [ { "target": "nsis", //使用nsis打成安装包,"portable"打包成免安装版 "arch": [ "ia32", //32位 "x64" //64位 ] } ] }, }, // preload: path.join(__dirname, "/dist_electron/preload.js"), }, }, ``` ### 改造步骤 已完成 1. 安装electron-builder ```javascript 处理外网访问速度过慢问题 npm config set registry https://registry.npm.taobao.org/ npm config set ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/ vue add electron-builder ``` 2. 在vue.config.js中添加以下代码 ``` pluginOptions: { electronBuilder: { nodeIntegration: true, contextIsolation: false, } } ``` 3. 在启动类/src/background.js 更改并添加以下代码 ``` const win = new BrowserWindow({ width: 1200, height: 700, // fullscreen: true,//全屏 show: false, webPreferences: { // Use pluginOptions.nodeIntegration, leave this alone // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info contextIsolation:false, //上下文隔离 enableRemoteModule: true, //启用远程模块 nodeIntegration: true, //开启自带node环境 webviewTag: true, //开启webview webSecurity: false, allowDisplayingInsecureContent: true, allowRunningInsecureContent: true }, // frame: false,//客户端窗口顶部菜单去掉 }) win.maximize() win.show() ipcMain.on('getPrinterList', (event) => { //主线程获取打印机列表 const list = win.webContents.getPrinters(); //通过webContents发送事件到渲染线程,同时将打印机列表也传过去 win.webContents.send('getPrinterList', list); }); ``` 5. 打印模板存放位置 ``` /static/print.html ``` ### 此项目 官网同步更新 ### 基于 Postgresql 实现 1. 代码自动生成 2. 由mysql语法转换为Postgresql(对应文件为 postgresql.sql) ### 代码自动生成 1. 执行sql文件夹下的view.sql 2. 操作一致

logo

RuoYi v3.8.5

基于SpringBoot+Vue前后端分离的Java快速开发框架

## 平台简介 若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。 * 前端采用Vue、Element UI。 * 后端采用Spring Boot、Spring Security、Redis & Jwt。 * 权限认证使用Jwt,支持多终端认证系统。 * 支持加载动态权限菜单,多方式轻松权限控制。 * 高效率开发,使用代码生成器可以一键生成前后端代码。 * 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[RuoYi-Vue3](https://github.com/yangzongzhuan/RuoYi-Vue3),保持同步更新。 * 提供了单应用版本[RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast),Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。 * 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud) * 特别鸣谢:[element](https://github.com/ElemeFE/element),[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin),[eladmin-web](https://github.com/elunez/eladmin-web)。 * 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)   * 阿里云优惠券:[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)   ## 内置功能 1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。 2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。 3. 岗位管理:配置系统用户所属担任职务。 4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。 5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。 6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。 7. 参数管理:对系统动态配置常用参数。 8. 通知公告:系统通知公告信息发布维护。 9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。 10. 登录日志:系统登录日志记录查询包含登录异常。 11. 在线用户:当前系统中活跃用户状态监控。 12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。 13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。 14. 系统接口:根据业务代码自动生成相关的api接口文档。 15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。 16. 缓存监控:对系统的缓存信息查询,命令统计等。 17. 在线构建器:拖动表单元素生成相应的HTML代码。 18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。 ## 在线体验 - admin/admin123 - 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。 演示地址:http://vue.ruoyi.vip 文档地址:http://doc.ruoyi.vip ## 演示图
## 若依前后端分离交流群 QQ群: [![加入QQ群](https://img.shields.io/badge/已满-937441-blue.svg)](https://jq.qq.com/?_wv=1027&k=5bVB1og) [![加入QQ群](https://img.shields.io/badge/已满-887144332-blue.svg)](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [![加入QQ群](https://img.shields.io/badge/已满-180251782-blue.svg)](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [![加入QQ群](https://img.shields.io/badge/已满-104180207-blue.svg)](https://jq.qq.com/?_wv=1027&k=51G72yr) [![加入QQ群](https://img.shields.io/badge/已满-186866453-blue.svg)](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [![加入QQ群](https://img.shields.io/badge/已满-201396349-blue.svg)](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [![加入QQ群](https://img.shields.io/badge/已满-101456076-blue.svg)](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [![加入QQ群](https://img.shields.io/badge/已满-101539465-blue.svg)](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [![加入QQ群](https://img.shields.io/badge/已满-264312783-blue.svg)](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [![加入QQ群](https://img.shields.io/badge/已满-167385320-blue.svg)](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [![加入QQ群](https://img.shields.io/badge/已满-104748341-blue.svg)](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [![加入QQ群](https://img.shields.io/badge/已满-160110482-blue.svg)](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [![加入QQ群](https://img.shields.io/badge/已满-170801498-blue.svg)](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [![加入QQ群](https://img.shields.io/badge/已满-108482800-blue.svg)](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) [![加入QQ群](https://img.shields.io/badge/101046199-blue.svg)](https://jq.qq.com/?_wv=1027&k=SpyH2875) 点击按钮入群。