测试计划状态修改
This commit is contained in:
parent
5892cd3f29
commit
9abc4a7981
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<ms-tag v-if="value == 'Prepare'" type="info" :content="$t('test_track.plan.plan_status_prepare')"/>
|
||||
<ms-tag v-if="value == 'Underway'" type="primary" :content="$t('test_track.plan.plan_status_running')"/>
|
||||
<ms-tag v-if="value == 'Completed'" type="success" :content="$t('test_track.plan_view.plan_status_completed')"/>
|
||||
<ms-tag v-if="value == 'Completed'" type="success" :content="$t('test_track.plan.plan_status_completed')"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<template>
|
||||
<el-row type="flex" justify="start" :gutter="20" class="status-button">
|
||||
<el-col>
|
||||
<el-button type="info" round size="mini"
|
||||
:icon="status == 'Prepare' ? 'el-icon-check' : ''"
|
||||
@click="setStatus('Prepare')"> {{$t('test_track.plan.plan_status_prepare')}}</el-button>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-button type="primary" round size="mini"
|
||||
:icon="status == 'Underway' ? 'el-icon-check' : ''"
|
||||
@click="setStatus('Underway')"> {{$t('test_track.plan.plan_status_running')}}</el-button>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-button type="success" round size="mini"
|
||||
:icon="status == 'Completed' ? 'el-icon-check' : ''"
|
||||
@click="setStatus('Completed')"> {{$t('test_track.plan.plan_status_completed')}}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "TestPlanStatusButton",
|
||||
props: {
|
||||
status: {
|
||||
type: String
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
setStatus(status) {
|
||||
this.$emit('statusChange', status);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-row {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
</style>
|
|
@ -26,10 +26,6 @@
|
|||
<script>
|
||||
export default {
|
||||
name: "TestPlanTestCaseStatusButton",
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
props: {
|
||||
status: {
|
||||
type: String
|
||||
|
|
|
@ -76,6 +76,14 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="operationType == 'edit'" type="flex" justify="left" style="margin-top: 10px;">
|
||||
<el-col :span="19" :offset="1">
|
||||
<el-form-item :label="'当前状态'" :label-width="formLabelWidth" prop="status">
|
||||
<test-plan-status-button :status="form.status" @statusChange="statusChange"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<template v-slot:footer>
|
||||
|
@ -101,10 +109,12 @@
|
|||
<script>
|
||||
|
||||
import {WORKSPACE_ID} from '../../../../../common/js/constants';
|
||||
import TestPlanStatusButton from "../common/TestPlanStatusButton";
|
||||
|
||||
export default {
|
||||
name: "TestPlanEdit",
|
||||
data() {
|
||||
components: {TestPlanStatusButton},
|
||||
data() {
|
||||
return {
|
||||
dialogFormVisible: false,
|
||||
form: {
|
||||
|
@ -180,6 +190,10 @@
|
|||
this.principalOptions = response.data;
|
||||
});
|
||||
},
|
||||
statusChange(status) {
|
||||
this.form.status = status;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
resetForm() {
|
||||
//防止点击修改后,点击新建触发校验
|
||||
if (this.$refs['planFrom']) {
|
||||
|
@ -190,6 +204,7 @@
|
|||
this.form.principal = '';
|
||||
this.form.stage = '';
|
||||
this.form.description = '';
|
||||
this.form.status = null;
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue