fix(接口测试): 接口测试首页过去7天有更新的接口统计中进行用例跳转时自动切换到对应的请求
--bug=1031580 --user=宋天阳 【接口测试】首页-过去7天有更新的接口-sql接口-点击关联CASE-进入到http-case页面 https://www.tapd.cn/55049933/s/1426921
This commit is contained in:
parent
ec9b01c773
commit
f3d67b0a46
|
@ -34,7 +34,8 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 16px">
|
<el-row style="margin-top: 16px">
|
||||||
<el-col style="background-color: #ffffff">
|
<el-col style="background-color: #ffffff">
|
||||||
<updated-api-list @redirectPage="redirectPage" ref="updatedApiList" />
|
<updated-api-list ref="updatedApiList" @redirectPage="redirectPage"
|
||||||
|
@redirectPageWithDataType="redirectPageWithDataType"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 16px">
|
<el-row style="margin-top: 16px">
|
||||||
|
@ -49,7 +50,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getUUID } from 'metersphere-frontend/src/utils';
|
import {getUUID} from 'metersphere-frontend/src/utils';
|
||||||
import MsContainer from 'metersphere-frontend/src/components/MsContainer';
|
import MsContainer from 'metersphere-frontend/src/components/MsContainer';
|
||||||
import MsMainContainer from 'metersphere-frontend/src/components/MsMainContainer';
|
import MsMainContainer from 'metersphere-frontend/src/components/MsMainContainer';
|
||||||
import ApiDashboard from '@/business/home/components/dashboard/ApiDashboard';
|
import ApiDashboard from '@/business/home/components/dashboard/ApiDashboard';
|
||||||
|
@ -58,9 +59,9 @@ import ScenarioDashboard from '@/business/home/components/dashboard/ScenarioDash
|
||||||
import ScenarioScheduleDashboard from '@/business/home/components/dashboard/ScenarioScheduleDashboard';
|
import ScenarioScheduleDashboard from '@/business/home/components/dashboard/ScenarioScheduleDashboard';
|
||||||
import UpdatedApiList from '@/business/home/components/table/UpdatedApiList';
|
import UpdatedApiList from '@/business/home/components/table/UpdatedApiList';
|
||||||
import ScheduleTaskList from '@/business/home/components/table/ScheduleTaskList';
|
import ScheduleTaskList from '@/business/home/components/table/ScheduleTaskList';
|
||||||
import { getProjectVersions } from '@/api/xpack';
|
import {getProjectVersions} from '@/api/xpack';
|
||||||
import { getCurrentProjectID } from 'metersphere-frontend/src/utils/token';
|
import {getCurrentProjectID} from 'metersphere-frontend/src/utils/token';
|
||||||
import { hasLicense } from 'metersphere-frontend/src/utils/permission';
|
import {hasLicense} from 'metersphere-frontend/src/utils/permission';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ApiHome',
|
name: 'ApiHome',
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
type="info"
|
type="info"
|
||||||
:underline="false"
|
:underline="false"
|
||||||
v-permission-disable="['PROJECT_API_DEFINITION:READ']"
|
v-permission-disable="['PROJECT_API_DEFINITION:READ']"
|
||||||
@click="redirectPage('api', 'apiTestCase', 'singleList:' + row.id)">
|
@click="redirectPage('api', 'apiTestCase', 'singleList:' + row.id, row.protocol)">
|
||||||
<span style="float: right">
|
<span style="float: right">
|
||||||
{{ row.caseTotal }}
|
{{ row.caseTotal }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -118,13 +118,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { definitionWeekList } from '@/api/definition';
|
import {definitionWeekList} from '@/api/definition';
|
||||||
import { getCurrentProjectID } from 'metersphere-frontend/src/utils/token';
|
import {getCurrentProjectID} from 'metersphere-frontend/src/utils/token';
|
||||||
import { API_STATUS } from '@/business/definition/model/JsonData';
|
import {API_STATUS} from '@/business/definition/model/JsonData';
|
||||||
import ApiStatus from '@/business/definition/components/list/ApiStatus';
|
import ApiStatus from '@/business/definition/components/list/ApiStatus';
|
||||||
import HomeTablePagination from '@/business/home/components/table/HomeTablePagination';
|
import HomeTablePagination from '@/business/home/components/table/HomeTablePagination';
|
||||||
import BasicStatusLabel from 'metersphere-frontend/src/components/BasicStatusLabel';
|
import BasicStatusLabel from 'metersphere-frontend/src/components/BasicStatusLabel';
|
||||||
import { hasPermission } from 'metersphere-frontend/src/utils/permission';
|
import {hasPermission} from 'metersphere-frontend/src/utils/permission';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UpdatedApiList',
|
name: 'UpdatedApiList',
|
||||||
|
@ -152,7 +152,7 @@ export default {
|
||||||
if (!hasPermission('PROJECT_API_DEFINITION:READ')) {
|
if (!hasPermission('PROJECT_API_DEFINITION:READ')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.redirectPage('api', 'api', 'edit:' + row.id);
|
this.redirectPageWithDataType('api', 'api', 'edit:' + row.id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
search(versionId) {
|
search(versionId) {
|
||||||
|
@ -175,8 +175,12 @@ export default {
|
||||||
this.loadError = true;
|
this.loadError = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
redirectPage(redirectPage, dataType, selectRange) {
|
redirectPage(redirectPage, dataType, selectRange, type) {
|
||||||
this.$emit('redirectPage', redirectPage, dataType, selectRange, null);
|
if (!type || type === undefined) {
|
||||||
|
this.$emit('redirectPage', redirectPage, dataType, selectRange, null, type);
|
||||||
|
} else {
|
||||||
|
this.$emit('redirectPageWithDataType', redirectPage, dataType, selectRange, null, type);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue