|
@@ -1,7 +1,7 @@
|
|
|
<script setup>
|
|
|
import moduleDialog from "@/views//modules/project-config/components/test-module-dialog.vue";
|
|
|
import TitleHeader from "@/views/modules/project-config/com/titleHeader.vue";
|
|
|
-import { delTestModule } from "@/api/project";
|
|
|
+import { copyProject, delTestModule } from "@/api/project";
|
|
|
import { useCommonStoreHook } from "@/store";
|
|
|
import { getProjectById, getTestProjectList } from "@/api/project/index";
|
|
|
const { currentTestItemId } = toRefs(useCommonStoreHook());
|
|
@@ -72,6 +72,15 @@ const confirmEvent = () => {
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+// 复制项目
|
|
|
+const toCopyProject = async () => {
|
|
|
+ if (currentTestItemId.value) {
|
|
|
+ await copyProject(currentTestItemId.value);
|
|
|
+ ElMessage.success("复制成功");
|
|
|
+ toGetTestProjectList();
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -106,6 +115,9 @@ const confirmEvent = () => {
|
|
|
<div class="project-test-btn">
|
|
|
<div class="name">测试项目</div>
|
|
|
<div class="btn">
|
|
|
+ <span class="edit" @click="toCopyProject">
|
|
|
+ <svg-icon icon-class="download" />
|
|
|
+ </span>
|
|
|
<el-popconfirm
|
|
|
width="220"
|
|
|
confirm-button-text="确认"
|
|
@@ -122,6 +134,7 @@ const confirmEvent = () => {
|
|
|
<span class="edit" @click="addProject">
|
|
|
<svg-icon icon-class="addHao" />
|
|
|
</span>
|
|
|
+
|
|
|
<span class="edit" @click="editProject">
|
|
|
<svg-icon icon-class="homeIcon2" />
|
|
|
</span>
|
|
@@ -234,7 +247,9 @@ const confirmEvent = () => {
|
|
|
height: 36px;
|
|
|
line-height: 36px;
|
|
|
text-align: center;
|
|
|
-
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
border-radius: 4px 4px 4px 4px;
|
|
|
border: 1px solid #3b7cff;
|
|
|
}
|