管道基础大数据平台系统开发-【前端】-新系統界面
liupengpeng
2023-02-14 b671529a86644b7496279c469fa683f58be222e1
src/views/AuthorizationManagement/userRoleAuthorization.vue
@@ -1,6 +1,6 @@
<template>
  <div class="menuSettings_box">
    <div class="menuSettings_tree">
    <div class="menuSettings_tree subpage_Div">
      <My-bread :list="[
          `${$t('operatManage.operatManage')}`,
          `${$t('operatManage.UserRoleAuthorization')}`,
@@ -26,7 +26,7 @@
      </div>
    </div>
    <div class="menuSettings_tree">
    <div class="menuSettings_tree subpage_Div">
      <div style="
          font-size: 14px;
          color: #409eff;
@@ -78,7 +78,7 @@
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="listData.pageIndex"
          :page-sizes="[10, 20, 30, 40]"
          :page-sizes="[10, 20, 50, 100]"
          :page-size="userlistData.pageSize"
          layout="prev, pager, next"
          :total="count"
@@ -86,10 +86,8 @@
        </el-pagination>
      </div>
    </div>
    <div class="menuSettings_tree">
      <!-- <div class="title_box">
        <h4>详细信息</h4>
      </div> -->
    <div class="menuSettings_tree subpage_Div">
      <div style="
          font-size: 14px;
          color: #409eff;
@@ -109,12 +107,11 @@
        >
          <el-button
            v-if="menuStatus.insert"
            type="primary"
            type="success"
            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"
@@ -158,7 +155,7 @@
          @size-change="userhandleSizeChange"
          @current-change="userhandleCurrentChange"
          :current-page="userlistData.pageIndex"
          :page-sizes="[10, 20, 30, 40]"
          :page-sizes="[10, 20, 50, 100]"
          :page-size="userlistData.pageSize"
          layout="prev, pager, next"
          :total="usercount"
@@ -198,7 +195,7 @@
          @size-change="addhandleSizeChange"
          @current-change="addhandleCurrentChange"
          :current-page="addlistData.pageIndex"
          :page-sizes="[10, 20, 30, 40]"
          :page-sizes="[10, 20, 50, 100]"
          :page-size="addlistData.pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="addcount"
@@ -209,11 +206,15 @@
        slot="footer"
        class="dialog-footer"
      >
        <el-button size="small" @click="dialogTableVisible = false">{{
        <el-button
          size="small"
          @click="dialogTableVisible = false"
        >{{
          $t('dataManage.dictionaryManageObj.cancel')
        }}</el-button>
        <el-button
          size="small"      type="primary"
          size="small"
          type="primary"
          @click="addConfirm"
        >{{ $t('dataManage.dictionaryManageObj.confirm') }}</el-button>
      </div>
@@ -317,15 +318,40 @@
      this.usermultipleSelection.forEach((e) => {
        arr.push(e.id);
      });
      const data = await roleUserdeletes({ ids: arr.toString() });
      if (data.code !== 200) {
        return this.$message.error('删除失败');
      }
      this.$message({
        message: '删除成功',
        type: 'success',
      this.$confirm('此操作将永久删除该权限, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(async () => {
        const data = await roleUserdeletes({ ids: arr.toString() });
        if (data.code == 200) {
          this.InsertFormdialog = false;
          this.$message({
            message: '删除成功!',
            type: 'success',
          });
          this.getuserList();
        } else {
          this.$message({
            message: '删除失败!',
            type: 'warning',
          });
        }
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
      this.getuserList();
      // const data = await roleUserdeletes({ ids: arr.toString() });
      // if (data.code !== 200) {
      //   return this.$message.error('删除失败');
      // }
      // this.$message({
      //   message: '删除成功',
      //   type: 'success',
      // });
      // this.getuserList();
    },
    //用户表多选
    handleSelectionChange(val) {
@@ -473,16 +499,11 @@
  height: 98%;
  width: 98%;
  padding: 1%;
  position: absolute;
  display: flex;
  justify-content: space-between;
  .el-card-define {
    height: 630px;
    background: #303030;
    border: transparent;
  }
  .menuSettings_tree {
    border: 1px solid gray;
    width: 33%;
    height: 98%;
    position: relative;
@@ -499,209 +520,13 @@
    .menuTreeBox {
      height: 90%;
      overflow: auto;
      .card_tree {
        display: block;
        // 更改指标树图标颜色
        /deep/ .el-tree .el-icon-caret-right:before {
          color: white; /** 这里是要修改图标的颜色 **/
        }
        /deep/ .el-tree {
          color: white; /** 这里是要修改图标的颜色 **/
          background: transparent;
        }
        /deep/.el-tree-node__content {
          &:hover {
            background-color: rgba(255, 255, 255, 0.3) !important;
          }
        }
        /deep/.el-tree-node.is-current > .el-tree-node__content {
          background-color: rgba(255, 255, 255, 0.3) !important;
          color: #409eff;
        }
        .btnBox {
          margin-left: 5px;
          .el-button + .el-button {
            margin-left: 5px;
          }
        }
      }
    }
  }
  .menuSettings {
    border-radius: 10px;
    border: 1px solid gray;
    width: 33%;
    height: 98%;
    padding: 10px;
    box-sizing: border-box;
    .title_box {
      background: #fff;
      padding: 10px;
      margin-bottom: 24px;
      display: flex;
      border-radius: 10px;
      border: 1px solid rgb(202, 201, 204);
      box-sizing: border-box;
    }
  }
  .table_box {
    padding: 10px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid rgb(202, 201, 204);
    overflow: auto;
    height: 85%;
  }
  .divider {
    margin-top: 8px;
  }
}
.pagination_box {
  /deep/.el-input__inner {
    background-color: transparent !important;
    border: 1px solid;
    color: white;
  }
  /deep/.el-pagination__total {
    color: white;
  }
  /deep/.el-pagination__jump {
    color: white;
  }
  /deep/.el-pager li.active {
    color: #1890ff;
  }
  /deep/.el-pager li {
    color: white;
    background: transparent;
  }
  /deep/.el-pager li {
    color: white;
  }
  /deep/.btn-prev {
    background: transparent;
  }
  /deep/.btn-next {
    background: transparent;
  }
}
.el-table,
.el-table /deep/ .el-table__expanded-cell {
  background-color: transparent;
}
.el-table /deep/ th,
.el-table /deep/ tr {
  background-color: transparent;
}
/*里面的代码可以根据自己需求去进行更改*/
/* 设置滚动条的样式 */
::-webkit-scrollbar {
  width: 4px;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
  -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
  border-radius: 10px;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #8b8b8b;
  -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5);
}
::-webkit-scrollbar-thumb:window-inactive {
  background: #8b8b8b;
  height: 289px;
}
/deep/ .el-dialog {
  background: #303030;
}
/deep/.el-range-editor.is-active,
.el-range-editor.is-active:hover,
.el-select .el-input.is-focus .el-input__inner {
  border: 1px solid;
}
/deep/.el-dialog__title {
  color: white;
}
/*修改table 表体的背景颜色和文字颜色*/
/deep/ .el-table {
  background-color: transparent;
  th,
  td {
    background-color: transparent;
  }
  .el-table__expanded-cell {
    background-color: transparent !important;
  }
  // 表头背景色
  th.el-table__cell {
    background-color: #303030;
    color: #fff;
  }
  tr > td {
    background-color: #303030;
    color: #fff;
  }
  // hover效果
  tr:hover > td {
    background-color: rgba(255, 255, 255, 0.3) !important;
  }
  tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
    // text-align: center;
  }
  // 滚动条宽高
  .el-table__body-wrapper::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }
  .el-table__body-wrapper::-webkit-scrollbar {
    width: 5px;
    /*滚动条宽度*/
    height: 10px;
    /*滚动条高度*/
  }
  /*定义滚动条轨道 内阴影+圆角*/
  .el-table__body-wrapper::-webkit-scrollbar-track {
    box-shadow: 0px 1px 3px #216fe6 inset;
    /*滚动条的背景区域的内阴影*/
    border-radius: 10px;
  }
  /*定义滑块 内阴影+圆角*/
  .el-table__body-wrapper::-webkit-scrollbar-thumb {
    box-shadow: 0px 1px 3px #216fe6 inset;
    border-radius: 6px;
    background-color: #216fe6;
  }
}
</style>
<style>
.el-select-dropdown {
  background: #303030;
  border-color: 1px solid;
}
.el-scrollbar__wrap {
  margin-bottom: -20px !important;
  margin-right: -20px !important;
}
.el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
  background: rgba(255, 255, 255, 0.3);
}
.el-select-dropdown__item {
  color: white !important;
}
</style>