fix: 场景自定义ID导入保留ID

This commit is contained in:
chenjianxing 2021-06-10 15:02:42 +08:00 committed by jianxing
parent caf9afd33f
commit 0b20afc389
2 changed files with 2 additions and 3 deletions

View File

@ -1649,7 +1649,7 @@ public class ApiAutomationService {
item.setName(item.getName().substring(0, 255)); item.setName(item.getName().substring(0, 255));
} }
item.setNum(num++); item.setNum(num++);
if (BooleanUtils.isTrue(project.getScenarioCustomNum())) { if (BooleanUtils.isTrue(project.getScenarioCustomNum()) && StringUtils.isBlank(item.getCustomNum())) {
item.setCustomNum(String.valueOf(num)); item.setCustomNum(String.valueOf(num));
} }
importCreate(item, batchMapper, request); importCreate(item, batchMapper, request);

View File

@ -32,8 +32,7 @@
min-width="80"/> min-width="80"/>
<ms-table-column <ms-table-column
v-if="customNum" v-if="item.id === 'num' && customNum"
:field="item"
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
prop="customNum" prop="customNum"
:label="$t('commons.id')" :label="$t('commons.id')"