zhaoke 1 år sedan
förälder
incheckning
201d5f7675
1 ändrade filer med 24 tillägg och 3 borttagningar
  1. 24 3
      src/views/permissionPage/components/permissionList.vue

+ 24 - 3
src/views/permissionPage/components/permissionList.vue

@@ -358,9 +358,30 @@ export default {
         querys.push(modifyData(params))
       } else {
         const ids = []
-        items.map(item => {
-          if (item.children) delete item.children
-          ids.push(item.pageconfigurationid)
+        items.map(({ pagetype, children, serviceid, pageconfigurationid }) => {
+          if (pagetype == 'module' || pagetype == 'page' || pagetype == 'button') {
+            ids.push({
+              pageconfigurationid,
+              serviceid
+            })
+          } else {
+            if (pagetype == 'table' && children) {
+              const childs = children
+              if (childs.length) {
+                childs.map(citem => {
+                  ids.push({
+                    pageconfigurationid: citem.pageconfigurationid,
+                    serviceid: serviceid
+                  })
+                })
+              }
+              ids.push({
+                pageconfigurationid,
+                serviceid
+              })
+            }
+          }
+          //if (item.children) delete item.children
         })
         const params = {
           id,