refactor: 场景引用添加跳转链接
This commit is contained in:
parent
7658916438
commit
1bb837bb61
|
@ -22,6 +22,7 @@
|
|||
:trash-enable="trashEnable"
|
||||
:checkRedirectID="checkRedirectID"
|
||||
:isRedirectEdit="isRedirectEdit"
|
||||
@openScenario="editScenario"
|
||||
@edit="editScenario"
|
||||
@changeSelectDataRangeAll="changeSelectDataRangeAll"
|
||||
ref="apiScenarioList"/>
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
<ms-table-operator-button :tip="$t('api_test.automation.copy')" icon="el-icon-document-copy" type=""
|
||||
@exec="copy(row)"/>
|
||||
<ms-table-operator-button :tip="$t('api_test.automation.remove')" icon="el-icon-delete" @exec="remove(row)" type="danger" v-tester/>
|
||||
<ms-scenario-extend-buttons :row="row"/>
|
||||
<ms-scenario-extend-buttons @openScenario="openScenario" :row="row"/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -589,6 +589,9 @@ export default {
|
|||
_filter(filters, this.condition);
|
||||
this.search();
|
||||
},
|
||||
openScenario (item) {
|
||||
this.$emit('openScenario', item)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -3,12 +3,20 @@
|
|||
width="45%" :destroy-on-close="true" >
|
||||
<span>{{ $t('api_test.automation.scenario_ref') }}:</span>
|
||||
<div class="refs" v-loading="scenarioLoading">
|
||||
<div v-for="(item, index) in scenarioRefs" :key="index" class="el-button--text">{{ item.name }}</div>
|
||||
<div v-for="(item, index) in scenarioRefs" :key="index" class="el-button--text">
|
||||
<el-link @click="openScenario(item)">
|
||||
{{ item.name }}
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span>{{ $t('api_test.automation.plan_ref') }}:</span>
|
||||
<div class="refs">
|
||||
<div v-for="(item, index) in planRefs" :key="index" class="el-button--text">{{ item.name }}</div>
|
||||
<div v-for="(item, index) in planRefs" :key="index" class="el-button--text">
|
||||
<router-link :to="'/track/plan/view/' + item.id">
|
||||
{{ item.name }}
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-slot:footer>
|
||||
|
@ -47,6 +55,10 @@
|
|||
open(row) {
|
||||
this.getReferenceData(row);
|
||||
this.visible = true
|
||||
},
|
||||
openScenario(item) {
|
||||
this.$emit('openScenario', item);
|
||||
this.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<el-dropdown-item command="create_performance" v-tester>{{ $t('api_test.create_performance_test') }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<ms-reference-view ref="viewRef"/>
|
||||
<ms-reference-view @openScenario="openScenario" ref="viewRef"/>
|
||||
<ms-schedule-maintain ref="scheduleMaintain" @refreshTable="refreshTable"/>
|
||||
|
||||
</div>
|
||||
|
@ -64,6 +64,9 @@
|
|||
})
|
||||
});
|
||||
},
|
||||
openScenario (item) {
|
||||
this.$emit('openScenario', item)
|
||||
},
|
||||
refreshTable() {
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue