bug修改

This commit is contained in:
851673013@qq.com 2022-09-30 10:31:14 +08:00
parent a3c6162592
commit cba2a5c089
1 changed files with 43 additions and 38 deletions

View File

@ -553,7 +553,6 @@
@change="handleTableChange"
>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'operation'">
<a-button
@click="goToApply(record)"
@ -919,14 +918,14 @@
getCamera()
}
} else {
if(isXiHaiAn) {
if (isXiHaiAn) {
let _obj = {
title: '视频标签',
content: ['视频资源']
content: ['视频资源'],
}
clickList.value.push(_obj)
tabClick(0, '视频资源')
}else {
} else {
tabClick(0, '政务云资源')
}
}
@ -943,11 +942,10 @@
mapSearchParam.value.radius = param.radius
mapSearchParam.value.type = param.type
mapSearchParam.value.borderPolygonList = param.borderPolygonList
mapSearchParam.value.pageSize = param.type!=0?20000:10
mapSearchParam.value.pageSize = param.type != 0 ? 20000 : 10
selectedRowKeys.value = [] //
selectedList.value = []
dataSource.value = param.dataSource
pagination.value.total = param.total
// getCamera()
@ -955,19 +953,18 @@
//
mybus.off('pointMarkerClick')
mybus.on('pointMarkerClick', (point) => {
console.log("pointMarkerClick->point", selectedList.value,point)
let check = false; //
if(selectedList.value&&selectedList.value.length>0){
selectedList.value.forEach(ele=>{
if(ele.channelCode == point.data.channelCode){
check = true;
console.log('pointMarkerClick->point', selectedList.value, point)
let check = false //
if (selectedList.value && selectedList.value.length > 0) {
selectedList.value.forEach((ele) => {
if (ele.channelCode == point.data.channelCode) {
check = true
}
})
}
let pointData = new Proxy(point.data, point);
onSelectChange(pointData,!check,'','','proxy');
let pointData = new Proxy(point.data, point)
onSelectChange(pointData, !check, '', '', 'proxy')
})
})
const selectedList = ref([])
const selectedRowKeys = ref([])
@ -976,7 +973,7 @@
title: '设施类型',
content: isXiHaiAn
? ['视频资源']
: ['政务云资源', '视频资源', '感知资源', '城市云脑会客厅'],
: ['政务云资源', '视频资源' /**',感知资源' */, '城市云脑会客厅'],
},
])
let clickList = ref([]) //tab
@ -1037,7 +1034,7 @@
const openVideo = (id, item) => {
//
if (item && item.status != 1) {
rowClickData.value = item;
rowClickData.value = item
return message.warning('当前设备离线!')
}
console.log('打开视频', id)
@ -1794,9 +1791,11 @@
// 西--
const judegNumber = () => {
return new Promise((resolve, reject) => {
getMaxApplyNum(selectedRowKeys.value.length).then(res => {
getMaxApplyNum(selectedRowKeys.value.length)
.then((res) => {
resolve(res)
}).catch(err => {
})
.catch((err) => {
reject(err)
})
})
@ -1806,9 +1805,9 @@
console.log('一键申请', selectedList.value)
if (selectedRowKeys.value.length != 0) {
//
let maxNumRes = await judegNumber();
let maxNumRes = await judegNumber()
if (maxNumRes.data.code != 0) {
return;
return
}
let arr = [
{
@ -1987,9 +1986,15 @@
},
])
// const allClick = ref([])
const onSelectChange = (record, selected, selectedRows, nativeEvent,type) => {
const onSelectChange = (
record,
selected,
selectedRows,
nativeEvent,
type
) => {
console.log('hahhahah', record, selected, selectedRows, nativeEvent)
record = JSON.parse(JSON.stringify(record));
record = JSON.parse(JSON.stringify(record))
if (selected) {
if (selectedRowKeys.value.length == 1000) {
message.warning('最多只能添加1000个摄像头')
@ -1998,9 +2003,9 @@
selectedRowKeys.value.push(record.channelCode || record.channelId)
}
} else {
selectedList.value.forEach((ele,index)=>{
if(ele.channelCode == record.channelCode){
selectedList.value.splice(index,1)
selectedList.value.forEach((ele, index) => {
if (ele.channelCode == record.channelCode) {
selectedList.value.splice(index, 1)
}
})
selectedRowKeys.value.splice(
@ -2008,7 +2013,7 @@
1
)
}
mybus.emit('selectTablePoint',selectedList.value)
mybus.emit('selectTablePoint', selectedList.value)
console.log('已选中======================>', selectedList.value)
}
const onSelectAll = (selected, selectedRows, changeRows) => {
@ -2023,9 +2028,9 @@
// selectedList.value = selectedList.value.filter(
// (item) => item.idtCameraChannel !== val.idtCameraChannel
// )
selectedList.value.forEach((ele,index)=>{
if(ele.channelCode == record.channelCode){
selectedList.value.splice(index,1)
selectedList.value.forEach((ele, index) => {
if (ele.channelCode == record.channelCode) {
selectedList.value.splice(index, 1)
}
})
selectedRowKeys.value.splice(
@ -2046,7 +2051,7 @@
})
}
console.log('heiheiheiehiehei', selected, selectedRows, changeRows)
mybus.emit('selectTablePoint',selectedList.value)
mybus.emit('selectTablePoint', selectedList.value)
}
// tab