Procházet zdrojové kódy

新增组件及页面

liuqiwen před 4 roky
rodič
revize
b8e407599a

+ 4 - 1
dgtis-ui/src/layout/components/TagsView/index.vue

@@ -1,12 +1,13 @@
 <template>
   <div id="tags-view-container" class="tags-view-container">
     <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
+      <!--        :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"-->
       <router-link
         v-for="tag in visitedViews"
         ref="tag"
         :key="tag.path"
         :class="isActive(tag)?'active':''"
-        :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
+        :to="{ name: tag.name, params: tag.params, fullPath: tag.fullPath }"
         tag="span"
         class="tags-view-item"
         :style="activeStyle(tag)"
@@ -43,6 +44,7 @@ export default {
   },
   computed: {
     visitedViews() {
+      console.log(this.$store.state.tagsView.visitedViews)
       return this.$store.state.tagsView.visitedViews
     },
     routes() {
@@ -68,6 +70,7 @@ export default {
   mounted() {
     this.initTags()
     this.addTags()
+    console.log(this.visitedViews)
   },
   methods: {
     isActive(route) {

+ 2 - 1
dgtis-ui/src/views/system/userInfo/index.vue

@@ -187,7 +187,8 @@ export default {
       getCustomerByIdData(){
           this.loading = true;
           let that = this;
-          let id = that.$route.query.id;
+          // let id = that.$route.query.id;
+          let id = that.$route.params.id;
           getCustomerById({id:id}).then(response => {
                   console.log(response);
                   that.loading =  false;

+ 2 - 1
dgtis-ui/src/views/system/userInfoDetails/index.vue

@@ -225,7 +225,8 @@ export default {
     getCustomerOverViewByIdData(){
       this.loading = true;
       var that = this;
-      let id = this.$route.query.id;
+      // let id = this.$route.query.id;
+      let id = this.$route.params.id;
       getCustomerOverViewById({id:id}).then(response => {
           console.log(response);
         // 客户标签

+ 4 - 2
dgtis-ui/src/views/system/userInfoList/index.vue

@@ -154,10 +154,12 @@
       }, `user_${new Date().getTime()}.xlsx`)
     },
     toOverview(row){
-      this.$router.push({ path:'/userInfoOverview', query: {id: row.id}  })
+      // this.$router.push({ path:'/userInfoOverview', query: {id: row.id}  })
+      this.$router.push({ name:'UserInfoOverview',params:{id: row.id}  })
     },
     toDetail(row){
-      this.$router.push({ path:'/userInfoDetails', query: {id: row.id}  })
+      // this.$router.push({ path:'/userInfoDetails', query: {id: row.id}  })
+      this.$router.push({ name:'UserInfoDetails',params:{id: row.id}  })
     }
   }
 };