| | |
| | | <template> |
| | | <TableLayout :permissions="['business:device:query']"> |
| | | <!-- 搜索表单 --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <div ref="QueryFormRef" slot="search-form"> |
| | | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="门禁点名称" prop="doorName"> |
| | | <el-input v-model="searchForm.doorName" placeholder="请输入门禁点名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="区域名称" prop="regionPathName"> |
| | | <el-input v-model="searchForm.regionPathName" placeholder="请输入区域名称" @keypress.enter.native="search"></el-input> |
| | | <el-input v-model="searchForm.regionPathName" placeholder="请输入区域名称" |
| | | @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="是否园区入口" prop="isEntrance"> |
| | | <el-select v-model="searchForm.isEntrance" placeholder="请选择"> |
| | |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar"> |
| | | <li><el-button type="primary" @click="synchronousData">同步</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | > |
| | | <el-table-column label="序号" width="55" fixed><template slot-scope="scope" >{{scope.$index+1}}</template></el-table-column> |
| | | <el-table :max-height="tableHeight" v-loading="isWorking.search" :data="tableData.list" stripe> |
| | | <el-table-column label="序号" width="55" fixed><template slot-scope="scope">{{ scope.$index + 1 |
| | | }}</template></el-table-column> |
| | | <el-table-column prop="name" label="设备名称"></el-table-column> |
| | | <el-table-column prop="doorName" label="门禁点名称"></el-table-column> |
| | | <el-table-column prop="regionPathName" label="区域名称"></el-table-column> |
| | |
| | | <el-table-column prop="port" label="设备端口"></el-table-column> |
| | | <el-table-column label="是否园区入口"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | @change="changeManufature($event, row)" |
| | | v-model="row.isEntrance" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="1" |
| | | :inactive-value="0"> |
| | | <el-switch @change="changeManufature($event, row)" v-model="row.isEntrance" active-color="#13ce66" |
| | | inactive-color="#ff4949" :active-value="1" :inactive-value="0"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="no" width="200px" label="设备号"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | </template> |
| | | <!-- 新建/修改 --> |
| | |
| | | }) |
| | | this.search() |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.tableHeight = document.body.scrollHeight - this.$refs.QueryFormRef.offsetHeight - 300 |
| | | }) |
| | | }, |
| | | methods: { |
| | | changeManufature(e, row) { |
| | | updateEntranceById({ |