bug等问题修复

This commit is contained in:
BianLzhaoMin 2024-10-24 10:51:32 +08:00
parent ae21e9e3be
commit d91c04af2b
5 changed files with 365 additions and 274 deletions

View File

@ -0,0 +1,3 @@
import request_yn from '@/utils/request_new_yn'
// 获取

View File

@ -147,7 +147,7 @@ export default {
res.data.proMsgBean res.data.proMsgBean
setTimeout(() => { setTimeout(() => {
let data = { let data = {
categories: ['基建线路', '基建变电', '生产线路', '生产变电', '配网', '其'], categories: ['基建线路', '基建变电', '生产线路', '生产变电', '配网', '其'],
series: [ series: [
{ {
name: '', name: '',

View File

@ -8,8 +8,8 @@
leftIconColor="#fff" leftIconColor="#fff"
bgColor="#00337A" bgColor="#00337A"
:titleStyle="{ color: '#FFF', fontSize: '32rpx' }" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"
/> ></u-navbar>
<button class="refresh-btn" @tap="onRefreshPages">刷新</button>
<scroll-view scroll-y="true"> <scroll-view scroll-y="true">
<!-- 轮播图区域 --> <!-- 轮播图区域 -->
<swiper class="swiper-container" autoplay interval="3000" circular indicator-dots> <swiper class="swiper-container" autoplay interval="3000" circular indicator-dots>
@ -594,10 +594,11 @@ export default {
}, },
// //
leftClick() { leftClick() {
console.log('返回') // console.log('')
if (this.type.indexOf('4') > -1) { // if (this.type.indexOf('4') > -1) {
this.showPopup = true // this.showPopup = true
} // }
uni.navigateTo({ url: '/pages/gzt/index' })
}, },
// //
chosenPro(item) { chosenPro(item) {
@ -832,6 +833,12 @@ export default {
uni.navigateTo({ url: `/pages/realName/index/pages/personList?workerType=0` }) uni.navigateTo({ url: `/pages/realName/index/pages/personList?workerType=0` })
break break
} }
},
/* 刷新页面 */
onRefreshPages() {
uni.reLaunch({
url: '/pages/realName/index/index'
})
} }
} }
} }
@ -853,6 +860,19 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 0 10rpx; padding: 0 10rpx;
.refresh-btn {
position: fixed;
top: 36rpx;
right: 26rpx;
background-color: #00337a;
color: #fff;
z-index: 999;
}
.refresh-btn::after {
border: none;
}
.search { .search {
width: 100%; width: 100%;
margin: 0 auto; margin: 0 auto;

View File

@ -27,11 +27,16 @@
<view style="padding: 0 20rpx"> <view style="padding: 0 20rpx">
<scroll-view class="data-container" scroll-y="true"> <scroll-view class="data-container" scroll-y="true">
<view class="scroll-item" v-for="(item, index) in companyInfoList" :key="index"> <view class="scroll-item" v-for="(item, index) in companyInfoList" :key="index">
<view class="item-1"> <view class="item-1">
<view>{{ index + 1 }}</view> <view>{{ index + 1 }}</view>
<view>{{ item.proName }}</view> <view>{{ item.proName }}</view>
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @click="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }" style="position: absolute;right: 1%;"></uni-icons> <uni-icons
:type="item.isCollect == 1 ? 'star-filled' : 'star'"
size="20"
@click="onCollection($event, item)"
:style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"
style="position: absolute; right: 1%"
></uni-icons>
</view> </view>
<view class="item-2"> <view class="item-2">

View File

@ -1,11 +1,18 @@
<template> <template>
<view class="page"> <view class="page">
<u-navbar class="u-navbar" title="分包信息" placeholder @leftClick="leftClick" <u-navbar
leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/> class="u-navbar"
title="分包信息"
placeholder
@leftClick="leftClick"
leftIconColor="#fff"
bgColor="#00337A"
:titleStyle="{ color: '#FFF', fontSize: '32rpx' }"
/>
<view class="header-fixed"> <view class="header-fixed">
<view class="search-content"> <view class="search-content">
<view style="width: 98%;"> <view style="width: 98%">
<uni-easyinput <uni-easyinput
suffixIcon="search" suffixIcon="search"
v-model="queryParams.params.subName" v-model="queryParams.params.subName"
@ -23,50 +30,82 @@
<view class="item-1"> <view class="item-1">
<view>{{ index + 1 }}</view> <view>{{ index + 1 }}</view>
<view>{{ item.subName }}</view> <view>{{ item.subName }}</view>
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @catchtap="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }" style="position: absolute;right: 1%;"></uni-icons> <uni-icons
:type="item.isCollect == 1 ? 'star-filled' : 'star'"
size="20"
@catchtap="onCollection($event, item)"
:style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"
style="position: absolute; right: 1%"
></uni-icons>
</view> </view>
<view class="item-3"> <view class="item-3">
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goTeamListPage(item)"> <view
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
@tap="goTeamListPage(item)"
>
<view>班组</view> <view>班组</view>
<view style="color: #3f9dfd; font-weight: bold">{{ item.teamNum }}</view> <view style="color: #3f9dfd; font-weight: bold">{{ item.teamNum }}</view>
</view> </view>
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goAttPersonListPage(item)"> <view
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
@tap="goAttPersonListPage(item)"
>
<view>考勤人数</view> <view>考勤人数</view>
<view style="color: #3f9dfd; font-weight: bold">{{ item.attPersonNum }}</view> <view style="color: #3f9dfd; font-weight: bold">{{ item.attPersonNum }}</view>
</view> </view>
</view> </view>
<view class="item-3"> <view class="item-3">
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goAllPersonListPage(item)"> <view
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
@tap="goAllPersonListPage(item)"
>
<view>在场</view> <view>在场</view>
<view style="color: #3f9dfd; font-weight: bold">{{ item.einPersonNum }}</view> <view style="color: #3f9dfd; font-weight: bold">{{ item.einPersonNum }}</view>
</view> </view>
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goWorkPersonListPage(item)"> <view
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
@tap="goWorkPersonListPage(item)"
>
<view>固定</view> <view>固定</view>
<view style="color: #3f9dfd; font-weight: bold">{{ item.formalPersonNum }}</view> <view style="color: #3f9dfd; font-weight: bold">{{ item.formalPersonNum }}</view>
</view> </view>
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goTempPersonListPage(item)"> <view
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
@tap="goTempPersonListPage(item)"
>
<view>临时</view> <view>临时</view>
<view style="color: #3f9dfd; font-weight: bold">{{ item.temporaryPersonNum }}</view> <view style="color: #3f9dfd; font-weight: bold">{{ item.temporaryPersonNum }}</view>
</view> </view>
</view> </view>
<view class="item-3"> <view class="item-3">
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goLightPersonListPage(item,2)"> <view
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
@tap="goLightPersonListPage(item, 2)"
>
<view>绿灯</view> <view>绿灯</view>
<view style="color: #3FB779; font-weight: bold">{{item.greenPersonNum}}</view> <view style="color: #3fb779; font-weight: bold">{{ item.greenPersonNum }}</view>
</view> </view>
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goLightPersonListPage(item,1)"> <view
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
@tap="goLightPersonListPage(item, 1)"
>
<view>黄灯</view> <view>黄灯</view>
<view style="color: #E89C2D; font-weight: bold">{{item.yellowPersonNum}}</view> <view style="color: #e89c2d; font-weight: bold">{{ item.yellowPersonNum }}</view>
</view> </view>
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goLightPersonListPage(item,0)"> <view
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
@tap="goLightPersonListPage(item, 0)"
>
<view>红灯</view> <view>红灯</view>
<view style="color: #E8717F; font-weight: bold">{{item.redPersonNum}}</view> <view style="color: #e8717f; font-weight: bold">{{ item.redPersonNum }}</view>
</view> </view>
</view> </view>
<view style="width: 100%;font-size: 24rpx;padding: 20rpx 0;border-bottom: 1px solid #eee;"> <view style="width: 100%; font-size: 24rpx; padding: 20rpx 0; border-bottom: 1px solid #eee">
<view style="width:95%%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;"> <view
<view style="width: 100rpx;">所在工程</view> style="width: 95%%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
<view style="width: 83%;"> >
<view style="width: 100rpx">所在工程</view>
<view style="width: 83%">
<view v-for="(items, indexs) in item.proName.split('<br>')" :key="indexs"> <view v-for="(items, indexs) in item.proName.split('<br>')" :key="indexs">
{{ items }} {{ items }}
</view> </view>
@ -86,7 +125,8 @@
<scroll-view class="company-container" scroll-y="true"> <scroll-view class="company-container" scroll-y="true">
<view class="company-items"> <view class="company-items">
<view <view
v-for="(item, index) in companyList" :key="index" v-for="(item, index) in companyList"
:key="index"
:class="{ active: index === activeIndex }" :class="{ active: index === activeIndex }"
@tap="onSelectCompany(index, item.name)" @tap="onSelectCompany(index, item.name)"
> >
@ -100,7 +140,8 @@
<scroll-view class="company-container" scroll-y="true"> <scroll-view class="company-container" scroll-y="true">
<view class="company-items"> <view class="company-items">
<view <view
v-for="(item, index) in proStatusList" :key="index" v-for="(item, index) in proStatusList"
:key="index"
:class="{ active: index === activeIndex2 }" :class="{ active: index === activeIndex2 }"
@tap="onSelectStatus(index, item.name)" @tap="onSelectStatus(index, item.name)"
> >
@ -114,7 +155,8 @@
<scroll-view class="company-container" scroll-y="true"> <scroll-view class="company-container" scroll-y="true">
<view class="company-items"> <view class="company-items">
<view <view
v-for="(item, index) in levelList" :key="index" v-for="(item, index) in levelList"
:key="index"
:class="{ active: index === activeIndex3 }" :class="{ active: index === activeIndex3 }"
@tap="onSelectLevel(index, item.name)" @tap="onSelectLevel(index, item.name)"
> >
@ -128,7 +170,8 @@
<scroll-view class="company-container" scroll-y="true"> <scroll-view class="company-container" scroll-y="true">
<view class="company-items"> <view class="company-items">
<view <view
v-for="(item, index) in proTypeList" :key="index" v-for="(item, index) in proTypeList"
:key="index"
:class="{ active: index === activeIndex4 }" :class="{ active: index === activeIndex4 }"
@tap="onSelectType(index, item.name)" @tap="onSelectType(index, item.name)"
> >
@ -138,8 +181,6 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="bottom-btn"> <view class="bottom-btn">
<button style="background-color: #fff; color: #00337a" @tap="onReset">重置</button> <button style="background-color: #fff; color: #00337a" @tap="onReset">重置</button>
<button style="background-color: #00337a; color: #fff" @tap="onQuery">查询</button> <button style="background-color: #00337a; color: #fff" @tap="onQuery">查询</button>
@ -163,20 +204,43 @@ export default {
token: uni.getStorageSync('tjToken'), token: uni.getStorageSync('tjToken'),
// //
queryParams: { queryParams: {
offset: "0", offset: '0',
limit: "999999", limit: '999999',
params: { params: {
userId:uni.getStorageSync('realNameUser').userId+"", userId: uni.getStorageSync('realNameUser').userId + '',
proId:"", proId: '',
subName:"", subName: '',
proName:"", proName: '',
subComName:"" subComName: ''
} }
}, },
companyList: [{ name: '全部', id: '' }], companyList: [{ name: '全部', id: '' }],
proStatusList: [{name:'全部', id:'' },{name:'在建', id:'1' },{name:'完工', id:'2' },{name:'筹建', id:'3' },{name:'停工', id:'4' },{name:'遗憾收尾', id:'5' }], proStatusList: [
levelList: [{name:'全部', id:'' },{name:'其他', id:'1' },{name:'110kV', id:'2' },{name:'220kV', id:'3' },{name:'500kV', id:'4' },{name:'±500kV', id:'5' },{name:'1000kV以上', id:'6' }], { name: '全部', id: '' },
proTypeList: [{name:'全部', id:'' },{name:'其他', id:'1' },{name:'变电改扩建', id:'2' },{name:'基建变电', id:'3' },{name:'基建线路', id:'4' },{name:'生产变电', id:'5' },{name:'生产线路', id:'6' }], { name: '在建', id: '1' },
{ name: '完工', id: '2' },
{ name: '筹建', id: '3' },
{ name: '停工', id: '4' },
{ name: '遗憾收尾', id: '5' }
],
levelList: [
{ name: '全部', id: '' },
{ name: '其他', id: '1' },
{ name: '110kV', id: '2' },
{ name: '220kV', id: '3' },
{ name: '500kV', id: '4' },
{ name: '±500kV', id: '5' },
{ name: '1000kV以上', id: '6' }
],
proTypeList: [
{ name: '全部', id: '' },
{ name: '其他', id: '1' },
{ name: '变电改扩建', id: '2' },
{ name: '基建变电', id: '3' },
{ name: '基建线路', id: '4' },
{ name: '生产变电', id: '5' },
{ name: '生产线路', id: '6' }
],
companyInfoList: [] companyInfoList: []
} }
}, },
@ -185,7 +249,7 @@ export default {
}, },
onLoad(option) { onLoad(option) {
console.log(option) console.log(option)
this.queryParams.params.proId=option.proId||""; this.queryParams.params.proId = option.proId || ''
this.getListData() this.getListData()
}, },
methods: { methods: {
@ -214,7 +278,8 @@ export default {
this.companyList = this.companyList.concat(res.subList) this.companyList = this.companyList.concat(res.subList)
}, },
leftClick() { leftClick() {
uni.navigateTo({ url: `/pages/realName/index/index` }) // uni.navigateTo({ url: `/pages/realName/index/index` })
uni.navigateBack()
}, },
onSearchFilter() { onSearchFilter() {
// //
@ -272,7 +337,6 @@ export default {
}) })
}, },
/* 点击跳转班组 */ /* 点击跳转班组 */
goTeamListPage(row) { goTeamListPage(row) {
uni.navigateTo({ url: `/pages/realName/index/pages/teamList?subId=${row.subId}` }) uni.navigateTo({ url: `/pages/realName/index/pages/teamList?subId=${row.subId}` })
@ -294,11 +358,11 @@ export default {
uni.navigateTo({ url: `/pages/realName/index/pages/personList?subId=${row.subId}&workerType=0` }) uni.navigateTo({ url: `/pages/realName/index/pages/personList?subId=${row.subId}&workerType=0` })
}, },
/* 点击跳转人员-灯 */ /* 点击跳转人员-灯 */
goLightPersonListPage(row,type) {//绿2 1 0 goLightPersonListPage(row, type) {
//绿2 1 0
uni.navigateTo({ url: `/pages/realName/index/pages/personList?subId=${row.subId}&lightStatus=${type}` }) uni.navigateTo({ url: `/pages/realName/index/pages/personList?subId=${row.subId}&lightStatus=${type}` })
}, },
/* 收藏与取消收藏 */ /* 收藏与取消收藏 */
onCollection(e, row) { onCollection(e, row) {
e.stopPropagation() e.stopPropagation()
@ -335,14 +399,14 @@ export default {
.page { .page {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-color: #EFEFEF; background-color: #efefef;
box-sizing: border-box; box-sizing: border-box;
} }
.header-fixed { .header-fixed {
width: 94%; width: 94%;
margin: 20rpx auto; margin: 20rpx auto;
background-color: #FFF; background-color: #fff;
border-radius: 10rpx; border-radius: 10rpx;
padding: 20rpx; padding: 20rpx;
@ -369,7 +433,6 @@ export default {
padding: 14rpx 0; padding: 14rpx 0;
background-color: #fff; background-color: #fff;
margin: 20rpx auto; margin: 20rpx auto;
} }
.item-1, .item-1,