持证信息接口调试完成
This commit is contained in:
parent
a3b2cd0973
commit
5ec458255a
|
|
@ -40,3 +40,11 @@ export function getStandGuardImgApi(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
// 首页二级页面--作业计划详情-持证信息详情
|
||||
export function getHoldCardInfoApi(data) {
|
||||
return request({
|
||||
url: '/ynPlan/home/getDayUserCZ',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,11 +61,18 @@
|
|||
<uni-section title="人员持证" type="line">
|
||||
<uni-card :is-shadow="true" margin="6" padding="0">
|
||||
<view class="person-card">
|
||||
<view class="blue-border">低压电工作业(9)</view>
|
||||
<view class="orange-border">低压电工作业(9)</view>
|
||||
<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="blue-border">低压电工作业(9)</view>
|
||||
<view class="orange-border">低压电工作业(9)</view>
|
||||
<view class="orange-border">低压电工作业(9)</view> -->
|
||||
</view>
|
||||
</uni-card>
|
||||
</uni-section>
|
||||
|
|
@ -79,13 +86,19 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getWorkPlanDetailsApi, getWorkPersonnelApi, getStandGuardImgApi } from '../../../api/phaseTwo/homePage'
|
||||
import {
|
||||
getWorkPlanDetailsApi,
|
||||
getWorkPersonnelApi,
|
||||
getStandGuardImgApi,
|
||||
getHoldCardInfoApi
|
||||
} from '../../../api/phaseTwo/homePage'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
queryInfo: {}, // 作业计划页面传递的参数
|
||||
todayWorkList: [], // 今日计划
|
||||
workPersonList: [], // 作业人员
|
||||
holdCardList: [], // 持证信息
|
||||
standGuardList: [], // 站班信息
|
||||
contentId: '',
|
||||
commonParams: {
|
||||
|
|
@ -101,29 +114,31 @@ export default {
|
|||
/* 获取今日作业计划 */
|
||||
async getTodayWorkPlan() {
|
||||
const res = await getWorkPlanDetailsApi(this.commonParams)
|
||||
|
||||
this.todayWorkList = res.data
|
||||
this.contentId = res.data[0].contentId
|
||||
console.log('今日计划数据', res)
|
||||
},
|
||||
/* 获取人员信息 */
|
||||
async getWorkPersonnelData() {
|
||||
const contentIdParams = {
|
||||
contentId: this.contentId
|
||||
}
|
||||
|
||||
const params = Object.assign(this.commonParams, contentIdParams)
|
||||
const { data: res } = await getWorkPersonnelApi(params)
|
||||
const res = await getWorkPersonnelApi(params)
|
||||
const response = await getStandGuardImgApi(params)
|
||||
|
||||
this.workPersonList = res
|
||||
console.log('res---人员持证等', response)
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.work-plan {
|
||||
background-color: #eee;
|
||||
padding-top: 10px;
|
||||
padding-top: 74px;
|
||||
|
||||
.header-fixed {
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { getToken, setToken } from '@/utils/auth'
|
|||
import errorCode from '@/utils/errorCode'
|
||||
import { toast, showConfirm, tansParams } from '@/utils/common'
|
||||
|
||||
let timeout = 10000
|
||||
let timeout = 60000
|
||||
const baseUrl = config.loginBaseUrl
|
||||
console.log('baseUrl-请求', baseUrl)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue