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 api
.optionAuthPerm(obj) .optionAuthPerm(obj)
.then((res) => { .then((res) => {
console.log("获取权限名单成功", res);
if (res.data.code === 200) { 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; state.tableDataTotal = res.data.data.total;
} }
}) })

View File

@@ -111,11 +111,11 @@
<span>您确定要取消该用户的授权吗</span> <span>您确定要取消该用户的授权吗</span>
</div> </div>
<div class="del_btnbox"> <div class="del_btnbox">
<div class="del_btn btn1"> <div class="del_btn btn1" @click="closeCancelModal">
<div class="btnText" @click="delete_exit">取消</div> <div class="btnText">取消</div>
</div> </div>
<div class="del_btn btn2"> <div class="del_btn btn2" @click="cancelAuth">
<div class="btnText" @click="delete_exit">确定</div> <div class="btnText">确定</div>
</div> </div>
</div> </div>
</div> </div>
@@ -124,8 +124,8 @@
<div class="botm"></div> <div class="botm"></div>
<div class="btnn"> <div class="btnn">
<button class="btn1">取消</button> <button class="btn1" @click="closeCancelModal">取消</button>
<button class="btn2">确定</button> <button class="btn2" @click="closeCancelModal">确定</button>
</div> </div>
</a-drawer> </a-drawer>
</template> </template>
@@ -167,6 +167,7 @@ export default {
// state: "管理权", // state: "管理权",
// }, // },
], ],
cancelAuthId: null, //取消授权id
}); });
const closeDrawer = () => { const closeDrawer = () => {
@@ -182,8 +183,9 @@ export default {
console.log("selectedRowKeys changed: ", selectedRowKeys); console.log("selectedRowKeys changed: ", selectedRowKeys);
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
}; };
const showCancelModal = () => { const showCancelModal = (id) => {
state.cancelModal = true; state.cancelModal = true;
state.cancelAuthId = id;
}; };
const closeCancelModal = () => { const closeCancelModal = () => {
state.cancelModal = false; state.cancelModal = false;
@@ -252,12 +254,12 @@ export default {
width: 100, width: 100,
align: "center", align: "center",
scopedSlots: { customRender: "action" }, //引入的插槽 scopedSlots: { customRender: "action" }, //引入的插槽
customRender: () => { customRender: (text) => {
return ( return (
<div <div
class="opa" class="opa"
onClick={() => { onClick={() => {
showCancelModal(); showCancelModal(text.record.id);
}} }}
> >
取消授权 取消授权
@@ -284,8 +286,26 @@ export default {
api api
.optionAuthPerm(obj) .optionAuthPerm(obj)
.then((res) => { .then((res) => {
console.log("获取权限名单成功", res); // console.log("获取权限名单成功", res);
if (res.data.code === 200) { 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; state.tableDataTotal = res.data.data.total;
} }
}) })
@@ -310,6 +330,32 @@ export default {
state.name = null; state.name = null;
optionAuthPerm(); 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 { return {
...toRefs(state), ...toRefs(state),
closeDrawer, closeDrawer,
@@ -321,6 +367,7 @@ export default {
changePagination, changePagination,
searchAuth, searchAuth,
resetAuth, resetAuth,
cancelAuth,
}; };
}, },
}; };

View File

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

View File

@@ -1023,32 +1023,32 @@
</div> </div>
</a-modal> </a-modal>
</div> </div>
</template> </template>
<script> <script>
import { reactive, toRefs, onMounted, onUnmounted, onUpdated } from "vue"; import { reactive, toRefs, onMounted, onUnmounted, onUpdated } from "vue";
import AddOnline from "../../components/drawers/AddOnline.vue"; import AddOnline from "../../components/drawers/AddOnline.vue";
import EditOnline from "../../components/drawers/EditOnline.vue"; import EditOnline from "../../components/drawers/EditOnline.vue";
import AddFaceteach from "../../components/drawers/AddFaceteach.vue"; import AddFaceteach from "../../components/drawers/AddFaceteach.vue";
import AddCase from "../../components/drawers/AddCase.vue"; import AddCase from "../../components/drawers/AddCase.vue";
import AddHomework from "../../components/drawers/AddHomework.vue"; import AddHomework from "../../components/drawers/AddHomework.vue";
import AddTest from "../../components/drawers/AddTest.vue"; import AddTest from "../../components/drawers/AddTest.vue";
import AddLive from "../../components/drawers/AddLive.vue"; import AddLive from "../../components/drawers/AddLive.vue";
import AddRef from "../../components/drawers/AddRef.vue"; import AddRef from "../../components/drawers/AddRef.vue";
import AddDiscuss from "../../components/drawers/AddDiscuss.vue"; import AddDiscuss from "../../components/drawers/AddDiscuss.vue";
import AddActive from "../../components/drawers/AddActive.vue"; import AddActive from "../../components/drawers/AddActive.vue";
import AddEval from "../../components/drawers/AddEval.vue"; import AddEval from "../../components/drawers/AddEval.vue";
import AddInvist from "../../components/drawers/AddInvist.vue"; import AddInvist from "../../components/drawers/AddInvist.vue";
import AddVote from "../../components/vote/AddVote.vue"; import AddVote from "../../components/vote/AddVote.vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import * as api from "../../api/indexTemplate"; import * as api from "../../api/indexTemplate";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import { storage } from "../../api/storage"; import { storage } from "../../api/storage";
import UnlockMode from "../../components/drawers/UnlockMode.vue"; import UnlockMode from "../../components/drawers/UnlockMode.vue";
import {useStore} from "vuex"; import { useStore } from "vuex";
// import * as api1 from "../../api/index1"; // import * as api1 from "../../api/index1";
const drawercolumns = [ const drawercolumns = [
{ {
title: "项目名称", title: "项目名称",
dataIndex: "projectName", dataIndex: "projectName",
@@ -1085,8 +1085,8 @@
width: 180, width: 180,
align: "center", align: "center",
}, },
]; ];
export default { export default {
name: "TaskAdd", name: "TaskAdd",
components: { components: {
draggable, draggable,
@@ -1507,7 +1507,7 @@
//获取任务列表 //获取任务列表
const getTask = () => { const getTask = () => {
state.tableData = [] state.tableData = [];
api api
.templateDetail(store.state.projectTemplateId) .templateDetail(store.state.projectTemplateId)
.then((res) => { .then((res) => {
@@ -1526,18 +1526,18 @@
if (stage !== "null") { if (stage !== "null") {
console.log(stage); console.log(stage);
let stageList = res.data.data.stageList; //阶段数组 let stageList = res.data.data.stageList; //阶段数组
let result = stageList.find((item) => item.templateStageId == stage); let result = stageList.find(
(item) => item.templateStageId == stage
);
console.log("又找到了", result); console.log("又找到了", result);
changebgc(res.data.data.stageList[0].templateStageId); changebgc(res.data.data.stageList[0].templateStageId);
getTableData(result.taskList); getTableData(result.taskList);
} else { } else {
let arr = res.data.data.stageList[0].taskList; let arr = res.data.data.stageList[0].taskList;
console.log("任务列表", arr); console.log("任务列表", arr);
changebgc(res.data.data.stageList[0].templateStageId); changebgc(res.data.data.stageList[0].templateStageId);
getTableData(arr); getTableData(arr);
// state.isActive = true; // state.isActive = true;
} }
// 每次都获取了第一条taskList // 每次都获取了第一条taskList
@@ -1562,7 +1562,8 @@
if (stageid !== "null") { if (stageid !== "null") {
state.chooseStageId = stageid; state.chooseStageId = stageid;
} else { } else {
state.chooseStageId = leng > 0 ? stagearr[0].templateStageId : null; state.chooseStageId =
leng > 0 ? stagearr[0].templateStageId : null;
} }
} }
}) })
@@ -1589,7 +1590,7 @@
.deleteTask(state.deleteID) .deleteTask(state.deleteID)
.then((res) => { .then((res) => {
console.log(res, "gggggggggggggggg"); console.log(res, "gggggggggggggggg");
getTask() getTask();
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
@@ -1644,7 +1645,6 @@
let arr = state.selectRow; let arr = state.selectRow;
console.log("选择的行信息", arr); console.log("选择的行信息", arr);
arr.map(() => { arr.map(() => {
api api
.deleteTask(arr) .deleteTask(arr)
.then((res) => { .then((res) => {
@@ -1687,7 +1687,6 @@
state.valuesname = ""; state.valuesname = "";
state.valuesnotice = ""; state.valuesnotice = "";
state.updateStageID = null; state.updateStageID = null;
}; };
//显示添加阶段弹窗 //显示添加阶段弹窗
const showModal = (element) => { const showModal = (element) => {
@@ -1712,7 +1711,7 @@
name: state.valuesname, name: state.valuesname,
projectTemplateId: store.state.projectTemplateId, projectTemplateId: store.state.projectTemplateId,
remark: state.valuesnotice, remark: state.valuesnotice,
stageId:state.updateStageID, stageId: state.updateStageID,
}; };
api api
.editStage(obj) .editStage(obj)
@@ -1734,7 +1733,7 @@
name: state.valuesname, name: state.valuesname,
projectTemplateId: store.state.projectTemplateId, projectTemplateId: store.state.projectTemplateId,
remark: state.valuesnotice, remark: state.valuesnotice,
stageId:0, stageId: 0,
}; };
api api
.editStage(obj) .editStage(obj)
@@ -1784,8 +1783,7 @@
document.getElementsByTagName("main")[0].style.boxShadow = "none"; document.getElementsByTagName("main")[0].style.boxShadow = "none";
getTask(); getTask();
}); });
onUpdated(() => { onUpdated(() => {});
});
onUnmounted(() => { onUnmounted(() => {
document.getElementsByTagName("main")[0].style.background = "#ffffff"; document.getElementsByTagName("main")[0].style.background = "#ffffff";
document.getElementsByTagName("main")[0].style.boxShadow = document.getElementsByTagName("main")[0].style.boxShadow =
@@ -2076,17 +2074,17 @@
showModeVisible, showModeVisible,
}; };
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
// .ant-input { // .ant-input {
// border-radius: 8px; // border-radius: 8px;
// // height: 120%; // // height: 120%;
// width: 384px; // width: 384px;
// height: 88px; // height: 88px;
// } // }
.ConfirmModal { .ConfirmModal {
.ant-modal { .ant-modal {
width: 424px !important; width: 424px !important;
height: 258px !important; height: 258px !important;
@@ -2196,8 +2194,8 @@
} }
} }
} }
} }
.addstage { .addstage {
.ant-modal { .ant-modal {
.ant-modal-body { .ant-modal-body {
padding: 0 !important; padding: 0 !important;
@@ -2290,8 +2288,8 @@
} }
} }
} }
} }
.moveModal { .moveModal {
.ant-modal { .ant-modal {
width: 549px !important; width: 549px !important;
height: 245px !important; height: 245px !important;
@@ -2391,113 +2389,113 @@
} }
} }
} }
} }
// .info { // .info {
// width: 78%; // width: 78%;
// // background-color: lightcoral; // // background-color: lightcoral;
// display: flex; // display: flex;
// margin-top: 30px; // margin-top: 30px;
// // align-items: center; // // align-items: center;
// // height: 40px; // // height: 40px;
// // border: 1px solid black; // // border: 1px solid black;
// .inname { // .inname {
// color: #6f6f6f; // color: #6f6f6f;
// font-size: 14px; // font-size: 14px;
// margin-left: 26px; // margin-left: 26px;
// margin-top: 15px; // margin-top: 15px;
// } // }
// .in { // .in {
// margin-left: 14px; // margin-left: 14px;
// width: 81%; // width: 81%;
// position: relative; // position: relative;
// .ant-input { // .ant-input {
// border-radius: 5px; // border-radius: 5px;
// // height: 120%; // // height: 120%;
// width: 100%; // width: 100%;
// height: 130px; // height: 130px;
// resize: none; // resize: none;
// } // }
// } // }
// } // }
// .drawerStyle { // .drawerStyle {
// .ant-drawer-content-wrapper { // .ant-drawer-content-wrapper {
// // max-width: 1000px; // // max-width: 1000px;
// .ant-drawer-header { // .ant-drawer-header {
// display: none !important; // display: none !important;
// } // }
// .ant-drawer-body { // .ant-drawer-body {
// padding: 0; // padding: 0;
// } // }
// } // }
// .drawerMain { // .drawerMain {
// min-width: 600px; // min-width: 600px;
// margin: 0px 32px 0px 32px; // margin: 0px 32px 0px 32px;
// overflow-x: auto; // overflow-x: auto;
// display: flex; // display: flex;
// flex-direction: column; // flex-direction: column;
// .header { // .header {
// height: 73px; // height: 73px;
// border-bottom: 1px solid #e8e8e8; // border-bottom: 1px solid #e8e8e8;
// display: flex; // display: flex;
// justify-content: space-between; // justify-content: space-between;
// align-items: center; // align-items: center;
// // background-color: red; // // background-color: red;
// margin-bottom: 20px; // margin-bottom: 20px;
// .headerTitle { // .headerTitle {
// font-size: 18px; // font-size: 18px;
// font-weight: 600; // font-weight: 600;
// color: #333333; // color: #333333;
// line-height: 25px; // line-height: 25px;
// // margin-left: 24px; // // margin-left: 24px;
// } // }
// } // }
// .drawerbox { // .drawerbox {
// margin: 20px 38px 30px; // margin: 20px 38px 30px;
// th { // th {
// background-color: #eff4fc !important; // background-color: #eff4fc !important;
// } // }
// .ant-table-tbody // .ant-table-tbody
// > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) // > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
// > td { // > td {
// background: #f6f9fd; // background: #f6f9fd;
// } // }
// } // }
// .btnn { // .btnn {
// height: 72px; // height: 72px;
// width: 100%; // width: 100%;
// position: absolute; // position: absolute;
// bottom: 0; // bottom: 0;
// left: 0; // left: 0;
// display: flex; // display: flex;
// align-items: center; // align-items: center;
// justify-content: center; // justify-content: center;
// box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16); // box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
// .btn1 { // .btn1 {
// width: 100px; // width: 100px;
// height: 40px; // height: 40px;
// border: 1px solid #4ea6ff; // border: 1px solid #4ea6ff;
// border-radius: 8px; // border-radius: 8px;
// color: #4ea6ff; // color: #4ea6ff;
// background-color: #fff; // background-color: #fff;
// cursor: pointer; // cursor: pointer;
// } // }
// .btn2 { // .btn2 {
// cursor: pointer; // cursor: pointer;
// width: 100px; // width: 100px;
// height: 40px; // height: 40px;
// background: #4ea6ff; // background: #4ea6ff;
// border-radius: 8px; // border-radius: 8px;
// border: 0; // border: 0;
// margin-left: 15px; // margin-left: 15px;
// color: #fff; // color: #fff;
// } // }
// } // }
// } // }
// } // }
.taskadd { .taskadd {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -3182,6 +3180,6 @@
} }
} }
} }
} }
</style> </style>