Commit b6577f586afab4e218618debb9187d71cfaeeee0

Authored by boyang
1 parent 684e7967

添加邮件配置页面注释

src/views/project/config/DrawerCreate.vue
@@ -230,7 +230,7 @@ @@ -230,7 +230,7 @@
230 async function handleSubmit() { 230 async function handleSubmit() {
231 try { 231 try {
232 const values = await validate(); 232 const values = await validate();
233 - //引入所有事件合集,给各个事件命名,方便匹配 233 + //引入所有事件合集,给各个事件命名,用于匹配
234 const configObject = configInfos.reduce((obj, item) => { 234 const configObject = configInfos.reduce((obj, item) => {
235 obj[item.fieldValue] = item; 235 obj[item.fieldValue] = item;
236 return obj; 236 return obj;
@@ -241,6 +241,7 @@ @@ -241,6 +241,7 @@
241 configInfos: [], 241 configInfos: [],
242 }); 242 });
243 newValues.value.typeValue = values.typeValue; 243 newValues.value.typeValue = values.typeValue;
  244 + //添加邮件事件
244 for (const value1 in values) { 245 for (const value1 in values) {
245 if (value1 != 'typeValue') { 246 if (value1 != 'typeValue') {
246 const arr: string[] = values[value1].split(/[,|,]/); 247 const arr: string[] = values[value1].split(/[,|,]/);
src/views/project/config/DrawerEdit.vue
@@ -167,6 +167,7 @@ @@ -167,6 +167,7 @@
167 // const replacedText = text.replace(/,/g, ','); 167 // const replacedText = text.replace(/,/g, ',');
168 // return replacedText; 168 // return replacedText;
169 // } 169 // }
  170 + //获取现有的列表
170 async function getData() { 171 async function getData() {
171 const emailAll = await getEmailList({}); 172 const emailAll = await getEmailList({});
172 return emailAll; 173 return emailAll;
@@ -187,10 +188,13 @@ @@ -187,10 +188,13 @@
187 typeValue: '', 188 typeValue: '',
188 configInfos: [], 189 configInfos: [],
189 }); 190 });
  191 + //将编辑后的值赋值给新对象
190 newValues.value.id = values.id; 192 newValues.value.id = values.id;
191 newValues.value.type = values.type; 193 newValues.value.type = values.type;
192 newValues.value.typeValue = values.typeValue; 194 newValues.value.typeValue = values.typeValue;
193 console.log(newValues.value.id, '5656idwd'); 195 console.log(newValues.value.id, '5656idwd');
  196 + //获取所有数据
  197 + //找出需要修改的数据,并将修改后的configInfos赋值给新对象
194 getData().then((res) => { 198 getData().then((res) => {
195 console.log(res, 5656111); 199 console.log(res, 5656111);
196 for (const value1 of res) { 200 for (const value1 of res) {