首页工程分包班组页面
This commit is contained in:
parent
e89698c3ab
commit
5e565286da
28
pages.json
28
pages.json
|
|
@ -233,6 +233,34 @@
|
|||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
//首页二级跳转页面 -- 在建工程列表
|
||||
"path": "pages/realName/index/pages/project",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
//首页二级跳转页面 -- 分包列表
|
||||
"path": "pages/realName/index/pages/subList",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
//首页二级跳转页面 -- 班组列表
|
||||
"path": "pages/realName/index/pages/teamList",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
//首页二级跳转页面 -- 人员列表
|
||||
"path": "pages/realName/index/pages/personList",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
//工作台
|
||||
"path": "pages/realName/workbench/index",
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
<view class="data-overview common-style">
|
||||
<h3>数据概览</h3>
|
||||
<view class="data-overview-content">
|
||||
<view v-for="item in dataOverviewList" :key="item.data_title">
|
||||
<view v-for="item in dataOverviewList" :key="item.data_title" @click="godataView(item)">
|
||||
<image class="data-overview-img" :src="item.data_img_src" mode=""></image>
|
||||
<view class="data-overview-item">
|
||||
<text>{{ item.data_num }}</text>
|
||||
|
|
@ -604,7 +604,25 @@ export default {
|
|||
/* 跳转作业计划 */
|
||||
onJumpWorkPlan() {
|
||||
uni.navigateTo({ url: '/pages/realName/workPlan/index' })
|
||||
},
|
||||
|
||||
//数据概览跳转
|
||||
godataView(item) {
|
||||
console.log(item)
|
||||
if(item.data_title=='在建工程'){
|
||||
uni.navigateTo({ url: '/pages/realName/index/pages/project' })
|
||||
}
|
||||
if(item.data_title=='在用分包单位'){
|
||||
uni.navigateTo({ url: '/pages/realName/index/pages/subList' })
|
||||
}
|
||||
if(item.data_title=='在用班组'){
|
||||
uni.navigateTo({ url: '/pages/realName/index/pages/teamList' })
|
||||
}
|
||||
if(item.data_title=='在场人数'){
|
||||
uni.navigateTo({ url: '/pages/realName/index/pages/personList' })
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
onShow() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,435 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="人员信息" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<scroll-view class="content" scroll-y="true">
|
||||
<view class="view-box">
|
||||
<view class="title-view">
|
||||
基本信息
|
||||
</view>
|
||||
<view style="display: flex;width: 94%;margin: 20rpx auto;height: auto;justify-content: space-between;">
|
||||
<view class="img-item">
|
||||
<image class="img" :src="faceImgUrl" mode=""></image>
|
||||
<view style="margin-top: 20rpx;">{{detailData.workerType}}</view>
|
||||
</view>
|
||||
<view class="base-info">
|
||||
<view style="margin-bottom: 20rpx;display: flex;align-items: center;">
|
||||
<text style="font-weight: bold;margin-right: 20rpx;">{{detailData.name}}</text>
|
||||
<text style="color:#06E7A3;margin-right: 20rpx;">{{detailData.lightStatus}}</text>
|
||||
<image class="iconImg" src="../../../../static/realName/tips.png" mode="" @click="openInfo"></image>
|
||||
</view>
|
||||
<image class="lightImg" v-if="detailData.lightStatus=='绿灯'" src="../../../../static/realName/green_light.png" mode=""></image>
|
||||
<image class="lightImg" v-if="detailData.lightStatus=='黄灯'" src="../../../../static/realName/yellow_light.png" mode=""></image>
|
||||
<image class="lightImg" v-if="detailData.lightStatus=='红灯'" src="../../../../static/realName/red_light.png" mode=""></image>
|
||||
<view style="font-weight: bold;">{{detailData.postName}}</view>
|
||||
<view style="font-weight: bold;">{{detailData.phone}}</view>
|
||||
<view style="font-weight: bold;">{{detailData.einStatus}}</view>
|
||||
<view style="margin-top: 20rpx;color: #999;">{{detailData.subName}}</view>
|
||||
<view style="margin-top: 20rpx;color: #999;">{{detailData.proName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-box">
|
||||
<view class="title-view">
|
||||
安全培训考试
|
||||
</view>
|
||||
<view style="width: 94%;margin: 20rpx auto;height: auto;" @click="openTrain">
|
||||
<view class="list-item" v-for="(item,index) in detailData.listExam" :key="index">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<image v-if="item.status==0" class="iconImg" src="../../../../static/realName/incomplete.png" mode=""></image>
|
||||
<image v-if="item.status==1" class="iconImg" src="../../../../static/realName/complete.png" mode=""></image>
|
||||
<view v-if="item.status==0" style="margin-left: 40rpx;color: #FF2F2F;font-weight: bold;">{{item.name}}</view>
|
||||
<view v-if="item.status==1" style="margin-left: 40rpx;color: #10BF95;font-weight: bold;">{{item.name}}</view>
|
||||
</view>
|
||||
<view v-if="item.status==0" class="status-btn" style="background: #FF2F2F;">未完成</view>
|
||||
<view v-if="item.status==1" class="status-btn" style="background: #10BF95;">完成</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-box">
|
||||
<view class="title-view">
|
||||
今日考勤
|
||||
</view>
|
||||
<view style="width: 94%;margin: 20rpx auto;height: auto;display: flex;align-items: center;justify-content: space-between;">
|
||||
<view>上班:{{detailData.isToWork}}</view>
|
||||
<view>下班:{{detailData.isOffWork}}</view>
|
||||
<view v-if="detailData.isToWork=='未打卡'" class="status-btn" style="background: #FF2F2F;">未打卡</view>
|
||||
<view v-if="detailData.isToWork!='未打卡'" class="status-btn" style="background: #10BF95;">已打卡</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-box">
|
||||
<view class="title-view">
|
||||
今日作业计划
|
||||
</view>
|
||||
<view class="title-view">
|
||||
作业内容
|
||||
</view>
|
||||
<view style="width: 94%;margin: 20rpx auto;height: auto;">
|
||||
{{detailData.zynr}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-box">
|
||||
<view class="title-view">
|
||||
合同信息
|
||||
</view>
|
||||
<view style="width: 94%;margin: 20rpx auto;height: auto;">
|
||||
<view class="list-item" v-for="(item,index) in detailData.listContract" :key="index" @click="openContract">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<image v-if="item.contractStatus==0" class="iconImg" src="../../../../static/realName/incomplete.png" mode=""></image>
|
||||
<image v-if="item.contractStatus==1" class="iconImg" src="../../../../static/realName/complete.png" mode=""></image>
|
||||
<view v-if="item.contractStatus==0" style="margin-left: 40rpx;color: #FF2F2F;font-weight: bold;">{{item.contractType}}</view>
|
||||
<view v-if="item.contractStatus==1" style="margin-left: 40rpx;color: #10BF95;font-weight: bold;">{{item.contractType}}</view>
|
||||
</view>
|
||||
<view v-if="item.contractStatus==0" class="status-btn" style="background: #FF2F2F;">未签订</view>
|
||||
<view v-if="item.contractStatus==1" class="status-btn" style="background: #10BF95;">已签订</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-box">
|
||||
<view class="title-view">
|
||||
持证信息
|
||||
</view>
|
||||
<view style="width: 94%;margin: 20rpx auto;height: auto;">
|
||||
<view class="list-item" v-for="(item,index) in detailData.listCertificate" :key="index" @click="openListCertificate">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<image v-if="item.isActive==0" class="iconImg" src="../../../../static/realName/incomplete.png" mode=""></image>
|
||||
<image v-if="item.isActive==1" class="iconImg" src="../../../../static/realName/complete.png" mode=""></image>
|
||||
<view v-if="item.isActive==0" style="margin-left: 40rpx;color: #FF2F2F;font-weight: bold;">{{item.certificateName}}</view>
|
||||
<view v-if="item.isActive==1" style="margin-left: 40rpx;color: #10BF95;font-weight: bold;">{{item.certificateName}}</view>
|
||||
</view>
|
||||
<view v-if="item.isActive==0" class="status-btn" style="background: #FF2F2F;">无效</view>
|
||||
<view v-if="item.isActive==1" class="status-btn" style="background: #10BF95;">有效</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 信息弹窗 -->
|
||||
<u-popup :show="showPopup1" mode="center" @close="closePopup1">
|
||||
<view style="width:600rpx;height: auto;position: relative;background-color: #fff;">
|
||||
<view style="width: 100%;height: 80rpx;margin: 0 auto;display: flex;justify-content: center;align-items: center;background-color: #fff;">
|
||||
<view style="font-size: 32rpx;: bold;">红绿灯</view>
|
||||
</view>
|
||||
<view style="width: 100%;height: 22vh;background-color: #fff;">
|
||||
<view style="width: 90%;height: auto;margin: 20rpx auto;display: flex;align-items: center;">
|
||||
<view style="width: 120rpx;height: 50rpx;color: #FFF;background: #DE3C23;text-align: center;line-height: 50rpx;">红灯</view>
|
||||
<view style="margin-left: 40rpx;width: 75%;">
|
||||
<view style="color: #CD4F3C;font-weight: bold;">安全教育培训考试未完成</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="width: 90%;height: auto;margin: 20rpx auto;display: flex;align-items: center;">
|
||||
<view style="width: 120rpx;height: 50rpx;color: #FFF;background: #FF7F26;text-align: center;line-height: 50rpx;">黄灯</view>
|
||||
<view style="margin-left: 40rpx;width: 75%;">
|
||||
<view style="color: #2DBB9D;font-weight: bold;">安全教育培训考试已完成</view>
|
||||
<view style="color: #CD4F3C;font-weight: bold;">合同/工资卡未上传,分包班组未绑定</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 90%;height: auto;margin: 20rpx auto;display: flex;align-items: center;">
|
||||
<view style="width: 120rpx;height: 50rpx;color: #FFF;background: #10BF96;text-align: center;line-height: 50rpx;">绿灯</view>
|
||||
<view style="margin-left: 40rpx;width: 75%;">
|
||||
<view style="color: #2DBB9D;font-weight: bold;">安全教育培训考试已完成</view>
|
||||
<view style="color: #2DBB9D;font-weight: bold;">合同/工资卡已上传,分包班组已绑定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 考试弹窗 -->
|
||||
<u-popup :show="showPopup2" mode="center" @close="closePopup2">
|
||||
<view style="width:600rpx;height: auto;position: relative;background-color: #fff;">
|
||||
<view style="width: 100%;height: 20vh;background-color: #fff;">
|
||||
<view class="list-item" style="margin: 30rpx 10rpx;" v-for="(item,index) in detailData.listExam" :key="index">
|
||||
<view style="display: flex;align-items: center;width: 50%;">
|
||||
<view v-if="item.status==0" style="margin-left: 10rpx;color: #FF2F2F;font-weight: bold;">{{item.name}}</view>
|
||||
<view v-if="item.status==1" style="margin-left: 10rpx;color: #10BF95;font-weight: bold;">{{item.name}}</view>
|
||||
</view>
|
||||
<view v-if="item.status==0" style="font-weight: bold;">未完成</view>
|
||||
<view v-if="item.status==1" style="font-weight: bold;">完成</view>
|
||||
<view style="font-weight: bold;">{{item.score}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 合同弹窗 -->
|
||||
<u-popup :show="showPopup3" mode="center" @close="closePopup3">
|
||||
<view style="width:600rpx;height: auto;position: relative;background-color: #fff;">
|
||||
<view style="width: 100%;height: auto;background-color: #fff;">
|
||||
<u--form class="addForm" :model="contractData" >
|
||||
<view class="form-input-box">
|
||||
<view style="width:30%;height: 100%;">合同照片</view>
|
||||
<view style="width:70%;height: 100%;">
|
||||
<image style="width:200rpx;height: 100rpx;margin: 10rpx;" :src="contractImgUrl" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:30%;height: 100%;">合同编号</view>
|
||||
<u-form-item prop='contractCode' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractData.contractCode" type="text" border="surround" readonly></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:30%;height: 100%;">合同期限类型</view>
|
||||
<u-form-item prop='laborContractType' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractData.laborContractType" type="text" border="surround" readonly></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:30%;height: 100%;">合同签订日期</view>
|
||||
<u-form-item prop='contractValidDate' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractData.contractValidDate" type="text" border="surround" readonly></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:30%;height: 100%;">合同终止日期</view>
|
||||
<u-form-item prop='contractInvalidDate' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractData.contractInvalidDate" type="text" border="surround" readonly></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:30%;height: 100%;">合同类型</view>
|
||||
<u-form-item prop='contractType' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractData.contractType" type="text" border="surround" readonly></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:30%;height: 100%;">工资核定方式</view>
|
||||
<u-form-item prop='wageApprovedWay' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractData.wageApprovedWay" type="text" border="surround" readonly></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:30%;height: 100%;">工资核定标准</view>
|
||||
<u-form-item prop='wageCriterion' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractData.wageCriterion" type="text" border="surround" readonly></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 持证弹窗 -->
|
||||
<u-popup :show="showPopup4" mode="center" @close="closePopup4">
|
||||
<view style="width:600rpx;height: auto;position: relative;background-color: #fff;">
|
||||
<view style="width: 100%;height: auto;background-color: #fff;">
|
||||
<u--form class="addForm" :model="listCertificate" >
|
||||
<view class="form-input-box" style="flex-direction: column;align-items: flex-start;">
|
||||
<view style="font-size: 24rpx;margin-top: 20rpx;">证件名称</view>
|
||||
<u-form-item prop='certificateName'>
|
||||
<u--input v-model="listCertificate.certificateName" type="text" border="surround" readonly></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box" style="flex-direction: column;align-items: flex-start;">
|
||||
<view style="font-size: 24rpx;margin-top: 20rpx;">证件有效期</view>
|
||||
<u-form-item prop='certificateName'>
|
||||
<u--input :value="listCertificate.startDate+'至'+listCertificate.stopDate" type="text" border="surround" readonly></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box" style="flex-direction: column;align-items: flex-start;">
|
||||
<view style="font-size: 24rpx;margin-top: 20rpx;">是否有效</view>
|
||||
<u-form-item prop='certificateName'>
|
||||
<u--input v-if="listCertificate.isActive==0" value="无效" type="text" border="surround" readonly></u--input>
|
||||
<u--input v-if="listCertificate.isActive==1" value="有效" color="#10BF95" type="text" border="surround" readonly></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box" style="flex-direction: column;align-items: flex-start;">
|
||||
<view style="font-size: 24rpx;margin-top: 20rpx;">证件附件</view>
|
||||
<view v-if="listCertificate.certificateTypeFile!=''" @click="openPdf" style="font-size: 28rpx;margin: 20rpx;color: #00337A;">附件查看</view>
|
||||
<view v-if="!listCertificate.certificateTypeFile" style="font-size: 28rpx;margin: 20rpx;color: #FF2F2F;">无附件</view>
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
idNumber:'',
|
||||
detailData:{},
|
||||
faceImgUrl:'',
|
||||
showPopup1:false,//信息
|
||||
showPopup2:false,//培训考试
|
||||
contractData:{},//合同
|
||||
contractImgUrl:"",
|
||||
showPopup3:false,//合同
|
||||
listCertificate:{},//持证
|
||||
showPopup4:false,//持证
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option)
|
||||
this.idNumber=option.idNumber||"";
|
||||
if(this.idNumber!=""){
|
||||
this.selectPersonQualificationsContent()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
// 获取详情
|
||||
selectPersonQualificationsContent(){
|
||||
let param={
|
||||
idNumber:this.idNumber,
|
||||
}
|
||||
uni.request({
|
||||
url: config.realAppUrl+'/BasePerson/selectPersonQualificationsContent',
|
||||
method: 'post',
|
||||
data: param,
|
||||
header: {
|
||||
'Content-Type': 'application/json;charset=UTF-8;',
|
||||
Authorization: uni.getStorageSync('realNameToken')
|
||||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
res = res.data;
|
||||
if(res.code==200){
|
||||
this.detailData=res.data;
|
||||
this.faceImgUrl=config.realLoginUrl+res.data.facePhoto;
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
openInfo(){
|
||||
this.showPopup1=true;
|
||||
},
|
||||
closePopup1(){
|
||||
this.showPopup1=false;
|
||||
},
|
||||
openTrain(){
|
||||
this.showPopup2=true;
|
||||
},
|
||||
closePopup2(){
|
||||
this.showPopup2=false;
|
||||
},
|
||||
openContract(){
|
||||
this.contractData = this.detailData.listContract[0]
|
||||
this.contractImgUrl=config.realLoginUrl+this.contractData.witnessPath;
|
||||
this.showPopup3=true;
|
||||
},
|
||||
closePopup3(){
|
||||
this.showPopup3=false;
|
||||
},
|
||||
openListCertificate(){
|
||||
this.listCertificate = this.detailData.listCertificate[0]
|
||||
this.showPopup4=true;
|
||||
},
|
||||
closePopup4(){
|
||||
this.showPopup4=false;
|
||||
},
|
||||
openPdf(){
|
||||
console.log("附件打开")
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/qualifications/listCertificatePdf?pdfUrl=${this.listCertificate.certificateTypeFile}`
|
||||
})
|
||||
},
|
||||
leftClick() {
|
||||
console.log('返回')
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #EFEFEF;
|
||||
box-sizing: border-box;
|
||||
// padding: 0 20px;
|
||||
.content{
|
||||
width: 100%;
|
||||
height: 90vh;
|
||||
margin-top: 20rpx;
|
||||
padding-bottom: 80rpx;
|
||||
background-color: #EFEFEF;
|
||||
}
|
||||
.view-box{
|
||||
width: 90%;
|
||||
margin: 20rpx auto;
|
||||
background-color: #FFF;
|
||||
border-radius: 10rpx;
|
||||
padding: 30rpx 10rpx;
|
||||
.title-view{
|
||||
font-weight: 600;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
.base-info{
|
||||
width: 68%;
|
||||
height: auto;
|
||||
position: relative;
|
||||
}
|
||||
.iconImg{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.lightImg{
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
position: absolute;
|
||||
right:40rpx;
|
||||
top: 0rpx;
|
||||
}
|
||||
.img-item {
|
||||
width: 180upx;
|
||||
height: 240upx;
|
||||
margin: 0 20rpx;
|
||||
text-align: center;
|
||||
.img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.list-item{
|
||||
width: 96%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 30rpx auto;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.status-btn{
|
||||
width: 120rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
color: #FFF;
|
||||
font-size:24rpx;
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.addForm{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-size: 24rpx;
|
||||
.form-input-box{
|
||||
padding: 0 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,485 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="人员信息" placeholder @leftClick="leftClick"
|
||||
leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
|
||||
<view class="header-fixed">
|
||||
<view class="search-content">
|
||||
<view style="width: 90%;">
|
||||
<uni-easyinput
|
||||
suffixIcon="search"
|
||||
v-model="queryParams.params.proName"
|
||||
placeholder="请输入人员名称"
|
||||
@iconClick="getWorkPlantData"
|
||||
></uni-easyinput>
|
||||
</view>
|
||||
<view class="search-icon" @tap="onSearchFilter"></view>
|
||||
</view>
|
||||
<view style="margin-top: 20rpx; color: #3f9dfd; letter-spacing: 2rpx">已查询{{ recordsTotal }}条数据</view>
|
||||
</view>
|
||||
<view style="padding: 0 20rpx">
|
||||
<scroll-view class="data-container" scroll-y="true">
|
||||
<view class="scroll-item" v-for="(item, index) in companyInfoList" :key="item.proId" @tap="onViewWorkDetails(item)">
|
||||
<view class="item-1">
|
||||
<view>{{ index + 1 }}</view>
|
||||
<view>{{ item.proName }}</view>
|
||||
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @catchtap="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"></uni-icons>
|
||||
</view>
|
||||
<view class="item-2">
|
||||
<view>{{ item.subComName }}</view>
|
||||
<view>
|
||||
<text v-if="item.kjsfx > 0" style="color: #6ff6d5">可接受风险:{{ item.kjsfx }}</text>
|
||||
<text v-if="item.dfx > 0" style="color: #25c294">低风险:{{ item.dfx }}</text>
|
||||
<text v-if="item.zfx > 0" style="color: #f9971e">中风险:{{ item.zfx }}</text>
|
||||
<text v-if="item.gfx > 0" style="color: #f44d46">高风险:{{ item.gfx }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-3">
|
||||
<view>作业人数</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.personNum }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 底部弹框 -->
|
||||
<uni-popup ref="popup" type="bottom" background-color="#fff">
|
||||
<view class="bottom-content">
|
||||
<h1>条件筛选</h1>
|
||||
<h2>分公司</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in companyList" :key="index"
|
||||
:class="{ active: index === activeIndex }"
|
||||
@tap="onSelectCompany(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>红绿灯状态</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in lightList" :key="index"
|
||||
:class="{ active: index === activeIndex2 }"
|
||||
@tap="onSelectLight(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>用工类型</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in workTypeList" :key="index"
|
||||
:class="{ active: index === activeIndex3 }"
|
||||
@tap="onSelectWorkType(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>年龄分布</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in ageTypeList" :key="index"
|
||||
:class="{ active: index === activeIndex4 }"
|
||||
@tap="onSelectageType(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>性别</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in sexTypeList" :key="index"
|
||||
:class="{ active: index === activeIndex5 }"
|
||||
@tap="onSelectSexType(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<h2>考勤状态</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in attTypeList" :key="index"
|
||||
:class="{ active: index === activeIndex6 }"
|
||||
@tap="onSelectAttType(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>作业打卡</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true" style="padding-bottom: 150rpx;">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in dayAttTypeList" :key="index"
|
||||
:class="{ active: index === activeIndex7 }"
|
||||
@tap="onSelectDayAttType(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="bottom-btn">
|
||||
<button style="background-color: #fff; color: #00337a" @tap="onReset">重置</button>
|
||||
<button style="background-color: #00337a; color: #fff" @tap="onQuery">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getHomePageSelectApi } from '../../../../api/phaseTwo/homePage'
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeIndex: 0,
|
||||
activeIndex2: 0,
|
||||
activeIndex3: 0,
|
||||
activeIndex4: 0,
|
||||
activeIndex5: 0,
|
||||
activeIndex6: 0,
|
||||
activeIndex7: 0,
|
||||
recordsTotal: 0,
|
||||
token: uni.getStorageSync('tjToken'),
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
offset: 0,
|
||||
limit: 99999,
|
||||
params: {
|
||||
proName: '',
|
||||
subComName: ''
|
||||
}
|
||||
},
|
||||
companyList: [{ name: '全部', id: '' }],
|
||||
lightList: [{name:'全部', id:'' },{name:'绿灯', id:'1' },{name:'黄灯', id:'2' },{name:'红灯', id:'3' }],
|
||||
workTypeList: [{name:'全部', id:'' },{name:'固定用工', id:'1' },{name:'临时用工', id:'2' }],
|
||||
ageTypeList: [{name:'全部', id:'' },{name:'<20', id:'1' },{name:'20-30', id:'2' },{name:'30-40', id:'3' },{name:'40-50', id:'4' },{name:'50-60', id:'5' }],
|
||||
sexTypeList: [{name:'全部', id:'' },{name:'男', id:'1' },{name:'女', id:'2' }],
|
||||
attTypeList: [{name:'全部', id:'' },{name:'已考勤', id:'1' },{name:'未考勤', id:'2' }],
|
||||
dayAttTypeList: [{name:'全部', id:'' },{name:'日计划打卡', id:'1' },{name:'非日计划打卡', id:'2' }],
|
||||
companyInfoList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getWorkPlantData()
|
||||
this.getHomePageSelectData()
|
||||
},
|
||||
methods: {
|
||||
/* 获取作业计划列表 */
|
||||
async getWorkPlantData() {
|
||||
uni.request({
|
||||
url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg',
|
||||
method: 'POST',
|
||||
data: JSON.stringify(this.queryParams),
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
// token: this.token
|
||||
},
|
||||
success: res => {
|
||||
console.log('res****', res)
|
||||
this.recordsTotal = res.data.recordsTotal
|
||||
this.companyInfoList = res.data.data
|
||||
},
|
||||
fail: err => {}
|
||||
})
|
||||
},
|
||||
/* 获取公司数据 */
|
||||
async getHomePageSelectData() {
|
||||
const res = await getHomePageSelectApi()
|
||||
this.companyList = this.companyList.concat(res.subList)
|
||||
},
|
||||
leftClick() {
|
||||
uni.navigateTo({ url: `/pages/realName/index/index` })
|
||||
},
|
||||
onSearchFilter() {
|
||||
// 打开底部弹框
|
||||
this.$refs.popup.open()
|
||||
},
|
||||
/* 选择公司 */
|
||||
onSelectCompany(index, name) {
|
||||
this.activeIndex = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.subComName = ''
|
||||
} else {
|
||||
this.queryParams.params.subComName = name
|
||||
}
|
||||
},
|
||||
onSelectLight(index, name) {
|
||||
this.activeIndex2 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.light = ''
|
||||
} else {
|
||||
this.queryParams.params.light = name
|
||||
}
|
||||
},
|
||||
onSelectWorkType(index, name) {
|
||||
this.activeIndex3 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.workType = ''
|
||||
} else {
|
||||
this.queryParams.params.workType = name
|
||||
}
|
||||
},
|
||||
onSelectAgeType(index, name) {
|
||||
this.activeIndex4 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.ageType = ''
|
||||
} else {
|
||||
this.queryParams.params.ageType = name
|
||||
}
|
||||
},
|
||||
onSelectSexType(index, name) {
|
||||
this.activeIndex5 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.sexType = ''
|
||||
} else {
|
||||
this.queryParams.params.sexType = name
|
||||
}
|
||||
},
|
||||
onSelectAttType(index, name) {
|
||||
this.activeIndex6 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.attType = ''
|
||||
} else {
|
||||
this.queryParams.params.attType = name
|
||||
}
|
||||
},
|
||||
onSelectDayAttType(index, name) {
|
||||
this.activeIndex7 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.dayAttType = ''
|
||||
} else {
|
||||
this.queryParams.params.dayAttType = name
|
||||
}
|
||||
},
|
||||
//light workType ageType sexType attType dayAttType
|
||||
/* 重置 */
|
||||
onReset() {
|
||||
this.activeIndex = 0
|
||||
this.queryParams.params.subComName = ''
|
||||
this.activeIndex2 = 0
|
||||
this.queryParams.params.light = ''
|
||||
this.activeIndex3 = 0
|
||||
this.queryParams.params.workType = ''
|
||||
this.activeIndex4 = 0
|
||||
this.queryParams.params.ageType = ''
|
||||
this.activeIndex5 = 0
|
||||
this.queryParams.params.sexType = ''
|
||||
this.activeIndex6 = 0
|
||||
this.queryParams.params.attType = ''
|
||||
this.activeIndex7 = 0
|
||||
this.queryParams.params.dayAttType = ''
|
||||
this.onQuery()
|
||||
},
|
||||
/* 查询 */
|
||||
onQuery() {
|
||||
this.getWorkPlantData().then(() => {
|
||||
this.$refs.popup.close()
|
||||
})
|
||||
},
|
||||
/* 点击跳转作业计划详情 */
|
||||
onViewWorkDetails(row) {
|
||||
uni.navigateTo({ url: `/pages/realName/workPlan-details/index?query=${JSON.stringify(row)}` })
|
||||
},
|
||||
/* 收藏与取消收藏 */
|
||||
onCollection(e, row) {
|
||||
e.stopPropagation()
|
||||
// const params = {
|
||||
// id: row.collectId,
|
||||
// userId: uni.getStorageSync('realNameUser').userId,
|
||||
// foreignId: row.proId,
|
||||
// type: 1
|
||||
// }
|
||||
|
||||
// // console.log('params参数', params)
|
||||
|
||||
// uni.request({
|
||||
// url: `${config.loginBaseUrl}${
|
||||
// row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect'
|
||||
// }`,
|
||||
// method: 'POST',
|
||||
// data: JSON.stringify(params),
|
||||
// header: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// token: this.token
|
||||
// },
|
||||
// success: res => {
|
||||
// console.log('res收藏结果', res)
|
||||
// },
|
||||
// fail: err => {}
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #EFEFEF;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header-fixed {
|
||||
width: 94%;
|
||||
margin: 20rpx auto;
|
||||
background-color: #FFF;
|
||||
border-radius: 10rpx;
|
||||
padding:20rpx;
|
||||
|
||||
.search-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.search-icon {
|
||||
width: 48rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 60rpx;
|
||||
margin-left: 30rpx;
|
||||
background: url('../../../../static/realName/screen.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.data-container {
|
||||
width: 100%;
|
||||
height: 75vh;
|
||||
|
||||
.scroll-item {
|
||||
padding: 14rpx 0;
|
||||
background-color: #fff;
|
||||
margin: 20rpx auto;
|
||||
}
|
||||
|
||||
.item-1,
|
||||
.item-2,
|
||||
.item-3 {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-1 view:first-child {
|
||||
width: 80rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 16rpx;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
background: url('../../../../static/realName/serial.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.item-2,
|
||||
.item-3 {
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-content {
|
||||
height: 60vh;
|
||||
overflow-y: auto;
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
padding: 15rpx 0;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
h1 {
|
||||
margin-top: 10rpx;
|
||||
border-bottom: 1px solid #ccc;
|
||||
text-align: center;
|
||||
}
|
||||
h2 {
|
||||
padding-left: 16rpx;
|
||||
// border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.company-container {
|
||||
width: 96%;
|
||||
height: auto;
|
||||
padding: 40rpx 20rpx;
|
||||
|
||||
.company-items {
|
||||
width: 100%;
|
||||
padding: 0 16rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
view {
|
||||
width: 48%;
|
||||
height: 48rpx;
|
||||
margin-top: 10rpx;
|
||||
line-height: 48rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
background-color: #eee;
|
||||
color: #656565;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #3f9dfd;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.company-items view:nth-child(2n + 1) {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-btn {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
display: flex;
|
||||
bottom: 20rpx;
|
||||
z-index: 9;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
margin: 0 20rpx;
|
||||
line-height: 80rpx;
|
||||
font-weight: normal;
|
||||
border-radius: 20rpx;
|
||||
border: 1rpx solid #00337a;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,408 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="在建工程" placeholder @leftClick="leftClick"
|
||||
leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
|
||||
<view class="header-fixed">
|
||||
<view class="search-content">
|
||||
<view style="width: 90%;">
|
||||
<uni-easyinput
|
||||
suffixIcon="search"
|
||||
v-model="queryParams.params.proName"
|
||||
placeholder="请输入工程信息"
|
||||
@iconClick="getWorkPlantData"
|
||||
></uni-easyinput>
|
||||
</view>
|
||||
<view class="search-icon" @tap="onSearchFilter"></view>
|
||||
</view>
|
||||
<view style="margin-top: 20rpx; color: #3f9dfd; letter-spacing: 2rpx">已查询{{ recordsTotal }}条数据</view>
|
||||
</view>
|
||||
<view style="padding: 0 20rpx">
|
||||
<scroll-view class="data-container" scroll-y="true">
|
||||
<view class="scroll-item" v-for="(item, index) in companyInfoList" :key="item.proId" @tap="onViewWorkDetails(item)">
|
||||
<view class="item-1">
|
||||
<view>{{ index + 1 }}</view>
|
||||
<view>{{ item.proName }}</view>
|
||||
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @catchtap="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"></uni-icons>
|
||||
</view>
|
||||
<view class="item-2">
|
||||
<view>{{ item.subComName }}</view>
|
||||
<view>
|
||||
<text v-if="item.kjsfx > 0" style="color: #6ff6d5">可接受风险:{{ item.kjsfx }}</text>
|
||||
<text v-if="item.dfx > 0" style="color: #25c294">低风险:{{ item.dfx }}</text>
|
||||
<text v-if="item.zfx > 0" style="color: #f9971e">中风险:{{ item.zfx }}</text>
|
||||
<text v-if="item.gfx > 0" style="color: #f44d46">高风险:{{ item.gfx }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-3">
|
||||
<view>作业人数</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.personNum }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 底部弹框 -->
|
||||
<uni-popup ref="popup" type="bottom" background-color="#fff">
|
||||
<view class="bottom-content">
|
||||
<h1>条件筛选</h1>
|
||||
<h2>分公司</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in companyList" :key="index"
|
||||
:class="{ active: index === activeIndex }"
|
||||
@tap="onSelectCompany(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>工程状态</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in proStatusList" :key="index"
|
||||
:class="{ active: index === activeIndex2 }"
|
||||
@tap="onSelectStatus(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>电压等级</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in levelList" :key="index"
|
||||
:class="{ active: index === activeIndex3 }"
|
||||
@tap="onSelectLevel(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>工程类型</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true" style="padding-bottom: 120rpx;">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in proTypeList" :key="index"
|
||||
:class="{ active: index === activeIndex4 }"
|
||||
@tap="onSelectType(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="bottom-btn">
|
||||
<button style="background-color: #fff; color: #00337a" @tap="onReset">重置</button>
|
||||
<button style="background-color: #00337a; color: #fff" @tap="onQuery">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getHomePageSelectApi } from '../../../../api/phaseTwo/homePage'
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeIndex: 0,
|
||||
activeIndex2: 0,
|
||||
activeIndex3: 0,
|
||||
activeIndex4: 0,
|
||||
recordsTotal: 0,
|
||||
token: uni.getStorageSync('tjToken'),
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
offset: 0,
|
||||
limit: 99999,
|
||||
params: {
|
||||
proName: '',
|
||||
subComName: ''
|
||||
}
|
||||
},
|
||||
companyList: [{ name: '全部', id: '' }],
|
||||
proStatusList: [{name:'全部', id:'' },{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: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getWorkPlantData()
|
||||
this.getHomePageSelectData()
|
||||
},
|
||||
methods: {
|
||||
/* 获取作业计划列表 */
|
||||
async getWorkPlantData() {
|
||||
uni.request({
|
||||
url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg',
|
||||
method: 'POST',
|
||||
data: JSON.stringify(this.queryParams),
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
// token: this.token
|
||||
},
|
||||
success: res => {
|
||||
console.log('res****', res)
|
||||
this.recordsTotal = res.data.recordsTotal
|
||||
this.companyInfoList = res.data.data
|
||||
},
|
||||
fail: err => {}
|
||||
})
|
||||
},
|
||||
/* 获取公司数据 */
|
||||
async getHomePageSelectData() {
|
||||
const res = await getHomePageSelectApi()
|
||||
this.companyList = this.companyList.concat(res.subList)
|
||||
},
|
||||
leftClick() {
|
||||
uni.navigateTo({ url: `/pages/realName/index/index` })
|
||||
},
|
||||
onSearchFilter() {
|
||||
// 打开底部弹框
|
||||
this.$refs.popup.open()
|
||||
},
|
||||
/* 选择公司 */
|
||||
onSelectCompany(index, name) {
|
||||
this.activeIndex = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.subComName = ''
|
||||
} else {
|
||||
this.queryParams.params.subComName = name
|
||||
}
|
||||
},
|
||||
onSelectStatus(index, name) {
|
||||
this.activeIndex2 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.proStatus = ''
|
||||
} else {
|
||||
this.queryParams.params.proStatus = name
|
||||
}
|
||||
},
|
||||
onSelectLevel(index, name) {
|
||||
this.activeIndex3 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.level = ''
|
||||
} else {
|
||||
this.queryParams.params.level = name
|
||||
}
|
||||
},
|
||||
onSelectType(index, name) {
|
||||
this.activeIndex4 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.type = ''
|
||||
} else {
|
||||
this.queryParams.params.type = name
|
||||
}
|
||||
},
|
||||
/* 重置 */
|
||||
onReset() {
|
||||
this.activeIndex = 0
|
||||
this.queryParams.params.subComName = ''
|
||||
this.activeIndex2 = 0
|
||||
this.queryParams.params.proStatus = ''
|
||||
this.activeIndex3 = 0
|
||||
this.queryParams.params.level = ''
|
||||
this.activeIndex4 = 0
|
||||
this.queryParams.params.type = ''
|
||||
this.onQuery()
|
||||
},
|
||||
/* 查询 */
|
||||
onQuery() {
|
||||
this.getWorkPlantData().then(() => {
|
||||
this.$refs.popup.close()
|
||||
})
|
||||
},
|
||||
/* 点击跳转作业计划详情 */
|
||||
onViewWorkDetails(row) {
|
||||
uni.navigateTo({ url: `/pages/realName/workPlan-details/index?query=${JSON.stringify(row)}` })
|
||||
},
|
||||
/* 收藏与取消收藏 */
|
||||
onCollection(e, row) {
|
||||
e.stopPropagation()
|
||||
// const params = {
|
||||
// id: row.collectId,
|
||||
// userId: uni.getStorageSync('realNameUser').userId,
|
||||
// foreignId: row.proId,
|
||||
// type: 1
|
||||
// }
|
||||
|
||||
// // console.log('params参数', params)
|
||||
|
||||
// uni.request({
|
||||
// url: `${config.loginBaseUrl}${
|
||||
// row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect'
|
||||
// }`,
|
||||
// method: 'POST',
|
||||
// data: JSON.stringify(params),
|
||||
// header: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// token: this.token
|
||||
// },
|
||||
// success: res => {
|
||||
// console.log('res收藏结果', res)
|
||||
// },
|
||||
// fail: err => {}
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #EFEFEF;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header-fixed {
|
||||
width: 94%;
|
||||
margin: 20rpx auto;
|
||||
background-color: #FFF;
|
||||
border-radius: 10rpx;
|
||||
padding:20rpx;
|
||||
|
||||
.search-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.search-icon {
|
||||
width: 48rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 60rpx;
|
||||
margin-left: 30rpx;
|
||||
background: url('../../../../static/realName/screen.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.data-container {
|
||||
width: 100%;
|
||||
height: 75vh;
|
||||
|
||||
.scroll-item {
|
||||
padding: 14rpx 0;
|
||||
background-color: #fff;
|
||||
margin: 20rpx auto;
|
||||
}
|
||||
|
||||
.item-1,
|
||||
.item-2,
|
||||
.item-3 {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-1 view:first-child {
|
||||
width: 80rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 16rpx;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
background: url('../../../../static/realName/serial.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.item-2,
|
||||
.item-3 {
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-content {
|
||||
height: 60vh;
|
||||
overflow-y: auto;
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
padding: 15rpx 0;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
h1 {
|
||||
margin-top: 10rpx;
|
||||
border-bottom: 1px solid #ccc;
|
||||
text-align: center;
|
||||
}
|
||||
h2 {
|
||||
padding-left: 16rpx;
|
||||
// border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.company-container {
|
||||
width: 96%;
|
||||
height: auto;
|
||||
padding: 40rpx 20rpx;
|
||||
padding-bottom: 120rpx;
|
||||
.company-items {
|
||||
width: 100%;
|
||||
padding: 0 16rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
view {
|
||||
width: 48%;
|
||||
height: 48rpx;
|
||||
margin-top: 10rpx;
|
||||
line-height: 48rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
background-color: #eee;
|
||||
color: #656565;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #3f9dfd;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.company-items view:nth-child(2n + 1) {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-btn {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
display: flex;
|
||||
bottom: 20rpx;
|
||||
z-index: 9;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
margin: 0 20rpx;
|
||||
line-height: 80rpx;
|
||||
font-weight: normal;
|
||||
border-radius: 20rpx;
|
||||
border: 1rpx solid #00337a;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,408 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="分包信息" placeholder @leftClick="leftClick"
|
||||
leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
|
||||
<view class="header-fixed">
|
||||
<view class="search-content">
|
||||
<view style="width: 98%;">
|
||||
<uni-easyinput
|
||||
suffixIcon="search"
|
||||
v-model="queryParams.params.proName"
|
||||
placeholder="请输入分包名称"
|
||||
@iconClick="getWorkPlantData"
|
||||
></uni-easyinput>
|
||||
</view>
|
||||
<!-- <view class="search-icon" @tap="onSearchFilter"></view> -->
|
||||
</view>
|
||||
<view style="margin-top: 20rpx; color: #3f9dfd; letter-spacing: 2rpx">已查询{{ recordsTotal }}条数据</view>
|
||||
</view>
|
||||
<view style="padding: 0 20rpx">
|
||||
<scroll-view class="data-container" scroll-y="true">
|
||||
<view class="scroll-item" v-for="(item, index) in companyInfoList" :key="item.proId" @tap="onViewWorkDetails(item)">
|
||||
<view class="item-1">
|
||||
<view>{{ index + 1 }}</view>
|
||||
<view>{{ item.proName }}</view>
|
||||
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @catchtap="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"></uni-icons>
|
||||
</view>
|
||||
<view class="item-2">
|
||||
<view>{{ item.subComName }}</view>
|
||||
<view>
|
||||
<text v-if="item.kjsfx > 0" style="color: #6ff6d5">可接受风险:{{ item.kjsfx }}</text>
|
||||
<text v-if="item.dfx > 0" style="color: #25c294">低风险:{{ item.dfx }}</text>
|
||||
<text v-if="item.zfx > 0" style="color: #f9971e">中风险:{{ item.zfx }}</text>
|
||||
<text v-if="item.gfx > 0" style="color: #f44d46">高风险:{{ item.gfx }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-3">
|
||||
<view>作业人数</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.personNum }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 底部弹框 -->
|
||||
<uni-popup ref="popup" type="bottom" background-color="#fff">
|
||||
<view class="bottom-content">
|
||||
<h1>条件筛选</h1>
|
||||
<h2>分公司</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in companyList" :key="index"
|
||||
:class="{ active: index === activeIndex }"
|
||||
@tap="onSelectCompany(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>工程状态</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in proStatusList" :key="index"
|
||||
:class="{ active: index === activeIndex2 }"
|
||||
@tap="onSelectStatus(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>电压等级</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in levelList" :key="index"
|
||||
:class="{ active: index === activeIndex3 }"
|
||||
@tap="onSelectLevel(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>工程类型</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in proTypeList" :key="index"
|
||||
:class="{ active: index === activeIndex4 }"
|
||||
@tap="onSelectType(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="bottom-btn">
|
||||
<button style="background-color: #fff; color: #00337a" @tap="onReset">重置</button>
|
||||
<button style="background-color: #00337a; color: #fff" @tap="onQuery">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getHomePageSelectApi } from '../../../../api/phaseTwo/homePage'
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeIndex: 0,
|
||||
activeIndex2: 0,
|
||||
activeIndex3: 0,
|
||||
activeIndex4: 0,
|
||||
recordsTotal: 0,
|
||||
token: uni.getStorageSync('tjToken'),
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
offset: 0,
|
||||
limit: 99999,
|
||||
params: {
|
||||
proName: '',
|
||||
subComName: ''
|
||||
}
|
||||
},
|
||||
companyList: [{ name: '全部', id: '' }],
|
||||
proStatusList: [{name:'全部', id:'' },{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: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getWorkPlantData()
|
||||
this.getHomePageSelectData()
|
||||
},
|
||||
methods: {
|
||||
/* 获取作业计划列表 */
|
||||
async getWorkPlantData() {
|
||||
uni.request({
|
||||
url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg',
|
||||
method: 'POST',
|
||||
data: JSON.stringify(this.queryParams),
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
// token: this.token
|
||||
},
|
||||
success: res => {
|
||||
console.log('res****', res)
|
||||
this.recordsTotal = res.data.recordsTotal
|
||||
this.companyInfoList = res.data.data
|
||||
},
|
||||
fail: err => {}
|
||||
})
|
||||
},
|
||||
/* 获取公司数据 */
|
||||
async getHomePageSelectData() {
|
||||
const res = await getHomePageSelectApi()
|
||||
this.companyList = this.companyList.concat(res.subList)
|
||||
},
|
||||
leftClick() {
|
||||
uni.navigateTo({ url: `/pages/realName/index/index` })
|
||||
},
|
||||
onSearchFilter() {
|
||||
// 打开底部弹框
|
||||
this.$refs.popup.open()
|
||||
},
|
||||
/* 选择公司 */
|
||||
onSelectCompany(index, name) {
|
||||
this.activeIndex = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.subComName = ''
|
||||
} else {
|
||||
this.queryParams.params.subComName = name
|
||||
}
|
||||
},
|
||||
onSelectStatus(index, name) {
|
||||
this.activeIndex2 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.proStatus = ''
|
||||
} else {
|
||||
this.queryParams.params.proStatus = name
|
||||
}
|
||||
},
|
||||
onSelectLevel(index, name) {
|
||||
this.activeIndex3 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.level = ''
|
||||
} else {
|
||||
this.queryParams.params.level = name
|
||||
}
|
||||
},
|
||||
onSelectType(index, name) {
|
||||
this.activeIndex4 = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.type = ''
|
||||
} else {
|
||||
this.queryParams.params.type = name
|
||||
}
|
||||
},
|
||||
/* 重置 */
|
||||
onReset() {
|
||||
this.activeIndex = 0
|
||||
this.queryParams.params.subComName = ''
|
||||
this.activeIndex2 = 0
|
||||
this.queryParams.params.proStatus = ''
|
||||
this.activeIndex3 = 0
|
||||
this.queryParams.params.level = ''
|
||||
this.activeIndex4 = 0
|
||||
this.queryParams.params.type = ''
|
||||
this.onQuery()
|
||||
},
|
||||
/* 查询 */
|
||||
onQuery() {
|
||||
this.getWorkPlantData().then(() => {
|
||||
this.$refs.popup.close()
|
||||
})
|
||||
},
|
||||
/* 点击跳转作业计划详情 */
|
||||
onViewWorkDetails(row) {
|
||||
uni.navigateTo({ url: `/pages/realName/workPlan-details/index?query=${JSON.stringify(row)}` })
|
||||
},
|
||||
/* 收藏与取消收藏 */
|
||||
onCollection(e, row) {
|
||||
e.stopPropagation()
|
||||
// const params = {
|
||||
// id: row.collectId,
|
||||
// userId: uni.getStorageSync('realNameUser').userId,
|
||||
// foreignId: row.proId,
|
||||
// type: 1
|
||||
// }
|
||||
|
||||
// // console.log('params参数', params)
|
||||
|
||||
// uni.request({
|
||||
// url: `${config.loginBaseUrl}${
|
||||
// row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect'
|
||||
// }`,
|
||||
// method: 'POST',
|
||||
// data: JSON.stringify(params),
|
||||
// header: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// token: this.token
|
||||
// },
|
||||
// success: res => {
|
||||
// console.log('res收藏结果', res)
|
||||
// },
|
||||
// fail: err => {}
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #EFEFEF;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header-fixed {
|
||||
width: 94%;
|
||||
margin: 20rpx auto;
|
||||
background-color: #FFF;
|
||||
border-radius: 10rpx;
|
||||
padding:20rpx;
|
||||
|
||||
.search-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.search-icon {
|
||||
width: 48rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 60rpx;
|
||||
margin-left: 30rpx;
|
||||
background: url('../../../../static/realName/screen.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.data-container {
|
||||
width: 100%;
|
||||
height: 75vh;
|
||||
|
||||
.scroll-item {
|
||||
padding: 14rpx 0;
|
||||
background-color: #fff;
|
||||
margin: 20rpx auto;
|
||||
}
|
||||
|
||||
.item-1,
|
||||
.item-2,
|
||||
.item-3 {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-1 view:first-child {
|
||||
width: 80rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 16rpx;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
background: url('../../../../static/realName/serial.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.item-2,
|
||||
.item-3 {
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-content {
|
||||
height: 60vh;
|
||||
overflow-y: auto;
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
padding: 15rpx 0;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
h1 {
|
||||
margin-top: 10rpx;
|
||||
border-bottom: 1px solid #ccc;
|
||||
text-align: center;
|
||||
}
|
||||
h2 {
|
||||
padding-left: 16rpx;
|
||||
// border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.company-container {
|
||||
width: 96%;
|
||||
height: auto;
|
||||
padding: 40rpx 20rpx;
|
||||
padding-bottom: 120rpx;
|
||||
.company-items {
|
||||
width: 100%;
|
||||
padding: 0 16rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
view {
|
||||
width: 48%;
|
||||
height: 48rpx;
|
||||
margin-top: 10rpx;
|
||||
line-height: 48rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
background-color: #eee;
|
||||
color: #656565;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #3f9dfd;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.company-items view:nth-child(2n + 1) {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-btn {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
display: flex;
|
||||
bottom: 20rpx;
|
||||
z-index: 9;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
margin: 0 20rpx;
|
||||
line-height: 80rpx;
|
||||
font-weight: normal;
|
||||
border-radius: 20rpx;
|
||||
border: 1rpx solid #00337a;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,342 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="班组信息" placeholder @leftClick="leftClick"
|
||||
leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
|
||||
<view class="header-fixed">
|
||||
<view class="search-content">
|
||||
<view style="width: 90%;">
|
||||
<uni-easyinput
|
||||
suffixIcon="search"
|
||||
v-model="queryParams.params.proName"
|
||||
placeholder="请输入班组名称"
|
||||
@iconClick="getWorkPlantData"
|
||||
></uni-easyinput>
|
||||
</view>
|
||||
<view class="search-icon" @tap="onSearchFilter"></view>
|
||||
</view>
|
||||
<view style="margin-top: 20rpx; color: #3f9dfd; letter-spacing: 2rpx">已查询{{ recordsTotal }}条数据</view>
|
||||
</view>
|
||||
<view style="padding: 0 20rpx">
|
||||
<scroll-view class="data-container" scroll-y="true">
|
||||
<view class="scroll-item" v-for="(item, index) in companyInfoList" :key="item.proId" @tap="onViewWorkDetails(item)">
|
||||
<view class="item-1">
|
||||
<view>{{ index + 1 }}</view>
|
||||
<view>{{ item.proName }}</view>
|
||||
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @catchtap="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"></uni-icons>
|
||||
</view>
|
||||
<view class="item-2">
|
||||
<view>{{ item.subComName }}</view>
|
||||
<view>
|
||||
<text v-if="item.kjsfx > 0" style="color: #6ff6d5">可接受风险:{{ item.kjsfx }}</text>
|
||||
<text v-if="item.dfx > 0" style="color: #25c294">低风险:{{ item.dfx }}</text>
|
||||
<text v-if="item.zfx > 0" style="color: #f9971e">中风险:{{ item.zfx }}</text>
|
||||
<text v-if="item.gfx > 0" style="color: #f44d46">高风险:{{ item.gfx }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-3">
|
||||
<view>作业人数</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.personNum }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 底部弹框 -->
|
||||
<uni-popup ref="popup" type="bottom" background-color="#fff">
|
||||
<view class="bottom-content">
|
||||
<h1>条件筛选</h1>
|
||||
<h2>分公司</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in companyList" :key="index"
|
||||
:class="{ active: index === activeIndex }"
|
||||
@tap="onSelectCompany(index, item.name)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<h2>工程检索</h2>
|
||||
<view>
|
||||
<view class="company-container">
|
||||
<uni-easyinput type="text" v-model="queryParams.params.proName" placeholder="请输入工程信息" />
|
||||
</view>
|
||||
</view>
|
||||
<h2>分包检索</h2>
|
||||
<view>
|
||||
<view class="company-container">
|
||||
<uni-easyinput type="text" v-model="queryParams.params.subName" placeholder="请输入分包信息" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom-btn">
|
||||
<button style="background-color: #fff; color: #00337a" @tap="onReset">重置</button>
|
||||
<button style="background-color: #00337a; color: #fff" @tap="onQuery">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getHomePageSelectApi } from '../../../../api/phaseTwo/homePage'
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeIndex: 0,
|
||||
|
||||
recordsTotal: 0,
|
||||
token: uni.getStorageSync('tjToken'),
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
offset: 0,
|
||||
limit: 99999,
|
||||
params: {
|
||||
proName: '',
|
||||
subComName: ''
|
||||
}
|
||||
},
|
||||
companyList: [{ name: '全部', id: '' }],
|
||||
companyInfoList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getWorkPlantData()
|
||||
this.getHomePageSelectData()
|
||||
},
|
||||
methods: {
|
||||
/* 获取作业计划列表 */
|
||||
async getWorkPlantData() {
|
||||
uni.request({
|
||||
url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg',
|
||||
method: 'POST',
|
||||
data: JSON.stringify(this.queryParams),
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
// token: this.token
|
||||
},
|
||||
success: res => {
|
||||
console.log('res****', res)
|
||||
this.recordsTotal = res.data.recordsTotal
|
||||
this.companyInfoList = res.data.data
|
||||
},
|
||||
fail: err => {}
|
||||
})
|
||||
},
|
||||
/* 获取公司数据 */
|
||||
async getHomePageSelectData() {
|
||||
const res = await getHomePageSelectApi()
|
||||
this.companyList = this.companyList.concat(res.subList)
|
||||
},
|
||||
leftClick() {
|
||||
uni.navigateTo({ url: `/pages/realName/index/index` })
|
||||
},
|
||||
onSearchFilter() {
|
||||
// 打开底部弹框
|
||||
this.$refs.popup.open()
|
||||
},
|
||||
/* 选择公司 */
|
||||
onSelectCompany(index, name) {
|
||||
this.activeIndex = index
|
||||
if (index === 0) {
|
||||
this.queryParams.params.subComName = ''
|
||||
} else {
|
||||
this.queryParams.params.subComName = name
|
||||
}
|
||||
},
|
||||
|
||||
/* 重置 */
|
||||
onReset() {
|
||||
this.activeIndex = 0
|
||||
this.queryParams.params.subComName = ''
|
||||
this.onQuery()
|
||||
},
|
||||
/* 查询 */
|
||||
onQuery() {
|
||||
this.getWorkPlantData().then(() => {
|
||||
this.$refs.popup.close()
|
||||
})
|
||||
},
|
||||
/* 点击跳转作业计划详情 */
|
||||
onViewWorkDetails(row) {
|
||||
uni.navigateTo({ url: `/pages/realName/workPlan-details/index?query=${JSON.stringify(row)}` })
|
||||
},
|
||||
/* 收藏与取消收藏 */
|
||||
onCollection(e, row) {
|
||||
e.stopPropagation()
|
||||
// const params = {
|
||||
// id: row.collectId,
|
||||
// userId: uni.getStorageSync('realNameUser').userId,
|
||||
// foreignId: row.proId,
|
||||
// type: 1
|
||||
// }
|
||||
|
||||
// // console.log('params参数', params)
|
||||
|
||||
// uni.request({
|
||||
// url: `${config.loginBaseUrl}${
|
||||
// row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect'
|
||||
// }`,
|
||||
// method: 'POST',
|
||||
// data: JSON.stringify(params),
|
||||
// header: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// token: this.token
|
||||
// },
|
||||
// success: res => {
|
||||
// console.log('res收藏结果', res)
|
||||
// },
|
||||
// fail: err => {}
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #EFEFEF;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header-fixed {
|
||||
width: 94%;
|
||||
margin: 20rpx auto;
|
||||
background-color: #FFF;
|
||||
border-radius: 10rpx;
|
||||
padding:20rpx;
|
||||
|
||||
.search-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.search-icon {
|
||||
width: 48rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 60rpx;
|
||||
margin-left: 30rpx;
|
||||
background: url('../../../../static/realName/screen.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.data-container {
|
||||
width: 100%;
|
||||
height: 75vh;
|
||||
|
||||
.scroll-item {
|
||||
padding: 14rpx 0;
|
||||
background-color: #fff;
|
||||
margin: 20rpx auto;
|
||||
}
|
||||
|
||||
.item-1,
|
||||
.item-2,
|
||||
.item-3 {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-1 view:first-child {
|
||||
width: 80rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 16rpx;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
background: url('../../../../static/realName/serial.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.item-2,
|
||||
.item-3 {
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-content {
|
||||
height: 60vh;
|
||||
overflow-y: auto;
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
padding: 15rpx 0;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
h1 {
|
||||
margin-top: 10rpx;
|
||||
border-bottom: 1px solid #ccc;
|
||||
text-align: center;
|
||||
}
|
||||
h2 {
|
||||
padding-left: 16rpx;
|
||||
// border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.company-container {
|
||||
width: 96%;
|
||||
height: auto;
|
||||
padding: 40rpx 20rpx;
|
||||
padding-bottom: 120rpx;
|
||||
.company-items {
|
||||
width: 100%;
|
||||
padding: 0 16rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
view {
|
||||
width: 48%;
|
||||
height: 48rpx;
|
||||
margin-top: 10rpx;
|
||||
line-height: 48rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
background-color: #eee;
|
||||
color: #656565;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: #3f9dfd;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.company-items view:nth-child(2n + 1) {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-btn {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
display: flex;
|
||||
bottom: 20rpx;
|
||||
z-index: 9;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
margin: 0 20rpx;
|
||||
line-height: 80rpx;
|
||||
font-weight: normal;
|
||||
border-radius: 20rpx;
|
||||
border: 1rpx solid #00337a;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -205,7 +205,7 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.work-plan {
|
||||
background-color: #eee;
|
||||
padding-top: 80px;
|
||||
padding-top: 10px;
|
||||
|
||||
.header-fixed {
|
||||
width: 100%;
|
||||
|
|
|
|||
Loading…
Reference in New Issue