feat: 重构页面结构并添加工单审批和项目实施功能

- 删除旧版首页、注册页和演示页
- 新增工单审批和项目实施页面及功能
- 更新底部导航栏图标和路由配置
- 修改登录成功后的跳转逻辑
This commit is contained in:
liangbin 2026-01-15 19:00:36 +08:00
parent c6b3791076
commit a67654d9f4
13 changed files with 161 additions and 45 deletions

View File

@ -1,12 +1,5 @@
{
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true
}
},
{
"path": "pages/login/index",
"style": {
@ -15,10 +8,17 @@
}
},
{
"path": "pages/register/index",
"path": "pages/WorkOrderApproval/index",
"style": {
"navigationBarTitleText": "注册",
"navigationStyle": "custom"
"navigationBarTitleText": "工单审批",
"enablePullDownRefresh": true
}
},
{
"path": "pages/ProjectList/index",
"style": {
"navigationBarTitleText": "项目实施",
"enablePullDownRefresh": true
}
},
{
@ -27,13 +27,6 @@
"navigationBarTitleText": "个人中心",
"enablePullDownRefresh": false
}
},
{
"path": "pages/demo/index",
"style": {
"navigationBarTitleText": "组件演示",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
@ -56,22 +49,22 @@
"iconWidth": "24px",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png"
"pagePath": "pages/WorkOrderApproval/index",
"text": "工单审批",
"iconPath": "static/tabbar/gd-icon1.png",
"selectedIconPath": "static/tabbar/gd-icon2.png"
},
{
"pagePath": "pages/demo/index",
"text": "演示",
"iconPath": "static/tabbar/demo.png",
"selectedIconPath": "static/tabbar/demo-active.png"
"pagePath": "pages/ProjectList/index",
"text": "项目实施",
"iconPath": "static/tabbar/xm-icon1.png",
"selectedIconPath": "static/tabbar/xm-icon2.png"
},
{
"pagePath": "pages/user/index",
"text": "我的",
"iconPath": "static/tabbar/user.png",
"selectedIconPath": "static/tabbar/user-active.png"
"iconPath": "static/tabbar/gr-icon1.png",
"selectedIconPath": "static/tabbar/gr-icon2.png"
}
]
},

View File

@ -0,0 +1,8 @@
<!-- 项目实施-列表页 -->
<template>
<view class="project-list">
<view class="approval-header">
<text class="approval-title">项目实施列表</text>
</view>
</view>
</template>

View File

@ -0,0 +1,131 @@
<!-- 工单审批-列表页 -->
<template>
<view class="PageBox">
<view class="FlexBox TopBox">
<view class="SelectBox">
<u-select :current="TypeValue" :options="TypeList" placeholder="请选择工单类型" size="large" showOptionsLabel
@update:current="TypeValue = $event"></u-select>
</view>
<view class="BtnBox">
<u-button type="primary" text="查询">新建工单</u-button>
</view>
</view>
<view class="ListBox">
<u-virtual-list :list-data="dataSource" :item-height="200" height="100%">
<template #default="{ item, index }">
<view class="CardBox">
<view class="FlexBox">
<view class="Title">{{ item.name }}</view>
<view class="DetailBtn">详情</view>
</view>
<view class="CodeTxt">项目编号{{ item.projectCode }}</view>
<view class="TagBox">
<up-tag text="代填工作票" plain shape="circle"></up-tag>
</view>
<view class="BtnBox">
<up-tag text="代填工作票" plain shape="circle"></up-tag>
</view>
</view>
</template>
</u-virtual-list>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
const TypeValue = ref('1') //
//
const TypeList = ref([
{ name: '全部项目', id: '1' },
{ name: '我负责的项目', id: '2' },
{ name: '草稿', id: '3' },
{ name: '待审核', id: '4' },
{ name: '已撤回', id: '5' },
])
const dataSource = ref([
{ id: 1, name: '工单1', projectCode: '123456' },
{ id: 2, name: '工单2', projectCode: '123457' },
{ id: 3, name: '工单3', projectCode: '123458' },
{ id: 4, name: '工单4', projectCode: '123459' },
{ id: 5, name: '工单5', projectCode: '123460' },
{ id: 6, name: '工单6', projectCode: '123461' },
{ id: 7, name: '工单7', projectCode: '123462' },
])
</script>
<style lang="scss" scoped>
.FlexBox {
display: flex;
align-items: center;
justify-content: space-between;
}
.PageBox {
padding: 20rpx;
background-color: #fff;
height: calc(100vh - 400rpx);
.TopBox {
.SelectBox {
width: calc(50% - 10rpx);
height: 80rpx;
border-radius: 10rpx;
border: 1rpx solid #ccc;
display: flex;
align-items: center;
justify-content: center;
padding: 10rpx;
.u-select {
width: 100%;
}
}
.BtnBox {
width: 300rpx;
display: flex;
align-items: center;
justify-content: center;
}
}
.ListBox {
padding: 20rpx 0px;
margin-top: 20rpx;
height: calc(100vh - 300rpx);
overflow: hidden;
.CardBox {
width: calc(100% - 30rpx);
height: calc(100% - 30rpx);
margin: 0 auto;
padding: 20rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08), 0 2rpx 4rpx rgba(0, 0, 0, 0.04);
margin-bottom: 20rpx;
background-color: #fff;
border-radius: 10rpx;
.Title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.DetailBtn {
font-size: 24rpx;
color: #666;
}
.CodeTxt {
margin-top: 20rpx;
font-size: 24rpx;
color: #666;
}
.TagBox {
margin-top: 20rpx;
}
}
}
}
</style>

View File

@ -1,3 +0,0 @@
<template>
<div>这是一个演示页面</div>
</template>

View File

@ -1,12 +0,0 @@
<template>
<div class="container">首页</div>
</template>
<style lang="scss" scoped>
.container {
font-size: 80rpx;
font-weight: bold;
color: #2979ff;
margin-bottom: 20rpx;
}
</style>

View File

@ -1,3 +1,4 @@
<!-- 登录页 -->
<template>
<view class="login-page">
<view class="login-container">
@ -53,6 +54,7 @@ async function handleLogin() {
try {
//
uni.showToast({ title: '登录成功', icon: 'success' })
uni.switchTab({ url: '/pages/WorkOrderApproval/index' })
} catch (error) {
console.error('登录失败:', error)
} finally {

View File

@ -1,3 +0,0 @@
<template>
<div>注册</div>
</template>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB