fix: 桌面客户端任务独立窗口无法操作任务状态的问题

This commit is contained in:
kuaifan 2022-06-09 11:05:02 +08:00
parent e161912496
commit f05914f2a1
3 changed files with 27 additions and 10 deletions

View File

@ -3,11 +3,26 @@
<keep-alive>
<router-view class="child-view"></router-view>
</keep-alive>
<!--任务操作-->
<TaskOperation/>
<!--右下角加载提示-->
<Spinner/>
<!--右下角客户端-->
<RightBottom/>
<!--网络提示-->
<NetworkException/>
<!--图片预览-->
<PreviewImageState/>
<!--音频播放-->
<AudioManager/>
<!--Manifest-->
<iframe v-if="manifestUrl" v-show="false" :src="manifestUrl"></iframe>
</div>
</template>
@ -27,10 +42,11 @@ import RightBottom from "./components/RightBottom";
import PreviewImageState from "./components/PreviewImage/state";
import NetworkException from "./components/NetworkException";
import AudioManager from "./components/AudioManager";
import TaskOperation from "./pages/manage/components/TaskOperation";
import {mapState} from "vuex";
export default {
components: {AudioManager, NetworkException, PreviewImageState, RightBottom, Spinner},
components: {TaskOperation, AudioManager, NetworkException, PreviewImageState, RightBottom, Spinner},
data() {
return {

View File

@ -310,9 +310,6 @@
</div>
</Modal>
<!--任务操作-->
<TaskOperation/>
<!--任务详情-->
<TaskModal ref="taskModal"/>
@ -382,11 +379,9 @@ import TaskModal from "./manage/components/TaskModal";
import notificationKoro from "notification-koro1";
import {Store} from "le5le-store";
import ManageLoad from "../components/ManageLoad";
import TaskOperation from "./manage/components/TaskOperation";
export default {
components: {
TaskOperation,
ManageLoad,
TaskModal,
DialogModal,
@ -461,10 +456,6 @@ export default {
$A.messageSuccess("清除成功");
}
//
this.loadUser();
this.$store.dispatch("getTaskPriority").catch(_ => {})
//
this.getReportUnread(0);
this.notificationInit();
this.onVisibilityChange();
//
@ -474,6 +465,12 @@ export default {
document.addEventListener('keydown', this.shortcutEvent);
},
activated() {
this.loadUser();
this.getReportUnread(0);
this.$store.dispatch("getTaskPriority").catch(_ => {})
},
beforeDestroy() {
if (this.addTaskSubscribe) {
this.addTaskSubscribe.unsubscribe();

View File

@ -124,6 +124,10 @@ export default {
watch: {
taskOperation(data) {
if (data.event && data.task) {
if (this.$refs.dropdown.visible && this.element === data.event.target) {
this.hide();
return;
}
const eventRect = data.event.target.getBoundingClientRect();
this.styles = {
left: `${eventRect.left}px`,