xiaojincai před 5 roky
rodič
revize
6104f1ba1e
2 změnil soubory, kde provedl 10 přidání a 6 odebrání
  1. 3 2
      src/views/company/Company.vue
  2. 7 4
      src/views/company/Detail.vue

+ 3 - 2
src/views/company/Company.vue

@@ -111,10 +111,11 @@ export default {
             this.getData()
         },
         detail(id){
-            let routeData = this.$router.resolve({ path: '/company/detail', query: {  id: id } });
-            window.open(routeData.href, '_blank');
+            this.$router.push({ path: '/company/detail', query: {  id: id,page:this.form.page } });
         },
         getData(){
+            let page = this.$route.query.page;
+            this.form.page = page;
             var parm=this.form;
             this.loading=true
             this.$api.getEnterpriseList(parm).then(res=>{

+ 7 - 4
src/views/company/Detail.vue

@@ -122,10 +122,10 @@
                                 <bm-local-search style="max-height:200px;overflow:auto;border:1px solid #d9d9d9;" :keyword="keyword" :auto-viewport="true"></bm-local-search>
                             </baidu-map>
                     </el-form-item>
-                    <!-- <el-form-item class="btn_div">  
-                        <el-button  @click="form={id:id}"  type="info">重置</el-button>
-                        <el-button @click="save" type="primary">保存</el-button>
-                    </el-form-item> -->
+                    <el-form-item class="btn_div">  
+                        <!-- <el-button  @click="form={id:id}"  type="info">重置</el-button> -->
+                        <el-button @click="close()" type="primary">确定</el-button>
+                    </el-form-item>
                 </div>
                 
             </el-form>
@@ -154,6 +154,9 @@ export default {
     }
   },
   methods:{
+    close(){
+        this.$router.push({ path: '/company', query: { page:this.$route.query.page } });
+    },
     onBaiduMapReady(e) {
         const that = this
         this.BMap = e.BMap