Explorar o código

修改同步场景

tangning %!s(int64=3) %!d(string=hai) anos
pai
achega
5c235e3f32
Modificáronse 2 ficheiros con 10 adicións e 6 borrados
  1. 1 1
      src/view/scene/index.vue
  2. 9 5
      src/view/vrmodel/index.vue

+ 1 - 1
src/view/scene/index.vue

@@ -155,7 +155,7 @@ export default {
       this.list = list
 
       this.loadSuccess = true
-      this.confirm.show = false
+      // this.confirm.show = false
       // this.showInfo = true  //不默认开启
     },
     goto(item) {

+ 9 - 5
src/view/vrmodel/index.vue

@@ -24,7 +24,7 @@
     <div class="body-head">
       <h3 style="visibility: hidden;">场景管理</h3>
       <div class="table-ctrl-right">
-        <el-button type="primary" v-power="'sync'" v-if="auth.delete" @click="cameraCompany.show = true">同步场景</el-button>
+        <el-button type="primary" v-power="'sync'" v-if="auth.delete" @click="asynccj">同步场景</el-button>
       </div>
     </div>
 
@@ -174,6 +174,10 @@ export default {
     return { ...state, headList, currModel, time, auth, editCompany, cameras, cameraCompany, asyncSceneCompany, user };
   },
   methods: {
+    async activated() {
+      let res = await axios.get(getCameraOptions)
+      this.cameras = res.data.list
+    },
     editModel(item) {
       window.open(process.env.VUE_APP_DOMAIN + '/epc.html?m=' + item.num + '&token=' + user.value.token)
     },
@@ -186,11 +190,11 @@ export default {
       }
       this.cameraCompany.show = false
       this.asyncSceneCompany = true
-    }
+    },
+    asynccj(){
+    this.activated()
+    this.cameraCompany.show = true
   },
-  async activated() {
-    let res = await axios.get(getCameraOptions)
-    this.cameras = res.data.list
   },
   components: {
     "com-head": comHead,