/*
 * @Author: your name
 * @Date: 2021-12-24 11:36:07
 * @LastEditTime: 2022-01-06 16:38:25
 * @LastEditors: Please set LastEditors
 * @Description: 权限公用
 * @FilePath: \Foshan4A2.0\src\views\authorityManagement\minixs\roleData.js
 */
import { organizationUptree } from '@/api/postInterface'
import { translateDataToTreeAll } from '@/utils/validate'
export default {
  data () {
    return {
      organauthList: []
    }
  },
  created () {

  },
  methods: {
    async getOrganizationUptree (id) {
      try {
        const result = await organizationUptree({
          "OrganId": id
        })
        if (result.code === 0 && result.returnData.length) {
          result.returnData.forEach(item => {
            item.flag = item.Status == 1 ? true : false
          })

          this.organauthList = result.returnData
          console.log(this.organauthList);
        } else {
          const obj = []
          this.organauthList = obj
        }
      } catch (error) {
        console.log('出错了', error)
      }
    }
  }
}
