@@ -1203,9 +1203,9 @@ export default {
});
},
- openMenu(task) {
+ openMenu(event, task) {
const el = this.$refs[`taskMenu_${task.id}`];
- el && el.handleClick()
+ el && el.handleClick(event)
},
openNewWin() {
diff --git a/resources/assets/js/pages/manage/components/TaskMenu.vue b/resources/assets/js/pages/manage/components/TaskMenu.vue
index 5e2006a3b..acddfdcf2 100644
--- a/resources/assets/js/pages/manage/components/TaskMenu.vue
+++ b/resources/assets/js/pages/manage/components/TaskMenu.vue
@@ -1,79 +1,11 @@
diff --git a/resources/assets/js/pages/manage/components/TaskRow.vue b/resources/assets/js/pages/manage/components/TaskRow.vue
index 4b30ee6b5..045928ff1 100644
--- a/resources/assets/js/pages/manage/components/TaskRow.vue
+++ b/resources/assets/js/pages/manage/components/TaskRow.vue
@@ -12,7 +12,7 @@
-
{{item.flow_item_name}}
+
{{item.flow_item_name}}
{{$L('子任务')}}
@@ -249,10 +249,10 @@ export default {
}
},
- openMenu(task) {
+ openMenu(event, task) {
const el = this.$refs[`taskMenu_${task.id}`];
if (el) {
- el[0].handleClick()
+ el[0].handleClick(event)
}
},
diff --git a/resources/assets/js/pages/manage/dashboard.vue b/resources/assets/js/pages/manage/dashboard.vue
index dc297fcd5..9d39e37c1 100644
--- a/resources/assets/js/pages/manage/dashboard.vue
+++ b/resources/assets/js/pages/manage/dashboard.vue
@@ -49,14 +49,12 @@
v-if="item.p_name"
class="priority-color"
:style="{backgroundColor:item.p_color}">
-
-
-
-
-
+
+
+
- {{item.flow_item_name}}
+ {{item.flow_item_name}}
{{$L('子任务')}}
@@ -170,11 +168,8 @@ export default {
this.$store.dispatch("openTask", task)
},
- openMenu(type, task) {
- const el = this.$refs[`taskMenu_${type}_${task.id}`];
- if (el) {
- el[0].handleClick()
- }
+ openMenu(event, task) {
+ this.$store.state.taskOperation = {event, task}
},
expiresFormat(date) {
diff --git a/resources/assets/js/store/state.js b/resources/assets/js/store/state.js
index ece6a3499..2e7c1a5c8 100644
--- a/resources/assets/js/store/state.js
+++ b/resources/assets/js/store/state.js
@@ -84,6 +84,7 @@ const stateData = {
taskContents: [],
taskFiles: [],
taskLogs: [],
+ taskOperation: {},
// 任务等待状态
taskLoading: [],
diff --git a/resources/assets/sass/pages/components/_.scss b/resources/assets/sass/pages/components/_.scss
index 61a68d32f..0adaf58cd 100755
--- a/resources/assets/sass/pages/components/_.scss
+++ b/resources/assets/sass/pages/components/_.scss
@@ -17,5 +17,6 @@
@import "task-deleted";
@import "task-detail";
@import "task-menu";
+@import "task-operation";
@import "task-priority";
@import "team-management";
diff --git a/resources/assets/sass/pages/components/task-detail.scss b/resources/assets/sass/pages/components/task-detail.scss
index c431b8587..7322b2d04 100644
--- a/resources/assets/sass/pages/components/task-detail.scss
+++ b/resources/assets/sass/pages/components/task-detail.scss
@@ -25,26 +25,24 @@
height: 1px;
background-color: #f4f5f5;
}
- .icon {
+ .task-menu-icon {
margin-right: 18px;
- .task-menu-icon {
- display: flex;
- align-items: center;
- .ivu-icon {
- font-size: 18px;
- }
- .loading {
- width: 18px;
- height: 18px;
- .common-loading {
- width: 16px;
- height: 16px;
- }
- }
- .uncomplete {
- color: #888888;
+ display: flex;
+ align-items: center;
+ .ivu-icon {
+ font-size: 18px;
+ }
+ .loading {
+ width: 18px;
+ height: 18px;
+ .common-loading {
+ width: 16px;
+ height: 16px;
}
}
+ .uncomplete {
+ color: #888888;
+ }
}
.flow {
display: flex;
diff --git a/resources/assets/sass/pages/components/task-menu.scss b/resources/assets/sass/pages/components/task-menu.scss
index 46b291269..444828759 100644
--- a/resources/assets/sass/pages/components/task-menu.scss
+++ b/resources/assets/sass/pages/components/task-menu.scss
@@ -25,127 +25,3 @@
}
}
}
-
-.task-menu-more-dropdown {
- > li {
- &.task-menu-more-warp {
- list-style: none;
-
- > ul {
- max-height: 320px;
- overflow: auto;
-
- &::-webkit-scrollbar {
- display: none
- }
-
- > li {
- .item {
- display: flex;
- align-items: center;
-
- > i {
- flex-shrink: 0;
- width: 18px;
- height: 18px;
- line-height: 18px;
- font-size: 18px;
- margin-right: 8px;
- padding: 0;
- color: #bbbbbb;
-
- &.ivu-icon {
- font-size: 16px;
- }
- }
- }
-
- .flow {
- padding: 4px 0;
-
- > i {
- margin-right: 3px;
-
- &.check {
- color: $primary-color;
- }
- }
-
- .flow-name {
- border-radius: 4px;
- white-space: nowrap;
- padding: 0 5px;
- height: 20px;
- line-height: 20px;
- font-size: 12px;
- background: #f4f4f4;
- color: #595959;
-
- &.start {
- background-color: rgba($flow-status-start-color, 0.1);
- border-color: rgba($flow-status-start-color, 0.1);
- color: $flow-status-start-color;
- }
- &.progress {
- background-color: rgba($flow-status-progress-color, 0.1);
- border-color: rgba($flow-status-progress-color, 0.1);
- color: $flow-status-progress-color;
- }
- &.test {
- background-color: rgba($flow-status-test-color, 0.1);
- border-color: rgba($flow-status-test-color, 0.1);
- color: $flow-status-test-color;
- }
- &.end {
- background-color: rgba($flow-status-end-color, 0.1);
- border-color: rgba($flow-status-end-color, 0.1);
- color: $flow-status-end-color;
- }
- }
- }
-
- &.load-flow {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 8px;
-
- .load-flow-warp {
- width: 18px;
- height: 18px;
- }
- }
- }
- }
-
- &.medium {
- > ul {
- > li {
- .flow {
- .flow-name {
- height: 24px;
- line-height: 24px;
- padding: 0 7px;
- }
- }
- }
- }
- }
-
- &.large {
- > ul {
- > li {
- .flow {
- .flow-name {
- font-size: 13px;
- height: 30px;
- line-height: 30px;
- padding: 0 8px;
- }
- }
- }
- }
- }
- }
- }
-}
diff --git a/resources/assets/sass/pages/components/task-operation.scss b/resources/assets/sass/pages/components/task-operation.scss
new file mode 100644
index 000000000..be1b2bd6f
--- /dev/null
+++ b/resources/assets/sass/pages/components/task-operation.scss
@@ -0,0 +1,143 @@
+.task-operation-dropdown {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 0;
+ opacity: 0;
+ z-index: -1;
+
+ .task-operation-icon {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ width: 100%;
+ height: 100%;
+ cursor: pointer;
+ }
+}
+
+.task-operation-more-dropdown {
+ > li {
+ &.task-operation-more-warp {
+ list-style: none;
+
+ > ul {
+ max-height: 320px;
+ overflow: auto;
+
+ &::-webkit-scrollbar {
+ display: none
+ }
+
+ > li {
+ .item {
+ display: flex;
+ align-items: center;
+
+ > i {
+ flex-shrink: 0;
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+ font-size: 18px;
+ margin-right: 8px;
+ padding: 0;
+ color: #bbbbbb;
+
+ &.ivu-icon {
+ font-size: 16px;
+ }
+ }
+ }
+
+ .flow {
+ padding: 4px 0;
+
+ > i {
+ margin-right: 3px;
+
+ &.check {
+ color: $primary-color;
+ }
+ }
+
+ .flow-name {
+ border-radius: 4px;
+ white-space: nowrap;
+ padding: 0 5px;
+ height: 20px;
+ line-height: 20px;
+ font-size: 12px;
+ background: #f4f4f4;
+ color: #595959;
+
+ &.start {
+ background-color: rgba($flow-status-start-color, 0.1);
+ border-color: rgba($flow-status-start-color, 0.1);
+ color: $flow-status-start-color;
+ }
+ &.progress {
+ background-color: rgba($flow-status-progress-color, 0.1);
+ border-color: rgba($flow-status-progress-color, 0.1);
+ color: $flow-status-progress-color;
+ }
+ &.test {
+ background-color: rgba($flow-status-test-color, 0.1);
+ border-color: rgba($flow-status-test-color, 0.1);
+ color: $flow-status-test-color;
+ }
+ &.end {
+ background-color: rgba($flow-status-end-color, 0.1);
+ border-color: rgba($flow-status-end-color, 0.1);
+ color: $flow-status-end-color;
+ }
+ }
+ }
+
+ &.load-flow {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 8px;
+
+ .load-flow-warp {
+ width: 18px;
+ height: 18px;
+ }
+ }
+ }
+ }
+
+ &.medium {
+ > ul {
+ > li {
+ .flow {
+ .flow-name {
+ height: 24px;
+ line-height: 24px;
+ padding: 0 7px;
+ }
+ }
+ }
+ }
+ }
+
+ &.large {
+ > ul {
+ > li {
+ .flow {
+ .flow-name {
+ font-size: 13px;
+ height: 30px;
+ line-height: 30px;
+ padding: 0 8px;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/resources/assets/sass/pages/page-dashboard.scss b/resources/assets/sass/pages/page-dashboard.scss
index 8bf27f22d..b9c5d7d78 100644
--- a/resources/assets/sass/pages/page-dashboard.scss
+++ b/resources/assets/sass/pages/page-dashboard.scss
@@ -122,7 +122,7 @@
}
.dashboard-ul {
margin: 0 auto 18px;
- padding: 0 12px;
+ padding: 6px 12px 0;
overflow: hidden;
> li {
position: relative;
@@ -133,9 +133,8 @@
margin-bottom: 8px;
border-radius: 6px;
cursor: pointer;
- transition: transform 0.3s ease-out 0s, box-shadow 0.3s ease-out 0s;
+ transition: box-shadow 0.3s ease-out 0s;
&:hover {
- transform: translateX(-2px);
box-shadow: 0 0 6px #dfdfdf;
}
&.complete {
@@ -155,7 +154,7 @@
height: 12px;
width: 2px;
}
- .el-dropdown {
+ .item-select {
flex-shrink: 0;
width: 22px;
height: 22px;