mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
feat: 优化导出菜单交互
This commit is contained in:
parent
d30b38d4b9
commit
e10e2c27c1
@ -75,25 +75,15 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="card.system.value === 'exportManage' && !sortingMode">
|
<template v-if="card.system.value === 'exportManage' && !sortingMode">
|
||||||
<EPopover
|
<div
|
||||||
v-model="exportPopoverShow"
|
class="apply-item"
|
||||||
trigger="click"
|
:class="{'is-sorting': sortingMode}"
|
||||||
placement="bottom"
|
@click="openExportMenu">
|
||||||
popperClass="apply-export-popover"
|
<div class="logo">
|
||||||
:transfer="true">
|
<div class="apply-icon no-dark-content" :class="getLogoClass(card.system.value)"></div>
|
||||||
<div slot="reference" class="apply-item" :class="{'is-sorting': sortingMode}">
|
|
||||||
<div class="logo">
|
|
||||||
<div class="apply-icon no-dark-content" :class="getLogoClass(card.system.value)"></div>
|
|
||||||
</div>
|
|
||||||
<p>{{ $L(card.system.label) }}</p>
|
|
||||||
</div>
|
</div>
|
||||||
<ul class="apply-export-menu">
|
<p>{{ $L(card.system.label) }}</p>
|
||||||
<li @click="handleExport('task')">{{ $L('导出任务统计') }}</li>
|
</div>
|
||||||
<li @click="handleExport('overdue')">{{ $L('导出超期任务') }}</li>
|
|
||||||
<li @click="handleExport('approve')">{{ $L('导出审批数据') }}</li>
|
|
||||||
<li @click="handleExport('checkin')">{{ $L('导出签到数据') }}</li>
|
|
||||||
</ul>
|
|
||||||
</EPopover>
|
|
||||||
</template>
|
</template>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
@ -387,8 +377,6 @@ export default {
|
|||||||
//
|
//
|
||||||
appPushShow: false,
|
appPushShow: false,
|
||||||
//
|
//
|
||||||
exportPopoverShow: false,
|
|
||||||
//
|
|
||||||
scanLoginShow: false,
|
scanLoginShow: false,
|
||||||
scanLoginLoad: false,
|
scanLoginLoad: false,
|
||||||
scanLoginCode: '',
|
scanLoginCode: '',
|
||||||
@ -741,6 +729,32 @@ export default {
|
|||||||
}
|
}
|
||||||
this.applyClick(card.system, params);
|
this.applyClick(card.system, params);
|
||||||
},
|
},
|
||||||
|
openExportMenu({currentTarget: target} = {}) {
|
||||||
|
if (this.sortingMode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (target && typeof target.stopPropagation === 'function') {
|
||||||
|
target.stopPropagation();
|
||||||
|
}
|
||||||
|
const reference = target && target.target ? target.target : target;
|
||||||
|
const menuEvent = target && target.target ? target : (reference ? {target: reference} : target);
|
||||||
|
const list = [
|
||||||
|
{label: this.$L('导出任务统计'), value: 'task'},
|
||||||
|
{label: this.$L('导出超期任务'), value: 'overdue'},
|
||||||
|
{label: this.$L('导出审批数据'), value: 'approve'},
|
||||||
|
{label: this.$L('导出签到数据'), value: 'checkin'},
|
||||||
|
];
|
||||||
|
this.$store.commit('menu/operation', {
|
||||||
|
event: menuEvent,
|
||||||
|
list,
|
||||||
|
size: 'large',
|
||||||
|
onUpdate: (type) => {
|
||||||
|
if (type) {
|
||||||
|
this.handleExport(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
normalizeWebhookEvents(events = [], useFallback = false) {
|
normalizeWebhookEvents(events = [], useFallback = false) {
|
||||||
if (!Array.isArray(events)) {
|
if (!Array.isArray(events)) {
|
||||||
events = events ? [events] : [];
|
events = events ? [events] : [];
|
||||||
@ -847,7 +861,6 @@ export default {
|
|||||||
this.$emit("on-click", item.value, params);
|
this.$emit("on-click", item.value, params);
|
||||||
},
|
},
|
||||||
handleExport(type) {
|
handleExport(type) {
|
||||||
this.exportPopoverShow = false;
|
|
||||||
emitter.emit('openManageExport', type);
|
emitter.emit('openManageExport', type);
|
||||||
},
|
},
|
||||||
// 获取我的机器人
|
// 获取我的机器人
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user