gcfzDialog.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <div class='dialog-container'>
  3. <el-dialog v-if='Object.keys(dialogInfo).length>0' :title='`${systemName}-${dialogInfo.label}`' :visible.sync='visible' :fullscreen='true'>
  4. <div class='top'></div>
  5. <div v-if='dialogInfo.type==1' class='table-1'>
  6. <gcfz-table1 v-if='hztjTable.length>=0' :loading='loading' :hztjTable='hztjTable'></gcfz-table1>
  7. <p class='table1-p'>注:详细位置可在辅助用房管理平面图中查询</p>
  8. </div>
  9. <div v-if='dialogInfo.type==2' class='table-2'>
  10. <gcfz-table2
  11. v-if='bgjlTable.length>=0'
  12. :loading='loading'
  13. :total='total'
  14. :page='page'
  15. :size='size'
  16. :bgjlTable='bgjlTable'
  17. @queryChange='queryChange'
  18. @changeEmit='changeEmit'
  19. ></gcfz-table2>
  20. </div>
  21. </el-dialog>
  22. </div>
  23. </template>
  24. <script>
  25. import Select from '@/components/Select/Select.vue'
  26. import gcfzTable1 from './gcfz1'
  27. import gcfzTable2 from './gcfz2'
  28. import { querygcfzyfhz, queryfzyfchange } from '@/api/other.js'
  29. export default {
  30. props: ['systemName'],
  31. data() {
  32. return {
  33. visible: false,
  34. dialogInfo: {},
  35. loading: true,
  36. hztjTable: [],
  37. total: 0,
  38. page: 1,
  39. size: 10,
  40. floor: '',
  41. bgjlTable: [],
  42. floors: '',
  43. searVal: ''
  44. }
  45. },
  46. mounted() {
  47. this.floor = this.$cookie.get('floorNow') || '1F'
  48. },
  49. components: { Select, gcfzTable1, gcfzTable2 },
  50. methods: {
  51. // 辅助用房管理-汇总统计报
  52. query() {
  53. let getParams = {
  54. plazaId: '1000303'
  55. // plazaId: this.$store.state.plazaId
  56. }
  57. querygcfzyfhz({ getParams }).then(res => {
  58. if (res.result == 'success') {
  59. console.log('汇总统计报', res)
  60. this.loading = false
  61. this.hztjTable = res.data ? res.data : []
  62. }
  63. })
  64. },
  65. changeEmit(val) {
  66. console.log(val)
  67. if (val.floors) {
  68. this.floors = val.floors
  69. }
  70. if (val.searVal) {
  71. this.searVal = val.searVal
  72. }
  73. this.queryChange()
  74. },
  75. // 变更记录
  76. queryChange() {
  77. let getParams = {
  78. plazaId: this.$store.state.plazaId,
  79. page: this.page,
  80. size: this.size
  81. }
  82. if (this.floors) {
  83. getParams.floor = this.floors
  84. }
  85. if (this.searVal) {
  86. getParams.keyword = `${this.searVal}:region`
  87. }
  88. queryfzyfchange({ getParams }).then(res => {
  89. if (res.result == 'success') {
  90. console.log('变更记录', res)
  91. this.total = res.count
  92. this.loading = false
  93. this.bgjlTable = res.data ? res.data : []
  94. }
  95. })
  96. },
  97. showModal(item) {
  98. this.visible = true
  99. this.dialogInfo = item
  100. if (this.dialogInfo.type == 1) {
  101. this.query()
  102. } else {
  103. this.queryChange()
  104. }
  105. }
  106. }
  107. }
  108. </script>
  109. <style lang="less" scoped>
  110. .top {
  111. width: 100%;
  112. height: 1px;
  113. background: rgba(0, 0, 0, 0.06);
  114. margin-bottom: 20px;
  115. }
  116. .table-1 {
  117. padding: 16px 24px 24px 24px;
  118. .table1-p {
  119. height: 48px;
  120. font-size: 14px;
  121. font-family: MicrosoftYaHei;
  122. color: rgba(31, 36, 41, 1);
  123. line-height: 48px;
  124. margin-top: 8px;
  125. }
  126. }
  127. .table-2 {
  128. position: relative;
  129. padding: 12px 12px 52px 12px;
  130. }
  131. </style>
  132. <style lang="less">
  133. .dialog-container {
  134. .el-table td,
  135. .el-table th {
  136. padding: 8px 0;
  137. }
  138. .el-input--suffix .el-input__inner {
  139. padding-right: 20px;
  140. }
  141. }
  142. </style>