Commit b6577f586afab4e218618debb9187d71cfaeeee0

Authored by boyang
1 parent 684e7967

添加邮件配置页面注释

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