Compare commits
2 Commits
7f3b04eb08
...
d0a682f233
Author | SHA1 | Date | |
---|---|---|---|
d0a682f233 | |||
65441ddff4 |
@ -2,7 +2,7 @@
|
||||
* 文本框
|
||||
*/
|
||||
import Base from "../index";
|
||||
import { syncData } from '../../../Global/MultiViewportMode'
|
||||
import { syncData, getSdk } from '../../../Global/MultiViewportMode'
|
||||
import { setActiveViewer, closeRotateAround, closeViewFollow } from '../../../Global/global'
|
||||
class TextBox extends Base {
|
||||
/**
|
||||
@ -133,7 +133,14 @@ class TextBox extends Base {
|
||||
async getwords(words) {
|
||||
this.options.text = words
|
||||
this.callback(this.options)
|
||||
syncData(this.sdk, this.options.id)
|
||||
let { sdkP } = getSdk()
|
||||
if(this.sdk === sdkP) {
|
||||
console.log(3)
|
||||
syncData(this.sdk, this.options.id)
|
||||
}
|
||||
else {
|
||||
console.log(2)
|
||||
}
|
||||
}
|
||||
async returnFun() {
|
||||
return this.handler
|
||||
|
@ -100,7 +100,7 @@ function attributeElm(that) {
|
||||
let tr = `
|
||||
<div class="tr">
|
||||
<div class="td">
|
||||
<input type="checkbox" value="${'ID' in data.data.list[i] ? data.data.list[i].ID : data.data.list[i].id}">
|
||||
<input type="checkbox" value="${data.data.list[i].deviceId}">
|
||||
<span>绑定</span>
|
||||
</div>
|
||||
<div class="td">${data.data.list[i].cameraName}</div>
|
||||
@ -126,11 +126,8 @@ function attributeElm(that) {
|
||||
}
|
||||
else {
|
||||
let newArray = that.attributeCamera.filter((item) => {
|
||||
if ('ID' in data.data.list[i]) {
|
||||
return item.ID !== data.data.list[i].ID
|
||||
}
|
||||
else {
|
||||
return item.id !== data.data.list[i].id
|
||||
if ('deviceId' in data.data.list[i]) {
|
||||
return item.deviceId !== data.data.list[i].deviceId
|
||||
}
|
||||
})
|
||||
that.attributeCamera = newArray
|
||||
@ -139,7 +136,7 @@ function attributeElm(that) {
|
||||
tableContent.appendChild(trElm)
|
||||
|
||||
for (let m = 0; m < that.attributeCamera.length; m++) {
|
||||
if (('ID' in data.data.list[i]) ? (that.attributeCamera[m].ID === data.data.list[i].ID) : (that.attributeCamera[m].id === data.data.list[i].id)) {
|
||||
if (('deviceId' in data.data.list[i]) ? (that.attributeCamera[m].deviceId === data.data.list[i].deviceId):false) {
|
||||
checkbox.checked = true
|
||||
break
|
||||
}
|
||||
@ -200,17 +197,9 @@ function attributeElm(that) {
|
||||
for (let i = that.attributeCamera.length - 1; i >= 0; i--) {
|
||||
let flag = false
|
||||
for (let m = 0; m < data.data.list.length; m++) {
|
||||
if ('ID' in data.data.list[m]) {
|
||||
if (that.attributeCamera[i].ID === data.data.list[m].ID) {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if ('id' in data.data.list[m]) {
|
||||
if (that.attributeCamera[i].id === data.data.list[m].id) {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
if (that.attributeCamera[i].deviceId === data.data.list[m].deviceId) {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
|
Reference in New Issue
Block a user