代码调整

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 = {
start: true,
userOperationType: 'leftClick',
operation: operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {

View File

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

View File

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