|  |  | @ -91,7 +91,7 @@ | 
			
		
	
		
			
				
					|  |  |  |                 @click="editFormData(scope.row)" | 
			
		
	
		
			
				
					|  |  |  |               >编辑</el-button> | 
			
		
	
		
			
				
					|  |  |  |               <el-button type="danger" class="record_btn" @click="recordData(scope.$index, scope.row)">记录</el-button> | 
			
		
	
		
			
				
					|  |  |  |               <el-button type="danger">解绑</el-button> | 
			
		
	
		
			
				
					|  |  |  |               <el-button type="danger" @click="removeDevice(scope.row)">解绑</el-button> | 
			
		
	
		
			
				
					|  |  |  |             </template> | 
			
		
	
		
			
				
					|  |  |  |           </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |         </el-table> | 
			
		
	
	
		
			
				
					|  |  | @ -198,7 +198,7 @@ | 
			
		
	
		
			
				
					|  |  |  | </template> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | <script> | 
			
		
	
		
			
				
					|  |  |  | import { ReqDeviceEdit ,ReqDeviceList,ReqQueryDevice} from '@/api/device/deviceList.js' | 
			
		
	
		
			
				
					|  |  |  | import { ReqDeviceEdit ,ReqDeviceList,ReqQueryDevice,ReqRemoveDevice} from '@/api/device/deviceList.js' | 
			
		
	
		
			
				
					|  |  |  | import {parseTime} from '@/utils/index.js' | 
			
		
	
		
			
				
					|  |  |  | export default { | 
			
		
	
		
			
				
					|  |  |  |   name: 'Device', | 
			
		
	
	
		
			
				
					|  |  | @ -267,7 +267,40 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       this.form.name=row.device_name | 
			
		
	
		
			
				
					|  |  |  |       this.form.orientation=row.device_direction==1?'竖屏':'横屏' | 
			
		
	
		
			
				
					|  |  |  |       this.form.device_id=row.device_id      | 
			
		
	
		
			
				
					|  |  |  |       console.log(this.form.orientation) | 
			
		
	
		
			
				
					|  |  |  |       // console.log(this.form.device_id)     | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 解绑 | 
			
		
	
		
			
				
					|  |  |  |     removeDevice(row){ | 
			
		
	
		
			
				
					|  |  |  |       // console.log(row.device_id) | 
			
		
	
		
			
				
					|  |  |  |       this.$confirm(`你确定解绑${row.device_name}?`, "提示", { | 
			
		
	
		
			
				
					|  |  |  |         confirmButtonText: "确定", | 
			
		
	
		
			
				
					|  |  |  |         cancelButtonText: "取消", | 
			
		
	
		
			
				
					|  |  |  |         type: "warning", | 
			
		
	
		
			
				
					|  |  |  |       }).then(()=>{ | 
			
		
	
		
			
				
					|  |  |  |         const params={ | 
			
		
	
		
			
				
					|  |  |  |           id:row.device_id | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         ReqRemoveDevice(params).then(res=>{    | 
			
		
	
		
			
				
					|  |  |  |           if (res.code === 200) { | 
			
		
	
		
			
				
					|  |  |  |             this.$message({ | 
			
		
	
		
			
				
					|  |  |  |               message: '解绑成功', | 
			
		
	
		
			
				
					|  |  |  |               type: 'success' | 
			
		
	
		
			
				
					|  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |              this.getDevice() | 
			
		
	
		
			
				
					|  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |       // .catch(err => err) //用catch来捕获错误消息 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |       // if ('cancel' === confirmRes) {//用户点击了取消 | 
			
		
	
		
			
				
					|  |  |  |       //  return this.$message.info('已经取消了删除') | 
			
		
	
		
			
				
					|  |  |  |       // } | 
			
		
	
		
			
				
					|  |  |  |       // if ('confirm' === confirmRes) { //用户点击了确认  | 
			
		
	
		
			
				
					|  |  |  |       //   ReqRemoveDevice(row.id).then(res=>{ | 
			
		
	
		
			
				
					|  |  |  |       //     console.log(res) | 
			
		
	
		
			
				
					|  |  |  |       //   }) | 
			
		
	
		
			
				
					|  |  |  |           | 
			
		
	
		
			
				
					|  |  |  |       // } | 
			
		
	
		
			
				
					|  |  |  |        | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
	
		
			
				
					|  |  | 
 |