bug修改
This commit is contained in:
parent
a3c6162592
commit
cba2a5c089
|
@ -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
|
||||
selectedRowKeys.value = [] //清空选中的点位
|
||||
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)
|
||||
|
@ -1084,7 +1081,7 @@
|
|||
console.log('获取到的列表数据')
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
init()
|
||||
//点击会议室左侧切换
|
||||
const result = () => {
|
||||
|
@ -1413,7 +1410,7 @@
|
|||
name,
|
||||
clickList.value[indexFather]
|
||||
)
|
||||
|
||||
|
||||
selectedRowKeys.value = []
|
||||
selectedList.value = []
|
||||
if (clickList.value[indexFather].content.indexOf(name) != -1) {
|
||||
|
@ -1772,7 +1769,7 @@
|
|||
pagination.value.pageSize = 10
|
||||
getCamera()
|
||||
}
|
||||
const videoClean = () => {
|
||||
const videoClean = () => {
|
||||
//视频预览弹窗关闭后不清除选中行
|
||||
// selectedList.value = []
|
||||
// selectedRowKeys.value = []
|
||||
|
@ -1794,11 +1791,13 @@
|
|||
// 西海岸--判断设备最大数量个数
|
||||
const judegNumber = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
getMaxApplyNum(selectedRowKeys.value.length).then(res => {
|
||||
resolve(res)
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
getMaxApplyNum(selectedRowKeys.value.length)
|
||||
.then((res) => {
|
||||
resolve(res)
|
||||
})
|
||||
.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
|
||||
|
|
Loading…
Reference in New Issue