邓洁 : 修复bug

This commit is contained in:
dengj
2023-12-29 13:06:35 +08:00
parent a87b58bea7
commit a473317022
4 changed files with 116 additions and 71 deletions

View File

@@ -165,12 +165,12 @@ const formRules = ref({
const formInstance = ref()
const getList = () => {
getSiteList({
// userId:userId,
userId:userId,
...pageInfo
}).then((res) => {
total.value = res.data.total;
showAddIcon.value = total.value % 6!==0;
showFirst.value = total.value / pageInfo.pageSize >= 1;
showFirst.value = total.value / pageInfo.pageSize > 1;
res.data.rows.map(item => {
if (item.tunnelList === null || item.tunnelList.length === 0) {
item.info = info.value
@@ -188,7 +188,6 @@ const handleClickSite = (type) => {
if (type.checked) {
siteIds.value.push(type.siteId)
siteNameList.value.push(type.siteName)
} else {
siteIds.value.map((item, index) => {
if (item === type.siteId) {
@@ -260,6 +259,15 @@ const handleSubmit = (instance) => {
const handleChooseAll=()=>{
siteList.value.map(item=>{
item.checked=!item.checked
if(item.checked&&!item.isDefault){
siteIds.value.push(item.siteId)
}else if(!item.checked&&!item.isDefault){
siteIds.value.map((newItem, index) => {
if (newItem === item.siteId) {
siteIds.value.splice(index, 1)
}
})
}
})
}
const handleMoreDelete = () => {