68 lines
1.5 KiB
Vue
68 lines
1.5 KiB
Vue
<template>
|
|
<div class="page">
|
|
<div class="ele-body">
|
|
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
|
<a-tabs
|
|
type="card"
|
|
tabPosition="top"
|
|
v-model:activeKey="activeKey"
|
|
@change="query"
|
|
>
|
|
<a-tab-pane
|
|
v-for="(item, index) in data"
|
|
:key="index"
|
|
:tab="`${item.tab}(${item.count})`"
|
|
>
|
|
<list :data="item" />
|
|
</a-tab-pane>
|
|
</a-tabs>
|
|
</a-card>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { computed, ref } from 'vue';
|
|
import List from './list.vue';
|
|
import { getCount } from '@/api/oa/task';
|
|
import { TabsParam } from '@/api/tabs';
|
|
import { useUserStore } from '@/store/modules/user';
|
|
|
|
// 加载状态
|
|
const loading = ref(true);
|
|
|
|
// 当前选项卡
|
|
const activeKey = ref(0);
|
|
|
|
// 获取字典数据
|
|
const data = ref<TabsParam | null>(null);
|
|
|
|
/* 查询 */
|
|
const query = () => {
|
|
loading.value = true;
|
|
const userStore = useUserStore();
|
|
const loginUser = computed(() => userStore.info ?? {});
|
|
getCount({ userId: loginUser.value.userId }).then((result) => {
|
|
data.value = result;
|
|
});
|
|
};
|
|
|
|
query();
|
|
</script>
|
|
|
|
<script lang="ts">
|
|
export default {
|
|
name: 'Task'
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.sys-organization-list {
|
|
padding: 12px 6px;
|
|
height: calc(100vh - 242px);
|
|
border-width: 1px;
|
|
border-style: solid;
|
|
overflow: auto;
|
|
}
|
|
</style>
|