Merge branch 'main' of http://192.168.0.56:3000/hywen/YNUtdPlatform
This commit is contained in:
commit
d75d83995d
|
|
@ -147,7 +147,7 @@ export default {
|
|||
res.data.proMsgBean
|
||||
setTimeout(() => {
|
||||
let data = {
|
||||
categories: ['基建线路', '基建变电', '生产线路', '生成变电', '配网', '其他'],
|
||||
categories: ['基建线路', '基建变电', '生产线路', '生产变电', '配网', '其他'],
|
||||
series: [
|
||||
{
|
||||
name: '',
|
||||
|
|
@ -164,7 +164,11 @@ export default {
|
|||
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}` })
|
||||
const proType = {
|
||||
currentIndex,
|
||||
name: currenName
|
||||
}
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/project?proType=${JSON.stringify(proType)}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,13 @@ export default {
|
|||
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}` })
|
||||
|
||||
// 电压等级信息
|
||||
const voltageLevel = {
|
||||
currentIndex,
|
||||
name: currenRows.name
|
||||
}
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/project?voltageLevel=${JSON.stringify(voltageLevel)}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -694,7 +694,6 @@ export default {
|
|||
if (item.data_title == '今日打卡') {
|
||||
uni.navigateTo({ url: '/pages/realName/index/pages/personList?isAtt=0' })
|
||||
}
|
||||
|
||||
},
|
||||
/* 人员考勤等跳转 */
|
||||
onJumpPersonList(title) {
|
||||
|
|
@ -729,25 +728,34 @@ export default {
|
|||
},
|
||||
/* 工程概况跳转 */
|
||||
onJumpProjectList(title) {
|
||||
let params = ''
|
||||
let name = ''
|
||||
let currentIndex = 0
|
||||
// 跳转人员列表
|
||||
switch (title) {
|
||||
case '在建':
|
||||
params = '在建'
|
||||
break
|
||||
case '筹建':
|
||||
params = '筹建'
|
||||
break
|
||||
case '停工':
|
||||
params = '停工'
|
||||
name = '在建'
|
||||
currentIndex = 1
|
||||
break
|
||||
case '完工':
|
||||
params = '完工'
|
||||
name = '完工'
|
||||
currentIndex = 2
|
||||
break
|
||||
case '筹建':
|
||||
name = '筹建'
|
||||
currentIndex = 3
|
||||
break
|
||||
case '停工':
|
||||
name = '停工'
|
||||
currentIndex = 4
|
||||
break
|
||||
}
|
||||
|
||||
console.log('params路由参数工程概况', params)
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/project?xxx=${params}` })
|
||||
// 概况
|
||||
const survey = {
|
||||
name,
|
||||
currentIndex
|
||||
}
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/project?survey=${JSON.stringify(survey)}` })
|
||||
},
|
||||
/* 在场人员概况跳转人员信息 */
|
||||
onJumpColorLight(type) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="在建工程" placeholder @leftClick="leftClick"
|
||||
leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<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%;">
|
||||
<view style="width: 90%">
|
||||
<uni-easyinput
|
||||
suffixIcon="search"
|
||||
v-model="queryParams.params.proName"
|
||||
|
|
@ -23,7 +30,13 @@
|
|||
<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' : '' }" style="position: absolute;right: 1%;"></uni-icons>
|
||||
<uni-icons
|
||||
:type="item.isCollect == 1 ? 'star-filled' : 'star'"
|
||||
size="20"
|
||||
@catchtap="onCollection($event, item)"
|
||||
:style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"
|
||||
style="position: absolute; right: 1%"
|
||||
></uni-icons>
|
||||
</view>
|
||||
<view class="item-2">
|
||||
<view>{{ item.subComName }}</view>
|
||||
|
|
@ -32,45 +45,72 @@
|
|||
<view>{{ item.proStatus }}</view>
|
||||
</view>
|
||||
<view class="item-3">
|
||||
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goSubListPage(item)">
|
||||
<view
|
||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||
@tap="goSubListPage(item)"
|
||||
>
|
||||
<view>分包</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.subNum }}</view>
|
||||
</view>
|
||||
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goTeamListPage(item)">
|
||||
<view
|
||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||
@tap="goTeamListPage(item)"
|
||||
>
|
||||
<view>班组</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.teamNum }}</view>
|
||||
</view>
|
||||
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goAttPersonListPage(item)">
|
||||
<view
|
||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||
@tap="goAttPersonListPage(item)"
|
||||
>
|
||||
<view>考勤人数</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.attPersonNum }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-3">
|
||||
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goAllPersonListPage(item)">
|
||||
<view
|
||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||
@tap="goAllPersonListPage(item)"
|
||||
>
|
||||
<view>在场</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.einPersonNum }}</view>
|
||||
</view>
|
||||
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goWorkPersonListPage(item)">
|
||||
<view
|
||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||
@tap="goWorkPersonListPage(item)"
|
||||
>
|
||||
<view>固定</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.formalPersonNum }}</view>
|
||||
</view>
|
||||
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goTempPersonListPage(item)">
|
||||
<view
|
||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||
@tap="goTempPersonListPage(item)"
|
||||
>
|
||||
<view>临时</view>
|
||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.temporaryPersonNum }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-3">
|
||||
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goLightPersonListPage(item,2)">
|
||||
<view
|
||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||
@tap="goLightPersonListPage(item, 2)"
|
||||
>
|
||||
<view>绿灯</view>
|
||||
<view style="color: #3FB779; font-weight: bold">{{item.greenPersonNum}}</view>
|
||||
<view style="color: #3fb779; font-weight: bold">{{ item.greenPersonNum }}</view>
|
||||
</view>
|
||||
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goLightPersonListPage(item,1)">
|
||||
<view
|
||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||
@tap="goLightPersonListPage(item, 1)"
|
||||
>
|
||||
<view>黄灯</view>
|
||||
<view style="color: #E89C2D; font-weight: bold">{{item.yellowPersonNum}}</view>
|
||||
<view style="color: #e89c2d; font-weight: bold">{{ item.yellowPersonNum }}</view>
|
||||
</view>
|
||||
<view style="width: 25%;margin:0 20rpx;display: flex;align-items: center;justify-content: space-between;" @tap="goLightPersonListPage(item,0)">
|
||||
<view
|
||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||
@tap="goLightPersonListPage(item, 0)"
|
||||
>
|
||||
<view>红灯</view>
|
||||
<view style="color: #E8717F; font-weight: bold">{{item.redPersonNum}}</view>
|
||||
<view style="color: #e8717f; font-weight: bold">{{ item.redPersonNum }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -86,7 +126,8 @@
|
|||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in companyList" :key="index"
|
||||
v-for="(item, index) in companyList"
|
||||
:key="index"
|
||||
:class="{ active: index === activeIndex }"
|
||||
@tap="onSelectCompany(index, item.id)"
|
||||
>
|
||||
|
|
@ -100,9 +141,10 @@
|
|||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in proStatusList" :key="index"
|
||||
v-for="(item, index) in proStatusList"
|
||||
:key="index"
|
||||
:class="{ active: index === activeIndex2 }"
|
||||
@tap="onSelectStatus(index, item.name)"
|
||||
@tap="onSelectStatus(index, item.id)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
|
|
@ -114,9 +156,10 @@
|
|||
<scroll-view class="company-container" scroll-y="true">
|
||||
<view class="company-items">
|
||||
<view
|
||||
v-for="(item, index) in levelList" :key="index"
|
||||
v-for="(item, index) in levelList"
|
||||
:key="index"
|
||||
:class="{ active: index === activeIndex3 }"
|
||||
@tap="onSelectLevel(index, item.name)"
|
||||
@tap="onSelectLevel(index, item.id)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
|
|
@ -125,10 +168,11 @@
|
|||
</view>
|
||||
<h2>工程类型</h2>
|
||||
<view>
|
||||
<scroll-view class="company-container" scroll-y="true" style="padding-bottom: 120rpx;">
|
||||
<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"
|
||||
v-for="(item, index) in proTypeList"
|
||||
:key="index"
|
||||
:class="{ active: index === activeIndex4 }"
|
||||
@tap="onSelectType(index, item.name)"
|
||||
>
|
||||
|
|
@ -138,8 +182,6 @@
|
|||
</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>
|
||||
|
|
@ -163,27 +205,53 @@ export default {
|
|||
token: uni.getStorageSync('tjToken'),
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
offset: "0",
|
||||
limit: "999999",
|
||||
offset: '0',
|
||||
limit: '999999',
|
||||
params: {
|
||||
userId: uni.getStorageSync('realNameUser').userId + '',
|
||||
proName:"",
|
||||
subComId:"",
|
||||
proStatus:"",
|
||||
voltageLevel:"",
|
||||
proType:"",
|
||||
proName: '',
|
||||
subComId: '',
|
||||
proStatus: '',
|
||||
voltageLevel: '',
|
||||
proType: ''
|
||||
}
|
||||
},
|
||||
companyList: [{ name: '全部', id: '' }],
|
||||
proStatusList: [{ name: '全部', id: '' }],
|
||||
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' }],
|
||||
levelList: [{ name: '全部', id: '' }],
|
||||
proTypeList: [{ name: '全部', id: '' }],
|
||||
companyInfoList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// mounted() {
|
||||
|
||||
// },
|
||||
|
||||
onLoad(option) {
|
||||
this.getHomePageSelectData().then(() => {
|
||||
if (option.voltageLevel) {
|
||||
// 获取电压等级
|
||||
const voltageLevel = JSON.parse(option.voltageLevel)
|
||||
const { currentIndex, name } = voltageLevel
|
||||
this.activeIndex3 = currentIndex + 1
|
||||
this.queryParams.params.voltageLevel = this.levelList[currentIndex + 1].id
|
||||
}
|
||||
if (option.proType) {
|
||||
// 获取工程类型
|
||||
const proType = JSON.parse(option.proType)
|
||||
const { currentIndex, name } = proType
|
||||
this.activeIndex4 = currentIndex + 1
|
||||
this.queryParams.params.proType = name
|
||||
}
|
||||
if (option.survey) {
|
||||
// 获取工程概况
|
||||
const survey = JSON.parse(option.survey)
|
||||
const { currentIndex, name } = survey
|
||||
this.activeIndex2 = currentIndex
|
||||
this.queryParams.params.proStatus = this.proStatusList[currentIndex].id
|
||||
}
|
||||
this.getListData()
|
||||
this.getHomePageSelectData()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/* 获取作业计划列表 */
|
||||
|
|
@ -208,7 +276,7 @@ export default {
|
|||
/* 获取公司数据 */
|
||||
async getHomePageSelectData() {
|
||||
const res = await getHomePageSelectApi()
|
||||
console.log(res)
|
||||
console.log('resresres', res)
|
||||
this.companyList = this.companyList.concat(res.subList)
|
||||
this.proTypeList = this.proTypeList.concat(res.proType)
|
||||
this.proStatusList = this.proStatusList.concat(res.proStatusList)
|
||||
|
|
@ -297,7 +365,8 @@ export default {
|
|||
uni.navigateTo({ url: `/pages/realName/index/pages/personList?proId=${row.proId}&workerType=0` })
|
||||
},
|
||||
/* 点击跳转人员-灯 */
|
||||
goLightPersonListPage(row,type) {//绿2 黄1 红0
|
||||
goLightPersonListPage(row, type) {
|
||||
//绿2 黄1 红0
|
||||
uni.navigateTo({ url: `/pages/realName/index/pages/personList?proId=${row.proId}&lightStatus=${type}` })
|
||||
},
|
||||
|
||||
|
|
@ -337,14 +406,14 @@ export default {
|
|||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #EFEFEF;
|
||||
background-color: #efefef;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header-fixed {
|
||||
width: 94%;
|
||||
margin: 20rpx auto;
|
||||
background-color: #FFF;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 20rpx;
|
||||
|
||||
|
|
|
|||
|
|
@ -90,9 +90,14 @@
|
|||
<uni-card :is-shadow="true" margin="6" padding="0">
|
||||
<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>
|
||||
<image
|
||||
class="image-content"
|
||||
:src="`${config.loginBaseUrl}ynPlan${item.imgPath}`"
|
||||
mode="scaleToFill"
|
||||
lazy-load="true"
|
||||
></image>
|
||||
|
||||
<uni-icons style="color: #ccc" type="calendar" size="14">{{ item.times }}</uni-icons>
|
||||
<uni-icons style="color: #ccc" type="calendar" size="14">{{ item.crateTime }}</uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
|
|
@ -153,6 +158,7 @@ import {
|
|||
getStandGuardImgApi,
|
||||
getHoldCardInfoApi
|
||||
} from '../../../api/phaseTwo/homePage'
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -163,10 +169,11 @@ export default {
|
|||
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' }
|
||||
// { 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: '',
|
||||
imgList: [], // 班组图片信息 作为预览使用
|
||||
loading: false,
|
||||
commonParams: {
|
||||
proName: '',
|
||||
|
|
@ -221,6 +228,10 @@ export default {
|
|||
console.log('人员信息---', res.data)
|
||||
this.holdCardList = res.datac
|
||||
this.standGuardList = response.data
|
||||
|
||||
this.imgList = this.standGuardList.map(e => {
|
||||
return `${config.loginBaseUrl}ynPlan${e.imgPath}`
|
||||
})
|
||||
},
|
||||
/* 点击作业计划时查询作业人员 */
|
||||
onSearchWorkPerson(id) {
|
||||
|
|
@ -258,10 +269,11 @@ export default {
|
|||
/* 预览图片 */
|
||||
onPreviewImage(index) {
|
||||
uni.previewImage({
|
||||
urls: [
|
||||
'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
|
||||
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
|
||||
],
|
||||
// urls: [
|
||||
// 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
|
||||
// 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
|
||||
// ],
|
||||
urls: this.imgList,
|
||||
current: index,
|
||||
loop: true
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue