|  |  | 
 |  |  |           <template slot-scope="scope"> | 
 |  |  |             <el-select v-model="scope.row.modelId" :disabled="scope.row.isDisabled == 1" placeholder="请选择" | 
 |  |  |                        style="width:100%" @change="modelChanged(scope.row)"> | 
 |  |  |               <el-option on | 
 |  |  |               <el-option | 
 |  |  |                          v-for="item in scope.row.modelList" | 
 |  |  |                          :key="item.id" | 
 |  |  |                          :label="item.modelName" | 
 |  |  | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |       </el-table> | 
 |  |  |       <el-dialog v-dialogDrag title="模型设计" top="1vh" width='95%' :visible.sync="dialogVisible2" v-if="dialogVisible2"> | 
 |  |  |         <RBDEditImg ref="rbdEditImg"></RBDEditImg> | 
 |  |  |       <el-dialog v-dialogDrag :title="title" top="1vh" width='95%' :visible.sync="dialogVisible2" v-if="dialogVisible2"> | 
 |  |  |         <model-view ref="modelView"></model-view> | 
 |  |  |       </el-dialog> | 
 |  |  |     </zt-table-wraper> | 
 |  |  |   </div> | 
 |  |  | </template> | 
 |  |  |  | 
 |  |  | <script> | 
 |  |  |   import RBDEditImg from './RBD-edit-img' | 
 |  |  |   import ModelView from "./ModelView"; | 
 |  |  |   import cloneDeep from 'lodash/cloneDeep' | 
 |  |  |  | 
 |  |  |   export default { | 
 |  |  | 
 |  |  |         modelList: [], | 
 |  |  |         dialogVisible2: false, | 
 |  |  |         isChange: false, | 
 |  |  |         title: '' | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     components: { | 
 |  |  |       RBDEditImg | 
 |  |  |       ModelView | 
 |  |  |     }, | 
 |  |  |     mounted() { | 
 |  |  |       this.getModelNodes() | 
 |  |  | 
 |  |  |       async save() { | 
 |  |  |         let res = await this.$http.post('/taskReliability/OperatConditModel/', this.$refs.tableObj.dataList[0]) | 
 |  |  |         if (res.success) { | 
 |  |  |           this.$tip.success() | 
 |  |  |           this.isChange = false | 
 |  |  |           this.$refs.tableObj.query() | 
 |  |  |         } | 
 |  |  | 
 |  |  |         let modelNodes = this.mapModelNodes[modelId] | 
 |  |  |         console.log(modelId, 'modelChanged modelId') | 
 |  |  |         console.log(modelNodes, 'modelChanged modelNodes') | 
 |  |  |         console.log(row.children, 'row.children') | 
 |  |  |  | 
 |  |  |         for (let subRow of row.children) { | 
 |  |  |           if (modelNodes.indexOf(subRow.productId)) { | 
 |  |  |           console.log(subRow, 'subRow') | 
 |  |  |           console.log(subRow.productId, 'subRow.productId') | 
 |  |  |           if (modelNodes.indexOf(subRow.productId) != -1) { | 
 |  |  |             subRow.isDisabled = 0 | 
 |  |  |             if (subRow.modelList.length == 1) { | 
 |  |  |               subRow.modelId = subRow.modelList[0].id | 
 |  |  |               console.log(subRow.modelId, 'subRow.modelId 111') | 
 |  |  |               console.log(this.mapModelNodes[subRow.modelId], 'this.mapModelNodes[subRow.modelId] 111') | 
 |  |  |             } else { | 
 |  |  |               //subRow.modelId = null | 
 |  |  |             } | 
 |  |  | 
 |  |  |       }, | 
 |  |  |       drawRBD(row) { | 
 |  |  |         this.dialogVisible2 = true | 
 |  |  |         this.title=row.modelName + '模型设计' | 
 |  |  |         let param = { | 
 |  |  |           id: row.modelId, | 
 |  |  |           model: row.modelName, | 
 |  |  |           productId: row.productId | 
 |  |  |           modelName: row.modelName, | 
 |  |  |         } | 
 |  |  |         this.$nextTick(() => { | 
 |  |  |           this.$refs.rbdEditImg.init(param) | 
 |  |  |           this.$refs.modelView.init(param) | 
 |  |  |         }) | 
 |  |  |       } | 
 |  |  |     } |