eqDialog.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <!-- 设备设施的三级路由的tabs -->
  3. <div class='dialog-container'>
  4. <el-dialog :title='`${systemName}-${dialogInfo.label}`' :visible.sync='visible' :fullscreen='true'>
  5. <!-- 除了清单和原理页面,别的都有记录事项detailDialog页面 -->
  6. <div slot='title' class='header-title' v-if='Object.keys(dialogInfo).length>0'>
  7. <span class='title-name'>{{systemName}}-{{dialogInfo.label}}</span>
  8. <img v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL"' src='../../assets/imgs/zy1.png' @click='visibalBox' alt />
  9. </div>
  10. <!-- 没有tab的页面 -->
  11. <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0'>
  12. <!-- 原理图 -->
  13. <div v-if='dialogInfo.id.slice(2,4)=="YL"' style='width:100%;height:600px;overflow:hidden'>
  14. <rotation :rotationImg='rotationImg'></rotation>
  15. </div>
  16. <!-- 土建系统主要材料清单 -->
  17. <tj-table v-else-if='dialogInfo.id.slice(0,4)=="TJQD"' :param='param'></tj-table>
  18. <!-- 主要设备清单 标准设备表格 -->
  19. <standTable v-else-if='dialogInfo.id.slice(2,4)=="QD"' :param='param' :major='dialogInfo.id'></standTable>
  20. <!-- 电井商铺范围清单 -->
  21. <djsp-table v-else-if='dialogInfo.id.slice(0,4)=="GJSP"'></djsp-table>
  22. <!-- 查看图纸 -->
  23. <look-page v-else-if='dialogInfo.id.slice(2,4)=="TZ"' param major></look-page>
  24. </div>
  25. <!-- 有tab的页面 -->
  26. <div v-else>
  27. <el-tabs v-model='activeName' @tab-click='handleClick' v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length>0'>
  28. <el-tab-pane
  29. v-for='(value,index) in dialogInfo.children'
  30. :key='"u"+index'
  31. :label='`${value.label}`'
  32. :name='`${value.param.tab_code}`'
  33. >
  34. <!-- 有tab的原理图 -->
  35. <div v-if='value.id.slice(2,4)=="YL"' style='width:100%;height:600px;overflow:hidden'>
  36. <rotation :rotationImg='rotationImg'></rotation>
  37. </div>
  38. <!-- 主要设备清单 标准设备表格加tab -->
  39. <tableList v-else-if='value.id.slice(0,4)=="RDQD"' :param='param' ref='list1' major='弱电'></tableList>
  40. <tableList v-else-if='value.id.slice(0,4)=="NTQD"' :param='param' ref='list2' major='暖通'></tableList>
  41. <!-- 维保表格 -->
  42. <wb-table v-else-if='value.id.slice(2,4)=="WB"' :smsxt='smsxt' major='维保'></wb-table>
  43. <!-- 维修的表格 -->
  44. <wx-table v-else-if='value.id.slice(2,4)=="WX"' :smsxt='smsxt' major='维修'></wx-table>
  45. <!-- 专维 -->
  46. <zw-table v-else-if='value.id.slice(2,4)=="ZW"' param major='专维'></zw-table>
  47. <!-- 其他 -->
  48. <other-table v-else-if='value.id.slice(2,4)=="QT"' param major='其他'></other-table>
  49. <!-- 建筑立面图 -->
  50. <tj-build-table v-else-if='value.id.slice(0,4)=="TJLM"'></tj-build-table>
  51. </el-tab-pane>
  52. </el-tabs>
  53. </div>
  54. </el-dialog>
  55. <!--记录表格 -->
  56. <record-dialog ref='Dialog'></record-dialog>
  57. </div>
  58. </template>
  59. <script>
  60. import tableList from './table/eqListTable'
  61. import tjTable from './table/tjTable'
  62. import wbTable from './table/wbTable'
  63. import zwTable from './table/zwTable'
  64. import lookPage from './table/lookPageTable'
  65. import standTable from './table/standTable'
  66. import otherTable from './table/otherTable'
  67. import wxTable from './table/wxTable'
  68. import recordDialog from './table/recordDialog'
  69. import djspTable from './table/djspTable'
  70. export default {
  71. props: ['systemName', 'smsxt'],
  72. data() {
  73. return {
  74. activeName: '',
  75. visible: false,
  76. dialogInfo: {},
  77. param: '',
  78. rotationImg: [require('@/assets/imgs/eq.jpg'), require('@/assets/imgs/survey_pop2.png'), require('@/assets/imgs/survey_pop1.png')]
  79. }
  80. },
  81. mounted() {},
  82. components: { tableList, tjTable, wbTable, zwTable, lookPage, standTable, otherTable, wxTable, recordDialog, djspTable },
  83. methods: {
  84. showModal(item) {
  85. this.visible = true
  86. this.dialogInfo = item
  87. if (Object.keys(this.dialogInfo).length > 0 && this.dialogInfo.children.length > 0) {
  88. this.activeName = this.dialogInfo.children[0].param.tab_code
  89. } else {
  90. this.activeName = this.dialogInfo.param.tab_code
  91. }
  92. this.param = this.activeName
  93. },
  94. handleClick(tab) {
  95. this.param = tab.name
  96. this.activeName = tab.name
  97. },
  98. visibalBox() {
  99. this.$refs.Dialog.open()
  100. }
  101. }
  102. }
  103. </script>
  104. <style lang="less" scoped>
  105. .dialog-container {
  106. .title-name {
  107. font-size: 16px;
  108. padding-right: 6px;
  109. color: #000;
  110. font-weight: bold;
  111. }
  112. }
  113. .top {
  114. width: 1366px;
  115. height: 1px;
  116. background: rgba(0, 0, 0, 0.06);
  117. margin-bottom: 20px;
  118. }
  119. </style>
  120. <style lang="less" >
  121. .dialog-container {
  122. .el-dialog__header {
  123. padding: 16px 24px;
  124. }
  125. .el-dialog__title {
  126. font-size: 16px;
  127. font-family: PingFangSC-Medium, PingFang SC;
  128. font-weight: 500;
  129. color: rgba(0, 0, 0, 0.85);
  130. line-height: 24px;
  131. }
  132. .el-dialog__body {
  133. padding: 0 24px;
  134. height: 90%;
  135. }
  136. .el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2),
  137. .el-tabs--bottom .el-tabs__item.is-top:nth-child(2),
  138. .el-tabs--top .el-tabs__item.is-bottom:nth-child(2),
  139. .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
  140. padding-left: 16px;
  141. }
  142. .el-tabs--bottom .el-tabs__item.is-bottom:last-child,
  143. .el-tabs--bottom .el-tabs__item.is-top:last-child,
  144. .el-tabs--top .el-tabs__item.is-bottom:last-child,
  145. .el-tabs--top .el-tabs__item.is-top:last-child {
  146. padding-right: 16px;
  147. }
  148. .el-tabs__nav-wrap::after {
  149. height: 0;
  150. }
  151. .el-tabs__item {
  152. padding: 5px 16px;
  153. height: 30px;
  154. line-height: 22px;
  155. font-size: 14px;
  156. font-family: MicrosoftYaHei;
  157. color: rgba(31, 36, 41, 1);
  158. border: 1px solid rgba(195, 199, 203, 1);
  159. }
  160. .el-tabs,
  161. .el-tabs__content {
  162. height: 700px;
  163. }
  164. .el-tabs__active-bar {
  165. background-color: transparent !important;
  166. }
  167. .is-active {
  168. color: #025baa;
  169. border-color: #025baa;
  170. }
  171. }
  172. </style>