mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 22:36:45 +08:00
接口报错
This commit is contained in:
313
src/components/project/BatchLecturer.vue
Normal file
313
src/components/project/BatchLecturer.vue
Normal file
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="visible"
|
||||
class="drawerStyle RouterFaceStu"
|
||||
placement="right"
|
||||
width="1200"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">{{ name }}</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="@/assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="box">
|
||||
<div style="margin-bottom: 20px;font-size: 18px;font-weight: 700;">选择讲师费汇总:<span style="color:red;margin-left:20px;">256元</span></div>
|
||||
<div class="table">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
row-key="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
>
|
||||
<template #action="{ record }">
|
||||
<div class="action">
|
||||
<div style="color: #1890ff;cursor: pointer;" class="btn" v-if="selectedRowKeys.includes(record.id)" @click="removeList(record)">取消选择</div>
|
||||
<div style="color: #1890ff;cursor: pointer;" class="btn" v-else @click="addList(record)">选择</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="queryDrawer">下一步</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup lang="jsx">
|
||||
import {computed, defineEmits,defineProps, ref, watch} from "vue";
|
||||
import * as api from '@/api/Lecturer'
|
||||
import { message } from "ant-design-vue";
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
name:{
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
});
|
||||
watch(()=>props.visible,(val)=>{
|
||||
if(val){
|
||||
api.getListByStatus().then(res=>{
|
||||
if(res.data.code == 200 ){
|
||||
tableData.value = res.data.data
|
||||
}else{
|
||||
message.error(res.data.msg)
|
||||
}
|
||||
}).catch(err=>{
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
}
|
||||
})
|
||||
const selectedRowKeys = ref([])
|
||||
const selectsData = ref([]);
|
||||
const onSelectChange = (e, l) => {
|
||||
selectedRowKeys.value = e
|
||||
selectsData.value = l
|
||||
}
|
||||
const emit = defineEmits({})
|
||||
const addList = (item) => {
|
||||
selectedRowKeys.value.push(item.id)
|
||||
selectsData.value.push(item)
|
||||
}
|
||||
const removeList = (item) => {
|
||||
selectedRowKeys.value = selectedRowKeys.value.filter(t=> t != item.id)
|
||||
selectsData.value = selectsData.value.filter(t=>t.id != item.id)
|
||||
}
|
||||
const columns = [
|
||||
{
|
||||
title: '讲师名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '讲师工号',
|
||||
dataIndex: 'userNo',
|
||||
key: 'userNo',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '所属组织',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
|
||||
{
|
||||
title: '讲师体系',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '讲师等级',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '发薪地',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
|
||||
{
|
||||
title: '课程类型',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '课程名称',
|
||||
dataIndex: 'courseName',
|
||||
key: 'courseName',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '授课/开发课程日期',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '授课/开发课程时长',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '参训人数',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '评分',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '课酬基准',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '计划费用',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '应发费用',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
slots: { customRender: "action" },
|
||||
},
|
||||
]
|
||||
const tableData = ref([])
|
||||
const closeDrawer = () => {
|
||||
emit("update:visible", false);
|
||||
selectedRowKeys.value = []
|
||||
selectsData.value = []
|
||||
}
|
||||
const queryDrawer = () => {
|
||||
emit("selectedRowKeys", selectedRowKeys.value)
|
||||
closeDrawer()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
|
||||
.RouterFaceStu {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
// margin-left: 24px;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
margin: 0 20px;
|
||||
.head{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow-x: auto;
|
||||
.list{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #666;
|
||||
min-width: 260px;
|
||||
padding: 20px 10px;
|
||||
color: #ffffff;
|
||||
border-radius:6px;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 20px;
|
||||
.left{
|
||||
width: 35%;
|
||||
text-align:right;
|
||||
margin-right:30px;
|
||||
.text{
|
||||
margin-top:20px;
|
||||
}
|
||||
}
|
||||
.right{
|
||||
.text{
|
||||
margin-top:20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.active{
|
||||
background-color: #f5f5f5;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
.box{
|
||||
.top{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 10px;
|
||||
.item{
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
background-color: #fff;
|
||||
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user