diff --git a/project-management/frontend/src/api/template.js b/project-management/frontend/src/api/template.js index 72e4def8cd..d41924ef15 100644 --- a/project-management/frontend/src/api/template.js +++ b/project-management/frontend/src/api/template.js @@ -55,3 +55,11 @@ export function deleteApiFieldTemplateById(id) { export function getFieldTemplateApiOption(projectId) { return get(`/field/template/api/option/${projectId}`); } + +export function getIssueTemplateCopyProject(userId, workspaceId) { + return get(`/field/template/issue/get/copy/project/` + userId + `/` + workspaceId); +} + +export function copyIssueTemplate(param) { + return post(`/field/template/issue/copy`, param); +} diff --git a/project-management/frontend/src/business/menu/log/config.js b/project-management/frontend/src/business/menu/log/config.js index 4cda802753..25af7757ba 100644 --- a/project-management/frontend/src/business/menu/log/config.js +++ b/project-management/frontend/src/business/menu/log/config.js @@ -85,6 +85,7 @@ export function LOG_MODULE_MAP(_this) { ['PROJECT_ENVIRONMENT_SETTING', _this.$t('operating_log.project_environment_setting')], ['PROJECT_PROJECT_MANAGER', _this.$t('operating_log.project_project_manager')], ['PROJECT_FILE_MANAGEMENT', _this.$t('operating_log.project_file_management')], + ['PROJECT_TEMPLATE_MANAGEMENT', _this.$t('operating_log.project_template_management')], ['PROJECT_PROJECT_MEMBER', _this.$t('operating_log.project_project_member')], ['PERSONAL_INFORMATION_PERSONAL_SETTINGS', _this.$t('operating_log.personal_information_personal_settings')], ['PERSONAL_INFORMATION_APIKEYS', _this.$t('operating_log.personal_information_apikeys')], diff --git a/project-management/frontend/src/business/menu/template/IssueTemplateCopy.vue b/project-management/frontend/src/business/menu/template/IssueTemplateCopy.vue new file mode 100644 index 0000000000..92ac0aa338 --- /dev/null +++ b/project-management/frontend/src/business/menu/template/IssueTemplateCopy.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/project-management/frontend/src/business/menu/template/IssuesTemplateList.vue b/project-management/frontend/src/business/menu/template/IssuesTemplateList.vue index 7eadf963cd..a412422919 100644 --- a/project-management/frontend/src/business/menu/template/IssuesTemplateList.vue +++ b/project-management/frontend/src/business/menu/template/IssuesTemplateList.vue @@ -75,6 +75,7 @@ :page-size.sync="pageSize" :total="total"/> + @@ -93,11 +94,13 @@ import MsTable from "metersphere-frontend/src/components/table/MsTable"; import IssueTemplateEdit from "./IssueTemplateEdit"; import {deleteIssueFieldTemplateById, getIssueFieldTemplatePages} from "../../../api/template"; import MsDeleteConfirm from "metersphere-frontend/src/components/MsDeleteConfirm"; +import IssueTemplateCopy from "./IssueTemplateCopy"; export default { name: "IssuesTemplateList", components: { IssueTemplateEdit, + IssueTemplateCopy, MsTableHeader, MsTablePagination, MsTableButton, MsTableOperators, MsTableColumn, MsTable , MsDeleteConfirm }, @@ -123,12 +126,10 @@ export default { exec: this.handleEdit }, { tip: this.$t('commons.copy'), icon: "el-icon-copy-document", type: "success", - exec: this.handleCopy, - isDisable: this.systemDisable + exec: this.handleCopy }, { tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger", - exec: this.handleDelete, - isDisable: this.systemDisable + exec: this.handleDelete } ], }; @@ -169,8 +170,7 @@ export default { handleCopy(data) { let copyData = {}; Object.assign(copyData, data); - copyData.name = data.name + '_copy'; - this.$refs.templateEdit.open(copyData, true); + this.$refs.templateCopy.open(copyData); }, handleDelete(data) { this.$refs.deleteConfirm.open(data);