mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
讲师管理权限
This commit is contained in:
@@ -57,9 +57,6 @@ 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));
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
</a-form>
|
||||
<div style="width: 100%;"></div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<a-button @click="addTeacher()" type="primary" style="width:120px;" class="resetbtn">
|
||||
<a-button v-if="checkMenu('lecturerAdd')" @click="addTeacher()" type="primary" style="width:120px;" class="resetbtn">
|
||||
<div class="search"></div> 新增讲师
|
||||
</a-button>
|
||||
<div>
|
||||
<div v-if="checkMenu('lecturerExport')">
|
||||
<a-button @click="handleExport()" class="resetbtn">
|
||||
<UploadOutlined /> 导出
|
||||
</a-button>
|
||||
@@ -40,12 +40,12 @@
|
||||
<template #action="{ record, column }">
|
||||
<a-space >
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="record.status == '1'" type="link"
|
||||
<a-button type="link" v-if="checkMenu('lecturerEdit')" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="record.status == '1'&&checkMenu('lecturerStop')" type="link"
|
||||
@click="() => handleOperate(record, String(record.courseform))">停用</a-button>
|
||||
<a-button v-if="record.status == '2'" type="link"
|
||||
<a-button v-if="record.status == '2'&&checkMenu('lecturerStop')" type="link"
|
||||
@click="() => handleOperate(record, String(record.courseform))">启用</a-button>
|
||||
<a-button type="link" v-if="record.isSuperPermission==='true'" @click="() => deleteModal(record, String(record.courseform))"
|
||||
<a-button type="link" v-if="record.isSuperPermission==='true'&&checkMenu('lecturerDel')" @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> -->
|
||||
@@ -300,6 +300,7 @@ import {getCookieForName} from "@/api/method"
|
||||
import SearchTeacher from "@/components/project/SearchTeacher";
|
||||
import avatar from '@/assets/avatar.png'
|
||||
import LookExternalLecturer from "@/components/project/LookExternalLecturer";
|
||||
import { checkMenu } from '@/utils/utils'
|
||||
export default {
|
||||
name: "ExternalLecturer",
|
||||
components: {
|
||||
@@ -871,6 +872,7 @@ export default {
|
||||
getTableDate, //list接口数据调用
|
||||
TeacherSystem,
|
||||
cancelTeacherDialog1,
|
||||
checkMenu
|
||||
// getpromotionrecordstableData
|
||||
}
|
||||
},
|
||||
|
||||
@@ -81,18 +81,18 @@
|
||||
</a-form>
|
||||
<div style="width: 100%;"></div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<!-- <a-button @click="addTeacher()" type="primary" class="langbtn">
|
||||
<a-button v-if="checkMenu('lecturerRecordsAdd')" @click="addTeacher()" type="primary" class="langbtn">
|
||||
<div class="search"></div> 添加授课记录
|
||||
</a-button> -->
|
||||
</a-button>
|
||||
<!-- <div style="margin-left: 20px ;">
|
||||
<a-button @click="addTeacher()" class="langbtn">
|
||||
<UploadOutlined /> 一键生成讲师费
|
||||
</a-button>
|
||||
</div> -->
|
||||
<!-- <a-button class="resetbtn" @click="handleImport()">
|
||||
<a-button v-if="checkMenu('lecturerRecordsImport')" class="resetbtn" @click="handleImport()">
|
||||
<DownloadOutlined /> 导入
|
||||
</a-button> -->
|
||||
<a-button @click="handleExport()" class="resetbtn">
|
||||
</a-button>
|
||||
<a-button v-if="checkMenu('lecturerRecordsExport')" @click="handleExport()" class="resetbtn">
|
||||
<UploadOutlined /> 导出
|
||||
</a-button>
|
||||
</div>
|
||||
@@ -105,8 +105,8 @@
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space>
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
<a-button type="link" @click="() => handleModify(record, String(record.courseform))" v-if="record.createFrom == 1">编辑</a-button>
|
||||
<a-button v-if="record.isSuperPermission==='true'" type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
||||
<a-button type="link" @click="() => handleModify(record, String(record.courseform))" v-if="record.createFrom == 1&&checkMenu('lecturerRecordsEdit')">编辑</a-button>
|
||||
<a-button v-if="record.isSuperPermission==='true'&&checkMenu('lecturerRecordsDel')" type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@@ -410,6 +410,7 @@ import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeac
|
||||
import dayjs from "dayjs";
|
||||
import { getTeacherCourseList, updateInTeacherCourse, getNewInTeacherCourseList, deleteInTeacherCourse, insertInTeacherCourse,selectSupplier } from "../../api/Teaching";
|
||||
// import {getProjSt} from "../../api/indexProjStu";
|
||||
import { checkMenu } from '@/utils/utils'
|
||||
// import AddTeacher from "../../components/drawers/project/AddTeacher"
|
||||
export default {
|
||||
name: "ExternalTeaching",
|
||||
@@ -1044,6 +1045,7 @@ const sendName=()=>{
|
||||
getTableDate, //list接口数据调用
|
||||
// getStu
|
||||
TeacherSystem,
|
||||
checkMenu
|
||||
// getSysTypeMap
|
||||
}
|
||||
},
|
||||
|
||||
@@ -60,14 +60,14 @@
|
||||
|
||||
</a-form>
|
||||
<div style="width: 100%;"></div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<div v-if="checkMenu('lecturerAdd')" style="display: flex; margin-bottom: 20px">
|
||||
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width:120px;">
|
||||
<div class="search"></div> 新增讲师
|
||||
</a-button>
|
||||
<div>
|
||||
<!-- <a-button @click="handleExport()" class="resetbtn">
|
||||
<div v-if="checkMenu('lecturerExport')">
|
||||
<a-button @click="handleExport()" class="resetbtn">
|
||||
<UploadOutlined /> 导出
|
||||
</a-button> -->
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
@@ -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')&&checkMenu('lecturerEdit')" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="record.status == '1'&&(record.isPermission==='true'||record.isSuperPermission==='true')&&checkMenu('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')&&checkMenu('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'&&checkMenu('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,7 +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";
|
||||
import { checkMenu } from "../../utils/utils";
|
||||
export default {
|
||||
name: "InsideLecturer",
|
||||
components: {
|
||||
@@ -1431,7 +1431,7 @@ export default {
|
||||
cancelupdialog,
|
||||
createupdialog,
|
||||
removeList,
|
||||
checkBtn,
|
||||
checkMenu,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -103,15 +103,15 @@
|
||||
</a-form>
|
||||
<div style="width: 100%;"></div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<!-- <a-button @click="addTeacher()" type="primary" class="langbtn">
|
||||
<a-button v-if="checkMenu('lecturerRecordsAdd')" @click="addTeacher()" type="primary" class="langbtn">
|
||||
<div class="search"></div> 添加授课记录
|
||||
</a-button> -->
|
||||
</a-button>
|
||||
<!-- <a-upload multiple :headers="headers" :show-upload-list="false" :before-upload="beforeUpload2"> -->
|
||||
<!-- <a-button class="resetbtn" @click="handleImport()">
|
||||
<a-button v-if="checkMenu('lecturerRecordsImport')" class="resetbtn" @click="handleImport()">
|
||||
<DownloadOutlined /> 导入
|
||||
</a-button> -->
|
||||
</a-button>
|
||||
<!-- </a-upload> -->
|
||||
<a-button @click="handleExport()" class="resetbtn">
|
||||
<a-button v-if="checkMenu('lecturerRecordsExport')" @click="handleExport()" class="resetbtn">
|
||||
<UploadOutlined /> 导出
|
||||
</a-button>
|
||||
</div>
|
||||
@@ -130,8 +130,8 @@
|
||||
<a-space>
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
<a-button type="link" @click="() => handleModify(record, String(record.courseform))"
|
||||
v-if="record.createFrom == 1">编辑 </a-button>
|
||||
<a-button type="link" v-if="record.createFrom == 1 && record.isSuperPermission === 'true'"
|
||||
v-if="record.createFrom == 1&&checkMenu('lecturerRecordsEdit')">编辑 </a-button>
|
||||
<a-button type="link" v-if="record.createFrom == 1 && record.isSuperPermission === 'true'&&checkMenu('lecturerRecordsDel')"
|
||||
@click="() => deleteModal(record, String(record.courseform))">删除</a-button>
|
||||
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> -->
|
||||
</a-space>
|
||||
@@ -526,6 +526,7 @@ import SearchTeacher from "@/components/project/SearchTeacher";
|
||||
import { useStore } from "vuex";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import { queryTrainOrgPor,} from "../../api/organization";
|
||||
import { checkMenu } from '@/utils/utils'
|
||||
export default {
|
||||
name: "InsideTeaching",
|
||||
components: {
|
||||
@@ -1546,7 +1547,8 @@ export default {
|
||||
cancelTeachingDialog,
|
||||
// editTimeChange,
|
||||
scoreChange,
|
||||
locale
|
||||
locale,
|
||||
checkMenu
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
</a-form>
|
||||
<div style="width: 100%;"></div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<a-button @click="addTeacher()" type="primary" class="langbtn">
|
||||
<a-button v-if="checkMenu('lecturerExpenseAdd')" @click="addTeacher()" type="primary" class="langbtn">
|
||||
<div class="search"></div> 添加费用
|
||||
</a-button>
|
||||
<!-- <div style="margin-left: 20px ;">
|
||||
@@ -102,10 +102,10 @@
|
||||
<UploadOutlined /> 一键生成讲师费
|
||||
</a-button>
|
||||
</div> -->
|
||||
<a-button class="resetbtn" @click="handleImport()" >
|
||||
<a-button v-if="checkMenu('lecturerExpenseImport')" class="resetbtn" @click="handleImport()" >
|
||||
<DownloadOutlined /> 导入
|
||||
</a-button>
|
||||
<a-button @click="handleExport()" class="resetbtn">
|
||||
<a-button v-if="checkMenu('lecturerExpenseExport')" @click="handleExport()" class="resetbtn">
|
||||
<UploadOutlined /> 导出
|
||||
</a-button>
|
||||
<a-button v-if="orgList.length" @click="handleTeacher()" type="primary" class="langbtn">
|
||||
@@ -123,13 +123,13 @@
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space >
|
||||
<a-button type="link" v-if="record.status==0||record.status==5" @click="updateModal(record,record.status)">{{record.status==0?'停用':'启用'}}</a-button>
|
||||
<a-button type="link" v-if="(record.status==0||record.status==5)&&checkMenu('lecturerExpenseStop')" @click="updateModal(record,record.status)">{{record.status==0?'停用':'启用'}}</a-button>
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
<!-- :disabled="record.createFrom==1 ?false :true" -->
|
||||
<a-button type="link" v-if="record.status == 0||record.status==4" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button type="link" v-if="(record.status == 0||record.status==4)&&checkMenu('lecturerExpenseEdit')" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<!-- <a-button :disabled="record.status==='A20' || record.status==='A30'||record.status==='S20' ?true :false" type="link" @click="() => handleOperate(record, String(record.courseform))">提交</a-button> -->
|
||||
<!-- <a-button type="link" @click="handleOperate(record)">撤回</a-button> -->
|
||||
<a-button type="link" v-if="record.status==0||record.status==4||record.status==5" @click="deleteModal(record)">删除</a-button>
|
||||
<a-button type="link" v-if="(record.status==0||record.status==4||record.status==5)&&checkMenu('lecturerExpenseDel')" @click="deleteModal(record)">删除</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@@ -599,6 +599,7 @@
|
||||
import { queryTrainOrgPor,} from "../../api/organization";
|
||||
import dialog from '@/utils/dialog';
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import { checkMenu } from '@/utils/utils'
|
||||
export default {
|
||||
name: "LecturerFee",
|
||||
components: {
|
||||
@@ -1927,6 +1928,7 @@ const column = ref([
|
||||
clearPayableExpense,
|
||||
payExpense,
|
||||
locale,
|
||||
checkMenu
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space >
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
<a-button type="link" @click="handleLess(record)">撤回</a-button>
|
||||
<a-button v-if="checkMenu('lecturerSummaryCancel')" type="link" @click="handleLess(record)">撤回</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@@ -137,7 +137,7 @@
|
||||
<!-- <span>讲师费发放情况</span> -->
|
||||
<a-table :columns="column" :scroll="{ x: '1000' }" :data-source="tableDatas" :loading="tableLoadings" :pagination="false">
|
||||
<template #action="{ record, column }">
|
||||
<a-button type="link" @click="handleDetail(record)">撤回</a-button>
|
||||
<a-button v-if="checkMenu('lecturerSummaryCancel')" type="link" @click="handleDetail(record)">撤回</a-button>
|
||||
</template>
|
||||
</a-table>
|
||||
<!-- <div :style="{
|
||||
@@ -175,6 +175,7 @@ import {CostDetails} from "../lecturer/CostDetails.vue"
|
||||
// import * as api from '@/api/Lecturer'
|
||||
import dialog from '@/utils/dialog'
|
||||
import {message} from 'ant-design-vue'
|
||||
import { checkMenu } from '@/utils/utils'
|
||||
export default {
|
||||
name: "MonthlyStatistics",
|
||||
components: {
|
||||
@@ -772,6 +773,7 @@ export default {
|
||||
sysTypeOptions,
|
||||
endOrg,
|
||||
handleBack,
|
||||
checkMenu
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -18,13 +18,14 @@
|
||||
</a-form>
|
||||
<div style="width: 100%;"></div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<a-button @click="addTeacher()" type="primary" class="resetbtn" style="width: 164px;">
|
||||
<a-button v-if="checkMenu('lecturerTrainOrgAdd')" @click="addTeacher()" type="primary" class="resetbtn" style="width: 164px;">
|
||||
<div class="search"></div> 新增培训发生组织
|
||||
</a-button>
|
||||
<div
|
||||
class="btnn btn2"
|
||||
@click="downOpen"
|
||||
style="margin-right: 14px"
|
||||
v-if="checkMenu('lecturerTrainOrgExport')"
|
||||
>
|
||||
<div class="daochu"></div>
|
||||
<div class="btnText">导出</div>
|
||||
@@ -38,11 +39,11 @@
|
||||
<lockLecturer :parentName="record.parentName" :id="record.id" :title="'培训发生组织详情'" @searchList="searchList">
|
||||
<div style="color: #1890ff;cursor: pointer;">查看</div>
|
||||
</lockLecturer>
|
||||
<a-button v-if="record.status!=2" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="record.status!=2&&checkMenu('lecturerTrainOrgEdit')" type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="record.status==2&&false" type="link" @click="() => updateModal(record)">撤回</a-button>
|
||||
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> -->
|
||||
<a-button @click="isEnablePost(record,0)" v-if="record.enable" type="link" >启用</a-button>
|
||||
<a-button @click="isEnablePost(record,1)" v-if="!record.enable" type="link" >停用</a-button>
|
||||
<a-button @click="isEnablePost(record,0)" v-if="record.enable&&checkMenu('lecturerTrainOrgStop')" type="link" >启用</a-button>
|
||||
<a-button @click="isEnablePost(record,1)" v-if="!record.enable&&checkMenu('lecturerTrainOrgStop')" type="link" >停用</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@@ -309,6 +310,7 @@ import AddOrgContent from "../../components/project/AddOrgContent.vue"
|
||||
import * as lecturer from "../../api/Lecturer.js";
|
||||
import lockLecturer from "@/components/project/lockLecturer"
|
||||
import AddApprover from '@/components/project/AddApprover'
|
||||
import { checkMenu } from '@/utils/utils'
|
||||
export default{
|
||||
name:"organization",
|
||||
components: {
|
||||
@@ -905,6 +907,7 @@ const getTableDate = (obj) => {
|
||||
createTeacherDialog,
|
||||
valueChange,
|
||||
validateField,
|
||||
checkMenu,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user