| | |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" |
| | | v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle" |
| | | row-key="id" |
| | | row-key="iid" |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | :default-expand-all="true"> |
| | | <el-table-column prop="product" label="产品节点"/> |
| | | <el-table-column prop="productName" label="产品节点"/> |
| | | <el-table-column prop="modelId" label="产品模型"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.modelId" :disabled="scope.row.isDisabled == 1" placeholder="请选择" |
| | |
| | | |
| | | <script> |
| | | import RBDEditImg from './RBD-edit-img' |
| | | import cloneDeep from 'lodash/cloneDeep' |
| | | |
| | | export default { |
| | | name: 'OperaConditModel', |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | id: '', |
| | | operatConditId: '', |
| | | productId: '', |
| | | }, |
| | | mapModelNodes: {}, |
| | | modelList: [], |
| | | dialogVisible2: false, |
| | | isChange: false, |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | console.log(dataList[0].modelList[0].id, ' dataList[0].modelList[0].modelId') |
| | | dataList[0].modelId = dataList[0].modelList[0].id |
| | | console.log(dataList[0], 'dataLoaded(dataList)') |
| | | this.modelChanged(dataList[0]) |
| | | this.modelChangedProess(dataList[0]) |
| | | } |
| | | }, |
| | | async save() { |
| | | let res = await this.$http.post('/taskReliability/OperatConditModel/', this.$refs.tableObj.dataList[0]) |
| | | if (res.success) { |
| | | this.isChange = false |
| | | this.$refs.tableObj.query() |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | modelChanged(row) { |
| | | this.isChange = true |
| | | this.modelChangedProess(row) |
| | | }, |
| | | modelChangedProess(row) { |
| | | let modelId = row.modelId |
| | | let modelNodes = this.mapModelNodes[modelId] |
| | | console.log(modelId, 'modelChanged modelId') |