图标,工作待办

This commit is contained in:
zjf committed 2025-07-02 18:19:08 +08:00
1 parent 153b0ea762
commit a186a8bc32
13 files changed
+400 -30

No files matched your search

+7
View File
@@ -528,6 +528,13 @@
"style": {
"navigationBarTitleText": "预约详情"
}
},
{
"path": "todo/index",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "工作待办"
}
}
]
}
+69 -23
View File
@@ -1,14 +1,19 @@
<template>
<div class="service-container">
<div class="service-grid">
<div
v-for="item in services"
:key="item.name"
class="service-item"
@click="goPage(item)"
>
<image :src="item.icon" class="service-icon" />
<div class="service-label">{{ item.label }}</div>
<div class="integrated-title-card">
<div class="integrated-title">综合服务</div>
</div>
<div class="service-container-card">
<div class="service-container">
<div class="service-grid">
<div
v-for="item in services"
:key="item.name"
class="service-item"
@click="goPage(item)"
>
<image :src="item.icon" class="service-icon" />
<div class="service-label">{{ item.label }}</div>
</div>
</div>
</div>
</div>
@@ -16,40 +21,46 @@
<script setup lang="ts">
const services = [
{
name: 'todo',
label: '工作待办',
icon: '/src/static/icon/todo.png',
url: '/pages/integrated/todo/index'
},
{
name: 'meeting-booking',
label: '会议预定',
icon: '/static/service/meeting-booking.png',
icon: '/src/static/icon/meeting-booking.png',
url: '/pages/integrated/meeting/index'
},
{
name: 'lost-and-found',
label: '失物招领',
icon: '/static/service/lost-and-found.png',
icon: '/src/static/icon/lost-and-found.png',
url: '/pages/integrated/lostAndFound/index'
},
{
name: 'feedback',
label: '意见反馈',
icon: '/static/service/feedback.png',
icon: '/src/static/icon/feedback.png',
url: '/pages/integrated/feedback/index'
},
{
name: 'repair-report',
label: '维修上报',
icon: '/static/service/repair-report.png',
icon: '/src/static/icon/repair-report.png',
url: '/pages/integrated/repair/index'
},
{
name: 'notice',
label: '通知公告',
icon: '/static/service/notice.png',
icon: '/src/static/icon/notice.png',
url: '/pages/integrated/notice/index'
},
{
name: 'visitor',
label: '访客管理',
icon: '/static/service/visitor.png',
icon: '/src/static/icon/visitor.png',
url: '/pages/integrated/visitor/index'
}
]
@@ -62,9 +73,31 @@ function goPage(item) {
</script>
<style scoped lang="less">
.service-container {
padding: 24rpx 0;
.integrated-title-card {
background: #fff;
border-radius: 20rpx;
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.06);
margin: 32rpx 24rpx 0 24rpx;
padding: 0 0 8rpx 0;
}
.integrated-title {
font-size: 38rpx;
font-weight: bold;
color: #222;
text-align: center;
padding: 36rpx 0 24rpx 0;
letter-spacing: 2rpx;
}
.service-container-card {
background: #fff;
border-radius: 24rpx;
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.06);
margin: 24rpx;
padding-bottom: 32rpx;
}
.service-container {
padding: 32rpx 0 0 0;
background: transparent;
border-radius: 16rpx;
}
.service-grid {
@@ -75,19 +108,32 @@ function goPage(item) {
}
.service-item {
width: 25%;
margin-bottom: 32rpx;
margin-bottom: 40rpx;
display: flex;
flex-direction: column;
align-items: center;
transition: transform 0.2s;
}
.service-item:hover {
transform: translateY(-6rpx) scale(1.06);
box-shadow: 0 2rpx 12rpx rgba(25,118,210,0.08);
}
.service-icon {
width: 88rpx;
height: 88rpx;
margin-bottom: 12rpx;
width: 92rpx;
height: 92rpx;
margin-bottom: 14rpx;
border-radius: 16rpx;
background: #f5f7fa;
box-shadow: 0 2rpx 8rpx rgba(25,118,210,0.04);
transition: box-shadow 0.2s;
}
.service-label {
font-size: 26rpx;
font-size: 28rpx;
color: #333;
text-align: center;
letter-spacing: 1rpx;
}
body {
background: #f5f6fa;
}
</style>
+12 -7
View File
@@ -3,7 +3,7 @@
<!-- 顶部自定义导航栏 -->
<view class="custom-nav">
<view class="nav-back" @tap="goBack">
<text class="back-arrow">←</text>
<text class="iconfont icon-fanhui"></text> 返回
</view>
<view class="nav-title">预定会议室</view>
</view>
@@ -90,6 +90,7 @@ function goDetail(room) {
</script>
<style lang="less" scoped>
@import url('//at.alicdn.com/t/font_1234567_lingdang.css'); /* 替换为你的iconfont地址 */
.container {
min-height: 100vh;
background: #f5f6fa;
@@ -108,16 +109,20 @@ function goDetail(room) {
z-index: 100;
}
.nav-back {
width: 60rpx;
padding-left: 24rpx;
padding-top: 12rpx;
width: auto;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-start;
font-size: 30rpx;
color: #1976d2;
cursor: pointer;
}
.back-arrow {
color: #333;
font-size: 40rpx;
font-weight: bold;
.nav-back .iconfont {
font-size: 36rpx;
margin-right: 8rpx;
}
.nav-title {
flex: 1;
+29
View File
@@ -1,4 +1,9 @@
<template>
<view class="notice-header">
<view class="back-btn" @click="goBack">
<text class="iconfont icon-fanhui"></text> 返回
</view>
</view>
<view class="notice-container">
<view class="notice-list">
<view v-if="noticeList.length === 0" class="empty-tip">
@@ -85,6 +90,10 @@ function loadMore() {
loadNoticeList()
}
function goBack() {
uni.navigateBack()
}
onMounted(() => {
loadNoticeList(true)
})
@@ -92,6 +101,26 @@ onMounted(() => {
<style lang="scss" scoped>
@import url('//at.alicdn.com/t/font_1234567_lingdang.css'); /* 替换为你的iconfont地址 */
.notice-header {
display: flex;
align-items: center;
height: 88rpx;
background: #fff;
padding-left: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
margin-bottom: 16rpx;
}
.back-btn {
display: flex;
align-items: center;
font-size: 30rpx;
color: #1976d2;
cursor: pointer;
}
.back-btn .iconfont {
font-size: 36rpx;
margin-right: 8rpx;
}
.notice-container {
background: #f5f5f5;
min-height: 100vh;
+283
View File
@@ -0,0 +1,283 @@
<template>
<view class="todo-page">
<view class="todo-header">
<view class="back-btn" @click="goBack">
<text class="iconfont icon-fanhui"></text>
</view>
<view class="todo-title">工作待办</view>
</view>
<view class="todo-tabs">
<view :class="['tab-item', activeTab === 0 ? 'active' : '']" @click="switchTab(0)">工作待办</view>
<view :class="['tab-item', activeTab === 1 ? 'active' : '']" @click="switchTab(1)">我的已办</view>
</view>
<view class="todo-list">
<view v-if="todoList.length === 0 && !loading" class="todo-empty">
<image src="../../../static/icon/empty-todo.png" class="empty-img" />
<view class="empty-text">暂无数据</view>
</view>
<view v-else>
<view v-for="item in todoList" :key="item.taskId || item.id" class="todo-card">
<view class="card-bar"></view>
<view class="todo-card-content">
<view class="todo-card-title">
<text class="group">{{ item.groupName }}</text>
<text class="process">{{ item.processName }}</text>
</view>
<view class="todo-card-info">
<view class="info-row">
<text class="label">发起人:</text>
<text class="value">{{ item.rootUserName }}</text>
</view>
<view class="info-row">
<text class="label">发起时间:</text>
<text class="value">{{ item.startTime }}</text>
</view>
</view>
<view class="todo-card-actions">
<button v-if="activeTab === 0" class="todo-btn refuse">拒绝</button>
<button v-if="activeTab === 0" class="todo-btn agree">同意</button>
</view>
</view>
</view>
<view v-if="loading" class="loading-tip">加载中...</view>
<view v-else-if="finished" class="no-more-tip">没有更多了</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
import integratedApi from '@/sheep/api/integrated'
const todoList = ref<any[]>([])
const current = ref(1)
const size = 10
const total = ref(0)
const loading = ref(false)
const finished = ref(false)
const activeTab = ref(0)
function fetchTodoList(isRefresh = false) {
if (loading.value) return
loading.value = true
const apiFn = activeTab.value === 0 ? integratedApi.getTodoList : integratedApi.getDoneList
apiFn({ current: current.value, size }).then((res: any) => {
if (res.code === 0 && res.data) {
total.value = res.data.total || 0
const records = res.data.records || []
if (isRefresh) {
todoList.value = records
} else {
todoList.value = [...todoList.value, ...records]
}
finished.value = todoList.value.length >= total.value
}
loading.value = false
if (isRefresh) uni.stopPullDownRefresh()
}).catch(() => {
loading.value = false
if (isRefresh) uni.stopPullDownRefresh()
})
}
function switchTab(tabIdx: number) {
if (activeTab.value === tabIdx) return
activeTab.value = tabIdx
current.value = 1
finished.value = false
fetchTodoList(true)
}
function goBack() {
uni.navigateBack()
}
onMounted(() => {
fetchTodoList(true)
})
onPullDownRefresh(() => {
current.value = 1
finished.value = false
fetchTodoList(true)
})
onReachBottom(() => {
if (finished.value || loading.value) return
current.value += 1
fetchTodoList()
})
</script>
<style scoped lang="less">
.todo-page {
background: linear-gradient(180deg, #f5f7fa 60%, #e3eafc 100%);
min-height: 100vh;
}
.todo-header {
display: flex;
align-items: center;
height: 96rpx;
background: #fff;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
border-radius: 0 0 24rpx 24rpx;
position: sticky;
top: 0;
z-index: 10;
}
.back-btn {
width: 80rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
color: #1976d2;
cursor: pointer;
}
.todo-title {
flex: 1;
text-align: center;
font-size: 36rpx;
font-weight: bold;
color: #222;
letter-spacing: 2rpx;
}
.todo-tabs {
display: flex;
justify-content: center;
align-items: center;
background: #fff;
border-radius: 0 0 20rpx 20rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.03);
margin-bottom: 12rpx;
position: sticky;
top: 96rpx;
z-index: 9;
}
.tab-item {
flex: 1;
text-align: center;
font-size: 30rpx;
color: #888;
padding: 24rpx 0 18rpx 0;
font-weight: 500;
cursor: pointer;
transition: color 0.2s, border 0.2s;
border-bottom: 4rpx solid transparent;
}
.tab-item.active {
color: #1976d2;
border-bottom: 4rpx solid #1976d2;
background: linear-gradient(90deg, #e3eafc 0%, #fff 100%);
}
.todo-list {
padding: 32rpx 24rpx 0 24rpx;
}
.todo-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #bbb;
font-size: 32rpx;
padding: 120rpx 0 60rpx 0;
}
.empty-img {
width: 160rpx;
height: 160rpx;
margin-bottom: 32rpx;
opacity: 0.8;
}
.empty-text {
font-size: 32rpx;
color: #bbb;
margin-top: 8rpx;
}
.todo-card {
display: flex;
background: #fff;
border-radius: 16rpx;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 16rpx rgba(25,118,210,0.08);
overflow: hidden;
position: relative;
min-height: 120rpx;
}
.card-bar {
width: 12rpx;
background: linear-gradient(180deg, #1976d2 0%, #42a5f5 100%);
border-radius: 0 12rpx 12rpx 0;
}
.todo-card-content {
flex: 1;
padding: 16rpx 20rpx 36rpx 20rpx;
display: flex;
flex-direction: column;
position: relative;
}
.todo-card-title {
display: flex;
align-items: baseline;
gap: 12rpx;
margin-bottom: 4rpx;
}
.group {
font-size: 24rpx;
color: #1976d2;
font-weight: 500;
}
.process {
font-size: 26rpx;
color: #222;
font-weight: bold;
margin-top: 0;
}
.todo-card-info {
margin-bottom: 4rpx;
}
.info-row {
display: flex;
margin-bottom: 2rpx;
}
.label {
color: #888;
font-size: 24rpx;
min-width: 80rpx;
}
.value {
color: #333;
font-size: 24rpx;
}
.todo-card-actions {
position: absolute;
right: 20rpx;
bottom: 16rpx;
display: flex;
gap: 16rpx;
}
.todo-btn {
font-size: 24rpx;
padding: 6rpx 28rpx;
border-radius: 20rpx;
border: none;
cursor: pointer;
transition: background 0.2s, box-shadow 0.2s;
box-shadow: 0 2rpx 8rpx rgba(25,118,210,0.08);
}
.todo-btn.refuse {
background: linear-gradient(90deg, #f5f5f5 60%, #fbe9e7 100%);
color: #f44336;
}
.todo-btn.agree {
background: linear-gradient(90deg, #1976d2 60%, #42a5f5 100%);
color: #fff;
}
.loading-tip, .no-more-tip {
text-align: center;
color: #bbb;
font-size: 28rpx;
padding: 40rpx 0 0 0;
}
</style>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB