| | |
| | | ></el-step> |
| | | </el-steps> |
| | | </div> |
| | | <el-row height="50"> |
| | | <el-col :span="12"> |
| | | <div class="grid-content content-text"> |
| | | <el-row height="50" v-show="previousShow || nextShow"> |
| | | <el-col :span="8"> |
| | | <div v-show="previousShow" class="grid-content content-text"> |
| | | <el-button type="danger" @click="previous" |
| | | >回滚到上一步</el-button |
| | | > |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="grid-content content-text"> |
| | | <el-col :span="8"> |
| | | <div v-show="recoveryShow" class="grid-content content-text"> |
| | | <el-button type="primary" @click="recovery">任务挂起恢复</el-button> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div v-show="nextShow" class="grid-content content-text"> |
| | | <el-button type="warning" @click="next">跳转到下一步</el-button> |
| | | </div> |
| | | </el-col> |
| | |
| | | :row-class-name="tableRowClassName" |
| | | > |
| | | <el-table-column type="index" width="50"> </el-table-column> |
| | | <el-table-column prop="taskNum" label="任务号" width="120"> |
| | | <el-table-column prop="taskNum" label="任务号" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="taskState" label="任务状态" width="120"> |
| | | <el-table-column prop="taskState" label="任务状态" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="currentAddress" label="当前位置" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="nextAddress" label="下一位置" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="isManual" label="是否人工操作" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="isNormal" label="是否正常" width="120"> |
| | | <el-table-column prop="isNormal" label="是否正常" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="description" label="描述"> </el-table-column> |
| | | <el-table-column prop="createDate" label="创建时间" width="180"> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="备注" width="180"> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | viewType: 1, |
| | | height: "200px", |
| | | tableData: [], |
| | | previousShow: false, |
| | | nextShow: false, |
| | | recoveryShow: true, |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | } else { |
| | | this.getDetailDatas(); |
| | | } |
| | | |
| | | this.$emit("parentCall", ($vue) => { |
| | | var previousButton = $vue.buttons.find((x) => x.value == "Previous"); |
| | | this.previousShow = previousButton != null; |
| | | |
| | | var nextButton = $vue.buttons.find((x) => x.value == "Next"); |
| | | this.nextShow = nextButton != null; |
| | | }); |
| | | }, |
| | | getSteps() { |
| | | this.http |
| | |
| | | this.getSteps(); |
| | | }); |
| | | }, |
| | | recovery(){ |
| | | this.http |
| | | .post( |
| | | "/api/Task/TaskStatusRecovery?taskNum=" + this.row.taskNum, |
| | | {}, |
| | | true |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("操作成功"); |
| | | this.getSteps(); |
| | | }); |
| | | }, |
| | | next() { |
| | | this.http |
| | | .post( |
| | |
| | | } |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (row.isNormal) { |
| | | if (!row.isNormal) { |
| | | return "error-row"; |
| | | } else if (row.isManual) { |
| | | return "warning-row"; |
| | | } |
| | |
| | | </style> |
| | | <style> |
| | | .el-table .warning-row { |
| | | background: #e6a23c; |
| | | background: #fcf1e2; |
| | | } |
| | | |
| | | .el-table .success-row { |
| | |
| | | } |
| | | |
| | | .el-table .error-row { |
| | | background: #f56c6c; |
| | | background: #fde2e2; |
| | | } |
| | | </style> |