| | |
| | | export default { |
| | | name: "Checkmachinery", |
| | | components:{MachinerySelect}, |
| | | props:{ |
| | | planId: null, |
| | | optType: null |
| | | }, |
| | | props:{ id: null, |
| | | optType: null, |
| | | planCode: null, |
| | | }, |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | |
| | | clearCheckmachineryList() { |
| | | this.checkmachineryList = []; |
| | | }, |
| | | deleteSelectedColumns(row) { |
| | | const index = this.checkmachineryList.findIndex(item => item.id === row.id); |
| | | if (index !== -1) { |
| | |
| | | /** 查询点检设备列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | this.checkmachineryList =this.machineryList; |
| | | listInspectionPlanArchives(this.queryParams).then(response => { |
| | | // this.checkmachineryList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | handleAdd(){ |
| | | this.$refs.machinerySelect.showFlag = true; |
| | | }, |
| | | //设备资源选择回调 |
| | | // onMachineryAdd(rows){ |
| | | // if(rows !=null && rows.length >0){ |
| | | // rows.forEach(row => { |
| | | // row.planId = this.planId; |
| | | // addInspectionPlanArchives(row).then(response =>{ |
| | | // this.getList(); |
| | | // }); |
| | | // }); |
| | | // } |
| | | // }, |
| | | onMachineryAdd(selectedRows){ |
| | | if(selectedRows !=null && selectedRows.length >0){ |
| | | this.checkmachineryList = selectedRows |