gcfzDialog.vue 5.4 KB

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