diff --git a/config.js b/config.js index d577ab6..e039328 100644 --- a/config.js +++ b/config.js @@ -27,6 +27,7 @@ module.exports = { realFileUrl: 'http://192.168.0.14:1909/file/', //实名制移动端 realBmwUrl: 'http://192.168.0.14:1911/bmw', + // 应用信息 appInfo: { // 应用名称 diff --git a/pages.json b/pages.json index 2c35a2d..90ba57b 100644 --- a/pages.json +++ b/pages.json @@ -260,6 +260,12 @@ "style": { "navigationStyle": "custom" } + },{ + //首页二级跳转页面 -- 人员详情 + "path": "pages/realName/index/pages/personDetail", + "style": { + "navigationStyle": "custom" + } }, { //工作台 diff --git a/pages/realName/index/index.vue b/pages/realName/index/index.vue index 6ac45df..26bfd5f 100644 --- a/pages/realName/index/index.vue +++ b/pages/realName/index/index.vue @@ -658,6 +658,12 @@ export default { if(item.data_title=='在场人数'){ uni.navigateTo({ url: '/pages/realName/index/pages/personList' }) } + if(item.data_title=='日计划打卡数'){ + uni.navigateTo({ url: '/pages/realName/index/pages/personList?isAtt=0&isPlanWorker=1' }) + } + if(item.data_title=='今日打卡'){ + uni.navigateTo({ url: '/pages/realName/index/pages/personList?isAtt=0' }) + } }, }, diff --git a/pages/realName/index/pages/personList.vue b/pages/realName/index/pages/personList.vue index 26e5cc7..325f780 100644 --- a/pages/realName/index/pages/personList.vue +++ b/pages/realName/index/pages/personList.vue @@ -5,12 +5,15 @@ - + + + + @@ -19,25 +22,71 @@ - + {{ index + 1 }} - {{ item.proName }} - - - - {{ item.subComName }} - 可接受风险:{{ item.kjsfx }} - 低风险:{{ item.dfx }} - 中风险:{{ item.zfx }} - 高风险:{{ item.gfx }} - - + {{ item.name }}( + 临时用工 + 固定用工 + 分包管理人员) + + + + - 作业人数 - {{ item.personNum }} + + 工种 + {{item.postName}} + + + 联系方式 + {{item.phone}} + + + + 是否为作业打卡 + + + + + + + 红绿灯状态 + + 绿灯 + 黄灯 + 红灯 + + + + + + 所在班组 + + {{item.teamName}} + + + + + + 所在分包 + + {{item.subName}} + + + + + + 所在工程 + + {{item.proName}} + + + + + @@ -53,7 +102,7 @@ {{ item.name }} @@ -67,7 +116,7 @@ {{ item.name }} @@ -81,7 +130,7 @@ {{ item.name }} @@ -95,7 +144,7 @@ {{ item.name }} @@ -109,7 +158,7 @@ {{ item.name }} @@ -124,7 +173,7 @@ {{ item.name }} @@ -138,7 +187,7 @@ {{ item.name }} @@ -169,34 +218,107 @@ export default { activeIndex7: 0, recordsTotal: 0, token: uni.getStorageSync('tjToken'), + selectType:0, + keyWord:"", + range: [ + { value: 0, text: '姓名' }, + { value: 1, text: '分包' }, + { value: 2, text: '班组' }, + { value: 3, text: '工种' } + ], // 查询参数 queryParams: { - offset: 0, - limit: 99999, + offset: "0", + limit: "99999", params: { - proName: '', - subComName: '' + userId:uni.getStorageSync('realNameUser').userId+"", + workerName:"",//人员姓名 + subName:"",//分包名称 + teamName:"",//班组名称 + postName:"", //岗位名称 + proId:"", //工程编号 + subId:"", //分包编号 + teamId:"", //班组编号 + lightStatus:"", //灯状态 + workerType:"", //人员类型 + sex:"", //性别 + isAtt:"", //是否考勤 + subComId:"", //分公司编号 + isPlanWorker:"", //是否作业打卡 + startAge:"", //开始年龄 + endAge:"", //结束年龄 + } }, 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' }], + lightList: [{name:'全部', id:'-1' },{name:'绿灯', id:'2' },{name:'黄灯', id:'1' },{name:'红灯', id:'0' }], + workTypeList: [{name:'全部', id:'-1' },{name:'固定用工', id:'1,2' },{name:'临时用工', id:'0' }], + ageTypeList: [{name:'全部', id:'-1' },{name:'<20', id:'0' },{name:'20-30', id:'1' },{name:'30-40', id:'2' },{name:'40-50', id:'3' },{name:'50-60', id:'4' }], + sexTypeList: [{name:'全部', id:'-1' },{name:'男', id:'1' },{name:'女', id:'0' }], + attTypeList: [{name:'全部', id:'-1' },{name:'已考勤', id:'0' },{name:'未考勤', id:'1' }], + dayAttTypeList: [{name:'全部', id:'-1' },{name:'日计划打卡', id:'1' },{name:'非日计划打卡', id:'0' }], companyInfoList: [] } }, mounted() { - this.getWorkPlantData() this.getHomePageSelectData() }, + onLoad(option) { + console.log(option) + this.queryParams.params.proId=option.proId||""; + this.queryParams.params.subId=option.subId||""; + this.queryParams.params.teamId=option.teamId||""; + if(option.isAtt&&option.isAtt==0&&option.isPlanWorker&&option.isPlanWorker==1){//日计划打卡 + this.activeIndex6=1 + this.activeIndex7=1 + this.queryParams.params.isAtt = "0" + this.queryParams.params.isPlanWorker = "1" + this.getListData() + }else if(option.isAtt&&option.isAtt==0){//已考勤 + this.activeIndex6=1 + this.queryParams.params.isAtt = "0" + this.getListData() + }else if(option.workerType&&option.workerType==1){//固定人员 + this.activeIndex3 = 1 + this.queryParams.params.workerType = "1,2" + this.getListData() + }else if(option.workerType&&option.workerType==0){//临时人员 + this.activeIndex3 = 2 + this.queryParams.params.workerType = "0" + this.getListData() + }else if(option.lightStatus&&option.lightStatus==2){//绿灯 + this.activeIndex2 = 1 + this.queryParams.params.lightStatus = "2" + this.getListData() + }else if(option.lightStatus&&option.lightStatus==1){//黄灯 + this.activeIndex2 = 2 + this.queryParams.params.lightStatus = "1" + this.getListData() + }else if(option.lightStatus&&option.lightStatus==0){//红灯 + this.activeIndex2 = 3 + this.queryParams.params.lightStatus = "0" + this.getListData() + } else { + this.getListData() + } + + }, methods: { - /* 获取作业计划列表 */ - async getWorkPlantData() { + /* 获取列表 */ + async getListData() { + + if(this.selectType==0){ + this.workerName=this.keyWord + }else if(this.selectType==1){ + this.subName=this.keyWord + }else if(this.selectType==2){ + this.teamName=this.keyWord + }else if(this.selectType==3){ + this.postName=this.keyWord + } + console.log(this.queryParams) uni.request({ - url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg', + url: config.loginBaseUrl + '/bmw//homeSubPage/getAppWorkerMsg', method: 'POST', data: JSON.stringify(this.queryParams), header: { @@ -205,7 +327,7 @@ export default { }, success: res => { console.log('res****', res) - this.recordsTotal = res.data.recordsTotal + this.recordsTotal = res.data.recordsTotal this.companyInfoList = res.data.data }, fail: err => {} @@ -224,90 +346,84 @@ export default { this.$refs.popup.open() }, /* 选择公司 */ - onSelectCompany(index, name) { + onSelectCompany(index, Id) { this.activeIndex = index if (index === 0) { - this.queryParams.params.subComName = '' + this.queryParams.params.subComId = '' } else { - this.queryParams.params.subComName = name + this.queryParams.params.subComId = Id } }, - onSelectLight(index, name) { + onSelectLight(index, Id) { this.activeIndex2 = index - if (index === 0) { - this.queryParams.params.light = '' - } else { - this.queryParams.params.light = name - } + this.queryParams.params.lightStatus = Id }, - onSelectWorkType(index, name) { + onSelectWorkType(index, Id) { this.activeIndex3 = index - if (index === 0) { - this.queryParams.params.workType = '' - } else { - this.queryParams.params.workType = name - } + this.queryParams.params.workerType = Id + }, - onSelectAgeType(index, name) { + onSelectAgeType(index, Id) { this.activeIndex4 = index - if (index === 0) { - this.queryParams.params.ageType = '' - } else { - this.queryParams.params.ageType = name + if (Id == -1) { + this.queryParams.params.startAge = '0' + this.queryParams.params.endAge = '99' + } else if (Id == 0) { + this.queryParams.params.startAge = '0' + this.queryParams.params.endAge = '20' + } else if (Id == 1) { + this.queryParams.params.startAge = '20' + this.queryParams.params.endAge = '30' + } else if (Id == 2) { + this.queryParams.params.startAge = '30' + this.queryParams.params.endAge = '40' + } else if (Id == 3) { + this.queryParams.params.startAge = '40' + this.queryParams.params.endAge = '50' + } else if (Id == 3) { + this.queryParams.params.startAge = '50' + this.queryParams.params.endAge = '60' } }, - onSelectSexType(index, name) { + onSelectSexType(index, Id) { this.activeIndex5 = index - if (index === 0) { - this.queryParams.params.sexType = '' - } else { - this.queryParams.params.sexType = name - } + this.queryParams.params.sex = Id }, - onSelectAttType(index, name) { + onSelectAttType(index, Id) { this.activeIndex6 = index - if (index === 0) { - this.queryParams.params.attType = '' - } else { - this.queryParams.params.attType = name - } + this.queryParams.params.isAtt = Id }, - onSelectDayAttType(index, name) { + onSelectDayAttType(index, Id) { this.activeIndex7 = index - if (index === 0) { - this.queryParams.params.dayAttType = '' - } else { - this.queryParams.params.dayAttType = name - } + this.queryParams.params.isPlanWorker = Id }, - //light workType ageType sexType attType dayAttType /* 重置 */ onReset() { this.activeIndex = 0 - this.queryParams.params.subComName = '' + this.queryParams.params.subComId = '' this.activeIndex2 = 0 - this.queryParams.params.light = '' + this.queryParams.params.lightStatus = '' this.activeIndex3 = 0 - this.queryParams.params.workType = '' + this.queryParams.params.workerType = '' this.activeIndex4 = 0 this.queryParams.params.ageType = '' this.activeIndex5 = 0 - this.queryParams.params.sexType = '' + this.queryParams.params.sex = '' this.activeIndex6 = 0 - this.queryParams.params.attType = '' + this.queryParams.params.isAtt = '' this.activeIndex7 = 0 - this.queryParams.params.dayAttType = '' + this.queryParams.params.isPlanWorker = '' this.onQuery() }, /* 查询 */ onQuery() { - this.getWorkPlantData().then(() => { + this.getListData().then(() => { this.$refs.popup.close() }) }, - /* 点击跳转作业计划详情 */ + /* 点击跳转详情 */ onViewWorkDetails(row) { - uni.navigateTo({ url: `/pages/realName/workPlan-details/index?query=${JSON.stringify(row)}` }) + uni.navigateTo({ url: `/pages/realName/index/pages/personDetail?idNumber=${row.idNumber}` }) }, /* 收藏与取消收藏 */ onCollection(e, row) { @@ -381,8 +497,7 @@ export default { margin: 20rpx auto; } - .item-1, - .item-2, + .item-1, .item-3 { width: 96%; margin: 0 auto; @@ -390,6 +505,7 @@ export default { border-bottom: 1px solid #eee; display: flex; align-items: center; + position: relative; } .item-1 view:first-child { @@ -404,9 +520,9 @@ export default { font-weight: bold; font-size: 28rpx; } - - .item-2, + .item-3 { + font-size: 24rpx; justify-content: space-around; } } diff --git a/pages/realName/index/pages/project.vue b/pages/realName/index/pages/project.vue index f89c6d9..ffa762a 100644 --- a/pages/realName/index/pages/project.vue +++ b/pages/realName/index/pages/project.vue @@ -10,7 +10,7 @@ suffixIcon="search" v-model="queryParams.params.proName" placeholder="请输入工程信息" - @iconClick="getWorkPlantData" + @iconClick="getListData" > @@ -19,25 +19,60 @@ - - - {{ index + 1 }} - {{ item.proName }} - - - - {{ item.subComName }} - - 可接受风险:{{ item.kjsfx }} - 低风险:{{ item.dfx }} - 中风险:{{ item.zfx }} - 高风险:{{ item.gfx }} + + + {{ index + 1 }} + {{ item.proName }} + - - - 作业人数 - {{ item.personNum }} - + + {{item.subComName}} + {{item.voltageLevel}} + {{item.proType}} + {{item.proStatus}} + + + + 分包 + {{item.subNum}} + + + 班组 + {{item.teamNum}} + + + 考勤人数 + {{item.attPersonNum}} + + + + + 在场 + {{item.einPersonNum}} + + + 固定 + {{item.formalPersonNum}} + + + 临时 + {{item.temporaryPersonNum}} + + + + + 绿灯 + {{item.greenPersonNum}} + + + 黄灯 + {{item.yellowPersonNum}} + + + 红灯 + {{item.redPersonNum}} + + @@ -53,7 +88,7 @@ {{ item.name }} @@ -128,47 +163,56 @@ export default { token: uni.getStorageSync('tjToken'), // 查询参数 queryParams: { - offset: 0, - limit: 99999, + offset: "0", + limit: "999999", params: { - proName: '', - subComName: '' + userId:uni.getStorageSync('realNameUser').userId+'', + proName:"", + subComId:"", + proStatus:"", + voltageLevel:"", + proType:"", } }, companyList: [{ name: '全部', id: '' }], - proStatusList: [{name:'全部', id:'' },{name:'在建', id:'1' },{name:'完工', id:'2' },{name:'筹建', id:'3' },{name:'停工', id:'4' },{name:'遗憾收尾', id:'5' }], + 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' }], - proTypeList: [{name:'全部', id:'' },{name:'其他', id:'1' },{name:'变电改扩建', id:'2' },{name:'基建变电', id:'3' },{name:'基建线路', id:'4' },{name:'生产变电', id:'5' },{name:'生产线路', id:'6' }], + proTypeList: [{name:'全部', id:'' }], companyInfoList: [] } }, mounted() { - this.getWorkPlantData() + this.getListData() this.getHomePageSelectData() }, methods: { /* 获取作业计划列表 */ - async getWorkPlantData() { + async getListData() { + console.log('this.queryParams参数', this.queryParams) 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 - }, + url: config.loginBaseUrl + '/bmw/homeSubPage/getAppBuildPro', + 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() + console.log(res) this.companyList = this.companyList.concat(res.subList) + this.proTypeList = this.proTypeList.concat(res.proType) + this.proStatusList = this.proStatusList.concat(res.proStatusList) + this.levelList = this.levelList.concat(res.levelList) }, leftClick() { uni.navigateTo({ url: `/pages/realName/index/index` }) @@ -178,12 +222,12 @@ export default { this.$refs.popup.open() }, /* 选择公司 */ - onSelectCompany(index, name) { + onSelectCompany(index, id) { this.activeIndex = index if (index === 0) { - this.queryParams.params.subComName = '' + this.queryParams.params.subComId = '' } else { - this.queryParams.params.subComName = name + this.queryParams.params.subComId = id } }, onSelectStatus(index, name) { @@ -197,41 +241,66 @@ export default { onSelectLevel(index, name) { this.activeIndex3 = index if (index === 0) { - this.queryParams.params.level = '' + this.queryParams.params.voltageLevel = '' } else { - this.queryParams.params.level = name + this.queryParams.params.voltageLevel = name } }, onSelectType(index, name) { this.activeIndex4 = index if (index === 0) { - this.queryParams.params.type = '' + this.queryParams.params.proType = '' } else { - this.queryParams.params.type = name + this.queryParams.params.proType = name } }, /* 重置 */ onReset() { this.activeIndex = 0 - this.queryParams.params.subComName = '' + this.queryParams.params.subComId = '' this.activeIndex2 = 0 this.queryParams.params.proStatus = '' this.activeIndex3 = 0 - this.queryParams.params.level = '' + this.queryParams.params.voltageLevel = '' this.activeIndex4 = 0 - this.queryParams.params.type = '' + this.queryParams.params.proType = '' this.onQuery() }, /* 查询 */ onQuery() { - this.getWorkPlantData().then(() => { + this.getListData().then(() => { this.$refs.popup.close() }) }, - /* 点击跳转作业计划详情 */ - onViewWorkDetails(row) { - uni.navigateTo({ url: `/pages/realName/workPlan-details/index?query=${JSON.stringify(row)}` }) + /* 点击跳转分包 */ + goSubListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/subList?proId=${row.proId}` }) }, + /* 点击跳转班组 */ + goTeamListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/teamList?proId=${row.proId}` }) + }, + /* 点击跳转人员-已考勤 */ + goAttPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?proId=${row.proId}&isAtt=0` }) + }, + /* 点击跳转人员-在场(全部) */ + goAllPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?proId=${row.proId}` }) + }, + /* 点击跳转人员-固定 */ + goWorkPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?proId=${row.proId}&workerType=1` }) + }, + /* 点击跳转人员-临时 */ + goTempPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?proId=${row.proId}&workerType=0` }) + }, + /* 点击跳转人员-灯 */ + goLightPersonListPage(row,type) {//绿2 黄1 红0 + uni.navigateTo({ url: `/pages/realName/index/pages/personList?proId=${row.proId}&lightStatus=${type}` }) + }, + /* 收藏与取消收藏 */ onCollection(e, row) { e.stopPropagation() @@ -313,6 +382,7 @@ export default { border-bottom: 1px solid #eee; display: flex; align-items: center; + position: relative; } .item-1 view:first-child { @@ -330,6 +400,7 @@ export default { .item-2, .item-3 { + font-size: 24rpx; justify-content: space-around; } } diff --git a/pages/realName/index/pages/subList.vue b/pages/realName/index/pages/subList.vue index 134d7a6..2dc578b 100644 --- a/pages/realName/index/pages/subList.vue +++ b/pages/realName/index/pages/subList.vue @@ -8,9 +8,9 @@ @@ -19,25 +19,60 @@ - + {{ index + 1 }} - {{ item.proName }} - - - - {{ item.subComName }} - - 可接受风险:{{ item.kjsfx }} - 低风险:{{ item.dfx }} - 中风险:{{ item.zfx }} - 高风险:{{ item.gfx }} - - - - 作业人数 - {{ item.personNum }} + {{ item.subName }} + + + + 班组 + {{item.teamNum}} + + + 考勤人数 + {{item.attPersonNum}} + + + + + 在场 + {{item.einPersonNum}} + + + 固定 + {{item.formalPersonNum}} + + + 临时 + {{item.temporaryPersonNum}} + + + + + 绿灯 + {{item.greenPersonNum}} + + + 黄灯 + {{item.yellowPersonNum}} + + + 红灯 + {{item.redPersonNum}} + + + + + 所在工程 + + + {{items}} + + + + @@ -128,11 +163,14 @@ export default { token: uni.getStorageSync('tjToken'), // 查询参数 queryParams: { - offset: 0, - limit: 99999, + offset: "0", + limit: "999999", params: { - proName: '', - subComName: '' + userId:uni.getStorageSync('realNameUser').userId+"", + proId:"", + subName:"", + proName:"", + subComName:"" } }, companyList: [{ name: '全部', id: '' }], @@ -143,14 +181,19 @@ export default { } }, mounted() { - this.getWorkPlantData() - this.getHomePageSelectData() + // this.getHomePageSelectData() + }, + onLoad(option) { + console.log(option) + this.queryParams.params.proId=option.proId||""; + this.getListData() }, methods: { - /* 获取作业计划列表 */ - async getWorkPlantData() { + /* 获取列表 */ + async getListData() { + console.log(this.queryParams) uni.request({ - url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg', + url: config.loginBaseUrl + '/bmw/homeSubPage/getAppActiveSub', method: 'POST', data: JSON.stringify(this.queryParams), header: { @@ -224,14 +267,38 @@ export default { }, /* 查询 */ onQuery() { - this.getWorkPlantData().then(() => { + this.getListData().then(() => { this.$refs.popup.close() }) }, - /* 点击跳转作业计划详情 */ - onViewWorkDetails(row) { - uni.navigateTo({ url: `/pages/realName/workPlan-details/index?query=${JSON.stringify(row)}` }) - }, + + + /* 点击跳转班组 */ + goTeamListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/teamList?subId=${row.subId}` }) + }, + /* 点击跳转人员-已考勤 */ + goAttPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?subId=${row.subId}&isAtt=0` }) + }, + /* 点击跳转人员-在场(全部) */ + goAllPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?subId=${row.subId}` }) + }, + /* 点击跳转人员-固定 */ + goWorkPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?subId=${row.subId}&workerType=1` }) + }, + /* 点击跳转人员-临时 */ + goTempPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?subId=${row.subId}&workerType=0` }) + }, + /* 点击跳转人员-灯 */ + goLightPersonListPage(row,type) {//绿2 黄1 红0 + uni.navigateTo({ url: `/pages/realName/index/pages/personList?subId=${row.subId}&lightStatus=${type}` }) + }, + + /* 收藏与取消收藏 */ onCollection(e, row) { e.stopPropagation() @@ -302,6 +369,7 @@ export default { padding: 14rpx 0; background-color: #fff; margin: 20rpx auto; + } .item-1, @@ -313,6 +381,7 @@ export default { border-bottom: 1px solid #eee; display: flex; align-items: center; + position: relative; } .item-1 view:first-child { @@ -330,6 +399,7 @@ export default { .item-2, .item-3 { + font-size: 24rpx; justify-content: space-around; } } diff --git a/pages/realName/index/pages/teamList.vue b/pages/realName/index/pages/teamList.vue index b9c5e0f..2b9849b 100644 --- a/pages/realName/index/pages/teamList.vue +++ b/pages/realName/index/pages/teamList.vue @@ -8,9 +8,9 @@ @@ -19,25 +19,57 @@ - + {{ index + 1 }} - {{ item.proName }} - - - - {{ item.subComName }} - - 可接受风险:{{ item.kjsfx }} - 低风险:{{ item.dfx }} - 中风险:{{ item.zfx }} - 高风险:{{ item.gfx }} - + {{ item.teamName }} + - 作业人数 - {{ item.personNum }} + + 在场 + {{item.einPersonNum}} + + + 固定 + {{item.formalPersonNum}} + + + 临时 + {{item.temporaryPersonNum}} + + + + 绿灯 + {{item.greenPersonNum}} + + + 黄灯 + {{item.yellowPersonNum}} + + + 红灯 + {{item.redPersonNum}} + + + + + 所在分包 + + {{item.subName}} + + + + + + 所在工程 + + {{item.proName}} + + + + @@ -53,7 +85,7 @@ {{ item.name }} @@ -94,11 +126,16 @@ export default { token: uni.getStorageSync('tjToken'), // 查询参数 queryParams: { - offset: 0, - limit: 99999, + offset: "0", + limit: "99999", params: { - proName: '', - subComName: '' + userId:uni.getStorageSync('realNameUser').userId+"", + teamName:"", + proId:"", + subId:"", + proName:"", + subName:"", + subComId:"" } }, companyList: [{ name: '全部', id: '' }], @@ -106,14 +143,19 @@ export default { } }, mounted() { - this.getWorkPlantData() this.getHomePageSelectData() }, + onLoad(option) { + console.log(option) + this.queryParams.params.proId=option.proId||""; + this.queryParams.params.subId=option.subId||""; + this.getListData() + }, methods: { - /* 获取作业计划列表 */ - async getWorkPlantData() { + /* 获取列表 */ + async getListData() { uni.request({ - url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg', + url: config.loginBaseUrl + '/bmw/homeSubPage/getAppActiveTeam', method: 'POST', data: JSON.stringify(this.queryParams), header: { @@ -144,28 +186,40 @@ export default { onSelectCompany(index, name) { this.activeIndex = index if (index === 0) { - this.queryParams.params.subComName = '' + this.queryParams.params.subComId = '' } else { - this.queryParams.params.subComName = name + this.queryParams.params.subComId = name } }, /* 重置 */ onReset() { this.activeIndex = 0 - this.queryParams.params.subComName = '' + this.queryParams.params.subComId = '' this.onQuery() }, /* 查询 */ onQuery() { - this.getWorkPlantData().then(() => { + this.getListData().then(() => { this.$refs.popup.close() }) }, - /* 点击跳转作业计划详情 */ - onViewWorkDetails(row) { - uni.navigateTo({ url: `/pages/realName/workPlan-details/index?query=${JSON.stringify(row)}` }) - }, + /* 点击跳转人员-在场(全部) */ + goAllPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?teamId=${row.teamId}` }) + }, + /* 点击跳转人员-固定 */ + goWorkPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?teamId=${row.teamId}&workerType=1` }) + }, + /* 点击跳转人员-临时 */ + goTempPersonListPage(row) { + uni.navigateTo({ url: `/pages/realName/index/pages/personList?teamId=${row.teamId}&workerType=0` }) + }, + /* 点击跳转人员-灯 */ + goLightPersonListPage(row,type) {//绿2 黄1 红0 + uni.navigateTo({ url: `/pages/realName/index/pages/personList?teamId=${row.teamId}&lightStatus=${type}` }) + }, /* 收藏与取消收藏 */ onCollection(e, row) { e.stopPropagation() @@ -247,6 +301,7 @@ export default { border-bottom: 1px solid #eee; display: flex; align-items: center; + position: relative; } .item-1 view:first-child { @@ -264,6 +319,7 @@ export default { .item-2, .item-3 { + font-size: 24rpx; justify-content: space-around; } }