diff --git a/babel.config.code-workspace b/babel.config.code-workspace
new file mode 100644
index 0000000000000000000000000000000000000000..ef9f5d275e6cf2564150cc2eeb920813c569c126
--- /dev/null
+++ b/babel.config.code-workspace
@@ -0,0 +1,7 @@
+{
+ "folders": [
+ {
+ "path": "."
+ }
+ ]
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index 83f70201df5efb9752e3fbf803f9346b9a01d18f..e6990aa71e74da7d7f30f6a5394bba6925bee76f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pear-project",
- "version": "2.0.0",
+ "version": "2.9.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
@@ -8,7 +8,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
- "ant-design-vue": "latest",
+ "ant-design-vue": "^1.7.5",
"axios": "^0.19.0",
"core-js": "^2.6.9",
"dingtalk-jsapi": "^2.7.6",
@@ -21,6 +21,7 @@
"vue": "^2.5.17",
"vue-clipboards": "^1.2.4",
"vue-cropper": "^0.4.7",
+ "vue-ganttastic": "^0.9.32",
"vue-router": "^3.0.1",
"vue-simple-uploader": "^0.5.6",
"vuedraggable": "^2.17.0",
diff --git a/public/index.html b/public/index.html
index 6ea539ec63f759d586fc503a6e8c04bb9a6252a6..3b76c9b5275468f98fae9f15c96b706086d46380 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2,9 +2,9 @@
-
+
- Pear Project
+ 项目管理系统
diff --git a/src/assets/css/components/base.less b/src/assets/css/components/base.less
index 08ff6e378a972e05c28e6aa6a2b876ab9890dd68..36ca4f3e7393a96a140ac1c60af299b5c8bc87da 100644
--- a/src/assets/css/components/base.less
+++ b/src/assets/css/components/base.less
@@ -1,9 +1,11 @@
body {
overflow: hidden;
}
-.ant-layout{
+
+.ant-layout {
background: #f5f5f5;
}
+
.pull-right {
float: right;
}
@@ -96,7 +98,8 @@ body {
}
}
-.group-btn, .submit-set {
+.group-btn,
+.submit-set {
.cancel-text {
margin-right: 12px;
}
@@ -125,6 +128,10 @@ body {
//Form
.ant-form-horizontal {
+ .ant-form-item {
+ margin-bottom: 1rem;
+ }
+
.ant-form-item-with-help {
margin-bottom: 12px;
}
@@ -173,7 +180,9 @@ body {
}
&.price {
- .editable-cell-input-wrapper, .editable-cell-text-wrapper {
+
+ .editable-cell-input-wrapper,
+ .editable-cell-text-wrapper {
padding-left: 15px;
}
}
@@ -186,7 +195,10 @@ body {
}
.field-right-menu {
- width: 240px;
+ max-width: 90%;
+ min-width: 10rem;
+ border-radius: 1rem;
+ margin-top: 0.5rem;
.ant-dropdown-menu-item {
min-height: 36px;
@@ -211,6 +223,14 @@ body {
justify-content: space-between;
align-items: center;
}
+
+ >.menu-item-content>:nth-child(n+2) {
+ //visibility: hidden;
+ }
+
+ &:hover>.menu-item-content>:nth-child(n+2) {
+ //visibility: visible;
+ }
}
}
@@ -220,14 +240,35 @@ body {
}
.wangEditor-txt {
- h1, h2, h3, h4, h5, h6 {
+
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
font-weight: bold;
}
}
//Modal
.ant-modal {
- top: 50px;
+ max-width: 95%;
+ top: 66px;
+
+ &-body {
+ padding-bottom: 1rem;
+
+ }
+
+ .ant-modal-content {
+ border-radius: 1rem;
+ }
+
+ .ant-modal-header {
+ border-radius: 1rem 1rem 0 0;
+ user-select: none;
+ }
}
//Badge
@@ -306,113 +347,156 @@ body {
display: none;
}
+
.project-navigation {
border-bottom: 1px solid #D9D9D9;
z-index: 1;
+ line-height: 2;
background-color: #F5F5F5;
transition: right 218ms ease;
- position: fixed;
- width: 100%;
-}
+ /* position: fixed;*/
-.project-navigation .ivu-breadcrumb-item-separator {
- color: #383838;
-}
-
-.project-navigation .ivu-breadcrumb > span:last-child {
- font-weight: normal;
-}
+ user-select: none;
-.project-navigation .project-nav-header {
- position: absolute;
- z-index: 2;
- left: 0;
- height: 50px;
- margin: 0;
- padding: 15px;
+ .ivu-breadcrumb-item-separator {
+ color: #383838;
+ }
- .nav-title {
- font-size: 15px;
- margin-right: 12px;
+ .ivu-breadcrumb>span:last-child {
+ font-weight: normal;
}
- .actions {
- cursor: pointer;
- margin-right: 12px;
+ .project-nav-header,
+ .project-nav-footer {
+ z-index: 2;
+ margin: 0;
+ padding: 0.5rem 1rem;
+ line-height: 2;
+
+ .ant-breadcrumb {
+ line-height: 1.8;
+
+ }
+
+ .nav-title {
+ font-size: 15px;
+ margin-right: 12px;
+ }
+
+ .actions {
+ cursor: pointer;
+ margin-right: 12px;
+ }
}
-}
-.project-navigation .nav-underscore {
- position: relative;
- height: 50px;
- border: none;
- margin-bottom: 0;
-}
+ .project-nav-footer {
+ text-align: right;
-.project-navigation .nav-body {
- position: relative;
- white-space: nowrap;
- z-index: 1;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
-}
+ .footer-item {
+ font-size: 14px;
+ position: relative;
+ padding: 0 10px;
+ margin: 0 5px;
+ text-align: center;
-.project-navigation .nav-body .nav-wrapper.nav > li {
- z-index: 2;
- padding: 0 20px;
-}
+ &.active {
+ color: #2D8cF0;
+ }
-.project-navigation .nav-underscore > li {
- list-style: none;
- float: left;
-}
+ &:hover {
+ color: #2D8cF0;
+ }
-.project-navigation .nav-underscore > li a {
- display: inline-block;
- position: relative;
- height: 50px;
- margin: 0;
- padding: 15px 0;
- color: #383838;
- font-size: 15px;
- font-weight: normal;
-}
+ &:nth-last-child(n+2):after {
+ position: absolute;
+ content: '';
+ right: -5px;
+ top: 1px;
+ bottom: 1px;
+ width: 1px;
+ background-color: #d6d6d6;
+ }
+ }
+ }
-.project-navigation .nav-body .nav-wrapper.nav > li .app[data-app=tasks] {
- position: relative;
- float: left;
- max-width: 200px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
+ .nav-body {
+ position: relative;
+ white-space: nowrap;
+ z-index: 1;
+ display: flex;
+ justify-content: stretch;
+
+ .nav-underscore {
+ position: relative;
+ border: none;
+ margin-bottom: 0;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 0;
+ display: inline-flex;
+
+ >li {
+ z-index: 2;
+ padding: 0.5rem 1rem;
+ list-style: none;
+ position: relative;
+ margin: 0;
+ color: #383838;
+ font-size: 15px;
+ font-weight: normal;
+ cursor: pointer;
+
+ &:hover {
+ background-color: inherit;
+
+ &::after {
+ border-width: 3px;
+ opacity: 1;
+ }
+ }
-.project-navigation .nav-underscore > li > a:hover {
- background-color: inherit;
-}
+ &:after {
+ position: absolute;
+ left: 0.6rem;
+ right: 0.6rem;
+ bottom: 0;
+ height: 3px;
+ border-bottom: 0 solid #3da8f5;
+ content: '';
+ opacity: 0;
+ }
+ }
-.project-navigation .nav-underscore > li > a:after {
- position: absolute;
- left: 0;
- bottom: 0;
- height: 3px;
- width: 100%;
- border-bottom: 0 solid #3da8f5;
- content: '';
- opacity: 0;
+ >.actives:after {
+ border-width: 3px;
+ opacity: 1;
+ }
+ }
+ }
}
-.project-navigation .nav-underscore > li > a:hover:after, .project-navigation .nav-underscore > .actives > a:after {
- border-width: 3px;
- opacity: 1;
-}
.simple {
.project-navigation {
background: hsla(0, 0%, 100%, .95);
}
}
+
+
+.ant-tabs-bar {
+ margin: 1rem auto 0.5rem;
+}
+
+.ant-table-thead {
+ white-space: nowrap;
+ word-break: keep-all;
+}
+
+.ant-empty {
+ margin: 2rem 1rem;
+ user-select: none;
+}
+
+.ant-spin-nested-loading>div>.ant-spin .ant-spin-dot {
+ margin: 10px;
+}
\ No newline at end of file
diff --git a/src/assets/css/components/index.less b/src/assets/css/components/index.less
index a4585c64fda3fc6c7c35bed61157881011261f9a..40567b156b0692df7ddcad4c32eee6814502469b 100644
--- a/src/assets/css/components/index.less
+++ b/src/assets/css/components/index.less
@@ -4,3 +4,5 @@
@import "list";
@import "labels";
@import "warpperContent";
+@import "task";
+@import "media";
diff --git a/src/assets/css/components/layout.less b/src/assets/css/components/layout.less
index c61be7f9826a1a488771bb31d378d14be0109314..7ca79132fee6078b6b272adc2a3a330aabff3d40 100644
--- a/src/assets/css/components/layout.less
+++ b/src/assets/css/components/layout.less
@@ -1,38 +1,74 @@
+.ant-layout-content {
+ overflow: auto;
+}
+
#layout {
height: 100vh;
.ant-layout-header {
+ user-select: none;
background: #fff;
padding: 0;
- line-height: 85px;
+ line-height: 4rem;
position: fixed;
width: 100%;
top: 0;
z-index: 5;
//box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
- box-shadow: 0 0 8px 0 rgba(0,0,0,.1);
+ box-shadow: 0 0 8px 0 rgba(0, 0, 0, .1);
+ display: flex;
+ justify-content: space-between;
+ align-items: stretch;
+
ul {
border-bottom: none;
+ flex: 1 0;
+ background: unset;
+ max-width: 50%;
+
+ li {
+ display: inline-block;
+ vertical-align: middle;
+ margin-top: 0px;
+ top: 0;
+ height: 100%;
+ line-height: 4rem;
+ }
+ }
+
+ .left-menudrawer {
+ color: #fff;
+
+ :hover {
+ color: darken(#fff, 6%);
+ }
+ }
+
+ .wap-menu {
+ display: none;
+ visibility: hidden;
+
+ .action-more {
+ width: 3rem;
+ text-align: center;
+ height: 100%;
+ padding: 0;
+ }
}
}
.logo {
- height: 32px;
padding: 16px;
text-align: center;
box-sizing: content-box;
transition: all .2s;
- width: 224px;
- float: left;
line-height: 1.4;
background: initial;
color: #FFF;
cursor: pointer;
+
.logo-img {
width: 30px;
- position: absolute;
- left: 35px;
- top: 15px;
transition: all .2s;
}
@@ -40,36 +76,28 @@
color: inherit;
font-size: 20px;
position: relative;
+
.version {
color: inherit;
- position: absolute;
- right: -25px;
font-size: 14px;
}
}
}
.right-menu {
- position: absolute;
- right: 12px;
- top: 0;
- height: 100%;
- line-height: 66px;
color: #FFF;
display: flex;
+ flex: 1 0;
+ justify-content: flex-end;
.action {
cursor: pointer;
- //display: inline-block;
transition: all .2s;
padding: 0 6px;
- height: 65px;
.anticon {
font-size: 16px;
- //vertical-align: middle;
color: #FFF;
- //color: rgba(0, 0, 0, .65);
}
.action-item {
@@ -78,12 +106,8 @@
position: relative;
&.user-info {
- padding-left: 52px;
-
.ant-avatar {
- position: absolute;
- left: 12px;
- top: 18px;
+ margin-right: 0.5rem;
}
}
}
@@ -105,23 +129,16 @@
}
.ant-layout-sider {
- z-index: 2;
- overflow: auto;
- width: 256px !important;
- max-width: 256px !important;
+ user-select: none;
+ z-index: 3;
+ width: 256px;
+ max-width: 256px;
height: 100vh;
position: fixed;
left: 0;
box-shadow: 2px 0 8px 0 rgba(29, 35, 41, .05);
&.ant-layout-sider-collapsed {
- width: 80px !important;
- max-width: 80px !important;
-
- .ant-layout-sider-trigger {
- width: 80px !important;
- }
-
.logo {
.title {
display: none;
@@ -129,30 +146,39 @@
}
}
- .ant-layout-sider-trigger {
- width: 256px !important;
+ .ant-layout-sider-zero-width-trigger {
+ bottom: 8rem;
+ top: auto;
+ right: -42px;
+ width: 42px;
+ color: initial;
+ box-shadow: #eaeaea 2px 1px 2px 1px;
+ background: #ffffff;
+ border-radius: 0 0.8rem 0.8rem 0;
}
-
}
- .maint-content{
- .ant-layout-content{
+ .maint-content {
+ .ant-layout-content {
border-top: 1px solid #e8e8e8;
}
}
+ .main-content {
+ &.toleft {
+ padding-left: 200px;
+ }
+ }
+
.ant-layout-footer {
margin: 0 6px;
padding: 0 50px 12px 50px;
}
- .ant-layout-header.collapsed{
- .logo{
- width: 48px;
- .logo-img{
- left: 27px;
- }
- .title{
+ .ant-layout-header.collapsed {
+ .logo {
+
+ .title {
display: none;
}
}
@@ -160,28 +186,33 @@
&.layout-light {
.ant-layout-header {
+ //background-color: #2b83f9;
+ //background-image: linear-gradient(143deg,#2945cb 20%,#2b83f9 81%,#3a9dff);
+ //background-image: linear-gradient(143deg, #2945cb 20%, #1890ff 81%, #3a9dff);
+ background-image: linear-gradient(143deg, #e12f3f 20%, #f79275 81%, #FFC107);
+ border-bottom: none;
+
ul {
- //background-color: #2b83f9;
- //background-image: linear-gradient(143deg,#2945cb 20%,#2b83f9 81%,#3a9dff);
- //background-image: linear-gradient(143deg, #2945cb 20%, #1890ff 81%, #3a9dff);
- background-image: linear-gradient(143deg, #e12f3f 20%, #f79275 81%, #FFC107);
- border-bottom: none;
li {
border-bottom: none;
- span, i {
+ span,
+ i {
color: #FFF;
//opacity: .69;
}
&:hover {
- span, i {
+
+ span,
+ i {
opacity: 1;
}
}
- &.ant-menu-item-selected, &.ant-menu-item-active {
+ &.ant-menu-item-selected,
+ &.ant-menu-item-active {
color: #1890ff;
background: rgba(0, 0, 0, 0.08);
}
@@ -191,8 +222,12 @@
.ant-layout-sider {
background: #FFF;
- .ant-layout-sider-children{
- .ant-menu-inline, .ant-menu-vertical, .ant-menu-vertical-left {
+
+ .ant-layout-sider-children {
+
+ .ant-menu-inline,
+ .ant-menu-vertical,
+ .ant-menu-vertical-left {
border-right: none;
}
}
@@ -216,10 +251,10 @@
&.layout-dark {
.ant-layout-header {
- ul {
- background-color: #fff;
- background-image: none;
- }
+ background-color: #fff;
+ background-image: none;
+
+ ul {}
}
.logo {
@@ -228,8 +263,17 @@
box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
}
- .ant-layout-sider{
+ .left-menudrawer {
+ color: initial;
+ }
+
+ .ant-layout-sider {
box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
+
+ .ant-layout-sider-zero-width-trigger {
+ color: #fff;
+ background: #002140;
+ }
}
.right-menu {
@@ -242,21 +286,18 @@
.action-item {
&.user-info {
- .ant-avatar {
- }
+ .ant-avatar {}
}
}
&:hover {
- background: rgba(0,0,0,.025);
+ background: rgba(0, 0, 0, .025);
//background: #e6f7ff;
}
- &.action-avatar {
- }
+ &.action-avatar {}
- &.action-organization {
- }
+ &.action-organization {}
}
}
@@ -280,6 +321,7 @@
}
.trigger {
+ user-select: none;
font-size: 18px;
line-height: 64px;
padding: 0 24px;
@@ -294,9 +336,11 @@
}
.middle-menu {
+ user-select: none;
padding: 4px 0;
- .ant-dropdown-menu-item-divider, .ant-dropdown-menu-submenu-title-divider {
+ .ant-dropdown-menu-item-divider,
+ .ant-dropdown-menu-submenu-title-divider {
margin: 4px 0;
}
@@ -314,3 +358,39 @@
.__vuescroll .__rail-is-vertical {
z-index: 3;
}
+
+@media (max-width:768px) {
+ #layout {
+ .main-content.toleft {
+ padding-left: 0px;
+ }
+
+
+ .ant-layout-sider-zero-width-trigger {
+ visibility: hidden;
+ }
+
+ .ant-layout-header {
+ .logo {
+ .title {
+ display: none;
+ }
+ }
+
+ .pc-view {
+ white-space: nowrap;
+ display: none;
+
+ .action-notice {
+ display: none;
+ }
+ }
+
+ .wap-menu {
+ display: block;
+ visibility: visible;
+ flex: 0;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/assets/css/components/list.less b/src/assets/css/components/list.less
index 51511bdb629fe34d88920b5dff497d8159a0668f..1123ba8f1155885d5540eb596fa9ca57d7dce411 100644
--- a/src/assets/css/components/list.less
+++ b/src/assets/css/components/list.less
@@ -3,23 +3,25 @@
.ant-avatar {
width: 50px;
height: 50px;
- border-radius: 3px;
+ border-radius: 1rem;
}
}
.ant-list-item-content {
- .other-info {
+ &.other-info {
display: flex;
.info-item {
display: flex;
flex-direction: column;
- padding-left: 48px;
+ padding-left: 1.5rem;
}
}
}
.ant-list-item-action {
+ margin-left: 1.5rem;
+
.anticon:hover {
svg {
color: @primary-color;
@@ -27,3 +29,153 @@
}
}
}
+
+.project-list {
+ min-height: 3rem;
+
+ .ant-list-item {
+ padding: 1rem 0 1rem;
+ background: #fff;
+ }
+
+ .ant-list-item-meta {
+ margin-left: 1rem;
+ margin-right: 1rem;
+
+ .ant-list-item-meta-description {
+ font-size: 0.8rem;
+ line-height: 1.75;
+ }
+ }
+
+ .ant-list-item-meta-avatar {
+ .ant-avatar {
+ width: 50px;
+ height: 50px;
+ border-radius: 3px;
+ }
+ }
+
+ .ant-list-item-content {
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-flex: 1;
+ -ms-flex: 1;
+ flex: 1;
+ -webkit-box-pack: end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+
+ &.schedule {
+ margin-left: 1rem;
+ margin-right: 1rem;
+
+ .info-item {
+ flex: 1;
+ padding: 0 1rem;
+ }
+ }
+
+ &.other-info {
+ display: flex;
+ font-size: 0.8rem;
+ flex: 0;
+
+ margin-left: 1rem;
+ margin-right: 1rem;
+
+ .info-item {
+ display: flex;
+ flex-direction: column;
+ word-break: keep-all;
+
+ &:nth-child(n+2) {
+ padding-left: 1.5rem;
+ }
+ }
+ }
+ }
+
+ .ant-list-item-action {
+ margin-left: 1rem;
+ margin-right: 1rem;
+
+ >*:hover {
+ svg {
+ color: @primary-color;
+ }
+ }
+ }
+}
+
+@media (max-width: 930px) {
+ .project-list {
+ .ant-list-item {
+ padding: 1rem 0 0;
+ flex-direction: column;
+ align-items: stretch;
+
+ >*:nth-child(n+2) {
+ margin-top: 0.2rem;
+ }
+
+ .ant-list-item-meta {
+ margin-bottom: 0.8rem;
+ }
+
+ .ant-list-item-content {
+
+ &.schedule {
+
+ .info-item {}
+ }
+
+ &.other-info {
+ justify-content: space-around;
+
+ .info-item {}
+ }
+ }
+
+ .ant-list-item-action {
+ display: flex;
+ justify-content: space-around;
+ margin-left: 0;
+ margin-right: 0;
+ align-items: stretch;
+ margin-top: 0.5rem;
+
+ >li {
+ flex: 1;
+ padding: 0.5rem;
+
+ &:active {
+ background: linear-gradient(0deg, lighten(#000, 96%), transparent);
+ }
+ }
+
+ }
+ }
+ }
+}
+
+@media(max-width: 430px) {
+ .project-list {
+ .ant-list-item {
+ .ant-list-item-meta {
+ flex-direction: column;
+ align-items: stretch;
+
+ .ant-list-item-meta-avatar {
+ margin: 0 0 0.5rem;
+
+ .ant-avatar {
+ width: 100%;
+ height: 100px;
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/assets/css/components/media.less b/src/assets/css/components/media.less
new file mode 100644
index 0000000000000000000000000000000000000000..4d517f3ef2b0604afb72c9f564c08bf3fd29badd
--- /dev/null
+++ b/src/assets/css/components/media.less
@@ -0,0 +1,109 @@
+.account-setting-base,
+.account-setting-security {
+ .wrapper-main {
+ padding-left: 0;
+ padding-right: 0;
+ }
+
+ .setting-content {
+ display: flex;
+ flex-direction: row;
+
+ .right {
+ flex: 1 1 0;
+ padding: 8px 40px;
+
+ .setting-info-title {
+ font-size: 20px;
+ }
+
+ .setting-info {
+ display: flex;
+ flex-direction: row;
+ padding-top: 12px;
+
+ &-content {
+ flex: 1;
+ }
+
+ &-avatar {
+ padding-left: 2rem;
+ display: flex;
+ flex-direction: column;
+
+ .avatar {
+ margin-top: 12px;
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+ .avatar-uploader {
+ margin: 1.6rem auto;
+ text-align: center;
+ }
+ }
+ }
+ }
+ }
+}
+
+.account-setting-security {
+ .setting-content {
+ .right {
+ .setting-info {
+ &-content {
+ width: 100%;
+ }
+ }
+ }
+ }
+}
+
+.mobile-modal {
+ .getCaptcha {
+ display: block;
+ width: 100%;
+ height: 40px;
+ }
+}
+
+.wap-menu {
+ display: none;
+ visibility: hidden;
+}
+
+@media (max-width: 768px) {
+ .pc-view {
+ display: none;
+ visibility: hidden;
+ }
+
+ .wap-menu {
+ display: block;
+ visibility: visible;
+ }
+
+ .account-setting .left {
+ width: auto !important;
+ border-right: 0px solid #e8e8e8 !important;
+ }
+
+ .account-setting-base,
+ .account-setting-security {
+ .setting-content {
+ flex-direction: column;
+
+ .right {
+ padding: 1rem;
+
+ .setting-info {
+ flex-direction: column;
+
+ &-avatar {
+ padding-left: 0;
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/assets/css/components/task.less b/src/assets/css/components/task.less
index 1b2f4cdf768eb60d55ee1309b4028110f059ba2a..d3eeee6767c04c0221f6dabe81a4ca3ea5ad41e8 100644
--- a/src/assets/css/components/task.less
+++ b/src/assets/css/components/task.less
@@ -1,25 +1,34 @@
.project-space-task {
-}
-
-.project-space-task .wrapper-main {
- margin: 0;
- padding: 0;
- background: inherit;
-}
-
-.project-space-task .wrapper-content {
- background: #f5f5f5;
- position: fixed;
height: 100%;
- padding: 0 0 63px;
-}
+ flex: 1;
+ display: flex;
+ flex-direction: column;
-.project-space-task .layout-content {
- padding: 60px 10px 0 0;
- height: 100%;
- margin-left: 0;
- margin-right: 0;
- background: #fff;
+ .tasks-loading {
+ .ant-spin-blur {
+ opacity: 0;
+ }
+ }
+
+ .wrapper-main {
+ margin: 0;
+ padding: 0;
+ background: inherit;
+
+ .wrapper-content {
+ background: #f5f5f5;
+ position: relative;
+ height: 100%;
+ overflow: auto;
+ width: 100%;
+
+ .layout-content {
+ height: 100%;
+ margin-left: 0;
+ margin-right: 0;
+ }
+ }
+ }
}
.project-space-task .manage-contents {
@@ -79,7 +88,8 @@
}
}
-.scrum-stage .scrum-stage-header, .scrum-stage .sort-header-placeholder {
+.scrum-stage .scrum-stage-header,
+.scrum-stage .sort-header-placeholder {
-webkit-flex: 0 0 auto;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
@@ -171,11 +181,12 @@
padding-bottom: 40px;
}
-.scrum-stage .scrum-stage-content > ul {
+.scrum-stage .scrum-stage-content>ul {
/*margin-bottom: 8px;*/
}
-.scrum-stage .scrum-stage-tasks, .scrum-stage .scrum-stage-tasks-done {
+.scrum-stage .scrum-stage-tasks,
+.scrum-stage .scrum-stage-tasks-done {
transition: opacity 0.08s ease-out;
opacity: 1;
min-height: 5px;
@@ -373,7 +384,9 @@
font-size: 0;
}
-.task.task-card .task-infos .label, .task.task-card .task-infos .icon-wrapper, .task.task-card .task-infos .tag {
+.task.task-card .task-infos .label,
+.task.task-card .task-infos .icon-wrapper,
+.task.task-card .task-infos .tag {
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
@@ -402,12 +415,15 @@
padding-left: 6px;
}
-.label-important, .badge-important {
+.label-important,
+.badge-important {
color: #FFFFFF;
background-color: #FF4F3E;
}
-.task.task-card .task-infos .label > span, .task.task-card .task-infos .icon-wrapper, .task.task-card .task-infos .tag {
+.task.task-card .task-infos .label>span,
+.task.task-card .task-infos .icon-wrapper,
+.task.task-card .task-infos .tag {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -587,7 +603,8 @@
color: rgba(0, 0, 0, 0.45);
}
-.task.task-card.done .check-box, .task.task-card.done .task-content-set {
+.task.task-card.done .check-box,
+.task.task-card.done .task-content-set {
opacity: 0.64;
filter: alpha(opacity=64);
}
@@ -604,6 +621,7 @@
justify-content: center;
transition: background 218ms;
border-radius: 3px;
+
&:hover {
.check-box {
color: grey;
@@ -762,7 +780,8 @@
transition: opacity .15s linear;
}
-input.form-control, textarea.form-control {
+input.form-control,
+textarea.form-control {
background-color: #FFFFFF;
border: 1px solid #D9D9D9;
border-radius: 3px;
@@ -775,7 +794,7 @@ input.form-control, textarea.form-control {
border-bottom: 1px solid #EEEEEE;
}
-.task-creator .handler-wrap > a {
+.task-creator .handler-wrap>a {
width: 100%;
display: inline-block;
//padding: 15px 0;
@@ -793,7 +812,8 @@ input.form-control, textarea.form-control {
line-height: 24px;
}
-.task-creator .handler-wrap > a > .icon, .task-creator .handler-wrap > a > .avatar {
+.task-creator .handler-wrap>a>.icon,
+.task-creator .handler-wrap>a>.avatar {
display: inline-block;
line-height: 24px;
float: left;
@@ -816,14 +836,14 @@ input.form-control, textarea.form-control {
margin: 10px 0 -5px -10px;
}
-.involve-view .involve-members > li {
+.involve-view .involve-members>li {
position: relative;
float: left;
margin: 0 0 10px 10px;
cursor: pointer;
}
-.involve-view .involve-members > li > .avatar {
+.involve-view .involve-members>li>.avatar {
display: block;
width: 24px;
height: 24px;
@@ -836,7 +856,7 @@ input.form-control, textarea.form-control {
background-position: center !important;
}
-.involve-view .involve-members > li {
+.involve-view .involve-members>li {
position: relative;
float: left;
margin: 0 0 10px 10px;
@@ -858,7 +878,7 @@ input.form-control, textarea.form-control {
text-align: center;
}
-.task-creator .handler-wrap > a {
+.task-creator .handler-wrap>a {
width: 100%;
display: inline-block;
padding: 6px 0;
@@ -872,13 +892,15 @@ input.form-control, textarea.form-control {
line-height: 24px;
}
-.project-space-task .menu-toggler-title, .project-space-task .footer-item {
+.project-space-task .menu-toggler-title,
+.project-space-task .footer-item {
color: #808080;
text-decoration: none;
cursor: pointer;
}
-.task-creator .tags-wrap, .task-creator .involve-wrap {
+.task-creator .tags-wrap,
+.task-creator .involve-wrap {
border-bottom: 1px solid #EEEEEE;
}
@@ -950,7 +972,8 @@ input.form-control, textarea.form-control {
flex: 1 0 auto;
}
-.activities-timeline > div, .activities-timeline > ul {
+.activities-timeline>div,
+.activities-timeline>ul {
margin-right: -1px;
margin-left: -1px;
overflow: hidden;
@@ -990,7 +1013,7 @@ input.form-control, textarea.form-control {
color: #383838;
}
-.readable > *:last-child {
+.readable>*:last-child {
margin-bottom: 0;
}
@@ -1007,7 +1030,7 @@ input.form-control, textarea.form-control {
border-left: 5px solid #EEEEEE;
}
-.activity .activity-content > blockquote {
+.activity .activity-content>blockquote {
margin: 5px 0 0 0;
padding: 0 0 0 10px;
}
@@ -1037,7 +1060,9 @@ li.activity.creator i {
margin-top: 0;
}
-.activities-timeline.early-hidden .activity-early-wrap, .activities-timeline.early-shown .activity-early-wrap, .activities-timeline.early-loading .activity-early-wrap {
+.activities-timeline.early-hidden .activity-early-wrap,
+.activities-timeline.early-shown .activity-early-wrap,
+.activities-timeline.early-loading .activity-early-wrap {
display: block;
}
@@ -1060,12 +1085,14 @@ li.activity.creator i {
transition: color 218ms ease;
}
-.task.task-card.ui-sortable-handle.dragging, .scrum-stage-tasks-done .task.task-card.ui-sortable-handle.dragging {
+.task.task-card.ui-sortable-handle.dragging,
+.scrum-stage-tasks-done .task.task-card.ui-sortable-handle.dragging {
cursor: move;
}
/*紧急程度一般*/
-.task.task-card.ui-sortable-handle:hover, .scrum-stage-tasks-done .task.task-card.ui-sortable-handle:hover {
+.task.task-card.ui-sortable-handle:hover,
+.scrum-stage-tasks-done .task.task-card.ui-sortable-handle:hover {
border-left: 3px solid #a6a6a6;
}
@@ -1121,44 +1148,6 @@ li.activity.creator i {
clear: both;
}
-.project-nav-footer {
- position: absolute;
- right: 0;
- top: 0;
- display: flex;
- height: 50px;
- align-items: center;
- z-index: 998;
-}
-
-.project-nav-footer .footer-item {
- font-size: 14px;
- position: relative;
- padding: 15px 10px;
- margin: 0 5px;
- float: right;
- display: inline-block;
- text-align: center;
-}
-
-.project-nav-footer .footer-item.active {
- color: #2D8cF0;
-}
-
-.project-nav-footer .footer-item:hover {
- color: #2D8cF0;
-}
-
-.project-nav-footer :not(:first-child):after {
- position: absolute;
- content: '';
- right: -5px;
- top: 16px;
- bottom: 16px;
- width: 1px;
- background-color: #A6A6A6;
-}
-
.menu-modal .ivu-modal-mask {
overflow: hidden;
@@ -1211,20 +1200,20 @@ li.activity.creator i {
background-color: rgba(0, 0, 0, 0.06);
}
-.project-menus .list > li {
+.project-menus .list>li {
position: relative;
line-height: 30px;
}
-.project-menus .list > li:first-child > a {
+.project-menus .list>li:first-child>a {
margin-top: 5px;
}
-.project-menus .list > li:first-child > a {
+.project-menus .list>li:first-child>a {
margin-top: 5px;
}
-.project-menus .list > li > a {
+.project-menus .list>li>a {
display: flex;
align-items: center;
cursor: pointer;
@@ -1236,19 +1225,19 @@ li.activity.creator i {
white-space: nowrap;
}
-.project-menus .list > li > a {
+.project-menus .list>li>a {
color: #808080;
font-size: 16px;
width: 35px;
text-align: center;
}
-.project-menus .activities-panel-menu-list > li > a {
+.project-menus .activities-panel-menu-list>li>a {
color: #383838;
font-weight: 600;
}
-.project-menus .activities-panel-menu-list > li:hover a {
+.project-menus .activities-panel-menu-list>li:hover a {
background-color: #EEEEEE;
}
@@ -1316,7 +1305,7 @@ li.activity.creator i {
padding-bottom: 10px;
}
-.activity-card-datas .data-statistics > div {
+.activity-card-datas .data-statistics>div {
display: inline-block;
vertical-align: middle;
cursor: pointer;
@@ -1329,7 +1318,7 @@ li.activity.creator i {
font-size: 14px;
}
-.activity-card-datas .data-statistics > div:hover {
+.activity-card-datas .data-statistics>div:hover {
background-color: #EEEEEE;
}
@@ -1497,7 +1486,7 @@ li.activity.creator i {
height: 36px;
}
-.user-menu-modal .project-menus .list > li {
+.user-menu-modal .project-menus .list>li {
line-height: 10px;
}
@@ -1537,7 +1526,8 @@ li.activity.creator i {
.layout-content {
background: inherit;
- .scrum-stage .scrum-stage-header, .scrum-stage .sort-header-placeholder {
+ .scrum-stage .scrum-stage-header,
+ .scrum-stage .sort-header-placeholder {
padding: 14px 14px;
font-size: 14px;
}
@@ -1545,6 +1535,7 @@ li.activity.creator i {
.scrum-stage-wrap.ui-sortable {
padding-bottom: 40px;
}
+
.scrum-stage-wrap.ui-sortable.hidden-creator-bottom {
padding-bottom: 80px;
}
@@ -1605,3 +1596,296 @@ li.activity.creator i {
}
}
}
+
+.project-space-files,
+.project-space-features,
+.project-space-overview {
+ .wrapper-main {
+ background: initial;
+ margin: 1rem;
+ }
+
+ .features-list-dropdown {
+ cursor: pointer;
+ }
+
+ .layout-content {
+ .content-item {
+ background: #fff;
+ padding: 6px 18px 18px 18px;
+ border-radius: 1.3rem;
+ width: 100%;
+
+ .title {
+ font-size: 16px;
+ padding: 6px 0 0 0;
+ }
+
+ &.files-list,
+ &.log-list {
+ background: #fff;
+ margin-bottom: 15px;
+
+ .list-content {
+ padding-top: 12px;
+ position: relative;
+
+ li.list-item-title,
+ li.list-item-title .ant-list-item-action * {
+ cursor: default;
+ }
+
+ li:not(.list-item-title) .ant-list-item-action {
+ visibility: hidden;
+ }
+
+ li:not(.list-item-title):hover .ant-list-item-action {
+ visibility: visible;
+ }
+ }
+ }
+
+ .version-group {
+ margin-top: 0.5rem;
+ margin-bottom: 0.5rem;
+
+ .version-group-title {
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ user-select: none;
+ }
+
+ .version-content {
+ margin-bottom: 1rem;
+
+ .ant-card {
+ min-height: 102px;
+ border-radius: 1rem;
+ user-select: none;
+ /*display: inline-block;*/
+
+ .ant-card-head {
+ padding: 0 16px;
+ border-bottom: none;
+
+ .ant-card-head-title {
+ padding: 12px 0;
+ display: flex;
+ justify-content: space-between;
+ font-size: 14px;
+
+ .version-status {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ min-width: 3rem;
+ border-radius: 4px;
+ background: #f5f5f5;
+ padding: 4px 8px;
+
+ &.status-0 {
+ color: #a6a6a6;
+ }
+
+ &.status-1 {
+ color: #1890ff;
+ background: #e6f7ff;
+ border-color: #91d5ff;
+ }
+
+ &.status-2 {
+ color: #f5222d;
+ background: #fff1f0;
+ border-color: #ffa39e;
+ }
+
+ &.status-3 {
+ color: #52c41a;
+ background: #f6ffed;
+ border-color: #b7eb8f;
+ }
+ }
+ }
+ }
+
+ .ant-card-body {
+ height: 100%;
+ padding: 0 1rem 0.5rem;
+
+ .publish-time {
+ font-size: 0.8rem;
+ }
+ }
+ }
+
+ .version-create {
+ .ant-card-body {
+ padding: 1.5rem;
+ line-height: 1.75;
+ }
+
+ a {
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
+ }
+ }
+
+ &.published {
+ .ant-card {
+ height: auto;
+ min-height: auto;
+ }
+ }
+ }
+ }
+
+ &.files-list {
+ .header {
+ display: flex;
+ justify-content: space-between;
+
+ .header-actions {
+ justify-self: flex-end;
+ padding-top: 0.2rem;
+ }
+ }
+
+ .list-content {
+ .list-item {
+ border-bottom: none;
+ transition: background-color 218ms;
+ border-radius: 1rem;
+ padding: 0.5rem;
+ overflow: hidden;
+ margin: 0.5rem 0;
+ white-space: nowrap;
+
+ &:hover {
+ background-color: #f5f5f5;
+ }
+ }
+
+ .ant-list-item-meta {
+ flex: 6;
+ position: relative;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ word-break: keep-all;
+ }
+
+ .ant-list-item-action {
+ flex: 2;
+ text-align: right;
+ margin-left: 1.5rem;
+ }
+
+ .other-info {
+ display: flex;
+ white-space: nowrap;
+ flex: 3;
+ justify-content: space-between;
+
+ .info-item {
+ text-align: center;
+ flex: 1;
+ padding: 0 1rem;
+
+ &:nth-child(1) {
+ text-align: left;
+ }
+
+ &:nth-last-child(1) {
+ text-align: right;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .project-date {
+ .ant-calendar-picker {
+ border: none;
+
+ &:focus {
+ border: none;
+ }
+ }
+
+ .ant-calendar-picker-input {
+ border: none;
+ }
+ }
+
+ .project-stats {
+ .stats-content {
+ .stats-item {
+ .stats-number {
+ /*font-weight: bold;*/
+ font-size: 2rem;
+ text-overflow: ellipsis;
+ word-break: keep-all;
+ white-space: nowrap;
+ overflow: hidden;
+ }
+ }
+ }
+ }
+ }
+}
+
+@media(max-width: 768px) {
+ .project-space-files .layout-content {
+ .content-item {
+ &.files-list {
+ .list-content {
+ .list-item {
+ flex-direction: column;
+ align-items: stretch;
+ position: relative;
+
+ &::after {
+ content: "";
+ height: 1px;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ background: #f6f6f6;
+ }
+ }
+
+ .ant-list-item-meta {
+ flex: 1 !important;
+ white-space: pre-wrap;
+ }
+
+ .ant-list-item-action {
+ flex: 1 !important;
+ }
+
+ .other-info {
+ display: flex;
+ white-space: nowrap;
+ flex: 1 !important;
+ justify-content: space-between;
+
+ .info-item {
+ padding: 0;
+ font-size: 0.8rem;
+
+ &:nth-child(n+2) {
+ padding-left: 0.5rem;
+ }
+ }
+ }
+ }
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/assets/css/components/warpperContent.less b/src/assets/css/components/warpperContent.less
index f15cf5ebf23c7294f2c6557b017125e1a7044d36..fa147a51d302dd36ab9dabf7e35012dcfb6a1190 100644
--- a/src/assets/css/components/warpperContent.less
+++ b/src/assets/css/components/warpperContent.less
@@ -6,6 +6,7 @@
font-weight: 400;
//border-bottom: 1px solid #e5e5e5;
}
+
.content-title {
font-size: 18px;
color: #464c5b;
@@ -21,81 +22,90 @@
float: right;
}
-.content-action + .page-title {
+.content-action+.page-title {
//padding-top: 55px;
}
-.page-header{
+
+.page-header {
//margin-top: 65px;
background: #fff;
padding: 16px 32px 0;
border-bottom: 1px solid #e8e8e8;
- .breadcrumb{
+
+ .breadcrumb {
margin-bottom: 16px;
}
- .detail{
+
+ .detail {
display: flex;
+
.row {
display: flex;
width: 100%;
}
- .main{
+
+ .main {
width: 100%;
flex: 0 1 auto;
- .title{
+
+ .title {
flex: auto;
font-size: 20px;
font-weight: 500;
- color: rgba(0,0,0,.85);
+ color: rgba(0, 0, 0, .85);
margin-bottom: 16px;
}
- .logo{
+
+ .logo {
width: 28px;
height: 28px;
border-radius: 4px;
margin-right: 16px;
}
- .content{
+
+ .content {
margin-bottom: 16px;
flex: auto;
}
- .extra{
+
+ .extra {
flex: 0 1 auto;
margin-left: 88px;
min-width: 242px;
text-align: right;
}
- .action{
- margin-left: 56px;
- min-width: 266px;
+
+ .action {
flex: 0 1 auto;
text-align: right;
}
}
}
}
-.page-header-none{
+
+.page-header-none {
padding: 0;
border-bottom: none;
}
.wrapper-main {
- margin: 24px;
- padding: 24px 0 12px 24px;
+ margin: 2rem;
+ padding: 1rem;
background: rgb(255, 255, 255);
+ height: 100%;
+ border-radius: 1rem;
}
.wrapper-content {
- width: 100%;
- padding-right: 24px;
transition: all 368ms;
- .action{
+
+ .action {
padding-bottom: 12px;
line-height: 3;
}
}
-.layout-content {
-}
+.layout-content {}
.page-search {
margin-bottom: 16px;
@@ -144,3 +154,7 @@
color: #9ea7b4;
}
+.ant-spin-nested-loading,
+.ant-spin-container {
+ height: 100%;
+}
\ No newline at end of file
diff --git a/src/assets/js/dateTime.js b/src/assets/js/dateTime.js
index 2f7c27a4e3ba0007bc012b2ab2500ff69e2be476..86da4a65e28a1c5e5c169656c61aa030b719cd6c 100644
--- a/src/assets/js/dateTime.js
+++ b/src/assets/js/dateTime.js
@@ -5,31 +5,41 @@
import moment from "moment";
export const getWeekDay = () => {
- //起止日期数组
- var startStop = [];
- //获取当前时间
- var currentDate = new Date();
- //返回date是一周中的某一天
- var week = currentDate.getDay();
- //返回date是一个月中的某一天
- var month = currentDate.getDate();
+ //起止日期数组
+ var startStop = [];
+ //获取当前时间
+ var currentDate = new Date();
+ //返回date是一周中的某一天
+ var week = currentDate.getDay();
+ //返回date是一个月中的某一天
+ var month = currentDate.getDate();
- //一天的毫秒数
- var millisecond = 1000 * 60 * 60 * 24;
- //减去的天数
- var minusDay = week != 0 ? week - 1 : 6;
- //alert(minusDay)
- //本周 周一
- var monday = new Date(currentDate.getTime() - (minusDay * millisecond));
- //本周 周日
- var sunday = new Date(monday.getTime() + (6 * millisecond));
- monday = monday.getFullYear() + "-" + (monday.getMonth() + 1) + "-" + monday.getDate();
- sunday = sunday.getFullYear() + "-" + (sunday.getMonth() + 1) + "-" + sunday.getDate();
- var week_day = {
- monday: monday,
- sunday: sunday,
- };
- return week_day
+ //一天的毫秒数
+ var millisecond = 1000 * 60 * 60 * 24;
+ //减去的天数
+ var minusDay = week != 0 ? week - 1 : 6;
+ //alert(minusDay)
+ //本周 周一
+ var monday = new Date(currentDate.getTime() - minusDay * millisecond);
+ //本周 周日
+ var sunday = new Date(monday.getTime() + 6 * millisecond);
+ monday =
+ monday.getFullYear() +
+ "-" +
+ (monday.getMonth() + 1) +
+ "-" +
+ monday.getDate();
+ sunday =
+ sunday.getFullYear() +
+ "-" +
+ (sunday.getMonth() + 1) +
+ "-" +
+ sunday.getDate();
+ var week_day = {
+ monday: monday,
+ sunday: sunday,
+ };
+ return week_day;
};
/**
* 格式化相对时间
@@ -38,38 +48,42 @@ export const getWeekDay = () => {
* @param now
*/
export const relativelyTime = (value, now) => {
- if (!now) {
- now = moment();
- }
- const diff = moment(now).diff(moment(value), 'hours');
- if (diff <= 1) {
- return moment(value).fromNow();
- }
- const today = moment(now).get('date');
- const current = moment(value).get('date');
- if (current < today - 1) {
- // return moment(value).format('M月D日 H:mm');
- }
- let detailTime = moment(value).format('H:mm');
- const currentDate = moment(value).format('YYYY-MM-DD');
- const currentMonday = moment().weekday(0).format('YYYY-MM-DD');
- const currentSunday = moment().weekday(6).format('YYYY-MM-DD');
- let weekDate = '';
- if (currentDate < currentMonday) {
- weekDate = '[上周]dd ' + detailTime;
- }else if (currentDate > currentSunday) {
- weekDate = '[下周]dd ' + detailTime;
- }else{
- weekDate = '[周]dd ' + detailTime;
- }
- return moment(value).calendar(null, {
- sameDay: '[今天 ]' + moment(value).format('H:mm'),
- nextDay: '[明天 ]' + detailTime,
- nextWeek: weekDate,
- lastDay: '[昨天 ]' + detailTime,
- lastWeek: weekDate,
- sameElse: 'M月D日 H:mm'
- });
+ if (!now) {
+ now = moment();
+ }
+ const diff = moment(now).diff(moment(value), "hours");
+ if (diff <= 1) {
+ return moment(value).fromNow();
+ }
+ const today = moment(now).get("date");
+ const current = moment(value).get("date");
+ if (current < today - 1) {
+ // return moment(value).format('M月D日 H:mm');
+ }
+ let detailTime = moment(value).format("H:mm");
+ const currentDate = moment(value).format("YYYY-MM-DD");
+ const currentMonday = moment()
+ .weekday(0)
+ .format("YYYY-MM-DD");
+ const currentSunday = moment()
+ .weekday(6)
+ .format("YYYY-MM-DD");
+ let weekDate = "";
+ if (currentDate < currentMonday) {
+ weekDate = "[上周]dd " + detailTime;
+ } else if (currentDate > currentSunday) {
+ weekDate = "[下周]dd " + detailTime;
+ } else {
+ weekDate = "[周]dd " + detailTime;
+ }
+ return moment(value).calendar(null, {
+ sameDay: "[今天 ]" + moment(value).format("H:mm"),
+ nextDay: "[明天 ]" + detailTime,
+ nextWeek: weekDate,
+ lastDay: "[昨天 ]" + detailTime,
+ lastWeek: weekDate,
+ sameElse: "M月D日 H:mm",
+ });
};
/**
*
@@ -78,39 +92,49 @@ export const relativelyTime = (value, now) => {
* @returns {string}
*/
export const relativelyTaskTime = (value, showDetailTime = false) => {
- let detailTime = moment(value).format('H:mm');
- if (!showDetailTime) {
- detailTime = '';
- }
- const currentDate = moment(value).format('YYYY-MM-DD');
- const currentMonday = moment().weekday(0).format('YYYY-MM-DD');
- const currentSunday = moment().weekday(6).format('YYYY-MM-DD');
- let weekDate = '';
- if (currentDate < currentMonday) {
- weekDate = '[上周]dd ' + detailTime;
- }else if (currentDate > currentSunday) {
- weekDate = '[下周]dd ' + detailTime;
- }else{
- weekDate = '[周]dd ' + detailTime;
- }
- return moment(value).calendar(null, {
- sameDay: '[今天 ]' + moment(value).format('H:mm'),
- nextDay: '[明天 ]' + detailTime,
- nextWeek: weekDate,
- lastDay: '[昨天 ]' + detailTime,
- lastWeek: weekDate,
- sameElse: 'M月D日 H:mm'
- });
+ let detailTime = moment(value).format("H:mm");
+ if (!showDetailTime) {
+ detailTime = "";
+ }
+ const currentDate = moment(value).format("YYYY-MM-DD");
+ const currentMonday = moment()
+ .weekday(0)
+ .format("YYYY-MM-DD");
+ const currentSunday = moment()
+ .weekday(6)
+ .format("YYYY-MM-DD");
+ let weekDate = "";
+ if (currentDate < currentMonday) {
+ weekDate = "[上周]dd " + detailTime;
+ } else if (currentDate > currentSunday) {
+ weekDate = "[下周]dd " + detailTime;
+ } else {
+ weekDate = "[周]dd " + detailTime;
+ }
+ return moment(value).calendar(null, {
+ sameDay: "[今天 ]" + moment(value).format("H:mm"),
+ nextDay: "[明天 ]" + detailTime,
+ nextWeek: weekDate,
+ lastDay: "[昨天 ]" + detailTime,
+ lastWeek: weekDate,
+ sameElse: "M月D日 H:mm",
+ });
};
export const formatTaskTime = (begin, end) => {
- //如果不是今天则不显示具体时间
- if (!end && begin) {
- return relativelyTaskTime(begin) + ' 开始';
- }
- if (!begin) {
- return relativelyTaskTime(end) + ' 截止';
- }
- return relativelyTaskTime(begin) + ' - ' + relativelyTaskTime(end);
+ //如果不是今天则不显示具体时间
+ if (!end && begin) {
+ return relativelyTaskTime(begin, true) + " 开始";
+ }
+ if (!begin) {
+ return relativelyTaskTime(end, true) + " 截止";
+ }
+ return (
+ relativelyTaskTime(begin, true) +
+ " - " +
+ (moment(end).isSame(begin, "day")
+ ? moment(end).format("H:mm")
+ : relativelyTaskTime(end, true))
+ );
};
/**
* 格式化时间
@@ -119,59 +143,59 @@ export const formatTaskTime = (begin, end) => {
* @returns {string}
*/
export const format_date = (data, show) => {
- if (show == undefined) {
- show = true
- }
- //格式化时间
- let now = new Date(data * 1000);
- let year = now.getFullYear();
- let month = now.getMonth() + 1;
- let date = now.getDate();
- let hour = now.getHours();
- let minute = now.getMinutes();
- // let second = now.getSeconds();
- if (month < 10) {
- month = '0' + month;
- }
- if (date < 10) {
- date = '0' + date;
- }
- if (hour < 10) {
- hour = '0' + hour;
- }
- if (minute < 10) {
- minute = '0' + minute;
- }
- const finally_date = {
- year: year,
- month: month,
- day: date,
- hour: hour,
- minute: minute
- };
- if (show) {
- return year + "-" + month + "-" + date + " " + hour + ":" + minute;
- } else {
- return finally_date
- }
+ if (show == undefined) {
+ show = true;
+ }
+ //格式化时间
+ let now = new Date(data * 1000);
+ let year = now.getFullYear();
+ let month = now.getMonth() + 1;
+ let date = now.getDate();
+ let hour = now.getHours();
+ let minute = now.getMinutes();
+ // let second = now.getSeconds();
+ if (month < 10) {
+ month = "0" + month;
+ }
+ if (date < 10) {
+ date = "0" + date;
+ }
+ if (hour < 10) {
+ hour = "0" + hour;
+ }
+ if (minute < 10) {
+ minute = "0" + minute;
+ }
+ const finally_date = {
+ year: year,
+ month: month,
+ day: date,
+ hour: hour,
+ minute: minute,
+ };
+ if (show) {
+ return year + "-" + month + "-" + date + " " + hour + ":" + minute;
+ } else {
+ return finally_date;
+ }
};
export const formatDateNow = (day) => {
- //格式化时间
- if (day == undefined) {
- day = 0;
- }
- let now = new Date();
- let year = now.getFullYear();
- let month = now.getMonth() + 1;
- let date = now.getDate() + day;
- if (month < 10) {
- month = '0' + month;
- }
- if (date < 10) {
- date = '0' + date;
- }
- return year + "-" + month + "-" + date;
+ //格式化时间
+ if (day == undefined) {
+ day = 0;
+ }
+ let now = new Date();
+ let year = now.getFullYear();
+ let month = now.getMonth() + 1;
+ let date = now.getDate() + day;
+ if (month < 10) {
+ month = "0" + month;
+ }
+ if (date < 10) {
+ date = "0" + date;
+ }
+ return year + "-" + month + "-" + date;
};
/**
@@ -181,36 +205,36 @@ export const formatDateNow = (day) => {
* @returns {string}
*/
export const showTaskTime = (begin_time, end_time) => {
- let task_time = '';
- let begin_time_format = '';
- let end_time_format = '';
- begin_time = Date.parse(new Date(begin_time)) / 1000;
- end_time = Date.parse(new Date(end_time)) / 1000;
- if (begin_time > 0) {
- let begin = format_date(begin_time, false);
- begin_time_format = begin.month + '月' + begin.day + '日' + ' - '
+ let task_time = "";
+ let begin_time_format = "";
+ let end_time_format = "";
+ begin_time = Date.parse(new Date(begin_time)) / 1000;
+ end_time = Date.parse(new Date(end_time)) / 1000;
+ if (begin_time > 0) {
+ let begin = format_date(begin_time, false);
+ begin_time_format = begin.month + "月" + begin.day + "日" + " - ";
+ }
+ if (end_time > 0) {
+ let end = format_date(end_time, false);
+ end_time_format = end.month + "月" + end.day + "日";
+ if (end.hour > 12 && end.hour <= 18) {
+ end_time_format += " 下午下班前";
+ }
+ if (end.hour > 18) {
+ end_time_format += " 加班";
}
- if (end_time > 0) {
- let end = format_date(end_time, false);
- end_time_format = end.month + '月' + end.day + '日';
- if (end.hour > 12 && end.hour <= 18) {
- end_time_format += ' 下午下班前'
- }
- if (end.hour > 18) {
- end_time_format += ' 加班'
- }
- if (end.hour <= 12 && end.hour >= 8) {
- end_time_format += ' 上午下班前'
- }
- if (end.hour < 8 && end.hour > 0) {
- end_time_format += ' 通宵'
- }
+ if (end.hour <= 12 && end.hour >= 8) {
+ end_time_format += " 上午下班前";
}
- if (begin_time_format == '') {
- end_time_format += '完成'
+ if (end.hour < 8 && end.hour > 0) {
+ end_time_format += " 通宵";
}
- task_time += begin_time_format + end_time_format;
- return task_time
+ }
+ if (begin_time_format == "") {
+ end_time_format += "完成";
+ }
+ task_time += begin_time_format + end_time_format;
+ return task_time;
};
/**
*
@@ -218,28 +242,20 @@ export const showTaskTime = (begin_time, end_time) => {
* @param time
*/
export const showHelloTime = (time) => {
- let time_format = '';
- if (time == undefined) {
- time = new Date();
- }
- let hr = time.getHours();
- if ((hr >= 0) && (hr <= 4))
- time_format = "深夜了,注意身体,";
- if ((hr >= 4) && (hr < 7))
- time_format = "清晨好, ";
- if ((hr >= 7) && (hr < 12))
- time_format = "早安,";
- if ((hr >= 12) && (hr <= 13))
- time_format = "午饭时间到了,";
- if ((hr >= 13) && (hr <= 17))
- time_format = "下午好,";
- if ((hr >= 17) && (hr <= 18))
- time_format = "进入傍晚了,";
- if ((hr >= 18) && (hr <= 20))
- time_format = "吃过晚饭了吗,";
- if ((hr >= 20) && (hr <= 24))
- time_format = "在加班吗?辛苦了,";
- return time_format
+ let time_format = "";
+ if (time == undefined) {
+ time = new Date();
+ }
+ let hr = time.getHours();
+ if (hr >= 0 && hr <= 4) time_format = "深夜了,注意身体,";
+ if (hr >= 4 && hr < 7) time_format = "清晨好, ";
+ if (hr >= 7 && hr < 12) time_format = "早安,";
+ if (hr >= 12 && hr <= 13) time_format = "午饭时间到了,";
+ if (hr >= 13 && hr <= 17) time_format = "下午好,";
+ if (hr >= 17 && hr <= 18) time_format = "进入傍晚了,";
+ if (hr >= 18 && hr <= 20) time_format = "吃过晚饭了吗,";
+ if (hr >= 20 && hr <= 24) time_format = "在加班吗?辛苦了,";
+ return time_format;
};
/**
@@ -249,24 +265,28 @@ export const showHelloTime = (time) => {
* @param format
*/
export const dateFormat = (date, format) => {
- let o = {
- "M+": date.getMonth() + 1, //month
- "d+": date.getDate(), //day
- "h+": date.getHours(), //hour
- "m+": date.getMinutes(), //minute
- "s+": date.getSeconds(), //second
- "q+": Math.floor((date.getMonth() + 3) / 3), //quarter
- "S": date.getMilliseconds() //millisecond
- };
- if (/(y+)/.test(format)) {
- format = format.replace(RegExp.$1,
- (date.getFullYear() + "").substr(4 - RegExp.$1.length));
- }
- for (let k in o) if (new RegExp("(" + k + ")").test(format))
- format = format.replace(RegExp.$1,
- RegExp.$1.length == 1 ? o[k] :
- ("00" + o[k]).substr(("" + o[k]).length));
- return format;
+ let o = {
+ "M+": date.getMonth() + 1, //month
+ "d+": date.getDate(), //day
+ "h+": date.getHours(), //hour
+ "m+": date.getMinutes(), //minute
+ "s+": date.getSeconds(), //second
+ "q+": Math.floor((date.getMonth() + 3) / 3), //quarter
+ S: date.getMilliseconds(), //millisecond
+ };
+ if (/(y+)/.test(format)) {
+ format = format.replace(
+ RegExp.$1,
+ (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+ );
+ }
+ for (let k in o)
+ if (new RegExp("(" + k + ")").test(format))
+ format = format.replace(
+ RegExp.$1,
+ RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
+ );
+ return format;
};
/**
@@ -276,10 +296,10 @@ export const dateFormat = (date, format) => {
* @returns {string}
*/
export const convert = (num) => {
- let result = "";
- while (num) {
- result = String.fromCharCode(--num % 26 + 65) + result;
- num = Math.floor(num / 26)
- }
- return result
+ let result = "";
+ while (num) {
+ result = String.fromCharCode((--num % 26) + 65) + result;
+ num = Math.floor(num / 26);
+ }
+ return result;
};
diff --git a/src/assets/js/http.js b/src/assets/js/http.js
index 5e58b88efd2d09e21ef31ff6de6727178d595b65..3327f620917bbfb24feb777726cc1685a722dab7 100644
--- a/src/assets/js/http.js
+++ b/src/assets/js/http.js
@@ -14,6 +14,7 @@ if (currentOrganization) {
}
const crossDomain = config.crossDomain;
let axiosConfig = {};
+axiosConfig.baseURL = '/api'// process.env.VUE_APP_API_URL;
if (crossDomain) {
axiosConfig.withCredentials = true;
axiosConfig.crossDomain = true;
diff --git a/src/components/chart/RankList.vue b/src/components/chart/RankList.vue
index e62adb67be03d9cfd05a1649a6a66911bba3b069..7a957e148ea5643d92dd25c51d68a6b740a571a1 100644
--- a/src/components/chart/RankList.vue
+++ b/src/components/chart/RankList.vue
@@ -1,6 +1,6 @@
-
{{ title }}
+
{{ title }}
-
{{ index + 1 }}
@@ -31,7 +31,7 @@
diff --git a/src/components/layout/WrapperContent.vue b/src/components/layout/WrapperContent.vue
index ec9c375a11476573c2ab2a79b01bd77a6ae86dff..45b0cfb447479a46c976fbcc93255fbd3a932a82 100644
--- a/src/components/layout/WrapperContent.vue
+++ b/src/components/layout/WrapperContent.vue
@@ -1,144 +1,138 @@
-
-