# jeecg-boot-plus-ant-design-vue **Repository Path**: samyee/jeecg-boot-plus-ant-design-vue ## Basic Information - **Project Name**: jeecg-boot-plus-ant-design-vue - **Description**: jeecg前端 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 112 - **Created**: 2020-11-27 - **Last Updated**: 2023-04-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Ant Design Jeecg Vue ==== JEECG-BOOT 基础版本号: 2.2.1(发布日期:20200721) 基础代码同步至20200713 Overview ---- 基于 [Ant Design of Vue](https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn/) 实现的 Ant Design Pro Vue 版 Jeecg-boot 的前段UI框架,采用前后端分离方案,提供强大代码生成器的快速开发平台。 前端页面代码和后端功能代码一键生成,不需要写任何代码,保持jeecg一贯的强大!! #### 前端技术 - 基础框架:[ant-design-vue](https://github.com/vueComponent/ant-design-vue) - Ant Design Of Vue 实现 - JavaScript框架:Vue - Webpack - node - yarn - eslint - @vue/cli 3.2.1 - [vue-cropper](https://github.com/xyxiao001/vue-cropper) - 头像裁剪组件 - [@antv/g2](https://antv.alipay.com/zh-cn/index.html) - Alipay AntV 数据可视化图表 - [Viser-vue](https://viserjs.github.io/docs.html#/viser/guide/installation) - antv/g2 封装实现 项目下载和运行 ---- - 拉取项目代码 ```bash git clone https://github.com/zhangdaiscott/jeecg-boot.git cd jeecg-boot/ant-design-jeecg-vue ``` - 安装依赖 ``` yarn install ``` - 开发模式运行 ``` yarn run serve ``` - 编译项目 ``` yarn run build ``` - Lints and fixes files ``` yarn run lint ``` 其他说明 ---- - 项目使用的 [vue-cli3](https://cli.vuejs.org/guide/), 请更新您的 cli - 关闭 Eslint (不推荐) 移除 `package.json` 中 `eslintConfig` 整个节点代码 - 修改 Ant Design 配色,在文件 `vue.config.js` 中,其他 less 变量覆盖参考 [ant design](https://ant.design/docs/react/customize-theme-cn) 官方说明 ```ecmascript 6 css: { loaderOptions: { less: { modifyVars: { /* less 变量覆盖,用于自定义 ant design 主题 */ 'primary-color': '#F5222D', 'link-color': '#F5222D', 'border-radius-base': '4px', }, javascriptEnabled: true, } } } ``` 附属文档 ---- - [Ant Design Vue](https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn) - [报表 viser-vue](https://viserjs.github.io/demo.html#/viser/bar/basic-bar) - [Vue](https://cn.vuejs.org/v2/guide) - [路由/菜单说明](https://github.com/zhangdaiscott/jeecg-boot/tree/master/ant-design-jeecg-vue/src/router/README.md) - [ANTD 默认配置项](https://github.com/zhangdaiscott/jeecg-boot/tree/master/ant-design-jeecg-vue/src/defaultSettings.js) - 其他待补充... 备注 ---- > @vue/cli 升级后,eslint 规则更新了。由于影响到全部 .vue 文件,需要逐个验证。既暂时关闭部分原本不验证的规则,后期维护时,在逐步修正这些 rules Docker 镜像使用 ---- ``` # 1.修改前端项目的后台域名 public/index.html 域名改成: http://jeecg-boot-system:8080/jeecg-boot # 2.先进入打包前端项目 yarn run build # 3.构建镜像 docker build -t nginx:jeecgboot . # 4.启动镜像 docker run --name jeecg-boot-nginx -p 80:80 -d nginx:jeecgboot # 5.配置host # jeecgboot 127.0.0.1 jeecg-boot-redis 127.0.0.1 jeecg-boot-mysql 127.0.0.1 jeecg-boot-system # 6.访问前台项目 http://localhost:80 ``` 图表配置页面说明 ``` 表格使用列使用js增强时,需要按以下模板来定义 1、customRender为方法表格列自定义渲染js增强 2、(text, r, index) text为单元格渲染内容 r为行数据 index为行索引值 { customRender: function(text, r, index) { if(text<1000){ return ''+text+'' }else if(test<1500){ return ''+text+'' }else{ return ''+text+'' } } } 3、返回元素添加点击事件 方法不能用箭头函数 只支持click方法 { customRender: function(text, r, index) { function handleClick(text, r, index){ console.log(this) } return '办理' } } 图表使用js增强时,需要按以下模板来定义 事件类型bar、line、pie、transverseBar、radar、funnel onClick.bar = function (event) { console.log(this)//当前vue对象 console.log(event)//点击图表参数 } 4、增加是否分组配置 该配置为区分是否需要前台使用antv transform()方法老展开数据,目前只支持柱状图、折线图、条形图 该参数配置为否时 需要的参数格式为 [ { month: 'Jan', city: 'Tokyo', temperature: 7 }, { month: 'Jan', city: 'London', temperature: 3.9 }, { month: 'Feb', city: 'Tokyo', temperature: 6.9 }, { month: 'Feb', city: 'London', temperature: 4.2 }, { month: 'Mar', city: 'Tokyo', temperature: 9.5 }, { month: 'Mar', city: 'London', temperature: 5.7 } ] ``` 新增页面 ``` -- mysql语句如下: -- 个人办公 INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1289833000278949889', NULL, '个人办公', '/task', 'layouts/RouteView', NULL, NULL, '0', NULL, '1', '1.00', '0', 'share-alt', '1', '0', '0', '0', NULL, 'admin', '2020-08-02 15:58:45', NULL, NULL, '0', '0', '1', '0'); --个人任务 INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1289833271486840834', '1289833000278949889', '我的任务', '/task/MyTaskList', 'modules/task/MyTaskList', NULL, NULL, '1', NULL, '1', '1.00', '0', NULL, '1', '1', '0', '0', NULL, 'admin', '2020-08-02 15:59:50', 'admin', '2020-08-02 16:02:10', '0', '0', '1', '0'); --我发起流程 INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1290916619055529985', '1289833000278949889', '我发起流程', '/task/MyApplyProcessList', 'modules/task/MyApplyProcessList', NULL, NULL, '1', NULL, '1', '2.00', '0', NULL, '1', '1', '0', '0', NULL, 'admin', '2020-08-05 15:44:40', NULL, NULL, '0', '0', '1', '0'); --我的抄送 INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1290930283531730946', '1289833000278949889', '我的抄送', '/task/MyCcHisProcessList', 'modules/task/MyCcHisProcessList', NULL, NULL, '1', NULL, '1', '2.00', '0', NULL, '1', '1', '0', '0', NULL, 'admin', '2020-08-05 16:38:58', NULL, NULL, '0', '0', '1', '0'); --oa办公 INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1288643882790420482', NULL, 'OA办公', '/oa', 'layouts/RouteView', NULL, NULL, '0', NULL, '1', '3.00', '0', 'alert', '1', '0', '0', '0', NULL, 'admin', '2020-07-30 09:13:38', NULL, NULL, '0', '0', '1', '0'); --工单申请 INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1288644087715725313', '1288643882790420482', '工单申请', '/process/BpmAutoDesformApply', 'process/BpmAutoDesformApply', NULL, NULL, '1', NULL, '1', '0.00', '0', NULL, '1', '1', '1', '0', NULL, 'admin', '2020-07-30 09:14:27', NULL, NULL, '0', '0', '1', '0'); --我的工单 INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1289823166418649089', '1288643882790420482', '我的工单', '/process/ExtActDesignFlowDataList', 'process/ExtActDesignFlowDataList', NULL, NULL, '1', NULL, '1', '1.00', '0', NULL, '1', '1', '0', '0', NULL, 'admin', '2020-08-02 15:19:41', NULL, NULL, '0', '0', '1', '0'); --流程管理一级菜单 INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1286569310419238913', '', '流程管理', '/process', 'layouts/RouteView', NULL, NULL, '0', NULL, '1', '5.00', '0', 'gold', '1', '0', '0', '0', NULL, 'admin', '2020-07-24 15:50:01', 'admin', '2020-07-24 15:50:33', '0', '0', '1', '0'); --流程管理 INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1286569882304200705', '1286569310419238913', '流程管理', '/process/list', 'process/Process', NULL, NULL, '1', NULL, '1', '1.00', '0', NULL, '1', '1', '0', '0', NULL, 'admin', '2020-07-24 15:52:17', NULL, NULL, '0', '0', '1', '0'); --流程列表 INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1287921283466805249', '1286569310419238913', '流程列表', '/processList', 'process/ProcessList', NULL, NULL, '1', NULL, '1', '2.00', '0', NULL, '1', '1', '0', '0', NULL, 'admin', '2020-07-28 09:22:17', 'admin', '2020-07-28 09:33:36', '0', '0', '1', '0'); --数据看板 INSERT INTO `jeecg-boot`.`sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1310851722821812225', '', '数据看板', '/databoard', 'layouts/RouteView', NULL, NULL, '0', NULL, '1', '6.00', '0', 'area-chart', '1', '0', '0', '0', NULL, 'admin', '2020-09-29 15:59:39', 'admin', '2020-09-29 16:06:50', '0', '0', '1', '0'); INSERT INTO `jeecg-boot`.`sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1310852134903791617', '1310851722821812225', '数据看板列表', '/databoard/list', 'vue-grid-layout/LayoutList', NULL, NULL, '1', NULL, '1', '1.00', '0', NULL, '1', '1', '0', '0', NULL, 'admin', '2020-09-29 16:01:18', 'admin', '2020-09-29 16:24:25', '0', '0', '1', '0'); INSERT INTO `jeecg-boot`.`sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1310853165616250881', '1310851722821812225', '数据看板详情', '/databoard/list/:code', 'vue-grid-layout/Layout', NULL, NULL, '1', NULL, '1', '2.00', '0', NULL, '1', '1', '0', '1', NULL, 'admin', '2020-09-29 16:05:23', 'admin', '2020-09-29 16:24:39', '0', '0', '1', '0'); --待办任务 INSERT INTO `jeecg-boot`.`sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1319090700226191362', '', '待办任务', '/backlog', 'layouts/RouteView', NULL, NULL, '0', NULL, '1', '1.00', '0', 'ordered-list', '1', '0', '0', '0', NULL, 'admin', '2020-10-22 09:38:25', 'admin', '2020-10-22 10:01:26', '0', '0', '1', '0'); INSERT INTO `jeecg-boot`.`sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1319096784189976577', '1319090700226191362', '待办任务', '/backlog/list', 'backlog/backlog', NULL, NULL, '1', NULL, '1', '1.00', '0', 'ordered-list', '1', '1', '0', '0', NULL, 'admin', '2020-10-22 10:02:35', NULL, NULL, '0', '0', '1', '0'); --流程列表页面 INSERT INTO `jeecg-boot-test`.`sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`) VALUES ('1287921283466805249', '1286569310419238913', '流程列表', '/processList/:code', 'process/ProcessList', NULL, NULL, '1', NULL, '1', '2.00', '0', NULL, '1', '1', '0', '1', NULL, 'admin', '2020-07-28 09:22:17', 'admin', '2020-10-28 09:30:39', '0', '0', '1', '0'); ``` 访客模式 ---- - 1、新增一个用户名为guest密码为:123456的用户 - 2、给guest用户分配一个角色,给该角色分配访客可以访问的页面 k-form-design ---- - 1、新增自定义组件 用户选择框 用户组件设置当前用户为默认值方式 ${username} - 2、新增自定义组件 部门选择框 部门组件设置当前用户为默认值方式 ${departName} - 3、下拉、复选框、单选等组件字典设置修改为自定义、字典(对应字典表code)、远端数据(表名:数据库表,值、标签:数据库字段名) auto设计表单列表 ---- - 1、前台组件process/ProcessList