fix(系统设置): 项目管理编辑项目时模版数据未更新

--bug=1014323 --user=李玉号
【系统设置】工作空间-项目管理,打开第一个项目在打开第二个项目,页面显示不正确,刷新后正常
https://www.tapd.cn/55049933/s/1189491
This commit is contained in:
shiziyuan9527 2022-06-23 18:39:46 +08:00 committed by shiziyuan9527
parent 2e4f6561b5
commit 0dfb89007c
3 changed files with 7 additions and 6 deletions

View File

@ -203,10 +203,10 @@ export default {
},
getOptions() {
if (this.$refs.issueTemplate) {
this.$refs.issueTemplate.getTemplateOptions();
this.$refs.issueTemplate.getTemplateOptions(this.form.id);
}
if (this.$refs.caseTemplate) {
this.$refs.caseTemplate.getTemplateOptions();
this.$refs.caseTemplate.getTemplateOptions(this.form.id);
}
},
thirdPartTemplateChange(val) {
@ -214,6 +214,9 @@ export default {
this.form.issueTemplateId = '';
},
edit(row) {
if (row) {
this.form.id = row.id;
}
this.getOptions();
this.createVisible = true;
listenGoBack(this.handleClose);

View File

@ -47,12 +47,12 @@ export default {
}
},
methods: {
getTemplateOptions() {
getTemplateOptions(id) {
let url = 'field/template/case/option/';
if (this.scene === 'ISSUE') {
url = 'field/template/issue/option/';
}
let projectId = this.projectId || '';
let projectId = id ? id : (this.projectId || '');
this.$get(url + projectId, (response) => {
this.templateOptions = response.data;
this.templateFilterOptions = this.templateOptions;

View File

@ -209,7 +209,6 @@ import MsJarConfig from "@/business/components/settings/workspace/JarConfig";
import MsTableButton from "../../common/components/MsTableButton";
import {_filter, _sort} from "@/common/js/tableUtils";
import MsResourceFiles from "@/business/components/performance/test/components/ResourceFiles";
import TemplateSelect from "@/business/components/project/template/TemplateSelect";
import {PROJECT_CONFIGS} from "@/business/components/common/components/search/search-components";
import MsRolesTag from "@/business/components/common/components/MsRolesTag";
import AddMember from "@/business/components/settings/common/AddMember";
@ -221,7 +220,6 @@ export default {
components: {
EditProject,
MsInstructionsIcon,
TemplateSelect,
MsResourceFiles,
MsTableButton,
MsJarConfig,