按钮级别的新版本,多级别的组织架构
loulijun2021
2023-08-23 f6c09fd8be4d671b13e673a49e5af9c19710e464
src/views/basicSettings/roleList.vue
@@ -178,9 +178,9 @@
          >
            <el-option
              v-for="item in datacodeArr"
              :key="item.code"
              :label="item.name"
              :value="item.code"
              :key="item.datacode"
              :label="item.dataname"
              :value="item.datacode"
            />
          </el-select>
        </el-form-item>
@@ -245,7 +245,7 @@
import { validateCode } from '@/utils/global'
import elDragDialog from '@/directive/el-drag-dialog'
import waves from '@/directive/waves'
import { PrentOrganization } from '@/api/GeneralBasicData'
import { DataPermissions, PrentOrganization } from '@/api/GeneralBasicData'
import arrayToTree from 'array-to-tree'
export default {
@@ -277,12 +277,7 @@
        datapermissions: '', // 数据权限
        status: 'Y'// 状态
      },
      datacodeArr: [
        { code: 'ALL', name: '全部' },
        { code: 'CUSTOM', name: '自定义' },
        { code: 'LEVEL', name: '本级' },
        { code: 'PERSON', name: '本人' }
      ],
      datacodeArr: [],
      checkboxGroupSelected: ['展开/折叠', '父子联动'],
      checkboxGroup: ['展开/折叠', '全选/全不选', '父子联动'],
      operation: '',
@@ -310,6 +305,7 @@
    this.getHeight()
    this.getPrentOrganization()
    this.getDataPermissions()
  },
  methods: {
    async getRoleData() {
@@ -317,6 +313,10 @@
      this.tableData = res.data
      this.total = res.count
    },
    async getDataPermissions() {
      const { data: res } = await DataPermissions()
      this.datacodeArr = res
    },
    // 组织架构级联选择器
    async getPrentOrganization() {
      const { data: res } = await PrentOrganization()