<template>
|
<div class="home-container">
|
<div class="left-card">
|
<div class="card">
|
<h2 class="card-title">我的待办</h2>
|
<div class="card-content">
|
<!-- 嵌入FlowTodo组件并设置默认分类 -->
|
<todo-list
|
ref="flowTodo"
|
class="embedded-flow-todo"
|
:defaultCategories="['drApproval','ggApproval','programConfirmApproval']"
|
></todo-list>
|
</div>
|
</div>
|
</div>
|
|
<!-- 右侧两个小卡片 -->
|
<div class="right-cards">
|
<div class="card top-card">
|
<h2 class="card-title">卡片1</h2>
|
<div class="card-content">
|
</div>
|
</div>
|
|
<div class="card bottom-card">
|
<h2 class="card-title">派工任务领取</h2>
|
<div class="card-content">
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import signageApi from '@api/signage'
|
import moment from 'moment'
|
import TodoList from '@views/dashboard/dncIndex/TodoList.vue'
|
|
export default {
|
name: 'DncManagerSignage',
|
components: {
|
TodoList
|
},
|
data() {
|
return {
|
}
|
},
|
mounted() {
|
// 确保组件加载后使用默认分类查询数据
|
this.$nextTick(() => {
|
if (this.$refs.flowTodo) {
|
this.$refs.flowTodo.loadData(1)
|
}
|
})
|
},
|
methods: {
|
|
}
|
}
|
</script>
|
|
<style scoped>
|
.left-card .card-content {
|
padding: 5px 0;
|
}
|
.home-container {
|
display: flex;
|
min-height: 100vh;
|
padding: 20px;
|
box-sizing: border-box;
|
gap: 20px;
|
background-color: #f5f7fa;
|
}
|
|
.left-card {
|
flex: 1;
|
min-width: 0;
|
}
|
|
.right-cards {
|
flex: 2;
|
min-width: 0;
|
display: flex;
|
flex-direction: column;
|
gap: 20px;
|
}
|
|
.card {
|
background: #ffffff;
|
border-radius: 8px;
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
padding: 10px;
|
height: 100%;
|
display: flex;
|
flex-direction: column;
|
overflow: hidden;
|
}
|
|
.top-card {
|
flex: 1;
|
}
|
|
.bottom-card {
|
flex: 1;
|
}
|
|
.card-title {
|
margin: 0 0 15px 0;
|
color: #333;
|
font-size: 18px;
|
font-weight: 600;
|
padding-bottom: 10px;
|
border-bottom: 1px solid #eee;
|
}
|
|
.card-content {
|
flex: 1;
|
overflow: auto;
|
}
|
|
@media (max-width: 992px) {
|
.home-container {
|
flex-direction: column;
|
}
|
|
.left-card, .right-cards {
|
width: 100%;
|
}
|
|
.left-card {
|
margin-bottom: 20px;
|
}
|
}
|
</style>
|