From d8d68a0aee93073b5ec3195368ca0ed1076f66a2 Mon Sep 17 00:00:00 2001 From: 董国庆 <364620639@qq.com> Date: 星期三, 25 六月 2025 17:58:08 +0800 Subject: [PATCH] 对接评定接口和中台待办事项 --- laboratory/src/views/middleground/index.vue | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/laboratory/src/views/middleground/index.vue b/laboratory/src/views/middleground/index.vue index deae445..584e9f7 100644 --- a/laboratory/src/views/middleground/index.vue +++ b/laboratory/src/views/middleground/index.vue @@ -40,20 +40,20 @@ <div class="title">待办事项</div> <!-- 待办事项列表将放置在这里 --> <div class="todo-list"> - <div class="todo-item" v-for="i in 6" :key="i"> + <div class="todo-item" v-for="(item,index) in list" :key="index" @click.stop="toDetail(item)"> <div class="todo-details"> <div class="notice-card"> <div class="todo-icon"></div> - <div class="red-notice"></div> + <div class="red-notice" v-if="item.isRead==0"></div> </div> - <span class="todo-title">您有 [1] 条 【项目课题方案】 等待审批</span> + <span class="todo-title" :title="item.content || ''">{{item.content||''}}</span> </div> <div class="todo-meta"> <div class="me"></div> - <span class="todo-submitter">提交人: 王晓晓</span> + <span class="todo-submitter">提交人: {{item.commitName||''}}</span> <div class="time"></div> - <span class="todo-submitter">2023.12.10 08:00</span> + <span class="todo-submitter">{{item.commitTime||''}}</span> </div> </div> </div> @@ -64,7 +64,7 @@ </template> <script> import { Calendar } from "ant-design-vue"; -import { loginReq } from "./service"; +import { getList,read } from "./service"; import HeaderNav from "../../layouts/components/HeaderNav.vue"; import zhCN from "ant-design-vue/lib/locale-provider/zh_CN"; // 引入 Element UI 的日历组件 @@ -88,6 +88,7 @@ date: new Date(), viewWidth: "", scale: 1, + list:[], // 审批人 moduleList2: [ { @@ -225,6 +226,11 @@ created() { // 初始化时检查窗口大小 this.handleResize(); + getList().then(res=>{ + console.log('22222222',res) + this.list = res + + }) }, mounted() { // 监听窗口大小变化 @@ -249,6 +255,14 @@ }); } }, + toDetail(item){ + console.log('item item',item) + read({id:item.id}).then(res=>{ + console.log('res',res) + + }) + + } }, computed: { currentModuleList() { @@ -975,6 +989,7 @@ .todo-list { flex: 1; height: 100%; + max-height: 264px; overflow: auto; } @@ -1026,11 +1041,18 @@ font-size: 14px; color: #303133; line-height: 24px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 400px; + cursor: pointer; } .todo-meta { display: flex; align-items: center; + justify-content: space-between; + min-width:260px; } .time { -- Gitblit v1.7.1