mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 15:56:47 +08:00
讲师管理bug
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="审批记录" force-render>
|
||||
<div style="margin-bottom: 20px">
|
||||
<a-table :columns="columnsThree" :data-source="formData?.tableDataTwo" :pagination="false">
|
||||
<a-table :columns="columnsTwo" :loading="formData?.loadingTwo" :data-source="formData?.tableDataTwo" :pagination="pagination">
|
||||
<template #action="{ record }">
|
||||
<div class="action">
|
||||
<div style="color: #1890ff;cursor: pointer;" class="btn" @click="lookList(record)">查看</div>
|
||||
@@ -68,7 +68,7 @@
|
||||
</a-table>
|
||||
</div>
|
||||
<div style="margin-bottom: 100px">
|
||||
<a-table v-if="threeList" :columns="columnsTwo" :data-source="formData?.tableDataTwo" :pagination="false"/>
|
||||
<a-table v-if="threeList" :columns="columnsThree" :data-source="formData?.tableDataThree" :pagination="false"/>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
@@ -84,7 +84,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {defineEmits, defineProps, ref,watch} from "vue";
|
||||
import {defineEmits, defineProps, ref,watch,reactive,computed} from "vue";
|
||||
import dialog from '@/utils/dialog'
|
||||
import * as api from '@/api/Lecturer'
|
||||
import { message } from 'ant-design-vue';
|
||||
@@ -150,55 +150,92 @@ const columns = [
|
||||
},
|
||||
];
|
||||
const formData = ref({})
|
||||
const columnsTwo = [
|
||||
const columnsThree = [
|
||||
{
|
||||
title: '层级审批人',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
dataIndex: 'employeeNames',
|
||||
key: 'employeeNames',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'age',
|
||||
key: 'age',
|
||||
dataIndex: 'approvalStatus',
|
||||
key: 'approvalStatus',
|
||||
align: 'center',
|
||||
customRender: ({text})=>{
|
||||
switch (text) {
|
||||
case -1:
|
||||
return <span>未处理</span>;
|
||||
case 3:
|
||||
return <span>通过</span>;
|
||||
case 4:
|
||||
return <span>拒绝</span>;
|
||||
default:
|
||||
return <span>-</span>;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '审批人',
|
||||
dataIndex: 'address',
|
||||
key: 'age',
|
||||
dataIndex: 'employeeName',
|
||||
key: 'employeeName',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '审批时间',
|
||||
dataIndex: 'updateTime',
|
||||
key: 'updateTime',
|
||||
dataIndex: 'approvalTime',
|
||||
key: 'approvalTime',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '审批建议',
|
||||
dataIndex: 'address',
|
||||
key: 'age',
|
||||
dataIndex: 'approvalMsg',
|
||||
key: 'approvalMsg',
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
width: 200,
|
||||
customRender: ({text})=>{
|
||||
return <span>{text||'-'}</span>
|
||||
}
|
||||
},
|
||||
]
|
||||
const columnsThree = ref([
|
||||
const columnsTwo = ref([
|
||||
{
|
||||
title: '审批提交时间',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
dataIndex: 'createTime',
|
||||
key: 'createTime',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '审批状态',
|
||||
dataIndex: 'age',
|
||||
key: 'age',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
customRender: ({text})=>{
|
||||
switch (text) {
|
||||
case 0:
|
||||
return <span>待提交</span>;
|
||||
case 1:
|
||||
return <span>待审核</span>;
|
||||
case 2:
|
||||
return <span>审核中</span>;
|
||||
case 3:
|
||||
return <span>审核通过</span>;
|
||||
case 4:
|
||||
return <span>拒绝</span>;
|
||||
case 5:
|
||||
return <span>撤销中</span>;
|
||||
case 6:
|
||||
return <span>已撤销</span>;
|
||||
default:
|
||||
return <span>-</span>;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '审批人',
|
||||
dataIndex: 'address',
|
||||
key: 'age',
|
||||
dataIndex: 'employeeName',
|
||||
key: 'employeeName',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
@@ -213,11 +250,20 @@ const threeList = ref(false)
|
||||
const lookList = (record) => {
|
||||
console.log(record,'resssssss')
|
||||
threeList.value = true
|
||||
api.getApprovalResultByApprovalIdList(record.approvalId).then(res=>{
|
||||
if(res.data.code == 200){
|
||||
formData.value.tableDataThree = res.data.data
|
||||
}
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
}
|
||||
const visible = ref(false);
|
||||
watch(visible, (val)=>{
|
||||
if(val){
|
||||
threeList.value = false
|
||||
activeKey.value = '1'
|
||||
api.getAffiliationById(props.id).then(res=>{
|
||||
if(res.data.code == 200){
|
||||
formData.value = res.data.data
|
||||
@@ -226,14 +272,49 @@ watch(visible, (val)=>{
|
||||
formData.value.two = filterList(formData.value.affiliationUserList,2)
|
||||
formData.value.three = filterList(formData.value.affiliationUserList,3)
|
||||
formData.value.tableData = res.data.data.affiliationOrgList
|
||||
// formData.value.tableDataTwo = res.data.data.affiliationOrgList
|
||||
}
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
// getTwoData()
|
||||
}
|
||||
})
|
||||
const getTwoData = () => {
|
||||
formData.value.loadingTwo = true
|
||||
api.getByBusinessIdList(params).then(res=>{
|
||||
if(res.data.code == 200){
|
||||
formData.value.tableDataTwo = res.data.data.records
|
||||
params.total = res.data.data.total
|
||||
}
|
||||
formData.value.loadingTwo = false
|
||||
console.log(formData.value.tableDataTwo,'xixixi')
|
||||
}).catch(err=>{
|
||||
message.destroy()
|
||||
message.error(err.data.msg)
|
||||
formData.value.loadingTwo = false
|
||||
})
|
||||
}
|
||||
const params = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
businessType: 2,
|
||||
businessId: props.id
|
||||
})
|
||||
const pagination = computed(() => ({
|
||||
total: params.total,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper:true,
|
||||
current: params.pageNo,
|
||||
pageSize: params.pageSize,
|
||||
onChange: paginationChange,
|
||||
}));
|
||||
const paginationChange = (e,pageSize) => {
|
||||
params.pageNo = e;
|
||||
params.pageSize = pageSize
|
||||
getTwoData()
|
||||
};
|
||||
const filterList = (val,index) => {
|
||||
return val?.filter(item=>item.type==index).map(item=>item.userName).join(',')
|
||||
}
|
||||
@@ -259,7 +340,10 @@ const confirm = () => {
|
||||
}
|
||||
const activeKey = ref("1");
|
||||
const change = (val)=>{
|
||||
console.log(val,'val')
|
||||
// console.log(val,'val')
|
||||
if(val==2){
|
||||
getTwoData()
|
||||
}
|
||||
}
|
||||
function openDrawer() {
|
||||
visible.value = true;
|
||||
|
||||
Reference in New Issue
Block a user