liuhaining před 5 měsíci
rodič
revize
ef7284369d

+ 2 - 2
src/pages/data/allocation/allocation.vue

@@ -2,7 +2,7 @@
   <div class="allocation">
       <el-descriptions class="margin-top" title="场景管理" :column="3" size="small">
         <template slot="extra">
-          <el-button type="primary" size="small" @click="scene">添加</el-button>
+          <el-button type="primary" size="small" @click="AddScene">添加</el-button>
           <el-button type="primary" size="small" @click="back">返回</el-button>
         </template>
       </el-descriptions>
@@ -61,7 +61,7 @@
         back(){
           this.$router.go(-1)
         },
-        scene(){
+        AddScene(){
           this.$router.push('/scene');
         },
         goChang(){

+ 18 - 4
src/pages/data/scene/scene.vue

@@ -54,6 +54,22 @@
       methods: {
         onSubmit() {
           console.log('submit!');
+          var value = "北航测试"
+          let change = `update dat_map_zhurong set desc = "`+value+`" where name = "北航";`
+          let msg = {
+            cmd: 'update',
+            data: {
+              op: 'UPDATE',
+              name: 'confi-g-',
+              id: 0,
+              sql: change
+            }
+          }
+          console.log('change', change)
+          window.vm.$socket.emit('META', msg,(data)=>{
+            console.log(data)
+          })
+
         },
         back(){
           this.$router.go(-1)
@@ -73,10 +89,8 @@
       },
       mounted() {
 
-        console.log(this.$route.query.flight)
-        var flight = JSON.parse(this.$route.query.flight);
-        console.log(typeof flight)
-        if(typeof flight != undefined){
+        if(typeof this.$route.query.flight != 'undefined'){
+            var flight = JSON.parse(this.$route.query.flight);
             this.bite = false;
             this.form.name = flight.name;
             this.form.url = flight.url;

+ 0 - 1
src/pages/data/summary/SummaryCopy.vue

@@ -5355,7 +5355,6 @@ export default {
         value = this.trueTimeMapConfig
         map.state.isSpeedSolution = false
       }
-
       var name = this.trueTimeMapName
       let change = `update dat_map_zhurong set solution = ${value} where name = "${name}";`
       let msg = {