• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

vue点击Dashboard不同内容 跳转到同一表格的实例

vue 搞代码 4年前 (2022-01-08) 13次浏览 已收录 0个评论

这篇文章主要介绍了vue点击Dashboard不同内容 跳转到同一表格的实例,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧

1.点击跳转写法

点击页面内容:优先级

优先级

点击页面内容:状态

状态

点击echarts柱状

 this.chartEvent.on('click',function (param) { that.$router.push({ path: '/cases/case', query: { createdTime: param.name,type:"createdTime" } }); })

2.表格分页写法(不同跳转 显示不同传参)

注:由于该页面下拉框也有相应的优先级筛选条件 所有写了两层if判断了一下

 getData: function(){ //获取CaseSearch里面的搜索内容 eventBus.$on('ticketEntityId',function(val){ tableCaseVue.ticketEntityId=val; }) eventBus.$on('companyId',function(val){ tableCaseVue.companyId=val; }) eventBus.$on('priorityId',function(val){ tableCaseVue.priorityId=val; }) eventBus.$on('status',function(val){ tableCaseVue.status=val; }) eventBus.$on('ticketCategory',function(val){ tableCaseVue.ticke<strong style="color:transparent">本文来源gao@daima#com搞(%代@#码@网&</strong>tCategory=val; }) var pageTicketDate = { "pageNum": this.current, "pageSize": this.pageSize, "priorityId":tableCaseVue.priorityId, "status":tableCaseVue.status, "ticketEntityId":tableCaseVue.ticketEntityId, "companyId":tableCaseVue.companyId, "ticketCategory":tableCaseVue.ticketCategory }; // 优先级 if((this.$route.query.type == 'priorityId')&&(pageTicketDate.priorityId=='')){ pageTicketDate.priorityId=this.$route.query.priorityId; } // 状态 if((this.$route.query.type == 'status')&&(pageTicketDate.status=='')){ pageTicketDate.status=this.$route.query.status; } //创建时间 if (this.$route.query.type == 'createdTime') { pageTicketDate.createdTime = this.$route.query.createdTime; } //当前月 if (this.$route.query.type == 'currentMonth') { pageTicketDate.currentMonth = this.$route.query.currentMonth; } if(pageTicketDate.ticketEntityId||pageTicketDate.companyId||pageTicketDate.priorityId||pageTicketDate.status||pageTicketDate.ticketCategory){ pageTicketDate.ticketEntityId=tableCaseVue.ticketEntityId; pageTicketDate.companyId=tableCaseVue.companyId; pageTicketDate.priorityId=tableCaseVue.priorityId; pageTicketDate.status=tableCaseVue.status; pageTicketDate.ticketCategory=tableCaseVue.ticketCategory; pageTicketDate.createdTime=''; pageTicketDate.currentMonth=''; } this.$api.ticket.pageTicket(pageTicketDate) .then(res => { this.tableCaseDate = res.data.records; for(var i=0;i<this.tableCaseDate.length;i++){ // 响应时间 if(this.tableCaseDate[i].waitTime!=undefined){ this.tableCaseDate[i].waitTime=this.tableCaseDate[i].waitTime+'分钟'; } // 处理时间 if(this.tableCaseDate[i].handleTime!=undefined){ this.tableCaseDate[i].handleTime=this.tableCaseDate[i].handleTime+'分钟'; } // 完成时间 if(this.tableCaseDate[i].finishTime!=undefined){ this.tableCaseDate[i].finishTime=this.tableCaseDate[i].finishTime; }else{ this.tableCaseDate[i].finishTime='N/A'; } } // 当前页 this.current = res.data.current; // 总条数 this.dataTotal = res.data.total; }); } 

补充知识:vue点击跳转到详情页

1商品组件页面GoodsInfo.vue(点击该组件跳转到详情页)

  <div class="goods-info"> <div class="goods-image"> </div><div class="goods-name">{{goodsName}}</div><div class="goods-price">¥{{ goodsPrice.toFixed(2) }}</div></div>
 
  .goods-info { padding-bottom: 0.2rem; .goods-image { text-align: center; img{ width: 95%;vertical-align: middle; } } .goods-name { padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .goods-price { text-align: center; color: #e5017d; } } 

2商品详情页面Goods.vue(接收商品组件页面GoodsInfo.vue传过来的goodsId)

商品详情页

以上这篇vue点击Dashboard不同内容 跳转到同一表格的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持gaodaima搞代码网

以上就是vue点击Dashboard不同内容 跳转到同一表格的实例的详细内容,更多请关注gaodaima搞代码网其它相关文章!


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:vue点击Dashboard不同内容 跳转到同一表格的实例

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址