Merge branch 'main' of http://192.168.0.56:3000/hywen/YNUtdPlatform
This commit is contained in:
commit
a585b87456
|
|
@ -8,18 +8,7 @@ export function getHomePageListApi(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
// 首页二级页面--作业计划列表
|
||||
export function getWorkPlantApi(data) {
|
||||
return request({
|
||||
url: '/bmw/homeSubPage/getAppDayPlanMsg',
|
||||
method: 'post',
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 首页二级页面--作业计划列表
|
||||
// 首页二级页面--获取公司信息
|
||||
export function getHomePageSelectApi() {
|
||||
return request({
|
||||
url: '/bmw/homePageSelect/getProCondition',
|
||||
|
|
@ -27,3 +16,19 @@ export function getHomePageSelectApi() {
|
|||
data: {}
|
||||
})
|
||||
}
|
||||
// 首页二级页面--作业计划详情-作业计划列表
|
||||
export function getWorkPlanDetailsApi(data) {
|
||||
return request({
|
||||
url: '/ynPlan/home/getjhxxq',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 首页二级页面--作业计划详情-作业计划列表
|
||||
export function getWorkPersonnelApi(data) {
|
||||
return request({
|
||||
url: '/ynPlan/home/getDayUser',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,25 +26,25 @@
|
|||
<uni-section title="今日作业计划" type="line">
|
||||
<template v-slot:right>全部人员</template>
|
||||
<uni-card :is-shadow="true" margin="6">
|
||||
<view>
|
||||
<view v-for="item in todayWorkList" :key="item.contentId">
|
||||
<view class="row-1">
|
||||
<view>现场负责人</view>
|
||||
<view>
|
||||
<text>燕双鹰</text>
|
||||
<text>13556235623</text>
|
||||
<text>{{ item.xcfzr.split(':')[0] }}</text>
|
||||
<text>{{ item.xcfzr.split(':')[1] }}</text>
|
||||
</view>
|
||||
<view>作业人员</view>
|
||||
<view>7</view>
|
||||
<view>{{ item.rys }}</view>
|
||||
</view>
|
||||
<view class="row-2">
|
||||
<view>风险等级</view>
|
||||
<view>低风险</view>
|
||||
<view>{{ item.fxdj }}</view>
|
||||
<view>执行情况</view>
|
||||
<view>已执行</view>
|
||||
<view>{{ item.state }}</view>
|
||||
</view>
|
||||
<view class="row-3">
|
||||
<view style="padding: 8rpx 0">作业内容</view>
|
||||
<view style="color: #000">1、35kv配电室35kv配电室35kv配电室35kv配电室35kv配电室</view>
|
||||
<view style="color: #000">{{ item.zynr }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
|
|
@ -86,21 +86,51 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getWorkPlanDetailsApi, getWorkPersonnelApi } from '../../../api/phaseTwo/homePage'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
queryInfo: {}
|
||||
queryInfo: {},
|
||||
todayWorkList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
leftClick() {
|
||||
uni.navigateTo({ url: '/pages/realName/workPlan/index' })
|
||||
},
|
||||
/* 获取今日作业计划 */
|
||||
async getTodayWorkPlan() {
|
||||
const { proName } = this.queryInfo
|
||||
const params = {
|
||||
proName,
|
||||
day: this.$moment().format('YYYY-MM-DD')
|
||||
}
|
||||
const res = await getWorkPlanDetailsApi(params)
|
||||
|
||||
this.todayWorkList = res.data
|
||||
console.log('今日计划数据', res)
|
||||
},
|
||||
/* 获取人员信息 */
|
||||
async getWorkPersonnelData() {
|
||||
const params = {
|
||||
proName: this.queryInfo.proName,
|
||||
day: this.$moment().format('YYYY-MM-DD'),
|
||||
contentId: this.todayWorkList[0].contentId
|
||||
}
|
||||
const res = await getWorkPersonnelApi(params)
|
||||
console.log('res---持证信息', res)
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const query = JSON.parse(options.query)
|
||||
this.queryInfo = query
|
||||
// console.log('queryquery', query)
|
||||
|
||||
// this.getTodayWorkPlan()
|
||||
|
||||
this.getTodayWorkPlan().then(() => {
|
||||
this.getWorkPersonnelData()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<uni-icons
|
||||
:type="item.isCollect == 1 ? 'star-filled' : 'star'"
|
||||
size="20"
|
||||
@catchtap="onCollection($event, item)"
|
||||
@tap="onCollection(item)"
|
||||
:style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"
|
||||
></uni-icons>
|
||||
</view>
|
||||
|
|
@ -102,6 +102,7 @@ export default {
|
|||
offset: 0,
|
||||
limit: 99999,
|
||||
params: {
|
||||
userId: uni.getStorageSync('realNameUser').userId + '',
|
||||
proName: '',
|
||||
subComName: ''
|
||||
}
|
||||
|
|
@ -117,6 +118,7 @@ export default {
|
|||
methods: {
|
||||
/* 获取作业计划列表 */
|
||||
async getWorkPlantData() {
|
||||
console.log('this.queryParams参数', this.queryParams)
|
||||
uni.request({
|
||||
url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg',
|
||||
method: 'POST',
|
||||
|
|
@ -171,32 +173,30 @@ export default {
|
|||
uni.navigateTo({ url: `/pages/realName/workPlan-details/index?query=${JSON.stringify(row)}` })
|
||||
},
|
||||
/* 收藏与取消收藏 */
|
||||
onCollection(e, row) {
|
||||
e.stopPropagation()
|
||||
// const params = {
|
||||
// id: row.collectId,
|
||||
// userId: uni.getStorageSync('realNameUser').userId,
|
||||
// foreignId: row.proId,
|
||||
// type: 1
|
||||
// }
|
||||
|
||||
// // console.log('params参数', params)
|
||||
|
||||
// uni.request({
|
||||
// url: `${config.loginBaseUrl}${
|
||||
// row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect'
|
||||
// }`,
|
||||
// method: 'POST',
|
||||
// data: JSON.stringify(params),
|
||||
// header: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// token: this.token
|
||||
// },
|
||||
// success: res => {
|
||||
// console.log('res收藏结果', res)
|
||||
// },
|
||||
// fail: err => {}
|
||||
// })
|
||||
onCollection(row) {
|
||||
const params = {
|
||||
id: row.collectId,
|
||||
userId: uni.getStorageSync('realNameUser').userId,
|
||||
foreignId: row.proId,
|
||||
type: 1
|
||||
}
|
||||
uni.request({
|
||||
url: `${config.loginBaseUrl}${
|
||||
row.isCollect == 0 ? '/app/offLine/insertCollect' : '/app/offLine/deleteCollect'
|
||||
}`,
|
||||
method: 'POST',
|
||||
data: JSON.stringify(params),
|
||||
header: {
|
||||
'Content-Type': 'application/json',
|
||||
token: this.token
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 200) {
|
||||
uni.showToast({ icon: 'none', title: ` ${row.isCollect == 0 ? '收藏成功' : '已取消收藏'}` })
|
||||
}
|
||||
},
|
||||
fail: err => {}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue