123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <template>
- <div class="content main">
- <div class="content-left">
- <organ-tree @organId="currentOrganId" :buildingType="1" :clearRoom="true"></organ-tree>
- <div class="leftBottom">
- <div class="title">门禁机列表</div>
- <list-organ></list-organ>
- </div>
- </div>
- <div class="content-right">
- <div class="search">
- <el-input
- clearable
- placeholder="输入姓名/手机号/地址"
- class="search-input"
- v-model.trim="mixins_query.likeValue"
- ></el-input>
- <el-select v-model="mixins_query.communityId" placeholder="开门方式" clearable>
- <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
- </el-select>
- <el-date-picker
- v-model="pickerTime"
- value-format="yyyy-MM-dd"
- type="daterange"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- @change="timeToggle"
- :editable="false"
- ></el-date-picker>
- <el-button
- class="search-btn"
- type="primary"
- @click="mixins_search()"
- :disabled="mixins_onQuery"
- :loading="mixins_onQuery"
- icon="el-icon-search"
- >搜索</el-button
- >
- </div>
- <zz-table
- :settings="{ showIndex: true, stripe: true }"
- :cols="cols"
- :loading="mixins_onQuery"
- :data="mixins_list"
- :pageset="mixins_pageset"
- @page-change="pageChange"
- >
- </zz-table>
- </div>
- </div>
- </template>
- <script>
- import list from '@utils/list.js';
- import listOrgan from './popups/listOrganTree.vue';
- export default {
- mixins: [list],
- components: {
- listOrgan
- },
- data() {
- return {
- currentId: '',
- pickerTime: '',
- cols: [
- {
- label: '社区',
- prop: 'communityName'
- },
- {
- label: '房产地址',
- prop: 'address'
- },
- {
- label: '姓名',
- prop: 'userName'
- },
- {
- label: '手机号',
- prop: 'mobile'
- },
- {
- label: '开门方式',
- prop: 'operateStyleName'
- },
- {
- label: '人员类型',
- prop: 'ownerTypeName'
- },
- {
- label: '出入图片',
- prop: 'imageUrl'
- },
- {
- label: '出入视频',
- prop: 'videoUrl'
- },
- {
- label: '开门状态',
- prop: 'operateStyleName'
- },
- {
- label: '进出门类型',
- prop: 'accessDoorType'
- },
- {
- label: '开门时间',
- prop: 'openTime'
- }
- ],
- thisLeftData: {},
- communityArr: [],
- mixins_post: 'post'
- };
- },
- methods: {
- currentOrganId(data) {
- this.currentId = data || '';
- },
- CheckChinese(val, name) {
- var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
- let newVal = val;
- if (!reg.test(val)) {
- newVal = val + name;
- }
- return newVal;
- },
- checkDateType(time) {
- return !!time ? this.$moment(new Date(time)).format('YYYY-MM-DD') : '--';
- },
- getorgTree() {
- this.$http
- .get('/sc-community/assets/community/list')
- .then((data) => {
- this.communityArr = data.data;
- this.$store.commit('setAreaSelect', data.data);
- })
- .catch(function () {});
- },
- timeToggle(e) {
- let start = '00:00:00',
- end = '23:59:59';
- if (!!e) {
- this.mixins_query.startTime = `${e[0]} ${start}`;
- this.mixins_query.endTime = `${e[1]} ${end}`;
- } else {
- this.mixins_query.startTime = ``;
- this.mixins_query.endTime = ``;
- }
- }
- },
- watch: {
- currentId(newValue, oldValue) {
- this.mixins_query.communityId = newValue.communityId;
- this.mixins_query.buildingId = newValue.buildingId;
- this.mixins_query.unitName = newValue.unitName;
- this.thisLeftData = newValue;
- this.mixins_search();
- }
- },
- created() {
- this.getorgTree();
- this.mixins_dataUrl = '/sc-gate-web/record/access/page'; // 分页查询接口
- this.mixins_query = {};
- this.mixins_search('search');
- }
- };
- </script>
- <style lang="scss" scoped>
- @import '@assets/css/public-style.scss';
- .content {
- height: 100%;
- .content-left {
- float: left;
- height: 100%;
- .organ-tree {
- height: calc(50% - #{rem(30)});
- float: none;
- }
- .leftBottom {
- margin-top: rem(20);
- height: calc(50% - #{rem(40)});
- background: white;
- .title {
- padding: rem(15) rem(20);
- color: $defaultColor;
- border-bottom: 1px solid #e0e1e3;
- }
- }
- }
- }
- </style>
|