mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
feat:增加授权
This commit is contained in:
@@ -210,6 +210,10 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
classify: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
@@ -567,7 +571,7 @@ export default {
|
||||
state.tableDataTotal = 0;
|
||||
return;
|
||||
}
|
||||
console.log("obj", obj);
|
||||
// console.log("obj", obj);
|
||||
api
|
||||
.getMemberInfo(obj)
|
||||
.then((res) => {
|
||||
@@ -606,7 +610,14 @@ export default {
|
||||
keyWord: "",
|
||||
tag: 1, //归属权
|
||||
opt: 1, //查询
|
||||
type: 2, //项目
|
||||
type:
|
||||
props.classify === "project"
|
||||
? 2
|
||||
: props.classify === "learnPath"
|
||||
? 1
|
||||
: props.classify === "course"
|
||||
? 3
|
||||
: null,
|
||||
refId: props.selectProjectId, //项目id
|
||||
// refId: 64,
|
||||
pageNo: 1,
|
||||
@@ -629,7 +640,14 @@ export default {
|
||||
keyWord: "",
|
||||
tag: 2, //归属权
|
||||
opt: 3, //修改
|
||||
type: 2, //项目
|
||||
type:
|
||||
props.classify === "project"
|
||||
? 2
|
||||
: props.classify === "learnPath"
|
||||
? 1
|
||||
: props.classify === "course"
|
||||
? 3
|
||||
: null,
|
||||
refId: props.selectProjectId, //项目id
|
||||
// refId: 64,
|
||||
pageNo: 1,
|
||||
|
||||
@@ -677,6 +677,9 @@
|
||||
<div class="btn btn6">
|
||||
<div class="btnText" @click="handlePush">确定</div>
|
||||
</div>
|
||||
<div class="btn btn6">
|
||||
<div class="btnText" @click="submitReview">提交审核</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -4750,6 +4753,17 @@ export default defineComponent({
|
||||
return getdateToTime(val * 1000);
|
||||
};
|
||||
|
||||
//提交审核
|
||||
const submitReview = () => {
|
||||
console.log("ft_eidt", state.ft_eidt);
|
||||
// if (state.ft_eidt) {
|
||||
// //编辑面授课
|
||||
// }
|
||||
if (!state.ft_eidt) {
|
||||
//新建面授课
|
||||
handlePush();
|
||||
}
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
getdateToDateFn,
|
||||
@@ -4849,6 +4863,7 @@ export default defineComponent({
|
||||
handelChangePageTea1,
|
||||
handleChangeTea2,
|
||||
handelChangePageTea2,
|
||||
submitReview,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -583,14 +583,42 @@
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 归属权抽屉 -->
|
||||
<owner-ship v-model:Ownervisible="Ownervisible" />
|
||||
<!-- <owner-ship v-model:Ownervisible="Ownervisible" /> -->
|
||||
<!-- 查看权抽屉 -->
|
||||
<query-right v-model:Queryvisible="Queryvisible" />
|
||||
<!-- <query-right v-model:Queryvisible="Queryvisible" /> -->
|
||||
<!-- 管理权抽屉 -->
|
||||
<manage-right v-model:Managevisible="Managevisible" />
|
||||
<!-- <manage-right v-model:Managevisible="Managevisible" /> -->
|
||||
<!-- 授权名单抽屉 -->
|
||||
<power-list v-model:PLvisible="PLvisible" :selectPathId="selectPathId" />
|
||||
<!-- <power-list v-model:PLvisible="PLvisible" :selectPathId="selectPathId" /> -->
|
||||
|
||||
<!-- 授权名单抽屉 -->
|
||||
<proj-power-list
|
||||
v-model:ProjPvisible="PLvisible"
|
||||
:selectProjectId="selectPathId"
|
||||
classify="learnPath"
|
||||
/>
|
||||
<!-- 归属权抽屉 -->
|
||||
<proj-owner-ship
|
||||
v-model:ProjOwnervisible="Ownervisible"
|
||||
:selectProjectId="selectPathId"
|
||||
classify="learnPath"
|
||||
/>
|
||||
<!-- 查看权抽屉 -->
|
||||
<proj-check-ship
|
||||
v-model:ProjCheckvisible="Queryvisible"
|
||||
:selectProjectId="selectPathId"
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
classify="learnPath"
|
||||
/>
|
||||
<!-- 管理权抽屉 -->
|
||||
<proj-check-ship
|
||||
v-model:ProjCheckvisible="Managevisible"
|
||||
:selectProjectId="selectPathId"
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
classify="learnPath"
|
||||
/>
|
||||
<!-- 创建路径loading -->
|
||||
|
||||
<!-- 更多背景图 v-model:visible="learnBgMore" -->
|
||||
@@ -638,12 +666,15 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import { reactive, toRefs, onMounted, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import OwnerShip from "../../components/drawers/Ownership";
|
||||
import PowerList from "../../components/drawers/PowerList";
|
||||
import QueryRight from "../../components/drawers/QueryRight";
|
||||
import ManageRight from "../../components/drawers/ManageRight";
|
||||
// import OwnerShip from "../../components/drawers/Ownership";
|
||||
// import PowerList from "../../components/drawers/PowerList";
|
||||
// import QueryRight from "../../components/drawers/QueryRight";
|
||||
import ProjOwnerShip from "../../components/drawers/ProjectOwn";
|
||||
import ProjPowerList from "../../components/drawers/ProjPowerList";
|
||||
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||
// import ManageRight from "../../components/drawers/ManageRight";
|
||||
import * as api from "../../api/index1";
|
||||
import { message } from "ant-design-vue";
|
||||
import {
|
||||
@@ -654,7 +685,16 @@ import {
|
||||
import { storage } from "../../api/storage";
|
||||
export default {
|
||||
name: "learningPath",
|
||||
components: { OwnerShip, PowerList, QueryRight, ManageRight },
|
||||
components: {
|
||||
// OwnerShip,
|
||||
// PowerList,
|
||||
// QueryRight,
|
||||
// ManageRight,
|
||||
ProjOwnerShip,
|
||||
|
||||
ProjPowerList,
|
||||
ProjCheckShip,
|
||||
},
|
||||
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
@@ -863,7 +903,9 @@ export default {
|
||||
lpLoading: false,
|
||||
learnBgMore: false, //是否显示更多学习路径背景
|
||||
|
||||
selectPathId: null, //选择的
|
||||
selectPathId: null, //选择授权的路径id
|
||||
addAuthList: null, //确定授权列表
|
||||
authClassify: null, //显示的是管理权还是查看权
|
||||
});
|
||||
const selectProjectName = (value, index) => {
|
||||
console.log("value", value, index);
|
||||
@@ -1038,17 +1080,22 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
const showOwner = () => {
|
||||
const showOwner = (id) => {
|
||||
state.Ownervisible = true;
|
||||
state.selectPathId = id;
|
||||
};
|
||||
const showPower = (id) => {
|
||||
state.PLvisible = true;
|
||||
state.selectPathId = id;
|
||||
};
|
||||
const showQuery = () => {
|
||||
const showQuery = (id) => {
|
||||
state.authClassify = 2;
|
||||
state.selectPathId = id;
|
||||
state.Queryvisible = true;
|
||||
};
|
||||
const showManage = () => {
|
||||
const showManage = (id) => {
|
||||
state.authClassify = 1;
|
||||
state.selectPathId = id;
|
||||
state.Managevisible = true;
|
||||
};
|
||||
const getTableDate = (tableData) => {
|
||||
@@ -1244,7 +1291,7 @@ export default {
|
||||
<a-select-option value="归属权" label="归属权">
|
||||
<div
|
||||
onClick={() => {
|
||||
showOwner();
|
||||
showOwner(text.record.id);
|
||||
}}
|
||||
>
|
||||
归属权
|
||||
@@ -1253,7 +1300,7 @@ export default {
|
||||
<a-select-option value="查看权" label="查看权">
|
||||
<div
|
||||
onClick={() => {
|
||||
showQuery();
|
||||
showQuery(text.record.id);
|
||||
}}
|
||||
>
|
||||
查看权
|
||||
@@ -1262,7 +1309,7 @@ export default {
|
||||
<a-select-option value="管理权" label="管理权">
|
||||
<div
|
||||
onClick={() => {
|
||||
showManage();
|
||||
showManage(text.record.id);
|
||||
}}
|
||||
>
|
||||
管理权
|
||||
@@ -1650,7 +1697,35 @@ export default {
|
||||
// console.log("执行");
|
||||
getLearnPath();
|
||||
});
|
||||
|
||||
//添加权限
|
||||
watch(
|
||||
() => state.addAuthList,
|
||||
(res) => {
|
||||
console.log("res", res, state.addAuthList);
|
||||
let obj = {
|
||||
type: 1,
|
||||
tag:
|
||||
state.authClassify === 1 ? 3 : state.authClassify === 2 ? 4 : null,
|
||||
opt: 3,
|
||||
deptList: res[1],
|
||||
groupList: res[2],
|
||||
refId: state.selectProjectId,
|
||||
pageNo: 20,
|
||||
pageSize: 1,
|
||||
studentList: res[0],
|
||||
};
|
||||
console.log("obj", obj);
|
||||
api
|
||||
.optionAuthPerm(obj)
|
||||
.then((res) => {
|
||||
console.log("添加授权成功", res);
|
||||
message.success("添加授权成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("添加授权失败", err);
|
||||
});
|
||||
}
|
||||
);
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
|
||||
@@ -1166,32 +1166,33 @@
|
||||
</div>
|
||||
</a-modal>
|
||||
|
||||
<!-- 归属权抽屉 -->
|
||||
<proj-owner-ship
|
||||
v-model:ProjOwnervisible="ProjOwnervisible"
|
||||
:selectProjectId="selectProjectId"
|
||||
/>
|
||||
<!-- 授权名单抽屉 -->
|
||||
<proj-power-list
|
||||
v-model:ProjPvisible="ProjPvisible"
|
||||
:selectProjectId="selectProjectId"
|
||||
classify="project"
|
||||
/>
|
||||
<!-- 归属权抽屉 -->
|
||||
<proj-owner-ship
|
||||
v-model:ProjOwnervisible="ProjOwnervisible"
|
||||
:selectProjectId="selectProjectId"
|
||||
classify="project"
|
||||
/>
|
||||
|
||||
<!-- 查看权抽屉 -->
|
||||
<proj-check-ship
|
||||
v-model:ProjCheckvisible="ProjCheckvisible"
|
||||
:selectProjectId="selectProjectId"
|
||||
classify="checkship"
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
classify="project"
|
||||
/>
|
||||
<!-- 管理权抽屉 -->
|
||||
<proj-check-ship
|
||||
v-model:ProjCheckvisible="ProjCheckvisible"
|
||||
:selectProjectId="selectProjectId"
|
||||
classify="checkship"
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
classify="project"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user