讲师管理

This commit is contained in:
zhangsir
2024-11-06 18:51:13 +08:00
parent 11af2977c2
commit 8c846fb111
9 changed files with 53 additions and 23 deletions

View File

@@ -45,7 +45,7 @@ export const infoteacher = (obj) => http.get('/admin/thirdApi/org/info' ,{params
export const fileUp = (obj) => http.post('/file/upload', obj)
//组织树查询讲师
export const getTeacherByDepartId = (obj) => http.get(`/admin/thirdApi/user/list?departId=${obj.organizationId}&pageNo=1&pageSize=1000&keyword=`)
export const getTeacherByDepartId = (obj) => http.get(`/admin/thirdApi/user/list?departId=${obj.organizationId}&pageNo=1&pageSize=100&keyword=`)
//根据姓名工号查询讲师
export const getTeacherByNameOrUserNo = (obj) => https.post(`/user/teacherList`,obj)
// export const getTeacherByNameOrUserNo = (obj) => https.post(`/user/teacherList?keyword=${obj.nameOrUserNo}&pageNo=1&pageSize=50&departId=`)

View File

@@ -415,14 +415,14 @@
<router-link to="/teacheropinion">意见</router-link>
</a-menu-item>
</a-sub-menu>
<a-sub-menu key="sub24" @titleClick="titleClick">
<a-sub-menu key="sub24" @titleClick="titleClick" v-if="checkMenu('instructorcertification')">
<template #icon>
<div class="imgBox">
<img style="width: 15px; height: 15px" src="../assets/images/navleft/project.png" />
</div>
</template>
<template #title>讲师管理</template>
<a-menu-item key="sub24-1">
<a-menu-item key="sub24-1" v-if="checkMenu('instructorcertification')">
<span
:class="{
circleActive: selectedKeys[0] === 'sub24-1' ? true : false,

View File

@@ -24,6 +24,7 @@
:pagination="false"
:scroll="{ x: 'max-content' }"
row-key="id"
:loading="loading"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
>
<template #action="{ record }">
@@ -59,17 +60,21 @@ const props = defineProps({
});
watch(()=>props.visible,(val)=>{
if(val){
loading.value = true
api.getListByStatus().then(res=>{
if(res.data.code == 200 ){
tableData.value = res.data.data
}else{
message.error(res.data.msg)
}
loading.value = false
}).catch(err=>{
message.error(err.data.msg)
loading.value = false
})
}
})
const loading = ref(false)
const selectedRowKeys = ref([])
const selectsData = ref([]);
const onSelectChange = (e, l) => {
@@ -203,6 +208,10 @@ const closeDrawer = () => {
selectsData.value = []
}
const queryDrawer = () => {
if(!selectedRowKeys.value.length){
message.error('请选择需要审批的数据')
return
}
emit("selectedRowKeys", selectedRowKeys.value)
closeDrawer()
}

View File

@@ -46,6 +46,7 @@
:data-source="searchTrue?searchList:expenseList"
:pagination="false"
:scroll="{ x: 'max-content' }"
:loading="loadingData"
>
<template #action="{ record,index }">
<div class="action">
@@ -71,7 +72,7 @@
:centere="true"
:closable="false"
style="margin-top: 400px"
:zIndex="9999"
:zIndex="1001"
@cancel="close"
>
<div class="delete">
@@ -122,6 +123,7 @@ const props = defineProps({
default: ''
}
});
const loadingData = ref(false)
const modalVisible = ref(false)
const numTime = ref(0)
const close = () => {
@@ -134,10 +136,10 @@ const handleConfirm = () => {
}
numTime.value+=1
localStorage.setItem('numTime',numTime.value)
const ids = expenseList.value.map(item=>item.id)
const ids = expenseList.value?.map(item=>item.id)
api.teacherExpenseConfirm(ids).then(res=>{
console.log(res,'resssss')
const obj = ids.map(item=>{
const obj = ids?.map(item=>{
return {
id: item,
status: 1
@@ -162,6 +164,7 @@ const clickItem = (item,i) => {
}
watch(()=>props.visible,(val)=>{
if(val){
loadingData.value = true
numTime.value = Number(localStorage.getItem('numTime')||0)
api.getListByAffiliation(
{
@@ -173,8 +176,12 @@ watch(()=>props.visible,(val)=>{
).then(res=>{
if(res.data.code === 200){
forData.value = res.data.data
expenseList.value = res.data.data[indexList.value]?.expenseList
expenseList.value = res.data.data[indexList.value]?.expenseList || []
}
loadingData.value = false
}).catch(()=>{
message.error('获取数据失败,请重新尝试')
loadingData.value = false
})
}else{
nameUserNo.value = null
@@ -333,6 +340,10 @@ const columns = [
]
const closeDrawer = () => emit("update:visible", false);
const qureyDrawer = () => {
if(!expenseList.value.length){
return message.error('暂无可提交的数据')
return
}
dialog({
content: '是否确认讲师费信息无误?提交后按“培训发生组织”汇总至审批中心,等待验证后“提交”进入审批流程。',
ok: () => {
@@ -346,6 +357,10 @@ const qureyDrawer = () => {
})
}
const config = () => {
if(!expenseList.value.length){
message.error('暂无可提交的数据')
return
}
modalVisible.value = true;
}
</script>

View File

@@ -1,10 +1,10 @@
<template>
<a-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="managerArray"
:placeholder="placeholder"
:options="options"
@@ -61,7 +61,9 @@ watch(()=>props.arrayList, ()=>{
managerArray.value = props.arrayList
})
const options = ref([])
const keyword = ref('')
const getList = () => {
loading.value = true
getUserList(keyword.value).then(res=>{
loading.value = false
if(res.data.code == 200){
@@ -72,7 +74,7 @@ const getList = () => {
userNo: e.userNo,
userName: e.realName,
}))
console.log(options.value,'xixixixi')
// console.log(options.value,'xixixixi')
}
}).catch(()=>{
loading.value = false
@@ -80,17 +82,12 @@ const getList = () => {
})
}
const throttList = throttle(getList, 600);
const keyword = ref('')
//搜索学员
const searchMember = (val) => {
options.value = []
loading.value = true
keyword.value = val
throttList()
};
const focus = () => {
options.value =[]
loading.value = true
keyword.value = ''
getList()
}

View File

@@ -55,7 +55,7 @@
:pagination="pagination"
>
<template #appEdit="{ record }">
<a-button type="link" @click="edit(record)">编辑</a-button>
<a-button type="link" :disabled="record.createFrom==1 ?false :true" @click="edit(record)">编辑</a-button>
<a-button type="link" @click="recome(record)">移除</a-button>
</template>
</a-table>

View File

@@ -110,7 +110,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" :disabled="record.status==='A10' || record.status==='E10' ?false :true" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
<a-button type="link" :disabled="record.createFrom==1 ?false :true" @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 :disabled="record.status==='A10' && record.status!=='A20' || record.status==='A30'||record.status==='S20' ||record.status==='E10' ?true :false" type="link" @click="() => handleOperate(record, String(record.courseform))">撤回</a-button> -->
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> -->

View File

@@ -6,7 +6,7 @@
<a-tab-pane key="1" tab="讲师费管理">
<LecturerFee />
</a-tab-pane>
<a-tab-pane key="2" tab="讲师费审批" >
<a-tab-pane key="2" tab="讲师费审批" v-if="lecturerAdmin('lecturer-admin')">
<LecturerApproval/>
</a-tab-pane>
</a-tabs>
@@ -14,10 +14,11 @@
</div>
</template>
<script lang="jsx">
import { reactive, toRefs, ref, watch,onMounted } from "vue";
import { reactive, toRefs, ref, watch,onMounted,computed } from "vue";
import LecturerFee from "../lecturer/LecturerFee.vue"
import LecturerApproval from "../lecturer/LecturerApproval.vue"
import { useRoute } from "vue-router";
import {useStore} from 'vuex'
export default {
name: "LecturerFeeManagement",
components: {
@@ -25,10 +26,18 @@ import { useRoute } from "vue-router";
LecturerApproval
},
setup() {
const store = useStore();
const userInfo = computed(()=> store.state.userInfo)
const route = useRoute();
const state = reactive({
activeKey:'1',
})
const lecturerAdmin = (admin)=>{
const roleCode = userInfo.value.roleList.map((item)=>item.roleCode)
if (admin){
return roleCode.some(t => t == admin)
}
}
watch(
)
onMounted(() => {
@@ -38,7 +47,7 @@ import { useRoute } from "vue-router";
})
return {
...toRefs(state),
lecturerAdmin,
}
},
};

View File

@@ -338,7 +338,7 @@ export default {
}
})
}
getOrganizationLista()
// getOrganizationLista()
//表格内查看数据操作
const handleLook = (record) => {
state.drawer={