From 0125a38b2d5c0088f1c17d86d76c5ded582069c9 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 13 Sep 2021 19:56:52 +0800 Subject: [PATCH] =?UTF-8?q?fix=20(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E7=94=A8=E4=BE=8B=E5=90=8D=E7=A7=B0=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E4=BF=9D=E6=8A=A4=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4=E6=8B=96=E6=8B=BD=E9=97=AE=E9=A2=98=20--bug?= =?UTF-8?q?=3D1006430=20--user=3D=E8=B5=B5=E5=8B=87=20=E3=80=90github#5962?= =?UTF-8?q?=E3=80=91=E5=9C=BA=E6=99=AF=E4=B8=AD...=20https://www.tapd.cn/5?= =?UTF-8?q?5049933/s/1046239?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../automation/scenario/EditApiScenario.vue | 10 ++-------- .../components/case/ApiCaseItem.vue | 20 ++++++++++--------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index fb0daf8198..68a3001054 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -1110,14 +1110,8 @@ export default { this.getEnvironments(); }, allowDrop(draggingNode, dropNode, dropType) { - if(dropNode.data.disabled){ - return false; - } - if (dropType != "inner" && !draggingNode.data.disabled) { - if (draggingNode.data.referenced) { - if (draggingNode.data.referenced !== 'REF' && draggingNode.data.referenced !== 'Deleted') { - return true; - } + if (dropType != "inner") { + if (draggingNode.data.disabled && draggingNode.parent && draggingNode.parent.data && draggingNode.parent.data.disabled) { return false; } return true; diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue index 61852eb156..3191a47ed9 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue @@ -71,10 +71,10 @@ :placeholder="$t('api_test.automation.follow_people')" filterable size="small" @change="saveTestCase(apiCase,true)"> + v-for="item in maintainerOptions" + :key="item.id" + :label="item.id + ' (' + item.name + ')'" + :value="item.id"> @@ -180,12 +180,12 @@ import MsChangeHistory from "../../../../history/ChangeHistory"; export default { name: "ApiCaseItem", filters: { - ellipsis (value) { + ellipsis(value) { if (!value) { return ''; } if (value.length > 20) { - return value.slice(0,20) + '...' + return value.slice(0, 20) + '...' } return value } @@ -428,9 +428,7 @@ export default { this.$success(this.$t('commons.save_success')); this.reload(); // 刷新编辑后用例列表 - if (this.api.source === "editCase") { - this.$store.state.currentApiCase = {refresh: "true"}; - } + this.$store.state.currentApiCase = {refresh: "true"}; if (!hideAlert) { this.$emit('refresh'); } @@ -438,6 +436,10 @@ export default { }); }, saveTestCase(row, hideAlert) { + if (row.name && row.name.length > 50) { + this.$warning("用例名称最大长度为 50 "); + return; + } if (this.api.saved) { this.addModule(row); } else {