管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-06 4e3d77dcbe421a4d6611ebcdd1ac3165cb36ad4b
src/views/AuthorizationManagement/menuRoleAuthorization.vue
@@ -1,20 +1,19 @@
<template>
  <div class="menuSettings_box">
    <div class="menuSettings_tree">
      <My-bread
        :list="[
          `${$t('operatManage.operatManage')}`,
    <My-bread
      :list="[
        `${$t('operatManage.operatManage')}`,
          `${$t('operatManage.MenuRoleAuthorization')}`,
        ]"
      ></My-bread>
      <el-divider />
      <div class="menuTreeBox">
        `${$t('operatManage.MenuRoleAuthorization')}`,
      ]"
    ></My-bread>
    <el-divider />
    <div class="menuTreeBox ">
      <div class="left_tree subpage_Div">
        <el-tree
          :data="depList"
          :props="defaultProps"
          :show-checkbox="true"
          :show-checkbox="false"
          :check-on-click-node="true"
          :check-strictly="true"
          node-key="id"
@@ -24,12 +23,92 @@
        >
        </el-tree>
      </div>
      <div class="right_menu subpage_Div">
        <div
          style="
            font-size: 14px;
            color: #409eff;
            line-height: 1;
            cursor: text;
            position: relative;
            top: 5px;
            margin-left: 10px;
            display: flex;
            align-items: center;
          "
        >
          <span>
            {{
              $t('operatManage.UserRoleAuthorizationObj.PermissionTable')
            }}</span
          >
          <div class="btn" style="margin-left: auto">
            <el-button
              v-if="menuStatus.insert"
              type="primary"
              icon="el-icon-circle-plus-outline"
              size="small"
              :disabled="roleid == null ? true : false"
              @click="adduser"
              >{{
                $t('operatManage.UserRoleAuthorizationObj.Added')
              }}</el-button
            >
            <el-button
              v-if="menuStatus.delete"
              type="danger"
              icon="el-icon-delete"
              size="small"
              @click="deletesUser"
              :disabled="roleid == null ? true : false"
              >{{
                $t('operatManage.UserRoleAuthorizationObj.delete')
              }}</el-button
            >
          </div>
        </div>
        <el-divider class="divider" />
        <el-table
          :data="tableData"
          style="width: 100%"
          height="77%"
          @selection-change="handleSelectionChange"
        >
          <el-table-column type="selection" width="55"> </el-table-column>
          <el-table-column
            align="center"
            type="index"
            :label="$t('dataManage.styleObj.index')"
            width="55"
          />
          <el-table-column
            prop="authName"
            :label="$t('operatManage.UserRoleAuthorizationObj.name')"
          >
          </el-table-column>
        </el-table>
        <div
          style="margin-top: 20px; text-align: center"
          class="pagination_box"
        >
          <el-pagination
            @size-change="userhandleSizeChange"
            @current-change="userhandleCurrentChange"
            :current-page="userlistData.pageIndex"
            :page-sizes="[10, 20, 30, 40]"
            :page-size="userlistData.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="usercount"
          >
          </el-pagination>
        </div>
      </div>
    </div>
    <div class="menuSettings">
      <!-- <div class="title_box">
        <h4>详细信息</h4>
      </div> -->
    <!-- <div class="menuSettings">
      <div
        style="
          font-size: 14px;
@@ -56,6 +135,7 @@
            size="small"
            :disabled="roleid == null ? true : false"
            @click="adduser"
            style="background: #409eff"
            >{{ $t('operatManage.UserRoleAuthorizationObj.Added') }}</el-button
          >
          <el-button
@@ -71,42 +151,8 @@
      </div>
      <el-divider class="divider" />
      <el-table
        :data="tableData"
        stripe
        style="width: 100%"
        height="85%"
        @selection-change="handleSelectionChange"
        :header-cell-style="{
          background: 'transparent',
        }"
      >
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column
          align="center"
          type="index"
          :label="$t('dataManage.styleObj.index')"
        />
        <el-table-column
          prop="authName"
          :label="$t('operatManage.UserRoleAuthorizationObj.name')"
        >
        </el-table-column>
      </el-table>
      <div style="margin-top: 20px; text-align: center" class="pagination_box">
        <el-pagination
          @size-change="userhandleSizeChange"
          @current-change="userhandleCurrentChange"
          :current-page="userlistData.pageIndex"
          :page-sizes="[10, 20, 30, 40]"
          :page-size="userlistData.pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="usercount"
        >
        </el-pagination>
      </div>
    </div>
    </div> -->
    <el-dialog
      :title="$t('operatManage.UserRoleAuthorizationObj.Added')"
      :visible.sync="dialogTableVisible"
@@ -141,12 +187,14 @@
        </el-pagination>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogTableVisible = false">{{
        <el-button   size="small"   @click="dialogTableVisible = false">{{
          $t('dataManage.dictionaryManageObj.cancel')
        }}</el-button>
        <el-button type="primary" @click="addConfirm">{{
          $t('dataManage.dictionaryManageObj.confirm')
        }}</el-button>
        <el-button
  size="small"      type="primary"
          @click="addConfirm"
          >{{ $t('dataManage.dictionaryManageObj.confirm') }}</el-button
        >
      </div>
    </el-dialog>
  </div>
@@ -155,7 +203,7 @@
<script>
import MyBread from '../../components/MyBread.vue';
import {
  selectMenuRecursive,
  selectMenuRecursives,
  select_menuAuth_ByPageAndCount,
  menuAuthDeletes,
  select_AuthMenu_ByPageAndCount,
@@ -220,7 +268,7 @@
    // 部门请求
    async getMenuTree() {
      //获取目录树最大ID,新建节点使用
      const data = await selectMenuRecursive({ name: '管道基础大数据平台' });
      const data = await selectMenuRecursives({ name: menuStartName });
      if (data.code !== 200) {
        return this.$message.error('请求单位报错');
      }
@@ -381,94 +429,38 @@
<style lang="less" scoped>
//@import url(); 引入公共css类
.menuSettings_box {
  //   background: rgb(240, 242, 245);
  border-radius: 10px;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  .menuSettings_tree {
    position: relative;
    width: 30%;
    height: 100%;
    background: rgb(240, 242, 245);
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;
    overflow: auto;
    .saveBtn {
      position: absolute;
      left: 250px;
      top: 23px;
    }
    .menuTreeBox {
      height: 90%;
      overflow: auto;
      .el-tree {
        background: transparent;
        font-size: 15px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #000000;
        // /deep/ .el-tree-node__label {
        //   font-size: 18px;
        // }
        /deep/ .el-tree-node {
          padding-top: 10px;
          // padding-bottom: 10px;
        }
        /deep/ .el-tree-node:focus > .el-tree-node__content {
          background-color: #b9b9b9;
        }
        /deep/ .el-tree-node__content:hover {
          background-color: rgb(153, 153, 153);
        }
        .btnBox {
          margin-left: 5px;
          .el-button + .el-button {
            margin-left: 5px;
          }
        }
      }
    }
  }
  .menuSettings {
    width: 70%;
    border-radius: 10px;
    background: rgb(240, 242, 245);
    margin-left: 10px;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    .title_box {
      background: #fff;
  height: 98%;
  width: 98%;
  padding: 1%;
  .menuTreeBox {
    width: 100%;
    height: 91%;
    .left_tree {
      width: 29%;
      height: 92%;
      padding: 10px;
      margin-bottom: 24px;
      display: flex;
      border-radius: 10px;
      border: 1px solid rgb(202, 201, 204);
      box-sizing: border-box;
      border-radius: 5px;
      float: left;
      overflow-y: auto;
    }
    .right_menu {
      width: 67%;
      height: 92%;
      padding: 10px;
      border-radius: 5px;
      float: right;
    }
  }
  .table_box {
    padding: 10px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid rgb(202, 201, 204);
    overflow: auto;
    height: 85%;
  }
  .divider {
    margin-top: 8px;
  }
}
.el-table,
.el-table /deep/ .el-table__expanded-cell {
  background-color: transparent;
}
.el-table /deep/ th,
.el-table /deep/ tr {
  background-color: transparent;
}
</style>