mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 15:26:48 +08:00
讲师管理bug
This commit is contained in:
@@ -415,7 +415,7 @@
|
||||
<router-link to="/teacheropinion">意见</router-link>
|
||||
</a-menu-item>
|
||||
</a-sub-menu>
|
||||
<a-sub-menu key="sub24" @titleClick="titleClick" v-if="checkMenu('lecturer')">
|
||||
<a-sub-menu key="sub24" @titleClick="titleClick" v-if="checkMenu('lecturer,lecturerRecords,lecturerExpense,lecturerSummary,lecturerTrainOrg,')">
|
||||
<template #icon>
|
||||
<div class="imgBox">
|
||||
<img style="width: 15px; height: 15px" src="../assets/images/navleft/project.png" />
|
||||
@@ -431,7 +431,7 @@
|
||||
></span>
|
||||
<router-link to="/lecturerlist">讲师列表</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub24-2">
|
||||
<a-menu-item key="sub24-2" v-if="checkMenu('lecturerRecords')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive : selectedKeys[0] === 'sub24-2' ? true : false,
|
||||
@@ -440,7 +440,7 @@
|
||||
></span>
|
||||
<router-link to="/teachingrecord">授课记录</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub24-3">
|
||||
<a-menu-item key="sub24-3" v-if="checkMenu('lecturerExpense')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub24-3' ? true : false,
|
||||
@@ -449,7 +449,7 @@
|
||||
></span>
|
||||
<router-link to="/lecturerfeemanagement">讲师费管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub24-4">
|
||||
<a-menu-item key="sub24-4" v-if="checkMenu('lecturerSummary')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub24-4' ? true : false,
|
||||
@@ -458,7 +458,7 @@
|
||||
></span>
|
||||
<router-link to="/lecturerfeestatistics">讲师费统计</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub24-5">
|
||||
<a-menu-item key="sub24-5" v-if="checkMenu('lecturerTrainOrg')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub24-5' ? true : false,
|
||||
@@ -738,8 +738,8 @@
|
||||
<a-menu-item key="sub22" @titleClick="titleClick">
|
||||
<router-link to="/tooldown">教师专区</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub24" @titleClick="titleClick">
|
||||
<router-link to="/lecturerlist">讲师管理</router-link>
|
||||
<a-menu-item key="sub24" v-if="lecturerPath()" @titleClick="titleClick">
|
||||
<router-link :to="'/'+lecturerPath()">讲师管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub13" @titleClick="titleClick">
|
||||
<router-link to="/articlemanage">文章</router-link>
|
||||
@@ -773,13 +773,15 @@
|
||||
import {reactive, toRefs, onMounted, onUnmounted, watch } from "vue";
|
||||
import {useRoute} from "vue-router";
|
||||
import {useStore} from "vuex";
|
||||
import {checkMenu,checkOrgs} from "@/utils/utils";
|
||||
import {checkMenu,checkOrgs,lecturerRoute} from "@/utils/utils";
|
||||
import { reportOrgs } from "@/api/indexProject";
|
||||
export default {
|
||||
name: "NavLeft",
|
||||
setup() {
|
||||
const store = useStore();
|
||||
const state = reactive({
|
||||
lecturerRoute:['lecturerlist','teachingrecord','lecturerfeemanagement','lecturerfeestatistics','organization'],
|
||||
lecturerAdmin:'lecturer,lecturerRecords,lecturerExpense,lecturerSummary,lecturerTrainOrg',
|
||||
packup: false,
|
||||
screenHeight: document.body.clientHeight, // 屏幕 高度
|
||||
rootSubmenuKeys: [
|
||||
@@ -1284,6 +1286,9 @@ export default {
|
||||
const packUp = () => {
|
||||
state.packup = !state.packup;
|
||||
};
|
||||
const lecturerPath = () => {
|
||||
return state.lecturerRoute[lecturerRoute(state.lecturerAdmin)]
|
||||
}
|
||||
const getClientHeight = () => {
|
||||
state.screenHeight = document.body.clientHeight;
|
||||
};
|
||||
@@ -1298,6 +1303,8 @@ export default {
|
||||
return {
|
||||
...toRefs(state),
|
||||
checkMenu,
|
||||
lecturerPath,
|
||||
lecturerRoute,
|
||||
checkOrgs,
|
||||
onOpenChange,
|
||||
selectItem,
|
||||
|
||||
@@ -306,6 +306,7 @@ watch(visible, (val)=>{
|
||||
})
|
||||
const getTwoData = () => {
|
||||
formData.value.loadingTwo = true
|
||||
params.businessId = props.id
|
||||
api.getByBusinessIdList(params).then(res=>{
|
||||
if(res.data.code == 200){
|
||||
formData.value.tableDataTwo = res.data.data.records
|
||||
|
||||
@@ -57,6 +57,12 @@ export function checkOwner(per) {
|
||||
export function checkMenu(path = "") {
|
||||
return store?.state?.menus.some(t => path.split(",").some(s => "/" + s === t));
|
||||
}
|
||||
export function checkBtn(path = "") {
|
||||
return store?.state?.menus.some(t => path.split(",").some(s => s === t));
|
||||
}
|
||||
export function lecturerRoute(path = []) {
|
||||
return path.split(",").findIndex(t => store?.state?.menus.some(s => s === "/" + t));
|
||||
}
|
||||
export function checkOrgs(){
|
||||
return store?.state?.userInfoOrgs.length > 0
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
</a-form>
|
||||
<div style="width: 100%;"></div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<div style="display: flex; margin-bottom: 20px" v-if="checkBtn('lecturerAdd')">
|
||||
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width:120px;">
|
||||
<div class="search"></div> 新增讲师
|
||||
</a-button>
|
||||
@@ -90,12 +90,12 @@
|
||||
<a-space>
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
|
||||
<a-button v-if="record.isPermission==='true'||record.isSuperPermission==='true'" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="record.status == '1'&&(record.isPermission==='true'||record.isSuperPermission==='true')" type="link"
|
||||
<a-button v-if="(record.isPermission==='true'||record.isSuperPermission==='true')&&checkBtn('lecturerEdit')" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="record.status == '1'&&(record.isPermission==='true'||record.isSuperPermission==='true')&&checkBtn('lecturerStop')" type="link"
|
||||
@click="() => handleOperate(record, String(record.courseform))">停用</a-button>
|
||||
<a-button v-if="record.status == '2'&&(record.isPermission==='true'||record.isSuperPermission==='true')" type="link"
|
||||
<a-button v-if="record.status == '2'&&(record.isPermission==='true'||record.isSuperPermission==='true')&&checkBtn('lecturerStop')" type="link"
|
||||
@click="() => handleOperate(record, String(record.courseform))">启用</a-button>
|
||||
<a-button v-if="record.isSuperPermission==='true'" type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
||||
<a-button v-if="record.isSuperPermission==='true'&&checkBtn('lecturerDel')" type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
||||
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))"
|
||||
v-if="lecturerAdmin('Lecturer-admin')">删除</a-button> -->
|
||||
</a-space>
|
||||
@@ -443,6 +443,7 @@ import AddContent from "../../components/project/AddContent.vue"
|
||||
import UploadDragger from "@/components/project/UploadDragger.vue"
|
||||
import avatar from '@/assets/avatar.png'
|
||||
import LookInsideLecturer from "../../components/project/LookInsideLecturer.vue"
|
||||
import { checkBtn } from "../../utils/utils";
|
||||
export default {
|
||||
name: "InsideLecturer",
|
||||
components: {
|
||||
@@ -1440,6 +1441,7 @@ export default {
|
||||
cancelupdialog,
|
||||
createupdialog,
|
||||
removeList,
|
||||
checkBtn,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user