mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
feat:新增项目授权名单 添加阶段 取消阶段弹窗
This commit is contained in:
546
src/components/drawers/ProjPowerList.vue
Normal file
546
src/components/drawers/ProjPowerList.vue
Normal file
@@ -0,0 +1,546 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="ProjPvisible"
|
||||
class="drawerStyle ProjPowerList"
|
||||
placement="right"
|
||||
width="60%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">授权名单</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="search">
|
||||
<div class="leftchoose">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">姓名:</div>
|
||||
<a-input
|
||||
v-model:value="name"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btns">
|
||||
<div class="btn btn1" style="margin-right: 20px">
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tableBox" style="margin-top: 10px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:scroll="{ x: 900, y: 400 }"
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
columnWidth: 30,
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: onSelectChange,
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
/>
|
||||
</div>
|
||||
<!-- <div class="tab" style="margin-top: 20px; margin-bottom: 100px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ x: 900, y: 350 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
columnWidth: 30,
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: onSelectChange,
|
||||
}"
|
||||
/>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- 取消授权弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="cancelModal"
|
||||
:footer="null"
|
||||
:closable="closeCancel"
|
||||
wrapClassName="CopyModal"
|
||||
centered="true"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
<div class="header">
|
||||
<div class="icon"></div>
|
||||
<span>提示</span>
|
||||
<div class="close_exit" @click="closeCancelModal"></div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span>是否取消当前用户对此数据的权限</span>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn1">
|
||||
<div class="btnText" @click="delete_exit">取消</div>
|
||||
</div>
|
||||
<div class="del_btn btn2">
|
||||
<div class="btnText" @click="delete_exit">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
|
||||
<div class="botm"></div>
|
||||
<div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive } from "vue";
|
||||
export default {
|
||||
name: "ProjPowerList",
|
||||
props: {
|
||||
ProjPvisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
name: null,
|
||||
showmodal: false, //勾选提示框
|
||||
closable: false, //modal右上角的关闭按钮
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 100,
|
||||
selectedRowKeys: [],
|
||||
cancelModal: false, //取消授权弹窗
|
||||
closeCancel: false, //取消授权弹窗关闭图标
|
||||
tableData: [
|
||||
{
|
||||
key: 1,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
|
||||
state: "管理权",
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
|
||||
state: "管理权",
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
|
||||
state: "管理权",
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
|
||||
state: "管理权",
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
|
||||
state: "管理权",
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
|
||||
state: "归属权",
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
|
||||
state: "查看权",
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
state: "管理权",
|
||||
},
|
||||
{
|
||||
key: 9,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
state: "管理权",
|
||||
},
|
||||
{
|
||||
key: 10,
|
||||
name: "张三",
|
||||
com: "产研部",
|
||||
gang: "产品经理",
|
||||
state: "管理权",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:ProjPvisible", false);
|
||||
};
|
||||
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
};
|
||||
const showCancelModal = () => {
|
||||
state.cancelModal = true;
|
||||
};
|
||||
const closeCancelModal = () => {
|
||||
state.cancelModal = false;
|
||||
};
|
||||
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "name",
|
||||
// width: "30%",
|
||||
key: "name",
|
||||
width: 70,
|
||||
align: "left",
|
||||
className: "classify",
|
||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
customRender: (text) => {
|
||||
// console.log(text.record.checked1);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.name}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "归属组织",
|
||||
dataIndex: "com",
|
||||
// width: "30%",
|
||||
key: "com",
|
||||
width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "所在岗位",
|
||||
dataIndex: "gang",
|
||||
key: "gang",
|
||||
width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
|
||||
{
|
||||
title: "拥有权限",
|
||||
dataIndex: "state",
|
||||
key: "state",
|
||||
width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
className: "h",
|
||||
dataIndex: "opacation",
|
||||
key: "opacation",
|
||||
width: 100,
|
||||
align: "center",
|
||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
customRender: () => {
|
||||
return (
|
||||
<div
|
||||
class="opa"
|
||||
onClick={() => {
|
||||
showCancelModal();
|
||||
}}
|
||||
>
|
||||
取消授权
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
return columns;
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
closeDrawer,
|
||||
onSelectChange,
|
||||
tableDataFunc,
|
||||
showCancelModal,
|
||||
closeCancelModal,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" >
|
||||
.me {
|
||||
.ant-modal-body {
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.ProjPowerList {
|
||||
// width: 80%;
|
||||
.ant-drawer-content-wrapper {
|
||||
// max-width: 1000px;
|
||||
.ant-drawer-header {
|
||||
display: none !important;
|
||||
}
|
||||
.ant-drawer-body {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: scroll;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
margin-bottom: 20px;
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
// margin-left: 24px;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// background-color: #bfa;
|
||||
// overflow-y: auto;
|
||||
.search {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
justify-content: space-between;
|
||||
.leftchoose {
|
||||
display: flex;
|
||||
margin-right: 20px;
|
||||
.namecon {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
margin-bottom: 10px;
|
||||
.name {
|
||||
margin-top: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
// .name {
|
||||
// margin-top: 8px;
|
||||
|
||||
// color: rgba(0, 0, 0, 0.85);
|
||||
// font-size: 14px;
|
||||
// font-weight: 400;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.img1 {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url(../../assets/images/courseManage/search0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../assets/images/courseManage/reset1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #388be1;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
color: #388be1;
|
||||
border: 1px solid #388be1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tableBox {
|
||||
// margin-bottom: 80px;
|
||||
|
||||
.classify {
|
||||
// margin-left: 11px !important;
|
||||
// padding-left: 9px !important;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
.ant-checkbox-wrapper {
|
||||
align-items: center;
|
||||
margin-top: -2px;
|
||||
}
|
||||
.ant-table-selection-column {
|
||||
padding: 0px !important;
|
||||
// padding-left: 45px !important;
|
||||
}
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1);
|
||||
}
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
.opa {
|
||||
// background-color: #bfa;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #388be1;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.pa {
|
||||
// left: 0;
|
||||
margin-top: 25px;
|
||||
margin-bottom: 70px;
|
||||
width: 100%;
|
||||
// height: 20px;
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
// position: absolute;
|
||||
// bottom: 20px;
|
||||
}
|
||||
// .tab {
|
||||
// .ant-table-thead > tr > th {
|
||||
// background-color: rgba(239, 244, 252, 1) !important;
|
||||
// }
|
||||
|
||||
// th.h {
|
||||
// background-color: #eff4fc !important;
|
||||
// }
|
||||
|
||||
// .ant-table-tbody
|
||||
// > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
// > td {
|
||||
// background: #f6f9fd;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
// .botm {
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// background-color: red;
|
||||
// // flex-shrink: 1;
|
||||
// }
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user