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

--bug=1014323 --user=李玉号 【系统设置】工作空间-项目管理,打开第一个项目在打开第二个项目,页面显示不正确,刷新后正常
https://www.tapd.cn/55049933/s/1190196
This commit is contained in:
shiziyuan9527 2022-06-24 18:24:15 +08:00 committed by f2c-ci-robot[bot]
parent c81fa9aed0
commit d48dd41231
2 changed files with 5 additions and 8 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="createVisible" destroy-on-close <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="createVisible" v-if="createVisible"
@close="handleClose"> @close="handleClose">
<el-form v-loading="result.loading" :model="form" :rules="rules" ref="form" label-position="right" label-width="80px" size="small"> <el-form v-loading="result.loading" :model="form" :rules="rules" ref="form" label-position="right" label-width="80px" size="small">
<el-form-item :label-width="labelWidth" :label="$t('commons.name')" prop="name"> <el-form-item :label-width="labelWidth" :label="$t('commons.name')" prop="name">
@ -203,10 +203,10 @@ export default {
}, },
getOptions() { getOptions() {
if (this.$refs.issueTemplate) { if (this.$refs.issueTemplate) {
this.$refs.issueTemplate.getTemplateOptions(this.form.id); this.$refs.issueTemplate.getTemplateOptions();
} }
if (this.$refs.caseTemplate) { if (this.$refs.caseTemplate) {
this.$refs.caseTemplate.getTemplateOptions(this.form.id); this.$refs.caseTemplate.getTemplateOptions();
} }
}, },
thirdPartTemplateChange(val) { thirdPartTemplateChange(val) {
@ -214,9 +214,6 @@ export default {
this.form.issueTemplateId = ''; this.form.issueTemplateId = '';
}, },
edit(row) { edit(row) {
if (row) {
this.form.id = row.id;
}
this.getOptions(); this.getOptions();
this.createVisible = true; this.createVisible = true;
listenGoBack(this.handleClose); listenGoBack(this.handleClose);

View File

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