fix:【接口定义】首页跳转swagger定时同步显示
This commit is contained in:
parent
d33f6eccea
commit
d192bc29ed
|
@ -175,7 +175,7 @@
|
|||
|
||||
<!-- 定时任务 -->
|
||||
<div v-if="item.type=== 'SCHEDULE'" class="ms-api-div">
|
||||
<api-schedule :module-options="nodeTree"/>
|
||||
<api-schedule :param="param" :module-options="nodeTree" ref="apiSchedules"/>
|
||||
</div>
|
||||
|
||||
<div v-else-if="item.type=== 'MOCK'" class="ms-api-div">
|
||||
|
@ -313,13 +313,24 @@ export default {
|
|||
currentModulePath: "",
|
||||
//影响API表格刷新的操作。 为了防止高频率刷新模块列表用。如果是模块更新而造成的表格刷新,则不回调模块刷新方法
|
||||
initApiTableOpretion: 'init',
|
||||
param: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
activated() {
|
||||
let dataRange = this.$route.params.dataSelectRange;
|
||||
if (dataRange && dataRange.length > 0) {
|
||||
this.activeDom = 'middle';
|
||||
this.trashActiveDom = 'left';
|
||||
}
|
||||
if (this.$route.params.dataSelectRange) {
|
||||
let item = JSON.parse(JSON.stringify(this.$route.params.dataSelectRange)).param;
|
||||
if (item !== undefined) {
|
||||
let type = item.taskGroup.toString();
|
||||
if (type === "SWAGGER_IMPORT") {
|
||||
this.handleTabsEdit(this.$t('api_test.api_import.timing_synchronization'), 'SCHEDULE');
|
||||
this.param = item;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
<div class="task-list">
|
||||
<swagger-task-list
|
||||
@clear="clear"
|
||||
:param="param"
|
||||
@rowClick="handleRowClick"
|
||||
ref="taskList"/>
|
||||
</div>
|
||||
|
@ -79,13 +80,16 @@ export default {
|
|||
props: {
|
||||
customValidate: {
|
||||
type: Function,
|
||||
default: () => {return {pass: true};}
|
||||
default: () => {
|
||||
return {pass: true};
|
||||
}
|
||||
},
|
||||
isReadOnly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
moduleOptions: Array,
|
||||
param: Object,
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
@ -61,14 +61,22 @@ export default {
|
|||
return {
|
||||
tableData: [],
|
||||
result: {}
|
||||
}
|
||||
};
|
||||
},
|
||||
props: {
|
||||
param: Object
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
let projectId = getCurrentProjectID();
|
||||
this.result = this.$get("/api/definition/scheduleTask/" + projectId, response => {
|
||||
this.tableData = response.data;
|
||||
})
|
||||
response.data.forEach(item => {
|
||||
if (item.taskId === this.param.taskID) {
|
||||
this.handleRowClick(item);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
handleRowClick(row) {
|
||||
this.$emit('rowClick', row);
|
||||
|
|
|
@ -155,7 +155,7 @@ export default {
|
|||
}else if (param.taskGroup === 'API_SCENARIO_TEST') {
|
||||
this.$emit('redirectPage', 'scenario', 'scenario', 'edit:' + param.scenarioId);
|
||||
} else if (param.taskGroup === 'SWAGGER_IMPORT') {
|
||||
this.$emit('redirectPage', 'api', 'api', 'edit:' + param.scenarioId);
|
||||
this.$emit('redirectPage', 'api', 'api', {param});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue