ソースを参照

fix:修复sceneNum传参

jinx 4 年 前
コミット
28c8711bcc
1 ファイル変更8 行追加6 行削除
  1. 8 6
      locat/addDataSet.html

+ 8 - 6
locat/addDataSet.html

@@ -366,6 +366,8 @@
 
             },
             mounted() {
+                // alert(sceneNum)
+
                 this.getContorlPoint()
                     // this.sceneNum = window.location.pathname.split('/')[2]
                     // this.$nextTick(() => {
@@ -501,12 +503,12 @@
                 commit() {
                     this.handleData()
                     Promise.all([
-                        axios.post('/indoor/' + this.sceneNum + '/api/controlPoint/save', {
+                        axios.post('/indoor/' + sceneNum + '/api/controlPoint/save', {
                             ageControlLocation1: this.ageControlLocation1,
                             ageControlLocation2: this.ageControlLocation2,
                             gpsControlCoordinate1: this.gpsControlCoordinate1,
                             gpsControlCoordinate2: this.gpsControlCoordinate2,
-                            sceneNum: this.sceneNum,
+                            sceneNum: sceneNum,
                             // id: 1
                         })
                         .catch(function(error) {
@@ -549,11 +551,11 @@
                 getContorlPoint() {
                     // /indoor/{sceneCode}/api/controlPoint/detail
 
-                    const sceneName = window.location.pathname.split('/')[2]
-                    const isDev = !sceneName || sceneName === 'addDataSet.html'
+                    // const sceneName = window.location.pathname.split('/')[2]
+                    // const isDev = !sceneName || sceneName === 'addDataSet.html'
 
-                    const sceneCode = isDev ? 't-kJ2PEjZ' : sceneName
-                    axios.get(`/indoor/${sceneCode}/api/controlPoint/detail`).then(res => {
+                    // const sceneCode = isDev ? 't-kJ2PEjZ' : sceneName
+                    axios.get(`/indoor/${sceneNum}/api/controlPoint/detail`).then(res => {
                         this.status = res.data.data.status
                         this.initContorlPoint(res.data.data)
                         this.set_location(1)