mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
讲师管理
This commit is contained in:
@@ -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 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`,obj)
|
||||||
// export const getTeacherByNameOrUserNo = (obj) => https.post(`/user/teacherList?keyword=${obj.nameOrUserNo}&pageNo=1&pageSize=50&departId=`)
|
// export const getTeacherByNameOrUserNo = (obj) => https.post(`/user/teacherList?keyword=${obj.nameOrUserNo}&pageNo=1&pageSize=50&departId=`)
|
||||||
|
|||||||
@@ -415,14 +415,14 @@
|
|||||||
<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">
|
<a-sub-menu key="sub24" @titleClick="titleClick" v-if="checkMenu('instructorcertification')">
|
||||||
<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" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #title>讲师管理</template>
|
<template #title>讲师管理</template>
|
||||||
<a-menu-item key="sub24-1">
|
<a-menu-item key="sub24-1" v-if="checkMenu('instructorcertification')">
|
||||||
<span
|
<span
|
||||||
:class="{
|
:class="{
|
||||||
circleActive: selectedKeys[0] === 'sub24-1' ? true : false,
|
circleActive: selectedKeys[0] === 'sub24-1' ? true : false,
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
|
:loading="loading"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
>
|
>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
@@ -59,17 +60,21 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
watch(()=>props.visible,(val)=>{
|
watch(()=>props.visible,(val)=>{
|
||||||
if(val){
|
if(val){
|
||||||
|
loading.value = true
|
||||||
api.getListByStatus().then(res=>{
|
api.getListByStatus().then(res=>{
|
||||||
if(res.data.code == 200 ){
|
if(res.data.code == 200 ){
|
||||||
tableData.value = res.data.data
|
tableData.value = res.data.data
|
||||||
}else{
|
}else{
|
||||||
message.error(res.data.msg)
|
message.error(res.data.msg)
|
||||||
}
|
}
|
||||||
|
loading.value = false
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
message.error(err.data.msg)
|
message.error(err.data.msg)
|
||||||
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const loading = ref(false)
|
||||||
const selectedRowKeys = ref([])
|
const selectedRowKeys = ref([])
|
||||||
const selectsData = ref([]);
|
const selectsData = ref([]);
|
||||||
const onSelectChange = (e, l) => {
|
const onSelectChange = (e, l) => {
|
||||||
@@ -203,6 +208,10 @@ const closeDrawer = () => {
|
|||||||
selectsData.value = []
|
selectsData.value = []
|
||||||
}
|
}
|
||||||
const queryDrawer = () => {
|
const queryDrawer = () => {
|
||||||
|
if(!selectedRowKeys.value.length){
|
||||||
|
message.error('请选择需要审批的数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
emit("selectedRowKeys", selectedRowKeys.value)
|
emit("selectedRowKeys", selectedRowKeys.value)
|
||||||
closeDrawer()
|
closeDrawer()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
:data-source="searchTrue?searchList:expenseList"
|
:data-source="searchTrue?searchList:expenseList"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
|
:loading="loadingData"
|
||||||
>
|
>
|
||||||
<template #action="{ record,index }">
|
<template #action="{ record,index }">
|
||||||
<div class="action">
|
<div class="action">
|
||||||
@@ -71,7 +72,7 @@
|
|||||||
:centere="true"
|
:centere="true"
|
||||||
:closable="false"
|
:closable="false"
|
||||||
style="margin-top: 400px"
|
style="margin-top: 400px"
|
||||||
:zIndex="9999"
|
:zIndex="1001"
|
||||||
@cancel="close"
|
@cancel="close"
|
||||||
>
|
>
|
||||||
<div class="delete">
|
<div class="delete">
|
||||||
@@ -122,6 +123,7 @@ const props = defineProps({
|
|||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const loadingData = ref(false)
|
||||||
const modalVisible = ref(false)
|
const modalVisible = ref(false)
|
||||||
const numTime = ref(0)
|
const numTime = ref(0)
|
||||||
const close = () => {
|
const close = () => {
|
||||||
@@ -134,10 +136,10 @@ const handleConfirm = () => {
|
|||||||
}
|
}
|
||||||
numTime.value+=1
|
numTime.value+=1
|
||||||
localStorage.setItem('numTime',numTime.value)
|
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=>{
|
api.teacherExpenseConfirm(ids).then(res=>{
|
||||||
console.log(res,'resssss')
|
console.log(res,'resssss')
|
||||||
const obj = ids.map(item=>{
|
const obj = ids?.map(item=>{
|
||||||
return {
|
return {
|
||||||
id: item,
|
id: item,
|
||||||
status: 1
|
status: 1
|
||||||
@@ -162,6 +164,7 @@ const clickItem = (item,i) => {
|
|||||||
}
|
}
|
||||||
watch(()=>props.visible,(val)=>{
|
watch(()=>props.visible,(val)=>{
|
||||||
if(val){
|
if(val){
|
||||||
|
loadingData.value = true
|
||||||
numTime.value = Number(localStorage.getItem('numTime')||0)
|
numTime.value = Number(localStorage.getItem('numTime')||0)
|
||||||
api.getListByAffiliation(
|
api.getListByAffiliation(
|
||||||
{
|
{
|
||||||
@@ -173,8 +176,12 @@ watch(()=>props.visible,(val)=>{
|
|||||||
).then(res=>{
|
).then(res=>{
|
||||||
if(res.data.code === 200){
|
if(res.data.code === 200){
|
||||||
forData.value = res.data.data
|
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{
|
}else{
|
||||||
nameUserNo.value = null
|
nameUserNo.value = null
|
||||||
@@ -333,6 +340,10 @@ const columns = [
|
|||||||
]
|
]
|
||||||
const closeDrawer = () => emit("update:visible", false);
|
const closeDrawer = () => emit("update:visible", false);
|
||||||
const qureyDrawer = () => {
|
const qureyDrawer = () => {
|
||||||
|
if(!expenseList.value.length){
|
||||||
|
return message.error('暂无可提交的数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
dialog({
|
dialog({
|
||||||
content: '是否确认讲师费信息无误?提交后按“培训发生组织”汇总至审批中心,等待验证后“提交”进入审批流程。',
|
content: '是否确认讲师费信息无误?提交后按“培训发生组织”汇总至审批中心,等待验证后“提交”进入审批流程。',
|
||||||
ok: () => {
|
ok: () => {
|
||||||
@@ -346,6 +357,10 @@ const qureyDrawer = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const config = () => {
|
const config = () => {
|
||||||
|
if(!expenseList.value.length){
|
||||||
|
message.error('暂无可提交的数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
modalVisible.value = true;
|
modalVisible.value = true;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-select
|
<a-select
|
||||||
:getPopupContainer="
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
v-model:value="managerArray"
|
v-model:value="managerArray"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:options="options"
|
:options="options"
|
||||||
@@ -61,7 +61,9 @@ watch(()=>props.arrayList, ()=>{
|
|||||||
managerArray.value = props.arrayList
|
managerArray.value = props.arrayList
|
||||||
})
|
})
|
||||||
const options = ref([])
|
const options = ref([])
|
||||||
|
const keyword = ref('')
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
|
loading.value = true
|
||||||
getUserList(keyword.value).then(res=>{
|
getUserList(keyword.value).then(res=>{
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if(res.data.code == 200){
|
if(res.data.code == 200){
|
||||||
@@ -72,7 +74,7 @@ const getList = () => {
|
|||||||
userNo: e.userNo,
|
userNo: e.userNo,
|
||||||
userName: e.realName,
|
userName: e.realName,
|
||||||
}))
|
}))
|
||||||
console.log(options.value,'xixixixi')
|
// console.log(options.value,'xixixixi')
|
||||||
}
|
}
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
loading.value = false
|
loading.value = false
|
||||||
@@ -80,17 +82,12 @@ const getList = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const throttList = throttle(getList, 600);
|
const throttList = throttle(getList, 600);
|
||||||
const keyword = ref('')
|
|
||||||
//搜索学员
|
//搜索学员
|
||||||
const searchMember = (val) => {
|
const searchMember = (val) => {
|
||||||
options.value = []
|
|
||||||
loading.value = true
|
|
||||||
keyword.value = val
|
keyword.value = val
|
||||||
throttList()
|
throttList()
|
||||||
};
|
};
|
||||||
const focus = () => {
|
const focus = () => {
|
||||||
options.value =[]
|
|
||||||
loading.value = true
|
|
||||||
keyword.value = ''
|
keyword.value = ''
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
:pagination="pagination"
|
:pagination="pagination"
|
||||||
>
|
>
|
||||||
<template #appEdit="{ record }">
|
<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>
|
<a-button type="link" @click="recome(record)">移除</a-button>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
<template v-if="column.key === 'operation'">
|
<template v-if="column.key === 'operation'">
|
||||||
<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 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==='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 :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> -->
|
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> -->
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<a-tab-pane key="1" tab="讲师费管理">
|
<a-tab-pane key="1" tab="讲师费管理">
|
||||||
<LecturerFee />
|
<LecturerFee />
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="2" tab="讲师费审批" >
|
<a-tab-pane key="2" tab="讲师费审批" v-if="lecturerAdmin('lecturer-admin')">
|
||||||
<LecturerApproval/>
|
<LecturerApproval/>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
@@ -14,10 +14,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="jsx">
|
<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 LecturerFee from "../lecturer/LecturerFee.vue"
|
||||||
import LecturerApproval from "../lecturer/LecturerApproval.vue"
|
import LecturerApproval from "../lecturer/LecturerApproval.vue"
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
import {useStore} from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
name: "LecturerFeeManagement",
|
name: "LecturerFeeManagement",
|
||||||
components: {
|
components: {
|
||||||
@@ -25,10 +26,18 @@ import { useRoute } from "vue-router";
|
|||||||
LecturerApproval
|
LecturerApproval
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const store = useStore();
|
||||||
|
const userInfo = computed(()=> store.state.userInfo)
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
activeKey:'1',
|
activeKey:'1',
|
||||||
})
|
})
|
||||||
|
const lecturerAdmin = (admin)=>{
|
||||||
|
const roleCode = userInfo.value.roleList.map((item)=>item.roleCode)
|
||||||
|
if (admin){
|
||||||
|
return roleCode.some(t => t == admin)
|
||||||
|
}
|
||||||
|
}
|
||||||
watch(
|
watch(
|
||||||
)
|
)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -38,7 +47,7 @@ import { useRoute } from "vue-router";
|
|||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
|
lecturerAdmin,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
getOrganizationLista()
|
// getOrganizationLista()
|
||||||
//表格内查看数据操作
|
//表格内查看数据操作
|
||||||
const handleLook = (record) => {
|
const handleLook = (record) => {
|
||||||
state.drawer={
|
state.drawer={
|
||||||
|
|||||||
Reference in New Issue
Block a user