diff --git a/frontend/src/business/components/api/automation/ApiAutomation.vue b/frontend/src/business/components/api/automation/ApiAutomation.vue
index 2979c5140c..921ab5f536 100644
--- a/frontend/src/business/components/api/automation/ApiAutomation.vue
+++ b/frontend/src/business/components/api/automation/ApiAutomation.vue
@@ -25,6 +25,7 @@
:trash-enable="trashEnable"
:checkRedirectID="checkRedirectID"
:isRedirectEdit="isRedirectEdit"
+ :is-read-only="isReadOnly"
@openScenario="editScenario"
@edit="editScenario"
@changeSelectDataRangeAll="changeSelectDataRangeAll"
@@ -66,7 +67,7 @@
import MsAsideContainer from "@/business/components/common/components/MsAsideContainer";
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
import MsApiScenarioList from "@/business/components/api/automation/scenario/ApiScenarioList";
- import {getUUID, downloadFile} from "@/common/js/utils";
+ import {getUUID, downloadFile, checkoutTestManagerOrTestUser} from "@/common/js/utils";
import MsApiScenarioModule from "@/business/components/api/automation/scenario/ApiScenarioModule";
import MsEditApiScenario from "./scenario/EditApiScenario";
import {getCurrentProjectID} from "../../../../common/js/utils";
@@ -92,6 +93,9 @@
let redirectParam = this.$route.params.dataSelectRange;
this.checkRedirectEditPage(redirectParam);
return redirectParam;
+ },
+ isReadOnly(){
+ return !checkoutTestManagerOrTestUser();
}
},
data() {
diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue
index 629d56bafa..345a94dfb5 100644
--- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue
+++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue
@@ -24,7 +24,7 @@
-
+
@@ -33,7 +33,8 @@
min-width="120px"
show-overflow-tooltip :key="index">
-
+ {{ scope.row.num }}
+
{{ scope.row.num }}
@@ -107,7 +108,7 @@
min-width="120px"
show-overflow-tooltip :key="index"/>
-
+
@@ -232,6 +233,11 @@
default() {
return []
},
+ },
+ //用于判断是否是只读用户
+ isReadOnly: {
+ type: Boolean,
+ default: false,
}
},
data() {
diff --git a/frontend/src/business/components/api/definition/ApiDefinition.vue b/frontend/src/business/components/api/definition/ApiDefinition.vue
index 426b2c1087..a23ddf060e 100644
--- a/frontend/src/business/components/api/definition/ApiDefinition.vue
+++ b/frontend/src/business/components/api/definition/ApiDefinition.vue
@@ -46,6 +46,7 @@
:trash-enable="trashEnable"
:queryDataType="queryDataType"
:selectDataRange="selectDataRange"
+ :is-read-only="isReadOnly"
@changeSelectDataRangeAll="changeSelectDataRangeAll"
@editApi="editApi"
@handleCase="handleCase"
@@ -60,6 +61,7 @@
:select-node-ids="selectNodeIds"
:trash-enable="trashEnable"
:queryDataType="queryDataType"
+ :is-read-only="isReadOnly"
@changeSelectDataRangeAll="changeSelectDataRangeAll"
@handleCase="handleCase"
@showExecResult="showExecResult"
@@ -138,7 +140,7 @@ import MsRunTestHttpPage from "./components/runtest/RunTestHTTPPage";
import MsRunTestTcpPage from "./components/runtest/RunTestTCPPage";
import MsRunTestSqlPage from "./components/runtest/RunTestSQLPage";
import MsRunTestDubboPage from "./components/runtest/RunTestDubboPage";
-import {getCurrentProjectID, getCurrentUser, getUUID} from "@/common/js/utils";
+import {checkoutTestManagerOrTestUser, getCurrentProjectID, getCurrentUser, getUUID} from "@/common/js/utils";
import MsApiModule from "./components/module/ApiModule";
import ApiCaseSimpleList from "./components/list/ApiCaseSimpleList";
@@ -155,6 +157,9 @@ import MsTabButton from "@/business/components/common/components/MsTabButton";
this.changeRedirectParam(redirectIDParam);
return routeParam;
},
+ isReadOnly(){
+ return !checkoutTestManagerOrTestUser();
+ }
},
components: {
MsTabButton,
diff --git a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
index d5f40be7e4..10bf52c654 100644
--- a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
+++ b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
@@ -26,14 +26,17 @@
-
+
+
-
+
+ {{ scope.row.num }}
+
{{ scope.row.num }}
diff --git a/frontend/src/business/components/api/definition/components/list/ApiList.vue b/frontend/src/business/components/api/definition/components/list/ApiList.vue
index 08084e6ab6..0246dc15d8 100644
--- a/frontend/src/business/components/api/definition/components/list/ApiList.vue
+++ b/frontend/src/business/components/api/definition/components/list/ApiList.vue
@@ -27,7 +27,8 @@
-
+
+
@@ -40,9 +41,11 @@
sortable="custom"
:key="index">
-
+
+ {{ scope.row.num }}
+
{{ scope.row.num }}
-
+
-
+
@@ -168,6 +171,7 @@
:tip="$t('api_test.automation.execute')"
icon="el-icon-video-play"
@exec="runApi(scope.row)"/>
+
case
@@ -218,7 +223,7 @@ import MsBottomContainer from "../BottomContainer";
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
import MsBatchEdit from "../basis/BatchEdit";
import {API_METHOD_COLOUR, API_STATUS, DUBBO_METHOD, REQ_METHOD, SQL_METHOD, TCP_METHOD} from "../../model/JsonData";
-import {downloadFile, getUUID} from "@/common/js/utils";
+import {checkoutTestManagerOrTestUser, downloadFile, getUUID} from "@/common/js/utils";
import {PROJECT_NAME} from '@/common/js/constants';
import {getCurrentProjectID, getCurrentUser} from "@/common/js/utils";
import {API_LIST, TEST_CASE_LIST, WORKSPACE_ID} from '@/common/js/constants';
diff --git a/frontend/src/business/components/api/homepage/components/RunningTaskList.vue b/frontend/src/business/components/api/homepage/components/RunningTaskList.vue
index 6381e79068..10838db102 100644
--- a/frontend/src/business/components/api/homepage/components/RunningTaskList.vue
+++ b/frontend/src/business/components/api/homepage/components/RunningTaskList.vue
@@ -9,7 +9,11 @@
-
+
+
+ {{ row.name }}
+
+
{{ row.name }}
@@ -25,9 +29,10 @@
@@ -51,7 +56,7 @@