mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 15:56:47 +08:00
feat:增加获取授权列表
This commit is contained in:
@@ -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;
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1023,32 +1023,32 @@
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted, onUnmounted, onUpdated } from "vue";
|
||||
import AddOnline from "../../components/drawers/AddOnline.vue";
|
||||
import EditOnline from "../../components/drawers/EditOnline.vue";
|
||||
import AddFaceteach from "../../components/drawers/AddFaceteach.vue";
|
||||
import AddCase from "../../components/drawers/AddCase.vue";
|
||||
import AddHomework from "../../components/drawers/AddHomework.vue";
|
||||
import AddTest from "../../components/drawers/AddTest.vue";
|
||||
import AddLive from "../../components/drawers/AddLive.vue";
|
||||
import AddRef from "../../components/drawers/AddRef.vue";
|
||||
import AddDiscuss from "../../components/drawers/AddDiscuss.vue";
|
||||
import AddActive from "../../components/drawers/AddActive.vue";
|
||||
import AddEval from "../../components/drawers/AddEval.vue";
|
||||
import AddInvist from "../../components/drawers/AddInvist.vue";
|
||||
import AddVote from "../../components/vote/AddVote.vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/indexTemplate";
|
||||
import draggable from "vuedraggable";
|
||||
import { storage } from "../../api/storage";
|
||||
import UnlockMode from "../../components/drawers/UnlockMode.vue";
|
||||
import {useStore} from "vuex";
|
||||
// import * as api1 from "../../api/index1";
|
||||
import { reactive, toRefs, onMounted, onUnmounted, onUpdated } from "vue";
|
||||
import AddOnline from "../../components/drawers/AddOnline.vue";
|
||||
import EditOnline from "../../components/drawers/EditOnline.vue";
|
||||
import AddFaceteach from "../../components/drawers/AddFaceteach.vue";
|
||||
import AddCase from "../../components/drawers/AddCase.vue";
|
||||
import AddHomework from "../../components/drawers/AddHomework.vue";
|
||||
import AddTest from "../../components/drawers/AddTest.vue";
|
||||
import AddLive from "../../components/drawers/AddLive.vue";
|
||||
import AddRef from "../../components/drawers/AddRef.vue";
|
||||
import AddDiscuss from "../../components/drawers/AddDiscuss.vue";
|
||||
import AddActive from "../../components/drawers/AddActive.vue";
|
||||
import AddEval from "../../components/drawers/AddEval.vue";
|
||||
import AddInvist from "../../components/drawers/AddInvist.vue";
|
||||
import AddVote from "../../components/vote/AddVote.vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/indexTemplate";
|
||||
import draggable from "vuedraggable";
|
||||
import { storage } from "../../api/storage";
|
||||
import UnlockMode from "../../components/drawers/UnlockMode.vue";
|
||||
import { useStore } from "vuex";
|
||||
// import * as api1 from "../../api/index1";
|
||||
|
||||
const drawercolumns = [
|
||||
const drawercolumns = [
|
||||
{
|
||||
title: "项目名称",
|
||||
dataIndex: "projectName",
|
||||
@@ -1085,8 +1085,8 @@
|
||||
width: 180,
|
||||
align: "center",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
];
|
||||
export default {
|
||||
name: "TaskAdd",
|
||||
components: {
|
||||
draggable,
|
||||
@@ -1507,7 +1507,7 @@
|
||||
|
||||
//获取任务列表
|
||||
const getTask = () => {
|
||||
state.tableData = []
|
||||
state.tableData = [];
|
||||
api
|
||||
.templateDetail(store.state.projectTemplateId)
|
||||
.then((res) => {
|
||||
@@ -1526,18 +1526,18 @@
|
||||
if (stage !== "null") {
|
||||
console.log(stage);
|
||||
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);
|
||||
changebgc(res.data.data.stageList[0].templateStageId);
|
||||
getTableData(result.taskList);
|
||||
|
||||
} else {
|
||||
let arr = res.data.data.stageList[0].taskList;
|
||||
console.log("任务列表", arr);
|
||||
changebgc(res.data.data.stageList[0].templateStageId);
|
||||
getTableData(arr);
|
||||
// state.isActive = true;
|
||||
|
||||
}
|
||||
|
||||
// 每次都获取了第一条taskList
|
||||
@@ -1562,7 +1562,8 @@
|
||||
if (stageid !== "null") {
|
||||
state.chooseStageId = stageid;
|
||||
} else {
|
||||
state.chooseStageId = leng > 0 ? stagearr[0].templateStageId : null;
|
||||
state.chooseStageId =
|
||||
leng > 0 ? stagearr[0].templateStageId : null;
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1589,7 +1590,7 @@
|
||||
.deleteTask(state.deleteID)
|
||||
.then((res) => {
|
||||
console.log(res, "gggggggggggggggg");
|
||||
getTask()
|
||||
getTask();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
@@ -1644,7 +1645,6 @@
|
||||
let arr = state.selectRow;
|
||||
console.log("选择的行信息", arr);
|
||||
arr.map(() => {
|
||||
|
||||
api
|
||||
.deleteTask(arr)
|
||||
.then((res) => {
|
||||
@@ -1687,7 +1687,6 @@
|
||||
state.valuesname = "";
|
||||
state.valuesnotice = "";
|
||||
state.updateStageID = null;
|
||||
|
||||
};
|
||||
//显示添加阶段弹窗
|
||||
const showModal = (element) => {
|
||||
@@ -1712,7 +1711,7 @@
|
||||
name: state.valuesname,
|
||||
projectTemplateId: store.state.projectTemplateId,
|
||||
remark: state.valuesnotice,
|
||||
stageId:state.updateStageID,
|
||||
stageId: state.updateStageID,
|
||||
};
|
||||
api
|
||||
.editStage(obj)
|
||||
@@ -1734,7 +1733,7 @@
|
||||
name: state.valuesname,
|
||||
projectTemplateId: store.state.projectTemplateId,
|
||||
remark: state.valuesnotice,
|
||||
stageId:0,
|
||||
stageId: 0,
|
||||
};
|
||||
api
|
||||
.editStage(obj)
|
||||
@@ -1784,8 +1783,7 @@
|
||||
document.getElementsByTagName("main")[0].style.boxShadow = "none";
|
||||
getTask();
|
||||
});
|
||||
onUpdated(() => {
|
||||
});
|
||||
onUpdated(() => {});
|
||||
onUnmounted(() => {
|
||||
document.getElementsByTagName("main")[0].style.background = "#ffffff";
|
||||
document.getElementsByTagName("main")[0].style.boxShadow =
|
||||
@@ -2076,17 +2074,17 @@
|
||||
showModeVisible,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// .ant-input {
|
||||
// border-radius: 8px;
|
||||
// // height: 120%;
|
||||
// width: 384px;
|
||||
// height: 88px;
|
||||
// }
|
||||
.ConfirmModal {
|
||||
// .ant-input {
|
||||
// border-radius: 8px;
|
||||
// // height: 120%;
|
||||
// width: 384px;
|
||||
// height: 88px;
|
||||
// }
|
||||
.ConfirmModal {
|
||||
.ant-modal {
|
||||
width: 424px !important;
|
||||
height: 258px !important;
|
||||
@@ -2196,8 +2194,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.addstage {
|
||||
}
|
||||
.addstage {
|
||||
.ant-modal {
|
||||
.ant-modal-body {
|
||||
padding: 0 !important;
|
||||
@@ -2290,8 +2288,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.moveModal {
|
||||
}
|
||||
.moveModal {
|
||||
.ant-modal {
|
||||
width: 549px !important;
|
||||
height: 245px !important;
|
||||
@@ -2391,113 +2389,113 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// .info {
|
||||
// width: 78%;
|
||||
// // background-color: lightcoral;
|
||||
// display: flex;
|
||||
// margin-top: 30px;
|
||||
// // align-items: center;
|
||||
// // height: 40px;
|
||||
// // border: 1px solid black;
|
||||
}
|
||||
// .info {
|
||||
// width: 78%;
|
||||
// // background-color: lightcoral;
|
||||
// display: flex;
|
||||
// margin-top: 30px;
|
||||
// // align-items: center;
|
||||
// // height: 40px;
|
||||
// // border: 1px solid black;
|
||||
|
||||
// .inname {
|
||||
// color: #6f6f6f;
|
||||
// font-size: 14px;
|
||||
// margin-left: 26px;
|
||||
// margin-top: 15px;
|
||||
// }
|
||||
// .in {
|
||||
// margin-left: 14px;
|
||||
// width: 81%;
|
||||
// position: relative;
|
||||
// .ant-input {
|
||||
// border-radius: 5px;
|
||||
// // height: 120%;
|
||||
// width: 100%;
|
||||
// height: 130px;
|
||||
// resize: none;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// .inname {
|
||||
// color: #6f6f6f;
|
||||
// font-size: 14px;
|
||||
// margin-left: 26px;
|
||||
// margin-top: 15px;
|
||||
// }
|
||||
// .in {
|
||||
// margin-left: 14px;
|
||||
// width: 81%;
|
||||
// position: relative;
|
||||
// .ant-input {
|
||||
// border-radius: 5px;
|
||||
// // height: 120%;
|
||||
// width: 100%;
|
||||
// height: 130px;
|
||||
// resize: none;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// .drawerStyle {
|
||||
// .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: auto;
|
||||
// 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;
|
||||
// }
|
||||
// }
|
||||
// .drawerbox {
|
||||
// margin: 20px 38px 30px;
|
||||
// th {
|
||||
// background-color: #eff4fc !important;
|
||||
// }
|
||||
// .drawerStyle {
|
||||
// .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: auto;
|
||||
// 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;
|
||||
// }
|
||||
// }
|
||||
// .drawerbox {
|
||||
// margin: 20px 38px 30px;
|
||||
// th {
|
||||
// background-color: #eff4fc !important;
|
||||
// }
|
||||
|
||||
// .ant-table-tbody
|
||||
// > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
// > td {
|
||||
// background: #f6f9fd;
|
||||
// }
|
||||
// }
|
||||
// .btnn {
|
||||
// height: 72px;
|
||||
// width: 100%;
|
||||
// position: absolute;
|
||||
// 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;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
.taskadd {
|
||||
// .ant-table-tbody
|
||||
// > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
// > td {
|
||||
// background: #f6f9fd;
|
||||
// }
|
||||
// }
|
||||
// .btnn {
|
||||
// height: 72px;
|
||||
// width: 100%;
|
||||
// position: absolute;
|
||||
// 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;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
.taskadd {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -3182,6 +3180,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user