diff --git a/LICENSE b/LICENSE index 6d7205f..0d5a696 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 bladex.vip +Copyright (c) 2020 BladeX (https://bladex.vip) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 85650bd..5490155 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@
- + - - + + @@ -64,6 +64,7 @@ SpringBlade * Saber-基于Vue:[https://saber.bladex.vip](https://saber.bladex.vip) * Sword-基于React:[https://sword.bladex.vip](https://sword.bladex.vip) * Archer-全能代码生成系统:[https://archer.bladex.vip](https://archer.bladex.vip) +* Caster-数据大屏展示系统:[https://data.avuejs.com](https://data.avuejs.com) ## 技术文档 * [开发手册一览](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册) diff --git a/config/router.config.js b/config/router.config.js index e62c8e2..e903132 100644 --- a/config/router.config.js +++ b/config/router.config.js @@ -125,6 +125,17 @@ export default [ { path: '/system/dept/view/:id', component: './System/Dept/DeptView' }, ], }, + { + path: '/system/post', + routes: [ + { path: '/system/post', redirect: '/system/post/list' }, + { path: '/system/post/list', component: './System/Post/Post' }, + { path: '/system/post/add', component: './System/Post/PostAdd' }, + { path: '/system/post/add/:id', component: './System/Post/PostAdd' }, + { path: '/system/post/edit/:id', component: './System/Post/PostEdit' }, + { path: '/system/post/view/:id', component: './System/Post/PostView' }, + ], + }, { path: '/system/role', routes: [ diff --git a/mock/user.js b/mock/user.js index 71ddc89..f56baa2 100644 --- a/mock/user.js +++ b/mock/user.js @@ -46,6 +46,7 @@ function getFakeDetail(req, res) { id: '1', tenantId: '000000', account: 'admin', + code: 'admin', name: '超级管理员', realName: '管理员', phone: '13888888888', @@ -54,6 +55,8 @@ function getFakeDetail(req, res) { roleName: '超级管理员', deptId: 1, deptName: '刀锋科技', + postId: 1, + postName: '首席执行官', sex: 1, sexName: '男', birthday: '2018-12-31 23:33:33', @@ -61,7 +64,6 @@ function getFakeDetail(req, res) { }; return res.json(json); } - function fakeSuccess(req, res) { const json = { code: 200, success: true, msg: '操作成功' }; return res.json(json); diff --git a/package.json b/package.json index d466035..2553693 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sword", - "version": "2.6.2", + "version": "2.7.0", "description": "An out-of-box UI solution for enterprise applications", "private": true, "scripts": { diff --git a/src/actions/post.js b/src/actions/post.js new file mode 100644 index 0000000..88ecc67 --- /dev/null +++ b/src/actions/post.js @@ -0,0 +1,43 @@ +export const POST_NAMESPACE = 'post'; + +export function POST_INIT() { + return { + type: `${POST_NAMESPACE}/fetchInit`, + payload: { code: 'post_category' }, + }; +} + +export function POST_LIST(payload) { + return { + type: `${POST_NAMESPACE}/fetchList`, + payload, + }; +} + +export function POST_DETAIL(id) { + return { + type: `${POST_NAMESPACE}/fetchDetail`, + payload: { id }, + }; +} + +export function POST_CLEAR_DETAIL() { + return { + type: `${POST_NAMESPACE}/clearDetail`, + payload: {}, + }; +} + +export function POST_SUBMIT(payload) { + return { + type: `${POST_NAMESPACE}/submit`, + payload, + }; +} + +export function POST_REMOVE(payload) { + return { + type: `${POST_NAMESPACE}/remove`, + payload, + }; +} diff --git a/src/components/Sword/ToolBar.js b/src/components/Sword/ToolBar.js index 67cdacc..7c44d01 100644 --- a/src/components/Sword/ToolBar.js +++ b/src/components/Sword/ToolBar.js @@ -30,9 +30,7 @@ export default class ToolBar extends PureComponent { ))} {renderLeftButton ? renderLeftButton() : null} - {renderRightButton ? ( -