zhsxOther.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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' :tableData='tableData'></zhsx-dialog>
  24. </div>
  25. </template>
  26. <script>
  27. import moment from 'moment'
  28. import { Select } from 'meri-design'
  29. // import Select from '@/components/Select/Select.vue'
  30. import ZhsxDialog from './zhsxDialog'
  31. import zhsxOtherTable1 from './zhsxOtherTable1'
  32. import zhsxOtherTable2 from './zhsxOtherTable2'
  33. import { queryZhsxjl } from '@/api/other.js'
  34. export default {
  35. data() {
  36. return {
  37. activeName: '1',
  38. tableData: []
  39. }
  40. },
  41. props: ['everySystem'],
  42. components: { ZhsxDialog, Select, zhsxOtherTable1, zhsxOtherTable2 },
  43. methods: {
  44. zhsxLog() {
  45. let params = {
  46. getParams: {}
  47. }
  48. queryZhsxjl(params).then(res => {
  49. let arr = []
  50. //console.log('综合事项弹框', res)
  51. this.tableData = res.data || []
  52. // 将tableData中的第三项都设置为相同的数据
  53. this.tableData.map(item => {
  54. arr.push(item.jlsx)
  55. })
  56. arr = [...new Set(arr)]
  57. this.tableData.map(item => {
  58. item.jlsx = arr.join('\n\r')
  59. })
  60. console.log(' this.tableData', this.tableData)
  61. })
  62. this.$refs.Dialog.open()
  63. },
  64. handleClick(tab) {
  65. if (tab.index == '0') {
  66. this.$refs.tableZhsx1[0].getZhjl()
  67. } else if (tab.index == '1') {
  68. this.$refs.tableZhsx2[0].dsfjc()
  69. }
  70. }
  71. },
  72. mounted() {
  73. this.$refs.tableZhsx1[0].getZhjl()
  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: 260px;
  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. height: 32px;
  106. display: flex;
  107. justify-content: flex-end;
  108. margin-top: 28px;
  109. }
  110. }
  111. }
  112. </style>
  113. <style lang="less">
  114. .zhsx-box {
  115. .el-dialog__header {
  116. padding: 16px 50px;
  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. background: #fff;
  153. }
  154. /deep/.el-tabs__item:nth-child(2) {
  155. border-radius: 4px 0 0 4px;
  156. }
  157. /deep/.el-tabs__item:last-child {
  158. border-radius: 0 4px 4px 0;
  159. }
  160. .el-tabs,
  161. .el-tabs__content {
  162. height: 94%;
  163. }
  164. .el-tabs__active-bar {
  165. background-color: transparent !important;
  166. }
  167. .is-active {
  168. color: #025baa;
  169. border-color: #025baa;
  170. border-radius: 4px;
  171. }
  172. .el-tabs__header {
  173. margin: 0 0 12px;
  174. }
  175. .el-table td,
  176. .el-table th {
  177. padding: 8px 0;
  178. }
  179. .el-input--suffix .el-input__inner {
  180. padding-right: 20px;
  181. }
  182. @media screen and (max-width: 1366px) {
  183. /deep/ .el-table td {
  184. padding: 3px 0;
  185. }
  186. }
  187. }
  188. </style>