diff --git a/pages/realName/index/components/pie-charts-model-ring-two.vue b/pages/realName/index/components/pie-charts-model-ring-two.vue index 58dac3e..fe9f6ad 100644 --- a/pages/realName/index/components/pie-charts-model-ring-two.vue +++ b/pages/realName/index/components/pie-charts-model-ring-two.vue @@ -151,7 +151,17 @@ 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/personList?xxx=${currenRows.name}` }) + if(currenRows.name=="普工"){ + uni.navigateTo({ url: `/pages/realName/index/pages/personList?selectType=3&postName=${currenRows.name}`}) + }else if(currenRows.name=="技工"){ + uni.navigateTo({ url: `/pages/realName/index/pages/personList?selectType=3&postName=${currenRows.name}`}) + }else if(currenRows.name=="高空"){ + uni.navigateTo({ url: `/pages/realName/index/pages/personList?selectType=3&postName=${currenRows.name}`}) + }else if(currenRows.name=="电焊"){ + uni.navigateTo({ url: `/pages/realName/index/pages/personList?selectType=3&postName=${currenRows.name}`}) + }else if(currenRows.name=="其他"){ + uni.navigateTo({ url: `/pages/realName/index/pages/personList?selectType=3&postName=${currenRows.name}`}) + } } } } diff --git a/pages/realName/index/components/pie-charts-model-ring.vue b/pages/realName/index/components/pie-charts-model-ring.vue index fdfa327..ba89448 100644 --- a/pages/realName/index/components/pie-charts-model-ring.vue +++ b/pages/realName/index/components/pie-charts-model-ring.vue @@ -151,7 +151,17 @@ 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/personList?xxx=${currenRows.name}` }) + if(currenRows.name=="< 20"){ + uni.navigateTo({ url: `/pages/realName/index/pages/personList?ageType=0`}) + }else if(currenRows.name=="20-30"){ + uni.navigateTo({ url: `/pages/realName/index/pages/personList?ageType=1`}) + }else if(currenRows.name=="30-40"){ + uni.navigateTo({ url: `/pages/realName/index/pages/personList?ageType=2`}) + }else if(currenRows.name=="40-50"){ + uni.navigateTo({ url: `/pages/realName/index/pages/personList?ageType=3`}) + }else if(currenRows.name=="50-60"){ + uni.navigateTo({ url: `/pages/realName/index/pages/personList?ageType=4`}) + } } } } diff --git a/pages/realName/index/index.vue b/pages/realName/index/index.vue index 347f60b..2cd65c6 100644 --- a/pages/realName/index/index.vue +++ b/pages/realName/index/index.vue @@ -703,26 +703,29 @@ export default { switch (title) { case '在场考勤率': params = '在场考勤率' + uni.navigateTo({ url: `/pages/realName/index/pages/personList?isAtt=0` }) break case '作业考勤率': params = '作业考勤率' + uni.navigateTo({ url: '/pages/realName/index/pages/personList?isAtt=0&isPlanWorker=1' }) break case '在场人员(固定)': params = '在场人员(固定)' + uni.navigateTo({ url: `/pages/realName/index/pages/personList?workerType=1` }) break case '在场人员(临时)': + uni.navigateTo({ url: `/pages/realName/index/pages/personList?workerType=0` }) params = '在场人员(临时)' break case '考勤率(固定人员)': params = '考勤率(固定人员)' + uni.navigateTo({ url: '/pages/realName/index/pages/personList?isAtt=0&workerType=1' }) break case '考勤率(临时人员)': params = '考勤率(临时人员)' + uni.navigateTo({ url: '/pages/realName/index/pages/personList?isAtt=0&workerType=0' }) break } - - console.log('params路由参数考勤固定等··', params) - uni.navigateTo({ url: `/pages/realName/index/pages/personList?xxx=${params}` }) }, /* 工程概况跳转 */ onJumpProjectList(title) { @@ -752,30 +755,34 @@ export default { // 跳转人员列表 switch (type) { case 1: - params = '绿灯' + // params = '绿灯' + uni.navigateTo({ url: `/pages/realName/index/pages/personList?lightStatus=2` }) break case 2: params = '黄灯' + uni.navigateTo({ url: `/pages/realName/index/pages/personList?lightStatus=1` }) break case 3: params = '红灯' + uni.navigateTo({ url: `/pages/realName/index/pages/personList?lightStatus=0` }) break case 4: params = '男性' + uni.navigateTo({ url: `/pages/realName/index/pages/personList?sex=1` }) break case 5: params = '女性' + uni.navigateTo({ url: `/pages/realName/index/pages/personList?sex=0` }) break case 6: params = '固定人员' + uni.navigateTo({ url: `/pages/realName/index/pages/personList?workerType=1` }) break case 7: params = '临时人员' + uni.navigateTo({ url: `/pages/realName/index/pages/personList?workerType=0` }) break } - - console.log('params路由参数红黄灯以及性别··和固定、临时', params) - uni.navigateTo({ url: `/pages/realName/index/pages/personList?xxx=${params}` }) } } } diff --git a/pages/realName/index/pages/personList.vue b/pages/realName/index/pages/personList.vue index 325f780..faaab8b 100644 --- a/pages/realName/index/pages/personList.vue +++ b/pages/realName/index/pages/personList.vue @@ -40,7 +40,7 @@ {{item.postName}} - 联系方式 + 联系方式 {{item.phone}} @@ -286,6 +286,14 @@ export default { this.activeIndex3 = 2 this.queryParams.params.workerType = "0" this.getListData() + }else if(option.sex&&option.sex==1){//男 + this.activeIndex5 = 1 + this.queryParams.params.sex = "1" + this.getListData() + }else if(option.sex&&option.sex==0){//女 + this.activeIndex5 = 2 + this.queryParams.params.sex = "0" + this.getListData() }else if(option.lightStatus&&option.lightStatus==2){//绿灯 this.activeIndex2 = 1 this.queryParams.params.lightStatus = "2" @@ -298,7 +306,46 @@ export default { this.activeIndex2 = 3 this.queryParams.params.lightStatus = "0" this.getListData() - } else { + }else if(option.isAtt&&option.isAtt==0&&option.workerType&&option.workerType==1){//已考勤-固定人员 + this.activeIndex6=1 + this.queryParams.params.isAtt = "0" + this.activeIndex3 = 1 + this.queryParams.params.workerType = "1,2" + this.getListData() + }else if(option.isAtt&&option.isAtt==0&&option.workerType&&option.workerType==0){//已考勤-临时人员 + this.activeIndex6=1 + this.queryParams.params.isAtt = "0" + this.activeIndex3 = 2 + this.queryParams.params.workerType = "0" + this.getListData() + }else if(option.selectType&&option.postName){//已考勤-临时人员 + this.selectType=Number(option.selectType) + this.keyWord = option.postName||""; + this.getListData() + }else if(option.ageType&&option.ageType!=""){//年龄 + if(option.ageType==0){ + this.activeIndex4 = 1 + this.queryParams.params.startAge = '0' + this.queryParams.params.endAge = '20' + }else if(option.ageType==1){ + this.activeIndex4 = 2 + this.queryParams.params.startAge = '20' + this.queryParams.params.endAge = '30' + }else if(option.ageType==2){ + this.activeIndex4 = 3 + this.queryParams.params.startAge = '30' + this.queryParams.params.endAge = '40' + }else if(option.ageType==3){ + this.activeIndex4 = 4 + this.queryParams.params.startAge = '40' + this.queryParams.params.endAge = '50' + }else if(option.ageType==4){ + this.activeIndex4 = 5 + this.queryParams.params.startAge = '50' + this.queryParams.params.endAge = '60' + } + this.getListData() + }else{ this.getListData() } @@ -306,15 +353,14 @@ export default { methods: { /* 获取列表 */ async getListData() { - if(this.selectType==0){ - this.workerName=this.keyWord + this.queryParams.params.workerName=this.keyWord }else if(this.selectType==1){ - this.subName=this.keyWord + this.queryParams.params.subName=this.keyWord }else if(this.selectType==2){ - this.teamName=this.keyWord + this.queryParams.params.teamName=this.keyWord }else if(this.selectType==3){ - this.postName=this.keyWord + this.queryParams.params.postName=this.keyWord } console.log(this.queryParams) uni.request({