|  |  | 
 |  |  |           <span v-if="row.status == 2">报废</span> | 
 |  |  |         </template> | 
 |  |  |       </el-table-column> | 
 |  |  |       <el-table-column label="操作" min-width="120" fixed="right"> | 
 |  |  |       <el-table-column label="操作" min-width="130" fixed="right"> | 
 |  |  |         <template slot-scope="{row}"> | 
 |  |  |           <el-button type="text" @click="handleDetail(row)" | 
 |  |  |             v-permissions="['business:category:update']">查看详情</el-button> | 
 |  |  |           <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit" | 
 |  |  |             v-permissions="['business:category:update']">编辑</el-button> | 
 |  |  |           <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" | 
 |  |  |           <el-button type="text" @click="handleDel(row)" icon="el-icon-delete" | 
 |  |  |             v-permissions="['business:category:delete']">删除</el-button> | 
 |  |  |         </template> | 
 |  |  |       </el-table-column> | 
 |  |  | 
 |  |  |       <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> | 
 |  |  |     </div> | 
 |  |  |     <Edit v-if="showEdit" ref="EditRef" @success="getList" @close="showEdit = false" /> | 
 |  |  |     <Detail ref="DetailRef" /> | 
 |  |  |   </div> | 
 |  |  | </template> | 
 |  |  |  | 
 |  |  | 
 |  |  | import Pagination from '@/components/common/Pagination' | 
 |  |  | import QueryForm from '@/components/common/QueryForm' | 
 |  |  | import Edit from './components/deviceEdit' | 
 |  |  | import Detail from './components/deviceDetail' | 
 |  |  | import { fetchList, deleteById } from '@/api/Inspection/device' | 
 |  |  | export default { | 
 |  |  |   components: { | 
 |  |  |     Pagination, | 
 |  |  |     QueryForm, | 
 |  |  |     Edit | 
 |  |  |     Edit, | 
 |  |  |     Detail | 
 |  |  |   }, | 
 |  |  |   data() { | 
 |  |  |     return { | 
 |  |  | 
 |  |  |         this.loading = false | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     handleDetail(row) { | 
 |  |  |       this.$refs.DetailRef.visible = true | 
 |  |  |       this.$refs.DetailRef.id = row.id | 
 |  |  |       this.$refs.DetailRef.getDetail() | 
 |  |  |     }, | 
 |  |  |     handleEdit(row) { | 
 |  |  |       this.showEdit = true | 
 |  |  |       this.$nextTick(() => { | 
 |  |  |         this.$refs.EditRef.isShowModal = true | 
 |  |  |         if (row && row.id) { | 
 |  |  |           console.log('---'); | 
 |  |  |            | 
 |  |  |           this.$refs.EditRef.getDetail(row.id) | 
 |  |  |         } | 
 |  |  |       }) | 
 |  |  | 
 |  |  |       let message = `确认删除该记录吗?` | 
 |  |  |       this.$dialog.deleteConfirm(message) | 
 |  |  |         .then(() => { | 
 |  |  |           this.isWorking.delete = true | 
 |  |  |           deleteById(row.id) | 
 |  |  |             .then(() => { | 
 |  |  |               this.$tip.apiSuccess('删除成功') | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     handleSizeChange(capacity) { | 
 |  |  |       this.pagination.pageSize = capacity | 
 |  |  |       this.getList() | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } |