index.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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" :currentOrganId='currentId'></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 operateStyleArr" :key="index" :label="item.label" :value="item.label"></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. width:'150px'
  121. }
  122. ],
  123. thisLeftData: {},
  124. operateStyleArr: [
  125. { label: '住户卡' },
  126. { label: '管理卡' },
  127. { label: '住户卡' },
  128. { label: '人脸识别' },
  129. { label: '临时密码' },
  130. { label: '呼叫物管机' },
  131. { label: '呼叫室内机' },
  132. { label: 'APP开门' },
  133. { label: '系统远程开门' }
  134. ],
  135. mixins_post: 'post'
  136. };
  137. },
  138. methods: {
  139. currentOrganId(data) {
  140. this.currentId = data || '';
  141. },
  142. doorGuid({ id } = data) {
  143. this.mixins_query.doorGuid = id;
  144. this.mixins_search();
  145. },
  146. CheckChinese(val, name) {
  147. var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
  148. let newVal = val;
  149. if (!reg.test(val)) {
  150. newVal = val + name;
  151. }
  152. return newVal;
  153. },
  154. checkDateType(time) {
  155. return !!time ? this.$moment(new Date(time)).format('YYYY-MM-DD') : '--';
  156. },
  157. // getorgTree() {
  158. // this.$http
  159. // .get('/sc-community/assets/community/list')
  160. // .then((data) => {
  161. // this.communityArr = data.data;
  162. // this.$store.commit('setAreaSelect', data.data);
  163. // })
  164. // .catch(function () {});
  165. // },
  166. timeToggle(e) {
  167. let start = '00:00:00',
  168. end = '23:59:59';
  169. if (!!e) {
  170. this.mixins_query.startTime = `${e[0]} ${start}`;
  171. this.mixins_query.endTime = `${e[1]} ${end}`;
  172. } else {
  173. this.mixins_query.startTime = ``;
  174. this.mixins_query.endTime = ``;
  175. }
  176. }
  177. },
  178. watch: {
  179. currentId(newValue, oldValue) {
  180. this.mixins_query.communityId = newValue.communityId;
  181. this.mixins_query.buildingId = newValue.buildingId;
  182. this.mixins_query.unitName = newValue.unitName;
  183. this.thisLeftData = newValue;
  184. this.mixins_search();
  185. clearTimeout(this.isLoadingTree);
  186. }
  187. },
  188. created() {
  189. this.mixins_dataUrl = '/sc-gate-web/record/access/page'; // 分页查询接口
  190. this.mixins_query = {};
  191. this.isLoadingTree = setTimeout(() => {
  192. this.mixins_search();
  193. }, 1000);
  194. }
  195. };
  196. </script>
  197. <style lang="scss" scoped>
  198. @import '@assets/css/public-style.scss';
  199. .content {
  200. height: 100%;
  201. display: flex;
  202. justify-content: space-between;
  203. .content-left {
  204. // height: 100%;
  205. width: rem(260);
  206. .leftDi {
  207. height: calc(50% - #{rem(30)});
  208. .organ-tree {
  209. height: 100%;
  210. &::-webkit-scrollbar {
  211. display: none;
  212. }
  213. }
  214. }
  215. .leftBottom {
  216. margin-top: rem(20);
  217. height: calc(50% - #{rem(40)});
  218. background: white;
  219. .title {
  220. padding: rem(15) rem(20);
  221. color: $defaultColor;
  222. border-bottom: 1px solid #e0e1e3;
  223. }
  224. }
  225. }
  226. }
  227. </style>