| | |
| | | <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="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="ip" label="IP" min-width="150" align="center" show-overflow-tooltip ></el-table-column> |
| | |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="doorNameObj.pwdLevel" label="密码等级" align="center" min-width="150"></el-table-column> |
| | | <el-table-column prop="doorNameObj.pwd" label="密码" align="center"> |
| | | <template slot-scope="{row}"> |
| | | <span :class=" 'blue'">{{row.showPwd?row.doorNameObj.pwd:'******'}}</span> |
| | | <el-button style="margin-left: 10px" v-if="row.doorNameObj.pwd!=null" |
| | | @click.native.p.prevent="showPassward(row)" type="text"> |
| | | <i class="el-icon-view" :class="row.showPwd?'red':'blue'" :title="row.showPwd?'隐藏':'显示'"></i> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="doorNameObj.userCode" label="操作者代码" align="center" min-width="150"></el-table-column> |
| | | <el-table-column prop="editDate" label="最近更新时间" align="center" min-width="150"></el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | |
| | | <el-button type="text" @click="$refs.operaDeviceDataWindow.open('查看电表数据', row)" icon="el-icon-view" v-permissions="['business:device:update']">数据</el-button> |
| | | <el-button type="text" @click="send(row,1)" icon="el-icon-circle-check" v-permissions="['business:device:update']">开闸</el-button> |
| | | <el-button type="text" class="red" @click="send(row,0)" icon="el-icon-circle-close" v-permissions="['business:device:update']">关闸</el-button> |
| | | <el-button type="text" class="red" @click="readData(row)" icon="el-icon-circle-close" v-permissions="['business:device:update']">读取数据</el-button> |
| | | <el-button type="text" class="red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:device:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <b class="green" v-if="form.status ===1">开闸</b> |
| | | <b class="red" v-else>关闸</b> |
| | | </el-form-item> |
| | | <el-form-item label="开关序号" prop="channelNo"> |
| | | <el-input v-model="form.channelNo" type="text" placeholder="请输入开关序号 ,多个用英文逗号隔开,如 1,2,3" v-trim/> |
| | | <el-form-item label="有效时间" prop="cmdDate"> |
| | | <el-date-picker type="datetime" v-model="form.cmdDate" value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="请选择有效时间" /> |
| | | </el-form-item> |
| | | <p class="tip-warn" style="width: 100%;"><i class="el-icon-warning"></i>设备原始开关序号信息:{{form.channelNo1}},控制多个开关,请用英文逗号隔开,如 1,2;</p> |
| | | <p class="tip-warn" style="width: 100%;"><i class="el-icon-warning"></i></p> |
| | | </el-form> |
| | | <template v-slot:footer > |
| | | <el-button @click="sendAction()" type="primary" v-if="form.status === 1" :loading="isWorkSending">确认开闸</el-button> |
| | | <el-button @click="sendAction()" type="danger" v-if="form.status !== 1" :loading="isWorkSending">确认关闸</el-button> |
| | | <el-button @click="sendAction(0)" type="primary" v-if="form.status === 1" :loading="isWorkSending">确认开闸</el-button> |
| | | <el-button @click="sendAction(1)" type="danger" v-if="form.status !== 1" :loading="isWorkSending">确认关闸</el-button> |
| | | <el-button @click="sendClose()">返回</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 新建/修改 --> |
| | | <OperaDeviceDuanluqiWindow ref="operaDeviceWindow" @success="handlePageChange"/> |
| | | <OperaDeviceDianbiaoWindow ref="operaDeviceWindow" @success="handlePageChange"/> |
| | | <OperaDeviceDataListWindow ref="operaDeviceDataWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaDeviceDataListWindow from '@/components/business/OperaDeviceDataListWindow' |
| | | import OperaDeviceDuanluqiWindow from '@/components/business/OperaDeviceDuanluqiWindow' |
| | | import OperaDeviceDataListWindow from '@/components/business/OperaDianbiaoDataListWindow' |
| | | import OperaDeviceDianbiaoWindow from '@/components/business/OperaDeviceDianbiaoWindow' |
| | | export default { |
| | | name: 'DeviceDuanluqi', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaDeviceDuanluqiWindow ,OperaDeviceDataListWindow}, |
| | | components: { TableLayout, Pagination, OperaDeviceDianbiaoWindow, OperaDeviceDataListWindow }, |
| | | data () { |
| | | return { |
| | | // 搜索 |
| | |
| | | isWorkSending: false, |
| | | form: { |
| | | id: '', |
| | | name: '', |
| | | channelNo: '', |
| | | channelNo1: '', |
| | | status: null |
| | | status: null, |
| | | name:null, |
| | | cmdDate: null |
| | | }, |
| | | visibleSend: false, |
| | | options: [], |
| | | rules: { |
| | | channelNo: [{ required: true, message: '请输入需要操作的开关序号', trigger: 'blur' }], |
| | | cmdDate: [{ required: true, message: '请选择操作有效时间' }] |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.$set(row, 'showPwd', false) |
| | | } |
| | | }, |
| | | sendAction () { |
| | | if (!this.form.channelNo) { |
| | | return |
| | | } |
| | | sendAction (status) { |
| | | this.form.status = status |
| | | this.$dialog.actionConfirm('确认进行电表【' + (this.form.status === 1 ? '开闸' : '关闸') + '】操作吗?', '操作确认提醒') |
| | | .then(() => { |
| | | console.log(this.form) |
| | | this.isWorkSending = true |
| | | this.api.duanluqiCmd(this.form) |
| | | this.api.dianbaoCmd(this.form) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '请求成功') |
| | | this.sendClose() |
| | | this.handlePageChange() |
| | | }) |
| | | .catch(e => { |
| | | }) |
| | |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | readData (row) { |
| | | this.api.dianbiaoData({ id: row.id }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '请求成功') |
| | | this.handlePageChange() |
| | | }) |
| | | .catch(e => { |
| | | }) |
| | | .finally(() => { |
| | | this.isWorkSending = false |
| | | }) |
| | | }, |
| | | send (row, type) { |
| | | this.visibleSend = true |
| | | this.form = { id: row.id, name: row.name, channelNo: row.channelNo, status: type ,channelNo1:row.channelNo} |
| | | this.form = { id: row.id, name: row.name, cmdDate: null, status: type} |
| | | }, |
| | | sendClose () { |
| | | this.visibleSend = false |
| | | this.isWorkSending = false |
| | | this.form = { id: '', name: '', channelNo: '', status: '',channelNo1:'' } |
| | | this.form = { id: '', name: '', status: '', cmdDate: '' } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |