index.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <div class="InstanceManagementList">
  3. <!-- <Breadcrumb separator=">">
  4. <BreadcrumbItem v-if="tabalive==='待办流程'" @click.native="routeClick(1)">待办流程</BreadcrumbItem>
  5. <BreadcrumbItem v-if="tabalive==='历史流程'" @click.native="routeClick(2)">历史流程</BreadcrumbItem>
  6. </Breadcrumb> -->
  7. <!-- <Tabs :value="tabalive" @on-click="onClick"> -->
  8. <!-- <TabPane label="待办流程" name="待办流程"><todoProcess v-if="tabalive === '待办流程'" :tabalive="tabalive"></todoProcess></TabPane> -->
  9. <TabPane label="历史流程" name="历史流程"><HistoricalProcess :falg="1" v-if="tabalive === '历史流程'" :tabalive="tabalive"></HistoricalProcess></TabPane>
  10. <!-- </Tabs> -->
  11. </div>
  12. </template>
  13. <script>
  14. import todoProcess from '@/components/todoProcess/index';
  15. import HistoricalProcess from '@/components/HistoricalProcess';
  16. // import router from '../config/router.config'
  17. export default {
  18. name:'handled',
  19. // todoProcess,
  20. components:{todoProcess,HistoricalProcess},
  21. data(){
  22. return{
  23. tabalive:"历史流程",//tab切换默认值
  24. tabConfig:[{
  25. label:'待办流程',
  26. name:'待办流程'
  27. },{
  28. label:'历史流程',
  29. name:'历史流程'
  30. }]
  31. }
  32. },
  33. methods:{
  34. routeClick(val){
  35. if(val === 1){
  36. this.tabalive = '待办流程';
  37. } else if (val === 2) {
  38. this.tabalive = '历史流程';
  39. }
  40. },
  41. //tab切换点击事件
  42. onClick(val){
  43. this.tabalive=val;
  44. if(val==='历史流程'){
  45. window.history.replaceState({}, '', "/#/InstanceManagementList?type=2");
  46. }else{
  47. window.history.replaceState({}, '', "/#/InstanceManagementList?type=1");
  48. }
  49. },
  50. },
  51. created(){
  52. this.routeClick(2);
  53. }
  54. }
  55. </script>
  56. <style lang="scss" >
  57. .InstanceManagementList{
  58. background: white;
  59. padding: 20px;
  60. display: flex;
  61. flex-direction: column;
  62. .burgeon-breadcrumb{
  63. font-size:18px;
  64. margin-bottom: 12px;
  65. }
  66. .burgeon-tabs{
  67. flex:1;
  68. display: flex;
  69. -webkit-box-direction: column;
  70. flex-direction: column;
  71. .burgeon-tabs-bar{
  72. // height: 27px;
  73. }
  74. .burgeon-tabs-content-animated{
  75. flex:1;
  76. .burgeon-tabs-tabpane{
  77. display: flex;
  78. }
  79. }
  80. }
  81. }
  82. </style>