Merge branch 'main' of http://192.168.0.56:3000/hywen/YNUtdPlatform
This commit is contained in:
commit
d483fcff4c
|
|
@ -13,7 +13,7 @@
|
||||||
"type" : "uniCloud"
|
"type" : "uniCloud"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"playground" : "standard",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -6,14 +6,15 @@
|
||||||
placeholder
|
placeholder
|
||||||
@leftClick="leftClick"
|
@leftClick="leftClick"
|
||||||
leftIconColor="#fff"
|
leftIconColor="#fff"
|
||||||
rightIcon="list" @rightClick="goIndex"
|
rightIcon="list"
|
||||||
|
@rightClick="goIndex"
|
||||||
bgColor="#00337A"
|
bgColor="#00337A"
|
||||||
:titleStyle="{ color: '#FFF', fontSize: '32rpx' }"
|
:titleStyle="{ color: '#FFF', fontSize: '32rpx' }"
|
||||||
>
|
>
|
||||||
<view class="u-nav-slot" slot="right">
|
<view class="u-nav-slot" slot="right">
|
||||||
<text style="color: #FFF;">首页</text>
|
<text style="color: #fff">首页</text>
|
||||||
</view>
|
</view>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<view class="header-fixed">
|
<view class="header-fixed">
|
||||||
<view class="search-content">
|
<view class="search-content">
|
||||||
<view style="width: 90%">
|
<view style="width: 90%">
|
||||||
|
|
@ -29,98 +30,113 @@
|
||||||
<view style="margin-top: 20rpx; color: #3f9dfd; letter-spacing: 2rpx">已查询{{ recordsTotal }}条数据</view>
|
<view style="margin-top: 20rpx; color: #3f9dfd; letter-spacing: 2rpx">已查询{{ recordsTotal }}条数据</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding: 0 20rpx">
|
<view style="padding: 0 20rpx">
|
||||||
<u-list class="data-container" @scrolltolower="scrolltolower" height="74vh" >
|
<u-list class="data-container" @scrolltolower="scrolltolower" height="74vh">
|
||||||
<view v-if="companyInfoList.length==0" style="width: 96%;height: 60vh;display: flex;flex-direction: column;justify-content: center;align-items: center;" >
|
<view
|
||||||
<image src="../../../../static/realName/noData.png" style="width: 100rpx;height: 120rpx;" mode=""></image>
|
v-if="companyInfoList.length == 0"
|
||||||
<view>暂无数据</view>
|
style="
|
||||||
</view>
|
width: 96%;
|
||||||
<u-list-item v-for="(item, index) in companyInfoList" v-if="companyInfoList.length>0" :key="index">
|
height: 60vh;
|
||||||
<view class="scroll-item">
|
display: flex;
|
||||||
<view class="item-1">
|
flex-direction: column;
|
||||||
<view>{{ index + 1 }}</view>
|
justify-content: center;
|
||||||
<view style="width: 80%;">{{ item.proName }}</view>
|
align-items: center;
|
||||||
<uni-icons :type="item.isCollect == 1 ? 'star-filled' : 'star'" size="20" @click="onCollection($event, item)" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }" style="position: absolute;right: 1%;"></uni-icons>
|
"
|
||||||
</view>
|
>
|
||||||
|
<image src="../../../../static/realName/noData.png" style="width: 100rpx; height: 120rpx" mode=""></image>
|
||||||
<view class="item-2">
|
<view>暂无数据</view>
|
||||||
<view>{{ item.subComName }}</view>
|
</view>
|
||||||
<view>{{ item.voltageLevel }}</view>
|
<u-list-item v-for="(item, index) in companyInfoList" v-if="companyInfoList.length > 0" :key="index">
|
||||||
<view>{{ item.proType }}</view>
|
<view class="scroll-item">
|
||||||
<view>{{ item.proStatusName }}</view>
|
<view class="item-1">
|
||||||
</view>
|
<view>{{ index + 1 }}</view>
|
||||||
<view class="item-3">
|
<view style="width: 80%">{{ item.proName }}</view>
|
||||||
<view
|
<uni-icons
|
||||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
:type="item.isCollect == 1 ? 'star-filled' : 'star'"
|
||||||
@tap="goSubListPage(item)"
|
size="20"
|
||||||
>
|
@click="onCollection($event, item)"
|
||||||
<view>分包</view>
|
:style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"
|
||||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.subNum }}</view>
|
style="position: absolute; right: 1%"
|
||||||
</view>
|
></uni-icons>
|
||||||
<view
|
</view>
|
||||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
|
||||||
@tap="goTeamListPage(item)"
|
<view class="item-2">
|
||||||
>
|
<view>{{ item.subComName }}</view>
|
||||||
<view>班组</view>
|
<view>{{ item.voltageLevel }}</view>
|
||||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.teamNum }}</view>
|
<view>{{ item.proType }}</view>
|
||||||
</view>
|
<view>{{ item.proStatusName }}</view>
|
||||||
<view
|
</view>
|
||||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
<view class="item-3">
|
||||||
@tap="goAttPersonListPage(item)"
|
<view
|
||||||
>
|
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||||
<view>考勤人数</view>
|
@tap="goSubListPage(item)"
|
||||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.attPersonNum }}</view>
|
>
|
||||||
</view>
|
<view>分包</view>
|
||||||
</view>
|
<view style="color: #3f9dfd; font-weight: bold">{{ item.subNum }}</view>
|
||||||
<view class="item-3">
|
</view>
|
||||||
<view
|
<view
|
||||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||||
@tap="goAllPersonListPage(item)"
|
@tap="goTeamListPage(item)"
|
||||||
>
|
>
|
||||||
<view>在场</view>
|
<view>班组</view>
|
||||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.einPersonNum }}</view>
|
<view style="color: #3f9dfd; font-weight: bold">{{ item.teamNum }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||||
@tap="goWorkPersonListPage(item)"
|
@tap="goAttPersonListPage(item)"
|
||||||
>
|
>
|
||||||
<view>固定</view>
|
<view>考勤人数</view>
|
||||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.formalPersonNum }}</view>
|
<view style="color: #3f9dfd; font-weight: bold">{{ item.attPersonNum }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
</view>
|
||||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
<view class="item-3">
|
||||||
@tap="goTempPersonListPage(item)"
|
<view
|
||||||
>
|
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||||
<view>临时</view>
|
@tap="goAllPersonListPage(item)"
|
||||||
<view style="color: #3f9dfd; font-weight: bold">{{ item.temporaryPersonNum }}</view>
|
>
|
||||||
</view>
|
<view>在场</view>
|
||||||
</view>
|
<view style="color: #3f9dfd; font-weight: bold">{{ item.einPersonNum }}</view>
|
||||||
<view class="item-3">
|
</view>
|
||||||
<view
|
<view
|
||||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||||
@tap="goLightPersonListPage(item, 2)"
|
@tap="goWorkPersonListPage(item)"
|
||||||
>
|
>
|
||||||
<view>绿灯</view>
|
<view>固定</view>
|
||||||
<view style="color: #3fb779; font-weight: bold">{{ item.greenPersonNum }}</view>
|
<view style="color: #3f9dfd; font-weight: bold">{{ item.formalPersonNum }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||||
@tap="goLightPersonListPage(item, 1)"
|
@tap="goTempPersonListPage(item)"
|
||||||
>
|
>
|
||||||
<view>黄灯</view>
|
<view>临时</view>
|
||||||
<view style="color: #e89c2d; font-weight: bold">{{ item.yellowPersonNum }}</view>
|
<view style="color: #3f9dfd; font-weight: bold">{{ item.temporaryPersonNum }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
</view>
|
||||||
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
<view class="item-3">
|
||||||
@tap="goLightPersonListPage(item, 0)"
|
<view
|
||||||
>
|
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||||
<view>红灯</view>
|
@tap="goLightPersonListPage(item, 2)"
|
||||||
<view style="color: #e8717f; font-weight: bold">{{ item.redPersonNum }}</view>
|
>
|
||||||
</view>
|
<view>绿灯</view>
|
||||||
</view>
|
<view style="color: #3fb779; font-weight: bold">{{ item.greenPersonNum }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
</u-list-item>
|
style="width: 25%; margin: 0 20rpx; display: flex; align-items: center; justify-content: space-between"
|
||||||
</u-list>
|
@tap="goLightPersonListPage(item, 1)"
|
||||||
|
>
|
||||||
|
<view>黄灯</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>红灯</view>
|
||||||
|
<view style="color: #e8717f; font-weight: bold">{{ item.redPersonNum }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-list-item>
|
||||||
|
</u-list>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 底部弹框 -->
|
<!-- 底部弹框 -->
|
||||||
|
|
@ -211,7 +227,7 @@ export default {
|
||||||
token: uni.getStorageSync('tjToken'),
|
token: uni.getStorageSync('tjToken'),
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
page: 0,
|
page: 0,
|
||||||
offset: 0,
|
offset: 0,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: {
|
params: {
|
||||||
|
|
@ -223,7 +239,7 @@ export default {
|
||||||
proType: ''
|
proType: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isLoading:false,
|
isLoading: false,
|
||||||
companyList: [{ name: '全部', id: '' }],
|
companyList: [{ name: '全部', id: '' }],
|
||||||
proStatusList: [{ name: '全部', id: '' }],
|
proStatusList: [{ name: '全部', id: '' }],
|
||||||
levelList: [{ name: '全部', id: '' }],
|
levelList: [{ name: '全部', id: '' }],
|
||||||
|
|
@ -243,61 +259,61 @@ export default {
|
||||||
const { currentIndex, name } = voltageLevel
|
const { currentIndex, name } = voltageLevel
|
||||||
this.activeIndex3 = currentIndex + 1
|
this.activeIndex3 = currentIndex + 1
|
||||||
this.queryParams.params.voltageLevel = this.levelList[currentIndex + 1].id
|
this.queryParams.params.voltageLevel = this.levelList[currentIndex + 1].id
|
||||||
this.getListData()
|
this.getListData()
|
||||||
} else if (option.proType) {
|
} else if (option.proType) {
|
||||||
// 获取工程类型
|
// 获取工程类型
|
||||||
const proType = JSON.parse(option.proType)
|
const proType = JSON.parse(option.proType)
|
||||||
const { currentIndex, name } = proType
|
const { currentIndex, name } = proType
|
||||||
this.activeIndex4 = currentIndex + 1
|
this.activeIndex4 = currentIndex + 1
|
||||||
this.queryParams.params.proType = this.proTypeList[currentIndex + 1].id
|
this.queryParams.params.proType = this.proTypeList[currentIndex + 1].id
|
||||||
this.getListData()
|
this.getListData()
|
||||||
} else if (option.survey) {
|
} else if (option.survey) {
|
||||||
// 获取工程概况
|
// 获取工程概况
|
||||||
const survey = JSON.parse(option.survey)
|
const survey = JSON.parse(option.survey)
|
||||||
const { currentIndex, name } = survey
|
const { currentIndex, name } = survey
|
||||||
this.activeIndex2 = currentIndex
|
this.activeIndex2 = currentIndex
|
||||||
this.queryParams.params.proStatus = this.proStatusList[currentIndex].id
|
this.queryParams.params.proStatus = this.proStatusList[currentIndex].id
|
||||||
this.getListData()
|
this.getListData()
|
||||||
} else if(option.proStatus&&option.proStatus==0){//在建
|
} else if (option.proStatus && option.proStatus == 0) {
|
||||||
this.activeIndex2=1
|
//在建
|
||||||
this.queryParams.params.proStatus = "0"
|
this.activeIndex2 = 1
|
||||||
this.getListData()
|
this.queryParams.params.proStatus = '0'
|
||||||
}else{
|
this.getListData()
|
||||||
this.getListData()
|
} else {
|
||||||
}
|
this.getListData()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//下拉分页
|
//下拉分页
|
||||||
scrolltolower(){
|
scrolltolower() {
|
||||||
this.queryParams.limit=10
|
this.queryParams.limit = 10
|
||||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||||
if (this.queryParams.page * this.queryParams.limit >= this.recordsTotal) {
|
if (this.queryParams.page * this.queryParams.limit >= this.recordsTotal) {
|
||||||
uni.$u.toast('数据加载完毕')
|
uni.$u.toast('数据加载完毕')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.queryParams.page++
|
this.queryParams.page++
|
||||||
//页码+1,调用获取数据的方法获取第二页数据
|
//页码+1,调用获取数据的方法获取第二页数据
|
||||||
if(this.queryParams.page==0){
|
if (this.queryParams.page == 0) {
|
||||||
this.queryParams.offset=0;
|
this.queryParams.offset = 0
|
||||||
}else{
|
} else {
|
||||||
this.queryParams.offset=this.queryParams.page * this.queryParams.limit;
|
this.queryParams.offset = this.queryParams.page * this.queryParams.limit
|
||||||
}
|
}
|
||||||
//此处调用自己获取数据列表的方法
|
//此处调用自己获取数据列表的方法
|
||||||
this.getListData()
|
this.getListData()
|
||||||
},
|
},
|
||||||
searchList(){
|
searchList() {
|
||||||
this.queryParams.page=0
|
this.queryParams.page = 0
|
||||||
this.companyInfoList=[]
|
this.companyInfoList = []
|
||||||
this.getListData()
|
this.getListData()
|
||||||
},
|
},
|
||||||
/* 获取作业计划列表 */
|
/* 获取作业计划列表 */
|
||||||
async getListData() {
|
async getListData() {
|
||||||
this.queryParams.offset=this.queryParams.offset+""
|
this.queryParams.offset = this.queryParams.offset + ''
|
||||||
this.queryParams.limit=this.queryParams.limit+""
|
this.queryParams.limit = this.queryParams.limit + ''
|
||||||
console.log('this.queryParams参数', this.queryParams)
|
console.log('this.queryParams参数', this.queryParams)
|
||||||
this.isLoading=true
|
this.isLoading = true
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.realBmwUrl + '/homeSubPage/getAppBuildPro',
|
url: config.realBmwUrl + '/homeSubPage/getAppBuildPro',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
@ -308,22 +324,24 @@ export default {
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log('res****', res)
|
console.log('res****', res)
|
||||||
if(res.data.data?.length>0){
|
if (res.data.data?.length > 0) {
|
||||||
if(this.queryParams.offset == 0){
|
if (this.queryParams.offset == 0) {
|
||||||
this.companyInfoList = res.data.data
|
this.companyInfoList = res.data.data
|
||||||
}else{
|
} else {
|
||||||
this.companyInfoList = [...this.companyInfoList, ...res.data.data];
|
this.companyInfoList = [...this.companyInfoList, ...res.data.data]
|
||||||
}
|
}
|
||||||
this.recordsTotal = res.data.recordsTotal
|
this.recordsTotal = res.data.recordsTotal
|
||||||
this.companyInfoList.forEach(item=>{
|
this.companyInfoList.forEach(item => {
|
||||||
// console.log(item.proStatus)
|
// console.log(item.proStatus)
|
||||||
let index = Number(item.proStatus)+1
|
let index = Number(item.proStatus) + 1
|
||||||
item.proStatusName=this.proStatusList[index].name
|
item.proStatusName = this.proStatusList[index].name
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.isLoading=false
|
this.isLoading = false
|
||||||
},
|
},
|
||||||
fail: err => {this.isLoading=false}
|
fail: err => {
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/* 获取公司数据 */
|
/* 获取公司数据 */
|
||||||
|
|
@ -336,7 +354,8 @@ export default {
|
||||||
this.levelList = this.levelList.concat(res.levelList)
|
this.levelList = this.levelList.concat(res.levelList)
|
||||||
},
|
},
|
||||||
leftClick() {
|
leftClick() {
|
||||||
uni.navigateTo({ url: `/pages/realName/index/index` })
|
// uni.navigateTo({ url: `/pages/realName/index/index` })
|
||||||
|
uni.navigateBack()
|
||||||
},
|
},
|
||||||
onSearchFilter() {
|
onSearchFilter() {
|
||||||
// 打开底部弹框
|
// 打开底部弹框
|
||||||
|
|
@ -389,8 +408,8 @@ export default {
|
||||||
},
|
},
|
||||||
/* 查询 */
|
/* 查询 */
|
||||||
onQuery() {
|
onQuery() {
|
||||||
this.queryParams.page=0
|
this.queryParams.page = 0
|
||||||
this.companyInfoList=[]
|
this.companyInfoList = []
|
||||||
this.getListData().then(() => {
|
this.getListData().then(() => {
|
||||||
this.$refs.popup.close()
|
this.$refs.popup.close()
|
||||||
})
|
})
|
||||||
|
|
@ -424,12 +443,12 @@ export default {
|
||||||
//绿2 黄1 红0
|
//绿2 黄1 红0
|
||||||
uni.navigateTo({ url: `/pages/realName/index/pages/personList?proId=${row.proId}&lightStatus=${type}` })
|
uni.navigateTo({ url: `/pages/realName/index/pages/personList?proId=${row.proId}&lightStatus=${type}` })
|
||||||
},
|
},
|
||||||
goIndex() {
|
goIndex() {
|
||||||
uni.navigateTo({ url: `/pages/realName/index/index` })
|
uni.navigateTo({ url: `/pages/realName/index/index` })
|
||||||
},
|
},
|
||||||
/* 收藏与取消收藏 */
|
/* 收藏与取消收藏 */
|
||||||
onCollection(e, row) {
|
onCollection(e, row) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
const params = {
|
const params = {
|
||||||
id: row.collectId,
|
id: row.collectId,
|
||||||
userId: uni.getStorageSync('realNameUser').userId,
|
userId: uni.getStorageSync('realNameUser').userId,
|
||||||
|
|
@ -437,7 +456,7 @@ export default {
|
||||||
type: 1
|
type: 1
|
||||||
}
|
}
|
||||||
uni.request({
|
uni.request({
|
||||||
url: `${config.realAppUrl}${ row.isCollect == 0 ? '/offLine/insertCollect' : '/offLine/deleteCollect'}`,
|
url: `${config.realAppUrl}${row.isCollect == 0 ? '/offLine/insertCollect' : '/offLine/deleteCollect'}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: JSON.stringify(params),
|
data: JSON.stringify(params),
|
||||||
header: {
|
header: {
|
||||||
|
|
@ -492,11 +511,11 @@ export default {
|
||||||
height: 75vh;
|
height: 75vh;
|
||||||
|
|
||||||
.scroll-item {
|
.scroll-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
margin: 20rpx 0;
|
margin: 20rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-1,
|
.item-1,
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,8 @@ export default {
|
||||||
this.companyList = this.companyList.concat(res.subList)
|
this.companyList = this.companyList.concat(res.subList)
|
||||||
},
|
},
|
||||||
leftClick() {
|
leftClick() {
|
||||||
uni.navigateTo({ url: `/pages/realName/index/index` })
|
// uni.navigateTo({ url: `/pages/realName/index/index` })
|
||||||
|
uni.navigateBack()
|
||||||
},
|
},
|
||||||
onSearchFilter() {
|
onSearchFilter() {
|
||||||
// 打开底部弹框
|
// 打开底部弹框
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue