Browse Source

相机管理 表单中 监控点位 优化

master
Fuyuu 1 year ago
parent
commit
5a0043cc61
  1. 19
      src/views/military/modules/equipmentManage/videoMonitorEquInfo/cameraManage/CameraSetDemo.vue

19
src/views/military/modules/equipmentManage/videoMonitorEquInfo/cameraManage/CameraSetDemo.vue

@ -524,16 +524,20 @@
function handleSiteChange(id) { function handleSiteChange(id) {
cameraForm.value.siteId = id; cameraForm.value.siteId = id;
} }
//
function changeSiteArr(id) { function changeSiteArr(id) {
let lineLen = gData.value.length; let lineLen = gData.value.length;
siteArr.value = []; siteArr.value = [];
for (let i = 0; i < lineLen; i++) { for (let i = 0; i < lineLen; i++) {
let lineData: any = gData.value[i]; for (let j = 0; j < gData.value[i].children?.length; j++) {
if (gData.value[i].id === id) { //
let lineData: any = gData.value[i].children[j];
if (gData.value[i].children[j].id === id) {
if (lineData.children !== null && lineData.children.length > 0) { if (lineData.children !== null && lineData.children.length > 0) {
let siteTempArr = lineData.children; let siteTempArr = lineData.children;
for (let j = 0; j < siteTempArr.length; j++) { for (let k = 0; k < siteTempArr.length; k++) {
let siteData = siteTempArr[j]; //
let siteData = siteTempArr[k];
siteArr.value.push({ id: siteData.id, name: siteData.name }); siteArr.value.push({ id: siteData.id, name: siteData.name });
} }
} else { } else {
@ -541,8 +545,11 @@
} }
} }
} }
}
cameraForm.value.siteId = siteArr.value[0].id; cameraForm.value.siteId = siteArr.value[0].id;
cameraForm.value.siteName = siteArr.value[0].name; cameraForm.value.siteName = siteArr.value[0].name;
console.log(cameraForm.value);
siteNameTemp.value = cameraForm.value.siteName; //线线 siteNameTemp.value = cameraForm.value.siteName; //线线
} }
// //
@ -857,10 +864,12 @@
function initLineArr() { function initLineArr() {
let lineLen = gData.value.length; let lineLen = gData.value.length;
for (let i = 0; i < lineLen; i++) { for (let i = 0; i < lineLen; i++) {
let lineData = gData.value[i]; for (let j = 0; j < gData.value[i].children?.length; j++) {
let lineData = gData.value[i].children[j];
lineArr.value.push({ id: lineData.id, name: lineData.name }); lineArr.value.push({ id: lineData.id, name: lineData.name });
} }
} }
}
// / // /
function cancel() { function cancel() {
if (!getTag.value) { if (!getTag.value) {

Loading…
Cancel
Save