代码优化
This commit is contained in:
parent
491cbdb273
commit
e60bd7ef76
|
|
@ -13,7 +13,7 @@
|
|||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"playground" : "custom",
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-android"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ export default {
|
|||
.catch(err => {
|
||||
uni.$u.toast('登录失败')
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
console.log(err)
|
||||
console.log(err + '999')
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
|
|
|
|||
|
|
@ -1958,7 +1958,7 @@ export default {
|
|||
console.log('上传成功!', uploadFileRes)
|
||||
const imgInfo = {
|
||||
name: imgName,
|
||||
tempUrl: `ynPlan/zbh/${this.$moment().format('YYYY')}/${this.$moment().format(
|
||||
tempUrl: `ynPlanf/zbh/${this.$moment().format('YYYY')}/${this.$moment().format(
|
||||
'MM'
|
||||
)}/${this.$moment().format('DD')}/${imgName}`,
|
||||
url: imgUrl
|
||||
|
|
|
|||
|
|
@ -371,6 +371,7 @@ export default {
|
|||
this.subUserList = []
|
||||
// this.subUserListTemp
|
||||
tempArray.forEach(e => {
|
||||
if (e.length > 1) {
|
||||
this.subUserListAll.forEach(j => {
|
||||
if (!e.includes(j.idNumber)) {
|
||||
// this.subUserList.push(j)
|
||||
|
|
@ -378,7 +379,12 @@ export default {
|
|||
// this.subUserListTemp.push(JSON.parse(JSON.stringify(j)))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
if (this.subUserList.length == 0) {
|
||||
this.subUserList = JSON.parse(JSON.stringify(this.subUserListAll))
|
||||
}
|
||||
} else {
|
||||
this.subUserList = JSON.parse(JSON.stringify(this.subUserListAll))
|
||||
// this.subUserListTemp = JSON.parse(JSON.stringify(this.subUserListAll))
|
||||
|
|
@ -624,6 +630,8 @@ export default {
|
|||
|
||||
this.personList = JSON.parse(options.personList).personList
|
||||
|
||||
console.log(this.personList, ' this.personList****')
|
||||
|
||||
// console.log('options.index', options.index)
|
||||
this.currentIndex = options.index
|
||||
|
||||
|
|
@ -634,31 +642,34 @@ export default {
|
|||
computed: {
|
||||
onAlreadySelect() {
|
||||
let amount = 0
|
||||
if (this.subUserList.length > 0) {
|
||||
this.subUserList.forEach(e => {
|
||||
if (e.isChecked) {
|
||||
amount++
|
||||
}
|
||||
})
|
||||
}
|
||||
return amount
|
||||
// if (this.subUserList.length > 0) {
|
||||
// this.subUserList.forEach(e => {
|
||||
// if (e.isChecked) {
|
||||
// amount++
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
if (this.subUserList.length > 0) return this.subUserList.filter(e => e.isChecked == true).length
|
||||
// return amount
|
||||
},
|
||||
isAllChecked() {
|
||||
let isCheckedAll = false
|
||||
if (this.subUserList.length > 0) {
|
||||
isCheckedAll = this.subUserList.every(e => e.isChecked === true)
|
||||
if (this.subUserList.length > 0) return this.subUserList.every(e => e.isChecked === true)
|
||||
// if (this.subUserList.length > 0) {
|
||||
// isCheckedAll = this.subUserList.every(e => e.isChecked === true)
|
||||
|
||||
// if (isCheckedAll) {
|
||||
// this.subUserListTemp.forEach(e => {
|
||||
// e.isChecked = true
|
||||
// })
|
||||
// } else {
|
||||
// this.subUserListTemp.forEach(e => {
|
||||
// e.isChecked = false
|
||||
// })
|
||||
// // if (isCheckedAll) {
|
||||
// // this.subUserListTemp.forEach(e => {
|
||||
// // e.isChecked = true
|
||||
// // })
|
||||
// // } else {
|
||||
// // this.subUserListTemp.forEach(e => {
|
||||
// // e.isChecked = false
|
||||
// // })
|
||||
// // }
|
||||
// }
|
||||
}
|
||||
return isCheckedAll
|
||||
// return isCheckedAll
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue