| | |
| | | <el-table-column prop="phaseSpeed" label="阶段时速" align="right"/> |
| | | <!--<el-table-column prop="phaseSort" label="阶段顺序" align="center"/>--> |
| | | <el-table-column prop="operatConditDuration" label="工况时长分配" align="center"/> |
| | | <zt-table-column-handle :table="table" |
| | | delete-perm="taskReliability::delete"/> |
| | | <zt-table-column-handle :table="table" edit-perm="testReviewComment:update" |
| | | delete-perm="taskReliability::delete"> |
| | | <template v-slot="{row}"> |
| | | <zt-table-button type="primary" @click="openEditWin(row)">修改</zt-table-button> |
| | | </template> |
| | | </zt-table-column-handle> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update @refreshDataList="refreshData" ref="AddOrUpdate"/> |
| | |
| | | for (let i = 0; i < this.dataList.length; i++) { |
| | | this.time = this.time + Number(this.dataList[i].phaseDurationRate) |
| | | } |
| | | if (this.time>1){ |
| | | this.$alert("当前运行时长比已超出,请重新设置") |
| | | } |
| | | console.log(this.time) |
| | | }, |
| | | add() { |
| | | console.log(this.time) |
| | | this.$refs.AddOrUpdate.$refs.dialog.init(null, { |
| | | taskId: this.dataForm.taskId, |
| | | productId: this.dataForm.productId, |
| | | time: this.time |
| | | }) |
| | | }, |
| | | openEditWin(row){ |
| | | console.log(row) |
| | | this.$refs.AddOrUpdate.$refs.dialog.init(row.id, { |
| | | taskId: this.dataForm.taskId, |
| | | productId: this.dataForm.productId, |
| | | time: this.time |
| | | }) |
| | | }, |
| | | onTaskSelected(row) { |
| | | this.dataForm.taskId = row.id |
| | | this.dataForm.productId = row.productId |