Просмотр исходного кода

修改pushobject传给父组件的参数 1-null-null 2-data-null 3-null-data

chauncey 1 год назад
Родитель
Сommit
f7e0fd2957
1 измененных файлов с 15 добавлено и 1 удалено
  1. 15 1
      src/views/message/components/PushObject.vue

+ 15 - 1
src/views/message/components/PushObject.vue

@@ -208,7 +208,21 @@ const submitForm = () => {
   return ruleFormRef.value!.validate(() => {});
   return ruleFormRef.value!.validate(() => {});
 };
 };
 const getChildValue = () => {
 const getChildValue = () => {
-  return ruleForm;
+  return {
+    recipientType: ruleForm.recipientType,
+    userGroupList:
+      ruleForm.recipientType === 3
+        ? []
+        : ruleForm.recipientType === 1
+        ? []
+        : ruleForm.userGroupList.map((item) => item),
+    customUserList:
+      ruleForm.recipientType === 2
+        ? []
+        : ruleForm.recipientType === 1
+        ? []
+        : ruleForm.customUserList.map((item) => item.userId),
+  };
 };
 };
 const toggleExpand = (group) => {
 const toggleExpand = (group) => {
   group.isExpand = !group.isExpand;
   group.isExpand = !group.isExpand;