chore: 页面优化
This commit is contained in:
parent
72d82ac94b
commit
fc43527cf1
@ -1,7 +1,6 @@
|
|||||||
<!-- eslint-disable no-use-before-define -->
|
<!-- eslint-disable no-use-before-define -->
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { User } from '#/api/system/user/model';
|
import type { User } from '#/api/system/user/model';
|
||||||
import type { FlowInfoResponse } from '#/api/workflow/instance/model';
|
|
||||||
import type { TaskInfo } from '#/api/workflow/task/model';
|
import type { TaskInfo } from '#/api/workflow/task/model';
|
||||||
|
|
||||||
import { computed, onMounted, ref, useTemplateRef } from 'vue';
|
import { computed, onMounted, ref, useTemplateRef } from 'vue';
|
||||||
@ -19,12 +18,12 @@ import {
|
|||||||
InputSearch,
|
InputSearch,
|
||||||
Popover,
|
Popover,
|
||||||
Spin,
|
Spin,
|
||||||
|
Tooltip,
|
||||||
TreeSelect,
|
TreeSelect,
|
||||||
} from 'ant-design-vue';
|
} from 'ant-design-vue';
|
||||||
import { cloneDeep, debounce } from 'lodash-es';
|
import { cloneDeep, debounce } from 'lodash-es';
|
||||||
|
|
||||||
import { categoryTree } from '#/api/workflow/category';
|
import { categoryTree } from '#/api/workflow/category';
|
||||||
import { flowInfo } from '#/api/workflow/instance';
|
|
||||||
import { pageByTaskWait } from '#/api/workflow/task';
|
import { pageByTaskWait } from '#/api/workflow/task';
|
||||||
|
|
||||||
import { ApprovalCard, ApprovalPanel, CopyComponent } from '../components';
|
import { ApprovalCard, ApprovalPanel, CopyComponent } from '../components';
|
||||||
@ -119,12 +118,10 @@ const handleScroll = debounce(async (e: Event) => {
|
|||||||
}
|
}
|
||||||
}, 200);
|
}, 200);
|
||||||
|
|
||||||
const currentInstance = ref<FlowInfoResponse>();
|
|
||||||
|
|
||||||
const lastSelectId = ref('');
|
const lastSelectId = ref('');
|
||||||
const currentTask = ref<TaskInfo>();
|
const currentTask = ref<TaskInfo>();
|
||||||
async function handleCardClick(item: TaskInfo) {
|
async function handleCardClick(item: TaskInfo) {
|
||||||
const { id, businessId } = item;
|
const { id } = item;
|
||||||
// 点击的是同一个
|
// 点击的是同一个
|
||||||
if (lastSelectId.value === id) {
|
if (lastSelectId.value === id) {
|
||||||
return;
|
return;
|
||||||
@ -135,9 +132,6 @@ async function handleCardClick(item: TaskInfo) {
|
|||||||
item.active = item.id === id;
|
item.active = item.id === id;
|
||||||
});
|
});
|
||||||
lastSelectId.value = id;
|
lastSelectId.value = id;
|
||||||
|
|
||||||
const resp = await flowInfo(businessId);
|
|
||||||
currentInstance.value = resp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { refreshTab } = useTabs();
|
const { refreshTab } = useTabs();
|
||||||
@ -176,9 +170,11 @@ onMounted(async () => {
|
|||||||
placeholder="流程名称搜索"
|
placeholder="流程名称搜索"
|
||||||
@search="reload(false)"
|
@search="reload(false)"
|
||||||
/>
|
/>
|
||||||
<a-button @click="reload(true)">
|
<Tooltip placement="top" title="重置">
|
||||||
<RedoOutlined />
|
<a-button @click="reload(true)">
|
||||||
</a-button>
|
<RedoOutlined />
|
||||||
|
</a-button>
|
||||||
|
</Tooltip>
|
||||||
<Popover
|
<Popover
|
||||||
v-model:open="popoverOpen"
|
v-model:open="popoverOpen"
|
||||||
:get-popup-container="getPopupContainer"
|
:get-popup-container="getPopupContainer"
|
||||||
|
Loading…
Reference in New Issue
Block a user