index.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <div class="content main">
  3. <div class="content-left">
  4. <organ-tree @organId="currentOrganId" :buildingType="1" :clearRoom="true"></organ-tree>
  5. <div class="leftBottom">
  6. <div class="title">门禁机列表</div>
  7. <list-organ></list-organ>
  8. </div>
  9. </div>
  10. <div class="content-right">
  11. <div class="search">
  12. <el-input
  13. clearable
  14. placeholder="输入姓名/手机号/地址"
  15. class="search-input"
  16. v-model.trim="mixins_query.likeValue"
  17. ></el-input>
  18. <el-select v-model="mixins_query.communityId" placeholder="开门方式" clearable>
  19. <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
  20. </el-select>
  21. <el-date-picker
  22. v-model="pickerTime"
  23. value-format="yyyy-MM-dd"
  24. type="daterange"
  25. range-separator="至"
  26. start-placeholder="开始日期"
  27. end-placeholder="结束日期"
  28. @change="timeToggle"
  29. :editable="false"
  30. ></el-date-picker>
  31. <el-button
  32. class="search-btn"
  33. type="primary"
  34. @click="mixins_search()"
  35. :disabled="mixins_onQuery"
  36. :loading="mixins_onQuery"
  37. icon="el-icon-search"
  38. >搜索</el-button
  39. >
  40. </div>
  41. <zz-table
  42. :settings="{ showIndex: true, stripe: true }"
  43. :cols="cols"
  44. :loading="mixins_onQuery"
  45. :data="mixins_list"
  46. :pageset="mixins_pageset"
  47. @page-change="pageChange"
  48. >
  49. </zz-table>
  50. </div>
  51. </div>
  52. </template>
  53. <script>
  54. import list from '@utils/list.js';
  55. import listOrgan from './popups/listOrganTree.vue';
  56. export default {
  57. mixins: [list],
  58. components: {
  59. listOrgan
  60. },
  61. data() {
  62. return {
  63. currentId: '',
  64. pickerTime: '',
  65. cols: [
  66. {
  67. label: '社区',
  68. prop: 'communityName'
  69. },
  70. {
  71. label: '房产地址',
  72. prop: 'address'
  73. },
  74. {
  75. label: '姓名',
  76. prop: 'userName'
  77. },
  78. {
  79. label: '手机号',
  80. prop: 'mobile'
  81. },
  82. {
  83. label: '开门方式',
  84. prop: 'operateStyleName'
  85. },
  86. {
  87. label: '人员类型',
  88. prop: 'ownerTypeName'
  89. },
  90. {
  91. label: '出入图片',
  92. prop: 'imageUrl'
  93. },
  94. {
  95. label: '出入视频',
  96. prop: 'videoUrl'
  97. },
  98. {
  99. label: '开门状态',
  100. prop: 'operateStyleName'
  101. },
  102. {
  103. label: '进出门类型',
  104. prop: 'accessDoorType'
  105. },
  106. {
  107. label: '开门时间',
  108. prop: 'openTime'
  109. }
  110. ],
  111. thisLeftData: {},
  112. communityArr: [],
  113. mixins_post: 'post'
  114. };
  115. },
  116. methods: {
  117. currentOrganId(data) {
  118. this.currentId = data || '';
  119. },
  120. CheckChinese(val, name) {
  121. var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
  122. let newVal = val;
  123. if (!reg.test(val)) {
  124. newVal = val + name;
  125. }
  126. return newVal;
  127. },
  128. checkDateType(time) {
  129. return !!time ? this.$moment(new Date(time)).format('YYYY-MM-DD') : '--';
  130. },
  131. getorgTree() {
  132. this.$http
  133. .get('/sc-community/assets/community/list')
  134. .then((data) => {
  135. this.communityArr = data.data;
  136. this.$store.commit('setAreaSelect', data.data);
  137. })
  138. .catch(function () {});
  139. },
  140. timeToggle(e) {
  141. let start = '00:00:00',
  142. end = '23:59:59';
  143. if (!!e) {
  144. this.mixins_query.startTime = `${e[0]} ${start}`;
  145. this.mixins_query.endTime = `${e[1]} ${end}`;
  146. } else {
  147. this.mixins_query.startTime = ``;
  148. this.mixins_query.endTime = ``;
  149. }
  150. }
  151. },
  152. watch: {
  153. currentId(newValue, oldValue) {
  154. this.mixins_query.communityId = newValue.communityId;
  155. this.mixins_query.buildingId = newValue.buildingId;
  156. this.mixins_query.unitName = newValue.unitName;
  157. this.thisLeftData = newValue;
  158. this.mixins_search();
  159. }
  160. },
  161. created() {
  162. this.getorgTree();
  163. this.mixins_dataUrl = '/sc-gate-web/record/access/page'; // 分页查询接口
  164. this.mixins_query = {};
  165. this.mixins_search('search');
  166. }
  167. };
  168. </script>
  169. <style lang="scss" scoped>
  170. @import '@assets/css/public-style.scss';
  171. .content {
  172. height: 100%;
  173. .content-left {
  174. float: left;
  175. height: 100%;
  176. .organ-tree {
  177. height: calc(50% - #{rem(30)});
  178. float: none;
  179. }
  180. .leftBottom {
  181. margin-top: rem(20);
  182. height: calc(50% - #{rem(40)});
  183. background: white;
  184. .title {
  185. padding: rem(15) rem(20);
  186. color: $defaultColor;
  187. border-bottom: 1px solid #e0e1e3;
  188. }
  189. }
  190. }
  191. }
  192. </style>