巡检统计页面还原
This commit is contained in:
parent
c060ab66f7
commit
0e4b41adc5
30
src/App.vue
30
src/App.vue
@ -2,7 +2,7 @@
|
||||
* @Author: XHC
|
||||
* @Date: 2025-05-19 10:21:48
|
||||
* @LastEditors: XHC
|
||||
* @LastEditTime: 2025-05-23 16:02:16
|
||||
* @LastEditTime: 2025-05-26 16:34:09
|
||||
* @Description:
|
||||
-->
|
||||
<script>
|
||||
@ -73,4 +73,32 @@ export default {
|
||||
margin: 0 30rpx;
|
||||
padding-bottom: 5rpx;
|
||||
}
|
||||
|
||||
// 分段标题样式
|
||||
.control-item {
|
||||
color: #DFE5F0;
|
||||
text-align: center;
|
||||
font-size: 31rpx;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
|
||||
&.active {
|
||||
color: #1468BC!important;
|
||||
background: #fff;
|
||||
border-radius: 15rpx;
|
||||
padding: 15rpx 0!important;
|
||||
&:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 15rpx solid transparent;
|
||||
border-top: 15rpx solid #fff;
|
||||
position: absolute;
|
||||
top: 95%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -50,6 +50,12 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "系统反馈"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/statistics/statistics",
|
||||
"style": {
|
||||
"navigationBarTitleText": "巡查统计"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: XHC
|
||||
* @Date: 2025-05-19 11:07:37
|
||||
* @LastEditors: XHC
|
||||
* @LastEditTime: 2025-05-23 16:51:56
|
||||
* @LastEditTime: 2025-05-26 16:31:15
|
||||
* @Description: 首页
|
||||
-->
|
||||
<template>
|
||||
@ -25,7 +25,7 @@
|
||||
v-for="(item, index) in departments"
|
||||
:key="index"
|
||||
:class="navCurIndex == index ? 'active' : ''"
|
||||
class="scroll-item"
|
||||
class="control-item"
|
||||
@click="changeTitle(index)"
|
||||
>
|
||||
{{ item.name }}
|
||||
@ -231,34 +231,15 @@ const goToStartInspection = (item) => {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
white-space: nowrap;
|
||||
.scroll-item {
|
||||
.control-item {
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
font-size: 31rpx;
|
||||
font-weight: bold;
|
||||
color: #DFE5F0;
|
||||
margin-left: 30rpx;
|
||||
padding: 0 20rpx;
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
&.active {
|
||||
color: #2851f3;
|
||||
background: #fff;
|
||||
border-radius: 15rpx;
|
||||
padding: 15rpx 20rpx;
|
||||
&:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 15rpx solid transparent;
|
||||
border-top: 15rpx solid #fff;
|
||||
position: absolute;
|
||||
top: 95%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
padding: 15rpx 20rpx!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: XHC
|
||||
* @Date: 2025-05-19 15:19:14
|
||||
* @LastEditors: XHC
|
||||
* @LastEditTime: 2025-05-26 11:58:55
|
||||
* @LastEditTime: 2025-05-26 16:21:29
|
||||
* @Description: 我的
|
||||
-->
|
||||
<template>
|
||||
@ -73,7 +73,9 @@ let listData = reactive([
|
||||
const goToPages = (index) => {
|
||||
switch (index) {
|
||||
case 0:
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/statistics/statistics'
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
uni.navigateTo({
|
||||
|
99
src/pages/statistics/statistics.vue
Normal file
99
src/pages/statistics/statistics.vue
Normal file
@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<view class="statistics">
|
||||
<view class="control">
|
||||
<view class="control-item" v-for="(item, index) in controlData" :key="index" :class="ctrlCurIndex == index ? 'active' : ''" @click="changeTitle(index)">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view v-if="ctrlCurIndex == 0">
|
||||
<view class="stat-box">
|
||||
<view>计划:<text class="num">2</text>条 </view>
|
||||
<view>实到:<text class="num green">2</text>条 </view>
|
||||
</view>
|
||||
<uni-card class="card-box" :is-shadow="false" >
|
||||
<view class="card-item" v-for="(item, index) in listData" :key="index">
|
||||
<view class="title">
|
||||
<text>{{ item.title }}</text>
|
||||
<uni-tag :inverted="true" :text="item.state" :type="item.state == '正常' ? 'success' : 'warning'" />
|
||||
</view>
|
||||
<view class="num">线路编号:{{ item.num }}</view>
|
||||
<view>巡检时间:{{ item.time }}</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
|
||||
let ctrlCurIndex = ref(0)
|
||||
let controlData = reactive([
|
||||
{ id: 1, title: '日' },
|
||||
{ id: 2, title: '周' },
|
||||
{ id: 3, title: '月' },
|
||||
{ id: 4, title: '年' },
|
||||
{ id: 5, title: '自定义' },
|
||||
])
|
||||
|
||||
// 列表数据
|
||||
let listData = reactive([
|
||||
{ title: '左岸白班机组', state: '正常', num: 'BHT-YX-XJ-L1.2', time: '2025-02-20 8:40' },
|
||||
{ title: '左岸主变洞及出线场(上午)', state: '正常', num: 'BHT-YX-XJ-L1.2', time: '2025-02-20 8:40' },
|
||||
])
|
||||
|
||||
// 切换
|
||||
const changeTitle = (index) => {
|
||||
ctrlCurIndex.value = index
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.statistics {
|
||||
.control {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
.control-item {
|
||||
width: 130rpx;
|
||||
}
|
||||
}
|
||||
.stat-box {
|
||||
color: #fff;
|
||||
margin: 20rpx 20rpx 0;
|
||||
padding: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #ffffff51;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
.num {
|
||||
font-size: 60rpx;
|
||||
margin: 0 30rpx;
|
||||
|
||||
}
|
||||
.green {
|
||||
color: #38E2B1;
|
||||
}
|
||||
}
|
||||
.card-box {
|
||||
margin: -10rpx 20rpx 0!important;
|
||||
.card-item {
|
||||
border-radius: 10rpx;
|
||||
background: #F1F6FD;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #003E8E;
|
||||
}
|
||||
.num {
|
||||
margin: 15rpx 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user