feat:增加获取授权列表

This commit is contained in:
lixg
2022-11-26 09:35:42 +08:00
parent 7fa58e7869
commit be0060ca3a
4 changed files with 2995 additions and 2933 deletions

View File

@@ -283,8 +283,24 @@ export default {
api
.optionAuthPerm(obj)
.then((res) => {
console.log("获取权限名单成功", res);
if (res.data.code === 200) {
console.log("获取权限名单成功", res.data.data.records);
let arr = res.data.data.records;
let array = [];
arr.map((value) => {
let obj = {
key: value.id,
id: value.memberNo,
name: value.memberName ? value.memberName : "-",
com: value.orgName ? value.orgName : "-",
gang: "产品经理",
number: "20201234",
state: "管理权",
};
array.push(obj);
});
state.tableDataTotal = res.data.data.total;
}
})

View File

@@ -111,11 +111,11 @@
<span>您确定要取消该用户的授权吗</span>
</div>
<div class="del_btnbox">
<div class="del_btn btn1">
<div class="btnText" @click="delete_exit">取消</div>
<div class="del_btn btn1" @click="closeCancelModal">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn2">
<div class="btnText" @click="delete_exit">确定</div>
<div class="del_btn btn2" @click="cancelAuth">
<div class="btnText">确定</div>
</div>
</div>
</div>
@@ -124,8 +124,8 @@
<div class="botm"></div>
<div class="btnn">
<button class="btn1">取消</button>
<button class="btn2">确定</button>
<button class="btn1" @click="closeCancelModal">取消</button>
<button class="btn2" @click="closeCancelModal">确定</button>
</div>
</a-drawer>
</template>
@@ -167,6 +167,7 @@ export default {
// state: "管理权",
// },
],
cancelAuthId: null, //取消授权id
});
const closeDrawer = () => {
@@ -182,8 +183,9 @@ export default {
console.log("selectedRowKeys changed: ", selectedRowKeys);
state.selectedRowKeys = selectedRowKeys;
};
const showCancelModal = () => {
const showCancelModal = (id) => {
state.cancelModal = true;
state.cancelAuthId = id;
};
const closeCancelModal = () => {
state.cancelModal = false;
@@ -252,12 +254,12 @@ export default {
width: 100,
align: "center",
scopedSlots: { customRender: "action" }, //引入的插槽
customRender: () => {
customRender: (text) => {
return (
<div
class="opa"
onClick={() => {
showCancelModal();
showCancelModal(text.record.id);
}}
>
取消授权
@@ -284,8 +286,26 @@ export default {
api
.optionAuthPerm(obj)
.then((res) => {
console.log("获取权限名单成功", res);
// console.log("获取权限名单成功", res);
if (res.data.code === 200) {
console.log("获取权限名单成功", res.data.data.records);
let arr = res.data.data.records;
let array = [];
arr.map((value) => {
let obj = {
key: value.id,
id: value.id,
name: value.memberName ? value.memberName : "-",
com: value.orgName ? value.orgName : "-",
gang: "产品经理",
number: "20201234",
state: "管理权",
};
array.push(obj);
});
state.tableData = array;
state.tableDataTotal = res.data.data.total;
}
})
@@ -310,6 +330,32 @@ export default {
state.name = null;
optionAuthPerm();
};
//取消授权
const cancelAuth = () => {
let obj = {
keyWord: "",
type: 2,
tag: 1,
opt: 4,
refId: state.cancelAuthId,
pageNo: 1,
pageSize: 20,
};
console.log("获取权限名单obj", obj);
api
.optionAuthPerm(obj)
.then((res) => {
// console.log("获取权限名单成功", res);
if (res.data.code === 200) {
console.log("取消授权成功", res.data.data);
optionAuthPerm();
}
})
.catch((err) => {
console.log("取消授权失败", err);
});
};
return {
...toRefs(state),
closeDrawer,
@@ -321,6 +367,7 @@ export default {
changePagination,
searchAuth,
resetAuth,
cancelAuth,
};
},
};

View File

@@ -2,11 +2,12 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-09 09:26:26
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-25 17:35:53
* @LastEditTime: 2022-11-25 17:37:05
* @FilePath: /fe-manage/src/views/courselibrary/CourseManage.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 课件管理页面 -->
<!-- sandbox="allow-forms allow-scripts allow-same-origin allow-popups" -->
<template>
<div class="courseManage">
<iframe
@@ -16,7 +17,7 @@
frameborder="0"
name="myframe"
security="restricted"
sandbox=""
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
></iframe>
</div>
</template>

File diff suppressed because it is too large Load Diff