管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-01-16 21ddc9ec1b1b76d2ce20e512328e65acaf1af2bf
src/views/AuthorizationManagement/roleMenuAuthorization.vue
@@ -44,7 +44,7 @@
          style="width: 100%"
          @row-click="singleElection"
          highlight-current-row
          height="83%"
          height="78%"
        >
          <el-table-column align="center" width="55">
            <template slot-scope="scope">
@@ -87,7 +87,7 @@
          >
        </div>
        <el-divider />
        <div style="height: 90%; overflow-y: auto">
        <div  class="menuContent">
          <el-tree
            :data="menuList"
            :props="defaultMenuProps"
@@ -152,7 +152,7 @@
          :data="menuTableData"
          stripe
          style="width: 100%"
          height="84%"
          height="78%"
          @selection-change="handleSelectionChange"
        >
          <el-table-column type="selection" width="55"> </el-table-column>
@@ -178,180 +178,15 @@
            :current-page="rolMenuListData.pageIndex"
            :page-sizes="[10, 20, 30, 40]"
            :page-size="rolMenuListData.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            layout="prev, pager, next"
            :total="roleMenuCount"
          >
          </el-pagination>
        </div>
      </div>
      <!--  -->
      <!-- <el-form ref="form" :model="selFrom">
        <el-form-item label="单位">
          <el-select
            ref="multiSelect"
            style="width: 300px"
            v-model="selFrom.name"
            placeholder="请选择单位名称..."
            @change="chooseCustom('multiSelect')"
          >
            <el-option
              :value="selectTree"
              class="setstyle"
              style="overflow: auto; height: 200px"
              disabled
            >
              <el-tree
                :data="depList"
                :props="defaultProps"
                :check-on-click-node="true"
                :check-strictly="true"
                node-key="id"
                ref="treeForm"
                @node-click="addAdminHandleNodeClick"
                :default-expanded-keys="[1]"
              >
              </el-tree>
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div style="height: 75%">
      </div>
      <div style="margin-top: 20px; text-align: center" class="pagination_box">
        <el-pagination
          @size-change="dephandleSizeChange"
          @current-change="dephandleCurrentChange"
          :current-page="roleDepListData.pageIndex"
          :page-sizes="[10, 20, 30, 40]"
          :page-size="roleDepListData.pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="roleDepCount"
        >
        </el-pagination>
      </div> -->
    </div>
    <!-- 菜单表 -->
    <!-- <div
      class="menuSettings_tree"
      style="margin-left: 10px; width: calc(50% - 172px)"
    >
      <div
        style="
          font-size: 14px;
          color: #606266;
          line-height: 1;
          cursor: text;
          position: relative;
          top: 5px;
          margin-left: 10px;
          display: flex;
          align-items: center;
        "
      >
        <span>
          {{
            $t('operatManage.UserRoleAuthorizationObj.PermissionTable')
          }}</span
        >
      </div>
      <el-divider />
      <div class="menuTreeBox">
        <el-tree
          :data="menuList"
          :props="defaultMenuProps"
          :show-checkbox="true"
          :check-on-click-node="true"
          :check-strictly="true"
          node-key="id"
          @check="menuTreeCheck"
          ref="treeForm"
          :default-expanded-keys="[1]"
        >
        </el-tree>
      </div>
    </div>
    <div class="menuSettings">
      <div
        style="
          font-size: 14px;
          color: #606266;
          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"
            @click="adduser"
            :disabled="menuid == null ? true : false"
            >{{ $t('operatManage.UserRoleAuthorizationObj.Added') }}</el-button
          >
          <el-button
            v-if="menuStatus.delete"
            type="danger"
            icon="el-icon-delete"
            size="small"
            @click="deletesUser"
            :disabled="menuid == null ? true : false"
            >{{ $t('operatManage.UserRoleAuthorizationObj.delete') }}</el-button
          >
        </div>
      </div>
      <el-divider class="divider" />
      <el-table
        :data="menuTableData"
        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="name"
          :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="authhandleSizeChange"
          @current-change="authhandleCurrentChange"
          :current-page="rolMenuListData.pageIndex"
          :page-sizes="[10, 20, 30, 40]"
          :page-size="rolMenuListData.pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="roleMenuCount"
        >
        </el-pagination>
      </div>
    </div> -->
    <el-dialog
      :title="$t('operatManage.UserRoleAuthorizationObj.Added')"
      :visible.sync="dialogTableVisible"
@@ -404,7 +239,7 @@
import {
  queryDepTree,
  select_Role_ByPageAndCount,
  selectMenuRecursive,
  selectMenuRecursives,
  roleMenuAuthelectByPageForRole,
  menuAuthSelectByPageForRole,
  roleMenuAuthInserts,
@@ -471,7 +306,7 @@
      this.depList = this.treeData(data.result);
    },
    async getMenuTree() {
      const data = await selectMenuRecursive({ name: menuStartName });
      const data = await selectMenuRecursives({ name: menuStartName });
      if (data.code !== 200) {
        return this.$message.error('请求单位报错');
      }
@@ -673,18 +508,19 @@
<style lang="less" scoped>
//@import url(); 引入公共css类
.menuSettings_box {
  border-radius: 10px;
  height: 81%;
  width: 97%;
  height: 98%;
  width: 98%;
  padding: 1%;
  position: absolute;
  box-sizing: border-box;
  .menuSettings_tree {
    display: flex;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    .content_box {
      padding: 10px;
      width: 31%;
      height: 720px;
      height: 94%;
      border: 1px solid rgb(202, 201, 204);
      border-radius: 5px;
      /deep/ .el-input__inner {
@@ -754,6 +590,10 @@
        }
      }
    }
    .menuContent{
      height: 90%;
      overflow: auto;
    }
  }
  /deep/ .el-table {
    background-color: transparent;