updateCameraView: debounce((element, map) => {
const bearing = ((-element.carStateView.carState.rotation.z + Math.PI / 2) / Math.PI) * 180
map.flyTo({
center: element.carStateView.carState.arrayPosition.position,
speed: 1.2,
zoom: 20,
essential: true, // 動畫
duration: 300,
bearing: bearing
})
}, 50),
getList: throttle(function(type) {
// this.$refs.scenariosTable.clearSelection()
this.listLoading = true
if (type !== 'num') {
this.searchFrom.page_index = 1
}
if (this.searchFrom.tagData && this.searchFrom.tagData.length > 0) {
this.searchFrom.tag = this.searchFrom.tagData.join(';')
}
if (this.searchFrom.createDate) {
this.searchFrom['atime_start'] = this.searchFrom.createDate[0]
this.searchFrom['atime_end'] = this.searchFrom.createDate[1]
}
if (this.searchFrom.updateDate) {
this.searchFrom['mtime_start'] = this.searchFrom.updateDate[0]
this.searchFrom['mtime_end'] = this.searchFrom.updateDate[1]
}
getSceneManagerRequest(this.searchFrom).then(response => {
if (response) {
this.dataList = response.data.scenarios.map((item) => {
item['scenario_source_name'] = this.sourceArray.filter((source) => source.key === item.scenario_source)[0].value
item['region_name'] = this.regionArray.filter((source) => source.key === item.region)[0].value
item['region_property_name'] = this.region_propertyArray.filter((source) => source.key === item.region_property)[0].value
item['category_name'] = this.categoryArray.filter((source) => source.key === item.category)[0].value
item['scene_env_name'] = this.envArray.filter((source) => source.key === item.scene_env)[0].value
const tagList = []
if (item.tag && item.tag.length > 0) {
item.tag.split(';').forEach((key) => {
this.tagArray.forEach(element => {
if (element.key === key) {
tagList.push(element.value)
}
})
})
}
item['tag_name'] = tagList.join(';')
return item
})
this.total = response.data.total
this.listLoading = false
}
}).catch(() => {
this.listLoading = false
})
const that = this
setTimeout(() => {
that.toggleSelection()
}, 500)
}, 1000),