mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-23 17:55:39 +08:00
讲师管理
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user