style(接口测试): 操作栏宽度调整
Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
parent
a0f6f1fe10
commit
963c83e18f
|
@ -14,7 +14,7 @@
|
||||||
:fields.sync="fields"
|
:fields.sync="fields"
|
||||||
:field-key="tableHeaderKey"
|
:field-key="tableHeaderKey"
|
||||||
:remember-order="true"
|
:remember-order="true"
|
||||||
operator-width="200"
|
operator-width="210"
|
||||||
:enable-order-drag="enableOrderDrag"
|
:enable-order-drag="enableOrderDrag"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:row-order-group-id="condition.projectId"
|
:row-order-group-id="condition.projectId"
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
:row-order-func="editApiTestCaseOrder"
|
:row-order-func="editApiTestCaseOrder"
|
||||||
:enable-order-drag="enableOrderDrag"
|
:enable-order-drag="enableOrderDrag"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
operator-width="190px"
|
operator-width="220"
|
||||||
@refresh="initTable"
|
@refresh="initTable"
|
||||||
ref="caseTable"
|
ref="caseTable"
|
||||||
class="api-case-simple-list">
|
class="api-case-simple-list">
|
||||||
|
@ -664,7 +664,12 @@ export default {
|
||||||
},
|
},
|
||||||
storeCurrentApiCaseRefresh() {
|
storeCurrentApiCaseRefresh() {
|
||||||
if (store.currentApiCase && store.currentApiCase.refresh) {
|
if (store.currentApiCase && store.currentApiCase.refresh) {
|
||||||
this.setStatus(store.currentApiCase.id, store.currentApiCase.status, store.currentApiCase.passRate, store.currentApiCase.reportId);
|
this.setStatus(
|
||||||
|
store.currentApiCase.id,
|
||||||
|
store.currentApiCase.status,
|
||||||
|
store.currentApiCase.passRate,
|
||||||
|
store.currentApiCase.reportId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
store.currentApiCase = {};
|
store.currentApiCase = {};
|
||||||
},
|
},
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
:batch-operators="trashEnable ? trashButtons : buttons"
|
:batch-operators="trashEnable ? trashButtons : buttons"
|
||||||
:screen-height="screenHeight"
|
:screen-height="screenHeight"
|
||||||
:operators="tableOperatorButtons"
|
:operators="tableOperatorButtons"
|
||||||
operator-width="200px"
|
operator-width="220"
|
||||||
:remember-order="true"
|
:remember-order="true"
|
||||||
@refresh="initTable"
|
@refresh="initTable"
|
||||||
:fields.sync="fields"
|
:fields.sync="fields"
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
min-width="100px"
|
min-width="100px"
|
||||||
:label="$t('api_test.definition.api_case_result')">
|
:label="$t('api_test.definition.api_case_result')">
|
||||||
<template v-slot:default="{ row }">
|
<template v-slot:default="{ row }">
|
||||||
<ms-api-report-status :status="row.caseStatus" style="text-align: left;"/>
|
<ms-api-report-status :status="row.caseStatus" style="text-align: left" />
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
|
@ -211,9 +211,7 @@
|
||||||
:label="$t('commons.description')" />
|
:label="$t('commons.description')" />
|
||||||
</span>
|
</span>
|
||||||
<template v-if="!trashEnable" v-slot:opt-behind="scope">
|
<template v-if="!trashEnable" v-slot:opt-behind="scope">
|
||||||
<table-extend-btns
|
<table-extend-btns :dropdown-items="dropdownItems" :row="scope.row" />
|
||||||
:dropdown-items="dropdownItems"
|
|
||||||
:row="scope.row"/>
|
|
||||||
</template>
|
</template>
|
||||||
</ms-table>
|
</ms-table>
|
||||||
<ms-table-pagination
|
<ms-table-pagination
|
||||||
|
@ -287,7 +285,7 @@ import {API_DEFINITION_CONFIGS} from 'metersphere-frontend/src/components/search
|
||||||
import { API_DEFINITION_CONFIGS_TRASH, getProtocolFilter } from '@/business/definition/api-definition';
|
import { API_DEFINITION_CONFIGS_TRASH, getProtocolFilter } from '@/business/definition/api-definition';
|
||||||
import MsTipButton from 'metersphere-frontend/src/components/MsTipButton';
|
import MsTipButton from 'metersphere-frontend/src/components/MsTipButton';
|
||||||
import CaseBatchMove from '@/business/definition/components/basis/BatchMove';
|
import CaseBatchMove from '@/business/definition/components/basis/BatchMove';
|
||||||
import {getProjectMember} from "@/api/user";
|
import { getProjectMember } from '@/api/user';
|
||||||
import {
|
import {
|
||||||
buildBatchParam,
|
buildBatchParam,
|
||||||
deepClone,
|
deepClone,
|
||||||
|
@ -304,10 +302,10 @@ import ListItemDeleteConfirm from 'metersphere-frontend/src/components/ListItemD
|
||||||
import MsSearch from 'metersphere-frontend/src/components/search/MsSearch';
|
import MsSearch from 'metersphere-frontend/src/components/search/MsSearch';
|
||||||
import { buildNodePath } from 'metersphere-frontend/src/model/NodeTree';
|
import { buildNodePath } from 'metersphere-frontend/src/model/NodeTree';
|
||||||
import VersionSelector from '@/business/definition/components/version/VersionSelector';
|
import VersionSelector from '@/business/definition/components/version/VersionSelector';
|
||||||
import TableExtendBtns from "@/business/definition/components/complete/table/TableExtendBtns";
|
import TableExtendBtns from '@/business/definition/components/complete/table/TableExtendBtns';
|
||||||
import MsShowReference from "@/business/definition/components/reference/ShowReference";
|
import MsShowReference from '@/business/definition/components/reference/ShowReference';
|
||||||
import {getApiTemplate} from "@/api/api-template";
|
import { getApiTemplate } from '@/api/api-template';
|
||||||
import {getAdvSearchCustomField} from "metersphere-frontend/src/components/search/custom-component";
|
import { getAdvSearchCustomField } from 'metersphere-frontend/src/components/search/custom-component';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ApiList',
|
name: 'ApiList',
|
||||||
|
@ -446,16 +444,16 @@ export default {
|
||||||
dropdownItems: [
|
dropdownItems: [
|
||||||
{
|
{
|
||||||
name: this.$t('api_test.automation.view_ref'),
|
name: this.$t('api_test.automation.view_ref'),
|
||||||
value: "ref",
|
value: 'ref',
|
||||||
permissions: ['PROJECT_API_DEFINITION:READ'],
|
permissions: ['PROJECT_API_DEFINITION:READ'],
|
||||||
exec: this.showCaseRef,
|
exec: this.showCaseRef,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('commons.view') + "CASE",
|
name: this.$t('commons.view') + 'CASE',
|
||||||
value: "case",
|
value: 'case',
|
||||||
permissions: ['PROJECT_API_DEFINITION:READ'],
|
permissions: ['PROJECT_API_DEFINITION:READ'],
|
||||||
exec: this.handleTestCase,
|
exec: this.handleTestCase,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
typeArr: [
|
typeArr: [
|
||||||
{ id: 'status', name: this.$t('api_test.definition.api_status') },
|
{ id: 'status', name: this.$t('api_test.definition.api_status') },
|
||||||
|
@ -655,8 +653,7 @@ export default {
|
||||||
async getTemplateField() {
|
async getTemplateField() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 防止第一次渲染版本字段展示顺序错乱
|
// 防止第一次渲染版本字段展示顺序错乱
|
||||||
let p1 = getProjectMember()
|
let p1 = getProjectMember().then((response) => {
|
||||||
.then((response) => {
|
|
||||||
this.members = response.data;
|
this.members = response.data;
|
||||||
});
|
});
|
||||||
let p2 = getApiTemplate(this.projectId);
|
let p2 = getApiTemplate(this.projectId);
|
||||||
|
@ -665,18 +662,18 @@ export default {
|
||||||
let template = data[1];
|
let template = data[1];
|
||||||
this.getCustomFields(template.customFields, this.members);
|
this.getCustomFields(template.customFields, this.members);
|
||||||
let comp = getAdvSearchCustomField(this.condition, template.customFields);
|
let comp = getAdvSearchCustomField(this.condition, template.customFields);
|
||||||
this.condition.components.push(...comp)
|
this.condition.components.push(...comp);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCustomFields(customFields, projectMembers = []) {
|
getCustomFields(customFields, projectMembers = []) {
|
||||||
projectMembers.forEach(member => {
|
projectMembers.forEach((member) => {
|
||||||
member['text'] = member.name;
|
member['text'] = member.name;
|
||||||
// 高级搜索使用
|
// 高级搜索使用
|
||||||
member['label'] = member.name;
|
member['label'] = member.name;
|
||||||
member['value'] = member.id;
|
member['value'] = member.id;
|
||||||
member['showLabel'] = member.name + "(" + member.id + ")";
|
member['showLabel'] = member.name + '(' + member.id + ')';
|
||||||
})
|
});
|
||||||
customFields.forEach(item => {
|
customFields.forEach((item) => {
|
||||||
if ((item.type === 'member' || item.type === 'multipleMember') && projectMembers && projectMembers.length > 0) {
|
if ((item.type === 'member' || item.type === 'multipleMember') && projectMembers && projectMembers.length > 0) {
|
||||||
item.options = projectMembers;
|
item.options = projectMembers;
|
||||||
}
|
}
|
||||||
|
@ -740,7 +737,7 @@ export default {
|
||||||
this.selectDataCounts = 0;
|
this.selectDataCounts = 0;
|
||||||
this.condition.moduleIds = this.selectNodeIds;
|
this.condition.moduleIds = this.selectNodeIds;
|
||||||
this.condition.projectId = this.projectId;
|
this.condition.projectId = this.projectId;
|
||||||
if (currentProtocol && ["HTTP", "DUBBO", "SQL", "TCP"].includes(currentProtocol)) {
|
if (currentProtocol && ['HTTP', 'DUBBO', 'SQL', 'TCP'].includes(currentProtocol)) {
|
||||||
this.condition.protocol = currentProtocol;
|
this.condition.protocol = currentProtocol;
|
||||||
} else if (this.currentProtocol != null) {
|
} else if (this.currentProtocol != null) {
|
||||||
this.condition.protocol = this.currentProtocol;
|
this.condition.protocol = this.currentProtocol;
|
||||||
|
|
Loading…
Reference in New Issue