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