fix(测试计划): 修复测试计划关联用例未开启项目模块&去掉关联项目&替换国际化展开折叠子模块

This commit is contained in:
xinxin.wu 2024-06-20 11:58:28 +08:00 committed by Craftsman
parent 4ff44b27b7
commit e8a313e754
19 changed files with 28 additions and 47 deletions

View File

@ -17,7 +17,7 @@
allow-clear
:max-length="255"
/>
<a-tooltip :content="isExpandAll ? t('common.collapseAll') : t('common.expandAll')">
<a-tooltip :content="isExpandAll ? t('common.collapseAllSubModule') : t('common.common.expandAllSubModule')">
<a-button
type="outline"
class="expand-btn arco-btn-outline--secondary"

View File

@ -20,7 +20,8 @@
>
<div class="float-left">
<a-input-group>
<a-select
<!-- TODO 这个版本不上 -->
<!-- <a-select
v-model="functionalType"
class="ml-2 w-[100px]"
:default-value="innerProject"
@ -34,12 +35,12 @@
{{ item.name }}
</a-option>
</a-tooltip>
</a-select>
</a-select> -->
<a-select
v-model="innerProject"
:popup-visible="selectVisible"
class="w-[240px]"
class="ml-2 w-[240px]"
:default-value="innerProject"
:placeholder="t('common.pleaseSelect')"
@popup-visible-change="changeProjectHandler"
@ -72,7 +73,8 @@
</a-popconfirm>
<div v-else class="float-left">
<a-input-group>
<a-select
<!-- TODO 这个版本不上 -->
<!-- <a-select
v-model="functionalType"
class="ml-2 w-[100px]"
:default-value="innerProject"
@ -87,13 +89,13 @@
{{ item.name }}
</a-option>
</a-tooltip>
</a-select>
</a-select> -->
<a-select
id="typeRadioGroupRef"
v-model:model-value="innerProject"
:popup-visible="selectVisible"
class="w-[240px]"
class="ml-2 w-[240px]"
:default-value="innerProject"
allow-search
:placeholder="t('common.pleaseSelect')"
@ -415,10 +417,14 @@
emit('close');
}
async function initProjectList(setDefault: boolean) {
async function initProjectList() {
try {
projectList.value = await getAssociatedProjectOptions(appStore.currentOrgId, associationType.value);
if (setDefault) {
const hasProjectPermission = projectList.value.map((item) => item.id).includes(appStore.currentProjectId);
//
if (hasProjectPermission) {
innerProject.value = appStore.currentProjectId;
} else {
innerProject.value = projectList.value[0].id;
}
} catch (error) {
@ -508,8 +514,7 @@
(val) => {
if (val) {
associationType.value = props.associatedType;
initProjectList(false);
innerProject.value = appStore.currentProjectId;
initProjectList();
}
selectPopVisible.value = false;
keyword.value = '';

View File

@ -56,7 +56,7 @@
allow-clear
:max-length="255"
/>
<a-tooltip :content="isExpandAll ? t('apiScenario.collapseAll') : t('ms.comment.expandAllModule')">
<a-tooltip :content="isExpandAll ? t('common.collapseAllSubModule') : t('common.expandAllSubModule')">
<a-button
type="outline"
class="expand-btn arco-btn-outline--secondary"
@ -76,7 +76,7 @@
</div>
<!-- <div class="ml-auto flex items-center">
<a-tooltip
:content="isExpandAll ? t('project.fileManagement.collapseAll') : t('project.fileManagement.expandAll')"
:content="isExpandAll ? t('common.collapseAllSubModule') : t('common.expandAllSubModule')"
>
<MsButton type="icon" status="secondary" class="!mr-0 p-[4px]" @click="expandHandler">
<MsIcon :type="isExpandAll ? 'icon-icon_folder_collapse1' : 'icon-icon_folder_expansion1'" />

View File

@ -7,5 +7,4 @@ export default {
'ms.comment.deleteConfirm': 'Are you sure you want to delete this comment?',
'ms.comment.deleteContent': 'After deletion, the comment cannot be replied to. Please proceed with caution.',
'ms.comment.enterPlaceHolderTip': 'Please enter a comment and press ⌘ + Enter to finish.',
'ms.comment.expandAllModule': 'Expand all submodules',
};

View File

@ -7,5 +7,4 @@ export default {
'ms.comment.deleteConfirm': '确认删除该评论吗?',
'ms.comment.deleteContent': '删除后,评论无法回复,请谨慎操作',
'ms.comment.enterPlaceHolderTip': '请输入评论,⌘ + Enter 结束',
'ms.comment.expandAllModule': '展开全部子模块',
};

View File

@ -33,7 +33,7 @@
allow-clear
:max-length="255"
></a-input>
<a-tooltip :content="isExpandAll ? t('apiScenario.collapseAll') : t('ms.comment.expandAllModule')">
<a-tooltip :content="isExpandAll ? t('common.collapseAllSubModule') : t('common.expandAllSubModule')">
<a-button
type="outline"
class="expand-btn arco-btn-outline--secondary"

View File

@ -191,4 +191,6 @@ export default {
'common.stopped': 'Stopped',
'common.config': 'Config',
'common.executionResult': 'Execution result',
'common.expandAllSubModule': 'Expand all submodules',
'common.collapseAllSubModule': 'Collapse all submodules',
};

View File

@ -191,4 +191,6 @@ export default {
'common.name': '名称',
'common.stopped': '已停止',
'common.config': '配置',
'common.expandAllSubModule': '展开全部子模块',
'common.collapseAllSubModule': '收起全部子模块',
};

View File

@ -2,7 +2,7 @@
<div>
<div class="mb-[8px] flex items-center gap-[8px]">
<a-input v-model:model-value="moduleKeyword" :placeholder="t('apiScenario.quoteTreeSearchTip')" allow-clear />
<a-tooltip :content="isExpandAll ? t('apiScenario.collapseAll') : t('ms.comment.expandAllModule')">
<a-tooltip :content="isExpandAll ? t('common.collapseAllSubModule') : t('common.expandAllSubModule')">
<a-button
type="outline"
class="expand-btn arco-btn-outline--secondary"

View File

@ -230,8 +230,6 @@ export default {
'apiScenario.quoteTreeNoData': 'No quotable data available, switch projects to retrieve data',
'apiScenario.quoteTreeSearchTip': 'Enter module name to search',
'apiScenario.quoteTableSearchTip': 'Search by path or name',
'apiScenario.collapseAll': 'Collapse All Submodules',
'apiScenario.expandAll': 'Expand All Submodules',
'apiScenario.scriptOperationName': 'Script Operation Name',
'apiScenario.scriptOperationNamePlaceholder': 'Please enter script operation name',

View File

@ -228,8 +228,6 @@ export default {
'apiScenario.quoteTreeSearchTip': '输入模块名称搜索',
'apiScenario.quoteTableSearchTip': '通过路径或名称搜索',
'apiScenario.quoteTableSearchTip2': '通过名称搜索',
'apiScenario.collapseAll': '收起全部子模块',
'apiScenario.expandAll': '展开全部子模块',
'apiScenario.scriptOperationName': '脚本操作名称',
'apiScenario.scriptOperationNamePlaceholder': '请输入脚本操作名称',

View File

@ -17,11 +17,7 @@
<div class="folder-count">({{ recycleModulesCount.all || 0 }})</div></div
>
<div class="ml-auto flex items-center">
<a-tooltip
:content="
isExpandAll ? t('project.fileManagement.collapseAll') : t('project.fileManagement.expandAll')
"
>
<a-tooltip :content="isExpandAll ? t('common.collapseAllSubModule') : t('common.expandAllSubModule')">
<MsButton type="icon" status="secondary" class="!mr-0 p-[4px]" @click="expandHandler">
<MsIcon :type="isExpandAll ? 'icon-icon_folder_collapse1' : 'icon-icon_folder_expansion1'" />
</MsButton>

View File

@ -40,11 +40,7 @@
<div class="folder-count">({{ modulesCount.all || 0 }})</div></div
>
<div class="ml-auto flex items-center">
<a-tooltip
:content="
isExpandAll ? t('project.fileManagement.collapseAll') : t('project.fileManagement.expandAll')
"
>
<a-tooltip :content="isExpandAll ? t('common.expandAllSubModule') : t('common.collapseAllSubModule')">
<MsButton type="icon" status="secondary" class="!mr-0 p-[4px]" @click="expandHandler">
<MsIcon :type="isExpandAll ? 'icon-icon_folder_collapse1' : 'icon-icon_folder_expansion1'" />
</MsButton>

View File

@ -17,9 +17,7 @@
<div class="folder-count">({{ allFileCount }})</div>
</div>
<div class="ml-auto flex items-center">
<a-tooltip
:content="isExpandAll ? t('project.fileManagement.collapseAll') : t('project.fileManagement.expandAll')"
>
<a-tooltip :content="isExpandAll ? t('common.collapseAllSubModule') : t('common.expandAllSubModule')">
<MsButton type="icon" status="secondary" class="!mr-0 p-[4px]" @click="changeExpand">
<MsIcon :type="isExpandAll ? 'icon-icon_folder_collapse1' : 'icon-icon_folder_expansion1'" />
</MsButton>

View File

@ -2,8 +2,6 @@ export default {
'project.fileManagement.myFile': 'My files',
'project.fileManagement.allFile': 'All files',
'project.fileManagement.defaultFile': 'Default files',
'project.fileManagement.expandAll': 'Expand all submodules',
'project.fileManagement.collapseAll': 'Collapse all submodules',
'project.fileManagement.addSubModule': 'Add submodule',
'project.fileManagement.addStorage': 'Add repository',
'project.fileManagement.rename': 'Rename',

View File

@ -2,8 +2,6 @@ export default {
'project.fileManagement.myFile': '我的文件',
'project.fileManagement.allFile': '全部文件',
'project.fileManagement.defaultFile': '默认文件',
'project.fileManagement.expandAll': '展开全部子模块',
'project.fileManagement.collapseAll': '收起全部子模块',
'project.fileManagement.addSubModule': '添加子模块',
'project.fileManagement.addStorage': '添加存储库',
'project.fileManagement.rename': '重命名',

View File

@ -35,11 +35,7 @@
<div class="folder-count">({{ modulesCount.all || 0 }})</div></div
>
<div class="ml-auto flex items-center">
<a-tooltip
:content="
isExpandAll ? t('testPlan.testPlanIndex.collapseAll') : t('testPlan.testPlanIndex.expandAll')
"
>
<a-tooltip :content="isExpandAll ? t('common.collapseAllSubModule') : t('common.expandAllSubModule')">
<MsButton type="icon" status="secondary" class="!mr-0 p-[4px]" position="top" @click="expandHandler">
<MsIcon :type="isExpandAll ? 'icon-icon_folder_collapse1' : 'icon-icon_folder_expansion1'" />
</MsButton>

View File

@ -4,8 +4,6 @@ export default {
'testPlan.testPlanIndex.updateTestPlan': 'update test plan',
'testPlan.testPlanIndex.copyTestPlan': 'copy test plan',
'testPlan.testPlanIndex.allTestPlan': 'All test Plans',
'testPlan.testPlanIndex.collapseAll': 'Collapse all submodules',
'testPlan.testPlanIndex.expandAll': 'Expand all submodules',
'testPlan.testPlanIndex.addSubModule': 'Add submodule',
'testPlan.testPlanIndex.addGroupTip': 'Please enter the group name, press enter to save',
'testPlan.testPlanIndex.planEmptyContent': 'No test plan data, please tap the button above to create or import',

View File

@ -4,8 +4,6 @@ export default {
'testPlan.testPlanIndex.updateTestPlan': '更新测试计划',
'testPlan.testPlanIndex.copyTestPlan': '复制测试计划',
'testPlan.testPlanIndex.allTestPlan': '全部测试计划',
'testPlan.testPlanIndex.collapseAll': '收起全部子模块',
'testPlan.testPlanIndex.expandAll': '展开全部子模块',
'testPlan.testPlanIndex.addSubModule': '添加子模块',
'testPlan.testPlanIndex.addGroupTip': '请输入分组名称,按回车键保存',
'testPlan.testPlanIndex.planEmptyContent': '暂无测试计划数据,请点击上方按钮创建或导入',