|
@@ -106,6 +106,7 @@
|
|
|
const boxData = ref([])
|
|
const boxData = ref([])
|
|
|
const boxCode = ref(null)
|
|
const boxCode = ref(null)
|
|
|
const showKdg = ref(false)
|
|
const showKdg = ref(false)
|
|
|
|
|
+ const siteListArry = ref([])
|
|
|
|
|
|
|
|
|
|
|
|
|
const formdata = ref({
|
|
const formdata = ref({
|
|
@@ -161,22 +162,20 @@
|
|
|
|
|
|
|
|
const pageChange = (val) => {
|
|
const pageChange = (val) => {
|
|
|
CurrentPage.value = val
|
|
CurrentPage.value = val
|
|
|
- var pageData = val-1
|
|
|
|
|
|
|
+ var pageData = val - 1
|
|
|
const deviceList = deviceData.value
|
|
const deviceList = deviceData.value
|
|
|
var videoList = []
|
|
var videoList = []
|
|
|
if (deviceList.length > val * 9) {
|
|
if (deviceList.length > val * 9) {
|
|
|
videoCount.value = 9
|
|
videoCount.value = 9
|
|
|
for (var index = 0; index < 9; index++) {
|
|
for (var index = 0; index < 9; index++) {
|
|
|
- videoList.push(deviceList[pageData * 9+index])
|
|
|
|
|
|
|
+ videoList.push(deviceList[pageData * 9 + index])
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- videoCount.value = deviceList.length-pageData*9
|
|
|
|
|
- for (var index = 0; index < deviceList.length-pageData*9; index++) {
|
|
|
|
|
- console.log(pageData * 9 + index)
|
|
|
|
|
|
|
+ videoCount.value = deviceList.length - pageData * 9
|
|
|
|
|
+ for (var index = 0; index < deviceList.length - pageData * 9; index++) {
|
|
|
videoList.push(deviceList[pageData * 9 + index])
|
|
videoList.push(deviceList[pageData * 9 + index])
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- console.log("摄像头列表"+videoList)
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
initVideos(videoList)
|
|
initVideos(videoList)
|
|
|
}, 100);
|
|
}, 100);
|
|
@@ -194,23 +193,26 @@
|
|
|
|
|
|
|
|
const filterNode = (value: string, node: TreeNode) => {
|
|
const filterNode = (value: string, node: TreeNode) => {
|
|
|
if (node.id == 1) return true;
|
|
if (node.id == 1) return true;
|
|
|
- console.log(node.label.indexOf(value) != -1)
|
|
|
|
|
return node.label.indexOf(value) != -1;
|
|
return node.label.indexOf(value) != -1;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const currentdata = ref(null)
|
|
const currentdata = ref(null)
|
|
|
|
|
|
|
|
- const treeclick = (data: TreeNodeData, node: TreeNode) => {
|
|
|
|
|
- // console.log(data.data.sites)
|
|
|
|
|
|
|
+ const videoInit = (data, node) => {
|
|
|
var siteList = data.data.sites.split(",")
|
|
var siteList = data.data.sites.split(",")
|
|
|
var deviceList = [];
|
|
var deviceList = [];
|
|
|
|
|
+ siteListArry.value = [];
|
|
|
for (var i in sites.value) {
|
|
for (var i in sites.value) {
|
|
|
if (siteList.indexOf(sites.value[i].dictCode) > -1) {
|
|
if (siteList.indexOf(sites.value[i].dictCode) > -1) {
|
|
|
if (isJSON(sites.value[i].remark)) {
|
|
if (isJSON(sites.value[i].remark)) {
|
|
|
var deviceJson = JSON.parse(sites.value[i].remark)
|
|
var deviceJson = JSON.parse(sites.value[i].remark)
|
|
|
- console.log(sites.value[i].remark)
|
|
|
|
|
for (var j in deviceJson) {
|
|
for (var j in deviceJson) {
|
|
|
if (deviceJson[j].type == "camera") {
|
|
if (deviceJson[j].type == "camera") {
|
|
|
|
|
+ var obj = {
|
|
|
|
|
+ name: sites.value[i].dictLabel,
|
|
|
|
|
+ code: deviceJson[j].code
|
|
|
|
|
+ }
|
|
|
|
|
+ siteListArry.value.push(obj)
|
|
|
console.log(deviceJson[j].code)
|
|
console.log(deviceJson[j].code)
|
|
|
deviceList.push(deviceJson[j].code);
|
|
deviceList.push(deviceJson[j].code);
|
|
|
}
|
|
}
|
|
@@ -234,10 +236,19 @@
|
|
|
videoList.push(deviceList[index])
|
|
videoList.push(deviceList[index])
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- initVideos(videoList)
|
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ initVideos(videoList)
|
|
|
|
|
+ }, 100);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const treeclick = (data: TreeNodeData, node: TreeNode) => {
|
|
|
|
|
+ videoCount.value = 0
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ videoInit(data, node)
|
|
|
|
|
+ }, 1000);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const initVideos = (videoList) => {
|
|
|
|
|
|
|
+ const initVideos = (videoList, sites) => {
|
|
|
for (var index in videoList) {
|
|
for (var index in videoList) {
|
|
|
initVideoDiv(index, videoList[index])
|
|
initVideoDiv(index, videoList[index])
|
|
|
// setTimeout(() => {
|
|
// setTimeout(() => {
|
|
@@ -251,27 +262,27 @@
|
|
|
console.log(code)
|
|
console.log(code)
|
|
|
if (index == 0) {
|
|
if (index == 0) {
|
|
|
// console.log(code)
|
|
// console.log(code)
|
|
|
- proxy.$refs.video1.initVideo(code)
|
|
|
|
|
|
|
+ proxy.$refs.video1.initVideo(code, siteListArry.value)
|
|
|
} else if (index == 1) {
|
|
} else if (index == 1) {
|
|
|
// console.log(code)
|
|
// console.log(code)
|
|
|
- proxy.$refs.video2.initVideo(code)
|
|
|
|
|
|
|
+ proxy.$refs.video2.initVideo(code, siteListArry.value)
|
|
|
// console.log(code)
|
|
// console.log(code)
|
|
|
} else if (index == 2) {
|
|
} else if (index == 2) {
|
|
|
// console.log(code)
|
|
// console.log(code)
|
|
|
- proxy.$refs.video3.initVideo(code)
|
|
|
|
|
|
|
+ proxy.$refs.video3.initVideo(code, siteListArry.value)
|
|
|
} else if (index == 3) {
|
|
} else if (index == 3) {
|
|
|
// console.log(code)
|
|
// console.log(code)
|
|
|
- proxy.$refs.video4.initVideo(code)
|
|
|
|
|
|
|
+ proxy.$refs.video4.initVideo(code, siteListArry.value)
|
|
|
} else if (index == 4) {
|
|
} else if (index == 4) {
|
|
|
- proxy.$refs.video5.initVideo(code)
|
|
|
|
|
|
|
+ proxy.$refs.video5.initVideo(code, siteListArry.value)
|
|
|
} else if (index == 5) {
|
|
} else if (index == 5) {
|
|
|
- proxy.$refs.video6.initVideo(code)
|
|
|
|
|
|
|
+ proxy.$refs.video6.initVideo(code, siteListArry.value)
|
|
|
} else if (index == 6) {
|
|
} else if (index == 6) {
|
|
|
- proxy.$refs.video7.initVideo(code)
|
|
|
|
|
|
|
+ proxy.$refs.video7.initVideo(code, siteListArry.value)
|
|
|
} else if (index == 7) {
|
|
} else if (index == 7) {
|
|
|
- proxy.$refs.video8.initVideo(code)
|
|
|
|
|
|
|
+ proxy.$refs.video8.initVideo(code, siteListArry.value)
|
|
|
} else if (index == 8) {
|
|
} else if (index == 8) {
|
|
|
- proxy.$refs.video9.initVideo(code)
|
|
|
|
|
|
|
+ proxy.$refs.video9.initVideo(code, siteListArry.value)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|