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