| | |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <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="hkId" label="唯一标识" ></el-table-column> |
| | | <el-table-column prop="no" label="序列号" ></el-table-column> |
| | | <el-table-column prop="regionPathName" label="所在位置"></el-table-column> |
| | | <el-table-column prop="editDate" label="最近更新时间"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:devicerole:update', 'business:devicerole:delete'])" |
| | | label="操作" |
| | | align="center" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <el-table-column prop="name" label="名称"></el-table-column> |
| | | <el-table-column prop="hkId" label="唯一标识" ></el-table-column> |
| | | <el-table-column prop="regionPathName" label="所在位置"></el-table-column> |
| | | <el-table-column prop="no" label="序列号" ></el-table-column> |
| | | <el-table-column prop="ip" label="IP地址" ></el-table-column> |
| | | <el-table-column prop="port" label="端口" ></el-table-column> |
| | | <el-table-column prop="doorId" label="账号"></el-table-column> |
| | | <el-table-column prop="doorName" label="密码" align="center"> |
| | | <template slot-scope="{row}"> |
| | | <span :class=" 'blue'">{{row.showPwd?row.doorName:'******'}}</span> |
| | | <el-button style="margin-left: 10px" v-if="row.doorName!=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="editDate" label="最近更新时间"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:devicerole:update', 'business:devicerole:delete'])" |
| | | label="操作" |
| | | align="center" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaDeviceWindow.open('编辑广播', row)" icon="el-icon-edit" v-permissions="['business:device:update']">编辑</el-button> |
| | | <el-button type="text" @click="send(row)" icon="el-icon-edit" v-permissions="['business:device:update']">发送播报</el-button> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaDeviceBroadcastWindow from '@/components/business/OperaDeviceBroadcastWindow' |
| | | import { syncDevices } from '@/api/business/device' |
| | | export default { |
| | | name: 'Device', |
| | | extends: BaseTable, |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | showPassward (row) { |
| | | if (!row.showPwd) { |
| | | this.$set(row, 'showPwd', true) |
| | | } else { |
| | | this.$set(row, 'showPwd', false) |
| | | } |
| | | }, |
| | | sendBobao () { |
| | | if(!this.form.sendInfo){ |
| | | if (!this.form.sendInfo) { |
| | | return |
| | | } |
| | | this.$dialog.actionConfirm('确认进行广播播报吗?','操作确认提醒') |
| | | this.$dialog.actionConfirm('确认进行广播播报吗?', '操作确认提醒') |
| | | .then(() => { |
| | | this.isWorkSending = true |
| | | this.api.sendBobao(this.form) |
| | |
| | | this.isWorkSending = false |
| | | this.form = { sendInfo: '', id: '', hkId: '', name: '' } |
| | | }, |
| | | synchronousData () { |
| | | synchronousData () { |
| | | this.$dialog.actionConfirm('操作确认提醒', '您确认同步全部信息吗?') |
| | | .then(() => { |
| | | this.isWorking.delete = true |
| | | syncDevices({type: 4}) |
| | | syncDevices({ type: 4 }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '同步成功') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | | // this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |