zhsxOther.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <!-- 综合事项记录 -->
  2. <template>
  3. <div class='zhsx-box'>
  4. <div class='zhsx-top'>
  5. <div>
  6. <el-tabs v-model='activeName' @tab-click='handleClick'>
  7. <el-tab-pane v-for='(item,index) in everySystem' :key='index' :label='`${item.label}`' :name='`${item.type}`'>
  8. <!-- 综合记录事项 -->
  9. <div v-if='item.type==1'>
  10. <zhsx-other-table1 ref='tableZhsx1'></zhsx-other-table1>
  11. </div>
  12. <!-- 第三方检测事项 -->
  13. <div v-if='item.type==2'>
  14. <zhsx-other-table2 ref='tableZhsx2'></zhsx-other-table2>
  15. </div>
  16. </el-tab-pane>
  17. </el-tabs>
  18. </div>
  19. <div class='zhsx-img' @click='zhsxLog'>
  20. <img src='../../assets/imgs/zy1.png' alt />
  21. </div>
  22. </div>
  23. <zhsx-dialog ref='Dialog'></zhsx-dialog>
  24. </div>
  25. </template>
  26. <script>
  27. import moment from 'moment'
  28. import Select from '@/components/Select/Select.vue'
  29. import ZhsxDialog from './zhsxDialog'
  30. import zhsxOtherTable1 from './zhsxOtherTable1'
  31. import zhsxOtherTable2 from './zhsxOtherTable2'
  32. import { querySelect } from '@/api/public.js'
  33. export default {
  34. data() {
  35. return {
  36. activeName: '1'
  37. }
  38. },
  39. props: ['everySystem'],
  40. components: { ZhsxDialog, Select, zhsxOtherTable1, zhsxOtherTable2 },
  41. methods: {
  42. zhsxLog() {
  43. this.$refs.Dialog.open()
  44. },
  45. handleClick(tab) {
  46. if (tab.index == '0') {
  47. this.$refs.tableZhsx1[0].getZhjl()
  48. } else if (tab.index == '1') {
  49. this.$refs.tableZhsx2[0].dsfjc()
  50. }
  51. },
  52. changeSelect() {
  53. let postParams = [
  54. {
  55. columnName: { brand: 'brand', manufacturer: 'manufacturer' }, //列名称
  56. params: {
  57. // tab_code: '1572'
  58. },
  59. tableName: 'glsms_asset' //视图名称
  60. }
  61. ]
  62. let data = {
  63. // major: '弱电',
  64. plazaId: '1001145'
  65. }
  66. querySelect({ data, postParams }).then(res => {
  67. console.log('部门', res)
  68. })
  69. }
  70. },
  71. mounted() {
  72. this.$refs.tableZhsx1[0].getZhjl()
  73. this.changeSelect()
  74. }
  75. }
  76. </script>
  77. <style lang="less" scoped>
  78. .zhsx-box {
  79. height: 100%;
  80. padding: 66px 50px 38px 50px;
  81. .zhsx-top {
  82. position: relative;
  83. .zhsx-img {
  84. position: absolute;
  85. width: 16px;
  86. height: 16px;
  87. left: 274px;
  88. top: 3px;
  89. img {
  90. width: 100%;
  91. height: 100%;
  92. }
  93. }
  94. .tab-top {
  95. display: flex;
  96. align-items: center;
  97. }
  98. }
  99. .zhsx-bottom {
  100. margin-top: 12px;
  101. background: #ffffff;
  102. position: relative;
  103. padding-bottom: 73px;
  104. .footer {
  105. position: absolute;
  106. height: 32px;
  107. right: 28px;
  108. bottom: 24px;
  109. }
  110. }
  111. }
  112. </style>
  113. <style lang="less">
  114. .zhsx-box {
  115. .el-dialog__header {
  116. padding: 16px 24px;
  117. }
  118. .el-dialog__title {
  119. font-size: 16px;
  120. font-family: PingFangSC-Medium, PingFang SC;
  121. font-weight: 500;
  122. color: rgba(0, 0, 0, 0.85);
  123. line-height: 24px;
  124. }
  125. .el-dialog__body {
  126. padding: 0 24px;
  127. height: 90%;
  128. }
  129. .el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2),
  130. .el-tabs--bottom .el-tabs__item.is-top:nth-child(2),
  131. .el-tabs--top .el-tabs__item.is-bottom:nth-child(2),
  132. .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
  133. padding-left: 16px;
  134. }
  135. .el-tabs--bottom .el-tabs__item.is-bottom:last-child,
  136. .el-tabs--bottom .el-tabs__item.is-top:last-child,
  137. .el-tabs--top .el-tabs__item.is-bottom:last-child,
  138. .el-tabs--top .el-tabs__item.is-top:last-child {
  139. padding-right: 16px;
  140. }
  141. .el-tabs__nav-wrap::after {
  142. height: 0;
  143. }
  144. .el-tabs__item {
  145. padding: 5px 16px;
  146. height: 30px;
  147. line-height: 22px;
  148. font-size: 14px;
  149. font-family: MicrosoftYaHei;
  150. color: rgba(31, 36, 41, 1);
  151. border: 1px solid rgba(195, 199, 203, 1);
  152. border-radius: 4px;
  153. }
  154. .el-tabs,
  155. .el-tabs__content {
  156. height: 94%;
  157. }
  158. .el-tabs__active-bar {
  159. background-color: transparent !important;
  160. }
  161. .is-active {
  162. color: #025baa;
  163. border-color: #025baa;
  164. border-radius: 4px;
  165. }
  166. .el-tabs__header {
  167. margin: 0 0 12px;
  168. }
  169. .el-table td,
  170. .el-table th {
  171. padding: 8px 0;
  172. }
  173. .el-input--suffix .el-input__inner {
  174. padding-right: 20px;
  175. }
  176. }
  177. </style>