更多ruoyi-nbcio功能请看演示系统
gitee源代码地址
前后端代码: https://gitee.com/nbacheng/ruoyi-nbcio
演示地址:RuoYi-Nbcio后台管理系统
项目移植过来,开始用yarn install之后yarn run dev 还是有问题
用yarn install与yarn run dev出现下面错误
> ruoyi-nbcio@1.0.0 dev > vue-cli-service serve INFO Starting development server... 98% after emitting CopyPlugin ERROR Failed to compile with 3 errors 16:57:27 These dependencies were not found: * core-js/modules/web.url-search-params.delete.js in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/b abel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./sr c/plugins/package/designer/ProcessDesigner.vue?vue&type=script&lang=js& * core-js/modules/web.url-search-params.has.js in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babe l-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/p lugins/package/designer/ProcessDesigner.vue?vue&type=script&lang=js& * core-js/modules/web.url-search-params.size.js in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/bab el-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/ plugins/package/designer/ProcessDesigner.vue?vue&type=script&lang=js& To install them, you can run: npm install --save core-js/modules/web.url-search-params.delete.js core-js/modules/web.url -search-params.has.js core-js/modules/web.url-search-params.size.js
后来用npm install 再npm run dev 正常了。
ruoyi-vue-pro 项目开始npm install的时候报
peer eslint@">= 1.6.0 < 7.0.0" from @vue/cli-plugin-eslint@4.5.18
后来用npm install --legacy-peer-deps正常了
原因是
无法下载项目依赖,经过百度了解发现是我的npm版本高无法解析依赖树导致依赖下载失败,可执行命令:npm install --legacy-peer-deps,绕过dependency里依赖的进行自动安装,最终问题解决,项目成功运行。
后端启动报下面错误
2023-09-18 16:22:43.452 | [1;31mERROR 14668[0;39m | [1;33mmain [TID: N/A][0;39m [1;32mcom.alibaba.druid.pool.DruidDataSource [0;39m | init datasource error, url: jdbc:mysql://192.168.199.151:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true java.sql.SQLNonTransientConnectionException: Could not create connection to database server.
数据库连接要修改成5.7可以连接的方式
备注掉的是原来应该是连接mysql8 了吧
master: name: ruoyi-vue-pro url: jdbc:mysql://192.168.199.151:3306/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true #url: jdbc:mysql://192.168.199.151:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true #driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver username: root password: mastermysql
后端端口原先设置成48080好像容易被其它系统占用,后来修改成9088了
另外流程模块被禁用了
用local运行就可以了。
主要是yml的参数 demo: false # 关闭演示模式
运行后,本来想写个公告,结果演示模式,不能写入
ruoyi-vue-pro 项目虽然开源,但是bpm模块被屏蔽了
youdao根目录下面的pom.xml文件去掉下面注释
<module>yudao-module-bpm</module>
同时youdao_server.下面的pom.xml去掉下面注释
<!-- 工作流。默认注释,保证编译速度 --> <dependency> <groupId>cn.iocoder.boot</groupId> <artifactId>yudao-module-bpm-biz</artifactId> <version>${revision}</version> </dependency>
增加两个组件
"viser-vue": "^2.4.8", "ant-design-vue": "^1.7.2",
main.js里增加
import Antd, { version } from 'ant-design-vue' import Viser from 'viser-vue' import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less' Vue.use(Antd) Vue.use(Viser)
npm run dev报错
Inline JavaScript is not enabled. Is it set in your options
需要在 vue.config.js 文件里增加下面的less的内容
css: { loaderOptions: { sass: { sassOptions: { outputStyle: "expanded" } }, less:{ javascriptEnabled: true } } },
websocket采用jeecg机制,就是redis订阅发布方式,但不能对在线用户进行实时发送到用户,就是说在线发送出现问题,其它正常。
暂时在下面发送到redis的时候也pushMessage一下到在线的客户端,原先jeccg不需要,原因还不明白。
SysNoticeSend noticeSend = new SysNoticeSend(); noticeSend.setNoticeId(noticeId); noticeSend.setUserId(sysUser.getUserId()); noticeSend.setReadFlag(Constants.NO_READ_FLAG); sysNoticeSendMapper.insert(noticeSend); JSONObject obj = new JSONObject(); obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_USER); obj.put(WebsocketConst.MSG_USER_ID, sysUser.getUserName()); obj.put(WebsocketConst.MSG_ID, notice.getNoticeId()); obj.put(WebsocketConst.MSG_TXT, notice.getNoticeTitle()); webSocket.sendMessage(sysUser.getUserName(), obj.toJSONString()); webSocket.pushMessage(sysUser.getUserName(), obj.toJSONString());
动态加载组件老是出现下面问题
鼠标放上上面的位置出现下面内容,双击可以拷贝
function component() { return function (specifier) { return new Promise(function (r) { return r(specifier); }).then(function (s) { return (0, _interopRequireWildcard2.default)(__webpack_require__("./src/views/workflow/mixins sync recursive")(s)); }); }("@/views/workflow/demo/wf"); }
与nbcio-boot的前端项目好像不一样,
nbcio-vue前端项目是下面的内容
function component() { return __webpack_require__.e(/*! import() */ 120).then(__webpack_require__.bind(null, /*! @/views/flowable/demo/modules/TestDemoForm */ "./src/views/flowable/demo/modules/TestDemoForm.vue")); } 奇怪了,在flowableMixin修改成如下反而正常了 { text:'单表示例', routeName: '@/views/workflow/demo/wf', component: () => import('@/views/workflow/demo/wf'), businessTable:'wf_demo' },