基础设施-选中数量绑定

This commit is contained in:
gaoyuanwei 2022-06-25 15:26:42 +08:00
parent e309dbbb90
commit 03c4325919
1 changed files with 112 additions and 121 deletions

View File

@ -29,7 +29,7 @@
<i class="boundary"></i> <i class="boundary"></i>
<p> <p>
已选 已选
<span>22</span> <span>{{ allClick.length }}</span>
</p> </p>
</div> </div>
@ -79,12 +79,7 @@
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" }"
> ></a-table>
<template slot="status" slot-scope="text, record, index">
<span>正常</span>
<span>失效</span>
</template>
</a-table>
</div> </div>
</div> </div>
</template> </template>
@ -125,15 +120,11 @@
//tab //tab
const tabClick = (indexFather, name, fatherName) => { const tabClick = (indexFather, name, fatherName) => {
if (clickList.value[indexFather].content.indexOf(name) != -1) { if (clickList.value[indexFather].content.indexOf(name) != -1) {
debugger
if (fatherName == '视频资源') { if (fatherName == '视频资源') {
debugger
tableHeight.value = 330 tableHeight.value = 330
} else if (fatherName == '云资源') { } else if (fatherName == '云资源') {
debugger
tableHeight.value = 600 tableHeight.value = 600
} else if (fatherName == '感知资源') { } else if (fatherName == '感知资源') {
debugger
tableHeight.value = 330 tableHeight.value = 330
} }
clickList.value[indexFather].content.splice( clickList.value[indexFather].content.splice(
@ -141,15 +132,11 @@
1 1
) )
} else { } else {
debugger
if (fatherName == '视频资源') { if (fatherName == '视频资源') {
debugger
tableHeight.value = 330 tableHeight.value = 330
} else if (fatherName == '云资源') { } else if (fatherName == '云资源') {
debugger
tableHeight.value = 600 tableHeight.value = 600
} else if (fatherName == '感知资源') { } else if (fatherName == '感知资源') {
debugger
tableHeight.value = 330 tableHeight.value = 330
} }
clickList.value[indexFather].content[0] = name clickList.value[indexFather].content[0] = name
@ -296,12 +283,16 @@
key: 'address', key: 'address',
}, },
]) ])
// const selectedRowKeys = const allClick = ref([])
const onSelectChange = (selectedRowKeys) => {
console.log('hahhahah', selectedRowKeys)
allClick.value = selectedRowKeys
}
const pagination = ref({ const pagination = ref({
total: 0, total: 0,
pageSize: 10, //10 pageSize: 10, //10
showSizeChanger: true, showSizeChanger: true,
pageSizeOptions: ['5', '15', '30', '45'], // pageSizeOptions: ['5', '10', '15', '20'], //
}) })
const queryParam = ref({ const queryParam = ref({
page: 1, // page: 1, //
@ -320,7 +311,7 @@
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.infrastructrueBox { .infrastructrueBox {
width: 10.87rem; width: 10.87rem;
padding: 0.2rem; padding: 0.2rem;
background: #f3f5f9; background: #f3f5f9;
@ -446,5 +437,5 @@
background-color: #fafafa; background-color: #fafafa;
} }
} }
} }
</style> </style>