index.vue 965 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <div>
  3. <el-button size="small" type="text" @click="onShow">详 情</el-button>
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. props:['data','detailPath','idName'],
  9. components:{
  10. },
  11. computed:{
  12. },
  13. data () {
  14. return {
  15. }
  16. },
  17. methods:{
  18. onShow () {
  19. let key = ''
  20. if (this.idName instanceof Array) {
  21. key = this.idName[1]
  22. } else {
  23. key = this.idName
  24. }
  25. sessionStorage.setItem('isGo','0')
  26. let listqueryid = sessionStorage.getItem('listqueryid')
  27. let query = {id:this.data[key],rowindex:this.data.rowindex,listqueryid:listqueryid}
  28. this.$router.push({path:this.detailPath.path,query:Object.assign({},query,this.detailPath.param)})
  29. this.$store.dispatch('changeDetailDrawer',true)
  30. }
  31. },
  32. watch:{
  33. }
  34. }
  35. </script>
  36. <style>
  37. </style>
  38. <style scoped>
  39. .detail__panel{
  40. background:#f1f2f3;
  41. overflow-y: scroll;
  42. font-size: 14px;
  43. color:#666;
  44. height:100vh;
  45. }
  46. </style>