index.vue 6.9 KB

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