| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092 |
- <template>
- <div class="content-box">
- <div class="left">
- <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
- <span class="cameratxt">角色管理</span>
- </div>
- <div class="middle">
- <div class="filter">
- <div class="condition">
- <span>角色名称 </span>
- <el-input
- clearable
- v-model="searchInput.roleName"
- @clear="searchBtn"
- class="w-50 m-2"
- placeholder="请输入角色名称"
- style="width: 250px"
- />
- </div>
- <div class="condition">
- <span>创建时间 </span>
- <el-date-picker
- v-model="searchInput.createTime"
- type="daterange"
- unlink-panels
- range-separator="-"
- start-placeholder="起始时间"
- end-placeholder="截止时间"
- format="YYYY-MM-DD"
- value-format="YYYY-MM-DD"
- :prefix-icon="Calendar"
- placeholder="请选择日期"
- style="width: 280px"
- @change="searchBtn"
- />
- </div>
- <el-button
- style="margin-left: 20px"
- type="primary"
- class="search"
- @click="searchBtn"
- >查询</el-button
- >
- <!-- <el-button
- style="margin-left: 20px"
- class="reset"
- @click="resetSearchBtn"
- >重置</el-button
- > -->
- </div>
- <!-- 按钮列表 -->
- <div class="gongneng">
- <el-button v-if="btnFlag('role-chuangjianjuese')" @click="addProjectbtn(1)" class="add"
- ><el-icon> <CirclePlus /> </el-icon><span>创建角色</span></el-button
- >
- <!-- <el-button @click="projectImportBtn" class="imp"
- ><el-icon><Upload /></el-icon><span>批量导入</span></el-button
- > -->
- <!-- <el-button @click="projectExportBtn" class="add"
- ><el-icon><Download /></el-icon><span>项目导出</span></el-button
- > -->
- </div>
- </div>
- <div class="scroll">
- <div class="footer" v-loading="loading">
- <el-table
- :row-class-name="tableRowClassName"
- :data="tableData.list"
- @selection-change="handleSelectionChange"
- style="width: 100%"
- :header-cell-style="{
- background: 'rgba(240, 243, 247, 1)',
- height: '50px',
- border: 0,
- }"
- >
- <!-- <el-table-column type="selection" width="55" /> -->
- <el-table-column
- align="center"
- type="index"
- label="序号"
- width="80"
- />
- <!-- <el-table-column align="center" prop="roleLevel" label="角色级别" /> -->
- <!-- <el-table-column align="center" prop="pname" label="父级角色" /> -->
- <el-table-column align="center" prop="roleName" label="角色名称" />
- <el-table-column align="center" prop="createTime" label="创建时间" />
- <el-table-column align="center" label="操作" width="220">
- <template #default="scope">
- <div class="options">
- <!-- <div class="reset" @click="addProjectbtn(2, scope.row)">
- 添加
- </div> -->
- <div class="look" v-if="btnFlag('role-xiugaijuese')" @click="edit(scope.row)">编辑</div>
- <el-popconfirm
- v-if="btnFlag('role-shanchujuese')"
- width="220"
- confirm-button-text="确认"
- cancel-button-text="取消"
- :icon="InfoFilled"
- icon-color="#f89626"
- title="是否删除此角色?"
- @confirm="delRoles(scope.row)"
- @cancel="cancelEvent"
- >
- <template #reference>
- <div class="del">删除</div>
- </template>
- </el-popconfirm>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- 分页组件 -->
- <el-pagination
- background
- v-model:current-page="currentPage"
- v-model:page-size="pageSize"
- :page-sizes="[10, 20, 30, 40]"
- layout="total,sizes, prev, pager, next, jumper, slot"
- :total="total"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- />
- </div>
- <!-- 添加角色 -->
- <el-dialog
- class="addRoles"
- v-model="addRolesVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :title="addRolesTitle"
- align-center
- width="900"
- :before-close="cancelAddRoles"
- >
- <el-form
- v-loading="addRolesLoading"
- ref="addRoleRef"
- :model="addRoleRuleForm"
- :rules="addRoleRules"
- class="demo-ruleForm"
- label-width="110px"
- :size="formSize"
- label-position="right"
- status-icon
- >
- <!-- <el-form-item v-if="addRoleFlag == 2" label="父级角色名称" prop="pname">
- <el-input
- :clearable="true"
- v-model.trim="addRoleRuleForm.pname"
- class="w-50 m-2"
- style="width: 450px"
- :disabled="addRoleFlag == 2"
- placeholder="请输入父级角色名称"
- />
- </el-form-item> -->
- <el-form-item label="角色名称" prop="roleName">
- <el-input
- :clearable="true"
- v-model.trim="addRoleRuleForm.roleName"
- class="w-50 m-2"
- style="width: 450px"
- placeholder="请输入角色名称"
- />
- </el-form-item>
- <!-- <el-form-item label="角色级别" prop="roleLevel">
- <el-input
- :clearable="true"
- v-model.trim="addRoleRuleForm.roleLevel"
- class="w-50 m-2"
- style="width: 450px"
- placeholder="请输入角色级别"
- />
- </el-form-item> -->
- <el-form-item label="权限" prop="treeSel">
- <el-tree
- ref="treeRef"
- style="max-width: 600px"
- :data="addtableData.list"
- show-checkbox
- default-expand-all
- node-key="id"
- highlight-current
- :props="defaultProps"
- @check-change="handleCheckChange"
- check-strictly
- />
- </el-form-item>
- <el-form-item>
- <div class="options">
- <div class="btn">
- <el-button
- color="rgba(41, 109, 227, 1)"
- class="queding"
- type="primary"
- @click="confirmRoles(addRoleRef)"
- >
- 确定
- </el-button>
- <el-button @click="cancelAddRoles">取消</el-button>
- </div>
- </div>
- </el-form-item>
- </el-form>
- <!-- <div class="rolesName">
- <div>
- <el-tree
- ref="treeRef"
- style="max-width: 600px"
- :data="addtableData.list"
- show-checkbox
- default-expand-all
- node-key="id"
- highlight-current
- :props="defaultProps"
- @check-change="handleCheckChange"
- check-strictly
- />
- </div>
- </div> -->
- </el-dialog>
- <!-- 项目导入 -->
- <el-dialog
- class="projectImport"
- v-model="projectImportVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title="项目导入"
- align-center
- width="600"
- :before-close="cancelProjectImport"
- >
- <p class="title">当前只支持项目类型为“非装配式建筑项目”的项目导入</p>
- <p class="down">
- <span>非装配式建筑项目导入模板</span
- ><span @click="templateDown">模板下载</span>
- </p>
- <el-upload
- class="avatar-uploader"
- action="#"
- :auto-upload="false"
- :on-remove="projectImportRemove"
- :on-change="projectImportChange"
- :before-upload="beforeAvatarProImport"
- ref="projectRef"
- :limit="1"
- :on-exceed="projectImportExceed"
- >
- <template #trigger>
- <el-button class="queding" type="primary">
- 导入项目
- </el-button>
- </template>
- </el-upload>
- <div class="options">
- <el-button
- color="rgba(9, 101, 98, 1)"
- class="queding"
- type="primary"
- @click="projectImportConfirm(projectRef)"
- >
- 确认导入
- </el-button>
- <el-button @click="cancelProjectImport"
- > 取消导入 </el-button
- >
- </div>
- </el-dialog>
- </div>
- </template>
- <script setup>
- import {
- ref,
- reactive,
- nextTick,
- onMounted,
- watch,
- onBeforeMount,
- onUnmounted,
- inject
- } from "vue";
- import COS from "cos-js-sdk-v5";
- import { useRouter } from "vue-router";
- import { genFileId, ElMessage, ElMessageBox } from "element-plus";
- import { Calendar } from "@element-plus/icons-vue";
- import { dayjs } from "element-plus";
- import lodash, { reduce } from "lodash";
- import axios from "axios";
- import { useStore } from "vuex";
- const store = useStore();
- const router = useRouter();
- const btnFlag = inject('$btnFlag')
- const loading = ref();
- const tableData = reactive({
- list: [{}],
- });
- const searchInput = reactive({
- roleName: "", // 项目名称
- createTime: "", // 创建时间
- }); // 搜索按钮数据
- const currentPage = ref(1); // 当前页
- const pageSize = ref(10);
- const total = ref(40); // 当前总数
- const selectData = reactive({
- list: [],
- }); // 多选框选择的数据
- const api = ref("");
- // 新增角色 (--------------------------------------------------------)
- const addRolesVisible = ref(false);
- const addRolesTitle = ref();
- const addRolesLoading = ref(false);
- const treeRef = ref();
- const addtableData = reactive({
- list: [],
- });
- const treeSelData = ref();
- const defaultProps = {
- children: "menuLists",
- label: "menuName",
- };
- const addRoleRef = ref();
- const addRoleFlag = ref();
- const addRoleRuleForm = reactive({
- pid: "", // 父级角色ID,最高级为0
- pname: "", // 父级角色名称
- roleName: "", // 角色名称
- roleLevel: "", // 角色级别
- treeSel: [],
- id: "",
- });
- // 更新进度验证
- const addRoleRules = reactive({
- pname: [{ required: true, message: "父级角色名称不能为空", trigger: "blur" }],
- roleName: [{ required: true, message: "角色名称不能为空", trigger: "blur" }],
- roleLevel: [{ required: true, message: "角色级别不能为空", trigger: "blur" }],
- treeSel: [{ required: true, message: "权限不能为空", trigger: "blur" }],
- });
- // 项目导入
- const projectImportVisible = ref(false);
- const projectRef = ref();
- const projectFile = ref();
- // 获取账户列表
- const getList = async () => {
- loading.value = true;
- let params = {
- page: currentPage.value, // 当前页
- rows: pageSize.value, // 一页数据条数
- };
- let data = {
- roleName: searchInput.roleName,
- };
- if (searchInput.createTime) {
- data.createBy = searchInput.createTime[0];
- data.updateBy = searchInput.createTime[1];
- }
- let res = await axios({
- method: "post",
- url: api.value + "/api/sysRole/queryPageSysRole",
- headers: {
- tokenP: sessionStorage.getItem("tokenP"),
- user_head: sessionStorage.getItem("userhead"),
- },
- params: params,
- data:data
- });
- console.log(res, "查询角色分页数据");
- if (res.data.code == 200) {
- tableData.list = res.data.data.rows;
- total.value = res.data.data.total;
- loading.value = false;
- } else {
- loading.value = false;
- if(res.data.message.indexOf('Handler dispatch failed')!=-1){
- window.location.href =
- "https://chtech.ncjti.edu.cn/kpi/template/api/sysUser/authorize";
- }
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 搜索功能
- const searchBtn = lodash.debounce(async () => {
- getList();
- }, 300);
- const menuList = async () => {
- let res = await axios({
- method: "post",
- url: api.value + "/api/sysMenu/QueryMenuTreeRecords",
- headers: {
- tokenP: sessionStorage.getItem("tokenP"),
- user_head: sessionStorage.getItem("userhead"),
- },
- });
- console.log(res, "查看菜单");
- if (res.data.code == 200) {
- addtableData.list = res.data.data;
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 角色新增
- const addProjectbtn = async (flag, row) => {
- addRolesVisible.value = true;
- addRolesTitle.value = "角色新增";
- treeSelData.value = [];
- addRoleFlag.value = flag; // 判断是 父级添加 还是 子级添加
- console.log(flag, row);
- if (flag == 1) {
- addRoleRuleForm.pid = 0; // 父级角色ID
- addRoleRuleForm.pname = "/"; // 父级角色名称
- addRoleRuleForm.roleName = ""; // 角色名称
- addRoleRuleForm.roleLevel = "T0"; // 角色级别
- } else if (flag == 2) {
- addRoleRuleForm.pid = row.id;
- addRoleRuleForm.pname = row.roleName;
- addRoleRuleForm.roleName = "";
- addRoleRuleForm.roleLevel = "";
- }
- menuList();
- };
- // 勾选权限
- const handleCheckChange = (data, checked, indeterminate) => {
- // console.log(treeRef.value.getCheckedNodes());
- addtableData.list.forEach((i) => {
- i.state = 0;
- if (i.menuLists) {
- i.menuLists.forEach((item) => {
- item.state = 0;
- });
- }
- });
- if (treeRef.value.getCheckedNodes().length) {
- treeSelData.value = [];
- treeRef.value.getCheckedNodes().forEach((i) => {
- // 菜单权限
- if (i.pid == 0) {
- addtableData.list.forEach((item) => {
- if (i.id == item.id) {
- item.state = 1;
- }
- });
- }
- // 按钮权限
- else {
- // 将勾选的数据的state状态变为1
- addtableData.list.forEach((item) => {
- if (item.menuLists) {
- item.menuLists.forEach((row) => {
- if (row.id == i.id) {
- row.state = 1;
- }
- });
- }
- });
- }
- });
- addRoleRuleForm.treeSel = [];
- addtableData.list.forEach((i) => {
- addRoleRuleForm.treeSel.push({
- id: i.id,
- state: i.state,
- });
- if (i.menuLists) {
- i.menuLists.forEach((item) => {
- addRoleRuleForm.treeSel.push({
- id: item.id,
- state: item.state,
- });
- });
- }
- });
- // console.log(addtableData.list, "菜单数据");
- // console.log(addRoleRuleForm.treeSel, "勾选的菜单");
- }
- };
- // 确定编辑角色权限
- const confirmRoles = (formEl) => {
- if (!formEl) return;
- formEl.validate(async (valid, fields) => {
- if (valid) {
- addRolesLoading.value = true;
- let res = "";
- let data = {
- sysRole: {
- // pid: addRoleRuleForm.pid, // 父级角色ID,最高级为0
- // pname: addRoleRuleForm.pname, // 父级角色名称
- roleName: addRoleRuleForm.roleName, // 父级角色名称
- // roleLevel: addRoleRuleForm.roleLevel, // 角色级别
- },
- list: addRoleRuleForm.treeSel,
- };
- // 判断是否有id存在,有则是修改账号
- if (addRoleRuleForm.id) {
- data.sysRole.id = addRoleRuleForm.id;
- res = await axios({
- method: "post",
- url: api.value + "/api/sysRole/update",
- headers: {
- tokenP: sessionStorage.getItem("tokenP"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- } else {
- // 最大级添加
- // if (addRoleFlag.value == 1) {
- // } else if (addRoleFlag.value == 2) {
- // }
- res = await axios({
- method: "post",
- url: api.value + "/api/sysRole/add",
- headers: {
- tokenP: sessionStorage.getItem("tokenP"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- }
- console.log(data, "添加参数");
- console.log(res, "新增账号数据");
- if (res.data.code == 200) {
- addRolesVisible.value = false;
- addRolesLoading.value = false;
- getList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- addRolesLoading.value = false;
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- }
- });
- };
- // 取消角色新增
- const cancelAddRoles = () => {
- addRolesVisible.value = false;
- addRoleRuleForm.pid = "";
- addRoleRuleForm.pname = "";
- addRoleRuleForm.roleName = "";
- addRoleRuleForm.roleLevel = "";
- addRoleRef.value.resetFields();
- };
- //编辑项目
- const edit = (row) => {
- addRolesVisible.value = true;
- addRolesTitle.value = "角色编辑";
- addRoleRuleForm.id = row.id;
- // addRoleRuleForm.pid = row.pid;
- // addRoleRuleForm.pname = row.pname;
- addRoleRuleForm.roleName = row.roleName;
- addRoleRuleForm.roleLevel = row.roleLevel;
- menuList();
- nextTick(async () => {
- // console.log(row);
- let data = new FormData();
- data.append("roleId", row.id);
- let role = await axios({
- method: "post",
- url: api.value + "/api/sysRole/queryMenuByRole",
- headers: {
- tokenP: sessionStorage.getItem("tokenP"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(role, "查询角色菜单权限");
- if (role.data.code == 200) {
- // addtableData.list=role.data.data
- treeSelData.value = [];
- addRoleRuleForm.treeSel = [];
- role.data.data.forEach((i) => {
- addRoleRuleForm.treeSel.push({
- id: i.id,
- state: i.state,
- });
- if (i.menuLists) {
- i.menuLists.forEach((item) => {
- addRoleRuleForm.treeSel.push({
- id: item.id,
- state: item.state,
- });
- });
- }
- });
- // console.log(addtableData.list, "菜单数据");
- // console.log(addRoleRuleForm.treeSel, "勾选的菜单");
- let arr = [];
- addRoleRuleForm.treeSel.forEach((i) => {
- if (i.state == 1) {
- arr.push(i.id);
- }
- });
- treeRef.value.setCheckedKeys(arr);
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: role.data.message,
- center: true,
- });
- }
- });
- };
- const delRoles = async (row) => {
- console.log(row);
- let data = new FormData();
- data.append("id", row.id);
- let res = await axios({
- method: "post",
- url: api.value + "/api/sysRole/del",
- headers: {
- tokenP: sessionStorage.getItem("tokenP"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- if (res.data.code == 200) {
- getList();
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- // 导入项目
- const projectImportConfirm = async () => {
- let data = new FormData();
- data.set("file", projectFile.value);
- data.set("pageType", 1);
- let res = await axios({
- method: "POST",
- url: api.value + "/jgcloudProject/importExcelProject",
- headers: {
- tokenP: sessionStorage.getItem("tokenP"),
- user_head: sessionStorage.getItem("userhead"),
- },
- data: data,
- });
- console.log(res, "导入项目");
- if (res.data.code == 200) {
- projectImportVisible.value = false;
- getList();
- if (projectRef.value) {
- projectRef.value.clearFiles();
- }
- ElMessage({
- type: "success",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- } else {
- ElMessage({
- type: "error",
- showClose: true,
- message: res.data.message,
- center: true,
- });
- }
- };
- const cancelProjectImport = () => {
- projectRef.value.clearFiles();
- projectImportVisible.value = false;
- };
- // 多选框功能
- const handleSelectionChange = (val) => {
- console.log(val);
- selectData.list = val;
- };
- // 表格斑马纹颜色修改
- const tableRowClassName = ({ row, rowIndex }) => {
- if (rowIndex % 2 === 0) {
- return "even";
- } else if (rowIndex % 2 !== 0) {
- return "odd";
- }
- return "";
- };
- // 每页显示条数
- const handleSizeChange = (value) => {
- console.log(value, "每页显示条数");
- pageSize.value = value;
- getList();
- };
- // 分页
- const handleCurrentChange = (value) => {
- currentPage.value = value;
- getList();
- };
- onBeforeMount(() => {
- api.value = store.state.user.api;
- getList();
- });
- onUnmounted(() => {
- // document.removeEventListener("keyup", Enters);
- });
- </script>
- <style scoped lang="scss">
- .content-box {
- min-width: 1000px;
- width: calc(100vw - 260px);
- height: calc(100vh - 105px);
- margin: 20px auto;
- background-color: #fff;
- color: #fff;
- display: flex;
- flex-direction: column;
- box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
- .left {
- // width: calc(100wh - 40px);
- display: flex;
- align-items: center;
- height: 60px;
- margin: 0 30px;
- border-bottom: 1px solid #ccc;
- color: #000;
- font-size: 18px;
- font-weight: 600;
- .cameratxt {
- display: block;
- height: 60px;
- line-height: 60px;
- }
- }
- .middle {
- width: calc(100% - 60px);
- margin: 0 auto;
- color: #000;
- // border-bottom: 1px solid rgb(231, 231, 231);
- .filter {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- margin: 10px 0 0 0;
- .search {
- margin-left: 0 !important;
- color: #fff;
- background: linear-gradient(
- 90deg,
- rgba(33, 107, 255, 1) 0%,
- rgba(102, 182, 255, 1) 100%
- );
- border: none;
- }
- .reset {
- border: 1px solid rgba(38, 151, 255, 1);
- color: rgba(38, 151, 255, 1);
- }
- .condition {
- display: flex;
- align-items: center;
- margin: 10px 30px 10px 0;
- :deep(.el-input .el-input__inner) {
- font-size: 14px;
- }
- span {
- margin: 0 10px 0 0;
- }
- }
- }
- .gongneng {
- margin: 8px 0;
- // .el-button {
- // color: #fff;
- // border: none;
- // }
- .add {
- color: #fff;
- border: none;
- background: linear-gradient(
- 90deg,
- rgba(33, 107, 255, 1) 0%,
- rgba(102, 182, 255, 1) 100%
- );
- }
- .imp {
- border: 1px solid rgba(33, 107, 255, 1);
- color: rgba(33, 107, 255, 1);
- }
- }
- }
- .scroll {
- flex: 1;
- overflow: auto;
- }
- .footer {
- width: 96%;
- height: calc(100% - 82px);
- margin: 10px auto 10px;
- .el-table--fit {
- height: 100%;
- :deep(.el-table__header-wrapper) {
- background-color: #000;
- font-size: 14px;
- color: #000;
- .cell {
- color: #000;
- }
- }
- :deep(.el-table__row) {
- height: 50px;
- font-size: 14px;
- color: #000;
- }
- :deep(.el-table__row td) {
- padding: 0;
- border: 0;
- }
- .el-button--primary {
- margin-left: 5px;
- }
- :deep(.el-table__body .even) {
- background-color: #fff;
- }
- :deep(.el-table__body .odd) {
- background-color: rgba(240, 243, 247, 1);
- }
- :deep(.options) {
- display: flex;
- justify-content: center;
- align-items: center;
- .reset {
- margin-right: 15px;
- color: rgba(30, 125, 251, 1);
- cursor: pointer;
- }
- .look {
- margin-right: 15px;
- color: rgba(30, 125, 251, 1);
- cursor: pointer;
- }
- .del {
- color: rgba(212, 48, 48, 1);
- cursor: pointer;
- }
- }
- }
- }
- .el-pagination {
- width: calc(100vw - 300px);
- margin: 20px auto;
- justify-content: flex-end;
- :deep(.el-pagination__total) {
- color: #000;
- }
- :deep(.el-pagination__goto) {
- color: #000;
- }
- :deep(.el-pagination__classifier) {
- color: #000;
- }
- :deep(.el-input__wrapper) {
- // border: 1px solid rgba(0, 0, 0, 1);
- // border-radius: 5px;
- // box-shadow: none;
- width: 100px;
- }
- :deep(.el-pager li) {
- margin: 0 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.el-pager li.is-active) {
- // background-color: rgba(111, 182, 184, 1);
- color: rgba(0, 149, 255, 1);
- border: 1px solid rgba(0, 149, 255, 1);
- }
- :deep(.btn-prev) {
- margin-right: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- :deep(.btn-next) {
- margin-left: 5px;
- border: 1px solid rgba(0, 0, 0, 1);
- border-radius: 5px;
- background-color: transparent;
- }
- }
- // 添加角色
- :deep(.addRoles) {
- // height: 420px;
- border-radius: 11px;
- .el-dialog__header {
- border-radius: 11px 11px 0 0;
- background: rgba(237, 241, 245, 1);
- font-weight: 600;
- margin: 0;
- .el-dialog__headerbtn {
- outline: none;
- }
- }
- .el-dialog__body {
- padding: 20px 30px 10px 30px;
- .rolesName {
- margin: 15px 0;
- color: #000;
- height: 600px;
- overflow: auto;
- .rolePermission {
- margin: 10px 0;
- }
- }
- .el-table--fit {
- height: 100%;
- :deep(.el-table__header-wrapper) {
- background-color: #000;
- font-size: 14px;
- color: #000;
- .cell {
- color: #000;
- }
- }
- .el-table__row {
- height: 45px;
- font-size: 14px;
- color: #000;
- }
- .el-table__row td {
- // padding: 0;
- // border: 0;
- }
- .el-button--primary {
- margin-left: 5px;
- }
- :deep(.el-table__body .even) {
- background-color: #fff;
- }
- :deep(.el-table__body .odd) {
- background-color: rgba(240, 243, 247, 1);
- }
- }
- // table {
- // width: 840px;
- // // height: 600px;
- // tr {
- // td {
- // border-top: 1px solid #7c7c7c;
- // border-left: 1px solid #7c7c7c;
- // }
- // td:nth-child(1) {
- // width: 120px;
- // }
- // td:last-child {
- // border-right: 1px solid #7c7c7c;
- // padding: 10px 0;
- // .el-tree {
- // .el-tree-node__children {
- // display: flex;
- // flex-wrap: wrap;
- // .el-tree-node {
- // width: 140px;
- // .el-tree-node__content {
- // padding-left: 0 !important;
- // }
- // }
- // // border: 1px solid red;
- // }
- // }
- // }
- // }
- // tr:nth-child(1) {
- // td {
- // height: 40px;
- // }
- // }
- // tr:last-child {
- // td {
- // border-bottom: 1px solid #7c7c7c;
- // }
- // }
- // }
- .options {
- margin: 10px 20px 10px 0;
- width: 100%;
- .btn {
- display: flex;
- flex-direction: row-reverse;
- }
- .queding {
- color: #fff;
- margin-left: 15px;
- }
- }
- }
- }
- }
- .el-input {
- width: 192px;
- }
- </style>
- <style lang="scss">
- .usePrefabricate {
- height: 488px;
- .el-select-dropdown__wrap {
- max-height: 100%;
- }
- }
- </style>
|