refactor: 测试计划关联按钮样式

This commit is contained in:
chenjianxing 2020-12-29 17:06:16 +08:00
parent 62ac695a0b
commit af61afde13
3 changed files with 19 additions and 8 deletions

View File

@ -182,4 +182,9 @@
margin: 5px 10px;
}
/deep/ .run-button {
background-color: #409EFF;
border-color: #409EFF;
}
</style>

View File

@ -81,8 +81,10 @@
<el-table-column v-if="!isReadOnly" :label="$t('commons.operating')" align="center">
<template v-slot:default="scope">
<el-button type="text" @click="singleRun(scope.row)">{{$t('api_test.run')}}</el-button>
<el-button type="text" @click="handleDelete(scope.row)" style="color: #F56C6C">{{$t('commons.delete')}}</el-button>
<ms-table-operator-button class="run-button" :is-tester-permission="true" :tip="$t('api_test.run')" icon="el-icon-video-play"
@exec="singleRun(scope.row)" v-tester/>
<ms-table-operator-button :is-tester-permission="true" :tip="$t('test_track.plan_view.cancel_relevance')"
icon="el-icon-unlock" type="danger" @exec="handleDelete(scope.row)" v-tester/>
</template>
</el-table-column>
@ -334,7 +336,7 @@
this.selectRows.clear();
this.initTable();
this.$emit('refresh');
this.$success(this.$t('commons.delete_success'));
this.$success(this.$t('test_track.cancel_relevance_success'));
});
}
}
@ -414,7 +416,7 @@
},
handleDelete(apiCase) {
this.$get('/test/plan/api/case/delete/' + this.planId + '/' + apiCase.id, () => {
this.$success(this.$t('commons.delete_success'));
this.$success(this.$t('test_track.cancel_relevance_success'));
this.$emit('refresh');
this.initTable();
});

View File

@ -51,8 +51,10 @@
show-overflow-tooltip/>
<el-table-column :label="$t('commons.operating')" width="200px" v-if="!referenced">
<template v-slot:default="{row}">
<el-button type="text" @click="execute(row)">{{ $t('api_test.automation.execute') }}</el-button>
<el-button type="text" @click="remove(row)">{{ $t('api_test.automation.remove') }}</el-button>
<ms-table-operator-button class="run-button" :is-tester-permission="true" :tip="$t('api_test.run')" icon="el-icon-video-play"
@exec="execute(row)" v-tester/>
<ms-table-operator-button :is-tester-permission="true" :tip="$t('test_track.plan_view.cancel_relevance')"
icon="el-icon-unlock" type="danger" @exec="remove(row)" v-tester/>
</template>
</el-table-column>
</el-table>
@ -81,10 +83,12 @@
import MsTestPlanList from "../../../../../api/automation/scenario/testplan/TestPlanList";
import TestPlanScenarioListHeader from "./TestPlanScenarioListHeader";
import {_handleSelect, _handleSelectAll} from "../../../../../../../common/js/tableUtils";
import MsTableOperatorButton from "../../../../../common/components/MsTableOperatorButton";
export default {
name: "MsTestPlanApiScenarioList",
components: {
MsTableOperatorButton,
TestPlanScenarioListHeader,
MsTablePagination, MsTableMoreBtn, ShowMoreBtn, MsTableHeader, MsTag, MsApiReportDetail, MsScenarioExtendButtons, MsTestPlanList},
props: {
@ -189,7 +193,7 @@
},
remove(row) {
this.$get('/test/plan/scenario/case/delete/' + this.planId + '/' + row.id, () => {
this.$success(this.$t('commons.delete_success'));
this.$success(this.$t('test_track.cancel_relevance_success'));
this.$emit('refresh');
this.search();
});
@ -215,7 +219,7 @@
this.$post('/test/plan/scenario/case/batch/delete', param, () => {
this.selectRows.clear();
this.search();
this.$success(this.$t('commons.delete_success'));
this.$success(this.$t('test_track.cancel_relevance_success'));
this.$emit('refresh');
});
}