作业计划页面完善

This commit is contained in:
BianLzhaoMin 2024-10-18 11:25:17 +08:00
parent 34f4efcac9
commit 2b742f0a80
3 changed files with 102 additions and 13 deletions

View File

@ -254,13 +254,21 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{ },
{
// -- // --
"path": "pages/realName/index/pages/personList", "path": "pages/realName/index/pages/personList",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
// --
"path": "pages/realName/index/pages/personDetail",
"style": {
"navigationStyle": "custom"
}
},
{ {
// //
"path": "pages/realName/workbench/index", "path": "pages/realName/workbench/index",

View File

@ -53,7 +53,9 @@
<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 v-for="item in workPersonList" :key="item.idNumber">{{ item.name }}</view> <view v-for="item in workPersonList" :key="item.idNumber" @tap="onClickTableTr(item.idNumber)">
{{ item.name }}
</view>
</view> </view>
</uni-card> </uni-card>
</uni-section> </uni-section>
@ -79,9 +81,48 @@
<uni-section title="作业票、站班会照片" type="line" style="padding-bottom: 10rpx"> <uni-section title="作业票、站班会照片" type="line" style="padding-bottom: 10rpx">
<uni-card :is-shadow="true" margin="6" padding="0"> <uni-card :is-shadow="true" margin="6" padding="0">
<view>站班会照片</view> <!-- <view>站班会照片</view> -->
</uni-card> </uni-card>
</uni-section> </uni-section>
<uni-popup ref="popup" type="center" border-radius="10px 10px 0 0">
<view class="popup-center">
<view class="popup-title">
<view>持证信息</view>
<uni-icons class="close-icon" style="color: #fff" type="close" size="26" @tap="onClosePopup"></uni-icons>
</view>
<scroll-view class="scroll-container" scroll-y>
<uni-table emptyText="暂无更多数据" :loading="loading">
<!-- 表头行 -->
<uni-tr>
<uni-th width="30" align="center">持证名称</uni-th>
<uni-th width="30" align="center">持证人姓名</uni-th>
<uni-th width="30" align="center">工种</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="item in holdCardDetailsList" :key="item.idNumber">
<uni-td align="center">
<view @tap="onClickTableTr(item.idNumber)">
{{ item.certificateName }}
</view>
</uni-td>
<uni-td align="center">
<view @tap="onClickTableTr(item.idNumber)">
{{ item.name }}
</view>
</uni-td>
<uni-td align="center">
<view @tap="onClickTableTr(item.idNumber)">
{{ item.gz }}
</view>
</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</uni-popup>
</view> </view>
</template> </template>
@ -99,8 +140,10 @@ export default {
todayWorkList: [], // todayWorkList: [], //
workPersonList: [], // workPersonList: [], //
holdCardList: [], // holdCardList: [], //
holdCardDetailsList: [], //
standGuardList: [], // standGuardList: [], //
contentId: '', contentId: '',
loading: false,
commonParams: { commonParams: {
proName: '', proName: '',
day: this.$moment().format('YYYY-MM-DD') day: this.$moment().format('YYYY-MM-DD')
@ -136,9 +179,27 @@ export default {
}, },
/* 查询持证信息 */ /* 查询持证信息 */
async onQueryCardDetails(name) { async onQueryCardDetails(name) {
this.$refs.popup.open()
const params = Object.assign(this.commonParams, { certificateName: name }) const params = Object.assign(this.commonParams, { certificateName: name })
this.loading = true
const res = await getHoldCardInfoApi(params) const res = await getHoldCardInfoApi(params)
// uni.hideLoading()
this.loading = false
console.log('resresres持证信息详情--', res) console.log('resresres持证信息详情--', res)
this.holdCardDetailsList = res.data
},
/* 关闭持证信息弹框 */
onClosePopup() {
uni.hideLoading()
this.$refs.popup.close()
},
/* 持证详情列表点击事件 */
onClickTableTr(id) {
console.log('id-----人员id', id)
//
uni.navigateTo({ url: `/pages/realName/index/pages/personDetail?idNumber=${id}` })
} }
}, },
onLoad(options) { onLoad(options) {
@ -221,4 +282,30 @@ export default {
.person-card view:nth-child(3n + 1) { .person-card view:nth-child(3n + 1) {
margin-left: 0; margin-left: 0;
} }
.popup-center {
width: 90vw;
height: 50vh;
background-color: #fff;
.popup-title {
position: relative;
background-color: #3f9dfd;
height: 100rpx;
line-height: 100rpx;
text-align: center;
color: #fff;
font-size: 30rpx;
.close-icon {
position: absolute;
right: 30rpx;
top: 0;
}
}
.scroll-container {
width: 100%;
height: calc(100% - 100rpx);
}
}
</style> </style>

View File

@ -26,12 +26,7 @@
</view> </view>
<view style="padding: 0 20rpx"> <view style="padding: 0 20rpx">
<scroll-view class="data-container" scroll-y="true"> <scroll-view class="data-container" scroll-y="true">
<view <view class="scroll-item" v-for="(item, index) in companyInfoList" :key="item.proId">
class="scroll-item"
v-for="(item, index) in companyInfoList"
:key="item.proId"
@tap="onViewWorkDetails(item)"
>
<view class="item-1"> <view class="item-1">
<view>{{ index + 1 }}</view> <view>{{ index + 1 }}</view>
<view>{{ item.proName }}</view> <view>{{ item.proName }}</view>
@ -42,7 +37,7 @@
:style="{ color: item.isCollect == 1 ? '#f9971e' : '' }" :style="{ color: item.isCollect == 1 ? '#f9971e' : '' }"
></uni-icons> ></uni-icons>
</view> </view>
<view class="item-2"> <view class="item-2" @tap="onViewWorkDetails(item)">
<view>{{ item.subComName }}</view> <view>{{ item.subComName }}</view>
<view> <view>
<text v-if="item.kjsfx > 0" style="color: #6ff6d5">可接受风险{{ item.kjsfx }}</text> <text v-if="item.kjsfx > 0" style="color: #6ff6d5">可接受风险{{ item.kjsfx }}</text>
@ -51,7 +46,7 @@
<text v-if="item.gfx > 0" style="color: #f44d46">高风险{{ item.gfx }}</text> <text v-if="item.gfx > 0" style="color: #f44d46">高风险{{ item.gfx }}</text>
</view> </view>
</view> </view>
<view class="item-3"> <view class="item-3" @tap="onViewWorkDetails(item)">
<view>作业人数</view> <view>作业人数</view>
<view style="color: #3f9dfd; font-weight: bold">{{ item.personNum }}</view> <view style="color: #3f9dfd; font-weight: bold">{{ item.personNum }}</view>
</view> </view>
@ -118,7 +113,6 @@ export default {
methods: { methods: {
/* 获取作业计划列表 */ /* 获取作业计划列表 */
async getWorkPlantData() { async getWorkPlantData() {
console.log('this.queryParams参数', this.queryParams)
uni.request({ uni.request({
url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg', url: config.loginBaseUrl + '/bmw/homeSubPage/getAppDayPlanMsg',
method: 'POST', method: 'POST',
@ -128,7 +122,6 @@ export default {
// token: this.token // token: this.token
}, },
success: res => { success: res => {
console.log('res****', res)
this.recordsTotal = res.data.recordsTotal this.recordsTotal = res.data.recordsTotal
this.companyInfoList = res.data.data this.companyInfoList = res.data.data
}, },
@ -193,6 +186,7 @@ export default {
success: res => { success: res => {
if (res.data.code === 200) { if (res.data.code === 200) {
uni.showToast({ icon: 'none', title: ` ${row.isCollect == 0 ? '收藏成功' : '已取消收藏'}` }) uni.showToast({ icon: 'none', title: ` ${row.isCollect == 0 ? '收藏成功' : '已取消收藏'}` })
this.getWorkPlantData()
} }
}, },
fail: err => {} fail: err => {}