瀏覽代碼

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

chauncey 1 年之前
父節點
當前提交
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(() => {});
 };
 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) => {
   group.isExpand = !group.isExpand;