fix: 接口自动化场景更新时创建人不变,场景列表默认显示负责人而非创建人

This commit is contained in:
wenyann 2021-05-10 15:10:17 +08:00 committed by 刘瑞斌
parent d2ee9bc0f1
commit f5f258aba3
3 changed files with 27 additions and 7 deletions

View File

@ -1,9 +1,20 @@
-- 缺陷添加创建人字段
ALTER TABLE issues ADD creator varchar(50) NULL COMMENT 'Creator';
ALTER TABLE issues
ADD creator varchar(50) NULL COMMENT 'Creator';
-- 删除创建人的自定义字段
delete cft,cf from custom_field_template cft,custom_field cf
where cft.field_id = cf.id and cf.name = '创建人' and cf.scene = 'ISSUE';
delete cft,cf
from custom_field_template cft,
custom_field cf
where cft.field_id = cf.id
and cf.name = '创建人'
and cf.scene = 'ISSUE';
alter table project add scenario_custom_num tinyint(1) default 0 null comment '是否开启场景自定义ID(默认关闭)';
alter table api_scenario add custom_num varchar(64) null comment 'custom num';
alter table project
add scenario_custom_num tinyint(1) default 0 null comment '是否开启场景自定义ID(默认关闭)';
alter table api_scenario
add custom_num varchar(64) null comment 'custom num';
-- 场景表头修改
update system_header
set props='[{"id":"num","label":"ID"},{"id":"name","label":"场景名称"},{"id":"level","label":"用例等级"},{"id":"status","label":"当前状态"},{"id":"tags","label":"标签"},{"id":"principal","label":"负责人"},{"id":"updateTime","label":"最后更新时间"},{"id":"stepTotal","label":"步骤数"},{"id":"lastResult","label":"最后结果"},{"id":"passRate","label":"通过率"}]'
where type = 'api_scenario_list';

View File

@ -81,14 +81,22 @@
<el-table-column v-if="item.id == 'tags'" prop="tags" min-width="120px"
:label="$t('api_test.automation.tag')" :key="index">
<template v-slot:default="scope">
<ms-tag v-for="(itemName,index) in scope.row.tags" :key="index" type="success" effect="plain" :content="itemName" :show-tooltip="true"
<ms-tag v-for="(itemName,index) in scope.row.tags" :key="index" type="success" effect="plain"
:content="itemName" :show-tooltip="true"
tooltip style="margin-left: 0px; margin-right: 2px"/>
</template>
</el-table-column>
<el-table-column v-if="item.id == 'principal'" prop="principal" min-width="120px"
:label="$t('api_test.definition.api_principal')"
:filters="userFilters"
column-key="principal"
sortable="custom"
show-overflow-tooltip
:key="index"/>
<el-table-column v-if="item.id == 'userId'" prop="userId" min-width="120px"
:label="$t('api_test.automation.creator')"
:filters="userFilters"
column-key="user_id"
column-key="userId"
sortable="custom"
show-overflow-tooltip
:key="index"/>

View File

@ -69,6 +69,7 @@ export const Api_Scenario_List = [
{id: 'status', label: i18n.t('test_track.plan.plan_status')},
{id: 'tags', label: i18n.t('commons.tag')},
{id: 'userId', label: i18n.t('api_test.automation.creator')},
{id: 'principal', label: i18n.t('api_test.definition.api_principal')},
{id: 'updateTime', label: i18n.t('api_test.definition.api_last_time')},
{id: 'stepTotal', label: i18n.t('api_test.automation.step')},
{id: 'lastResult', label: i18n.t('api_test.automation.last_result')},