| | |
| | | :paging='false' |
| | | v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"></el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="200" |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="300" |
| | | border @row-dblclick="selectModel" |
| | | @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column prop="modelName" label="模型名称"/> |
| | |
| | | name: 'SelectModelRbd', |
| | | data() { |
| | | return { |
| | | param: null, |
| | | dataForm: { |
| | | id: '', |
| | | modelName: '', |
| | | modelState: '', |
| | | productId: '', |
| | | phaseId: '', |
| | | operatConditId: '', |
| | | modelId: '', |
| | | } |
| | | } |
| | |
| | | components: {}, |
| | | methods: { |
| | | init(param) { |
| | | this.dataForm.productId = param.row.productId |
| | | this.dataForm.phaseId = param.phaseId |
| | | this.dataForm.id = param.row.id |
| | | console.log(param) |
| | | this.param = param |
| | | this.dataForm.productId = param.id |
| | | this.dataForm.operatConditId = param.operatConditId |
| | | this.dataForm.id = param.operatConditModelId |
| | | }, |
| | | async selectModel(row) { |
| | | async selectModel(selectRow) { |
| | | console.log(this.dataForm) |
| | | this.dataForm.modelId = row.id |
| | | this.dataForm.productId = row.productId |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/taskReliability/TaskPhaseModel/', this.dataForm) |
| | | this.dataForm.modelId = selectRow.id |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/taskReliability/OperatConditModel/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('setModel') |
| | | this.param.modelName = selectRow.modelName |
| | | } |
| | | } |
| | | } |