refactor: 测试计划关联按钮样式
This commit is contained in:
parent
62ac695a0b
commit
af61afde13
|
@ -182,4 +182,9 @@
|
||||||
margin: 5px 10px;
|
margin: 5px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .run-button {
|
||||||
|
background-color: #409EFF;
|
||||||
|
border-color: #409EFF;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -81,8 +81,10 @@
|
||||||
|
|
||||||
<el-table-column v-if="!isReadOnly" :label="$t('commons.operating')" align="center">
|
<el-table-column v-if="!isReadOnly" :label="$t('commons.operating')" align="center">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button type="text" @click="singleRun(scope.row)">{{$t('api_test.run')}}</el-button>
|
<ms-table-operator-button class="run-button" :is-tester-permission="true" :tip="$t('api_test.run')" icon="el-icon-video-play"
|
||||||
<el-button type="text" @click="handleDelete(scope.row)" style="color: #F56C6C">{{$t('commons.delete')}}</el-button>
|
@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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -334,7 +336,7 @@
|
||||||
this.selectRows.clear();
|
this.selectRows.clear();
|
||||||
this.initTable();
|
this.initTable();
|
||||||
this.$emit('refresh');
|
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) {
|
handleDelete(apiCase) {
|
||||||
this.$get('/test/plan/api/case/delete/' + this.planId + '/' + apiCase.id, () => {
|
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.$emit('refresh');
|
||||||
this.initTable();
|
this.initTable();
|
||||||
});
|
});
|
||||||
|
|
|
@ -51,8 +51,10 @@
|
||||||
show-overflow-tooltip/>
|
show-overflow-tooltip/>
|
||||||
<el-table-column :label="$t('commons.operating')" width="200px" v-if="!referenced">
|
<el-table-column :label="$t('commons.operating')" width="200px" v-if="!referenced">
|
||||||
<template v-slot:default="{row}">
|
<template v-slot:default="{row}">
|
||||||
<el-button type="text" @click="execute(row)">{{ $t('api_test.automation.execute') }}</el-button>
|
<ms-table-operator-button class="run-button" :is-tester-permission="true" :tip="$t('api_test.run')" icon="el-icon-video-play"
|
||||||
<el-button type="text" @click="remove(row)">{{ $t('api_test.automation.remove') }}</el-button>
|
@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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -81,10 +83,12 @@
|
||||||
import MsTestPlanList from "../../../../../api/automation/scenario/testplan/TestPlanList";
|
import MsTestPlanList from "../../../../../api/automation/scenario/testplan/TestPlanList";
|
||||||
import TestPlanScenarioListHeader from "./TestPlanScenarioListHeader";
|
import TestPlanScenarioListHeader from "./TestPlanScenarioListHeader";
|
||||||
import {_handleSelect, _handleSelectAll} from "../../../../../../../common/js/tableUtils";
|
import {_handleSelect, _handleSelectAll} from "../../../../../../../common/js/tableUtils";
|
||||||
|
import MsTableOperatorButton from "../../../../../common/components/MsTableOperatorButton";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsTestPlanApiScenarioList",
|
name: "MsTestPlanApiScenarioList",
|
||||||
components: {
|
components: {
|
||||||
|
MsTableOperatorButton,
|
||||||
TestPlanScenarioListHeader,
|
TestPlanScenarioListHeader,
|
||||||
MsTablePagination, MsTableMoreBtn, ShowMoreBtn, MsTableHeader, MsTag, MsApiReportDetail, MsScenarioExtendButtons, MsTestPlanList},
|
MsTablePagination, MsTableMoreBtn, ShowMoreBtn, MsTableHeader, MsTag, MsApiReportDetail, MsScenarioExtendButtons, MsTestPlanList},
|
||||||
props: {
|
props: {
|
||||||
|
@ -189,7 +193,7 @@
|
||||||
},
|
},
|
||||||
remove(row) {
|
remove(row) {
|
||||||
this.$get('/test/plan/scenario/case/delete/' + this.planId + '/' + row.id, () => {
|
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.$emit('refresh');
|
||||||
this.search();
|
this.search();
|
||||||
});
|
});
|
||||||
|
@ -215,7 +219,7 @@
|
||||||
this.$post('/test/plan/scenario/case/batch/delete', param, () => {
|
this.$post('/test/plan/scenario/case/batch/delete', param, () => {
|
||||||
this.selectRows.clear();
|
this.selectRows.clear();
|
||||||
this.search();
|
this.search();
|
||||||
this.$success(this.$t('commons.delete_success'));
|
this.$success(this.$t('test_track.cancel_relevance_success'));
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue