feat:新建项目-选择模版后可以重置模版,重置页面数据

This commit is contained in:
wyx
2023-04-28 11:27:53 +08:00
parent e230158acb
commit f04da8c5e9

View File

@@ -187,7 +187,7 @@
<div class="name">
<div class="inname" style="width: 50px">模版</div>
<div class="in select" style="margin-left: 2px">
<a-select :getPopupContainer="
<a-select :allowClear="true" :getPopupContainer="
(triggerNode) => triggerNode.parentNode || document.body
" placeholder="请选择模版" style="width: 100%" :options="classifyList5" @change="classificationChange5"
@popupScroll="templateScroll" :fieldNames="{
@@ -372,6 +372,22 @@ export default {
};
const classificationChange5 = (key, option) => {
if(key==undefined || option==undefined){
// 标识清空选择的模版
state.timeRange = []
state.projectInfo = {
name: "",
picUrl: "",
beginTime: "",
endTime: "",
manager: "",
managerId: "",
sourceBelongId: null,
level: "",
systemId: null
}
return
}
state.projectInfo = option;
state.projectInfo.projectTemplateId = option.id;
state.projectInfo.id = "";