| | |
| | | <el-form-item title="设备号" prop="doorNo"> |
| | | <el-input v-model="searchForm.doorNo" placeholder="请输入设备号" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="运行状态" prop="status"> |
| | | <el-select v-model="searchForm.status" @keypress.enter.native="search" clearable placeholder="选择状态"> |
| | | <el-option label="合闸" value="0"></el-option> |
| | | <el-option label="开闸" value="1"></el-option> |
| | | <el-option label="开闸" value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:device:create', 'business:device:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaDeviceWindow.open('新建电表')" icon="el-icon-plus" v-permissions="['business:device:create']">新建</el-button></li> |
| | | <li><el-button type="primary" @click="synchronousData">同步</el-button></li> |
| | | <!-- <li><el-button type="primary" @click="$refs.operaDeviceWindow.open('新建电表')" icon="el-icon-plus" v-permissions="['business:device:create']">新建</el-button></li>--> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:device:delete']">删除</el-button></li> |
| | | </ul> |
| | | <el-table |
| | |
| | | :data="tableData.list" |
| | | stripe > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="no" label="表号" min-width="100" align="center" ></el-table-column> |
| | | <el-table-column prop="name" label="名称" fixed min-width="150" align="center"></el-table-column> |
| | | <el-table-column prop="no" label="电表地址域" min-width="100" align="center" ></el-table-column> |
| | | <el-table-column prop="doorNo" label="设备号" min-width="120" align="center" show-overflow-tooltip></el-table-column> |
| | | <!-- |
| | | <el-table-column prop="channelNo" label="开关序号" align="center" min-width="100"></el-table-column> |
| | | --> |
| | | <el-table-column prop="doorNo" label="采集号" min-width="120" align="center" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="manufature" label="厂商" align="center" min-width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="regionPathName" align="center" min-width="100" label="所在位置"></el-table-column> |
| | | <el-table-column prop="regionPathName" align="center" min-width="100" label="绑定房间"></el-table-column> |
| | | <el-table-column prop="ip" label="IP" min-width="150" align="center" show-overflow-tooltip ></el-table-column> |
| | | <el-table-column prop="port" label="端口" align="center" ></el-table-column> |
| | | <el-table-column prop="isUsed" label="是否使用"> |
| | |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaDeviceDataListWindow from '@/components/business/OperaDianbiaoDataListWindow' |
| | | import OperaDeviceDianbiaoWindow from '@/components/business/OperaDeviceDianbiaoWindow' |
| | | import { syncDevices } from '@/api/business/device' |
| | | export default { |
| | | name: 'DeviceDuanluqi', |
| | | extends: BaseTable, |
| | |
| | | }, |
| | | send (row, type) { |
| | | this.visibleSend = true |
| | | this.form = { id: row.id, name: row.name, cmdDate: null, status: type} |
| | | this.form = { id: row.id, name: row.name, cmdDate: null, status: type } |
| | | }, |
| | | sendClose () { |
| | | this.visibleSend = false |
| | | this.isWorkSending = false |
| | | this.form = { id: '', name: '', status: '', cmdDate: '' } |
| | | }, |
| | | synchronousData () { |
| | | this.$dialog.actionConfirm('操作确认提醒', '您确认同步全部信息吗?') |
| | | .then(() => { |
| | | this.isWorking.delete = true |
| | | syncDevices({ type: 6 }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '同步成功') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |
| | | }) |
| | | }) .catch(() => {}) |
| | | } |
| | | } |
| | | } |