fix(测试跟踪): 修复计划报告分享链接失效的缺陷

--bug=1023967 --user=王孝刚
[接口测试]github#22405测试报告链接有效期设置为15天,两三天后点击测试报告链接进去查看失败用例详情报错
https://www.tapd.cn/55049933/s/1351928
This commit is contained in:
wxg0103 2023-03-17 10:16:27 +08:00 committed by wxg0103
parent c8a7647bd8
commit 2b88a700cc
6 changed files with 148 additions and 58 deletions

View File

@ -185,7 +185,10 @@ export default {
templateReport: Object,
isShare: Boolean,
shareId: String,
isPlan: Boolean,
isPlan: {
type: Boolean,
default: false,
},
showCancelButton: {
type: Boolean,
default: false,
@ -468,8 +471,7 @@ export default {
this.handleGetScenarioReport(data);
}
});
}
if (this.reportId) {
} else if (this.reportId) {
getShareScenarioReport(this.shareId, this.reportId).then((res) => {
let data = res.data;
if (data) {

View File

@ -117,16 +117,19 @@
min-width="120px"
prop="tags">
<template v-slot:default="scope">
<el-tooltip class="item" effect="dark" placement="top">
<div v-html="getTagToolTips(scope.row.tags)" slot="content"></div>
<div class="oneLine">
<ms-tag
v-for="(itemName, index) in scope.row.tags"
:key="index"
type="success"
effect="plain"
:show-tooltip="scope.row.tags.length === 1 && itemName.length * 12 <= 100"
:content="itemName"
:show-tooltip="scope.row.tags.length === 1 && itemName.length * 12 <= 120"
:showTooltip="true"
style="margin-left: 0px; margin-right: 2px" />
<span/>
</div>
</el-tooltip>
</template>
</ms-table-column>
@ -1568,6 +1571,17 @@ export default {
showScenarioRef(row) {
this.$refs.viewRef.open(row, 'SCENARIO');
},
getTagToolTips(tags) {
try {
let showTips = '';
tags.forEach((item) => {
showTips += item + ',';
});
return showTips.substr(0, showTips.length - 1);
} catch (e) {
return '';
}
},
},
};
</script>
@ -1629,4 +1643,10 @@ export default {
border-radius: 5px;
border: #dcdfe6 solid 1px;
}
.oneLine {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>

View File

@ -3,7 +3,7 @@
:report-id="reportId"
:share-id="shareId"
:is-share="isShare"
:is-plan="true"
:is-plan="false"
:show-cancel-button="false"></ms-api-report>
</template>

View File

@ -97,16 +97,22 @@
prop="tagNames"
:label="$t('api_test.automation.tag')"
min-width="100"
:showOverflowTooltip="false"
>
<template v-slot:default="scope">
<el-tooltip class="item" effect="dark" placement="top">
<div v-html="getTagToolTips(scope.row.tags)" slot="content"></div>
<div class="oneLine">
<ms-tag
v-for="itemName in scope.row.tags"
:key="itemName"
v-for="(itemName, index) in scope.row.tags"
:key="index"
type="success"
effect="plain"
:show-tooltip="scope.row.tags.length === 1 && itemName.length * 12 <= 100"
:content="itemName"
style="margin-left: 0px; margin-right: 2px"
/>
style="margin-left: 0px; margin-right: 2px" />
</div>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
@ -365,8 +371,19 @@ export default {
this.selectRows = this.$refs.scenarioTable.selectRows;
this.initProjectIds();
this.$emit("selectCountChange", data);
},
getTagToolTips(tags) {
try {
let showTips = '';
tags.forEach((item) => {
showTips += item + ',';
});
return showTips.substr(0, showTips.length - 1);
} catch (e) {
return '';
}
},
},
};
</script>
@ -393,4 +410,10 @@ export default {
margin-top: 15px;
margin-right: 10px;
}
.oneLine {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>

View File

@ -149,16 +149,22 @@
prop="tags"
min-width="100"
:label="$t('commons.tag')"
:showOverflowTooltip="false"
>
<template v-slot:default="scope">
<el-tooltip class="item" effect="dark" placement="top">
<div v-html="getTagToolTips(scope.row.tags)" slot="content"></div>
<div class="oneLine">
<ms-tag
v-for="(itemName, index) in scope.row.tags"
:key="index"
type="success"
effect="plain"
:show-tooltip="scope.row.tags.length === 1 && itemName.length * 12 <= 100"
:content="itemName"
style="margin-left: 0px; margin-right: 2px"
/>
style="margin-left: 0px; margin-right: 2px" />
</div>
</el-tooltip>
</template>
</ms-table-column>
@ -751,6 +757,17 @@ export default {
);
window.open(definitionData.href, "_blank");
},
getTagToolTips(tags) {
try {
let showTips = '';
tags.forEach((item) => {
showTips += item + ',';
});
return showTips.substr(0, showTips.length - 1);
} catch (e) {
return '';
}
},
},
};
</script>
@ -776,4 +793,9 @@ export default {
/*margin-bottom: 20px;*/
margin-right: 20px;
}
.oneLine {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>

View File

@ -138,16 +138,22 @@
prop="tagNames"
:label="$t('api_test.automation.tag')"
min-width="100px"
:showOverflowTooltip="false"
>
<template v-slot:default="scope">
<el-tooltip class="item" effect="dark" placement="top">
<div v-html="getTagToolTips(scope.row.tags)" slot="content"></div>
<div class="oneLine">
<ms-tag
v-for="(itemName, index) in scope.row.tags"
:key="index"
type="success"
effect="plain"
:show-tooltip="scope.row.tags.length === 1 && itemName.length * 12 <= 100"
:content="itemName"
style="margin-left: 0px; margin-right: 2px"
/>
style="margin-left: 0px; margin-right: 2px"/>
</div>
</el-tooltip>
</template>
</ms-table-column>
@ -699,6 +705,17 @@ export default {
);
window.open(automationData.href, "_blank");
},
getTagToolTips(tags) {
try {
let showTips = '';
tags.forEach((item) => {
showTips += item + ',';
});
return showTips.substr(0, showTips.length - 1);
} catch (e) {
return '';
}
},
},
};
</script>
@ -723,4 +740,10 @@ export default {
width: 80px;
vertical-align: middle;
}
.oneLine {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>