接口调试
This commit is contained in:
parent
8f70ec39d0
commit
9ad338b093
|
|
@ -24,7 +24,7 @@ export function getWorkPlanDetailsApi(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
// 首页二级页面--作业计划详情-作业计划列表
|
||||
// 首页二级页面--作业计划详情-作业人员及持证信息
|
||||
export function getWorkPersonnelApi(data) {
|
||||
return request({
|
||||
url: '/ynPlan/home/getDayUser',
|
||||
|
|
@ -32,3 +32,11 @@ export function getWorkPersonnelApi(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
// 首页二级页面--作业计划详情-作业票、站班会照片
|
||||
export function getStandGuardImgApi(data) {
|
||||
return request({
|
||||
url: '/ynPlan/home/getZbhPhotos',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@
|
|||
<uni-section title="今日作业计划" type="line">
|
||||
<template v-slot:right>全部人员</template>
|
||||
<uni-card :is-shadow="true" margin="6">
|
||||
<view v-for="item in todayWorkList" :key="item.contentId">
|
||||
<view v-for="item in todayWorkList" :key="item.contentId" @tap="onSearchWorkPerson(item.contentId)">
|
||||
<view class="row-1">
|
||||
<view>现场负责人</view>
|
||||
<view>
|
||||
<text>{{ item.xcfzr.split(':')[0] }}</text>
|
||||
<text>{{ item.xcfzr.split(':')[1] }}</text>
|
||||
<text>{{ item.xcfzr }}</text>
|
||||
<!-- <text>{{ item.xcfzr.split(':')[1] }}</text> -->
|
||||
</view>
|
||||
<view>作业人员</view>
|
||||
<view>{{ item.rys }}</view>
|
||||
|
|
@ -53,14 +53,7 @@
|
|||
<uni-section title="作业人员" type="line">
|
||||
<uni-card :is-shadow="true" margin="6" padding="0">
|
||||
<view class="work-person">
|
||||
<view>龙海</view>
|
||||
<view>龙海</view>
|
||||
<view>龙海</view>
|
||||
<view>龙海</view>
|
||||
<view>龙海</view>
|
||||
<view>龙海</view>
|
||||
<view>龙海</view>
|
||||
<view>龙海</view>
|
||||
<view v-for="item in workPersonList" :key="item.idNumber">{{ item.name }}</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
</uni-section>
|
||||
|
|
@ -86,12 +79,19 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getWorkPlanDetailsApi, getWorkPersonnelApi } from '../../../api/phaseTwo/homePage'
|
||||
import { getWorkPlanDetailsApi, getWorkPersonnelApi, getStandGuardImgApi } from '../../../api/phaseTwo/homePage'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
queryInfo: {},
|
||||
todayWorkList: []
|
||||
queryInfo: {}, // 作业计划页面传递的参数
|
||||
todayWorkList: [], // 今日计划
|
||||
workPersonList: [], // 作业人员
|
||||
standGuardList: [], // 站班信息
|
||||
contentId: '',
|
||||
commonParams: {
|
||||
proName: '',
|
||||
day: this.$moment().format('YYYY-MM-DD')
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -100,34 +100,37 @@ export default {
|
|||
},
|
||||
/* 获取今日作业计划 */
|
||||
async getTodayWorkPlan() {
|
||||
const { proName } = this.queryInfo
|
||||
const params = {
|
||||
proName,
|
||||
day: this.$moment().format('YYYY-MM-DD')
|
||||
}
|
||||
const res = await getWorkPlanDetailsApi(params)
|
||||
const res = await getWorkPlanDetailsApi(this.commonParams)
|
||||
|
||||
this.todayWorkList = res.data
|
||||
this.contentId = res.data[0].contentId
|
||||
console.log('今日计划数据', res)
|
||||
},
|
||||
/* 获取人员信息 */
|
||||
async getWorkPersonnelData() {
|
||||
const params = {
|
||||
proName: this.queryInfo.proName,
|
||||
day: this.$moment().format('YYYY-MM-DD'),
|
||||
contentId: this.todayWorkList[0].contentId
|
||||
const contentIdParams = {
|
||||
contentId: this.contentId
|
||||
}
|
||||
const res = await getWorkPersonnelApi(params)
|
||||
console.log('res---持证信息', res)
|
||||
|
||||
const params = Object.assign(this.commonParams, contentIdParams)
|
||||
const { data: res } = await getWorkPersonnelApi(params)
|
||||
const response = await getStandGuardImgApi(params)
|
||||
|
||||
this.workPersonList = res
|
||||
console.log('res---人员持证等', response)
|
||||
this.standGuardList = response.data
|
||||
},
|
||||
/* 点击作业计划时查询作业人员 */
|
||||
onSearchWorkPerson(id) {
|
||||
this.contentId = id
|
||||
this.getWorkPersonnelData()
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const query = JSON.parse(options.query)
|
||||
this.queryInfo = query
|
||||
// console.log('queryquery', query)
|
||||
|
||||
// this.getTodayWorkPlan()
|
||||
|
||||
const { proName } = query
|
||||
this.commonParams.proName = proName
|
||||
this.getTodayWorkPlan().then(() => {
|
||||
this.getWorkPersonnelData()
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue