mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-22 17:26:46 +08:00
Merge branch 'zcwy-teacher-manage' of https://codeup.aliyun.com/648097ddb583fece2f059e59/vue/fe-manage into zcwy-teacher-manage
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="CommonStudent">
|
||||
<a-drawer :visible="visiable" class="drawerStyle ProjCheckship CommonStudent" placement="right" width="40%">
|
||||
<a-drawer destroyOnClose :visible="visiable" class="drawerStyle ProjCheckship CommonStudent" placement="right" width="40%">
|
||||
<div class="drawerMain" id="ProjCheckship" style="">
|
||||
<div class="header">
|
||||
<div class="headerTitle">
|
||||
@@ -217,7 +217,6 @@ const stuColumns = ref([
|
||||
ellipsis: true,
|
||||
},
|
||||
]);
|
||||
const auditTableRef = ref();
|
||||
const screenHeight = ref(document.body.clientHeight);
|
||||
|
||||
const closeDrawer = () => {
|
||||
@@ -282,8 +281,6 @@ watch(visiable, () => {
|
||||
audienceName.value.keyword = "";
|
||||
|
||||
if (!visiable.value) {
|
||||
auditTableRef.value && auditTableRef.value.clear();
|
||||
auditTableRef.value && auditTableRef.value.reset({ keyword: "" });
|
||||
stuTableRef.value && stuTableRef.value.clear();
|
||||
stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: '' });
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ const onSelectChange = (e, l) => {
|
||||
selectedRowKeys.value = e
|
||||
selectsData.value = l
|
||||
}
|
||||
const emit = defineEmits({})
|
||||
const emit = defineEmits(['selectedRowKeys','update:visible'])
|
||||
const addList = (item) => {
|
||||
selectedRowKeys.value.push(item.id)
|
||||
selectsData.value.push(item)
|
||||
|
||||
@@ -136,16 +136,13 @@ const handleConfirm = () => {
|
||||
}
|
||||
numTime.value+=1
|
||||
localStorage.setItem('numTime',numTime.value)
|
||||
const ids = expenseList.value?.map(item=>item.id)
|
||||
api.teacherExpenseConfirm(ids).then(res=>{
|
||||
const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
|
||||
if(!ids.length){
|
||||
return message.error('暂无可提交的数据')
|
||||
}
|
||||
api.teacherExpenseConfirm({ids:ids?.join(',')}).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
const obj = ids?.map(item=>{
|
||||
return {
|
||||
id: item,
|
||||
status: 1
|
||||
}
|
||||
})
|
||||
api.isConfirm(obj).then(res=>{
|
||||
api.submitApproval({ids:ids?.join(',')}).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
message.success('提交成功')
|
||||
close()
|
||||
@@ -189,6 +186,13 @@ watch(()=>props.visible,(val)=>{
|
||||
}
|
||||
})
|
||||
const removeId = (e,i) =>{
|
||||
forData.value?.forEach(item=>{
|
||||
item.expenseList?.some((i,l)=>{
|
||||
if(i.id == e.id){
|
||||
return item.expenseList.splice(l,1)
|
||||
}
|
||||
})
|
||||
})
|
||||
if(searchTrue.value){
|
||||
searchList.value = searchList.value.filter(item=>item.id !== e.id)
|
||||
expenseList.value = expenseList.value.filter(item=>item.id !== e.id)
|
||||
@@ -209,6 +213,9 @@ const searchData = (val) => {
|
||||
const filteredList = expenseList.value.filter(item => {
|
||||
const isNameMatch = (item.name + item.userNo).includes(nameUserNo.value);
|
||||
const teachingDateTimestamp = new Date(item.teachingDate).getTime();
|
||||
if(dateValue.value==null){
|
||||
return isNameMatch
|
||||
}
|
||||
const startDateTimestamp = new Date(dateValue.value[0]).getTime();
|
||||
const endDateTimestamp = new Date(dateValue.value[1]).getTime();
|
||||
const isDateInRange = teachingDateTimestamp >= startDateTimestamp && teachingDateTimestamp <= endDateTimestamp;
|
||||
@@ -221,7 +228,7 @@ const resetData = () => {
|
||||
dateValue.value = null
|
||||
searchData(false)
|
||||
}
|
||||
const emit = defineEmits({})
|
||||
const emit = defineEmits(['update:visible'])
|
||||
const columns = [
|
||||
{
|
||||
title: '讲师名称',
|
||||
@@ -340,15 +347,14 @@ const columns = [
|
||||
]
|
||||
const closeDrawer = () => emit("update:visible", false);
|
||||
const qureyDrawer = () => {
|
||||
if(!expenseList.value.length){
|
||||
const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
|
||||
if(!ids.length){
|
||||
return message.error('暂无可提交的数据')
|
||||
return
|
||||
}
|
||||
dialog({
|
||||
content: '是否确认讲师费信息无误?提交后按“培训发生组织”汇总至审批中心,等待验证后“提交”进入审批流程。',
|
||||
ok: () => {
|
||||
const ids = expenseList.value.map(item=>item.id)
|
||||
api.teacherExpenseConfirm(ids).then(res=>{
|
||||
api.teacherExpenseConfirm({ids:ids?.join(',')}).then(res=>{
|
||||
console.log(res,'resssss')
|
||||
message.success('提交成功')
|
||||
closeDrawer()
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
* @Descripttion: 富文本编辑器组件
|
||||
-->
|
||||
<template>
|
||||
<div style="border: 1px solid #ccc; width: 100%; ">
|
||||
<div style="border: 1px solid #ccc; width: 100%;position:relative; ">
|
||||
<Toolbar style="border-bottom: 1px solid #ccc ;font-size:4px" :editor="editorRef" :defaultConfig="toolbarConfig" mode="simple" />
|
||||
<Editor style="height: 100px; overflow-y: hidden" v-model="valueHtml" :defaultConfig="editorConfig" mode="simple" @onCreated="handleCreated" @customPaste="customPaste" />
|
||||
<span>{{ }}</span>
|
||||
<Editor style="height: 100px; overflow-y: hidden" v-model="valueHtml" :defaultConfig="editorConfig" mode="simple" @onCreated="handleCreated" @onChange="handleChange" @customPaste="customPaste" />
|
||||
<span style="position:absolute;right:6px;bottom:4px;">{{ valueLength }}/200</span>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@@ -37,7 +37,6 @@
|
||||
})
|
||||
watch(()=>props.value,(val)=>{
|
||||
valueHtml.value = val
|
||||
console.log(val,'222222222222222');
|
||||
})
|
||||
const toolbarConfig = {
|
||||
excludeKeys: [
|
||||
@@ -79,7 +78,16 @@
|
||||
console.log('上传视频', file);
|
||||
},
|
||||
};
|
||||
|
||||
const valueLength = ref(0)
|
||||
const handleChange = (editor) => {
|
||||
const reg = /<[^<>]+>/g;
|
||||
const value = valueHtml.value.replace(reg, "");
|
||||
valueLength.value = value.length
|
||||
if (valueLength.value > 200) {
|
||||
valueHtml.value = '<p>' + value.slice(0, 200) + '</p>'
|
||||
editor.setHtml(valueHtml.value);
|
||||
}
|
||||
};
|
||||
// 富文本编辑器生成后触发
|
||||
const handleCreated = editor => {
|
||||
editorRef.value = editor; // 记录 editor 实例,重要!
|
||||
|
||||
@@ -202,6 +202,7 @@ const searchMember = (keyword) => {
|
||||
sLevelName:item.sLevelName,
|
||||
payrollPlaceCode: item.payrollPlaceCode,
|
||||
payrollPlaceName:item.payrollPlaceName,
|
||||
avatar: item.avatar,
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user