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