代码调整

This commit is contained in:
dong 2022-09-21 14:08:51 +08:00
parent d3a06586ba
commit 119d2b3c60
3 changed files with 7 additions and 5 deletions

View File

@ -494,6 +494,7 @@ export default {
// //
const operate = { const operate = {
start: true, start: true,
userOperationType: 'leftClick',
operation: operation operation: operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {

View File

@ -66,8 +66,9 @@ class ValidateHandler {
if (operate.userOperationType || stepOperation.userOperationType) { if (operate.userOperationType || stepOperation.userOperationType) {
valid = (operate.userOperationType === stepOperation.userOperationType) && valid; valid = (operate.userOperationType === stepOperation.userOperationType) && valid;
} }
if (operate.param || stepOperation.params) { const opParam = operate.param == undefined ? {} : operate.param;
valid = objectIsEqual(operate.param, stepOperation.params) && valid; if (opParam || stepOperation.params) {
valid = objectIsEqual(opParam, stepOperation.params) && valid;
} }
Handler.handleCheckNewTrainingResult(valid); Handler.handleCheckNewTrainingResult(valid);
return valid; return valid;

View File

@ -16,8 +16,8 @@
<!--<div v-for="item in stepDetail.operations" :key="item"> <!--<div v-for="item in stepDetail.operations" :key="item">
<div>{{ item }}</div> <div>{{ item }}</div>
</div>--> </div>-->
<template v-for="(item, index) in stepDetail.operations"> <template>
<div :key="index"> <div v-for="(item, index) in stepDetail.operations" :key="index">
<el-tag :type="tagIndex === index? 'success':''" closable @close="deleteOperation(index)" @click="changeTagIndex(index)"> <el-tag :type="tagIndex === index? 'success':''" closable @close="deleteOperation(index)" @click="changeTagIndex(index)">
{{ covertString(item) }} {{ covertString(item) }}
</el-tag> </el-tag>
@ -60,7 +60,7 @@ export default {
userOperationType: val.userOperationType || '', userOperationType: val.userOperationType || '',
domId: val.operation || '', domId: val.operation || '',
operationType: val.cmdType ? val.cmdType.value : '', operationType: val.cmdType ? val.cmdType.value : '',
params: val.params || {}, params: val.param || {},
t: 'C' t: 'C'
}; };
this.stepDetail.operations.push(data); this.stepDetail.operations.push(data);