mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
讲师管理bug
This commit is contained in:
@@ -76,8 +76,8 @@ const drawerContent = ref(null)
|
||||
const customRow = (record) => {
|
||||
return {
|
||||
style:{
|
||||
backgroundColor: searchTrue.value && searchList.value.some(item => item.id === record.id) ? '#b1ffbd !important' : '',
|
||||
}
|
||||
backgroundColor: searchTrue.value && searchList.value.some(item => item.id === record.id) ? '#a6dff9' : '',
|
||||
},
|
||||
};
|
||||
};
|
||||
watch(()=>props.visible,(val)=>{
|
||||
@@ -91,12 +91,15 @@ watch(()=>props.visible,(val)=>{
|
||||
}
|
||||
loading.value = false
|
||||
}).catch(err=>{
|
||||
message.error(err.data.msg)
|
||||
loading.value = false
|
||||
tableData.value = []
|
||||
message.error(err.data.msg)
|
||||
})
|
||||
}else{
|
||||
selectedRowKeys.value = []
|
||||
selectsData.value = []
|
||||
drawerContent.value.scrollTo({top:0,behavior: 'smooth'})
|
||||
resetData()
|
||||
}
|
||||
})
|
||||
const nameUserNo = ref(null)
|
||||
@@ -112,7 +115,7 @@ const searchData = (val) => {
|
||||
// drawerContent.value.scrollTo({top:200,behavior: 'smooth'})
|
||||
searchTrue.value = val
|
||||
if(!nameUserNo.value&&!dateValue.value){
|
||||
searchList.value = tableData.value;
|
||||
// searchList.value = tableData.value;
|
||||
return
|
||||
}
|
||||
//搜索 数组expenseList.value 参数名字或者工号:nameUserNo.value 日期:dateValue.value
|
||||
@@ -298,6 +301,7 @@ const columns = [
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
customCell:()=>{return {style:{background:'#fff'}}},
|
||||
slots: { customRender: "action" },
|
||||
},
|
||||
]
|
||||
@@ -318,6 +322,34 @@ const queryDrawer = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ant-table-wrapper{
|
||||
border-right: 1px solid #ecf5ff;
|
||||
}
|
||||
/* 重置表格行的悬停效果 */
|
||||
::v-deep .ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
|
||||
background: none;
|
||||
}
|
||||
// 选中鼠标划入
|
||||
::v-deep .ant-table-tbody > tr.ant-table-row-selected:hover > td{
|
||||
background: none ;
|
||||
}
|
||||
/* 未选中行的鼠标划入样式 */
|
||||
::v-deep .ant-table-tbody > tr:not(.ant-table-row-selected):hover > td {
|
||||
background: none;
|
||||
}
|
||||
/* 未选中行的鼠标划出样式 */
|
||||
::v-deep .ant-table-tbody > tr:not(.ant-table-row-selected):not(:hover) > td {
|
||||
background: none;
|
||||
}
|
||||
// 选中
|
||||
::v-deep .ant-table-tbody > tr.ant-table-row-selected > td{
|
||||
background: none ;
|
||||
}
|
||||
/* 重置表格行的选中效果 */
|
||||
::v-deep .ant-table-row-selected td {
|
||||
// background: none !important;
|
||||
}
|
||||
|
||||
|
||||
.largeDrawerInside {
|
||||
.drawerMains {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
width="64%"
|
||||
:zIndex="1001"
|
||||
>
|
||||
<div class="drawerMains">
|
||||
<div class="drawerMains" ref="drawerContent">
|
||||
<div class="headers" style="margin-top:-24px;">
|
||||
<div class="headerTitle">{{ name }}</div>
|
||||
<img
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<!-- <div class="top">
|
||||
<div class="top">
|
||||
<div class="item">
|
||||
<a-input @pressEnter="searchData(true)" style="border-radius: 8px;width:240px;height: 40px;" v-model:value="nameUserNo" placeholder="请输入工号/讲师名称进行搜索" allowClear />
|
||||
</div>
|
||||
@@ -41,14 +41,15 @@
|
||||
<a-button type="primary" @click="searchData(true)" style="margin-right:20px;border-radius:8px;width: 100px;height: 40px;">搜索</a-button>
|
||||
<a-button type="primary" @click="resetData()" style="border-radius:8px;width: 100px;height: 40px;">重置</a-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="table">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="searchTrue?searchList:expenseList"
|
||||
:data-source="expenseList"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
:loading="loadingData"
|
||||
:custom-row="customRow"
|
||||
>
|
||||
<template #action="{ record,index }">
|
||||
<div class="action">
|
||||
@@ -195,10 +196,13 @@ watch(()=>props.visible,(val)=>{
|
||||
}).catch(()=>{
|
||||
message.error('获取数据失败,请重新尝试')
|
||||
loadingData.value = false
|
||||
forData.value = []
|
||||
expenseList.value = []
|
||||
})
|
||||
}else{
|
||||
nameUserNo.value = null
|
||||
dateValue.value = null
|
||||
drawerContent.value.scrollTo({top:0,behavior: 'smooth'})
|
||||
}
|
||||
})
|
||||
const removeId = (e,i) =>{
|
||||
@@ -229,10 +233,18 @@ const removeId = (e,i) =>{
|
||||
const nameUserNo = ref(null)
|
||||
const dateValue = ref(null)
|
||||
const searchTrue = ref(false)
|
||||
const drawerContent = ref(null)
|
||||
const customRow = (record) => {
|
||||
return {
|
||||
style:{
|
||||
backgroundColor: searchTrue.value && searchList.value.some(item => item.id === record.id) ? '#a6dff9' : '',
|
||||
}
|
||||
};
|
||||
};
|
||||
const searchData = (val) => {
|
||||
searchTrue.value = val
|
||||
if(!nameUserNo.value&&!dateValue.value){
|
||||
searchList.value = expenseList.value;
|
||||
// searchList.value = expenseList.value;
|
||||
return
|
||||
}
|
||||
//搜索 数组expenseList.value 参数名字或者工号:nameUserNo.value 日期:dateValue.value
|
||||
@@ -251,6 +263,11 @@ const searchData = (val) => {
|
||||
return isNameMatch || isDateInRange;
|
||||
});
|
||||
searchList.value = filteredList;
|
||||
let scrollHeight = null
|
||||
filteredList.length && (scrollHeight = expenseList.value.findIndex(item => item.id === filteredList[0].id))
|
||||
if(scrollHeight||scrollHeight==0){
|
||||
drawerContent.value.scrollTo({top:(scrollHeight+1)*50+300,behavior: 'smooth'})
|
||||
}
|
||||
}
|
||||
const resetData = () => {
|
||||
nameUserNo.value = null
|
||||
@@ -392,6 +409,7 @@ const columns = [
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
customCell:()=>{return {style:{background:'#fff'}}},
|
||||
slots: { customRender: "action" },
|
||||
},
|
||||
]
|
||||
@@ -428,6 +446,19 @@ const config = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 重置表格行的悬停效果 */
|
||||
::v-deep .ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
|
||||
background: none;
|
||||
}
|
||||
/* 未选中行的鼠标划入样式 */
|
||||
::v-deep .ant-table-tbody > tr:not(.ant-table-row-selected):hover > td {
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* 未选中行的鼠标划出样式 */
|
||||
::v-deep .ant-table-tbody > tr:not(.ant-table-row-selected):not(:hover) > td {
|
||||
background: none;
|
||||
}
|
||||
.delete {
|
||||
min-width: 424px;
|
||||
background: #ffffff;
|
||||
@@ -545,7 +576,8 @@ const config = () => {
|
||||
.drawerMains {
|
||||
min-width: 600px;
|
||||
// margin: 0px 32px 0px 32px;
|
||||
overflow-x: auto;
|
||||
height:100%;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding:24px;
|
||||
@@ -559,6 +591,7 @@ const config = () => {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.headerTitle {
|
||||
margin: 24px 0;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
|
||||
@@ -687,7 +687,7 @@ export default {
|
||||
{ value: '1', label: "手动录入" },
|
||||
])
|
||||
const scoreList = ref([
|
||||
{ value: '', label: "全部" },
|
||||
// { value: '', label: "全部" },
|
||||
{ value: '90-100', label: "90-100" },
|
||||
{ value: '80-90', label: "80-90" },
|
||||
{ value: '70-80', label: "70-80" },
|
||||
@@ -703,9 +703,10 @@ export default {
|
||||
{ value: '0-50', label: "0~50" },
|
||||
{ value: '0-70', label: "0~70" },
|
||||
{ value: '0-100', label: "0~100" },
|
||||
{ value: '0-150', label: "0~150" },
|
||||
// { value: '0-150', label: "0~150" },
|
||||
{ value: '0-200', label: "0~200" },
|
||||
{ value: '0-300', label: "0~300 " },
|
||||
{ value: '300以上', label: "300以上" },
|
||||
])
|
||||
const scoreChange = (e) => {
|
||||
if (e.length !== 0) {
|
||||
@@ -1345,7 +1346,7 @@ export default {
|
||||
// },
|
||||
])
|
||||
const gettableDatas = (record) => {
|
||||
getExpenseByCourseId({ courseId: record.courseId })
|
||||
getExpenseByCourseId({ courseId: record.courseId,teacherId:record.teacherId })
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
tableDatas.value = res.data.data
|
||||
|
||||
@@ -717,7 +717,7 @@
|
||||
{ value: '0', label: "在线课" },
|
||||
{ value: '2', label: "课程开发" },
|
||||
{ value: '3', label: "作业员入模培训" },
|
||||
{ value: '4', label: "其他" },
|
||||
// { value: '4', label: "其他" },
|
||||
])
|
||||
//认证状态
|
||||
const AuthenticationStatusList = ref([
|
||||
|
||||
Reference in New Issue
Block a user