diff --git a/resources/assets/js/pages/manage/components/TaskAdd.vue b/resources/assets/js/pages/manage/components/TaskAdd.vue index 2dea1b3d5..5016b130f 100644 --- a/resources/assets/js/pages/manage/components/TaskAdd.vue +++ b/resources/assets/js/pages/manage/components/TaskAdd.vue @@ -93,50 +93,53 @@ border/> -
- - {{$L('可见性')}} - - - - -
- - - {{$L('项目人员')}} -
-
- -
- - - {{$L('任务人员')}} -
-
- -
- - - {{$L('指定成员')}} -
-
-
-
+
+ {{ $L('可见性') }} +
-
- {{$L('项目人员可见')}} - {{$L('任务人员可见')}} +
+ {{ addData.visibility_appoint == 1 ? $L('项目人员可见') : $L('任务人员可见') }}
- + border/> + +
+ + +
+ + + {{$L('项目人员')}} +
+
+ +
+ + + {{$L('任务人员')}} +
+
+ +
+ + + {{$L('指定成员')}} +
+
+
+
@@ -559,8 +562,29 @@ export default { this.$emit("input", !this.value) }, - showCisibleDropdown(){ - this.$refs.eDropdownRef.show() + showCisibleDropdown(e){ + let eRect = null + if (e === null) { + eRect = this.$refs.visibilityText?.getBoundingClientRect() + } else { + eRect = e.target.getBoundingClientRect() + } + if (eRect === null) { + return + } + const boxRect = this.$el.getBoundingClientRect() + const refEl = this.$refs.eDropdownRef.$el + refEl.style.top = (eRect.top - boxRect.top) + 'px' + refEl.style.left = (eRect.left - boxRect.left) + 'px' + refEl.style.width = eRect.width + 'px' + refEl.style.height = eRect.height + 'px' + // + if (this.$refs.eDropdownRef.visible) { + this.$refs.eDropdownRef.hide() + } + setTimeout(() => { + this.$refs.eDropdownRef.show() + }, 0) }, visibleUserSelectShowChange(isShow){ diff --git a/resources/assets/sass/pages/components/task-add.scss b/resources/assets/sass/pages/components/task-add.scss index 1046bedea..5a98a3913 100644 --- a/resources/assets/sass/pages/components/task-add.scss +++ b/resources/assets/sass/pages/components/task-add.scss @@ -1,4 +1,5 @@ .task-add { + position: relative; .head { display: flex; align-items: center; @@ -54,6 +55,17 @@ } .task-add-form, .task-add-advanced { + .calculate-dropdown { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + width: 0; + height: 0; + z-index: -1; + pointer-events: none; + } .title { .ivu-input { font-weight: 500;