gcfzDialog.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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 v-if='dialogInfo.type==1' class='table-1'>
  5. <gcfz-table1 v-if='hztjTable.length>=0' :loading='loading' :hztjTable='hztjTable'></gcfz-table1>
  6. <p class='table1-p'>注:详细位置可在辅助用房管理平面图中查询</p>
  7. </div>
  8. <div v-if='dialogInfo.type==2' class='table-2'>
  9. <gcfz-table2
  10. v-if='bgjlTable.length>=0'
  11. :loading='loading'
  12. :total='total'
  13. :page='page'
  14. :size='size'
  15. :bgjlTable='bgjlTable'
  16. @queryChange='queryChange'
  17. @changeEmit='changeEmit'
  18. ></gcfz-table2>
  19. </div>
  20. </el-dialog>
  21. </div>
  22. </template>
  23. <script>
  24. // import Select from '@/components/Select/Select.vue'
  25. import { Select } from 'meri-design'
  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. dateVal: ''
  45. }
  46. },
  47. mounted() {
  48. this.floor = this.$cookie.get('floorNow') || '1F'
  49. },
  50. components: { Select, gcfzTable1, gcfzTable2 },
  51. methods: {
  52. // 辅助用房管理-汇总统计报
  53. query() {
  54. let getParams = {
  55. plazaId: this.$store.state.plazaId,
  56. orderBy: 'floor,1'
  57. }
  58. querygcfzyfhz({ getParams }).then(res => {
  59. if (res.result == 'success') {
  60. //console.log('汇总统计报', res)
  61. this.loading = false
  62. this.hztjTable = res.data ? res.data : []
  63. }
  64. })
  65. },
  66. changeEmit(val) {
  67. //console.log(val)
  68. if (val.floors) {
  69. this.floors = val.floors
  70. }
  71. if (val.searVal) {
  72. this.searVal = val.searVal
  73. }
  74. if (val.dateVal) {
  75. this.dateVal = val.dateVal
  76. }
  77. this.queryChange()
  78. },
  79. // 变更记录
  80. queryChange() {
  81. let getParams = {
  82. plazaId: this.$store.state.plazaId,
  83. page: this.page,
  84. size: this.size
  85. }
  86. if (this.floors) {
  87. getParams.floor = this.floors
  88. }
  89. if (this.searVal) {
  90. getParams.keyword = `${this.searVal}:region`
  91. }
  92. if (this.dateVal) {
  93. getParams.changedateStartDate = this.dateVal[0] + '000000'
  94. getParams.changedateEndDate = this.dateVal[1] + '000000'
  95. }
  96. queryfzyfchange({ getParams }).then(res => {
  97. if (res.result == 'success') {
  98. //console.log('变更记录', res)
  99. this.total = res.count
  100. this.loading = false
  101. this.bgjlTable = res.data ? res.data : []
  102. }
  103. })
  104. },
  105. showModal(item) {
  106. this.visible = true
  107. this.dialogInfo = item
  108. if (this.dialogInfo.type == 1) {
  109. this.query()
  110. } else {
  111. this.queryChange()
  112. }
  113. }
  114. }
  115. }
  116. </script>
  117. <style lang="less" scoped>
  118. .table-1 {
  119. padding: 16px 24px 24px 24px;
  120. .table1-p {
  121. height: 48px;
  122. font-size: 14px;
  123. font-family: MicrosoftYaHei;
  124. color: rgba(31, 36, 41, 1);
  125. line-height: 48px;
  126. margin-top: 8px;
  127. }
  128. }
  129. .table-2 {
  130. position: relative;
  131. padding: 12px 12px 52px 12px;
  132. }
  133. </style>
  134. <style lang="less">
  135. .dialog-container {
  136. .el-table td,
  137. .el-table th {
  138. padding: 8px 0;
  139. }
  140. .el-input--suffix .el-input__inner {
  141. padding-right: 20px;
  142. }
  143. }
  144. .el-dialog__wrapper {
  145. transition-duration: 0.3s;
  146. }
  147. .dialog-fade-enter-active {
  148. animation: none !important;
  149. }
  150. .dialog-fade-leave-active {
  151. transition-duration: 0.15s !important;
  152. animation: none !important;
  153. }
  154. .dialog-fade-enter-active .el-dialog,
  155. .dialog-fade-leave-active .el-dialog {
  156. animation-fill-mode: forwards;
  157. }
  158. .dialog-fade-enter-active .el-dialog {
  159. animation-duration: 0.3s;
  160. animation-name: anim-open;
  161. animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1);
  162. }
  163. .dialog-fade-leave-active .el-dialog {
  164. animation-duration: 0.3s;
  165. animation-name: anim-close;
  166. }
  167. @keyframes anim-open {
  168. 0% {
  169. opacity: 0;
  170. transform: scale3d(0, 0, 1);
  171. }
  172. 100% {
  173. opacity: 1;
  174. transform: scale3d(1, 1, 1);
  175. }
  176. }
  177. @keyframes anim-close {
  178. 0% {
  179. opacity: 1;
  180. }
  181. 100% {
  182. opacity: 0;
  183. transform: scale3d(0.5, 0.5, 1);
  184. }
  185. }
  186. </style>