工作台 右下角数据样式调整

dev-scheduling
姜雪 1 month ago
parent c5fae402b6
commit 1b6164043b
  1. 131
      src/views/wel/components/notice.vue

@ -14,9 +14,7 @@
: item.createTime.substring(0,4) == year ? item.createTime.substring(5,10) : item.createTime.substring(0,10)}}
</div>
</div>
<div class="bottom">
{{item.createUserName}}创建的{{item.content}},等待您的审批
</div>
<div class="bottom">{{item.createUserName}}创建的<span v-if="item.bizType==1">外协审批</span><span v-if="item.bizType==2">内部审批</span><span v-if="item.bizType==3">槽液审批</span>,等待您的审批</div>
</div>
</div>
@ -52,6 +50,8 @@
</template>
<script>
import {getList as getTodoListApi} from '@/api/desk/todoList';
import { getList as getmyMessageApi } from '@/api/desk/myMessage';
import {getList} from '@/api/desk/notice'
import router from '@/router/';
import {dateFormat} from '@/utils/date'
@ -62,74 +62,50 @@ export default {
today:dateFormat(new Date(),"yyyy-MM-dd"),
year:dateFormat(new Date(),"yyyy"),
activeName:"backlog",
backlogData:[
{
id:'1963789019681054722',
title:"审批请求待处理",
content:"张伟提交的转外协申请,等待您的审批",
createTime:"2026-03-06 09:05:05",
},
{
id:'1963789019681054722',
title:"审批请求待处理",
content:"张伟提交的转外协申请,等待您的审批",
createTime:"2026-03-05 09:05:05",
},
{
id:'1963789019681054722',
title:"审批请求待处理",
content:"张伟提交的转外协申请,等待您的审批",
createTime:"2024-03-05 09:05:05",
},
],
backlogData:[ ],
noticeArr:[
{
"id": "1963789019681054722",
"createUser": "1123598821738675201",
"createDept": "1123598813738675201",
"createTime": "2025-09-05 10:19:22",
"updateUser": "1123598821738675201",
"updateTime": "2025-09-05 10:19:22",
"status": 1,
"isDeleted": 0,
"tenantId": "000000",
"title": "2025年国庆节放假通知",
"category": 1,
"releaseTime": "2025-09-17 00:00:00",
"content": "<p><strong>2025年国庆节放假通知</strong></p><p>2025年国庆节放假为10月1日至10月8日</p>",
"categoryName": "发布通知"
},
{
"id": "1963789019681054723",
"createUser": "1123598821738675201",
"createDept": "1123598813738675201",
"createTime": "2025-09-05 10:19:22",
"updateUser": "1123598821738675201",
"updateTime": "2025-09-05 10:19:22",
"status": 1,
"isDeleted": 0,
"tenantId": "000000",
"title": "工艺任务待分派,请尽快处理!",
"category": 7,
"releaseTime": "2025-09-17 00:00:00",
"content": "<p><strong>工艺任务待分派</strong></p><p>零件号为21E6-575-12846_001-B1的相关工艺任务待分派,请尽快处理!</p>",
"categoryName": "消息通知"
},
],
backlogLength:0
backlogLength:0,
bizTypeList: [
{ label: '外协审批', value: 1 },
{ label: '仓管审批', value: 2 },
{ label: '槽液审批', value: 3 }
]
}
},
mounted(){
this.getTodoList()
this.getMessageList()
},
methods:{
handleClick(tab) {
console.log('handleClick被触发', tab);
console.log('tab.props.name:', tab.props.name);
if (tab.props.name === 'notice') {
this.getMessageList();
}
},
getTodoList(){
getMyTodoList({
current:1,
size:10
}).then(res =>{
getTodoListApi(1, 10, {}).then(res =>{
console.log(1111111111,res);
this.backlogData = res.data.data.records.length > 3 ? res.data.data.records.slice(0,3) :res.data.data.records
this.backlogLength = res.data.data.total
})
// getMyTodoList({
// current:1,
// size:10
// }).then(res =>{
// this.backlogData = res.data.data.records.length > 3 ? res.data.data.records.slice(0,3) :res.data.data.records
// this.backlogLength = res.data.data.total
// })
},
getMessageList(){
console.log(1111111111,'获取消息通知');
getmyMessageApi(1, 10, {}).then(res =>{
console.log(1111111111,res);
this.noticeArr = res.data.data.records.length > 3 ? res.data.data.records.slice(0,3) :res.data.data.records
})
},
getData(){
@ -149,6 +125,10 @@ export default {
}else{
this.$router.push('/desk/myMessage');
}
},
getBizTypeLabel(bizType) {
const item = this.bizTypeList.find(i => i.value === bizType);
return item ? item.label : bizType;
}
}
}
@ -156,16 +136,17 @@ export default {
<style lang="scss" scoped>
.notice_box{
padding: 20px;
padding: clamp(8px, 1.5vw, 20px);
height: 100%;
// background: red;
overflow-y: auto;
font-size: clamp(12px, 0.9vw, 14px);
.title_box{
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #eee;
padding-bottom: 10px;
// border-bottom: 1px solid #eee;
// padding-bottom: 10px;
.title{
font-weight: 550;
@ -174,6 +155,14 @@ export default {
::v-deep .el-tabs__nav-wrap::after{
height: 1px !important;
}
::v-deep .el-tabs__content{
overflow-y: visible !important;
height: auto !important;
}
::v-deep .el-tab-pane{
overflow-y: visible !important;
height: auto !important;
}
.back_box{
padding: 0 10px;
@ -197,7 +186,7 @@ export default {
}
}
.bottom{
margin: 10px 0;
margin: 3px 0;
color: #4B5563;
width: 100%;
white-space: nowrap;
@ -208,12 +197,10 @@ export default {
}
.el-button{
width: 280px;
height: 36px;
margin-left: 15px;
// margin-top: 20px;
position: fixed;
bottom: 35px;
width: 100%;
margin: clamp(10px, 1.5vw, 15px) clamp(5px, 1vw, 10px) clamp(15px, 2vw, 20px) clamp(5px, 1vw, 10px);
display: block;
font-size: clamp(12px, 1vw, 14px);
}
.notice_data{

Loading…
Cancel
Save