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