Merge remote-tracking branch 'origin/v1.7' into v1.7
This commit is contained in:
commit
aadf243399
|
@ -13,13 +13,13 @@ public class MsAssertionJSR223 extends MsAssertionType {
|
||||||
private String desc;
|
private String desc;
|
||||||
private String name;
|
private String name;
|
||||||
private String script;
|
private String script;
|
||||||
private String language;
|
private String scriptLanguage;
|
||||||
|
|
||||||
public MsAssertionJSR223() {
|
public MsAssertionJSR223() {
|
||||||
setType(MsAssertionType.JSR223);
|
setType(MsAssertionType.JSR223);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
return StringUtils.isNotBlank(script) && StringUtils.isNotBlank(language);
|
return StringUtils.isNotBlank(script) && StringUtils.isNotBlank(scriptLanguage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class MsAssertions extends MsTestElement {
|
||||||
assertion.setProperty(TestElement.TEST_CLASS, JSR223Assertion.class.getName());
|
assertion.setProperty(TestElement.TEST_CLASS, JSR223Assertion.class.getName());
|
||||||
assertion.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
assertion.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||||
assertion.setProperty("cacheKey", "true");
|
assertion.setProperty("cacheKey", "true");
|
||||||
assertion.setProperty("scriptLanguage", assertionJSR223.getLanguage());
|
assertion.setProperty("scriptLanguage", assertionJSR223.getScriptLanguage());
|
||||||
assertion.setProperty("script", assertionJSR223.getScript());
|
assertion.setProperty("script", assertionJSR223.getScript());
|
||||||
return assertion;
|
return assertion;
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,6 +290,9 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
||||||
Arguments arguments = new Arguments();
|
Arguments arguments = new Arguments();
|
||||||
list.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue -> {
|
list.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue -> {
|
||||||
HTTPArgument httpArgument = new HTTPArgument(keyValue.getName(), StringUtils.isNotEmpty(keyValue.getValue()) && keyValue.getValue().startsWith("@") ? ScriptEngineUtils.calculate(keyValue.getValue()) : keyValue.getValue());
|
HTTPArgument httpArgument = new HTTPArgument(keyValue.getName(), StringUtils.isNotEmpty(keyValue.getValue()) && keyValue.getValue().startsWith("@") ? ScriptEngineUtils.calculate(keyValue.getValue()) : keyValue.getValue());
|
||||||
|
if (keyValue.getValue() == null) {
|
||||||
|
httpArgument.setValue("");
|
||||||
|
}
|
||||||
httpArgument.setAlwaysEncoded(keyValue.isEncode());
|
httpArgument.setAlwaysEncoded(keyValue.isEncode());
|
||||||
if (StringUtils.isNotBlank(keyValue.getContentType())) {
|
if (StringUtils.isNotBlank(keyValue.getContentType())) {
|
||||||
httpArgument.setContentType(keyValue.getContentType());
|
httpArgument.setContentType(keyValue.getContentType());
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package io.metersphere.performance.job;
|
||||||
|
|
||||||
|
import com.fit2cloud.quartz.anno.QuartzScheduled;
|
||||||
|
import io.metersphere.base.domain.LoadTestReport;
|
||||||
|
import io.metersphere.base.domain.LoadTestReportDetailExample;
|
||||||
|
import io.metersphere.base.domain.LoadTestReportExample;
|
||||||
|
import io.metersphere.base.mapper.LoadTestReportDetailMapper;
|
||||||
|
import io.metersphere.base.mapper.LoadTestReportMapper;
|
||||||
|
import io.metersphere.commons.constants.PerformanceTestStatus;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class LoadTestReportDetailCleanJob {
|
||||||
|
@Resource
|
||||||
|
private LoadTestReportDetailMapper loadTestReportDetailMapper;
|
||||||
|
@Resource
|
||||||
|
private LoadTestReportMapper loadTestReportMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每天处理一次清理任务
|
||||||
|
*/
|
||||||
|
@QuartzScheduled(cron = "0 0 1 * * ?")
|
||||||
|
public void cleanCompletedTestDetail() {
|
||||||
|
LoadTestReportExample example = new LoadTestReportExample();
|
||||||
|
example.createCriteria().andStatusEqualTo(PerformanceTestStatus.Completed.name());
|
||||||
|
List<LoadTestReport> loadTestReports = loadTestReportMapper.selectByExample(example);
|
||||||
|
loadTestReports.forEach(report -> {
|
||||||
|
// 清理文件
|
||||||
|
LoadTestReportDetailExample example2 = new LoadTestReportDetailExample();
|
||||||
|
example2.createCriteria().andReportIdEqualTo(report.getId());
|
||||||
|
loadTestReportDetailMapper.deleteByExample(example2);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -387,7 +387,7 @@ public class JmeterDocumentParser implements DocumentParser {
|
||||||
element.appendChild(createStringProp(document, "HTTPSampler.contentEncoding", ""));
|
element.appendChild(createStringProp(document, "HTTPSampler.contentEncoding", ""));
|
||||||
element.appendChild(createStringProp(document, "HTTPSampler.path", ""));
|
element.appendChild(createStringProp(document, "HTTPSampler.path", ""));
|
||||||
element.appendChild(createStringProp(document, "HTTPSampler.concurrentPool", "6"));
|
element.appendChild(createStringProp(document, "HTTPSampler.concurrentPool", "6"));
|
||||||
element.appendChild(createStringProp(document, "HTTPSampler.connect_timeout", ""));
|
element.appendChild(createStringProp(document, "HTTPSampler.connect_timeout", "60000"));
|
||||||
element.appendChild(createStringProp(document, "HTTPSampler.response_timeout", ""));
|
element.appendChild(createStringProp(document, "HTTPSampler.response_timeout", ""));
|
||||||
hashTree.appendChild(element);
|
hashTree.appendChild(element);
|
||||||
// 空的 hashTree
|
// 空的 hashTree
|
||||||
|
|
|
@ -83,13 +83,14 @@ import MsTableHeader from "../../../common/components/MsTableHeader";
|
||||||
import MsContainer from "../../../common/components/MsContainer";
|
import MsContainer from "../../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../../common/components/MsMainContainer";
|
import MsMainContainer from "../../../common/components/MsMainContainer";
|
||||||
import MsApiReportStatus from "./ApiReportStatus";
|
import MsApiReportStatus from "./ApiReportStatus";
|
||||||
import {_filter, _sort, getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
||||||
import ReportTriggerModeItem from "../../../common/tableItem/ReportTriggerModeItem";
|
import ReportTriggerModeItem from "../../../common/tableItem/ReportTriggerModeItem";
|
||||||
import {REPORT_CONFIGS} from "../../../common/components/search/search-components";
|
import {REPORT_CONFIGS} from "../../../common/components/search/search-components";
|
||||||
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||||
import ShowMoreBtn from "../../../track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../../track/case/components/ShowMoreBtn";
|
||||||
import MsApiReportDetail from "./ApiReportDetail";
|
import MsApiReportDetail from "./ApiReportDetail";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -151,26 +151,27 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||||
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
||||||
import MsTag from "../../../common/components/MsTag";
|
import MsTag from "../../../common/components/MsTag";
|
||||||
import {_filter, _sort, getCurrentProjectID, getUUID} from "@/common/js/utils";
|
import {getCurrentProjectID, getUUID} from "@/common/js/utils";
|
||||||
import MsApiReportDetail from "../report/ApiReportDetail";
|
import MsApiReportDetail from "../report/ApiReportDetail";
|
||||||
import MsTableMoreBtn from "./TableMoreBtn";
|
import MsTableMoreBtn from "./TableMoreBtn";
|
||||||
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
|
import MsScenarioExtendButtons from "@/business/components/api/automation/scenario/ScenarioExtendBtns";
|
||||||
import MsTestPlanList from "./testplan/TestPlanList";
|
import MsTestPlanList from "./testplan/TestPlanList";
|
||||||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||||
import {API_SCENARIO_CONFIGS} from "@/business/components/common/components/search/search-components";
|
import {API_SCENARIO_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||||
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
||||||
import PriorityTableItem from "../../../track/common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../track/common/tableItems/planview/PriorityTableItem";
|
||||||
import PlanStatusTableItem from "../../../track/common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../../track/common/tableItems/plan/PlanStatusTableItem";
|
||||||
import BatchEdit from "../../../track/case/components/BatchEdit";
|
import BatchEdit from "../../../track/case/components/BatchEdit";
|
||||||
import {WORKSPACE_ID} from "../../../../../common/js/constants";
|
import {WORKSPACE_ID} from "../../../../../common/js/constants";
|
||||||
import EnvironmentSelect from "../../definition/components/environment/EnvironmentSelect";
|
import EnvironmentSelect from "../../definition/components/environment/EnvironmentSelect";
|
||||||
import BatchMove from "../../../track/case/components/BatchMove";
|
import BatchMove from "../../../track/case/components/BatchMove";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsApiScenarioList",
|
name: "MsApiScenarioList",
|
||||||
components: {
|
components: {
|
||||||
BatchMove,
|
BatchMove,
|
||||||
|
|
|
@ -88,10 +88,9 @@ import {API_METHOD_COLOUR, CASE_PRIORITY} from "../../../definition/model/JsonDa
|
||||||
import {getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
|
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
|
||||||
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
||||||
import {_filter, _sort} from "../../../../../../common/js/utils";
|
|
||||||
import {_handleSelect, _handleSelectAll} from "../../../../../../common/js/tableUtils";
|
|
||||||
import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect";
|
import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect";
|
||||||
import TableSelectCountBar from "./TableSelectCountBar";
|
import TableSelectCountBar from "./TableSelectCountBar";
|
||||||
|
import {_filter, _handleSelect, _handleSelectAll, _sort,} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RelevanceApiList",
|
name: "RelevanceApiList",
|
||||||
|
|
|
@ -77,10 +77,9 @@ import {API_METHOD_COLOUR, CASE_PRIORITY} from "../../../definition/model/JsonDa
|
||||||
import {getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
|
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
|
||||||
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
||||||
import {_filter, _sort} from "../../../../../../common/js/utils";
|
|
||||||
import {_handleSelect, _handleSelectAll} from "../../../../../../common/js/tableUtils";
|
|
||||||
import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect";
|
import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect";
|
||||||
import TableSelectCountBar from "./TableSelectCountBar";
|
import TableSelectCountBar from "./TableSelectCountBar";
|
||||||
|
import {_filter, _handleSelect, _handleSelectAll, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RelevanceCaseList",
|
name: "RelevanceCaseList",
|
||||||
|
|
|
@ -244,7 +244,7 @@
|
||||||
getFails() {
|
getFails() {
|
||||||
this.error = 0;
|
this.error = 0;
|
||||||
this.success = 0;
|
this.success = 0;
|
||||||
if (this.requestResult.scenarios) {
|
if (this.requestResult.scenarios && this.requestResult.scenarios != null) {
|
||||||
this.requestResult.scenarios.forEach((scenario) => {
|
this.requestResult.scenarios.forEach((scenario) => {
|
||||||
if (scenario.requestResults) {
|
if (scenario.requestResults) {
|
||||||
scenario.requestResults.forEach(item => {
|
scenario.requestResults.forEach(item => {
|
||||||
|
@ -255,7 +255,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.success = this.requestResult.scenarios.length - this.error;
|
this.success = this.requestResult.scenarios && this.requestResult.scenarios != null ? this.requestResult.scenarios.length - this.error : 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getReport() {
|
getReport() {
|
||||||
|
@ -267,6 +267,9 @@
|
||||||
if (this.isNotRunning) {
|
if (this.isNotRunning) {
|
||||||
try {
|
try {
|
||||||
this.requestResult = JSON.parse(this.report.content);
|
this.requestResult = JSON.parse(this.report.content);
|
||||||
|
if (!this.requestResult) {
|
||||||
|
this.requestResult = {scenarios: []};
|
||||||
|
}
|
||||||
this.controller.requestResult = this.requestResult;
|
this.controller.requestResult = this.requestResult;
|
||||||
switch (this.controller.loopType) {
|
switch (this.controller.loopType) {
|
||||||
case "LOOP_COUNT":
|
case "LOOP_COUNT":
|
||||||
|
@ -282,14 +285,11 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.getFails();
|
this.getFails();
|
||||||
if (!this.requestResult) {
|
|
||||||
this.requestResult = {scenarios: []};
|
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.activeName = this.requestResult && this.requestResult.scenarios ? this.requestResult.scenarios[0].name : "";
|
this.activeName = this.requestResult && this.requestResult.scenarios && this.requestResult.scenarios != null && this.requestResult.scenarios.length > 0 ? this.requestResult.scenarios[0].name : "";
|
||||||
} else {
|
} else {
|
||||||
setTimeout(this.getReport, 2000)
|
setTimeout(this.getReport, 2000)
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,23 +134,25 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsCreateBox from '../../../../settings/CreateBox';
|
import MsCreateBox from '../../../../settings/CreateBox';
|
||||||
import MsTablePagination from '../../../../../components/common/pagination/TablePagination';
|
import MsTablePagination from '../../../../../components/common/pagination/TablePagination';
|
||||||
import MsTableHeader from "../../../../common/components/MsTableHeader";
|
import MsTableHeader from "../../../../common/components/MsTableHeader";
|
||||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||||
import MsTableOperatorButton from "../../../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../../../common/components/MsTableOperatorButton";
|
||||||
import MsTableOperator from "../../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../../common/components/MsTableOperator";
|
||||||
import PlanStatusTableItem from "../../../../track/common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../../../track/common/tableItems/plan/PlanStatusTableItem";
|
||||||
import PlanStageTableItem from "../../../../track/common/tableItems/plan/PlanStageTableItem";
|
import PlanStageTableItem from "../../../../track/common/tableItems/plan/PlanStageTableItem";
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
import {checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
||||||
import TestReportTemplateList from "../../../../track/plan/view/comonents/TestReportTemplateList";
|
import TestReportTemplateList from "../../../../track/plan/view/comonents/TestReportTemplateList";
|
||||||
import TestCaseReportView from "../../../../track/plan/view/comonents/report/TestCaseReportView";
|
import TestCaseReportView from "../../../../track/plan/view/comonents/report/TestCaseReportView";
|
||||||
import MsDeleteConfirm from "../../../../common/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "../../../../common/components/MsDeleteConfirm";
|
||||||
import {TEST_PLAN_CONFIGS} from "../../../../common/components/search/search-components";
|
import {TEST_PLAN_CONFIGS} from "../../../../common/components/search/search-components";
|
||||||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||||
import {getCurrentProjectID} from "../../../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../../../common/js/utils";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
|
||||||
|
export default {
|
||||||
name: "TestPlanList",
|
name: "TestPlanList",
|
||||||
components: {
|
components: {
|
||||||
MsDeleteConfirm,
|
MsDeleteConfirm,
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
import MsEditRandom from "./EditRandom";
|
import MsEditRandom from "./EditRandom";
|
||||||
import MsEditListValue from "./EditListValue";
|
import MsEditListValue from "./EditListValue";
|
||||||
import MsEditCsv from "./EditCsv";
|
import MsEditCsv from "./EditCsv";
|
||||||
import {_filter, getUUID} from "@/common/js/utils";
|
import {getUUID} from "@/common/js/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsVariableList",
|
name: "MsVariableList",
|
||||||
|
@ -188,6 +188,8 @@
|
||||||
} else {
|
} else {
|
||||||
item.hidden = undefined;
|
item.hidden = undefined;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
item.hidden = undefined;
|
||||||
}
|
}
|
||||||
datas.push(item);
|
datas.push(item);
|
||||||
})
|
})
|
||||||
|
@ -202,12 +204,8 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style>
|
||||||
.ms-variable-hidden-row {
|
.ms-variable-hidden-row {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-dialog__body {
|
|
||||||
padding: 10px 10px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -132,18 +132,16 @@ import {API_METHOD_COLOUR, CASE_PRIORITY, DUBBO_METHOD, REQ_METHOD, SQL_METHOD,
|
||||||
import {getBodyUploadFiles, getCurrentProjectID} from "@/common/js/utils";
|
import {getBodyUploadFiles, getCurrentProjectID} from "@/common/js/utils";
|
||||||
import ApiListContainer from "./ApiListContainer";
|
import ApiListContainer from "./ApiListContainer";
|
||||||
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
||||||
import {_filter, _sort} from "../../../../../../common/js/utils";
|
|
||||||
import {_handleSelect, _handleSelectAll} from "../../../../../../common/js/tableUtils";
|
|
||||||
import MsApiCaseTableExtendBtns from "../reference/ApiCaseTableExtendBtns";
|
import MsApiCaseTableExtendBtns from "../reference/ApiCaseTableExtendBtns";
|
||||||
import MsReferenceView from "../reference/ReferenceView";
|
import MsReferenceView from "../reference/ReferenceView";
|
||||||
import MsSetEnvironment from "@/business/components/api/definition/components/basis/SetEnvironment";
|
import MsSetEnvironment from "@/business/components/api/definition/components/basis/SetEnvironment";
|
||||||
import TestPlan from "@/business/components/api/definition/components/jmeter/components/test-plan";
|
import TestPlan from "@/business/components/api/definition/components/jmeter/components/test-plan";
|
||||||
import ThreadGroup from "@/business/components/api/definition/components/jmeter/components/thread-group";
|
import ThreadGroup from "@/business/components/api/definition/components/jmeter/components/thread-group";
|
||||||
import {parseEnvironment} from "@/business/components/api/test/model/EnvironmentModel";
|
import {parseEnvironment} from "@/business/components/api/test/model/EnvironmentModel";
|
||||||
// import MsTableSelectAll from "../../../../common/components/table/MsTableSelectAll";
|
|
||||||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||||
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
||||||
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
|
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||||
|
import {_filter, _handleSelect, _handleSelectAll, _sort,} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ApiCaseSimpleList",
|
name: "ApiCaseSimpleList",
|
||||||
|
|
|
@ -187,8 +187,8 @@ import MsContainer from "../../../../common/components/MsContainer";
|
||||||
import MsBottomContainer from "../BottomContainer";
|
import MsBottomContainer from "../BottomContainer";
|
||||||
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
|
||||||
import MsBatchEdit from "../basis/BatchEdit";
|
import MsBatchEdit from "../basis/BatchEdit";
|
||||||
import {API_METHOD_COLOUR, API_STATUS, REQ_METHOD, TCP_METHOD, SQL_METHOD, DUBBO_METHOD} from "../../model/JsonData";
|
import {API_METHOD_COLOUR, API_STATUS, DUBBO_METHOD, REQ_METHOD, SQL_METHOD, TCP_METHOD} from "../../model/JsonData";
|
||||||
import {_filter, _sort, getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
import {WORKSPACE_ID} from '@/common/js/constants';
|
||||||
import ApiListContainer from "./ApiListContainer";
|
import ApiListContainer from "./ApiListContainer";
|
||||||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||||
|
@ -197,6 +197,8 @@ import MsTableAdvSearchBar from "@/business/components/common/components/search/
|
||||||
import {API_DEFINITION_CONFIGS} from "@/business/components/common/components/search/search-components";
|
import {API_DEFINITION_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||||
import MsTipButton from "@/business/components/common/components/MsTipButton";
|
import MsTipButton from "@/business/components/common/components/MsTipButton";
|
||||||
import CaseBatchMove from "@/business/components/api/definition/components/basis/BatchMove";
|
import CaseBatchMove from "@/business/components/api/definition/components/basis/BatchMove";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ApiList",
|
name: "ApiList",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import {
|
import {
|
||||||
Arguments,
|
Arguments,
|
||||||
|
ConstantTimer as JMXConstantTimer,
|
||||||
CookieManager,
|
CookieManager,
|
||||||
DNSCacheManager,
|
DNSCacheManager,
|
||||||
DubboSample,
|
DubboSample,
|
||||||
|
@ -10,6 +11,7 @@ import {
|
||||||
HTTPSamplerArguments,
|
HTTPSamplerArguments,
|
||||||
HTTPsamplerFiles,
|
HTTPsamplerFiles,
|
||||||
HTTPSamplerProxy,
|
HTTPSamplerProxy,
|
||||||
|
IfController as JMXIfController,
|
||||||
JDBCDataSource,
|
JDBCDataSource,
|
||||||
JDBCSampler,
|
JDBCSampler,
|
||||||
JSONPathAssertion,
|
JSONPathAssertion,
|
||||||
|
@ -20,12 +22,11 @@ import {
|
||||||
ResponseCodeAssertion,
|
ResponseCodeAssertion,
|
||||||
ResponseDataAssertion,
|
ResponseDataAssertion,
|
||||||
ResponseHeadersAssertion,
|
ResponseHeadersAssertion,
|
||||||
|
TCPSampler,
|
||||||
TestElement,
|
TestElement,
|
||||||
TestPlan,
|
TestPlan,
|
||||||
ThreadGroup,
|
ThreadGroup,
|
||||||
XPath2Extractor,
|
XPath2Extractor,
|
||||||
IfController as JMXIfController,
|
|
||||||
ConstantTimer as JMXConstantTimer, TCPSampler,
|
|
||||||
} from "./JMX";
|
} from "./JMX";
|
||||||
import Mock from "mockjs";
|
import Mock from "mockjs";
|
||||||
import {funcFilters} from "@/common/js/func-filter";
|
import {funcFilters} from "@/common/js/func-filter";
|
||||||
|
@ -807,12 +808,12 @@ export class AssertionJSR223 extends AssertionType {
|
||||||
|
|
||||||
this.name = undefined;
|
this.name = undefined;
|
||||||
this.script = undefined;
|
this.script = undefined;
|
||||||
this.language = "beanshell";
|
this.scriptLanguage = "beanshell";
|
||||||
this.set(options);
|
this.set(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
isValid() {
|
isValid() {
|
||||||
return !!this.script && !!this.language;
|
return !!this.script && !!this.scriptLanguage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,12 +63,12 @@ import MsTableHeader from "../../common/components/MsTableHeader";
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsApiReportStatus from "./ApiReportStatus";
|
import MsApiReportStatus from "./ApiReportStatus";
|
||||||
import {_filter, _sort} from "@/common/js/utils";
|
|
||||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||||
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
||||||
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
||||||
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||||
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -61,21 +61,21 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import OneClickOperation from './OneClickOperation';
|
import OneClickOperation from './OneClickOperation';
|
||||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||||
import MsTableOperator from "../../common/components/MsTableOperator";
|
import MsTableOperator from "../../common/components/MsTableOperator";
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsApiTestStatus from "./ApiTestStatus";
|
import MsApiTestStatus from "./ApiTestStatus";
|
||||||
import MsTableOperators from "../../common/components/MsTableOperators";
|
import MsTableOperators from "../../common/components/MsTableOperators";
|
||||||
import {_filter, _sort} from "@/common/js/utils";
|
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
||||||
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
||||||
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
|
import ApiCopyDialog from "./components/ApiCopyDialog";
|
||||||
import ApiCopyDialog from "./components/ApiCopyDialog";
|
import MsUpgrade from "./Upgrade";
|
||||||
import MsUpgrade from "./Upgrade";
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ApiCopyDialog,
|
ApiCopyDialog,
|
||||||
OneClickOperation,
|
OneClickOperation,
|
||||||
|
|
|
@ -2,19 +2,21 @@
|
||||||
<el-dialog width="50%" :close-on-click-modal="false" :title="$t('api_test.jar_config.title')" :visible.sync="visible" class="jar-import" @close="close">
|
<el-dialog width="50%" :close-on-click-modal="false" :title="$t('api_test.jar_config.title')" :visible.sync="visible" class="jar-import" @close="close">
|
||||||
<div v-loading="result.loading">
|
<div v-loading="result.loading">
|
||||||
<ms-jar-config-from :config="currentConfig" :callback="saveConfig" ref="jarConfigFrom" :read-only="isReadOnly"/>
|
<ms-jar-config-from :config="currentConfig" :callback="saveConfig" ref="jarConfigFrom" :read-only="isReadOnly"/>
|
||||||
<ms-jar-search-bar @refresh="getJarConfigs" :table-data="configs" ref="jarSearchBar"/>
|
<ms-jar-search-bar v-if="(!isSearchBarQuery && configs.length > 0) || isSearchBarQuery" :condition="condition"
|
||||||
|
@search="getJarConfigs" :table-data="configs" ref="jarSearchBar"/>
|
||||||
<ms-jar-config-list @refresh="getJarConfigs" v-if="configs.length > 0" @rowSelect="rowSelect" :table-data="configs" ref="jarConfigList"/>
|
<ms-jar-config-list @refresh="getJarConfigs" v-if="configs.length > 0" @rowSelect="rowSelect" :table-data="configs" ref="jarConfigList"/>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||||
import {listenGoBack, removeGoBackListener} from "../../../../../../common/js/utils";
|
import {listenGoBack, removeGoBackListener} from "../../../../../../common/js/utils";
|
||||||
import MsJarConfigList from "./JarConfigList";
|
import MsJarConfigList from "./JarConfigList";
|
||||||
import MsJarConfigFrom from "./JarConfigFrom";
|
import MsJarConfigFrom from "./JarConfigFrom";
|
||||||
import MsJarSearchBar from "./JarSearchBar";
|
import MsJarSearchBar from "./JarSearchBar";
|
||||||
export default {
|
|
||||||
|
export default {
|
||||||
name: "MsJarConfig",
|
name: "MsJarConfig",
|
||||||
components: {MsJarConfigFrom, MsJarSearchBar, MsJarConfigList, MsDialogFooter},
|
components: {MsJarConfigFrom, MsJarSearchBar, MsJarConfigList, MsDialogFooter},
|
||||||
data() {
|
data() {
|
||||||
|
@ -22,7 +24,9 @@
|
||||||
visible: false,
|
visible: false,
|
||||||
result: {},
|
result: {},
|
||||||
currentConfig: {},
|
currentConfig: {},
|
||||||
configs: []
|
configs: [],
|
||||||
|
condition: {},
|
||||||
|
isSearchBarQuery: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -34,6 +38,8 @@
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
this.condition = {};
|
||||||
|
|
||||||
this.getJarConfigs();
|
this.getJarConfigs();
|
||||||
listenGoBack(this.close);
|
listenGoBack(this.close);
|
||||||
},
|
},
|
||||||
|
@ -54,8 +60,11 @@
|
||||||
this.getJarConfigs();
|
this.getJarConfigs();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getJarConfigs(condition) {
|
getJarConfigs(isSearchBarQuery) {
|
||||||
this.result = this.$post("/jar/list", {name: condition}, response => {
|
if (isSearchBarQuery) {
|
||||||
|
this.isSearchBarQuery = isSearchBarQuery;
|
||||||
|
}
|
||||||
|
this.result = this.$post("/jar/list", this.condition, response => {
|
||||||
this.configs = response.data;
|
this.configs = response.data;
|
||||||
this.currentConfig = {};
|
this.currentConfig = {};
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<el-input class="jar-header-search"
|
<el-input class="jar-header-search"
|
||||||
v-model="searchCondition"
|
v-model="condition.name"
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
@keyup.enter.native="search"
|
@blur="search"
|
||||||
:placeholder="$t('project.search_by_name_jar')" clearable/>
|
:placeholder="$t('project.search_by_name_jar')" clearable/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -19,19 +19,9 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
searchCondition: this.condition
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
inputCondition(value) {
|
|
||||||
this.searchCondition = value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
search() {
|
search() {
|
||||||
this.$emit('refresh', this.searchCondition);
|
this.$emit('search', true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,13 +93,15 @@ import MsTablePagination from "../../common/pagination/TablePagination";
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsPerformanceReportStatus from "./PerformanceReportStatus";
|
import MsPerformanceReportStatus from "./PerformanceReportStatus";
|
||||||
import {_filter, _sort, getCurrentProjectID} from "../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../common/js/utils";
|
||||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||||
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
import ReportTriggerModeItem from "../../common/tableItem/ReportTriggerModeItem";
|
||||||
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
import {REPORT_CONFIGS} from "../../common/components/search/search-components";
|
||||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||||
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
||||||
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../track/case/components/ShowMoreBtn";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PerformanceTestReport",
|
name: "PerformanceTestReport",
|
||||||
|
|
|
@ -89,11 +89,12 @@ import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsPerformanceTestStatus from "./PerformanceTestStatus";
|
import MsPerformanceTestStatus from "./PerformanceTestStatus";
|
||||||
import MsTableOperators from "../../common/components/MsTableOperators";
|
import MsTableOperators from "../../common/components/MsTableOperators";
|
||||||
import {_filter, _sort, getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||||
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
import {TEST_CONFIGS} from "../../common/components/search/search-components";
|
||||||
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
||||||
import {WORKSPACE_ID} from "@/common/js/constants";
|
import {WORKSPACE_ID} from "@/common/js/constants";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -128,7 +128,7 @@ export default {
|
||||||
components: {MsTableOperatorButton},
|
components: {MsTableOperatorButton},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
timeout: 2000,
|
timeout: 60000,
|
||||||
responseTimeout: null,
|
responseTimeout: null,
|
||||||
statusCode: [],
|
statusCode: [],
|
||||||
domains: [],
|
domains: [],
|
||||||
|
|
|
@ -92,23 +92,25 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsCreateBox from "../CreateBox";
|
import MsCreateBox from "../CreateBox";
|
||||||
import {Message} from "element-ui";
|
import {Message} from "element-ui";
|
||||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||||
import MsTableOperator from "../../common/components/MsTableOperator";
|
import MsTableOperator from "../../common/components/MsTableOperator";
|
||||||
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
||||||
import {_sort, getCurrentProjectID, getCurrentUser, listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
import {getCurrentProjectID, getCurrentUser, listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||||
import MsContainer from "../../common/components/MsContainer";
|
import MsContainer from "../../common/components/MsContainer";
|
||||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||||
import MsDeleteConfirm from "../../common/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "../../common/components/MsDeleteConfirm";
|
||||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||||
import ApiEnvironmentConfig from "../../api/test/components/ApiEnvironmentConfig";
|
import ApiEnvironmentConfig from "../../api/test/components/ApiEnvironmentConfig";
|
||||||
import TemplateComponent from "../../track/plan/view/comonents/report/TemplateComponent/TemplateComponent";
|
import TemplateComponent from "../../track/plan/view/comonents/report/TemplateComponent/TemplateComponent";
|
||||||
import {PROJECT_ID} from "@/common/js/constants";
|
import {PROJECT_ID} from "@/common/js/constants";
|
||||||
import MsJarConfig from "../../api/test/components/jar/JarConfig";
|
import MsJarConfig from "../../api/test/components/jar/JarConfig";
|
||||||
import MsTableButton from "../../common/components/MsTableButton";
|
import MsTableButton from "../../common/components/MsTableButton";
|
||||||
export default {
|
import {_sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
export default {
|
||||||
name: "MsProject",
|
name: "MsProject",
|
||||||
components: {
|
components: {
|
||||||
MsTableButton,
|
MsTableButton,
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="right"
|
<el-table-column
|
||||||
:label="$t('commons.operating')" min-width="150">
|
:label="$t('commons.operating')" min-width="150">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<ms-table-operator :is-tester-permission="true" @editClick="handleEdit(scope.row)"
|
<ms-table-operator :is-tester-permission="true" @editClick="handleEdit(scope.row)"
|
||||||
|
@ -187,7 +187,6 @@ import MethodTableItem from "../../common/tableItems/planview/MethodTableItem";
|
||||||
import MsTableOperator from "../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../common/components/MsTableOperator";
|
||||||
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
||||||
import MsTableButton from "../../../common/components/MsTableButton";
|
import MsTableButton from "../../../common/components/MsTableButton";
|
||||||
import {_filter, _sort} from "@/common/js/utils";
|
|
||||||
import {TEST_CASE_CONFIGS} from "../../../common/components/search/search-components";
|
import {TEST_CASE_CONFIGS} from "../../../common/components/search/search-components";
|
||||||
import ShowMoreBtn from "./ShowMoreBtn";
|
import ShowMoreBtn from "./ShowMoreBtn";
|
||||||
import BatchEdit from "./BatchEdit";
|
import BatchEdit from "./BatchEdit";
|
||||||
|
@ -198,7 +197,15 @@ import TestCaseDetail from "./TestCaseDetail";
|
||||||
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
||||||
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||||
import MsTag from "@/business/components/common/components/MsTag";
|
import MsTag from "@/business/components/common/components/MsTag";
|
||||||
import {_handleSelect, _handleSelectAll} from "../../../../../common/js/tableUtils";
|
import {
|
||||||
|
_filter,
|
||||||
|
_handleSelect,
|
||||||
|
_handleSelectAll,
|
||||||
|
_sort,
|
||||||
|
getSelectDataCounts,
|
||||||
|
setUnSelectIds,
|
||||||
|
toggleAllSelection
|
||||||
|
} from "@/common/js/tableUtils";
|
||||||
import BatchMove from "./BatchMove";
|
import BatchMove from "./BatchMove";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -432,13 +439,14 @@ export default {
|
||||||
},
|
},
|
||||||
handleSelectAll(selection) {
|
handleSelectAll(selection) {
|
||||||
_handleSelectAll(this, selection, this.tableData, this.selectRows);
|
_handleSelectAll(this, selection, this.tableData, this.selectRows);
|
||||||
this.setUnSelectIds();
|
setUnSelectIds(this.tableData, this.condition, this.selectRows);
|
||||||
|
this.selectDataCounts = getSelectDataCounts(this.condition, this.total, this.selectRows);
|
||||||
},
|
},
|
||||||
handleSelect(selection, row) {
|
handleSelect(selection, row) {
|
||||||
_handleSelect(this, selection, row, this.selectRows);
|
_handleSelect(this, selection, row, this.selectRows);
|
||||||
this.setUnSelectIds();
|
setUnSelectIds(this.tableData, this.condition, this.selectRows);
|
||||||
|
this.selectDataCounts = getSelectDataCounts(this.condition, this.total, this.selectRows);
|
||||||
},
|
},
|
||||||
|
|
||||||
importTestCase() {
|
importTestCase() {
|
||||||
if (!getCurrentProjectID()) {
|
if (!getCurrentProjectID()) {
|
||||||
this.$warning(this.$t('commons.check_project_tip'));
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
@ -545,23 +553,9 @@ export default {
|
||||||
},
|
},
|
||||||
isSelectDataAll(data) {
|
isSelectDataAll(data) {
|
||||||
this.condition.selectAll = data;
|
this.condition.selectAll = data;
|
||||||
this.setUnSelectIds();
|
setUnSelectIds(this.tableData, this.condition, this.selectRows);
|
||||||
//如果已经全选,不需要再操作了
|
this.selectDataCounts = getSelectDataCounts(this.condition, this.total, this.selectRows);
|
||||||
if (this.selectRows.size != this.tableData.length) {
|
toggleAllSelection(this.$refs.table, this.tableData, this.selectRows);
|
||||||
this.$refs.table.toggleAllSelection(true);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setUnSelectIds() {
|
|
||||||
let ids = Array.from(this.selectRows).map(o => o.id);
|
|
||||||
let allIDs = this.tableData.map(o => o.id);
|
|
||||||
this.condition.unSelectIds = allIDs.filter(function (val) {
|
|
||||||
return ids.indexOf(val) === -1
|
|
||||||
});
|
|
||||||
if (this.condition.selectAll) {
|
|
||||||
this.selectDataCounts = this.total - this.condition.unSelectIds.length;
|
|
||||||
} else {
|
|
||||||
this.selectDataCounts = this.selectRows.size;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
headerDragend(newWidth,oldWidth,column,event){
|
headerDragend(newWidth,oldWidth,column,event){
|
||||||
let finalWidth = newWidth;
|
let finalWidth = newWidth;
|
||||||
|
|
|
@ -158,7 +158,7 @@ import MsTableOperatorButton from "../../../common/components/MsTableOperatorBut
|
||||||
import MsTableOperator from "../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../common/components/MsTableOperator";
|
||||||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||||
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
import {checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
||||||
import TestReportTemplateList from "../view/comonents/TestReportTemplateList";
|
import TestReportTemplateList from "../view/comonents/TestReportTemplateList";
|
||||||
import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
|
import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
|
||||||
import MsDeleteConfirm from "../../../common/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "../../../common/components/MsDeleteConfirm";
|
||||||
|
@ -166,6 +166,8 @@ import {TEST_PLAN_CONFIGS} from "../../../common/components/search/search-compon
|
||||||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
||||||
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||||
import MsScheduleMaintain from "@/business/components/api/automation/schedule/ScheduleMaintain"
|
import MsScheduleMaintain from "@/business/components/api/automation/schedule/ScheduleMaintain"
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanList",
|
name: "TestPlanList",
|
||||||
|
|
|
@ -132,13 +132,15 @@ import {API_METHOD_COLOUR, CASE_PRIORITY, RESULT_MAP} from "../../../../../api/d
|
||||||
import {getCurrentProjectID} from "@/common/js/utils";
|
import {getCurrentProjectID} from "@/common/js/utils";
|
||||||
import ApiListContainer from "../../../../../api/definition/components/list/ApiListContainer";
|
import ApiListContainer from "../../../../../api/definition/components/list/ApiListContainer";
|
||||||
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
||||||
import {_filter, _sort, getBodyUploadFiles, getUUID} from "../../../../../../../common/js/utils";
|
import {getBodyUploadFiles, getUUID} from "../../../../../../../common/js/utils";
|
||||||
import TestPlanCaseListHeader from "./TestPlanCaseListHeader";
|
import TestPlanCaseListHeader from "./TestPlanCaseListHeader";
|
||||||
import MsRun from "../../../../../api/definition/components/Run";
|
import MsRun from "../../../../../api/definition/components/Run";
|
||||||
import TestPlanApiCaseResult from "./TestPlanApiCaseResult";
|
import TestPlanApiCaseResult from "./TestPlanApiCaseResult";
|
||||||
import TestPlan from "../../../../../api/definition/components/jmeter/components/test-plan";
|
import TestPlan from "../../../../../api/definition/components/jmeter/components/test-plan";
|
||||||
import ThreadGroup from "../../../../../api/definition/components/jmeter/components/thread-group";
|
import ThreadGroup from "../../../../../api/definition/components/jmeter/components/thread-group";
|
||||||
import {WORKSPACE_ID} from "@/common/js/constants";
|
import {WORKSPACE_ID} from "@/common/js/constants";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanApiCaseList",
|
name: "TestPlanApiCaseList",
|
||||||
|
|
|
@ -250,21 +250,21 @@ import MsTableButton from '../../../../../common/components/MsTableButton';
|
||||||
import NodeBreadcrumb from '../../../../common/NodeBreadcrumb';
|
import NodeBreadcrumb from '../../../../common/NodeBreadcrumb';
|
||||||
|
|
||||||
import {ROLE_TEST_MANAGER, ROLE_TEST_USER, TokenKey, WORKSPACE_ID} from "@/common/js/constants";
|
import {ROLE_TEST_MANAGER, ROLE_TEST_USER, TokenKey, WORKSPACE_ID} from "@/common/js/constants";
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser, hasRoles} from "@/common/js/utils";
|
import {checkoutTestManagerOrTestUser, hasRoles} from "@/common/js/utils";
|
||||||
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
||||||
import StatusTableItem from "../../../../common/tableItems/planview/StatusTableItem";
|
import StatusTableItem from "../../../../common/tableItems/planview/StatusTableItem";
|
||||||
import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem";
|
import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem";
|
||||||
import MethodTableItem from "../../../../common/tableItems/planview/MethodTableItem";
|
import MethodTableItem from "../../../../common/tableItems/planview/MethodTableItem";
|
||||||
import MsTableOperator from "../../../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../../../common/components/MsTableOperator";
|
||||||
import MsTableOperatorButton from "../../../../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../../../../common/components/MsTableOperatorButton";
|
||||||
import TestReportTemplateList from "../TestReportTemplateList";
|
|
||||||
import TestCaseReportView from "../report/TestCaseReportView";
|
|
||||||
import {TEST_CASE_CONFIGS} from "../../../../../common/components/search/search-components";
|
import {TEST_CASE_CONFIGS} from "../../../../../common/components/search/search-components";
|
||||||
import ShowMoreBtn from "../../../../case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../../../case/components/ShowMoreBtn";
|
||||||
import BatchEdit from "../../../../case/components/BatchEdit";
|
import BatchEdit from "../../../../case/components/BatchEdit";
|
||||||
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
||||||
import {hub} from "@/business/components/track/plan/event-bus";
|
import {hub} from "@/business/components/track/plan/event-bus";
|
||||||
import MsTag from "@/business/components/common/components/MsTag";
|
import MsTag from "@/business/components/common/components/MsTag";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "FunctionalTestCaseList",
|
name: "FunctionalTestCaseList",
|
||||||
|
|
|
@ -70,18 +70,19 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import NodeTree from '../../../../common/NodeTree';
|
import NodeTree from '../../../../common/NodeTree';
|
||||||
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../common/tableItems/planview/PriorityTableItem";
|
||||||
import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem";
|
import TypeTableItem from "../../../../common/tableItems/planview/TypeTableItem";
|
||||||
import MsTableSearchBar from "../../../../../common/components/MsTableSearchBar";
|
import MsTableSearchBar from "../../../../../common/components/MsTableSearchBar";
|
||||||
import MsTableAdvSearchBar from "../../../../../common/components/search/MsTableAdvSearchBar";
|
import MsTableAdvSearchBar from "../../../../../common/components/search/MsTableAdvSearchBar";
|
||||||
import MsTableHeader from "../../../../../common/components/MsTableHeader";
|
import MsTableHeader from "../../../../../common/components/MsTableHeader";
|
||||||
import {TEST_CASE_CONFIGS} from "../../../../../common/components/search/search-components";
|
import {TEST_CASE_CONFIGS} from "../../../../../common/components/search/search-components";
|
||||||
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
||||||
import TestCaseRelevanceBase from "../base/TestCaseRelevanceBase";
|
import TestCaseRelevanceBase from "../base/TestCaseRelevanceBase";
|
||||||
import {_filter} from "../../../../../../../common/js/utils";
|
import {_filter} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
|
||||||
|
export default {
|
||||||
name: "TestCaseFunctionalRelevance",
|
name: "TestCaseFunctionalRelevance",
|
||||||
components: {
|
components: {
|
||||||
TestCaseRelevanceBase,
|
TestCaseRelevanceBase,
|
||||||
|
|
|
@ -115,11 +115,11 @@
|
||||||
import TestPlanLoadCaseListHeader
|
import TestPlanLoadCaseListHeader
|
||||||
from "@/business/components/track/plan/view/comonents/load/TestPlanLoadCaseListHeader";
|
from "@/business/components/track/plan/view/comonents/load/TestPlanLoadCaseListHeader";
|
||||||
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
||||||
import {_filter, _sort} from "@/common/js/utils";
|
|
||||||
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
import MsTablePagination from "@/business/components/common/pagination/TablePagination";
|
||||||
import MsPerformanceTestStatus from "@/business/components/performance/test/PerformanceTestStatus";
|
import MsPerformanceTestStatus from "@/business/components/performance/test/PerformanceTestStatus";
|
||||||
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "@/business/components/common/components/MsTableOperatorButton";
|
||||||
import LoadCaseReport from "@/business/components/track/plan/view/comonents/load/LoadCaseReport";
|
import LoadCaseReport from "@/business/components/track/plan/view/comonents/load/LoadCaseReport";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanLoadCaseList",
|
name: "TestPlanLoadCaseList",
|
||||||
|
|
|
@ -64,7 +64,7 @@ import MsTablePagination from '../../../../components/common/pagination/TablePag
|
||||||
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
import MsTableHeader from "@/business/components/common/components/MsTableHeader";
|
||||||
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../../common/components/MsTableOperatorButton";
|
||||||
import MsTableOperator from "../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../common/components/MsTableOperator";
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
import {checkoutTestManagerOrTestUser} from "@/common/js/utils";
|
||||||
import {TEST_PLAN_REPORT_CONFIGS} from "../../../common/components/search/search-components";
|
import {TEST_PLAN_REPORT_CONFIGS} from "../../../common/components/search/search-components";
|
||||||
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||||
import TestPlanReportView from "@/business/components/track/report/components/TestPlanReportView";
|
import TestPlanReportView from "@/business/components/track/report/components/TestPlanReportView";
|
||||||
|
@ -72,14 +72,16 @@ import ReportTriggerModeItem from "@/business/components/common/tableItem/Report
|
||||||
import MsTag from "@/business/components/common/components/MsTag";
|
import MsTag from "@/business/components/common/components/MsTag";
|
||||||
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "@/business/components/track/case/components/ShowMoreBtn";
|
||||||
import MsTableSelectAll from "@/business/components/common/components/table/MsTableSelectAll";
|
import MsTableSelectAll from "@/business/components/common/components/table/MsTableSelectAll";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanReportList",
|
name: "TestPlanReportList",
|
||||||
components: {
|
components: {
|
||||||
TestPlanReportView,
|
TestPlanReportView,
|
||||||
MsTableOperator, MsTableOperatorButton, MsTableHeader, MsTablePagination,
|
MsTableOperator, MsTableOperatorButton, MsTableHeader, MsTablePagination,
|
||||||
ReportTriggerModeItem,MsTag,
|
ReportTriggerModeItem, MsTag,
|
||||||
ShowMoreBtn,MsTableSelectAll,
|
ShowMoreBtn, MsTableSelectAll,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -88,12 +88,11 @@ import MsTableHeader from "../../../common/components/MsTableHeader";
|
||||||
import MsCreateBox from "../../../settings/CreateBox";
|
import MsCreateBox from "../../../settings/CreateBox";
|
||||||
import MsTablePagination from "../../../common/pagination/TablePagination";
|
import MsTablePagination from "../../../common/pagination/TablePagination";
|
||||||
import {
|
import {
|
||||||
_filter,
|
|
||||||
_sort,
|
|
||||||
checkoutTestManagerOrTestUser,
|
checkoutTestManagerOrTestUser,
|
||||||
getCurrentProjectID,
|
getCurrentProjectID,
|
||||||
getCurrentWorkspaceId
|
getCurrentWorkspaceId
|
||||||
} from "../../../../../common/js/utils";
|
} from "../../../../../common/js/utils";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -94,21 +94,22 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import NodeTree from "../../../common/NodeTree";
|
import NodeTree from "../../../common/NodeTree";
|
||||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||||
import PriorityTableItem from "../../../common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../common/tableItems/planview/PriorityTableItem";
|
||||||
import TypeTableItem from "../../../common/tableItems/planview/TypeTableItem";
|
import TypeTableItem from "../../../common/tableItems/planview/TypeTableItem";
|
||||||
import MsTableSearchBar from "../../../../common/components/MsTableSearchBar";
|
import MsTableSearchBar from "../../../../common/components/MsTableSearchBar";
|
||||||
import MsTableAdvSearchBar from "../../../../common/components/search/MsTableAdvSearchBar";
|
import MsTableAdvSearchBar from "../../../../common/components/search/MsTableAdvSearchBar";
|
||||||
import MsTableHeader from "../../../../common/components/MsTableHeader";
|
import MsTableHeader from "../../../../common/components/MsTableHeader";
|
||||||
import SwitchProject from "../../../case/components/SwitchProject";
|
import SwitchProject from "../../../case/components/SwitchProject";
|
||||||
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
|
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
|
||||||
import {_filter} from "../../../../../../common/js/utils";
|
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
||||||
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
||||||
import elTableInfiniteScroll from 'el-table-infinite-scroll';
|
import SelectMenu from "../../../common/SelectMenu";
|
||||||
import SelectMenu from "../../../common/SelectMenu";
|
import {_filter} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
|
||||||
|
export default {
|
||||||
name: "TestReviewRelevance",
|
name: "TestReviewRelevance",
|
||||||
components: {
|
components: {
|
||||||
SelectMenu,
|
SelectMenu,
|
||||||
|
|
|
@ -169,11 +169,12 @@ import MsTableButton from "../../../../common/components/MsTableButton";
|
||||||
import ShowMoreBtn from "../../../case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../../case/components/ShowMoreBtn";
|
||||||
import BatchEdit from "../../../case/components/BatchEdit";
|
import BatchEdit from "../../../case/components/BatchEdit";
|
||||||
import MsTablePagination from '../../../../common/pagination/TablePagination';
|
import MsTablePagination from '../../../../common/pagination/TablePagination';
|
||||||
import {_filter, _sort, checkoutTestManagerOrTestUser, hasRoles} from "../../../../../../common/js/utils";
|
import {checkoutTestManagerOrTestUser, hasRoles} from "../../../../../../common/js/utils";
|
||||||
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
|
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
|
||||||
import {ROLE_TEST_MANAGER, ROLE_TEST_USER} from "../../../../../../common/js/constants";
|
import {ROLE_TEST_MANAGER, ROLE_TEST_USER} from "../../../../../../common/js/constants";
|
||||||
import TestReviewTestCaseEdit from "./TestReviewTestCaseEdit";
|
import TestReviewTestCaseEdit from "./TestReviewTestCaseEdit";
|
||||||
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
import ReviewStatus from "@/business/components/track/case/components/ReviewStatus";
|
||||||
|
import {_filter, _sort} from "@/common/js/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestReviewTestCaseList",
|
name: "TestReviewTestCaseList",
|
||||||
|
@ -264,9 +265,7 @@ export default {
|
||||||
if (this.reviewId) {
|
if (this.reviewId) {
|
||||||
this.condition.reviewId = this.reviewId;
|
this.condition.reviewId = this.reviewId;
|
||||||
}
|
}
|
||||||
if (this.selectNodeIds && this.selectNodeIds.length > 0) {
|
|
||||||
this.condition.nodeIds = this.selectNodeIds;
|
this.condition.nodeIds = this.selectNodeIds;
|
||||||
}
|
|
||||||
if (this.reviewId) {
|
if (this.reviewId) {
|
||||||
this.result = this.$post(this.buildPagePath('/test/review/case/list'), this.condition, response => {
|
this.result = this.$post(this.buildPagePath('/test/review/case/list'), this.condition, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import {humpToLine} from "@/common/js/utils";
|
||||||
|
|
||||||
export function _handleSelectAll(component, selection, tableData, selectRows) {
|
export function _handleSelectAll(component, selection, tableData, selectRows) {
|
||||||
if (selection.length > 0) {
|
if (selection.length > 0) {
|
||||||
|
@ -33,3 +34,73 @@ export function _handleSelect(component, selection, row, selectRows) {
|
||||||
component.$set(row, "showMore", true);
|
component.$set(row, "showMore", true);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 设置 unSelectIds 查询条件,返回当前选中的条数
|
||||||
|
export function setUnSelectIds(tableData, condition, selectRows) {
|
||||||
|
let ids = Array.from(selectRows).map(o => o.id);
|
||||||
|
let allIDs = tableData.map(o => o.id);
|
||||||
|
condition.unSelectIds = allIDs.filter(function (val) {
|
||||||
|
return ids.indexOf(val) === -1
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getSelectDataCounts(condition, total, selectRows) {
|
||||||
|
if (condition.selectAll) {
|
||||||
|
return total - condition.unSelectIds.length;
|
||||||
|
} else {
|
||||||
|
return selectRows.size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 全选操作
|
||||||
|
export function toggleAllSelection(table, tableData, selectRows) {
|
||||||
|
//如果已经全选,不需要再操作了
|
||||||
|
if (selectRows.size != tableData.length) {
|
||||||
|
table.toggleAllSelection(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//表格数据过滤
|
||||||
|
export function _filter(filters, condition) {
|
||||||
|
if (!condition.filters) {
|
||||||
|
condition.filters = {};
|
||||||
|
}
|
||||||
|
for (let filter in filters) {
|
||||||
|
if (filters.hasOwnProperty(filter)) {
|
||||||
|
if (filters[filter] && filters[filter].length > 0) {
|
||||||
|
condition.filters[humpToLine(filter)] = filters[filter];
|
||||||
|
} else {
|
||||||
|
condition.filters[humpToLine(filter)] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//表格数据排序
|
||||||
|
export function _sort(column, condition) {
|
||||||
|
column.prop = humpToLine(column.prop);
|
||||||
|
if (column.order === 'descending') {
|
||||||
|
column.order = 'desc';
|
||||||
|
} else {
|
||||||
|
column.order = 'asc';
|
||||||
|
}
|
||||||
|
if (!condition.orders) {
|
||||||
|
condition.orders = [];
|
||||||
|
}
|
||||||
|
let hasProp = false;
|
||||||
|
condition.orders.forEach(order => {
|
||||||
|
if (order.name === column.prop) {
|
||||||
|
order.type = column.order;
|
||||||
|
hasProp = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!hasProp) {
|
||||||
|
condition.orders.push({name: column.prop, type: column.order});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {
|
import {
|
||||||
LicenseKey,
|
LicenseKey,
|
||||||
|
PROJECT_ID,
|
||||||
REFRESH_SESSION_USER_URL,
|
REFRESH_SESSION_USER_URL,
|
||||||
ROLE_ADMIN,
|
ROLE_ADMIN,
|
||||||
ROLE_ORG_ADMIN,
|
ROLE_ORG_ADMIN,
|
||||||
ROLE_TEST_MANAGER,
|
ROLE_TEST_MANAGER,
|
||||||
ROLE_TEST_USER,
|
ROLE_TEST_USER,
|
||||||
ROLE_TEST_VIEWER,
|
ROLE_TEST_VIEWER,
|
||||||
TokenKey,
|
TokenKey
|
||||||
PROJECT_ID
|
|
||||||
} from "./constants";
|
} from "./constants";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import {jsPDF} from "jspdf";
|
import {jsPDF} from "jspdf";
|
||||||
|
@ -138,45 +138,6 @@ export function humpToLine(name) {
|
||||||
return name.replace(/([A-Z])/g, "_$1").toLowerCase();
|
return name.replace(/([A-Z])/g, "_$1").toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
//表格数据过滤
|
|
||||||
export function _filter(filters, condition) {
|
|
||||||
if (!condition.filters) {
|
|
||||||
condition.filters = {};
|
|
||||||
}
|
|
||||||
for (let filter in filters) {
|
|
||||||
if (filters.hasOwnProperty(filter)) {
|
|
||||||
if (filters[filter] && filters[filter].length > 0) {
|
|
||||||
condition.filters[humpToLine(filter)] = filters[filter];
|
|
||||||
} else {
|
|
||||||
condition.filters[humpToLine(filter)] = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//表格数据排序
|
|
||||||
export function _sort(column, condition) {
|
|
||||||
column.prop = humpToLine(column.prop);
|
|
||||||
if (column.order === 'descending') {
|
|
||||||
column.order = 'desc';
|
|
||||||
} else {
|
|
||||||
column.order = 'asc';
|
|
||||||
}
|
|
||||||
if (!condition.orders) {
|
|
||||||
condition.orders = [];
|
|
||||||
}
|
|
||||||
let hasProp = false;
|
|
||||||
condition.orders.forEach(order => {
|
|
||||||
if (order.name === column.prop) {
|
|
||||||
order.type = column.order;
|
|
||||||
hasProp = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (!hasProp) {
|
|
||||||
condition.orders.push({name: column.prop, type: column.order});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function downloadFile(name, content) {
|
export function downloadFile(name, content) {
|
||||||
const blob = new Blob([content]);
|
const blob = new Blob([content]);
|
||||||
if ("download" in document.createElement("a")) {
|
if ("download" in document.createElement("a")) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
export default {
|
export default {
|
||||||
commons: {
|
commons: {
|
||||||
cover:'Cover',
|
cover: 'Cover',
|
||||||
not_cover:'Not Cover',
|
not_cover: 'Not Cover',
|
||||||
import_mode: 'Import mode',
|
import_mode: 'Import mode',
|
||||||
import_module: 'Import module',
|
import_module: 'Import module',
|
||||||
please_fill_in_the_template: 'Please fill in the template',
|
please_fill_in_the_template: 'Please fill in the template',
|
||||||
|
@ -537,12 +537,12 @@ export default {
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
grade_info: "Filter by rank",
|
grade_info: "Filter by rank",
|
||||||
grade_order_asc: "from high to low by use case level",
|
grade_order_asc: "from low to high by use case level",
|
||||||
grade_order_desc: "from low to high by use case level,",
|
grade_order_desc: "from high to low by use case level",
|
||||||
create_time_order_asc: "by creation time from front to back",
|
create_time_order_asc: "by creation time from front to back",
|
||||||
create_time_order_desc: "from back to front by creation time,",
|
create_time_order_desc: "from back to front by creation time",
|
||||||
update_time_order_asc: "by update time from front to back",
|
update_time_order_asc: "by update time from front to back",
|
||||||
update_time_order_desc: "from back to front by update time,",
|
update_time_order_desc: "from back to front by update time",
|
||||||
run_env: "Operating environment",
|
run_env: "Operating environment",
|
||||||
select_case: "Search use cases",
|
select_case: "Search use cases",
|
||||||
case: "Case",
|
case: "Case",
|
||||||
|
@ -589,7 +589,7 @@ export default {
|
||||||
create_info: 'Create',
|
create_info: 'Create',
|
||||||
update_info: 'Update',
|
update_info: 'Update',
|
||||||
batch_edit: "Batch edit",
|
batch_edit: "Batch edit",
|
||||||
batch_move:"Batch move",
|
batch_move: "Batch move",
|
||||||
path_valid_info: "The request path is invalid",
|
path_valid_info: "The request path is invalid",
|
||||||
other_config: "Other Config",
|
other_config: "Other Config",
|
||||||
message_template: "Message Template",
|
message_template: "Message Template",
|
||||||
|
|
|
@ -537,8 +537,8 @@ export default {
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
grade_info: "按等级筛选",
|
grade_info: "按等级筛选",
|
||||||
grade_order_asc: "按用例等级从高到低",
|
grade_order_asc: "按用例等级从低到高",
|
||||||
grade_order_desc: "按用例等级从低到高",
|
grade_order_desc: "按用例等级从高到低",
|
||||||
create_time_order_asc: "按创建时间从前到后",
|
create_time_order_asc: "按创建时间从前到后",
|
||||||
create_time_order_desc: "按创建时间从后到前",
|
create_time_order_desc: "按创建时间从后到前",
|
||||||
update_time_order_asc: "按更新时间从前到后",
|
update_time_order_asc: "按更新时间从前到后",
|
||||||
|
|
|
@ -536,8 +536,8 @@ export default {
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
grade_info: "按等級篩選",
|
grade_info: "按等級篩選",
|
||||||
grade_order_asc: "按用例等級從高到低",
|
grade_order_asc: "按用例等級從低到高",
|
||||||
grade_order_desc: "按用例等級從低到高",
|
grade_order_desc: "按用例等級從高到低",
|
||||||
create_time_order_asc: "按創建時間從前到後",
|
create_time_order_asc: "按創建時間從前到後",
|
||||||
create_time_order_desc: "按創建時間從後到前",
|
create_time_order_desc: "按創建時間從後到前",
|
||||||
update_time_order_asc: "按更新時間從前到後",
|
update_time_order_asc: "按更新時間從前到後",
|
||||||
|
|
Loading…
Reference in New Issue