feat(测试跟踪): 关联接口和场景用例模块树不显示数量

--story=1008184 --user=陈建星 测试计划优化 https://www.tapd.cn/55049933/s/1198664
This commit is contained in:
chenjianxing 2022-07-12 13:56:03 +08:00 committed by jianxing
parent 2bda25e0a9
commit f08f30456f
7 changed files with 26 additions and 2 deletions

View File

@ -13,6 +13,7 @@
:update-permission="['PROJECT_API_SCENARIO:READ+EDIT']" :update-permission="['PROJECT_API_SCENARIO:READ+EDIT']"
:default-label="$t('api_test.automation.unplanned_scenario')" :default-label="$t('api_test.automation.unplanned_scenario')"
local-suffix="api_scenario" local-suffix="api_scenario"
:show-case-num="showCaseNum"
@add="add" @add="add"
@edit="edit" @edit="edit"
@drag="drag" @drag="drag"
@ -75,6 +76,12 @@ export default {
planId: String, planId: String,
pageSource: String, pageSource: String,
total: Number, total: Number,
showCaseNum: {
type: Boolean,
default() {
return true;
}
}
}, },
computed: { computed: {
isPlanModel() { isPlanModel() {

View File

@ -16,6 +16,7 @@
@remove="remove" @remove="remove"
@refresh="list" @refresh="list"
@filter="filter" @filter="filter"
:show-case-num="showCaseNum"
:delete-permission="['PROJECT_API_DEFINITION:READ+DELETE_API']" :delete-permission="['PROJECT_API_DEFINITION:READ+DELETE_API']"
:add-permission="['PROJECT_API_DEFINITION:READ+CREATE_API']" :add-permission="['PROJECT_API_DEFINITION:READ+CREATE_API']"
:update-permission="['PROJECT_API_DEFINITION:READ+EDIT_API']" :update-permission="['PROJECT_API_DEFINITION:READ+EDIT_API']"
@ -83,6 +84,12 @@ export default {
return false; return false;
} }
}, },
showCaseNum: {
type: Boolean,
default() {
return true;
}
},
showOperator: Boolean, showOperator: Boolean,
planId: String, planId: String,
currentVersion: String, currentVersion: String,

View File

@ -12,6 +12,7 @@
@protocolChange="handleProtocolChange" @protocolChange="handleProtocolChange"
@refreshTable="refresh" @refreshTable="refresh"
@setModuleOptions="setModuleOptions" @setModuleOptions="setModuleOptions"
:show-case-num="false"
:is-read-only="true" :is-read-only="true"
ref="nodeTree"/> ref="nodeTree"/>
</template> </template>

View File

@ -13,6 +13,7 @@
@setModuleOptions="setModuleOptions" @setModuleOptions="setModuleOptions"
@enableTrash="false" @enableTrash="false"
:is-read-only="true" :is-read-only="true"
:show-case-num="false"
ref="nodeTree"/> ref="nodeTree"/>
</template> </template>

View File

@ -34,7 +34,7 @@
<span v-if="!data.isEdit" class="node-title" v-text="isDefault(data) ? getLocalDefaultName() : data.name"/> <span v-if="!data.isEdit" class="node-title" v-text="isDefault(data) ? getLocalDefaultName() : data.name"/>
</el-tooltip> </el-tooltip>
<span class="count-title" v-if="data.caseNum !== null && data.caseNum !== undefined"> <span class="count-title" v-if="showCaseNum && data.caseNum !== null && data.caseNum !== undefined">
<span style="color: #6C317C">{{ data.caseNum }}</span> <span style="color: #6C317C">{{ data.caseNum }}</span>
</span> </span>
<span v-if="!disabled" class="node-operate child"> <span v-if="!disabled" class="node-operate child">
@ -151,6 +151,12 @@ export default {
return true; return true;
} }
}, },
showCaseNum: {
type: Boolean,
default() {
return true;
}
},
updatePermission: Array, updatePermission: Array,
addPermission: Array, addPermission: Array,
deletePermission: Array, deletePermission: Array,

View File

@ -13,6 +13,7 @@
@protocolChange="handleProtocolChange" @protocolChange="handleProtocolChange"
@refreshTable="refresh" @refreshTable="refresh"
@setModuleOptions="setModuleOptions" @setModuleOptions="setModuleOptions"
:show-case-num="false"
:is-read-only="true" :is-read-only="true"
ref="nodeTree"/> ref="nodeTree"/>
</template> </template>

View File

@ -11,6 +11,7 @@
@nodeSelectEvent="nodeChange" @nodeSelectEvent="nodeChange"
@refreshTable="refresh" @refreshTable="refresh"
@setModuleOptions="setModuleOptions" @setModuleOptions="setModuleOptions"
:show-case-num="false"
:relevance-project-id="projectId" :relevance-project-id="projectId"
:is-read-only="true" :is-read-only="true"
ref="nodeTree"/> ref="nodeTree"/>