田源
2024-12-17 1b84a05dd84e535284ac6e2d2b360d76a4b8e7ac
Source/plt-web/plt-web-ui/src/views/authority/function/functionView/index.vue
@@ -22,8 +22,8 @@
      <basic-container v-loading="treeLoading">
        <h3 style="margin: 0 0 10px 0">功能权限配置</h3>
        <div>
          <el-button icon="el-icon-place" plain size="small" type="primary" @click="saveHandler">授权</el-button>
          <el-button icon="el-icon-close" plain size="small" style="margin-right: 40px;" type="primary"
          <el-button v-if="permissionList.rightBtn" icon="el-icon-place" plain size="small" type="primary" @click="saveHandler">授权</el-button>
          <el-button v-if="permissionList.resetBtn" icon="el-icon-close" plain size="small" style="margin-right: 40px;" type="primary"
                     @click="clearValue">重置
          </el-button>
        </div>
@@ -46,6 +46,7 @@
<script>
import {gridRoles} from "@/api/system/role/api";
import {getSysModelAuthTreeMenuByPID, getSysModelAuth, saveRoleRight} from "@/api/authority/functionView/api"
import {mapGetters} from "vuex";
export default {
  name: "index",
@@ -83,6 +84,15 @@
      contextData: []
    }
  },
  computed:{
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        rightBtn: this.vaildData(this.permission[this.$route.query.id].RIGHT, false),
        resetBtn: this.vaildData(this.permission[this.$route.query.id].reset, false),
      };
    },
  },
  created() {
    this.getTreeList();
    this.getUITree();