Merge branch 'main' of http://192.168.0.56:3000/hywen/YNUtdPlatform
This commit is contained in:
commit
1e04c59636
|
|
@ -13,7 +13,7 @@
|
|||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
10
pages.json
10
pages.json
|
|
@ -254,7 +254,8 @@
|
|||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
},
|
||||
{
|
||||
//首页二级跳转页面 -- 人员列表
|
||||
"path": "pages/realName/index/pages/personList",
|
||||
"style": {
|
||||
|
|
@ -267,6 +268,13 @@
|
|||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
//首页三级级跳转页面 -- 人员信息
|
||||
"path": "pages/realName/index/pages/personDetail",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
//工作台
|
||||
"path": "pages/realName/workbench/index",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="charts-container">
|
||||
<qiun-data-charts type="column" :opts="opts" :chartData="chartData" />
|
||||
<qiun-data-charts type="column" :opts="opts" :chartData="chartData" @getIndex="handleChartClick" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ export default {
|
|||
categories: ['基建线路', '基建变电', '生产线路', '生成变电', '配网', '其他'],
|
||||
series: [
|
||||
{
|
||||
name: '目标值',
|
||||
name: '',
|
||||
data: [constructionLine, infrastructureSubstation, productionLine, productionSubstation, network, other]
|
||||
}
|
||||
]
|
||||
|
|
@ -158,6 +158,13 @@ export default {
|
|||
this.chartData = JSON.parse(JSON.stringify(data))
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
handleChartClick(index) {
|
||||
// console.log('index', index)
|
||||
const currentIndex = index.currentIndex.index // 获取当前点击的图表索引
|
||||
const currenName = this.chartData.categories[currentIndex]
|
||||
console.log('currenName选中的工程类型', currenName)
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/project?xxx=${currenName}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="charts-container">
|
||||
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" />
|
||||
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" @getIndex="handleChartClick" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -145,6 +145,13 @@ export default {
|
|||
this.chartData = JSON.parse(JSON.stringify(data))
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
handleChartClick(index) {
|
||||
const { currentIndex } = index // 获取当前点击的图表索引
|
||||
const chartsData = this.chartData.series[0].data
|
||||
const currenRows = chartsData[currentIndex]
|
||||
console.log('currenRows选中的工种类型', currenRows.name)
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/personList?xxx=${currenRows.name}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="charts-container">
|
||||
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" />
|
||||
<qiun-data-charts type="ring" :opts="opts" :chartData="chartData" @getIndex="handleChartClick" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -145,6 +145,13 @@ export default {
|
|||
this.chartData = JSON.parse(JSON.stringify(data))
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
handleChartClick(index) {
|
||||
const { currentIndex } = index // 获取当前点击的图表索引
|
||||
const chartsData = this.chartData.series[0].data
|
||||
const currenRows = chartsData[currentIndex]
|
||||
console.log('currenRows选中的人员类型(这个应该时年龄范围)', currenRows.name)
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/personList?xxx=${currenRows.name}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="charts-container">
|
||||
<qiun-data-charts type="rose" :opts="opts" :chartData="chartData" />
|
||||
<qiun-data-charts type="rose" :opts="opts" :chartData="chartData" @getIndex="handleChartClick" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -133,6 +133,13 @@ export default {
|
|||
this.chartData = JSON.parse(JSON.stringify(data))
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
handleChartClick(index) {
|
||||
const { currentIndex } = index // 获取当前点击的图表索引
|
||||
const chartsData = this.chartData.series[0].data
|
||||
const currenRows = chartsData[currentIndex]
|
||||
console.log('currenRows选中的工程类型', currenRows.name)
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/project?xxx=${currenRows.name}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@
|
|||
<view class="check-work-attendance common-style">
|
||||
<h3>人员考勤率</h3>
|
||||
<view class="check-work-attendance-container">
|
||||
<view v-for="item in progressList" :key="item.progress_title">
|
||||
<view v-for="item in progressList" :key="item.progress_title" @tap="onJumpPersonList(item.progress_title)">
|
||||
<view class="top-title">
|
||||
<text>{{ item.progress_title }}</text>
|
||||
<text :style="{ color: item.textColor }">{{ item.progress_proportion }}%</text>
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
<view class="project-container common-style">
|
||||
<h3>工程概况</h3>
|
||||
<view class="project-content">
|
||||
<view v-for="item in projectList" :key="item.project_title">
|
||||
<view v-for="item in projectList" :key="item.project_title" @tap="onJumpProjectList(item.project_title)">
|
||||
<view class="top-title">
|
||||
<text>{{ item.project_title }}</text>
|
||||
<text>{{ item.project_num }}</text>
|
||||
|
|
@ -172,17 +172,17 @@
|
|||
<view class="person-container common-style">
|
||||
<h3>在场人员概况</h3>
|
||||
<view class="person-content">
|
||||
<view>
|
||||
<view @tap="onJumpColorLight(1)">
|
||||
<image class="person-img" src="../../../static/images/img-phase-two/index_green_light.png" mode=""></image>
|
||||
<text class="text-strong">{{ ((greenNum / colorAmount) * 100).toFixed(2) }}%</text>
|
||||
<text>{{ greenNum }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<view @tap="onJumpColorLight(2)">
|
||||
<image class="person-img" src="../../../static/images/img-phase-two/index_yellow_light.png" mode=""></image>
|
||||
<text class="text-strong">{{ ((yellowNum / colorAmount) * 100).toFixed(2) }}%</text>
|
||||
<text>{{ yellowNum }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<view @tap="onJumpColorLight(3)">
|
||||
<image class="person-img" src="../../../static/images/img-phase-two/index_red_light.png" mode=""></image>
|
||||
<text class="text-strong">{{ ((redNum / colorAmount) * 100).toFixed(2) }}%</text>
|
||||
<text>{{ redNum }}</text>
|
||||
|
|
@ -196,10 +196,18 @@
|
|||
<view>男({{ maleNum }})</view>
|
||||
</view>
|
||||
|
||||
<view class="gender-img" style="margin-left: 30rpx; background-color: #67cde6"></view>
|
||||
<view
|
||||
@tap="onJumpColorLight(4)"
|
||||
class="gender-img"
|
||||
style="margin-left: 30rpx; background-color: #67cde6"
|
||||
></view>
|
||||
</view>
|
||||
<view class="girl-right">
|
||||
<view class="gender-img" style="margin-right: 30rpx; background-color: #fc8483"></view>
|
||||
<view
|
||||
@tap="onJumpColorLight(5)"
|
||||
class="gender-img"
|
||||
style="margin-right: 30rpx; background-color: #fc8483"
|
||||
></view>
|
||||
<view>
|
||||
<view>{{ ((femaleNum / sexAmount) * 100).toFixed(2) }}%</view>
|
||||
<view>女({{ femaleNum }})</view>
|
||||
|
|
@ -210,7 +218,7 @@
|
|||
<h5>固定、临时人员</h5>
|
||||
|
||||
<view class="person-num">
|
||||
<view style="color: #04cdfa">
|
||||
<view style="color: #04cdfa" @tap="onJumpColorLight(6)">
|
||||
<image
|
||||
style="width: 60rpx; height: 60rpx; margin-left: 10rpx"
|
||||
src="../../../static/images/img-phase-two/index_img_person.png"
|
||||
|
|
@ -218,7 +226,7 @@
|
|||
></image>
|
||||
{{ formalPersonNum }}
|
||||
</view>
|
||||
<view style="color: #fd8d01">
|
||||
<view style="color: #fd8d01" @tap="onJumpColorLight(7)">
|
||||
<image
|
||||
style="width: 60rpx; height: 60rpx; margin-right: 10rpx"
|
||||
src="../../../static/images/img-phase-two/index_img_person.png"
|
||||
|
|
@ -254,17 +262,35 @@
|
|||
</view>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
<!-- 选择工程弹窗 -->
|
||||
<u-popup :show="showPopup" mode="center" @close="closePopup">
|
||||
<view style="width:500rpx;height: auto%;position: relative;background-color: #fff;">
|
||||
<view style="width: 100%;height: 70rpx;margin: 0 auto;display: flex;justify-content: space-between;align-items: center;background-color: #fff;">
|
||||
<view style="width: 50%;height: 70rpx;line-height: 70rpx;font-weight: bold;margin-left: 40rpx;">选择工程</view>
|
||||
<u-icon style="width: 10%;" name="close" color="#000" size="24" @click="closePopup"></u-icon>
|
||||
<view style="width: 500rpx; height: auto%; position: relative; background-color: #fff">
|
||||
<view
|
||||
style="
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
"
|
||||
>
|
||||
<view style="width: 50%; height: 70rpx; line-height: 70rpx; font-weight: bold; margin-left: 40rpx">
|
||||
选择工程
|
||||
</view>
|
||||
<u-icon style="width: 10%" name="close" color="#000" size="24" @click="closePopup"></u-icon>
|
||||
</view>
|
||||
<scroll-view style="width: 100%; height: 50vh; background-color: #fff" scroll-y="true">
|
||||
<view
|
||||
v-for="(item, index) in proList"
|
||||
:key="index"
|
||||
style="padding: 20rpx"
|
||||
v-if="item.isActive == 1"
|
||||
@click="chosenPro(item)"
|
||||
>
|
||||
{{ item.abbreviation }}
|
||||
</view>
|
||||
<scroll-view style="width: 100%;height: 50vh;background-color: #fff;" scroll-y="true">
|
||||
<view v-for="(item,index) in proList" :key="index" style="padding: 20rpx;" v-if="item.isActive==1" @click="chosenPro(item)">{{item.abbreviation}}</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
|
@ -293,10 +319,10 @@ export default {
|
|||
return {
|
||||
userId: uni.getStorageSync('userId'),
|
||||
tabbar: TabbarConfig,
|
||||
type:uni.getStorageSync('realNameUser').type,
|
||||
subId:uni.getStorageSync('realNameUser').subId,
|
||||
showPopup:false,
|
||||
proList:[],
|
||||
type: uni.getStorageSync('realNameUser').type,
|
||||
subId: uni.getStorageSync('realNameUser').subId,
|
||||
showPopup: false,
|
||||
proList: [],
|
||||
msgList: [],
|
||||
dataOverviewList: [
|
||||
{
|
||||
|
|
@ -427,7 +453,9 @@ export default {
|
|||
|
||||
maleNum: 0,
|
||||
femaleNum: 0,
|
||||
sexAmount: 0
|
||||
sexAmount: 0,
|
||||
|
||||
colorAmount: 0
|
||||
|
||||
// planProNum: 0,
|
||||
// redPersonNum: 0,
|
||||
|
|
@ -444,15 +472,17 @@ export default {
|
|||
console.log('?? ~ mounted ~ mounted-index:')
|
||||
this.getLogin()
|
||||
this.getHomePageListData()
|
||||
if(this.type.indexOf("4")>-1){//监督端
|
||||
if (this.type.indexOf('4') > -1) {
|
||||
//监督端
|
||||
this.getPro()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.type.indexOf("4")>-1){ //监督端
|
||||
let hasChosenPro=uni.getStorageSync('hasChosenPro')
|
||||
if(!hasChosenPro){
|
||||
this.showPopup=true
|
||||
if (this.type.indexOf('4') > -1) {
|
||||
//监督端
|
||||
let hasChosenPro = uni.getStorageSync('hasChosenPro')
|
||||
if (!hasChosenPro) {
|
||||
this.showPopup = true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -497,10 +527,10 @@ export default {
|
|||
},
|
||||
|
||||
//监督端获取工程列表
|
||||
getPro(){
|
||||
let param={
|
||||
id:-1,
|
||||
subId:this.subId
|
||||
getPro() {
|
||||
let param = {
|
||||
id: -1,
|
||||
subId: this.subId
|
||||
}
|
||||
console.log(param)
|
||||
uni.request({
|
||||
|
|
@ -513,9 +543,9 @@ export default {
|
|||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
res = res.data;
|
||||
if(res.code==200){
|
||||
this.proList = res.data;
|
||||
res = res.data
|
||||
if (res.code == 200) {
|
||||
this.proList = res.data
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
|
|
@ -526,20 +556,20 @@ export default {
|
|||
//展示工程选择弹窗
|
||||
leftClick() {
|
||||
console.log('返回')
|
||||
if(this.type.indexOf("4")>-1){
|
||||
this.showPopup=true;
|
||||
if (this.type.indexOf('4') > -1) {
|
||||
this.showPopup = true
|
||||
}
|
||||
},
|
||||
//选择工程
|
||||
chosenPro(item){
|
||||
chosenPro(item) {
|
||||
let obj = uni.getStorageSync('realNameUser')
|
||||
obj.proId=item.id
|
||||
obj.proId = item.id
|
||||
uni.setStorageSync('realNameUser', obj)
|
||||
uni.setStorageSync('hasChosenPro', "1")
|
||||
this.showPopup=false;
|
||||
uni.setStorageSync('hasChosenPro', '1')
|
||||
this.showPopup = false
|
||||
},
|
||||
closePopup() {
|
||||
this.showPopup=false;
|
||||
this.showPopup = false
|
||||
},
|
||||
openFaceScan() {
|
||||
face.open(['a', 'c'], function (e) {
|
||||
|
|
@ -666,7 +696,88 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
/* 人员考勤等跳转 */
|
||||
onJumpPersonList(title) {
|
||||
let params = ''
|
||||
// 跳转人员列表
|
||||
switch (title) {
|
||||
case '在场考勤率':
|
||||
params = '在场考勤率'
|
||||
break
|
||||
case '作业考勤率':
|
||||
params = '作业考勤率'
|
||||
break
|
||||
case '在场人员(固定)':
|
||||
params = '在场人员(固定)'
|
||||
break
|
||||
case '在场人员(临时)':
|
||||
params = '在场人员(临时)'
|
||||
break
|
||||
case '考勤率(固定人员)':
|
||||
params = '考勤率(固定人员)'
|
||||
break
|
||||
case '考勤率(临时人员)':
|
||||
params = '考勤率(临时人员)'
|
||||
break
|
||||
}
|
||||
|
||||
console.log('params路由参数考勤固定等··', params)
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/personList?xxx=${params}` })
|
||||
},
|
||||
/* 工程概况跳转 */
|
||||
onJumpProjectList(title) {
|
||||
let params = ''
|
||||
// 跳转人员列表
|
||||
switch (title) {
|
||||
case '在建':
|
||||
params = '在建'
|
||||
break
|
||||
case '筹建':
|
||||
params = '筹建'
|
||||
break
|
||||
case '停工':
|
||||
params = '停工'
|
||||
break
|
||||
case '完工':
|
||||
params = '完工'
|
||||
break
|
||||
}
|
||||
|
||||
console.log('params路由参数工程概况', params)
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/project?xxx=${params}` })
|
||||
},
|
||||
/* 在场人员概况跳转人员信息 */
|
||||
onJumpColorLight(type) {
|
||||
let params = ''
|
||||
// 跳转人员列表
|
||||
switch (type) {
|
||||
case 1:
|
||||
params = '绿灯'
|
||||
break
|
||||
case 2:
|
||||
params = '黄灯'
|
||||
break
|
||||
case 3:
|
||||
params = '红灯'
|
||||
break
|
||||
case 4:
|
||||
params = '男性'
|
||||
break
|
||||
case 5:
|
||||
params = '女性'
|
||||
break
|
||||
case 6:
|
||||
params = '固定人员'
|
||||
break
|
||||
case 7:
|
||||
params = '临时人员'
|
||||
break
|
||||
}
|
||||
|
||||
console.log('params路由参数红黄灯以及性别··和固定、临时', params)
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/personList?xxx=${params}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@
|
|||
</uni-card>
|
||||
|
||||
<uni-section title="今日作业计划" type="line">
|
||||
<template v-slot:right>全部人员</template>
|
||||
<template v-slot:right>
|
||||
<view @tap="onSearchAllPerson" style="color: #3f9dfd">全部人员</view>
|
||||
</template>
|
||||
<uni-card :is-shadow="true" margin="6">
|
||||
<view v-for="item in todayWorkList" :key="item.contentId" @tap="onSearchWorkPerson(item.contentId)">
|
||||
<view class="row-1">
|
||||
|
|
@ -53,7 +55,14 @@
|
|||
<uni-section title="作业人员" type="line">
|
||||
<uni-card :is-shadow="true" margin="6" padding="0">
|
||||
<view class="work-person">
|
||||
<view v-for="item in workPersonList" :key="item.idNumber">{{ item.name }}</view>
|
||||
<view
|
||||
:class="getPersonStyle(item)"
|
||||
v-for="item in workPersonList"
|
||||
:key="item.idNumber"
|
||||
@tap="onClickTableTr(item.idNumber)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
</uni-section>
|
||||
|
|
@ -62,10 +71,10 @@
|
|||
<uni-card :is-shadow="true" margin="6" padding="0">
|
||||
<view class="person-card">
|
||||
<view
|
||||
class="blue-border"
|
||||
:class="getItemClass(index)"
|
||||
v-for="(item, index) in holdCardList"
|
||||
:key="index"
|
||||
@tap="onQueryCardDetails(item.certificateName)"
|
||||
@tap="onQueryCardDetails(item)"
|
||||
>
|
||||
{{ item.certificateName }}({{ item.certificateNum }})
|
||||
</view>
|
||||
|
|
@ -79,9 +88,61 @@
|
|||
|
||||
<uni-section title="作业票、站班会照片" type="line" style="padding-bottom: 10rpx">
|
||||
<uni-card :is-shadow="true" margin="6" padding="0">
|
||||
<view>站班会照片</view>
|
||||
<view class="img-container">
|
||||
<view @tap="onPreviewImage(index)" v-for="(item, index) in standGuardList" :key="index">
|
||||
<image class="image-content" :src="item.img_src" mode="scaleToFill" lazy-load="true"></image>
|
||||
|
||||
<uni-icons style="color: #ccc" type="calendar" size="14">{{ item.times }}</uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
</uni-section>
|
||||
|
||||
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
|
||||
<view class="popup-center">
|
||||
<view class="popup-title">
|
||||
<view>持证信息</view>
|
||||
<uni-icons class="close-icon" style="color: #fff" type="close" size="26" @tap="onClosePopup"></uni-icons>
|
||||
</view>
|
||||
|
||||
<uni-section title="持证人员列表" type="line">
|
||||
<template v-slot:right>
|
||||
<view
|
||||
style="
|
||||
padding: 10rpx;
|
||||
border-radius: 12rpx;
|
||||
border: 1px solid #3f9dfd;
|
||||
color: #3f9dfd;
|
||||
background-color: #d5e7f9;
|
||||
"
|
||||
>
|
||||
{{ holdCardTitle }}
|
||||
</view>
|
||||
</template>
|
||||
</uni-section>
|
||||
|
||||
<view class="table-th">
|
||||
<view>持证名称</view>
|
||||
<view>持证人姓名</view>
|
||||
<view>工种</view>
|
||||
</view>
|
||||
|
||||
<view style="padding: 5rpx">
|
||||
<scroll-view style="height: 400rpx" scroll-y="true">
|
||||
<view
|
||||
class="table-tr"
|
||||
v-for="item in holdCardDetailsList"
|
||||
:key="item.idNumber"
|
||||
@tap="onClickTableTr(item.idNumber)"
|
||||
>
|
||||
<view>{{ item.certificateName }}</view>
|
||||
<view>{{ item.name }}</view>
|
||||
<view>{{ item.gz }}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -99,14 +160,45 @@ export default {
|
|||
todayWorkList: [], // 今日计划
|
||||
workPersonList: [], // 作业人员
|
||||
holdCardList: [], // 持证信息
|
||||
standGuardList: [], // 站班信息
|
||||
holdCardTitle: '',
|
||||
holdCardDetailsList: [], // 持证信息详情
|
||||
standGuardList: [
|
||||
{ img_src: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg', times: '9:20:06' },
|
||||
{ img_src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', times: '9:20:06' }
|
||||
], // 站班信息
|
||||
contentId: '',
|
||||
loading: false,
|
||||
commonParams: {
|
||||
proName: '',
|
||||
day: this.$moment().format('YYYY-MM-DD')
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getItemClass() {
|
||||
return index => {
|
||||
const styleIndex = index % 3
|
||||
switch (styleIndex) {
|
||||
case 0:
|
||||
return 'blue-border'
|
||||
case 1:
|
||||
return 'orange-border'
|
||||
case 2:
|
||||
return 'green-border'
|
||||
}
|
||||
}
|
||||
},
|
||||
getPersonStyle() {
|
||||
return item => {
|
||||
const { kqState, userState } = item
|
||||
|
||||
if (userState == 1 && kqState == 1) return 'style_1' // 固定人员 打卡
|
||||
if (userState == 1 && kqState != 1) return 'style_2' // 固定人员 未打卡
|
||||
if (userState != 1 && kqState == 1) return 'style_3' // 临时人员 打卡
|
||||
if (userState != 1 && kqState != 1) return 'style_4' // 临时人员 未打卡
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
leftClick() {
|
||||
uni.navigateTo({ url: '/pages/realName/workPlan/index' })
|
||||
|
|
@ -126,6 +218,7 @@ export default {
|
|||
const response = await getStandGuardImgApi(params)
|
||||
|
||||
this.workPersonList = res.data
|
||||
console.log('人员信息---', res.data)
|
||||
this.holdCardList = res.datac
|
||||
this.standGuardList = response.data
|
||||
},
|
||||
|
|
@ -135,10 +228,43 @@ export default {
|
|||
this.getWorkPersonnelData()
|
||||
},
|
||||
/* 查询持证信息 */
|
||||
async onQueryCardDetails(name) {
|
||||
const params = Object.assign(this.commonParams, { certificateName: name })
|
||||
async onQueryCardDetails(item) {
|
||||
this.holdCardTitle = `${item.certificateName}(${item.certificateNum})`
|
||||
this.$refs.popup.open()
|
||||
const params = Object.assign(this.commonParams, { certificateName: item.certificateName })
|
||||
uni.showLoading({
|
||||
title: '数据加载中'
|
||||
})
|
||||
const res = await getHoldCardInfoApi(params)
|
||||
console.log('resresres持证信息详情--', res)
|
||||
uni.hideLoading()
|
||||
// console.log('resresres持证信息详情--', res)
|
||||
this.holdCardDetailsList = res.data
|
||||
},
|
||||
/* 关闭持证信息弹框 */
|
||||
onClosePopup() {
|
||||
uni.hideLoading()
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
/* 持证详情列表点击事件 */
|
||||
onClickTableTr(id) {
|
||||
// 跳转人员信息页面
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/personDetail?idNumber=${id}` })
|
||||
},
|
||||
/* 全部人员按钮 */
|
||||
onSearchAllPerson() {
|
||||
this.contentId = ''
|
||||
this.getWorkPersonnelData()
|
||||
},
|
||||
/* 预览图片 */
|
||||
onPreviewImage(index) {
|
||||
uni.previewImage({
|
||||
urls: [
|
||||
'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
|
||||
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
|
||||
],
|
||||
current: index,
|
||||
loop: true
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -177,11 +303,27 @@ export default {
|
|||
view {
|
||||
width: 18%;
|
||||
margin: 12rpx 0 12rpx calc(10% / 4);
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 12rpx;
|
||||
// background-color: #3f9dfd;
|
||||
}
|
||||
|
||||
.style_1 {
|
||||
background-color: #3f9dfd;
|
||||
}
|
||||
.style_2 {
|
||||
border: 1px solid #3f9dfd;
|
||||
color: #000;
|
||||
}
|
||||
.style_3 {
|
||||
background-color: #fb1515;
|
||||
}
|
||||
.style_4 {
|
||||
border: 1px solid #fb1515;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.work-person view:nth-child(5n + 1) {
|
||||
|
|
@ -221,4 +363,81 @@ export default {
|
|||
.person-card view:nth-child(3n + 1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.popup-center {
|
||||
width: 90vw;
|
||||
height: 50vh;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
.popup-title {
|
||||
position: relative;
|
||||
background-color: #3f9dfd;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 38rpx;
|
||||
|
||||
.close-icon {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
width: 100%;
|
||||
height: calc(100% - 100rpx);
|
||||
}
|
||||
|
||||
.table-th {
|
||||
display: flex;
|
||||
view {
|
||||
padding: 5rpx 0;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.table-tr {
|
||||
padding: 8rpx 0;
|
||||
display: flex;
|
||||
border-bottom: 1px solid #ccc;
|
||||
view {
|
||||
padding: 5rpx 0;
|
||||
flex: 1;
|
||||
font-size: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.table-tr view:first-child {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.img-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
view {
|
||||
width: 31%;
|
||||
margin: 12rpx 0 12rpx calc(6% / 2);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.image-content {
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.img-container view:nth-child(3n + 1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -26,12 +26,7 @@
|
|||
</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="scroll-item" v-for="(item, index) in companyInfoList" :key="item.proId">
|
||||
<view class="item-1">
|
||||
<view>{{ index + 1 }}</view>
|
||||
<view>{{ item.proName }}</view>
|
||||
|
|
@ -42,16 +37,17 @@
|
|||
:style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"
|
||||
></uni-icons>
|
||||
</view>
|
||||
<view class="item-2">
|
||||
<view class="item-2" @tap="onViewWorkDetails(item)">
|
||||
<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>
|
||||
<text v-if="item.kjsfx > 0" style="color: #6ff6d5; margin-right: 6rpx">可接受风险:{{ item.kjsfx }}</text>
|
||||
<text v-if="item.dfx > 0" style="color: #25c294; margin-right: 6rpx">低风险:{{ item.dfx }}</text>
|
||||
<text v-if="item.zfx > 0" style="color: #f9971e; margin-right: 6rpx">中风险:{{ item.zfx }}</text>
|
||||
<text v-if="item.gfx > 0" style="color: #f44d46; margin-right: 6rpx">高风险:{{ item.gfx }}</text>
|
||||
<text v-if="item.tgfx > 0" style="color: #f91008; margin-right: 6rpx">特高风险:{{ item.tgfx }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-3">
|
||||
<view class="item-3" @tap="onViewWorkDetails(item)">
|
||||
<view>作业人数</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.personNum }}</view>
|
||||
</view>
|
||||
|
|
@ -118,7 +114,6 @@ export default {
|
|||
methods: {
|
||||
/* 获取作业计划列表 */
|
||||
async getWorkPlantData() {
|
||||
console.log('this.queryParams参数', this.queryParams)
|
||||
uni.request({
|
||||
url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg',
|
||||
method: 'POST',
|
||||
|
|
@ -128,9 +123,10 @@ export default {
|
|||
// token: this.token
|
||||
},
|
||||
success: res => {
|
||||
console.log('res****', res)
|
||||
this.recordsTotal = res.data.recordsTotal
|
||||
this.companyInfoList = res.data.data
|
||||
|
||||
console.log('resssss作业计划列表信息', res)
|
||||
},
|
||||
fail: err => {}
|
||||
})
|
||||
|
|
@ -193,6 +189,7 @@ export default {
|
|||
success: res => {
|
||||
if (res.data.code === 200) {
|
||||
uni.showToast({ icon: 'none', title: ` ${row.isCollect == 0 ? '收藏成功' : '已取消收藏'}` })
|
||||
this.getWorkPlantData()
|
||||
}
|
||||
},
|
||||
fail: err => {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue