eqDialog.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <!-- 设备设施的三级路由的tabs -->
  3. <div class='dialog-container'>
  4. <el-dialog :title='`${systemName}-${dialogInfo.label}`' :visible.sync='visible' :fullscreen='true'>
  5. <div class='top'></div>
  6. <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.id.slice(2,4)=="YL"' style='width:100%;height:600px;overflow:hidden'>
  7. <rotation :rotationImg='rotationImg'></rotation>
  8. </div>
  9. <tj-table v-else-if='Object.keys(dialogInfo).length>0 && dialogInfo.id.slice(0,4)=="TJQD"' major='土建'></tj-table>
  10. <GDQDTable v-else-if='Object.keys(dialogInfo).length>0 && dialogInfo.id.slice(0,4)=="GDQD"' major></GDQDTable>
  11. <look-page v-else-if='Object.keys(dialogInfo).length>0 && dialogInfo.id.slice(2,4)=="TZ"' param major></look-page>
  12. <div v-else>
  13. <el-tabs v-model='activeName' @tab-click='handleClick' v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length>0'>
  14. <el-tab-pane
  15. v-for='(value,index) in dialogInfo.children'
  16. :key='"u"+index'
  17. :label='`${value.label}`'
  18. :name='`${value.param.CLASSSTRUCTUREID}`'
  19. >
  20. <div v-if='value.id.slice(2,4)=="YL"' style='width:100%;height:600px;overflow:hidden'>
  21. <rotation :rotationImg='rotationImg'></rotation>
  22. </div>
  23. <tableList v-else-if='value.id.slice(0,4)=="RDQD"' ref='list' :param='param' major='弱电'></tableList>
  24. <tableList v-else-if='value.id.slice(0,4)=="NTQD"' ref='list' :param='param' major='暖通'></tableList>
  25. <wb-table v-else-if='value.id.slice(2,4)=="WX"' param major='维修'></wb-table>
  26. <zw-table v-else-if='value.id.slice(2,4)=="ZW"' param major='专维'></zw-table>
  27. <wb-table v-else-if='value.id.slice(2,4)=="WB"' param major='维保'></wb-table>
  28. </el-tab-pane>
  29. </el-tabs>
  30. </div>
  31. </el-dialog>
  32. </div>
  33. </template>
  34. <script>
  35. import tableList from './table/eqListTable'
  36. import tjTable from './table/tjTable'
  37. import wbTable from './table/wbTable'
  38. import zwTable from './table/zwTable'
  39. import lookPage from './table/lookPageTable'
  40. import GDQDTable from './table/GDQDTable'
  41. export default {
  42. props: ['systemName'],
  43. data() {
  44. return {
  45. activeName: '',
  46. visible: false,
  47. dialogInfo: {},
  48. param: '',
  49. rotationImg: [require('@/assets/imgs/eq.jpg'), require('@/assets/imgs/survey_pop2.png'), require('@/assets/imgs/survey_pop1.png')]
  50. }
  51. },
  52. mounted() {},
  53. components: { tableList, tjTable, wbTable, zwTable, lookPage, GDQDTable },
  54. methods: {
  55. showModal(item) {
  56. this.visible = true
  57. this.dialogInfo = item
  58. if (Object.keys(this.dialogInfo).length > 0 && this.dialogInfo.children.length > 0) {
  59. this.activeName = this.dialogInfo.children[0].param.CLASSSTRUCTUREID
  60. }
  61. },
  62. handleClick(tab) {
  63. this.param = tab.name
  64. console.log(tab)
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="less" scoped>
  70. .top {
  71. width: 1366px;
  72. height: 1px;
  73. background: rgba(0, 0, 0, 0.06);
  74. margin-bottom: 20px;
  75. }
  76. </style>
  77. <style lang="less">
  78. .dialog-container {
  79. .el-dialog__header {
  80. padding: 16px 24px;
  81. }
  82. .el-dialog__title {
  83. font-size: 16px;
  84. font-family: PingFangSC-Medium, PingFang SC;
  85. font-weight: 500;
  86. color: rgba(0, 0, 0, 0.85);
  87. line-height: 24px;
  88. }
  89. .el-dialog__body {
  90. padding: 0 24px;
  91. height: 90%;
  92. }
  93. .el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2),
  94. .el-tabs--bottom .el-tabs__item.is-top:nth-child(2),
  95. .el-tabs--top .el-tabs__item.is-bottom:nth-child(2),
  96. .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
  97. padding-left: 16px;
  98. }
  99. .el-tabs--bottom .el-tabs__item.is-bottom:last-child,
  100. .el-tabs--bottom .el-tabs__item.is-top:last-child,
  101. .el-tabs--top .el-tabs__item.is-bottom:last-child,
  102. .el-tabs--top .el-tabs__item.is-top:last-child {
  103. padding-right: 16px;
  104. }
  105. .el-tabs__nav-wrap::after {
  106. height: 0;
  107. }
  108. .el-tabs__item {
  109. padding: 5px 16px;
  110. height: 30px;
  111. line-height: 22px;
  112. font-size: 14px;
  113. font-family: MicrosoftYaHei;
  114. color: rgba(31, 36, 41, 1);
  115. border: 1px solid rgba(195, 199, 203, 1);
  116. }
  117. .el-tabs,
  118. .el-tabs__content {
  119. height: 94%;
  120. }
  121. .el-tabs__active-bar {
  122. background-color: transparent !important;
  123. }
  124. .is-active {
  125. color: #025baa;
  126. border-color: #025baa;
  127. }
  128. }
  129. </style>