tangning hai 8 meses
pai
achega
7a87ffcce4
Modificáronse 1 ficheiros con 9 adicións e 16 borrados
  1. 9 16
      src/views/topicNavigation/index.vue

+ 9 - 16
src/views/topicNavigation/index.vue

@@ -170,16 +170,15 @@ const logEvent = (evt) => {
   newDataList.value.splice(evt.newIndex || 0, 0, changeData[0])
   const origin = dataList.value[currentPanoEditing.value]
   origin.panos = newDataList.value
-  console.log('end', evt, newDataList.value)
 }
 const handleAdd = () => {
   dataList.value.unshift({
     title: '新增路线',
     panos: []
   })
+  panos.value = []
   currentPanoEditing.value = 0
-  console.log('handleSelect', dataList.value, currentPanoEditing.value = 0)
-  handleSelect("1",dataList.value.length-1)
+  handleSelect("1",0)
 
   main.syncNavigation(dataList.value)
 }
@@ -231,15 +230,13 @@ const handleSelect = (key: string, index: number) => {
 }
 
 const handleListEdit = (index: number) => {
-  console.log('handleListEdit', index)
   currentPanoEditing.value = index
   isPanoEditing.value = true
-  
+  panos.value = dataList.value[index].panos || []
   sdk_mounted((sdk) => {
     sdk.Scene.whenLoaded(() => {
       sdk.PanoCheckManager.enter(dataList.value[index].panos)
       sdk.PanoCheckManager.echo((list: any) => {
-        console.log('echo', list)
         panos.value = list
       })
       clearScreen(true)
@@ -248,25 +245,23 @@ const handleListEdit = (index: number) => {
 }
 
 const handleListDel = (index: number) => {
-  console.log('handleListDel', index)
   dataList.value.splice(index, 1)
 }
 
 const isShowEditing = computed(() => (i: number) => currentEditing.value === i)
 
 const handleItem = (index: number) => {
-  console.log('handleItem', index)
   currentEditing.value = index
 }
 
 const handleItemSubmit = () => {
   isPanoEditing.value = false
-  main.syncNavigation(dataList.value)
-  sdk_mounted((sdk) => {
-    // 重置状态
-    sdk.PanoCheckManager.leave()
-    clearScreen(false)
-  })
+  //main.syncNavigation(dataList.value)
+  //sdk_mounted((sdk) => {
+  //  // 重置状态
+  //  sdk.PanoCheckManager.leave()
+  //  clearScreen(false)
+  //})
 }
 const handlePanoDel = (index: number) => {
   const origin = dataList.value[currentPanoEditing.value].panos
@@ -283,12 +278,10 @@ watch(
   [panos, isPanoEditing],
   () => {
     if (isPanoEditing.value && typeof currentPanoEditing.value === 'number') {
-      console.log('watch', currentPanoEditing.value, dataList.value, panos)
       const origin = dataList.value[currentPanoEditing.value]
       if (origin && panos.value.length > 0) {
         origin.panos = panos.value
       }
-      console.log('panos', origin.panos)
       newDataList.value = JSON.parse(JSON.stringify(origin.panos))
     }
   },