dataSourceListGL.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <div class="data-source-list-page">
  3. <div class="top-wrap">
  4. <ul class="nav-box">
  5. <li
  6. :class="['nav-item',item.key===activeNav?'active':'']"
  7. v-for="item in navOpt"
  8. :key="item.key"
  9. @click="activeNav=item.key"
  10. >{{item.name}}</li>
  11. </ul>
  12. <div>
  13. <el-date-picker
  14. v-model="time"
  15. type="date"
  16. placeholder="选择日期"
  17. value-format="yyyy-MM-dd"
  18. :clearable="false"
  19. @change="handleDateChange"
  20. style="width:200px"
  21. v-if="activeNav!='DelEDBTable'"
  22. />
  23. </div>
  24. </div>
  25. <div class="main-box">
  26. <component :is='activeNav' ref="comIns"></component>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. import DelEDBTable from './components/DelEDBTable.vue'
  32. import DetailTable from './components/DetailTable.vue'
  33. import EDBInfoChangeTable from './components/EDBInfoChangeTable.vue'
  34. import StatisticTable from './components/StatisticTable.vue'
  35. export default {
  36. components:{DelEDBTable,DetailTable,EDBInfoChangeTable,StatisticTable},
  37. watch: {
  38. activeNav(n){
  39. this.time=this.$moment().format('YYYY-MM-DD')
  40. }
  41. },
  42. data() {
  43. return {
  44. navOpt:[
  45. {name:'数据源明细表',key:'DetailTable'},
  46. {name:'数据源统计表',key:'StatisticTable'},
  47. {name:'删除指标表',key:'DelEDBTable'},
  48. {name:'指标信息变更表',key:'EDBInfoChangeTable'}
  49. ],
  50. activeNav:'DetailTable',
  51. time:this.$moment().format('YYYY-MM-DD')||''
  52. }
  53. },
  54. methods: {
  55. handleShowSetTableCol(){
  56. this.$refs.comIns.handleShowSetTableCol()
  57. },
  58. handleDateChange(){
  59. this.$refs.comIns.filterState.dateVal=this.time
  60. this.$refs.comIns.handleRefreshList()
  61. }
  62. },
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .data-source-list-page{
  67. .top-wrap{
  68. padding: 20px 30px;
  69. border-radius: 4px;
  70. border: 1px solid #DCDFE6;
  71. background-color: #fff;
  72. display: flex;
  73. justify-content: space-between;
  74. align-items: center;
  75. .nav-box{
  76. display: flex;
  77. border: 1px solid #DCDFE6;
  78. border-radius: 4px;
  79. overflow: hidden;
  80. &:last-child{
  81. border-right: none;
  82. }
  83. .nav-item{
  84. padding: 10px;
  85. color: #666;
  86. border-right: 1px solid #DCDFE6;
  87. cursor: pointer;
  88. &.active{
  89. background-color: #0052D9;
  90. color: #fff;
  91. }
  92. }
  93. }
  94. }
  95. .main-box{
  96. margin-top: 30px;
  97. padding: 30px;
  98. border-radius: 4px;
  99. border: 1px solid #DCDFE6;
  100. background-color: #fff;
  101. min-height: calc(100vh - 380px);
  102. padding-bottom: 80px;
  103. }
  104. }
  105. </style>