| | |
| | | this.machineryList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | |
| | | }, |
| | | ); |
| | | }, |
| | |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="inspectionPlanList" @selection-change="handleSelectionChange"> |
| | | <el-table border v-loading="loading" :data="inspectionPlanList" @selection-change="handleSelectionChange" @inSelected="inMachineryAdd"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="计划名称" align="center" prop="planName"> |
| | | </el-table-column> |
| | |
| | | <el-divider></el-divider> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | <el-button type="primary" @click="cs">测 试</el-button> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | export default { |
| | | name: "InspectionPlan", |
| | | dicts: ['plan_status','plan_type'], |
| | | dicts: ['plan_status','plan_type','dimension'], |
| | | components:{Checkmachinery,Checksubject}, |
| | | data() { |
| | | return { |
| | |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 测试按钮 */ |
| | | cs(){ |
| | | this.$emit('inSelected',this.planCode); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | |
| | | 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(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.spareField1 = this.planCode |
| | | this.checkmachineryList = selectedRows |
| | | console.log(this.checkmachineryList) |
| | | } |
| | | }, |
| | | /** 删除按钮操作 */ |