zhongrj
2023-11-03 5b432498c2dea1523f5cf21efb555a0df96f616d
src/views/authority/role.vue
@@ -38,7 +38,7 @@
               :visible.sync="box"
               width="345px">
      <el-tabs type="border-card">
        <el-tab-pane label="菜单权限">
        <el-tab-pane label="权限">
          <el-tree :data="menuGrantList"
                   show-checkbox
                   node-key="id"
@@ -47,7 +47,7 @@
                   :props="props">
          </el-tree>
        </el-tab-pane>
        <el-tab-pane label="数据权限">
        <!-- <el-tab-pane label="数据权限">
          <el-tree :data="dataScopeGrantList"
                   show-checkbox
                   node-key="id"
@@ -64,7 +64,7 @@
                   :default-checked-keys="apiScopeTreeObj"
                   :props="props">
          </el-tree>
        </el-tab-pane>
        </el-tab-pane> -->
      </el-tabs>
      <span slot="footer"
@@ -78,7 +78,7 @@
</template>
<script>
  import {add, getList, getRole, getRoleTreeById, grant, grantTree, remove, update} from "@/api/system/role";
  import {add, getList, getRoleList, getRole, getRoleTreeById, grant, grantTree, remove, update} from "@/api/system/role";
  import {mapGetters} from "vuex";
  import website from '@/config/website';
@@ -237,8 +237,8 @@
      },
      submit() {
        const menuList = this.$refs.treeMenu.getCheckedKeys();
        const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
        const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
        const dataScopeList = [];
        const apiScopeList = [];
        grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
          this.box = false;
          this.$message({
@@ -326,12 +326,12 @@
        grantTree()
          .then(res => {
            this.menuGrantList = res.data.data.menu;
            this.dataScopeGrantList = res.data.data.dataScope;
            this.apiScopeGrantList = res.data.data.apiScope;
            // this.dataScopeGrantList = res.data.data.dataScope;
            // this.apiScopeGrantList = res.data.data.apiScope;
            getRole(this.ids).then(res => {
              this.menuTreeObj = res.data.data.menu;
              this.dataScopeTreeObj = res.data.data.dataScope;
              this.apiScopeTreeObj = res.data.data.apiScope;
              // this.dataScopeTreeObj = res.data.data.dataScope;
              // this.apiScopeTreeObj = res.data.data.apiScope;
              this.box = true;
            });
          });
@@ -369,7 +369,7 @@
      },
      onLoad(page, params = {}) {
        this.loading = true;
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
        getRoleList(Object.assign(params, this.query)).then(res => {
          this.data = res.data.data;
          this.loading = false;
          this.selectionClear();