| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="showMap ? 12 : 24" :xs="24"> |
| | | <AppTable ref="AppTable" selection :showDeptSearch="false" :url="'tower/device/list'" :tableColumns="tableColumns" |
| | | :tableFilter="tableFilter" @clickRow="clickRow"> |
| | | :tableFilter="tableFilter"> |
| | | <template #operatorBox="{ row }"> |
| | | <el-button type="primary" plain icon="el-icon-plus" size="mini" |
| | | @click="handleAdd">新增设备</el-button> |
| | |
| | | </template> |
| | | <template #operator="{ row }"> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" |
| | | @click="handleUpdate(row)">修改</el-button> |
| | | @click.stop="handleUpdate(row)">修改</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" |
| | | @click="handleDelete(row)">删除</el-button> |
| | | @click.stop="handleDelete(row)">删除</el-button> |
| | | </template> |
| | | </AppTable> |
| | | </el-col> |
| | |
| | | tableColumns: [ |
| | | { |
| | | label: '设备名称', |
| | | prop: 'name' |
| | | prop: 'deviceName' |
| | | }, |
| | | { |
| | | label: '所属线路', |
| | | prop: 'createBy' |
| | | prop: 'belongingRoute' |
| | | }, |
| | | { |
| | | label: '朝向', |
| | | prop: 'createTime' |
| | | prop: 'face' |
| | | }, |
| | | { |
| | | label: '操作', |
| | |
| | | }, |
| | | // 删除数据 |
| | | handleDelete(row) { |
| | | console.log(row) |
| | | const ids = row.id || this.ids |
| | | const name = row.name || '' |
| | | this.$api.deleteByName('/tower/device', ids,name).then(res => { |
| | |
| | | handleImport () { |
| | | this.$refs.deviceImportDialog.show() |
| | | }, |
| | | clickRow(row){ |
| | | console.log(row) |
| | | this.showMap =true |
| | | }, |
| | | // clickRow(row){ |
| | | // console.log(row) |
| | | // this.showMap =true |
| | | // }, |
| | | }, |
| | | }; |
| | | </script> |