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)"
@ -922,7 +921,7 @@
if (isXiHaiAn) { if (isXiHaiAn) {
let _obj = { let _obj = {
title: '视频标签', title: '视频标签',
content: ['视频资源'] content: ['视频资源'],
} }
clickList.value.push(_obj) clickList.value.push(_obj)
tabClick(0, '视频资源') tabClick(0, '视频资源')
@ -947,7 +946,6 @@
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,9 +1791,11 @@
// 西-- // 西--
const judegNumber = () => { const judegNumber = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getMaxApplyNum(selectedRowKeys.value.length).then(res => { getMaxApplyNum(selectedRowKeys.value.length)
.then((res) => {
resolve(res) resolve(res)
}).catch(err => { })
.catch((err) => {
reject(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个摄像头')