更新若干

This commit is contained in:
hero920103 committed 2026-11-17 17:16:02 +08:00
1 parent 54c90072fb
commit 5682069553
59 files changed
+3813 -1617

No files matched your search

+1 -1
View File
@@ -157,7 +157,7 @@ const currentNodeLabel = computed(() => {
onLoad((options) => {
if (!isLoggedIn()) {
uni.reLaunch({ url: '/pages/login/login' })
uni.reLaunch({ url: '/pages/nav/nav' })
return
}
const id = options && options.id
+107 -72
View File
@@ -14,72 +14,77 @@
</view>
</view>
<scroll-view class="tab-scroll" scroll-x :show-scrollbar="false">
<view class="tab-list">
<view class="body">
<scroll-view class="side-nav" scroll-y :show-scrollbar="false">
<view
v-for="tab in statusTabs"
:key="String(tab.value)"
class="tab-item"
class="side-item"
:class="{ active: currentStatus === tab.value }"
@tap="onStatusChange(tab.value)"
>
<text>{{ tab.label }}</text>
<text class="side-text">{{ tab.label }}</text>
</view>
</view>
</scroll-view>
</scroll-view>
<text class="page-tip">审批由各业务模块提交后在此查看与处理</text>
<view class="content">
<view class="content-head">
<text class="content-title">{{ currentTabLabel }}</text>
<text class="page-tip">审批由各业务模块提交后在此查看与处理</text>
</view>
<scroll-view class="list-scroll" scroll-y :show-scrollbar="false" @scrolltolower="loadMore">
<view v-if="loading && !list.length" class="state-box">
<text class="state-text">加载中...</text>
<scroll-view class="list-scroll" scroll-y :show-scrollbar="false" @scrolltolower="loadMore">
<view v-if="loading && !list.length" class="state-box">
<text class="state-text">加载中...</text>
</view>
<view v-else-if="!list.length" class="state-box">
<u-empty mode="list" text="暂无审批记录" />
</view>
<block v-else>
<view
v-for="row in list"
:key="row.id"
class="approval-card"
>
<view class="card-top">
<text class="card-title">{{ row.biz_title || '(无标题)' }}</text>
<u-tag
:text="row.status_label || ''"
:type="row.status_tag || 'info'"
size="mini"
/>
</view>
<view class="card-meta">
<text class="meta-text">{{ row.biz_type || '-' }}</text>
<text class="meta-text">发起人:{{ row.submit_user_name || '-' }}</text>
</view>
<view class="card-meta">
<text class="meta-text">提交:{{ row.submit_time || row.create_time || '-' }}</text>
<text v-if="row.finish_time" class="meta-text">完成:{{ row.finish_time }}</text>
</view>
<view v-if="row.current_node" class="card-meta">
<text class="meta-text">当前节点:{{ row.current_node }}</text>
</view>
<view class="card-actions">
<view class="op-btn op-view" hover-class="btn-active" @tap.stop="openDetail(row.id)">查看详情</view>
</view>
</view>
<view v-if="finished" class="load-done">
<text>{{ list.length ? '没有更多了' : '' }}</text>
</view>
<view v-else class="more-tip" @tap="loadMore">
<text>加载更多</text>
</view>
</block>
<view class="bottom-space" />
</scroll-view>
</view>
<view v-else-if="!list.length" class="state-box">
<u-empty mode="list" text="暂无审批记录" />
</view>
<block v-else>
<view
v-for="row in list"
:key="row.id"
class="approval-card"
>
<view class="card-top">
<text class="card-title">{{ row.biz_title || '(无标题)' }}</text>
<u-tag
:text="row.status_label || ''"
:type="row.status_tag || 'info'"
size="mini"
/>
</view>
<view class="card-meta">
<text class="meta-text">{{ row.biz_type || '-' }}</text>
<text class="meta-text">发起人:{{ row.submit_user_name || '-' }}</text>
</view>
<view class="card-meta">
<text class="meta-text">提交:{{ row.submit_time || row.create_time || '-' }}</text>
<text v-if="row.finish_time" class="meta-text">完成:{{ row.finish_time }}</text>
</view>
<view v-if="row.current_node" class="card-meta">
<text class="meta-text">当前节点:{{ row.current_node }}</text>
</view>
<view class="card-actions">
<view class="op-btn op-view" hover-class="btn-active" @tap.stop="openDetail(row.id)">查看详情</view>
</view>
</view>
<view v-if="finished" class="load-done">
<text>{{ list.length ? '没有更多了' : '' }}</text>
</view>
<view v-else class="more-tip" @tap="loadMore">
<text>加载更多</text>
</view>
</block>
<view class="bottom-space" />
</scroll-view>
</view>
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ref, computed, onMounted } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import {
fetchApprovalList,
@@ -103,9 +108,14 @@ const finished = ref(false)
const keyword = ref('')
const currentStatus = ref('')
const currentTabLabel = computed(() => {
const hit = statusTabs.find(tab => tab.value === currentStatus.value)
return hit ? hit.label : '全部'
})
onMounted(() => {
if (!isLoggedIn()) {
uni.reLaunch({ url: '/pages/login/login' })
uni.reLaunch({ url: '/pages/nav/nav' })
return
}
refresh()
@@ -215,37 +225,62 @@ function openDetail(id) {
}
}
.tab-scroll {
.body {
flex: 1;
min-height: 0;
display: flex;
flex-direction: row;
overflow: hidden;
}
.side-nav {
flex-shrink: 0;
white-space: nowrap;
align-self: stretch;
width: 184rpx;
background: $color-card;
padding: 0 $page-padding-x 12rpx;
border-right: 1rpx solid $color-divider;
}
.tab-list {
display: inline-flex;
gap: 16rpx;
padding: 16rpx 0 4rpx;
}
.tab-item {
padding: 10rpx 28rpx;
border-radius: $radius-full;
background: $color-bg-page;
.side-item {
display: flex;
align-items: center;
justify-content: center;
padding: 26rpx 12rpx;
border-left: 6rpx solid transparent;
font-size: 26rpx;
color: $color-text-secondary;
box-shadow: $shadow-card;
&.active {
background: $color-primary;
color: #ffffff;
font-weight: 500;
background: $color-bg-page;
border-left-color: $color-primary;
color: $color-primary;
font-weight: 600;
}
}
.content {
flex: 1;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
}
.content-head {
flex-shrink: 0;
padding: 18rpx 20rpx 0;
}
.content-title {
display: block;
font-size: 28rpx;
font-weight: 600;
color: $color-text;
}
.page-tip {
display: block;
padding: 12rpx $page-padding-x 0;
margin-top: 4rpx;
font-size: 22rpx;
color: $color-text-muted;
}
@@ -257,7 +292,7 @@ function openDetail(id) {
.approval-card {
@include card;
margin: 16rpx $page-padding-x 0;
margin: 16rpx 20rpx 0;
padding: 24rpx;
display: flex;
flex-direction: column;
+1 -1
View File
@@ -88,7 +88,7 @@ const keyword = ref('')
onLoad(() => {
if (!isLoggedIn()) {
uni.reLaunch({ url: '/pages/login/login' })
uni.reLaunch({ url: '/pages/nav/nav' })
return
}
refresh()