| | |
| | | </el-form> |
| | | <el-tabs type="border-card" > |
| | | <el-tab-pane label="设备清单" > |
| | | <Checkmachinery ref="machinerylist" @inSelected="onMachineryAdd"></Checkmachinery> |
| | | <Checkmachinery ref="machinerylist" :id="form.id" :planCode="form.planCode" @inSelected="onMachineryAdd" ></Checkmachinery> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="点检项目"> |
| | | <Checksubject ref="subjectlist" @subSelected="subMachineryAdd"></Checksubject> |
| | | <Checksubject ref="subjectlist" :id="form.id" @subSelected="subMachineryAdd"></Checksubject> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-divider></el-divider> |
| | |
| | | name: "InspectionPlan", |
| | | dicts: ['plan_status','plan_type','dimension'], |
| | | components:{Checkmachinery,Checksubject}, |
| | | |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | |
| | | optType: null, |
| | | // 选中数组 |
| | | ids: [], |
| | | planCodes: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** 查询点检保养计划列表 */ |
| | | clearCheckmachineryList(){ |
| | | this.$refs.machinerylist.clearCheckmachineryList() |
| | | }, |
| | | clearSubjectList() { |
| | | this.subjectList = []; |
| | | }, |
| | | clearMachineryList(){ |
| | | this.machineryList =[]; |
| | | }, |
| | | /** 查询点检保养计划列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listInspectionPlan(this.queryParams).then(response => { |
| | |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | this.clearCheckmachineryList() |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.planCode =selection.map(item => item.planCode) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | console.log(this.planCode) |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.titleName = "添加点检保养计划"; |
| | | console.log(this.machineryList) |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | this.clearSubjectList(); |
| | | this.clearMachineryList(); |
| | | this.clearCheckmachineryList() |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |