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