Merge branch 'dev-sy-10-10'
This commit is contained in:
commit
34f4efcac9
|
|
@ -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,19 @@ export function getWorkPersonnelApi(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 首页二级页面--作业计划详情-作业票、站班会照片
|
||||||
|
export function getStandGuardImgApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/ynPlan/home/getZbhPhotos',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 首页二级页面--作业计划详情-持证信息详情
|
||||||
|
export function getHoldCardInfoApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/ynPlan/home/getDayUserCZ',
|
||||||
|
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>
|
||||||
|
|
@ -68,11 +61,18 @@
|
||||||
<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="person-card">
|
<view class="person-card">
|
||||||
<view class="blue-border">低压电工作业(9)</view>
|
<view
|
||||||
<view class="orange-border">低压电工作业(9)</view>
|
class="blue-border"
|
||||||
|
v-for="(item, index) in holdCardList"
|
||||||
|
:key="index"
|
||||||
|
@tap="onQueryCardDetails(item.certificateName)"
|
||||||
|
>
|
||||||
|
{{ item.certificateName }}({{ item.certificateNum }})
|
||||||
|
</view>
|
||||||
|
<!-- <view class="orange-border">低压电工作业(9)</view>
|
||||||
<view class="green-border">低压电工作业(9)</view>
|
<view class="green-border">低压电工作业(9)</view>
|
||||||
<view class="blue-border">低压电工作业(9)</view>
|
<view class="blue-border">低压电工作业(9)</view>
|
||||||
<view class="orange-border">低压电工作业(9)</view>
|
<view class="orange-border">低压电工作业(9)</view> -->
|
||||||
</view>
|
</view>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
</uni-section>
|
</uni-section>
|
||||||
|
|
@ -86,12 +86,25 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getWorkPlanDetailsApi, getWorkPersonnelApi } from '../../../api/phaseTwo/homePage'
|
import {
|
||||||
|
getWorkPlanDetailsApi,
|
||||||
|
getWorkPersonnelApi,
|
||||||
|
getStandGuardImgApi,
|
||||||
|
getHoldCardInfoApi
|
||||||
|
} from '../../../api/phaseTwo/homePage'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
queryInfo: {},
|
queryInfo: {}, // 作业计划页面传递的参数
|
||||||
todayWorkList: []
|
todayWorkList: [], // 今日计划
|
||||||
|
workPersonList: [], // 作业人员
|
||||||
|
holdCardList: [], // 持证信息
|
||||||
|
standGuardList: [], // 站班信息
|
||||||
|
contentId: '',
|
||||||
|
commonParams: {
|
||||||
|
proName: '',
|
||||||
|
day: this.$moment().format('YYYY-MM-DD')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -100,34 +113,39 @@ 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
|
||||||
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 params = Object.assign(this.commonParams, contentIdParams)
|
||||||
const res = await getWorkPersonnelApi(params)
|
const res = await getWorkPersonnelApi(params)
|
||||||
console.log('res---持证信息', res)
|
const response = await getStandGuardImgApi(params)
|
||||||
|
|
||||||
|
this.workPersonList = res.data
|
||||||
|
this.holdCardList = res.datac
|
||||||
|
this.standGuardList = response.data
|
||||||
|
},
|
||||||
|
/* 点击作业计划时查询作业人员 */
|
||||||
|
onSearchWorkPerson(id) {
|
||||||
|
this.contentId = id
|
||||||
|
this.getWorkPersonnelData()
|
||||||
|
},
|
||||||
|
/* 查询持证信息 */
|
||||||
|
async onQueryCardDetails(name) {
|
||||||
|
const params = Object.assign(this.commonParams, { certificateName: name })
|
||||||
|
const res = await getHoldCardInfoApi(params)
|
||||||
|
console.log('resresres持证信息详情--', res)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
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()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ export default {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.work-plan {
|
.work-plan {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
padding-top: 10px;
|
padding-top: 74px;
|
||||||
|
|
||||||
.header-fixed {
|
.header-fixed {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { getToken, setToken } from '@/utils/auth'
|
||||||
import errorCode from '@/utils/errorCode'
|
import errorCode from '@/utils/errorCode'
|
||||||
import { toast, showConfirm, tansParams } from '@/utils/common'
|
import { toast, showConfirm, tansParams } from '@/utils/common'
|
||||||
|
|
||||||
let timeout = 10000
|
let timeout = 60000
|
||||||
const baseUrl = config.loginBaseUrl
|
const baseUrl = config.loginBaseUrl
|
||||||
console.log('baseUrl-请求', baseUrl)
|
console.log('baseUrl-请求', baseUrl)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue