代码优化
This commit is contained in:
parent
80fdebcb4e
commit
9645d6160c
|
|
@ -13,7 +13,7 @@
|
|||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
activeBorderColor="#003778"
|
||||
activeBackgroundColor="#003778"
|
||||
style="transform: scale(0.7)"
|
||||
@tap="onCheckBoxChangeAll()"
|
||||
@tap="onCheckBoxChangeAll(isAllChecked)"
|
||||
/>
|
||||
</label>
|
||||
</view>
|
||||
|
|
@ -324,14 +324,14 @@ export default {
|
|||
},
|
||||
onCheckBoxChange(item) {
|
||||
item.isChecked = !item.isChecked
|
||||
try {
|
||||
this.subUserListAll.forEach(e => {
|
||||
if (e.idNumber == item.idNumber) {
|
||||
e.isChecked = !eisChecked
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
// try {
|
||||
// this.subUserListAll.forEach(e => {
|
||||
// if (e.idNumber == item.idNumber) {
|
||||
// e.isChecked = !eisChecked
|
||||
// throw new Error()
|
||||
// }
|
||||
// })
|
||||
// } catch (error) {}
|
||||
|
||||
this.subUserListTemp = []
|
||||
this.subUserList.forEach(e => {
|
||||
|
|
@ -419,12 +419,13 @@ export default {
|
|||
// } else {
|
||||
|
||||
// }
|
||||
this.fixedPersonList = []
|
||||
this.tempPersonList = []
|
||||
this.returnPersonList = []
|
||||
|
||||
this.subUserList.forEach(e => {
|
||||
console.log('选择的每一项', e)
|
||||
this.fixedPersonList = []
|
||||
this.tempPersonList = []
|
||||
this.returnPersonList = []
|
||||
|
||||
if (e.isChecked) {
|
||||
if (e.userState == 1) {
|
||||
// 固定人员
|
||||
|
|
@ -455,9 +456,10 @@ export default {
|
|||
})
|
||||
},
|
||||
// 全选
|
||||
onCheckBoxChangeAll() {
|
||||
onCheckBoxChangeAll(isAllChecked) {
|
||||
console.log(isAllChecked, 'isAllChecked')
|
||||
this.subUserList.forEach(e => {
|
||||
e.isChecked = !e.isChecked
|
||||
e.isChecked = !isAllChecked
|
||||
})
|
||||
|
||||
if (this.subUserList.every(e => e.isChecked == true)) {
|
||||
|
|
|
|||
|
|
@ -644,11 +644,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -647,11 +647,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -535,11 +535,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -539,11 +539,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -650,11 +650,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -600,11 +600,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -544,11 +544,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -640,11 +640,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
isSHowBtn(item) {
|
||||
|
|
|
|||
|
|
@ -604,11 +604,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -662,11 +662,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -691,11 +691,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -556,11 +556,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -586,11 +586,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -648,11 +648,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -745,11 +745,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
/* this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
}) */
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -631,11 +631,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -642,11 +642,11 @@ export default {
|
|||
}
|
||||
}
|
||||
})
|
||||
this.processList.forEach(e => {
|
||||
if (e.auditingInfo.length > 1) {
|
||||
e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
}
|
||||
})
|
||||
// this.processList.forEach(e => {
|
||||
// if (e.auditingInfo.length > 1) {
|
||||
// e.auditingInfo = e.auditingInfo.splice(-1, 1)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
/* 复选框事件 */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ let isRequesting = false // 请求锁,防止重复请求
|
|||
const request = config => {
|
||||
// 如果正在请求中,直接返回一个 rejected promise
|
||||
if (isRequesting) {
|
||||
return uni.showToast({ title: '请求正在处理中...请稍后', icon: 'none' })
|
||||
// return uni.showToast({ title: '请求正在处理中...请稍后', icon: 'none' })
|
||||
// return Promise.reject('请求正在处理中,请稍后再试')
|
||||
// uni.showToast({ title: '请求正在处理中...', icon: 'none' })
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue