单据、业务中心、公告和工作通知

This commit is contained in:
2026-09-24 14:24:08 +08:00
parent 5e77d4fdb1
commit 892acc6d23
4 changed files with 80 additions and 60 deletions
+24 -26
View File
@@ -1,36 +1,33 @@
<template>
<view class="page">
<view class="page edge">
<fy-header title="工作通知" back />
<fy-scroll class="edge-scroll" @refresh="load">
<view class="bar">
<text>审批 · 协同 · 投标 · 用章 · 公告</text>
<text class="badge">{{ items.length }} 项待办</text>
<text class="count">{{ items.length }} 项待办</text>
</view>
<view v-if="!items.length" class="empty">暂无待办通知</view>
<wd-status-tip v-if="!items.length" image="content" tip="暂无待办通知" />
<view v-for="t in items" :key="t.no || t.id" class="card item" @click="open(t)">
<view class="stripe" />
<view class="body">
<view class="top">
<text class="kind">{{ t.typeLabel || t.tag || t.type || '待办' }}</text>
<text class="time">{{ t.createdAt || t.time || '' }}</text>
</view>
<view class="main">
<text class="type">{{ t.typeLabel || t.tag || t.type || '待办' }}</text>
<text class="title">{{ t.title || t.summary || t.no }}</text>
<text class="sub">{{ t.submitter || t.applicant || '' }}{{ t.dept ? ' · ' + t.dept : '' }}</text>
<view class="acts">
<text class="go">去办理</text>
</view>
<text class="sub">{{ metaOf(t) }}</text>
</view>
<text class="arr"></text>
</view>
</fy-scroll>
</view>
</template>
<script>
import FyHeader from '../../components/fy-header.vue'
import FyScroll from '../../components/fy-scroll.vue'
import { store } from '../../utils/store.js'
import { asList, fmtTime } from '../../utils/format.js'
import { oaGet } from '../../utils/api.js'
export default {
components: { FyHeader },
components: { FyHeader, FyScroll },
data() {
return { items: [] }
},
@@ -51,6 +48,11 @@ export default {
const conv = store.conversations.find((c) => c.type === 'work')
if (conv) conv.unread = 0
},
metaOf(t) {
const who = [t.submitter || t.applicant, t.dept].filter(Boolean).join(' · ')
const time = t.createdAt || t.time || ''
return [who, time].filter(Boolean).join(' · ')
},
open(t) {
const no = t.no || t.id || ''
if (String(t.source || t.type || '') === 'work' || t.taskId) {
@@ -64,16 +66,12 @@ export default {
</script>
<style scoped>
.bar { margin: 16rpx 24rpx; background: #F3F6FB; border-radius: 16rpx; padding: 16rpx 20rpx; display: flex; justify-content: space-between; font-size: 22rpx; color: #4B5563; }
.item { margin: 0 24rpx 20rpx; display: flex; overflow: hidden; }
.stripe { width: 8rpx; background: #1677FF; }
.body { flex: 1; padding: 24rpx; }
.top { display: flex; justify-content: space-between; }
.kind { font-size: 28rpx; font-weight: 700; }
.time { font-size: 22rpx; color: #6B7280; }
.title { display: block; font-size: 28rpx; font-weight: 600; margin: 12rpx 0 6rpx; }
.sub { font-size: 22rpx; color: #6B7280; }
.acts { margin-top: 16rpx; }
.go { color: #1677FF; font-size: 24rpx; font-weight: 600; }
.empty { text-align: center; color: #6B7280; padding: 80rpx; }
.bar { margin: 16rpx 24rpx 8rpx; padding: 0 8rpx; display: flex; justify-content: space-between; align-items: center; font-size: 22rpx; color: #6B7280; }
.count { color: #1677FF; font-weight: 600; }
.item { margin: 16rpx 24rpx; padding: 24rpx; display: flex; align-items: center; }
.main { flex: 1; min-width: 0; }
.type { display: inline-block; font-size: 22rpx; color: #1677FF; background: #E8F1FF; border-radius: 8rpx; padding: 2rpx 10rpx; }
.title { display: block; margin-top: 10rpx; font-size: 28rpx; font-weight: 650; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { display: block; margin-top: 6rpx; font-size: 24rpx; color: #6B7280; }
.arr { color: #C4C9D4; font-size: 32rpx; margin-left: 8rpx; }
</style>