|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="check-map-list">
|
|
|
- <scroll-view class="scroll-y" scroll-y="true">
|
|
|
+ <scroll-view class="scroll-y" scroll-y="true" v-if="checkList.length > 0">
|
|
|
<view class="item"
|
|
|
v-for="(item, index) in checkList"
|
|
|
:key="index">
|
|
@@ -43,8 +43,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
- <view class="null" v-if="checkList.length === 0">暂无数据</view>
|
|
|
- <view class="fixed-buttom-btn" @click="submit">
|
|
|
+ <view class="null" v-else>暂无数据</view>
|
|
|
+ <view class="fixed-buttom-btn" @click="submit" v-if="checkList.length > 0">
|
|
|
<text class="btn-text">完成</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -94,7 +94,7 @@
|
|
|
let planStartTimestamp = this.dateToTimestamp(this.startDate);
|
|
|
this.checkList.map((item, i) => {
|
|
|
const {checkId, deptId, empId, empName, startDate, endDate} = item;
|
|
|
- if(empId || empName || startDate || endDate){
|
|
|
+ if(empId && startDate && endDate){
|
|
|
baseEmpList.push({
|
|
|
checkId,
|
|
|
deptId,
|
|
@@ -174,18 +174,25 @@
|
|
|
},
|
|
|
// 分配单位查核人员
|
|
|
batchDistribute(empList) {
|
|
|
+ if(empList.length === 0) { // 未作修改直接跳转页面
|
|
|
+ return this.redirectToPlanList();
|
|
|
+ }
|
|
|
this.$store.dispatch({
|
|
|
type: 'editCheckList/commActions',
|
|
|
key: "batchDistribute",
|
|
|
data: { empList }
|
|
|
}).then(data => {
|
|
|
if(data){
|
|
|
- uni.redirectTo({
|
|
|
- url: `/pages/planList/planList?situationId=${this.situationId}&checkGroupId=${this.checkGroupId}`
|
|
|
- });
|
|
|
+ this.redirectToPlanList();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 跳转页面
|
|
|
+ redirectToPlanList() {
|
|
|
+ uni.redirectTo({
|
|
|
+ url: `/pages/planList/planList?situationId=${this.situationId}&checkGroupId=${this.checkGroupId}`
|
|
|
+ });
|
|
|
+ },
|
|
|
// 日期时间转换为时间戳
|
|
|
dateToTimestamp(dataStr) {
|
|
|
return dataStr ? moment(dataStr).valueOf() : 0
|
|
@@ -300,7 +307,8 @@
|
|
|
flex: 1;
|
|
|
line-height: 62.5rpx;
|
|
|
color: #B8BECC;
|
|
|
- font-weight: normal;
|
|
|
+ font-weight: normal;
|
|
|
+ margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.center-text {
|
|
@@ -322,8 +330,9 @@
|
|
|
}
|
|
|
|
|
|
.null {
|
|
|
+ margin-top: 375rpx;
|
|
|
text-align: center;
|
|
|
- color: #999;
|
|
|
+ color: #999;
|
|
|
}
|
|
|
}
|
|
|
</style>
|