Merge branch 'zcwy-teacher-manage' into master_1202

This commit is contained in:
joshen
2024-12-16 11:56:53 +08:00
18 changed files with 1822 additions and 1082 deletions

View File

@@ -182,7 +182,7 @@
function remove(i) { function remove(i) {
rowSelectKeys.value.splice(i, 1); rowSelectKeys.value.splice(i, 1);
selectsData.value.splice(i, 1); selectsData.value = selectsData.value.filter((_, index) => index !== i);
emit("update:selectedRowKeys", rowSelectKeys.value); emit("update:selectedRowKeys", rowSelectKeys.value);
emit("update:selectedRows", selectsData.value); emit("update:selectedRows", selectsData.value);
} }

View File

@@ -131,7 +131,7 @@ const props = defineProps({
title: { title: {
type: String, type: String,
default: '' default: ''
} },
}); });
onMounted(()=>{ onMounted(()=>{
// onlineLearningList() // onlineLearningList()
@@ -237,7 +237,6 @@ function onLoadData(treeNode) {
} }
); );
} }
const openDrawer = () => { const openDrawer = () => {
visiable.value = true; visiable.value = true;
stuSelectRows.value = props.arrayList stuSelectRows.value = props.arrayList
@@ -264,6 +263,13 @@ const deleteDepSelect = () => {
//确定添加授权 //确定添加授权
const submitAuth = () => { const submitAuth = () => {
teaunm.value.map(item=>{
props.arrayList.map(i=>{
if(item.id === i.userId){
item.affiliationUserId = i.affiliationUserId
}
})
})
emit('update:arrayList',teaunm.value) emit('update:arrayList',teaunm.value)
emit('valueChange',teaunm.value,props.type) emit('valueChange',teaunm.value,props.type)
visiable.value = false; visiable.value = false;

View File

@@ -2,7 +2,7 @@
<a-drawer <a-drawer
:visible="visible" :visible="visible"
:closable="false" :closable="false"
class="RouterFaceStus" class="largeDrawerStyle"
placement="right" placement="right"
width="70%" width="70%"
> >
@@ -18,10 +18,22 @@
<div class="content"> <div class="content">
<div class="box"> <div class="box">
<div style="margin-bottom: 20px;font-size: 18px;font-weight: 700;">选择讲师费汇总:<span style="color:red;margin-left:20px;">{{payableExpense.toFixed(2)||0}}</span></div> <div style="margin-bottom: 20px;font-size: 18px;font-weight: 700;">选择讲师费汇总:<span style="color:red;margin-left:20px;">{{payableExpense.toFixed(2)||0}}</span></div>
<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>
<div class="item">
<a-range-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD" style="border-radius: 8px;width:360px;height: 40px;" v-model:value="dateValue" />
</div>
<div class="item">
<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 class="table" style="padding-bottom:72px;"> <div class="table" style="padding-bottom:72px;">
<a-table <a-table
:columns="columns" :columns="columns"
:data-source="tableData" :data-source="searchTrue?searchList:tableData"
:pagination="false" :pagination="false"
:scroll="{ x: 'max-content' }" :scroll="{ x: 'max-content' }"
row-key="id" row-key="id"
@@ -78,6 +90,38 @@ watch(()=>props.visible,(val)=>{
selectsData.value = [] selectsData.value = []
} }
}) })
const nameUserNo = ref(null)
const dateValue = ref(null)
const searchTrue = ref(false)
const searchList = ref([])
const resetData = () => {
nameUserNo.value = null
dateValue.value = null
searchData(false)
}
const searchData = (val) => {
searchTrue.value = val
if(!nameUserNo.value&&!dateValue.value){
searchList.value = tableData.value;
return
}
//搜索 数组expenseList.value 参数名字或者工号nameUserNo.value 日期dateValue.value
const filteredList = tableData.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;
if(nameUserNo.value&&startDateTimestamp&&endDateTimestamp){
return isNameMatch && isDateInRange;
}
return isNameMatch || isDateInRange;
});
searchList.value = filteredList;
}
const loading = ref(false) const loading = ref(false)
const selectedRowKeys = ref([]) const selectedRowKeys = ref([])
const selectsData = ref([]); const selectsData = ref([]);
@@ -224,12 +268,12 @@ const columns = [
key: 'expense', key: 'expense',
align: 'center', align: 'center',
}, },
{ // {
title: '应发费用', // title: '应发费用',
dataIndex: 'payableExpense', // dataIndex: 'payableExpense',
key: 'payableExpense', // key: 'payableExpense',
align: 'center', // align: 'center',
}, // },
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
@@ -257,14 +301,14 @@ const queryDrawer = () => {
<style lang="scss" scoped> <style lang="scss" scoped>
.RouterFaceStus { .largeDrawerStyle {
.drawerMains { .drawerMains {
min-width: 600px; min-width: 600px;
// margin: 0px 32px 0px 32px; // margin: 0px 32px 0px 32px;
overflow-x: auto; overflow-x: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding:24px;
.headers { .headers {
height: 73px; height: 73px;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;

View File

@@ -2,7 +2,7 @@
<a-drawer <a-drawer
:visible="visible" :visible="visible"
:closable="false" :closable="false"
class="RouterFaceStus" class="largeDrawerStyle"
placement="right" placement="right"
width="64%" width="64%"
:zIndex="1001" :zIndex="1001"
@@ -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,7 +41,7 @@
<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"
@@ -61,7 +61,7 @@
</div> </div>
<div class="btnn"> <div class="btnn">
<button class="btn1" @click="config">确认提交审批</button> <button class="btn1" @click="config">确认提交审批</button>
<button class="btn1" @click="qureyDrawer"></button> <button class="btn1" @click="qureyDrawer">认至审批中心</button>
<button class="btn2" @click="closeDrawer">取消</button> <button class="btn2" @click="closeDrawer">取消</button>
</div> </div>
</div> </div>
@@ -87,7 +87,7 @@
<span>操作确认</span> <span>操作确认</span>
<div class="close_exit" @click="close"></div> <div class="close_exit" @click="close"></div>
</div> </div>
<div class="title">本月可提交审批次数 <span style="color:#4ea6ff"> {{ numTime }} / 10 </span></div> <!-- <div class="title">本月可提交审批次数 <span style="color:#4ea6ff"> {{ numTime }} / 10 </span></div> -->
<div class="body"> <div class="body">
<div> <div>
<span>请仔细核对讲师费信息确认无误后将自动进入(BPM系统)审批流程</span> <span>请仔细核对讲师费信息确认无误后将自动进入(BPM系统)审批流程</span>
@@ -132,12 +132,12 @@ const close = () => {
modalVisible.value = false; modalVisible.value = false;
} }
const handleConfirm = () => { const handleConfirm = () => {
if(numTime.value >= 10){ // if(numTime.value >= 10){
message.error('提交审批次数已达上限') // message.error('提交审批次数已达上限')
return // return
} // }
numTime.value+=1 // numTime.value+=1
localStorage.setItem('numTime',numTime.value) // localStorage.setItem('numTime',numTime.value)
const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id)); const ids = forData.value.flatMap(item => item.expenseList.map(item => item.id));
if(!ids.length){ if(!ids.length){
return message.error('暂无可提交的数据') return message.error('暂无可提交的数据')
@@ -177,7 +177,7 @@ const clickItem = (item,i) => {
watch(()=>props.visible,(val)=>{ watch(()=>props.visible,(val)=>{
if(val){ if(val){
loadingData.value = true loadingData.value = true
numTime.value = Number(localStorage.getItem('numTime')||0) // numTime.value = Number(localStorage.getItem('numTime')||0)
api.getListByAffiliation( api.getListByAffiliation(
{ {
name: '', name: '',
@@ -374,12 +374,12 @@ const columns = [
key: 'expense', key: 'expense',
align: 'center', align: 'center',
}, },
{ // {
title: '应发费用', // title: '应发费用',
dataIndex: 'payableExpense', // dataIndex: 'payableExpense',
key: 'payableExpense', // key: 'payableExpense',
align: 'center', // align: 'center',
}, // },
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
@@ -486,9 +486,9 @@ const config = () => {
.body { .body {
width: 100%; width: 100%;
padding: 0 30px; padding: 0 50px;
margin: 34px auto 56px auto; margin: 34px auto 56px auto;
margin-top: 10px; margin-top: 40px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@@ -533,14 +533,14 @@ const config = () => {
} }
} }
.RouterFaceStus { .largeDrawerStyle {
.drawerMains { .drawerMains {
min-width: 600px; min-width: 600px;
// margin: 0px 32px 0px 32px; // margin: 0px 32px 0px 32px;
overflow-x: auto; overflow-x: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding:24px;
.headers { .headers {
height: 73px; height: 73px;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
@@ -646,7 +646,7 @@ const config = () => {
.btn1 { .btn1 {
cursor: pointer; cursor: pointer;
width: 100px; width: 120px;
height: 40px; height: 40px;
background: #4ea6ff; background: #4ea6ff;
border-radius: 8px; border-radius: 8px;

View File

@@ -1,6 +1,6 @@
<template> <template>
<a-drawer :visible="visible" placement="right" :closable="false" :maskClosable="false" <a-drawer :visible="visible" class="largeDrawerStyle" placement="right" :closable="false" :maskClosable="false"
width="80%" :title="false"> width="80%" :title="false">
<!-- 外部讲师查看详情 --> <!-- 外部讲师查看详情 -->
<div class="LookExternalLecturer"> <div class="LookExternalLecturer">
@@ -22,7 +22,7 @@
<a-descriptions title="基本信息" style="padding:0 20px;" bordered :column="3" :contentStyle="rowCenters" :labelStyle="rowCenter"> <a-descriptions title="基本信息" style="padding:0 20px;" bordered :column="3" :contentStyle="rowCenters" :labelStyle="rowCenter">
<!-- 一层 --> <!-- 一层 -->
<a-descriptions-item label="讲师头像"> <a-image <a-descriptions-item label="讲师头像"> <a-image
:width="55" style="border-radius: 50%;" :width="55" style="border-radius: 50%;width:55px;height:55px;"
:src=formParam.photo :src=formParam.photo
/></a-descriptions-item> /></a-descriptions-item>
<a-descriptions-item label="讲师姓名">{{formParam.name||'-'}}</a-descriptions-item> <a-descriptions-item label="讲师姓名">{{formParam.name||'-'}}</a-descriptions-item>
@@ -173,7 +173,7 @@ export default{
customRender: (value) => { customRender: (value) => {
return ( return (
<div> <div>
{dayjs(value.record?.teachingDate).format("YYYY-MM-DD HH:mm")} {value.record?.teachingDate?dayjs(value.record?.teachingDate).format("YYYY-MM-DD HH:mm"):'-'}
</div> </div>
); );
}, },
@@ -332,6 +332,7 @@ export default{
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding:24px;
.header { .header {
padding: 0px 32px; padding: 0px 32px;
height: 73px; height: 73px;

View File

@@ -1,5 +1,5 @@
<template> <template>
<a-drawer :visible="visible" placement="right" :closable="false" :maskClosable="false" <a-drawer class="largeDrawerStyle" :visible="visible" placement="right" :closable="false" :maskClosable="false"
width="80%" :title="false"> width="80%" :title="false">
<!-- 内部讲师查看详情 --> <!-- 内部讲师查看详情 -->
<div class="LookInsideLecturer"> <div class="LookInsideLecturer">
@@ -20,7 +20,7 @@
<a-descriptions title="基本信息" bordered :column="4" :contentStyle="rowCenter" :labelStyle="rowCenters"> <a-descriptions title="基本信息" bordered :column="4" :contentStyle="rowCenter" :labelStyle="rowCenters">
<!-- 一层 --> <!-- 一层 -->
<a-descriptions-item label="讲师头像"> <a-descriptions-item label="讲师头像">
<a-image :width="55" style="border-radius: 50%;" :src=formParam.photo /> <a-image :width="55" style="border-radius: 50%;width:55px;height:55px;" :src=formParam.photo />
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="讲师姓名">{{formParam.name}}/{{formParam.userNo}}</a-descriptions-item> <a-descriptions-item label="讲师姓名">{{formParam.name}}/{{formParam.userNo}}</a-descriptions-item>
<a-descriptions-item label="讲师体系">{{formParam.tsystemName || '-'}}</a-descriptions-item> <a-descriptions-item label="讲师体系">{{formParam.tsystemName || '-'}}</a-descriptions-item>
@@ -165,6 +165,8 @@ export default{
if(val){ if(val){
const id = props.id const id = props.id
TeacherSystem(id) TeacherSystem(id)
}else{
state.formParam = {}
} }
}) })
const isOrgNames = (val) => { const isOrgNames = (val) => {
@@ -233,7 +235,7 @@ export default{
customRender: (value) => { customRender: (value) => {
return ( return (
<div> <div>
{dayjs(value.record?.teachingDate).format("YYYY-MM-DD HH:mm")} {value.record?.teachingDate?dayjs(value.record?.teachingDate).format("YYYY-MM-DD HH:mm"):'-'}
</div> </div>
); );
}, },
@@ -460,6 +462,7 @@ const handleup = ()=>{
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.LookInsideLecturer { .LookInsideLecturer {
padding:24px;
.header { .header {
padding: 0px 32px; padding: 0px 32px;
height: 73px; height: 73px;

View File

@@ -1,20 +1,20 @@
<template> <template>
<div> <div>
<a-popover :getPopupContainer=" <!-- <a-popover :getPopupContainer="
(triggerNode) => { (triggerNode) => {
return triggerNode.parentNode || document.body; return triggerNode.parentNode || document.body;
} }
" v-model:visible="visible" placement="bottom" trigger="click"> " v-model:visible="visible" placement="bottom" trigger="click"> -->
<template #content v-if="!disabled"> <!-- <template #content v-if="!disabled"> -->
<div class="pover"> <div class="pover">
<div class="search"> <div class="search">
<a-select <a-select
v-model:value="selectName" :disabled="disabled"
v-model:value="selectData"
style="width: 100%" style="width: 100%"
placeholder="请查询姓名或工号" placeholder="请查询姓名或工号"
:options="isOpen?options:selectOptions" :options="isOpen?options:selectOptions"
:filter-option="false" :filter-option="false"
allowClear
showSearch showSearch
:open="isOpen" :open="isOpen"
:defaultOpen="false" :defaultOpen="false"
@@ -28,7 +28,7 @@
</template> </template>
</a-select> </a-select>
</div> </div>
<div class="tree"> <!-- <div class="tree">
<a-tree show-icon allow-clear tree-default-expand-all :tree-data="treeData" :loading="orgLoading" <a-tree show-icon allow-clear tree-default-expand-all :tree-data="treeData" :loading="orgLoading"
:load-data="onLoadData" @expand="onExpand" v-model:selectedKeys="stuTreeSelectKeys" :load-data="onLoadData" @expand="onExpand" v-model:selectedKeys="stuTreeSelectKeys"
v-model:expandedKeys="stuTreeExpandedKeys" :fieldNames="{ v-model:expandedKeys="stuTreeExpandedKeys" :fieldNames="{
@@ -44,12 +44,11 @@
</div> </div>
<div class="btn"> <div class="btn">
<div class="btn0 btn1" @click="notChange">取消</div> <div class="btn0 btn1" @click="notChange">取消</div>
<!-- <div class="btn0 btn2" @click="changeOut">确定</div> -->
<a-button :loading="loadingChange" @click="changeOut" class="btn0 btn2" type="primary">确定</a-button> <a-button :loading="loadingChange" @click="changeOut" class="btn0 btn2" type="primary">确定</a-button>
</div> </div> -->
</div> </div>
</template> <!-- </template> -->
<a-select <!-- <a-select
v-model:value="selectData" v-model:value="selectData"
style="width: 100%" style="width: 100%"
placeholder="请选择讲师" placeholder="请选择讲师"
@@ -62,8 +61,8 @@
<template v-if="loading" #notFoundContent> <template v-if="loading" #notFoundContent>
<a-spin size="small"/> <a-spin size="small"/>
</template> </template>
</a-select> </a-select> -->
</a-popover> <!-- </a-popover> -->
</div> </div>
</template> </template>
@@ -130,6 +129,9 @@ watch(()=>props.value,(val)=>{
selectData.value = null selectData.value = null
} }
},{immediate:true}) },{immediate:true})
onMounted(()=>{
console.log('hahhahahahahhaha')
})
const teacherName = ref('') const teacherName = ref('')
const selectName = ref(null) const selectName = ref(null)
const options = ref([]); const options = ref([]);
@@ -164,7 +166,18 @@ const handleChange = (e,l) => {
neworgName.value= neworgName.value[ neworgName.value.length-1] neworgName.value= neworgName.value[ neworgName.value.length-1]
} }
changeValue.value = l changeValue.value = l
// emit('tlevel',l) emit('tlevel',l)
emit('tlevel',changeValue.value)
// selectData.value = teacherName.value
emit('update:value',selectData.value)
emit('update:lable',orgName.value)
emit('update:orgId',orgId.value)
// emit('update:system',systemName.value)
emit('update:level',levelName.value)
// emit('update:newlable',neworgName.value)
emit('update:id',teacherId.value)
emit('update:payrollPlaceCode',payrollPlaceCode.value)
emit('update:payrollPlaceName',payrollPlaceName.value)
}; };
function debounce(func, wait) { function debounce(func, wait) {
let timeout; let timeout;
@@ -211,12 +224,14 @@ const searchMember = (keyword) => {
avatar: item.avatar, avatar: item.avatar,
gender: item.gender gender: item.gender
} }
}) }) || []
}else{ }else{
options.value = []
loading.value = false loading.value = false
} }
}).catch(()=>{ }).catch(()=>{
loading.value = false loading.value = false
options.value = []
}) })
const params = { const params = {
pageNo: 1, pageNo: 1,
@@ -381,6 +396,7 @@ watch(()=>teacherId.value,(val)=>{
) )
}) })
} }
emit('update:system',systemName.value)
} }
loadingChange.value = false loadingChange.value = false
// emit('update:system',systemName.value) // emit('update:system',systemName.value)
@@ -426,12 +442,12 @@ const changeOut = () => {
} }
.pover{ .pover{
::v-deep .ant-select-selector{ ::v-deep .ant-select-selector{
height: 30px !important; height: 40px !important;
border-radius: 4px !important; border-radius: 8px !important;
line-height: 30px !important; line-height: 40px !important;
} }
.search{ .search{
margin-top: 10px; // margin-top: 10px;
} }
.tree{ .tree{
margin-top: 5px; margin-top: 5px;

View File

@@ -67,9 +67,9 @@
</template> </template>
</a-table> </a-table>
</div> </div>
<div style="margin-bottom: 100px"> <!-- <div style="margin-bottom: 100px">
<a-table v-if="threeList" :columns="columnsThree" :loading="formData?.loadingThree" :data-source="formData?.tableDataThree" :pagination="false"/> <a-table v-if="threeList" :columns="columnsThree" :loading="formData?.loadingThree" :data-source="formData?.tableDataThree" :pagination="false"/>
</div> </div> -->
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>
@@ -80,6 +80,11 @@
<button class="btn2" @click="confirm">撤销编辑内容</button> <button class="btn2" @click="confirm">撤销编辑内容</button>
</div> </div>
</div> </div>
<a-modal :footer="null" width="800px" v-model:visible="visibleModal" title="审批记录详情">
<div style="margin: 20px;padding-bottom: 20px;">
<a-table :columns="columnsThree" :loading="formData?.loadingThree" :data-source="formData?.tableDataThree" :pagination="false"/>
</div>
</a-modal>
</a-drawer> </a-drawer>
</template> </template>
@@ -99,6 +104,7 @@ const props = defineProps({
} }
}); });
const emit = defineEmits({}); const emit = defineEmits({});
const visibleModal = ref(false)
const columns = [ const columns = [
{ {
title: '组织的名称', title: '组织的名称',
@@ -250,9 +256,11 @@ const approvalData = ref(null)
const threeList = ref(false) const threeList = ref(false)
const lookList = (record) => { const lookList = (record) => {
console.log(record,'resssssss') console.log(record,'resssssss')
if(!threeList.value||record.approvalId!=approvalData.value){ // if(!threeList.value||record.approvalId!=approvalData.value){
threeList.value = true // threeList.value = true
approvalData.value = record.approvalId // approvalData.value = record.approvalId
formData.value.tableDataThree = []
visibleModal.value = true
formData.value.loadingThree = true formData.value.loadingThree = true
api.getApprovalResultByApprovalIdList(record.approvalId).then(res=>{ api.getApprovalResultByApprovalIdList(record.approvalId).then(res=>{
if(res.data.code == 200){ if(res.data.code == 200){
@@ -264,10 +272,10 @@ const lookList = (record) => {
formData.value.loadingThree = false formData.value.loadingThree = false
message.error(err.data.msg) message.error(err.data.msg)
}) })
}else{ // }else{
threeList.value = false // threeList.value = false
approvalData.value = null // approvalData.value = null
} // }
} }
const visible = ref(false); const visible = ref(false);
watch(visible, (val)=>{ watch(visible, (val)=>{

View File

@@ -4075,13 +4075,18 @@ function onFocusEnd(){
// } // }
state.addLoading = true; state.addLoading = true;
editPlan(postData) editPlan(postData)
.then(() => { .then((res) => {
getTableDate3(); if(res.data.code == 200){
handleCancelStu(); getTableDate3();
rest(); handleCancelStu();
rest();
}else{
message.error(res.data.msg)
}
state.addLoading = false; state.addLoading = false;
}) })
.catch((err) => { .catch((err) => {
message.error(err.data.msg)
state.loading = false; state.loading = false;
console.log(err); console.log(err);
}); });
@@ -4576,8 +4581,13 @@ function onFocusEnd(){
if (res.data.code === 200) { if (res.data.code === 200) {
getTableDate3(); getTableDate3();
delete_exit1(); delete_exit1();
}else{
message.error(res.data.msg)
} }
}); }).catch(err=>{
message.destroy()
message.error(err.data.msg)
})
} else if (state.offcourseId) { } else if (state.offcourseId) {
handle({ handle({
offcourseId: state.offcourseId, offcourseId: state.offcourseId,

View File

@@ -63,140 +63,158 @@
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false" <a-drawer class="largeDrawerStyle" v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false"
width="700px" :title="false"> width="700px" :title="false">
<div class="headers" style="margin-top:-24px;width: 110%;margin-left: -24px;"> <div style="padding:24px">
<div class="headerTitle">{{ teacherdialogtitle }}</div> <div class="headers" style="margin-top:-24px;width: 110%;margin-left: -24px;">
<img <div class="headerTitle">{{ teacherdialogtitle }}</div>
style="width: 29px; height: 29px; cursor: pointer;margin-right: 24px;" <img
src="@/assets/images/basicinfo/close.png" style="width: 29px; height: 29px; cursor: pointer;margin-right: 24px;"
@click="cancelTeacherDialog" src="@/assets/images/basicinfo/close.png"
/> @click="cancelTeacherDialog"
</div> />
<a-form style="padding-left:12px;padding-right: 46px;" :model="formParam" :rules="rules" layout="vertical" ref="formRef" > </div>
<!-- 基本信息 --> <a-form style="padding-left:12px;padding-right: 46px;" :model="formParam" layout="vertical" ref="formRef" >
<a-row> <!-- 基本信息 -->
<a-col :span="24"> <a-row>
<span class="line"></span><span style="font-weight: 600;">基本信息</span> <a-col :span="24">
</a-col> <span class="line"></span><span style="font-weight: 600;">基本信息</span>
<!-- 头像 --> </a-col>
</a-row> <!-- 头像 -->
<a-row :gutter="16"> </a-row>
<a-col :span="24"> <a-row :gutter="16">
<div class="item_inp" style="background-color: #fff;"> <a-col :span="24">
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false" <div class="item_inp" style="background-color: #fff;">
:headers="headers" :before-upload="beforeUpload"> <a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" title="更换头像" /> :headers="headers" :before-upload="beforeUpload">
<img class="i_upload_img" v-else src="../../assets/Avatarman.png" alt="avatar" title="更换头像" /> <img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" title="更换头像" />
<!-- <div class="i_upload" v-else> <img class="i_upload_img" v-else src="../../assets/Avatarman.png" alt="avatar" title="更换头像" />
<div class="addimg"> <!-- <div class="i_upload" v-else>
<div class="heng"></div> <div class="addimg">
<div class="shu"></div> <div class="heng"></div>
</div> <div class="shu"></div>
</div> --> </div>
</a-upload> </div> -->
<div class="i_bottom"> </a-upload>
<div class="tip" style="margin-bottom: 10px;"> <div class="i_bottom">
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png </span> <div class="tip" style="margin-bottom: 10px;">
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png </span>
</div>
</div> </div>
</div> </div>
</div> </a-col>
</a-col> </a-row>
</a-row> <!-- 讲师名称 ,手机号码-->
<!-- 讲师名称 ,手机号码--> <a-row :gutter="16">
<a-row :gutter="16"> <a-col :span="24">
<a-form-item name="name">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师姓名
</template>
<a-input v-model:value="formParam.name" class="draitem" :maxlength="20" showCount
@blur="sendName"
placeholder="请输入讲师姓名" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item name="supplier">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
供应商
</template>
<a-input v-model:value="formParam.supplier" class="draitem" :maxlength="30" showCount
placeholder="请输入供应商" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
</a-row>
<!-- 供应商 ,邮箱-->
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="手机号码" name="mobile" prop="mobile">
<a-input v-model:value.trim="formParam.mobile" class="draitem"
placeholder="请输入手机号码" allowClear showSearch :maxLength="11" @blur="sendPhone">
</a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="讲师邮箱" name="email" prop="email">
<a-input v-model:value="formParam.email" type="email" class="draitem"
placeholder="请输入讲师邮箱" allowClear showSearch @blur="sendEmail">
</a-input>
</a-form-item>
</a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="讲师姓名" name="name"> <a-form-item label="初始授课时长" name="teaching">
<a-input v-model:value="formParam.name" class="draitem" :maxlength="20" showCount <a-input v-model:value="formParam.teaching" style="width:100%; height: 40px; border-radius: 8px ; "
@blur="sendName" placeholder="0" allowClear showSearch suffix="分钟" @blur="clearNonNumber" @focus="focusTeaching">
placeholder="请输入讲师姓名" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="供应商" name="supplier">
<a-input v-model:value="formParam.supplier" class="draitem" :maxlength="30" showCount
placeholder="请输入供应商" allowClear showSearch>
</a-input> </a-input>
</a-form-item> <!-- <span style="margin-left: 5px ;" v-if="formParam.teaching !== null">{{ (formParam.teaching / 60
).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teaching === null">0.00小时</span> -->
</a-form-item>
</a-col>
</a-row>
<!-- 其他信息 -->
<a-row>
<a-col :span="24" style="margin-bottom: 24px;margin-top: 12px;">
<span class="line"></span><span style="font-weight: 600;">其他信息</span>
</a-col> </a-col>
</a-row> </a-row>
<!-- 供应商 ,邮箱--> <!-- 讲师介绍 -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="手机号码" name="mobile" prop="mobile"> <a-form-item label="讲师介绍">
<a-input v-model:value.trim="formParam.mobile" class="draitem" <Editor v-model:value="formParam.description "/>
placeholder="请输入手机号码" allowClear showSearch :maxLength="11" @blur="sendPhone"> <!-- <a-textarea placeholder="富文本"/> -->
</a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="讲师邮箱" name="email" prop="email">
<a-input v-model:value="formParam.email" type="email" class="draitem"
placeholder="请输入讲师邮箱" allowClear showSearch @blur="sendEmail">
</a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="初始授课时长" name="teaching">
<a-input v-model:value="formParam.teaching" style="width:100%; height: 40px; border-radius: 8px ; "
placeholder="0" allowClear showSearch suffix="分钟" @blur="clearNonNumber">
</a-input>
<!-- <span style="margin-left: 5px ;" v-if="formParam.teaching !== null">{{ (formParam.teaching / 60
).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teaching === null">0.00小时</span> -->
</a-form-item>
</a-col>
</a-row>
<!-- 其他信息 -->
<a-row>
<a-col :span="24" style="margin-bottom: 24px;margin-top: 12px;">
<span class="line"></span><span style="font-weight: 600;">其他信息</span>
</a-col>
</a-row>
<!-- 讲师介绍 -->
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="讲师介绍">
<Editor v-model:value="formParam.description "/>
<!-- <a-textarea placeholder="富文本"/> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<!-- 备注 --> <!-- 备注 -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="24"> <a-col :span="24">
<a-form-item label="备注" style="margin-bottom: 80px;"> <a-form-item label="备注" style="margin-bottom: 80px;">
<a-textarea <a-textarea
v-model:value="formParam.remark" v-model:value="formParam.remark"
showCount showCount
:maxlength="200" :maxlength="200"
@blur="sendRemark" @blur="sendRemark"
style="width: 100%; height: 100px; border-radius: 8px" style="width: 100%; height: 100px; border-radius: 8px"
placeholder="请输入"/> placeholder="请输入"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
<!-- 交互按钮 --> <!-- 交互按钮 -->
<div <div
:style="{ :style="{
position: 'absolute', position: 'absolute',
right: 0, right: 0,
bottom: 0, bottom: 0,
width: '100%', width: '100%',
borderTop: '1px solid #e9e9e9', borderTop: '1px solid #e9e9e9',
padding: '10px 16px', padding: '10px 16px',
background: '#fff', background: '#fff',
textAlign: 'right', textAlign: 'right',
zIndex: 1, zIndex: 1,
} " } "
> >
<a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button> <a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button>
<a-button style="margin-right: 20px;" class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存 <a-button style="margin-right: 20px;" class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
</a-button> </a-button>
</div> </div>
</div>
</a-drawer> </a-drawer>
<!-- 删除功能弹窗 --> <!-- 删除功能弹窗 -->
@@ -330,7 +348,7 @@ export default {
teacherType:'2', teacherType:'2',
photo:null, photo:null,
status:1, status:1,
teaching:'', teaching:0,
}, },
vf:true, vf:true,
searchParam: { searchParam: {
@@ -542,8 +560,9 @@ export default {
state.formParam.supplier = state.formParam?.supplier?.trim() state.formParam.supplier = state.formParam?.supplier?.trim()
const formItemNames = Object.keys(rules); const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){ for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]); // const result = await validateField(formItemNames[i]);
if (result) { const result = state.formParam[formItemNames[i]]
if (!result) {
return message.error(rules[formItemNames[i]][0].log) return message.error(rules[formItemNames[i]][0].log)
} }
} }
@@ -650,7 +669,7 @@ export default {
status:1, status:1,
teacherType:2, teacherType:2,
photo:null, photo:null,
teaching:null, teaching:0,
name: null, name: null,
mobile: null, mobile: null,
email: null, email: null,
@@ -665,20 +684,20 @@ export default {
const rules = { const rules = {
name: [{ required: true, message: '',log: '讲师不能为空' }], name: [{ required: true, message: '',log: '讲师不能为空' }],
supplier:[{ required: true, message: '',log:'供应商不能为空' }], supplier:[{ required: true, message: '',log:'供应商不能为空' }],
email:[ // email:[
{ // {
type: "email", // type: "email",
message: '',log: '请输入正确的邮箱地址', // message: '',log: '请输入正确的邮箱地址',
trigger: "blur" // trigger: "blur"
} // }
], // ],
mobile: [ // mobile: [
{ // {
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, // pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: '',log: "请输入正确的手机号码", // message: '',log: "请输入正确的手机号码",
trigger: "blur" // trigger: "blur"
} // }
] // ]
} }
const rule =()=>{ const rule =()=>{
if (state.formParam.name==null){ if (state.formParam.name==null){
@@ -708,7 +727,7 @@ export default {
console.log("外部讲师详情", res.data); console.log("外部讲师详情", res.data);
state.formParam = res.data.data state.formParam = res.data.data
state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description
// state.formParam.photo = state.formParam.photo === null ? userInfo.value?.avatar : state.formParam.photo state.formParam.photo = state.formParam.photo == null ? null : state.formParam.photo.includes('upload') ? res.data.data.photo : '/upload'+res.data.data.photo
}) })
.catch((err) => { .catch((err) => {
message.destroy() message.destroy()
@@ -738,6 +757,9 @@ export default {
} }
const sendEmail=()=>{ const sendEmail=()=>{
const reg = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.\w{2,}$/; const reg = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.\w{2,}$/;
if(!state.formParam.email){
return
}
if (!reg.test(state.formParam.email)) { if (!reg.test(state.formParam.email)) {
message.warning( '邮箱格式不正确') message.warning( '邮箱格式不正确')
state.formParam.email='' state.formParam.email=''
@@ -745,11 +767,15 @@ export default {
} }
} }
const clearNonNumber = () => { const clearNonNumber = () => {
state.formParam.teaching = state.formParam.teaching.replace(/\D/g, ''); state.formParam.teaching = state.formParam.teaching?.replace(/\D/g, '');
state.formParam.teaching = state.formParam.teaching.slice(0,8) state.formParam.teaching = state.formParam.teaching?.slice(0,8)
!state.formParam.teaching && (state.formParam.teaching = 0)
}
const focusTeaching = () => {
state.formParam.teaching == 0 && (state.formParam.teaching = null)
} }
const sendRemark=()=>{ const sendRemark=()=>{
state.formParam.remark = state.formParam.remark.replace(/\s/g, ''); state.formParam.remark = state.formParam.remark?.replace(/\s/g, '');
} }
const repl = (val) => { const repl = (val) => {
if(val){ if(val){
@@ -787,6 +813,7 @@ export default {
...toRefs(state), ...toRefs(state),
lecturerAdmin, lecturerAdmin,
clearNonNumber, clearNonNumber,
focusTeaching,
enterPressHadlerSearch, enterPressHadlerSearch,
validateField, validateField,
rules, rules,

View File

@@ -3,7 +3,7 @@
<div> <div>
<!-- 搜索框及按钮 --> <!-- 搜索框及按钮 -->
<div class="filter"> <div class="filter">
<a-form layout="inline" style="min-width: 1380px;"> <a-form layout="inline" style="min-width: 1056px;">
<a-form-item class="select"> <a-form-item class="select">
<!-- v-model:value="searchParam.name" --> <!-- v-model:value="searchParam.name" -->
<!-- <a-input v-model:value="searchParam.userNo" style="width: 276px; height: 40px; border-radius: 8px" <!-- <a-input v-model:value="searchParam.userNo" style="width: 276px; height: 40px; border-radius: 8px"
@@ -131,174 +131,234 @@
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" placement="right" :maskClosable="false" :closable="false" <a-drawer class="largeDrawerStyle" v-model:visible="teacherdialog" placement="right" :maskClosable="false" :closable="false"
width="60%" :title="false"> width="60%" :title="false">
<div class="headers" style="margin-top:-24px;"> <div style="padding:24px;">
<div class="headerTitle">{{ teacherdialogtitle }}</div> <div class="headers" style="margin-top:-24px;">
<img <div class="headerTitle">{{ teacherdialogtitle }}</div>
style="width: 29px; height: 29px; cursor: pointer" <img
src="@/assets/images/basicinfo/close.png" style="width: 29px; height: 29px; cursor: pointer"
@click="cancelTeacherDialog" src="@/assets/images/basicinfo/close.png"
/> @click="cancelTeacherDialog"
</div> />
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef"> </div>
<!--讲师名称 teacherName 内容分类 coursetypeid --> <a-form :model="formParam" layout="vertical" ref="formRef">
<a-row :gutter="16"> <!--讲师名称 teacherName 内容分类 coursetypeid -->
<a-col :span="12"> <a-row :gutter="16">
<a-col :span="12">
<a-form-item label="讲师名称" name="teacherName"> <a-form-item name="teacherName">
<ProjectManagerOutTeacher v-model:value="formParam.name" <template v-slot:label>
v-model:name="formParam.teacherName" <img
placeholder="请输入工号/讲师姓名进行检索" style="margin-right:4px;width: 7px;height: 7px"
@onChange="managerChange"></ProjectManagerOutTeacher> src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师名称
</template>
<ProjectManagerOutTeacher v-model:value="formParam.name"
v-model:name="formParam.teacherName"
placeholder="请输入工号/讲师姓名进行检索"
@onChange="managerChange"></ProjectManagerOutTeacher>
<!-- <a-input v-model:value="formParam.teacherName" allowClear showSearch class="draitem" <!-- <a-input v-model:value="formParam.teacherName" allowClear showSearch class="draitem"
placeholder="请输入讲师姓名"></a-input> --> placeholder="请输入讲师姓名"></a-input> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="内容分类" name="courseTypeId"> <a-form-item name="courseTypeId">
<a-tree-select :fieldNames="{ <template v-slot:label>
children: 'children', <img
label: 'name', style="margin-right:4px;width: 7px;height: 7px"
value: 'code', src="@/assets/images/coursewareManage/asterisk.png"
}" allow-clear :getPopupContainer="triggerNode => triggerNode.parentNode || document.body" alt=""
v-model:value="formParam.courseTypeId" show-search />
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择内容分类" tree-default-expand-all 内容分类
:tree-data="sysTypeOptions" </template>
@change="treetype"> <a-tree-select :fieldNames="{
</a-tree-select> children: 'children',
</a-form-item> label: 'name',
</a-col> value: 'code',
</a-row> }" allow-clear :getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
<!-- 课程名称name 开课状态 courseStatus--> v-model:value="formParam.courseTypeId" show-search
<a-row :gutter="16"> :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择内容分类" tree-default-expand-all
<a-col :span="12"> :tree-data="sysTypeOptions"
<a-form-item label="课程名称" name="courseName"> @change="treetype">
<a-input class="draitem" v-model:value="formParam.courseName" :maxlength="20" showCount placeholder="请输入课程名称" @blur="sendName" allowClear showSearch> </a-tree-select>
</a-input> </a-form-item>
</a-form-item> </a-col>
</a-col> </a-row>
<a-col :span="12"> <!-- 课程名称name 开课状态 courseStatus-->
<a-form-item label="开课状态"> <a-row :gutter="16">
<a-radio-group v-model:value="formParam.courseStatus" class="draitem"> <a-col :span="12">
<a-radio :value="0">未开课</a-radio> <a-form-item name="courseName">
<a-radio :value="1">已开课</a-radio> <template v-slot:label>
</a-radio-group> <img
</a-form-item> style="margin-right:4px;width: 7px;height: 7px"
</a-col> src="@/assets/images/coursewareManage/asterisk.png"
</a-row> alt=""
<!-- 授课日期 teachingDate 授课时长defaultTeachingTime--> />
<a-row :gutter="16"> 课程名称
<a-col :span="12"> </template>
<a-form-item label="授课/课程日期 :" name="teachingDate"> <a-input class="draitem" v-model:value="formParam.courseName" :maxlength="20" showCount placeholder="请输入课程名称" @blur="sendName" allowClear showSearch>
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm" :show-time="{ format: 'HH:mm' }" </a-input>
placeholder="请选择课程日期" /> </a-form-item>
</a-form-item> </a-col>
</a-col> <a-col :span="12">
<a-col :span="12"> <a-form-item label="开课状态">
<a-form-item label="授课时长" name="teaching"> <a-radio-group v-model:value="formParam.courseStatus" class="draitem">
<a-input v-model:value="formParam.teaching" style="width:100%; height: 40px; border-radius: 8px; " <a-radio :value="'0'">未开课</a-radio>
placeholder="0" allowClear showSearch suffix="分钟" <a-radio :value="'1'">已开课</a-radio>
:maxLength="8" @change="clearNonNumber"> </a-radio-group>
</a-input> </a-form-item>
<!-- <span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60 </a-col>
).toFixed(2) }}小时</span> </a-row>
<span style="margin-left: 5px ;" v-if="formParam.teaching == null">0.00小时</span> --> <!-- 授课日期 teachingDate 授课时长defaultTeachingTime-->
</a-form-item> <a-row :gutter="16">
</a-col> <a-col :span="12">
</a-row> <a-form-item name="teachingDate">
<!-- 参训人数 studys评分 score--> <template v-slot:label>
<a-row :gutter="16"> <img
<a-col :span="12"> style="margin-right:4px;width: 7px;height: 7px"
<a-form-item label="参训人数" name="studys"> src="@/assets/images/coursewareManage/asterisk.png"
<a-input v-model:value="formParam.studys" class="draitem" placeholder="0 " allowClear showSearch :maxLength="8" alt=""
@blur="clearstudysNumber"> />
</a-input> 授课/课程日期 :
</a-form-item> </template>
</a-col> <a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm" :show-time="{ format: 'HH:mm' }"
<a-col :span="12"> placeholder="请选择课程日期" />
<a-form-item label="评分" name="score"> </a-form-item>
<!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch> </a-col>
</a-input> --> <a-col :span="12">
<a-input-number v-model:value="formParam.score" :precision="2" :min="0" :max="100" <a-form-item name="teaching">
style="width:100%; height: 40px; border-radius: 8px ; " /> <template v-slot:label>
</a-form-item> <img
</a-col> style="margin-right:4px;width: 7px;height: 7px"
</a-row> src="@/assets/images/coursewareManage/asterisk.png"
<!-- 备注 remark --> alt=""
<a-row :gutter="16"> />
<a-col :span="24"> 授课时长
<a-form-item label="备注"> </template>
<a-textarea v-model:value="formParam.remark" showCount :maxlength="200" <a-input v-model:value="formParam.teaching" style="width:100%; height: 40px; border-radius: 8px; "
@blur="sendRemark" placeholder="请输入授课时长" allowClear showSearch suffix="分钟"
style="width: 100%; height: 100px; border-radius: 8px" placeholder="请输入" /> :maxLength="8" @change="clearNonNumber">
</a-form-item> </a-input>
</a-col> <!-- <span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
</a-row> ).toFixed(2) }}小时</span>
</a-form> <span style="margin-left: 5px ;" v-if="formParam.teaching == null">0.00小时</span> -->
<div :style="{ </a-form-item>
position: 'absolute', </a-col>
right: 0, </a-row>
bottom: 0, <!-- 参训人数 studys评分 score-->
width: '100%', <a-row :gutter="16">
borderTop: '1px solid #e9e9e9', <a-col :span="12">
padding: '10px 16px', <a-form-item name="studys">
background: '#fff', <template v-slot:label>
textAlign: 'right', <img
zIndex: 1, style="margin-right:4px;width: 7px;height: 7px"
}"> src="@/assets/images/coursewareManage/asterisk.png"
<a-button class="drabtn" @click="cancelTeacherDialog">取消</a-button> alt=""
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存 />
</a-button> 参训人数
</template>
<a-input v-model:value="formParam.studys" class="draitem" placeholder="请输入参训人数" allowClear showSearch :maxLength="8"
@blur="clearstudysNumber">
</a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item name="score">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
评分
</template>
<!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch>
</a-input> -->
<a-input-number @blur="blurScore" @focus="focusScore" v-model:value="formParam.score" :precision="0" :min="1" :max="100"
style="width:100%; height: 40px; border-radius: 8px ; " placeholder="请输入评分" />
</a-form-item>
</a-col>
</a-row>
<!-- 备注 remark -->
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="备注">
<a-textarea v-model:value="formParam.remark" showCount :maxlength="200"
@blur="sendRemark"
style="width: 100%; height: 100px; border-radius: 8px" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
</a-form>
<div :style="{
position: 'absolute',
right: 0,
bottom: 0,
width: '100%',
borderTop: '1px solid #e9e9e9',
padding: '10px 16px',
background: '#fff',
textAlign: 'right',
zIndex: 1,
}">
<a-button class="drabtn" @click="cancelTeacherDialog">取消</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
</a-button>
</div>
</div> </div>
</a-drawer> </a-drawer>
<!-- 查看授课记录 --> <!-- 查看授课记录 -->
<a-drawer v-model:visible="teachingdialog" placement="right" :maskClosable="false" :closable="false" <a-drawer class="largeDrawerStyle" v-model:visible="teachingdialog" placement="right" :maskClosable="false" :closable="false"
width="60%" :title="false"> width="60%" :title="false">
<div class="headers" style="margin-top:-24px;"> <div style="padding:24px;">
<div class="headerTitle">查看讲师授课记录</div> <div class="headers" style="margin-top:-24px;">
<img <div class="headerTitle">查看讲师授课记录</div>
style="width: 29px; height: 29px; cursor: pointer" <img
src="@/assets/images/basicinfo/close.png" style="width: 29px; height: 29px; cursor: pointer"
@click="cancelTeachingDialog" src="@/assets/images/basicinfo/close.png"
/> @click="cancelTeachingDialog"
</div> />
<a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="{'width':'160px'}"> </div>
<a-descriptions-item label="讲师名称">{{ formParam.teacherName ||'-'}}</a-descriptions-item> <a-descriptions bordered :column="2" :contentStyle="rowCenter" :labelStyle="{'width':'160px'}">
<a-descriptions-item label="手机号码">{{ formParam.mobile ||'-'}}</a-descriptions-item> <a-descriptions-item label="讲师名称">{{ formParam.teacherName ||'-'}}</a-descriptions-item>
<a-descriptions-item label="课程类型">{{ formParam.type == 0 ? '在线课' : formParam.type == 1 ? '面授课' : '-' <a-descriptions-item label="手机号码">{{ formParam.mobile ||'-'}}</a-descriptions-item>
}}</a-descriptions-item> <a-descriptions-item label="课程类型">{{ formParam.type == 0 ? '在线课' : formParam.type == 1 ? '面授课' : '-'
<a-descriptions-item label="课程名称">{{ formParam.courseName ||'-'}}</a-descriptions-item> }}</a-descriptions-item>
<a-descriptions-item label="开课状态">{{ formParam.courseStatus == 0 ? '未开课' : formParam.courseStatus == 1 <a-descriptions-item label="课程名称">{{ formParam.courseName ||'-'}}</a-descriptions-item>
? '已开课' : '-' }}</a-descriptions-item> <a-descriptions-item label="开课状态">{{ formParam.courseStatus == 0 ? '未开课' : formParam.courseStatus == 1
<a-descriptions-item label="内容分类 ">{{ formParam.courseTypeName ||'-'}}</a-descriptions-item> ? '已开课' : '-' }}</a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate ||'-' }} <a-descriptions-item label="内容分类 ">{{ formParam.courseTypeName ||'-'}}</a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate ||'-' }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="授课时长 "> <span > {{ formParam.teaching }} 分钟</span> <a-descriptions-item label="授课时长 "> <span > {{ formParam.teaching }} 分钟</span>
<span style="margin-left: 10px ;" v-if="formParam.teaching != '0'">({{ (formParam.teaching / 60 <span style="margin-left: 10px ;" v-if="formParam.teaching != '0'">({{ (formParam.teaching / 60
).toFixed(2) }}小时)</span> ).toFixed(2) }}小时)</span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="评分 ">{{ formParam.score ||'-'}}</a-descriptions-item> <a-descriptions-item label="评分 ">{{ formParam.score ||'-'}}</a-descriptions-item>
<a-descriptions-item label="参训人数 ">{{ formParam.studys ||'-'}}</a-descriptions-item> <a-descriptions-item label="参训人数 ">{{ formParam.studys ||'-'}}</a-descriptions-item>
<a-descriptions-item label="备注 " :span="2">{{ formParam.remark ||'-' }}</a-descriptions-item> <a-descriptions-item label="备注 " :span="2">{{ formParam.remark ||'-' }}</a-descriptions-item>
</a-descriptions> </a-descriptions>
<!-- <div :style="{ <!-- <div :style="{
position: 'absolute', position: 'absolute',
right: 0, right: 0,
bottom: 0, bottom: 0,
width: '100%', width: '100%',
borderTop: '1px solid #e9e9e9', borderTop: '1px solid #e9e9e9',
padding: '10px 16px', padding: '10px 16px',
background: '#fff', background: '#fff',
textAlign: 'right', textAlign: 'right',
zIndex: 1, zIndex: 1,
}"> }">
<a-button class="drabtn" @click="cancelTeachingDialog">取消</a-button> <a-button class="drabtn" @click="cancelTeachingDialog">取消</a-button>
<a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">返回 <a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">返回
</a-button> </a-button>
</div> --> </div> -->
</div>
</a-drawer> </a-drawer>
<!-- 删除功能弹窗 --> <!-- 删除功能弹窗 -->
<div> <div>
@@ -393,13 +453,13 @@ export default {
teachingDate: undefined, //选择时间 teachingDate: undefined, //选择时间
tableDataTotal: -1,//table列表总条数 tableDataTotal: -1,//table列表总条数
formParam: { formParam: {
courseStatus: 1, courseStatus: '1',
createFrom: 1, createFrom: 1,
teaching: null, teaching: null,
teachingDate: null, teachingDate: null,
teacherId:null, teacherId:null,
mobile:null, mobile:null,
score: 0 score: null
}, },
searchdate: undefined, //选择时间 searchdate: undefined, //选择时间
searchParam: { searchParam: {
@@ -430,9 +490,9 @@ export default {
teacherName: [{ required: true, message: '', log: '讲师不能为空' }], teacherName: [{ required: true, message: '', log: '讲师不能为空' }],
courseTypeId: [{ required: true, message: '', log: '内容分类不能为空' }], courseTypeId: [{ required: true, message: '', log: '内容分类不能为空' }],
courseName: [{ required: true, message: '', log: '课程名称不能为空' }], courseName: [{ required: true, message: '', log: '课程名称不能为空' }],
courseStatus: [{ required: true, message: '', log: '课状态不能为空' }], courseStatus: [{ required: true, message: '', log: '课状态不能为空' }],
teaching: [{ required: true, message: '', log: '授课时长不能为空' }],
teachingDate: [{ required: true, message: '', log: '授课日期不能为空' }], teachingDate: [{ required: true, message: '', log: '授课日期不能为空' }],
teaching: [{ required: true, message: '', log: '授课时长不能为空' }],
studys: [{ required: true, message: '', log: '参训人数不能为空' }], studys: [{ required: true, message: '', log: '参训人数不能为空' }],
score: [{ required: true, message: '', log: '评分不能为空' }], score: [{ required: true, message: '', log: '评分不能为空' }],
} }
@@ -764,10 +824,12 @@ export default {
}else{ }else{
state.formParam.score = null state.formParam.score = null
} }
state.formParam.courseStatus = String(state.formParam.courseStatus)
const formItemNames = Object.keys(rules); const formItemNames = Object.keys(rules);
for (let i = 0; i < formItemNames.length; i++) { for (let i = 0; i < formItemNames.length; i++) {
const result = await validateField(formItemNames[i]); // const result = await validateField(formItemNames[i]);
if (result) { const result = state.formParam[formItemNames[i]]
if (!result) {
return message.error(rules[formItemNames[i]][0].log) return message.error(rules[formItemNames[i]][0].log)
} }
} }
@@ -831,13 +893,13 @@ export default {
//清空数据 //清空数据
const cancel = () => { const cancel = () => {
state.formParam = { state.formParam = {
courseStatus: 1, courseStatus: '1',
recordType: 2, recordType: 2,
mobile: null, mobile: null,
name: null, name: null,
type: null, type: null,
teaching: null, teaching: null,
score: 0, score: null,
remark: null, remark: null,
teachingDate: null, teachingDate: null,
teacherId:null teacherId:null
@@ -874,7 +936,8 @@ export default {
state.teachingDate = res.data.data.teachingDate ? dayjs(res.data.data.teachingDate, 'YYYY-MM-DD HH:mm'):'', state.teachingDate = res.data.data.teachingDate ? dayjs(res.data.data.teachingDate, 'YYYY-MM-DD HH:mm'):'',
state.formParam.name=state.formParam.teacherName state.formParam.name=state.formParam.teacherName
state.formParam.teachingDate = state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : "" state.formParam.teachingDate = state.teachingDate ? dayjs(state.teachingDate).format("YYYY-MM-DD HH:mm").toString() : ""
console.log(state.formParam.teachingDate) state.formParam.courseStatus = String(state.formParam.courseStatus)
console.log(state.formParam.teachingDate)
}) })
.catch((err) => { .catch((err) => {
}); });
@@ -918,6 +981,12 @@ const enterPressHadlerSearch = e => {
const sendName=()=>{ const sendName=()=>{
state.formParam.courseName = state.formParam.courseName.replace(/\s/g, ''); state.formParam.courseName = state.formParam.courseName.replace(/\s/g, '');
} }
const blurScore = () => {
// !state.formParam.score && (state.formParam.score = '0')
}
const focusScore = () => {
// state.formParam.score == 0 && (state.formParam.score = null)
}
const sendRemark=()=>{ const sendRemark=()=>{
state.formParam.remark = state.formParam.remark.replace(/\s/g, ''); state.formParam.remark = state.formParam.remark.replace(/\s/g, '');
} }
@@ -926,6 +995,8 @@ const sendName=()=>{
rules, rules,
sendName, sendName,
sendRemark, sendRemark,
blurScore,
focusScore,
enterPressHadlerSearch, enterPressHadlerSearch,
treetype, treetype,
clearscoreNumber, clearscoreNumber,

View File

@@ -2,7 +2,7 @@
<template> <template>
<div> <div>
<!-- 搜索框及按钮 --> <!-- 搜索框及按钮 -->
<div class="filter" style="min-width: 1270px;"> <div class="filter" style="min-width: 1056px;">
<a-form layout="inline"> <a-form layout="inline">
<a-form-item class="select"> <a-form-item class="select">
<!-- v-model:value="searchParam.name" --> <!-- v-model:value="searchParam.name" -->
@@ -113,216 +113,250 @@
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false" <a-drawer class="largeDrawerStyle" v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false"
width="700" :title="false"> width="700" :title="false">
<div class="headers" style="margin-top:-24px;margin-left: -25px;width: 110%;"> <div style="padding:24px">
<div class="headerTitle" style="margin-left: 14px;">{{ teacherdialogtitle }}</div> <div class="headers" style="margin-top:-24px;margin-left: -25px;width: 110%;">
<img <div class="headerTitle" style="margin-left: 14px;">{{ teacherdialogtitle }}</div>
style="width: 29px; height: 29px; cursor: pointer;margin-right: 24px;" <img
src="@/assets/images/basicinfo/close.png" style="width: 29px; height: 29px; cursor: pointer;margin-right: 24px;"
@click="cancelTeacherDialog" src="@/assets/images/basicinfo/close.png"
/> @click="cancelTeacherDialog"
</div> />
<div ref="drawerContent" style="padding-left: 15px;padding-right: 46px;">
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
<a-row>
<a-col :span="24">
<span class="line"></span><span style="color:#333333;font-weight: 600;font-size:16px;">基本信息</span>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<div class="item_inp" style="background-color: #fff;">
<div style="width:120px;margin:0 auto;" @click="avatarChange">
<a-upload :disabled="!formParam.name" name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
:headers="headers" :before-upload="beforeUpload">
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" title="更换头像" />
<img class="i_upload_img" v-else-if="formParam.gender==1" src="../../assets/Avatarman.png" alt="avatar" title="更换头像" />
<img class="i_upload_img" v-else-if="formParam.gender==2" src="../../assets/Avatarwoman.png" alt="avatar" title="更换头像" />
<img class="i_upload_img" v-else src="../../assets/Avatarman.png" alt="avatar" title="更换头像" />
<!-- <div class="i_upload" v-else>
<div class="addimg">
<div class="heng"></div>
<div class="shu"></div>
</div>
</div> -->
</a-upload>
</div>
<div class="i_bottom">
<div class="tip" style="margin-bottom: 10px;">
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png </span>
</div>
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="讲师姓名" name="name">
<SearchTeacher @tlevel="teacherTlevel" :lecturer="true" :disabled="!!id" v-model:value="formParam.name" v-model:lable="formParam.orgNames" v-model:orgId="formParam.orgId" v-model:id="formParam.id"
v-model:system="tSystemNames" v-model:level="formParam.tlevelId"></SearchTeacher>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="讲师组织" name="orgName">
<!-- <a-popover>
<template #content>
{{ formParam.orgNames }}
</template> -->
<a-input :title="formParam.orgNames" disabled v-model:value="formParam.orgName" class="draitem"
placeholder="自动带出讲师的组织,展示主要部分,鼠标浮上去展示所有" allowClear showSearch>
</a-input>
<!-- </a-popover> -->
</a-form-item>
</a-col>
</a-row>
<a-col :span="24">
<a-form-item label="讲师体系" name="tsystemName">
<!-- <a-select class="draitem" v-model:value="formParam.tsystemName" placeholder="请选择讲师体系" allowClear
@change="changetlevel" .:options="LecturerSystemList">
</a-select> -->
<a-input disabled v-model:value="tSystemNames.systemName" class="draitem"
placeholder="自动带出讲师的体系" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<!-- <div @click="handleformlevel"> -->
<a-form-item label="讲师级别" name="tlevelId">
<a-select class="draitem" v-model:value="formParam.tlevelId" placeholder="请选择讲师级别" allowClear disableda
:options="tSystemNames.levelVoList" @change="handleformlevel">
</a-select>
</a-form-item>
<!-- </div> -->
</a-col>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="初始授课时长" name="defaultTeachingTime">
<a-input v-model:value="formParam.defaultTeachingTime" style="width:100%; height: 40px; border-radius: 8px; "
:maxLength="8"
@change="clearNonNumber" placeholder="请输入初始授课时长" allowClear suffix="分钟">
</a-input>
<!-- <span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime === null">0.00小时</span>
<span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime != null">{{
(formParam.defaultTeachingTime / 60).toFixed(2) }}小时</span> -->
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="认证状态" name="certStatus" style="display:flex;">
<a-radio-group v-model:value="formParam.certStatus" class="draitem">
<a-radio :value="0">未认证</a-radio>
<a-radio :value="1">已认证</a-radio>
<span>
<a-button type="text" class="moreidbtn" v-if="formParam.certStatus == 1"
@click="handleupdialog">{{formParam.certificationName?formParam.certificationName:'上传凭证'}}</a-button>
</span>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<span class="line" style="margin-bottom:24px;"></span><span style="color:#333333;font-weight: 600;font-size:16px;">其他信息</span>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="讲师介绍">
<Editor v-model:value="formParam.description" :isupload="isupload" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="工作经历">
<Editor v-model:value="formParam.workExperience" :isupload="isupload" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="擅长课程">
<Editor v-model:value="formParam.courses" :isupload="isupload"/>
</a-form-item>
</a-col>
</a-row>
<div style="margin-bottom: 6px;">教师专长</div>
<a-row :gutter="50" style="margin-bottom: 50px;">
<!-- <a-col :span="4">
<a-tag color="blue" style="line-height: 40px; ">管理业务</a-tag>
</a-col> -->
<a-col :span="20">
<!-- <div class="add_content" @click="addContentData">
<div class="text">+</div>
</div> -->
<div class="add_list">
<div :title="item.name" class="add_item" v-for="(item,index) in formParam.orgLists">
{{item.name}}
</div>
<div class="add_content" @click="addContentData">
<div class="text">+</div>
</div>
</div>
</a-col>
</a-row>
</a-form>
<div>
<a-modal
v-model:visible="updialog"
:footer="null"
closable="false"
style="margin-top: 400px"
@cancel="cancelupdialog"
:maskClosable="false"
:destroyOnClose="true"
>
<div class="selectonlineface" style="width: 660px;" :style="{ display: updialog ? 'block' : 'none' }">
<div class="bg_headers"></div>
<div class="bg_main">
<div class="bg_main_header">
<div class="bg_main_header_close" @click="cancelupdialog"></div>
</div>
<div class="bg_body">
<div>导入</div>
<a-form style="margin-top:30px ;">
<a-form-item style="color: #999999;">注意 :文件支持PDFPNGJPG ,文件大小不可超过5MB</a-form-item>
<a-form-item label="上传文件">
<UploadDragger :size="5000000" ref="uploadRef" style="width:86%;height:148px;" @change="changeUpload" :accept="accept"
@removeList="removeList" :uploadUrl="uploadUrl" :params="folderId" :loadTrue="formParam.certificationName" />
</a-form-item>
</a-form>
<div class="bg_footer" style="margin-left: 160px;margin-top: 30px">
<div class="btn btn6" @click="cancelupdialog">
<div class="btnText">取消</div>
</div>
<a-button
class="btn btn6"
@click="createupdialog"
>
确定
</a-button>
</div>
</div>
</div>
</div>
</a-modal>
</div> </div>
<div :style="{ <div ref="drawerContent" style="padding-left: 15px;padding-right: 46px;">
position: 'absolute', <a-form :model="formParam" layout="vertical" ref="formRef">
right: 0, <a-row>
bottom: 0, <a-col :span="24">
width: '100%', <span class="line"></span><span style="color:#333333;font-weight: 600;font-size:16px;">基本信息</span>
borderTop: '1px solid #e9e9e9', </a-col>
padding: '10px 16px', </a-row>
background: '#fff', <a-row :gutter="16">
textAlign: 'right', <a-col :span="24">
zIndex: 1, <div class="item_inp" style="background-color: #fff;">
display: 'flex', <div style="width:120px;margin:0 auto;" @click="avatarChange">
justifyContent: 'end', <a-upload :disabled="!formParam.name" name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
}"> :headers="headers" :before-upload="beforeUpload">
<a-button class="drabtn" @click="cancelTeacherDialog">取消</a-button> <img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" title="更换头像" />
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存 <img class="i_upload_img" v-else-if="formParam.gender==1" src="../../assets/Avatarman.png" alt="avatar" title="更换头像" />
</a-button> <img class="i_upload_img" v-else-if="formParam.gender==2" src="../../assets/Avatarwoman.png" alt="avatar" title="更换头像" />
<img class="i_upload_img" v-else src="../../assets/Avatarman.png" alt="avatar" title="更换头像" />
<!-- <div class="i_upload" v-else>
<div class="addimg">
<div class="heng"></div>
<div class="shu"></div>
</div>
</div> -->
</a-upload>
</div>
<div class="i_bottom">
<div class="tip" style="margin-bottom: 10px;">
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png </span>
</div>
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item name="name">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师姓名
</template>
<SearchTeacher @tlevel="teacherTlevel" :lecturer="true" :disabled="!!id" v-model:value="formParam.name" v-model:lable="formParam.orgNames" v-model:orgId="formParam.orgId" v-model:id="formParam.id"
v-model:system="tSystemNames" v-model:level="formParam.tlevelId"></SearchTeacher>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="讲师组织" name="orgName">
<!-- <a-popover>
<template #content>
{{ formParam.orgNames }}
</template> -->
<a-input :title="formParam.orgNames" disabled v-model:value="formParam.orgName" class="draitem"
placeholder="自动带出讲师的组织,展示主要部分,鼠标浮上去展示所有" allowClear showSearch>
</a-input>
<!-- </a-popover> -->
</a-form-item>
</a-col>
</a-row>
<a-col :span="24">
<a-form-item name="tsystemName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师体系
</template>
<!-- <a-select class="draitem" v-model:value="formParam.tsystemName" placeholder="请选择讲师体系" allowClear
@change="changetlevel" .:options="LecturerSystemList">
</a-select> -->
<a-input disabled v-model:value="tSystemNames.systemName" class="draitem"
placeholder="自动带出讲师的体系" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<!-- <div @click="handleformlevel"> -->
<a-form-item name="tlevelId">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师级别
</template>
<a-select class="draitem" v-model:value="formParam.tlevelId" placeholder="请选择讲师级别" allowClear disableda
:options="tSystemNames.levelVoList" @change="handleformlevel">
</a-select>
</a-form-item>
<!-- </div> -->
</a-col>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item name="defaultTeachingTime">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
初始授课时长
</template>
<a-input v-model:value="formParam.defaultTeachingTime" style="width:100%; height: 40px; border-radius: 8px; "
:maxLength="8"
@change="clearNonNumber" @blur="blurNumber" @focus="focusNumber" placeholder="请输入初始授课时长" allowClear suffix="分钟">
</a-input>
<!-- <span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime === null">0.00小时</span>
<span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime != null">{{
(formParam.defaultTeachingTime / 60).toFixed(2) }}小时</span> -->
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="认证状态" name="certStatus" style="display:flex;">
<a-radio-group v-model:value="formParam.certStatus" class="draitem">
<a-radio :value="0">未认证</a-radio>
<a-radio :value="1">已认证</a-radio>
<span>
<a-button type="text" class="moreidbtn" v-if="formParam.certStatus == 1"
@click="handleupdialog">{{formParam.certificationName?formParam.certificationName:'上传凭证'}}</a-button>
</span>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<span class="line" style="margin-bottom:24px;"></span><span style="color:#333333;font-weight: 600;font-size:16px;">其他信息</span>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="讲师介绍">
<Editor v-model:value="formParam.description" :isupload="isupload" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="工作经历">
<Editor v-model:value="formParam.workExperience" :isupload="isupload" />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="擅长课程">
<Editor v-model:value="formParam.courses" :isupload="isupload"/>
</a-form-item>
</a-col>
</a-row>
<div style="margin-bottom: 6px;">教师专长</div>
<a-row :gutter="50" style="margin-bottom: 50px;">
<!-- <a-col :span="4">
<a-tag color="blue" style="line-height: 40px; ">管理业务</a-tag>
</a-col> -->
<a-col :span="20">
<!-- <div class="add_content" @click="addContentData">
<div class="text">+</div>
</div> -->
<div class="add_list">
<div :title="item.name" class="add_item" v-for="(item,index) in formParam.orgLists">
{{item.name}}
</div>
<div class="add_content" @click="addContentData">
<div class="text">+</div>
</div>
</div>
</a-col>
</a-row>
</a-form>
<div>
<a-modal
v-model:visible="updialog"
:footer="null"
closable="false"
style="margin-top: 400px"
@cancel="cancelupdialog"
:maskClosable="false"
:destroyOnClose="true"
>
<div class="selectonlineface" style="width: 660px;" :style="{ display: updialog ? 'block' : 'none' }">
<div class="bg_headers"></div>
<div class="bg_main">
<div class="bg_main_header">
<div class="bg_main_header_close" @click="cancelupdialog"></div>
</div>
<div class="bg_body">
<div>导入</div>
<a-form style="margin-top:30px ;">
<a-form-item style="color: #999999;">注意 :文件支持PDFPNGJPG ,文件大小不可超过5MB</a-form-item>
<a-form-item label="上传文件">
<UploadDragger :size="5000000" ref="uploadRef" style="width:86%;height:148px;" @change="changeUpload" :accept="accept"
@removeList="removeList" :uploadUrl="uploadUrl" :params="folderId" :loadTrue="formParam.certificationName" />
</a-form-item>
</a-form>
<div class="bg_footer" style="margin-left: 160px;margin-top: 30px">
<div class="btn btn6" @click="cancelupdialog">
<div class="btnText">取消</div>
</div>
<a-button
class="btn btn6"
@click="createupdialog"
>
确定
</a-button>
</div>
</div>
</div>
</div>
</a-modal>
</div>
<div :style="{
position: 'absolute',
right: 0,
bottom: 0,
width: '100%',
borderTop: '1px solid #e9e9e9',
padding: '10px 16px',
background: '#fff',
textAlign: 'right',
zIndex: 1,
display: 'flex',
justifyContent: 'end',
}">
<a-button class="drabtn" @click="cancelTeacherDialog">取消</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
</a-button>
</div>
</div> </div>
</div> </div>
</a-drawer> </a-drawer>
@@ -989,14 +1023,19 @@ export default {
} }
const formItemNames = Object.keys(rules); const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){ for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]); // const result = await validateField(formItemNames[i]);
if (result) { const result = state.formParam[formItemNames[i]]
if (!result) {
return message.error(rules[formItemNames[i]][0].log) return message.error(rules[formItemNames[i]][0].log)
} }
} }
if(state.formParam.certStatus&&!state.formParam.certificationName){ if(state.formParam.certStatus&&!state.formParam.certificationName){
return message.error('请上传认证凭证') return message.error('请上传认证凭证')
} }
if(!state.formParam.certStatus){
state.formParam.certification = null
state.formParam.certificationName = null
}
if(state.formParam.name){ if(state.formParam.name){
const nameNo = state.formParam?.name?.split('/') const nameNo = state.formParam?.name?.split('/')
state.formParam.name = nameNo[0] state.formParam.name = nameNo[0]
@@ -1141,8 +1180,8 @@ export default {
}; };
watch(() => state.formParam.certStatus,(val)=>{ watch(() => state.formParam.certStatus,(val)=>{
if(!val){ if(!val){
state.formParam.certification = null // state.formParam.certification = null
state.formParam.certificationName = null // state.formParam.certificationName = null
} }
}) })
//清空数据 //清空数据
@@ -1177,6 +1216,12 @@ export default {
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.replace(/\D/g, ''); state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.replace(/\D/g, '');
state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.slice(0,8) state.formParam.defaultTeachingTime = state.formParam.defaultTeachingTime.slice(0,8)
} }
const blurNumber = () => {
!state.formParam.defaultTeachingTime && (state.formParam.defaultTeachingTime = '0')
}
const focusNumber = () => {
state.formParam.defaultTeachingTime==0 && (state.formParam.defaultTeachingTime = null)
}
const rules = { const rules = {
name: [{ required: true, message: '',log:'讲师不能为空' }], name: [{ required: true, message: '',log:'讲师不能为空' }],
// newdepartId: [{ required: true, message: '组织不能为空' }], // newdepartId: [{ required: true, message: '组织不能为空' }],
@@ -1241,7 +1286,7 @@ export default {
state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description state.formParam.description = state.formParam.description == null ? '<p><br></p>' : state.formParam.description
state.formParam.workExperience = state.formParam.workExperience == null ? '<p><br></p>' : state.formParam.workExperience state.formParam.workExperience = state.formParam.workExperience == null ? '<p><br></p>' : state.formParam.workExperience
state.formParam.courses = state.formParam.courses == null ? '<p><br></p>' : state.formParam.courses state.formParam.courses = state.formParam.courses == null ? '<p><br></p>' : state.formParam.courses
// state.formParam.photo = state.formParam.photo === null ? avatar : state.formParam.photo state.formParam.photo = state.formParam.photo == null ? null : state.formParam.photo.includes('upload') ? res.data.data.photo : '/upload'+res.data.data.photo
state.tSystemNames.systemName = res.data.data.tsystemName state.tSystemNames.systemName = res.data.data.tsystemName
state.tSystemNames.systemId = res.data.data.tsystemId state.tSystemNames.systemId = res.data.data.tsystemId
state.tSystemNames.systemCode = res.data.data.systemCode state.tSystemNames.systemCode = res.data.data.systemCode
@@ -1320,6 +1365,8 @@ export default {
handleformlevel, handleformlevel,
// customPreview, // customPreview,
clearNonNumber, clearNonNumber,
blurNumber,
focusNumber,
// managerChange, // managerChange,
headers, headers,
beforeUpload, beforeUpload,
@@ -1378,6 +1425,21 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// ::v-deep .ant-form-item-with-help .ant-form-item-explain{
// min-height: 0 !important;
// }
// ::v-deep .ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{
// border-color: #40a9ff !important;
// }
// ::v-deep .ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-focused .ant-select-selector {
// border-color: #40a9ff !important;
// }
// ::v-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{
// border-color: #40a9ff !important;
// }
// ::v-deep .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{
// border-color: #40a9ff !important;
// }
.ant-form-item{ .ant-form-item{
margin-bottom: 12px; margin-bottom: 12px;
} }

View File

@@ -3,14 +3,14 @@
<div> <div>
<!-- 搜索框及按钮 --> <!-- 搜索框及按钮 -->
<div class="filter"> <div class="filter">
<a-form layout="inline" style="min-width: 1380px;"> <a-form layout="inline" style="min-width: 1056px;">
<a-form-item class="select"> <a-form-item class="select">
<a-input v-model:value="searchParam.name" style="width: 235px; height: 40px; border-radius: 8px" <a-input v-model:value="searchParam.name" style="width: 235px; margin-bottom:20px;height: 40px; border-radius: 8px"
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch"> placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-input> </a-input>
</a-form-item> </a-form-item>
<a-form-item class="select"> <a-form-item class="select">
<a-input v-model:value="searchParam.courseName" style="width: 235px; height: 40px; border-radius: 8px" <a-input v-model:value="searchParam.courseName" style="width: 235px; margin-bottom:20px;height: 40px; border-radius: 8px"
placeholder="请输入课程名称进行搜索" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch"> placeholder="请输入课程名称进行搜索" allowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-input> </a-input>
</a-form-item> </a-form-item>
@@ -33,12 +33,12 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item class="select"> <a-form-item class="select">
<a-select style="width: 200px" v-model:value="searchParam.courseStatus" placeholder="开课状态" <a-select style="width: 200px;margin-bottom:20px" v-model:value="searchParam.courseStatus" placeholder="开课状态"
:options="AuthenticationStatusList" a llowClear showSearch v-on:keydown.enter="enterPressHadlerSearch"> :options="AuthenticationStatusList" a llowClear showSearch v-on:keydown.enter="enterPressHadlerSearch">
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item class="select" v-if="moreid == 2"> <a-form-item class="select" v-if="moreid == 2">
<a-select style="width: 235px" placeholder="请选择讲师体系" v-model:value="searchParam.tSystemId" <a-select style="width: 235px;margin-bottom:20px" placeholder="请选择讲师体系" v-model:value="searchParam.tSystemId"
:options="LecturerSystemList" allowClear showSearch @change="changetlevel" :options="LecturerSystemList" allowClear showSearch @change="changetlevel"
v-on:keydown.enter="enterPressHadlerSearch"> v-on:keydown.enter="enterPressHadlerSearch">
</a-select> </a-select>
@@ -52,7 +52,7 @@
></OrgClass> ></OrgClass>
</a-form-item> </a-form-item>
<a-form-item class="select" v-if="moreid == 2"> <a-form-item class="select" v-if="moreid == 2">
<a-tree-select style="width: 235px" :fieldNames="{ <a-tree-select style="width: 235px;margin-bottom:20px" :fieldNames="{
children: 'children', children: 'children',
label: 'name', label: 'name',
value: 'code', value: 'code',
@@ -114,7 +114,7 @@
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
<template v-if="column.key === 'teaching'"> <template v-if="column.key === 'teaching'">
<a-space style="display:flex ;justify-content: space-around; "> <a-space style="display:flex ;justify-content: space-around; ">
<span>{{ (record?.teaching / 60).toFixed(2) +'小时'|| '-' }}</span> <span>{{ record?.teaching ?record?.teaching+'分钟': '-' }}</span>
</a-space> </a-space>
</template> </template>
<template v-if="column.key === 'operation'"> <template v-if="column.key === 'operation'">
@@ -140,229 +140,325 @@
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" :closable="false" placement="right" :maskClosable="false" <a-drawer class="largeDrawerStyle" v-model:visible="teacherdialog" :closable="false" placement="right" :maskClosable="false"
width="60%" :title="false"> width="60%" :title="false">
<div class="headers" style="margin-top:-24px;"> <div style="padding:24px;">
<div class="headerTitle">{{ teacherdialogtitle }}</div> <div class="headers" style="margin-top:-24px;">
<img <div class="headerTitle">{{ teacherdialogtitle }}</div>
style="width: 29px; height: 29px; cursor: pointer" <img
src="@/assets/images/basicinfo/close.png" style="width: 29px; height: 29px; cursor: pointer"
@click="cancelTeacherDialog" src="@/assets/images/basicinfo/close.png"
/> @click="cancelTeacherDialog"
</div> />
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef"> </div>
<!-- 讲师姓名 teacher 组织 orgName--> <a-form :model="formParam" layout="vertical" ref="formRef">
<a-row :gutter="16"> <!-- 讲师姓名 teacher 组织 orgName-->
<a-col :span="12"> <a-row :gutter="16">
<a-form-item label="讲师名称" name="name"> <a-col :span="12">
<SearchTeacher @tlevel="tlevelChange" v-model:value="formParam.name" v-model:lable="formParam.orgNames" <a-form-item name="name">
v-model:id="formParam.teacherId" v-model:system="tSystemNames" v-model:level="formParam.tlevelId"> <template v-slot:label>
</SearchTeacher> <img
</a-form-item> style="margin-right:4px;width: 7px;height: 7px"
</a-col> src="@/assets/images/coursewareManage/asterisk.png"
<a-col :span="12"> alt=""
<a-form-item label="讲师组织" name="orgName"> />
<a-popover> 讲师名称
<!-- <template #content> </template>
{{ formParam.orgNames }} <SearchTeacher @tlevel="tlevelChange" v-model:value="formParam.name" v-model:lable="formParam.orgNames"
</template> --> v-model:id="formParam.teacherId" v-model:system="tSystemNames" v-model:level="formParam.tlevelId">
</SearchTeacher>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item name="orgName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师组织
</template>
<a-popover>
<!-- <template #content>
{{ formParam.orgNames }}
</template> -->
<a-input :title="formParam.orgNames" disabled v-model:value="formParam.orgName" class="draitem" <a-input :title="formParam.orgNames" disabled v-model:value="formParam.orgName" class="draitem"
placeholder="自动带出讲师的组织,展示主要部分,鼠标浮上去展示所有" allowClear showSearch> placeholder="自动带出讲师的组织,展示主要部分,鼠标浮上去展示所有" allowClear showSearch>
</a-input>
</a-popover>
</a-form-item>
</a-col>
</a-row>
<!-- 讲师体系 tsystemName 级别 tlevelId -->
<a-row :gutter="16">
<a-col :span="12">
<a-form-item name="tsystemName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师体系
</template>
<a-input disabled v-model:value="tSystemNames.systemName" class="draitem" placeholder="自动带出讲师的体系" allowClear
showSearch>
</a-input> </a-input>
</a-popover> </a-form-item>
</a-form-item> </a-col>
</a-col> <a-col :span="12">
</a-row> <a-form-item name="tlevelName">
<!-- 讲师体系 tsystemName 级别 tlevelId --> <template v-slot:label>
<a-row :gutter="16"> <img
<a-col :span="12"> style="margin-right:4px;width: 7px;height: 7px"
<a-form-item label="讲师体系" name="tsystemName"> src="@/assets/images/coursewareManage/asterisk.png"
<a-input disabled v-model:value="tSystemNames.systemName" class="draitem" placeholder="自动带出讲师的体系" allowClear alt=""
showSearch> />
</a-input> 讲师级别
</a-form-item> </template>
</a-col> <a-input disabled v-model:value="formParam.tlevelName" class="draitem" placeholder="自动带出讲师级别" allowClear
<a-col :span="12"> showSearch>
<a-form-item label="讲师级别" name="tlevelName"> </a-input>
<a-input disabled v-model:value="formParam.tlevelName" class="draitem" placeholder="自动带出讲师级别" allowClear </a-form-item>
showSearch> </a-col>
</a-input> </a-row>
</a-form-item> <!-- 内容分类 courseTypeId 课程名称 name -->
</a-col> <a-row :gutter="16">
</a-row> <a-col :span="12">
<!-- 内容分类 courseTypeId 课程名称 name --> <a-form-item name="courseTypeId">
<a-row :gutter="16"> <template v-slot:label>
<a-col :span="12"> <img
<a-form-item label="内容分类" name="courseTypeId"> style="margin-right:4px;width: 7px;height: 7px"
<a-tree-select :fieldNames="{ src="@/assets/images/coursewareManage/asterisk.png"
children: 'children', alt=""
label: 'name', />
value: 'code', 内容分类
}" allow-clear :getPopupContainer="triggerNode => triggerNode.parentNode || document.body" </template>
v-model:value="formParam.courseTypeId" show-search <a-tree-select :fieldNames="{
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择内容分类" tree-default-expand-all children: 'children',
:tree-data="sysTypeOptions" @change="treetype"> label: 'name',
</a-tree-select> value: 'code',
</a-form-item> }" allow-clear :getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
</a-col> v-model:value="formParam.courseTypeId" show-search
<a-col :span="12"> :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择内容分类" tree-default-expand-all
<a-form-item label="课程名称:" name="courseName"> :tree-data="sysTypeOptions" @change="treetype">
<a-input class="draitem" v-model:value="formParam.courseName" placeholder="请输入课程名称" allowClear showSearch </a-tree-select>
:maxlength="20" showCount @blur="sendName"> </a-form-item>
</a-input> </a-col>
</a-form-item> <a-col :span="12">
</a-col> <a-form-item name="courseName">
</a-row> <template v-slot:label>
<!-- 授课日期 teachingDate 开课状态 courseStatus --> <img
<a-row :gutter="16"> style="margin-right:4px;width: 7px;height: 7px"
<!-- <a-col :span="12"> src="@/assets/images/coursewareManage/asterisk.png"
<a-form-item label="课程归属组织" name="sourceBelongId"> alt=""
<OrgClass v-model:value="formParam.sourceBelongId" v-model:name="formParam.sourceBelongFullName"></OrgClass> />
</a-form-item> 课程名称
</a-col> --> </template>
<a-col :span="12"> <a-input class="draitem" v-model:value="formParam.courseName" placeholder="请输入课程名称" allowClear showSearch
<a-form-item label="授课/课程日期 :" name="teachingDate"> :maxlength="20" showCount @blur="sendName">
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm" </a-input>
:show-time="{ format: 'HH:mm' }" type="datetime" placeholder="请选择课程日期" /> </a-form-item>
</a-form-item> </a-col>
</a-col> </a-row>
<a-col :span="12"> <!-- 授课日期 teachingDate 开课状态 courseStatus -->
<a-form-item label="开课状态"> <a-row :gutter="16">
<a-radio-group v-model:value="formParam.courseStatus" class="draitem"> <a-col :span="12">
<a-radio :value="0">未开课</a-radio> <a-form-item name="trainOrgId">
<a-radio :value="1">已开课</a-radio> <template v-slot:label>
</a-radio-group> <img
</a-form-item> style="margin-right:4px;width: 7px;height: 7px"
</a-col> src="@/assets/images/coursewareManage/asterisk.png"
</a-row> alt=""
<!-- 授课时长 teaching 评分 score--> />
<a-row :gutter="16"> 培训发生组织
</template>
<a-select v-model:value="formParam.trainOrgId" placeholder="请选择培训发生组织" allowClear
:options="orgList" @change="changeOrg">
</a-select>
<!-- <OrgClass v-model:value="formParam.sourceBelongId" v-model:name="formParam.sourceBelongFullName"></OrgClass> -->
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item name="teachingDate">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
授课/课程日期 :
</template>
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" format="YYYY-MM-DD HH:mm"
:show-time="{ format: 'HH:mm' }" type="datetime" placeholder="请选择课程日期" />
</a-form-item>
</a-col>
<a-col :span="12"> </a-row>
<a-form-item label="授课时长" name="teaching"> <!-- 授课时长 teaching 评分 score-->
<a-input v-model:value="formParam.teaching" style="width:100%; height: 40px; border-radius: 8px ; " <a-row :gutter="16">
placeholder="请输入授课时长" allowClear showSearch suffix="分钟" :maxLength="8" @blur="clearNonNumber"> <a-col :span="12">
</a-input> <a-form-item label="开课状态">
<!-- <span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60 <a-radio-group v-model:value="formParam.courseStatus" class="draitem">
).toFixed(2) }}小时</span> <a-radio :value="'0'">未开课</a-radio>
<span style="margin-left: 5px ;" v-if="formParam.teaching == null">0.00小时</span> --> <a-radio :value="'1'">已开课</a-radio>
</a-form-item> </a-radio-group>
</a-col> </a-form-item>
<a-col :span="12"> </a-col>
<a-form-item label="评分" name="score"> <a-col :span="12">
<!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch> <a-form-item name="teaching">
</a-input> --> <template v-slot:label>
<a-input-number v-model:value="formParam.score" :precision="2" :min="0" :max="100" <img
style="width:100%; height: 40px; border-radius: 8px ; " placeholder="请输入评分" /> style="margin-right:4px;width: 7px;height: 7px"
</a-form-item> src="@/assets/images/coursewareManage/asterisk.png"
</a-col> alt=""
</a-row> />
<!-- 参训人数 studys--> 授课时长
<a-row :gutter="16"> </template>
<a-input v-model:value="formParam.teaching" style="width:100%; height: 40px; border-radius: 8px ; "
placeholder="请输入授课时长" allowClear showSearch suffix="分钟" :maxLength="8" @blur="clearNonNumber">
</a-input>
<!-- <span style="margin-left: 5px ;" v-if="formParam.teaching != null">{{ (formParam.teaching / 60
).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teaching == null">0.00小时</span> -->
</a-form-item>
</a-col>
<a-col :span="12"> </a-row>
<a-form-item label="参训人数" name="studys"> <!-- 参训人数 studys-->
<a-input v-model:value="formParam.studys" class="draitem" placeholder="请输入参训人数" :maxLength="8" <a-row :gutter="16">
@blur="clearstudysNumber" allowClear showSearch> <a-col :span="12">
</a-input> <a-form-item name="score">
</a-form-item> <template v-slot:label>
</a-col> <img
</a-row> style="margin-right:4px;width: 7px;height: 7px"
<!-- 备注 remark --> src="@/assets/images/coursewareManage/asterisk.png"
<a-row :gutter="16"> alt=""
<a-col :span="24"> />
<a-form-item label="备注"> 评分
<a-textarea v-model:value="formParam.remark" showCount :maxlength="200" @blur="sendRemark" </template>
style="width: 100%; height: 100px; border-radius: 8px;margin-bottom:62px;" placeholder="请输入" /> <!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch>
</a-form-item> </a-input> -->
</a-col> <a-input-number @blur="blurScore" @focus="focusScore" v-model:value="formParam.score" :precision="0" :min="1" :max="100"
</a-row> style="width:100%; height: 40px; border-radius: 8px ; " placeholder="请输入评分" />
</a-form> </a-form-item>
<div :style="{ </a-col>
position: 'absolute', <a-col :span="12">
right: 0, <a-form-item name="studys">
bottom: 0, <template v-slot:label>
width: '100%', <img
borderTop: '1px solid #e9e9e9', style="margin-right:4px;width: 7px;height: 7px"
padding: '10px 16px', src="@/assets/images/coursewareManage/asterisk.png"
background: '#fff', alt=""
textAlign: 'right', />
zIndex: 1, 参训人数
}"> </template>
<a-button class="drabtn" @click="cancelTeacherDialog">取消</a-button> <a-input v-model:value="formParam.studys" class="draitem" placeholder="请输入参训人数" :maxLength="8"
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存 @blur="clearstudysNumber" allowClear showSearch>
</a-button> </a-input>
</a-form-item>
</a-col>
</a-row>
<!-- 备注 remark -->
<a-row :gutter="16">
<a-col :span="24">
<a-form-item label="备注">
<a-textarea v-model:value="formParam.remark" showCount :maxlength="200" @blur="sendRemark"
style="width: 100%; height: 100px; border-radius: 8px;margin-bottom:62px;" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
</a-form>
<div :style="{
position: 'absolute',
right: 0,
bottom: 0,
width: '100%',
borderTop: '1px solid #e9e9e9',
padding: '10px 16px',
background: '#fff',
textAlign: 'right',
zIndex: 1,
}">
<a-button class="drabtn" @click="cancelTeacherDialog">取消</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
</a-button>
</div>
</div> </div>
</a-drawer> </a-drawer>
<!--查看授课详情 --> <!--查看授课详情 -->
<a-drawer v-model:visible="teachingdialog" :closable="false" placement="right" :maskClosable="false" <a-drawer class="largeDrawerStyle" v-model:visible="teachingdialog" :closable="false" placement="right" :maskClosable="false"
width="60%" :title="false"> width="60%" :title="false">
<div class="headers" style="margin-top:-24px;"> <div style="padding:24px;">
<div class="headerTitle">查看讲师授课记录</div> <div class="headers" style="margin-top:-24px;">
<img <div class="headerTitle">查看讲师授课记录</div>
style="width: 29px; height: 29px; cursor: pointer" <img
src="@/assets/images/basicinfo/close.png" style="width: 29px; height: 29px; cursor: pointer"
@click="cancelTeachingDialog" src="@/assets/images/basicinfo/close.png"
/> @click="cancelTeachingDialog"
</div> />
<span class="line"></span>
<span style="font-weight:600;">讲师信息</span>
<a-descriptions style="margin-top:15px;" bordered :column="2" :contentStyle="rowCenter" :labelStyle="{'width':'160px'}">
<a-descriptions-item label="讲师名称">{{ formParam.teacherName ||'-'}}</a-descriptions-item>
<a-descriptions-item label="讲师工号">{{ formParam.userNo||'-' }}</a-descriptions-item>
<a-descriptions-item label="讲师组织" :span="2">{{ formParam.orgName||'-' }}</a-descriptions-item>
<a-descriptions-item label="讲师体系">{{ formParam.tsystemName||'-' }}</a-descriptions-item>
<a-descriptions-item label="讲师级别">{{ formParam.tlevelName||'-'
}}</a-descriptions-item>
<a-descriptions-item label="录入方式">
{{ formParam.createFrom == 0 ? '系统生成' : formParam.createFrom == 1 ? '手动录入' : '-' }}</a-descriptions-item>
<a-descriptions-item label="课程类型">{{ formParam.type == 0 ? '在线课' : formParam.type == 1 ? '面授课' : '-'
}}</a-descriptions-item>
<a-descriptions-item label="课程名称">{{ formParam.courseName||'-' }}</a-descriptions-item>
<a-descriptions-item label="开课状态">{{ formParam.courseStatus == 0 ? '未开课' : formParam.courseStatus == 1
? '已开课' : '-' }}</a-descriptions-item>
<a-descriptions-item label="授课时长 ">
<span> {{ formParam.teaching }} 分钟</span>
<span style="margin-left: 10px ;" v-if="formParam.teaching != '0'">({{ (formParam.teaching / 60
).toFixed(2) }}小时)</span> </a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate||'-' }}</a-descriptions-item>
<a-descriptions-item label="参训人数 ">{{ formParam.studys||'-' }}</a-descriptions-item>
<a-descriptions-item label="评分 ">{{ formParam.score||'-' }}</a-descriptions-item>
<a-descriptions-item label="内容分类">{{ formParam.courseTypeName||'-' }}</a-descriptions-item>
<a-descriptions-item label="备注 ">{{ formParam.remark||'-' }}</a-descriptions-item>
</a-descriptions>
<div v-if="formParam.createFrom == '0'">
<div style="margin-top:20px ;line-height: 24px;margin-bottom: 15px;">
<span class="line"></span>
<span style="font-weight:600;">讲师费发放情况</span>
</div> </div>
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe;margin-bottom: 60px;" :columns="column" <span class="line"></span>
:data-source="tableDatas" :pagination="false"> <span style="font-weight:600;">讲师信息</span>
<template #bodyCell="{ record, column }"> <a-descriptions style="margin-top:15px;" bordered :column="2" :contentStyle="{'maxWidth':'300px'}" :labelStyle="{'width':'160px'}">
<template v-if="column.key === 'operation'"> <a-descriptions-item label="讲师名称">{{ formParam.teacherName ||'-'}}</a-descriptions-item>
<a-space> <a-descriptions-item label="讲师工号">{{ formParam.userNo||'-' }}</a-descriptions-item>
<!-- <a-button type="link" @click="() => handleLooka(record, String(record.courseform))">查看</a-button> --> <a-descriptions-item label="讲师组织">{{ formParam.orgName||'-' }}</a-descriptions-item>
</a-space> <a-descriptions-item label="培训发生组织">{{ formParam.trainOrg||'-' }}</a-descriptions-item>
<a-descriptions-item label="讲师体系">{{ formParam.tsystemName||'-' }}</a-descriptions-item>
<a-descriptions-item label="讲师级别">{{ formParam.tlevelName||'-'
}}</a-descriptions-item>
<a-descriptions-item label="录入方式">
{{ formParam.createFrom == 0 ? '系统生成' : formParam.createFrom == 1 ? '手动录入' : '-' }}</a-descriptions-item>
<a-descriptions-item label="课程类型">{{ formParam.type == 0 ? '在线课' : formParam.type == 1 ? '面授课' : '-'
}}</a-descriptions-item>
<a-descriptions-item label="课程名称">{{ formParam.courseName||'-' }}</a-descriptions-item>
<a-descriptions-item label="开课状态">{{ formParam.courseStatus == 0 ? '未开课' : formParam.courseStatus == 1
? '已开课' : '-' }}</a-descriptions-item>
<a-descriptions-item label="授课时长 ">
<span> {{ formParam.teaching }} 分钟</span>
<span style="margin-left: 10px ;" v-if="formParam.teaching != '0'">({{ (formParam.teaching / 60
).toFixed(2) }}小时)</span> </a-descriptions-item>
<a-descriptions-item label="授课/课程日期 ">{{ formParam.teachingDate||'-' }}</a-descriptions-item>
<a-descriptions-item label="参训人数 ">{{ formParam.studys||'-' }}</a-descriptions-item>
<a-descriptions-item label="评分 ">{{ formParam.score||'-' }}</a-descriptions-item>
<a-descriptions-item label="内容分类">{{ formParam.courseTypeName||'-' }}</a-descriptions-item>
<a-descriptions-item label="备注 ">{{ formParam.remark||'-' }}</a-descriptions-item>
</a-descriptions>
<div v-if="formParam.createFrom == '0'">
<div style="margin-top:20px ;line-height: 24px;margin-bottom: 15px;">
<span class="line"></span>
<span style="font-weight:600;">讲师费发放情况</span>
</div>
<a-table :header-cell-style="{ 'text-align': 'center' }" style="border: 1px solid #f2f6fe;margin-bottom: 60px;" :columns="column"
:data-source="tableDatas" :pagination="false">
<template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'">
<a-space>
<!-- <a-button type="link" @click="() => handleLooka(record, String(record.courseform))">查看</a-button> -->
</a-space>
</template>
</template> </template>
</template> </a-table>
</a-table> </div>
<!-- <div :style="{
position: 'absolute',
right: 0,
bottom: 0,
width: '100%',
borderTop: '1px solid #e9e9e9',
padding: '10px 16px',
background: '#fff',
textAlign: 'right',
zIndex: 1,
}">
<a-button class="drabtn" @click="cancelTeachingDialog">取消</a-button>
<a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">返回
</a-button>
</div> -->
</div> </div>
<!-- <div :style="{
position: 'absolute',
right: 0,
bottom: 0,
width: '100%',
borderTop: '1px solid #e9e9e9',
padding: '10px 16px',
background: '#fff',
textAlign: 'right',
zIndex: 1,
}">
<a-button class="drabtn" @click="cancelTeachingDialog">取消</a-button>
<a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">返回
</a-button>
</div> -->
</a-drawer> </a-drawer>
<!-- 删除功能弹窗 --> <!-- 删除功能弹窗 -->
<div> <div>
@@ -418,6 +514,7 @@ import { fileUp } from "../../api/Lecturer";
import SearchTeacher from "@/components/project/SearchTeacher"; import SearchTeacher from "@/components/project/SearchTeacher";
import { useStore } from "vuex"; import { useStore } from "vuex";
import OrgClass from "@/components/project/OrgClass"; import OrgClass from "@/components/project/OrgClass";
import { queryTrainOrgPor,} from "../../api/organization";
export default { export default {
name: "InsideTeaching", name: "InsideTeaching",
components: { components: {
@@ -444,6 +541,7 @@ export default {
state.searchParam = JSON.parse(search) state.searchParam = JSON.parse(search)
} }
searchSubmit() searchSubmit()
orgListDatas()
}) })
const route = useRoute() const route = useRoute()
const formRef = ref(); const formRef = ref();
@@ -479,16 +577,17 @@ export default {
}, },
score: undefined, score: undefined,
formParam: { formParam: {
courseStatus: 1, courseStatus: '1',
createFrom: 1, createFrom: 1,
teaching: null, teaching: null,
name: null, name: null,
teacherName: null, teacherName: null,
teachingDate: null, teachingDate: null,
// sourceBelongId: null, trainOrgId: null,
sourceBelongFullName: null, sourceBelongFullName: null,
score: 0, score: 0,
}, },
orgList: [],
startTime: null, startTime: null,
searchParam: searchParam:
{ {
@@ -656,18 +755,18 @@ export default {
width: 120, width: 120,
}, },
{ {
title: '所属组织 ', title: '培训发生组织 ',
dataIndex: 'orgName', dataIndex: 'trainOrg',
key: 'orgName', key: 'trainOrg',
ellipsis: true, align: "center", ellipsis: true, align: "center",
width: 200, width: 200,
// customRender: (value, record) => { customRender: (value, record) => {
// return ( return (
// <div> <div>
// {value.record.orgName} {value.record.trainOrg||'-'}
// </div> </div>
// ) )
// } }
}, },
{ {
title: '数据来源', title: '数据来源',
@@ -758,7 +857,7 @@ export default {
width: 120, width: 120,
}, },
{ {
title: '授课时长(H) ', title: '授课时长(分钟) ',
dataIndex: 'teaching', dataIndex: 'teaching',
key: 'teaching', key: 'teaching',
ellipsis: true, align: "center", ellipsis: true, align: "center",
@@ -790,8 +889,8 @@ export default {
<div> <div>
{value.record.createdFee == 0 || value.record.createdFee == 1 {value.record.createdFee == 0 || value.record.createdFee == 1
? { ? {
"0": "未提交", "0": "",
"1": "已提交", "1": "",
}[value.record.createdFee + ""] || "" }[value.record.createdFee + ""] || ""
: "-"} : "-"}
</div> </div>
@@ -812,6 +911,25 @@ export default {
const tableData = ref([ const tableData = ref([
]) ])
const orgListDatas = () => {
const obj = {
pageNo:1,
pageSize:50
}
queryTrainOrgPor(obj).then((res) => {
console.log(res,'rssssss')
state.orgList = res.data.data?.map(item=>{
return{
label: item.affiliationName,
value: item.id
}
})
})
}
const changeOrg = (e,l) => {
console.log(e,'eeeee',l)
state.formParam.trainOrgName = l?.label
}
const rules = { const rules = {
name: [{ required: true, message: '', log: '讲师不能为空' }], name: [{ required: true, message: '', log: '讲师不能为空' }],
orgName: [{ required: true, message: '', log: '讲师组织不能为空' }], orgName: [{ required: true, message: '', log: '讲师组织不能为空' }],
@@ -819,7 +937,7 @@ export default {
tsystemName: [{ required: true, message: '', log: '讲师体系不能为空' }], tsystemName: [{ required: true, message: '', log: '讲师体系不能为空' }],
courseTypeId: [{ required: true, message: '', log: '内容分类不能为空' }], courseTypeId: [{ required: true, message: '', log: '内容分类不能为空' }],
courseName: [{ required: true, message: '', log: '课程名称不能为空' }], courseName: [{ required: true, message: '', log: '课程名称不能为空' }],
// sourceBelongId: [{ required: true, message: '', log: '课程归属组织不能为空' }], trainOrgId: [{ required: true, message: '', log: '培训发生组织不能为空' }],
teachingDate: [{ required: true, message: '', log: '授课日期不能为空' }], teachingDate: [{ required: true, message: '', log: '授课日期不能为空' }],
teaching: [{ required: true, message: '', log: '授课时长不能为空' }], teaching: [{ required: true, message: '', log: '授课时长不能为空' }],
courseStatus: [{ required: true, message: '', log: '开课状态不能为空' }], courseStatus: [{ required: true, message: '', log: '开课状态不能为空' }],
@@ -973,10 +1091,12 @@ export default {
if(state.formParam.studys==0){ if(state.formParam.studys==0){
state.formParam.studys = null state.formParam.studys = null
} }
state.formParam.courseStatus = String(state.formParam.courseStatus)
const formItemNames = Object.keys(rules); const formItemNames = Object.keys(rules);
for (let i = 0; i < formItemNames.length; i++) { for (let i = 0; i < formItemNames.length; i++) {
const result = await validateField(formItemNames[i]); // const result = await validateField(formItemNames[i]);
if (result) { const result = state.formParam[formItemNames[i]]
if (!result) {
return message.error(rules[formItemNames[i]][0].log) return message.error(rules[formItemNames[i]][0].log)
} }
} }
@@ -1042,7 +1162,7 @@ export default {
const cancel = () => { const cancel = () => {
state.formParam = { state.formParam = {
recordType: 1, recordType: 1,
courseStatus: 1, courseStatus: '1',
teacher: null, teacher: null,
orgName: null, orgName: null,
tsystemName: null, tsystemName: null,
@@ -1050,10 +1170,10 @@ export default {
courseName: null, courseName: null,
teaching: null, teaching: null,
studys: null, studys: null,
score: 0, score: null,
type: null, type: null,
remark: null, remark: null,
// sourceBelongId: null, trainOrgId: null,
sourceBelongFullName: null, sourceBelongFullName: null,
offcourseId: null, offcourseId: null,
createFrom: null, createFrom: null,
@@ -1135,6 +1255,7 @@ export default {
state.teachingDate = dayjs(res.data.data.teachingDate, 'YYYY-MM-DD HH:mm'), state.teachingDate = dayjs(res.data.data.teachingDate, 'YYYY-MM-DD HH:mm'),
state.formParam.orgNames = state.formParam.orgName state.formParam.orgNames = state.formParam.orgName
state.formParam.teachingDate = res.data.data.teachingDate ? dayjs(res.data.data.teachingDate).format("YYYY-MM-DD HH:mm").toString() : "-" state.formParam.teachingDate = res.data.data.teachingDate ? dayjs(res.data.data.teachingDate).format("YYYY-MM-DD HH:mm").toString() : "-"
state.formParam.courseStatus = String(state.formParam.courseStatus)
console.log(state.formParam); console.log(state.formParam);
}) })
.catch((err) => { .catch((err) => {
@@ -1276,6 +1397,12 @@ export default {
const clearscoreNumber = () => { const clearscoreNumber = () => {
state.formParam.score = state.formParam.score.replace(/\D/g, ''); state.formParam.score = state.formParam.score.replace(/\D/g, '');
} }
const blurScore = () => {
// !state.formParam.score && (state.formParam.score = '0')
}
const focusScore = () => {
// state.formParam.score == 0 && (state.formParam.score = null)
}
const clearstudysNumber = () => { const clearstudysNumber = () => {
state.formParam.studys = state.formParam.studys.replace(/\D/g, ''); state.formParam.studys = state.formParam.studys.replace(/\D/g, '');
} }
@@ -1305,8 +1432,12 @@ export default {
clearNonNumber, clearNonNumber,
clearscoreNumber, clearscoreNumber,
clearstudysNumber, clearstudysNumber,
blurScore,
focusScore,
beforeUpload2, beforeUpload2,
rules, rules,
orgListDatas,
changeOrg,
formRef, formRef,
column, column,
tableDatas, tableDatas,

View File

@@ -1,9 +1,9 @@
<template> <template>
<a-drawer :visible="visible" placement="right" :closable="false" :maskClosable="false" <a-drawer class="largeDrawerStyle" :visible="visible" placement="right" :closable="false" :maskClosable="false"
width="60%" :title="false"> width="60%" :title="false">
<div class="appedit"> <div class="appedit">
<div class="header" style="margin-top: -24px;"> <div class="header" style="margin-top: -24px;">
<div class="headerTitle">编辑讲师费审批</div> <div class="headerTitle">汇总讲师费</div>
<img <img
style="width: 29px; height: 29px; cursor: pointer" style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png" src="../../assets/images/basicinfo/close.png"
@@ -28,7 +28,7 @@
</div> </div>
<div class="title"> <div class="title">
<div class="line"></div> <div class="line"></div>
<div class="text">基本信息</div> <div class="text">讲师费列表</div>
</div> </div>
<div class="desc"> <div class="desc">
<div class="input_box"> <div class="input_box">
@@ -74,8 +74,9 @@
<button class="btn2" @click="paramsDrawer">提交</button> <button class="btn2" @click="paramsDrawer">提交</button>
</div> </div>
</div> </div>
<a-drawer v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false" dropdown-style="drawaer" <a-drawer class="largeDrawerStyle" v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false" dropdown-style="drawaer"
width="60%" :title="false"> width="60%" :title="false">
<div style="padding:24px;">
<div class="headers" style="margin-top:-24px;"> <div class="headers" style="margin-top:-24px;">
<div class="headerTitle">编辑讲师费</div> <div class="headerTitle">编辑讲师费</div>
<img <img
@@ -84,18 +85,34 @@
@click="cancelTeacherDialog" @click="cancelTeacherDialog"
/> />
</div> </div>
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef" > <a-form :model="formParam" layout="vertical" ref="formRef" >
<!-- 讲师姓名 name 讲师工号 userNo--> <!-- 讲师姓名 name 讲师工号 userNo-->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师名称" name="name"> <a-form-item name="name">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师名称
</template>
<SearchTeacher :disabled="true" @tlevel="tlevelChange" v-model:id="formParam.teacherId" v-model:value="formParam.name" v-model:orgId="formParam.orgId" v-model:lable="formParam.orgNames" v-model:user="formParam.userNo" <SearchTeacher :disabled="true" @tlevel="tlevelChange" v-model:id="formParam.teacherId" v-model:value="formParam.name" v-model:orgId="formParam.orgId" v-model:lable="formParam.orgNames" v-model:user="formParam.userNo"
v-model:system="tSystemNames" v-model:payrollPlaceCode="formParam.payrollPlaceId" v-model:system="tSystemNames" v-model:payrollPlaceCode="formParam.payrollPlaceId"
v-model:payrollPlaceName="formParam.payrollPlace" ></SearchTeacher> v-model:payrollPlaceName="formParam.payrollPlace" ></SearchTeacher>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师工号" name="userNo"> <a-form-item name="userNo">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师工号
</template>
<a-input class="draitem" v-model:value="formParam.userNo" disabled <a-input class="draitem" v-model:value="formParam.userNo" disabled
placeholder="请输入讲师工号" allowClear showSearch> placeholder="请输入讲师工号" allowClear showSearch>
</a-input> </a-input>
@@ -105,7 +122,15 @@
<!-- 讲师组织 departId 讲师体系 systemId --> <!-- 讲师组织 departId 讲师体系 systemId -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师组织" name="orgName"> <a-form-item name="orgName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师组织
</template>
<!-- <a-popover> <!-- <a-popover>
<template #content> <template #content>
{{ formParam.orgNames }} {{ formParam.orgNames }}
@@ -118,7 +143,15 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师体系" name="tsystemName"> <a-form-item name="tsystemName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师体系
</template>
<!-- <a-select class="draitem" v-model:value="formParam.tsystemName" placeholder="请选择讲师体系" allowClear <!-- <a-select class="draitem" v-model:value="formParam.tsystemName" placeholder="请选择讲师体系" allowClear
@change="changetlevel" .:options="LecturerSystemList"> @change="changetlevel" .:options="LecturerSystemList">
</a-select> --> </a-select> -->
@@ -131,14 +164,30 @@
<!-- 讲师级别 levelId 讲师发薪地 payrollPlaceName--> <!-- 讲师级别 levelId 讲师发薪地 payrollPlaceName-->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师级别" name="tlevelName"> <a-form-item name="tlevelName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师级别
</template>
<a-input disabled v-model:value="formParam.tlevelName" class="draitem" <a-input disabled v-model:value="formParam.tlevelName" class="draitem"
placeholder="自动带出讲师级别" allowClear showSearch> placeholder="自动带出讲师级别" allowClear showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师发薪地" name="payrollPlace"> <a-form-item name="payrollPlace">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师发薪地
</template>
<a-input disabled v-model:value="formParam.payrollPlace" class="draitem" <a-input disabled v-model:value="formParam.payrollPlace" class="draitem"
placeholder="自动带出讲师发薪地" allowClear showSearch > placeholder="自动带出讲师发薪地" allowClear showSearch >
</a-input> </a-input>
@@ -148,14 +197,30 @@
<!-- 费用类型 课程名称 courseName--> <!-- 费用类型 课程名称 courseName-->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="费用类型" name="courseType"> <a-form-item name="courseType">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
费用类型
</template>
<a-select class="draitem" v-model:value="formParam.courseType" placeholder="请选择费用类型" <a-select class="draitem" v-model:value="formParam.courseType" placeholder="请选择费用类型"
:options="courseTypeList"> :options="courseTypeList">
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="课程名称" name="courseName"> <a-form-item name="courseName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
课程名称
</template>
<!-- <a-radio-group v-model:value="formParam.courseName"> <!-- <a-radio-group v-model:value="formParam.courseName">
<a-radio :value="0">面授课</a-radio> <a-radio :value="0">面授课</a-radio>
<a-radio :value="1">在线课</a-radio> <a-radio :value="1">在线课</a-radio>
@@ -171,7 +236,15 @@
<!-- 授课日期 teachingDate 授课时长 teachingTime --> <!-- 授课日期 teachingDate 授课时长 teachingTime -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="培训发生组织" name="trainOrgId"> <a-form-item name="trainOrgId">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
培训发生组织
</template>
<!-- <OrgClass <!-- <OrgClass
v-model:value="formParam.sourceBelongId" v-model:value="formParam.sourceBelongId"
v-model:name="formParam.sourceBelongFullName" v-model:name="formParam.sourceBelongFullName"
@@ -182,7 +255,15 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课/课程日期 :" name="teachingDate"> <a-form-item name="teachingDate">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
授课/课程日期 :
</template>
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm" valueFormat="YYYY-MM-DD HH:mm" <a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm" valueFormat="YYYY-MM-DD HH:mm"
placeholder="请选择课程日期" /> placeholder="请选择课程日期" />
</a-form-item> </a-form-item>
@@ -191,17 +272,33 @@
<!-- 参训人数 studys 评分 score --> <!-- 参训人数 studys 评分 score -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课时长" name="teachingTime"> <a-form-item name="teachingTime">
<a-input v-model:value="formParam.teachingTime" style="width:80%; height: 40px; border-radius: 8px; " <template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
授课时长
</template>
<a-input v-model:value="formParam.teachingTime" style="width:100%; height: 40px; border-radius: 8px; "
@change="clearNonNumber" placeholder="请输入授课分钟数" allowClear showSearch suffix="分钟"> @change="clearNonNumber" placeholder="请输入授课分钟数" allowClear showSearch suffix="分钟">
</a-input> </a-input>
<span style="margin-left: 5px ;" v-if="formParam.teachingTime != null">{{ <!-- <span style="margin-left: 5px ;" v-if="formParam.teachingTime != null">{{
(formParam.teachingTime / 60).toFixed(2) }}小时</span> (formParam.teachingTime / 60).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teachingTime == null">0.00小时</span> <span style="margin-left: 5px ;" v-if="formParam.teachingTime == null">0.00小时</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="参训人数" name="studys"> <a-form-item name="studys">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
参训人数
</template>
<a-input v-model:value="formParam.studys" class="draitem" @change="clearstudysNumber" <a-input v-model:value="formParam.studys" class="draitem" @change="clearstudysNumber"
placeholder="请输入参训人数" allowClear showSearch > placeholder="请输入参训人数" allowClear showSearch >
</a-input> </a-input>
@@ -211,14 +308,30 @@
<!-- 课酬基准 计划费用 expense--> <!-- 课酬基准 计划费用 expense-->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="评分" name="score"> <a-form-item name="score">
<a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="10" :controls="false" :min="0" :precision="2" placeholder="请输入评分" <template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
评分
</template>
<a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="100" :controls="false" :min="1" :precision="0" placeholder="请输入评分"
allowClear > allowClear >
</a-input-number> </a-input-number>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="课酬基准" name="levelPay"> <a-form-item name="levelPay">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
课酬基准
</template>
<a-input-number v-model:value="formParam.levelPay" placeholder="自动键入系统基准(可手动更改)" :max="99999999" :controls="false" :min="0" :precision="2" <a-input-number v-model:value="formParam.levelPay" placeholder="自动键入系统基准(可手动更改)" :max="99999999" :controls="false" :min="0" :precision="2"
@change="clearlevelPayNumber" @change="clearlevelPayNumber"
allowClear showSearch class="draitem"> allowClear showSearch class="draitem">
@@ -229,19 +342,27 @@
<!-- 应发费用 --> <!-- 应发费用 -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="计划费用" name="expense"> <a-form-item name="expense">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
计划费用
</template>
<a-input class="draitem" v-model:value="formParam.expense" placeholder="自动计算( 授课时长(或课程时长)*课酬基准 " allowClear disabled <a-input class="draitem" v-model:value="formParam.expense" placeholder="自动计算( 授课时长(或课程时长)*课酬基准 " allowClear disabled
showSearch> showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <!-- <a-col :span="12">
<a-form-item label="应发费用" name="payableExpense"> <a-form-item label="应发费用" name="payableExpense">
<a-input-number :max="99999999" :controls="false" :min="0" :precision="2" v-model:value="formParam.payableExpense" class="draitem" <a-input-number :max="99999999" :controls="false" :min="0" :precision="2" v-model:value="formParam.payableExpense" class="draitem"
placeholder="请输入应发费用" @change="clearPayableExpense" allowClear> placeholder="请输入应发费用" @change="clearPayableExpense" allowClear>
</a-input-number> </a-input-number>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
</a-row> </a-row>
<!-- 备注 remark --> <!-- 备注 remark -->
<a-row :gutter="16"> <a-row :gutter="16">
@@ -268,6 +389,7 @@
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存 <a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
</a-button> </a-button>
</div> </div>
</div>
</a-drawer> </a-drawer>
<a-modal <a-modal
:visible="modalVisible" :visible="modalVisible"
@@ -496,11 +618,8 @@ export default {
state.formParam.teachingTime&&state.formParam.levelPay && (state.formParam.payableExpense = (state.formParam.levelPay*(state.formParam.teachingTime/60)).toFixed(2)) state.formParam.teachingTime&&state.formParam.levelPay && (state.formParam.payableExpense = (state.formParam.levelPay*(state.formParam.teachingTime/60)).toFixed(2))
} }
const courseTypeList = ref([ const courseTypeList = ref([
{ value: '0', label: "在线" }, { value: '2', label: "课程开发" },
{ value: '1', label: "面授 " }, { value: '3', label: "作业员入模培训" },
{ value: '2', label: "授课 " },
{ value: '3', label: "课程开发" },
{ value: '4', label: "作业员如模培训" },
]) ])
const formRef = ref(); const formRef = ref();
const tlevelChange = (e) => { const tlevelChange = (e) => {
@@ -566,8 +685,9 @@ export default {
} }
const formItemNames = Object.keys(rules); const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){ for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]); // const result = await validateField(formItemNames[i]);
if (result) { const result = state.formParam[formItemNames[i]]
if (!result) {
return message.error(rules[formItemNames[i]][0].log) return message.error(rules[formItemNames[i]][0].log)
} }
} }
@@ -632,7 +752,7 @@ export default {
score: [{ required: true, message:'',log: ' 评分不能为空' }], score: [{ required: true, message:'',log: ' 评分不能为空' }],
levelPay: [{ required: true, message:'',log: '课酬基准 不能为空' }], levelPay: [{ required: true, message:'',log: '课酬基准 不能为空' }],
expense: [{ required: true, message: '',log:'计划费用不能为空' }], expense: [{ required: true, message: '',log:'计划费用不能为空' }],
payableExpense: [{ required: true, message: '',log:'应发费用不能为空' }], // payableExpense: [{ required: true, message: '',log:'应发费用不能为空' }],
} }
const closeDrawer = () => { const closeDrawer = () => {
state.params.userNoName = null state.params.userNoName = null
@@ -655,6 +775,7 @@ export default {
}).then(res=>{ }).then(res=>{
if(res.data.code == 200){ if(res.data.code == 200){
message.success('提交成功') message.success('提交成功')
emits.emit('successParams',true)
closeDrawer(); closeDrawer();
} }
}).catch(err=>{ }).catch(err=>{
@@ -858,14 +979,14 @@ export default {
align: "center", align: "center",
width: 160, width: 160,
}, },
{ // {
title: '应发费用 ', // title: '应发费用 ',
dataIndex: 'payableExpense', // dataIndex: 'payableExpense',
key: 'payableExpense', // key: 'payableExpense',
ellipsis: true, // ellipsis: true,
align: "center", // align: "center",
width: 160, // width: 160,
}, // },
{ {
title: '操作 ', title: '操作 ',
dataIndex: 'operation', dataIndex: 'operation',
@@ -1075,7 +1196,7 @@ export default {
overflow-x: auto; overflow-x: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding:24px;
.header { .header {
padding: 0px 15px; padding: 0px 15px;
height: 68px; height: 68px;

View File

@@ -90,11 +90,11 @@
<template #bodyCell="{ record, column }"> <template #bodyCell="{ record, column }">
<template v-if="column.key === 'operation'"> <template v-if="column.key === 'operation'">
<a-space > <a-space >
<a-button type="link" v-if="record.status != 2&&record.status!=3" @click="goDdit(record)">编辑</a-button> <a-button type="link" v-if="record.status != 2&&record.status!=3" @click="goDdit(record)">提交</a-button>
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button> <a-button type="link" v-if="record.status != 1&&record.status!=5" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
<!-- <a-button type="link" @click="() => handleOperate(record, String(record.courseform))">审批</a-button> --> <!-- <a-button type="link" @click="() => handleOperate(record, String(record.courseform))">审批</a-button> -->
<!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> --> <!-- <a-button type="link" @click="() => deleteModal(record, String(record.courseform))">删除</a-button> -->
<a-button v-if="record.status == 1||record.status == 4||record.status == 5" type="link" @click="submit(record)">提交</a-button> <!-- <a-button v-if="record.status == 4" type="link" @click="submit(record)">提交</a-button> -->
<a-button v-if="record.status == 2" type="link" @click="withdraw(record)">撤回</a-button> <a-button v-if="record.status == 2" type="link" @click="withdraw(record)">撤回</a-button>
</a-space> </a-space>
</template> </template>
@@ -120,10 +120,11 @@
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<!--查看讲师费详情 --> <!--查看讲师费详情 -->
<a-drawer :closable="false" v-model:visible="teachingdialog" placement="right" <a-drawer class="largeDrawerStyle" :closable="false" v-model:visible="teachingdialog" placement="right"
@closa="cancelTeachingDialog" width="60%" :title="false"> @closa="cancelTeachingDialog" width="60%" :title="false">
<div style="padding:24px;">
<div class="headers" style="margin-top:-24px;"> <div class="headers" style="margin-top:-24px;">
<div class="headerTitle">查看讲师费</div> <div class="headerTitle">汇总讲师费详情</div>
<img <img
style="width: 29px; height: 29px; cursor: pointer" style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png" src="../../assets/images/basicinfo/close.png"
@@ -131,7 +132,7 @@
/> />
</div> </div>
<span class="line"></span> <span class="line"></span>
<span style="font-weight:600;">讲师费用详情</span> <span style="font-weight:600;">基本信息</span>
<a-descriptions style="margin-top:16px" bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter"> <a-descriptions style="margin-top:16px" bordered :column="2" :contentStyle="rowCenter" :labelStyle="rowCenter">
<a-descriptions-item label="审批编号">{{formParam?.approvalNumber||'-'}}</a-descriptions-item> <a-descriptions-item label="审批编号">{{formParam?.approvalNumber||'-'}}</a-descriptions-item>
<a-descriptions-item label="培训发生组织">{{formParam?.trainOrgName||'-'}}</a-descriptions-item> <a-descriptions-item label="培训发生组织">{{formParam?.trainOrgName||'-'}}</a-descriptions-item>
@@ -141,7 +142,7 @@
<a-descriptions-item label="状态">{{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'已完成', 4:'审核拒绝',5:'待提交'}[formParam?.status]}}</a-descriptions-item> <a-descriptions-item label="状态">{{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'已完成', 4:'审核拒绝',5:'待提交'}[formParam?.status]}}</a-descriptions-item>
</a-descriptions> </a-descriptions>
<!-- <span>审批详情</span> --> <!-- <span>审批详情</span> -->
<span class="line" style="margin-top:15px;"></span> <!-- <span class="line" style="margin-top:15px;"></span> -->
<a-tabs v-model:activeKey="activeKey" @change="tabsChange"> <a-tabs v-model:activeKey="activeKey" @change="tabsChange">
<a-tab-pane key="1" tab="讲师费列表"> <a-tab-pane key="1" tab="讲师费列表">
<div style="padding: 10px 0;"> <div style="padding: 10px 0;">
@@ -172,7 +173,7 @@
</div> </div>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<div :style="{ <div v-if="formParam?.status==1||formParam?.status==5" :style="{
position: 'absolute', position: 'absolute',
right: 0, right: 0,
bottom: 0, bottom: 0,
@@ -184,10 +185,11 @@
zIndex: 1, zIndex: 1,
}"> }">
<a-button class="drabtn" @click="cancelTeachingDialog">取消</a-button> <a-button class="drabtn" @click="cancelTeachingDialog">取消</a-button>
<a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">确定 <a-button class="drabtn" type="primary" @click="cancelTeachingDialog(1)" :loading="buttonLoading">提交
</a-button> </a-button>
<!-- <a-button class="drabtn" @click="cancelTeachingDialog" type="primary" danger>拒绝</a-button> --> <!-- <a-button class="drabtn" @click="cancelTeachingDialog" type="primary" danger>拒绝</a-button> -->
</div> </div>
</div>
</a-drawer> </a-drawer>
<!-- 修改状态功能弹窗 --> <!-- 修改状态功能弹窗 -->
<div> <div>
@@ -225,7 +227,7 @@
</a-modal> </a-modal>
</div> </div>
<!-- <div> <Upload/> </div> --> <!-- <div> <Upload/> </div> -->
<LecturerAppEdit v-model:visible="editTeacherDialog" :id="editId" ></LecturerAppEdit> <LecturerAppEdit @successParams="successParams" v-model:visible="editTeacherDialog" :id="editId" ></LecturerAppEdit>
</div> </div>
</template> </template>
<script lang="jsx"> <script lang="jsx">
@@ -481,7 +483,7 @@
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
customCell: (record) => {return{style:{color:['#67C23A','#F56C6C'][record.status]}}}, // customCell: (record) => {return{style:{color:['#67C23A','#F56C6C'][record.status]}}},
customRender: (value) => { customRender: (value) => {
switch (value.record.status) { switch (value.record.status) {
case 0: case 0:
@@ -598,9 +600,14 @@
}) })
} }
//取消按钮 清空输入的数据 //取消按钮 清空输入的数据
const cancelTeachingDialog = () => { const cancelTeachingDialog = (val) => {
if(state.teachingdialog = true ) if(state.teachingdialog = true )
{ {
console.log(val,'valllllll')
if(val == 1){
submit(state.formParam)
return
}
state.teachingdialog = false state.teachingdialog = false
cancel() cancel()
} }
@@ -705,15 +712,21 @@
if(res.data.code == 200){ if(res.data.code == 200){
message.success('提交成功') message.success('提交成功')
getTableDate(); getTableDate();
cancel()
state.teachingdialog = false
} }
}).catch(err=>{ }).catch(err=>{
message.destroy() message.destroy()
cancel()
state.teachingdialog = false
message.error(err.data.msg) message.error(err.data.msg)
}) })
} }
}) })
} }
const successParams = () => {
getTableDate();
}
const withdraw = (record) => { const withdraw = (record) => {
console.log(record,'record') console.log(record,'record')
dialog({ dialog({
@@ -1057,6 +1070,7 @@
getListData, getListData,
tabsChange, tabsChange,
withdraw, withdraw,
successParams,
goDdit, goDdit,
cancel, cancel,
handleOperate, handleOperate,

View File

@@ -3,7 +3,7 @@
<div > <div >
<!-- 搜索框及按钮 --> <!-- 搜索框及按钮 -->
<div class="filter" > <div class="filter" >
<a-form layout="inline" style="min-width: 1380px;"> <a-form layout="inline" style="min-width: 1056px;">
<a-form-item class="select"> <a-form-item class="select">
<!-- v-model:value="searchParam.name" --> <!-- v-model:value="searchParam.name" -->
<!-- <a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px" <!-- <a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
@@ -156,8 +156,9 @@
</div> </div>
</div> </div>
<!-- 弹窗组件 --> <!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false" dropdown-style="drawaer" <a-drawer class="largeDrawerStyle" v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false" dropdown-style="drawaer"
width="60%" :title="false"> width="60%" :title="false">
<div style="padding:24px;">
<div class="headers" style="margin-top:-24px;"> <div class="headers" style="margin-top:-24px;">
<div class="headerTitle">{{ teacherdialogtitle }}</div> <div class="headerTitle">{{ teacherdialogtitle }}</div>
<img <img
@@ -166,18 +167,34 @@
@click="cancelTeacherDialog" @click="cancelTeacherDialog"
/> />
</div> </div>
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef" > <a-form :model="formParam" layout="vertical" ref="formRef" >
<!-- 讲师姓名 name 讲师工号 userNo--> <!-- 讲师姓名 name 讲师工号 userNo-->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师名称" name="name"> <a-form-item name="name">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师名称
</template>
<SearchTeacher :disabled="!!id" @tlevel="tlevelChange" v-model:id="formParam.teacherId" v-model:value="formParam.name" v-model:orgId="formParam.orgId" v-model:lable="formParam.orgNames" v-model:user="formParam.userNo" <SearchTeacher :disabled="!!id" @tlevel="tlevelChange" v-model:id="formParam.teacherId" v-model:value="formParam.name" v-model:orgId="formParam.orgId" v-model:lable="formParam.orgNames" v-model:user="formParam.userNo"
v-model:system="tSystemNames" v-model:payrollPlaceCode="formParam.payrollPlaceId" v-model:system="tSystemNames" v-model:payrollPlaceCode="formParam.payrollPlaceId"
v-model:payrollPlaceName="formParam.payrollPlace" ></SearchTeacher> v-model:payrollPlaceName="formParam.payrollPlace" ></SearchTeacher>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师工号" name="userNo"> <a-form-item name="userNo">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师工号
</template>
<a-input class="draitem" v-model:value="formParam.userNo" disabled <a-input class="draitem" v-model:value="formParam.userNo" disabled
placeholder="请输入讲师工号" allowClear showSearch> placeholder="请输入讲师工号" allowClear showSearch>
</a-input> </a-input>
@@ -187,7 +204,15 @@
<!-- 讲师组织 departId 讲师体系 systemId --> <!-- 讲师组织 departId 讲师体系 systemId -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师组织" name="orgName"> <a-form-item name="orgName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师组织
</template>
<!-- <a-popover> <!-- <a-popover>
<template #content> <template #content>
{{ formParam.orgNames }} {{ formParam.orgNames }}
@@ -200,7 +225,15 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师体系" name="tsystemName"> <a-form-item name="tsystemName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师体系
</template>
<!-- <a-select class="draitem" v-model:value="formParam.tsystemName" placeholder="请选择讲师体系" allowClear <!-- <a-select class="draitem" v-model:value="formParam.tsystemName" placeholder="请选择讲师体系" allowClear
@change="changetlevel" .:options="LecturerSystemList"> @change="changetlevel" .:options="LecturerSystemList">
</a-select> --> </a-select> -->
@@ -213,14 +246,30 @@
<!-- 讲师级别 levelId 讲师发薪地 payrollPlaceName--> <!-- 讲师级别 levelId 讲师发薪地 payrollPlaceName-->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师级别" name="tlevelName"> <a-form-item name="tlevelName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师级别
</template>
<a-input disabled v-model:value="formParam.tlevelName" class="draitem" <a-input disabled v-model:value="formParam.tlevelName" class="draitem"
placeholder="自动带出讲师级别" allowClear showSearch> placeholder="自动带出讲师级别" allowClear showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="讲师发薪地" name="payrollPlace"> <a-form-item name="payrollPlace">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
讲师发薪地
</template>
<a-input disabled v-model:value="formParam.payrollPlace" class="draitem" <a-input disabled v-model:value="formParam.payrollPlace" class="draitem"
placeholder="自动带出讲师发薪地" allowClear showSearch > placeholder="自动带出讲师发薪地" allowClear showSearch >
</a-input> </a-input>
@@ -230,14 +279,30 @@
<!-- 费用类型 课程名称 courseName--> <!-- 费用类型 课程名称 courseName-->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="费用类型" name="courseType"> <a-form-item name="courseType">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
费用类型
</template>
<a-select class="draitem" v-model:value="formParam.courseType" placeholder="请选择费用类型" <a-select class="draitem" v-model:value="formParam.courseType" placeholder="请选择费用类型"
:options="courseTypeList"> :options="courseTypeList">
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="课程名称" name="courseName"> <a-form-item name="courseName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
课程名称
</template>
<!-- <a-radio-group v-model:value="formParam.courseName"> <!-- <a-radio-group v-model:value="formParam.courseName">
<a-radio :value="0">面授课</a-radio> <a-radio :value="0">面授课</a-radio>
<a-radio :value="1">在线课</a-radio> <a-radio :value="1">在线课</a-radio>
@@ -253,7 +318,15 @@
<!-- 授课日期 teachingDate 授课时长 teachingTime --> <!-- 授课日期 teachingDate 授课时长 teachingTime -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="培训发生组织" name="trainOrgId"> <a-form-item name="trainOrgId">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
培训发生组织
</template>
<!-- <OrgClass <!-- <OrgClass
v-model:value="formParam.sourceBelongId" v-model:value="formParam.sourceBelongId"
v-model:name="formParam.sourceBelongFullName" v-model:name="formParam.sourceBelongFullName"
@@ -264,7 +337,15 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课/课程日期 :" name="teachingDate"> <a-form-item name="teachingDate">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
授课/课程日期 :
</template>
<a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm" valueFormat="YYYY-MM-DD HH:mm" <a-date-picker class="draitem" v-model:value="teachingDate" style="width:100%" :show-time="{ format: 'HH:mm' }" format="YYYY-MM-DD HH:mm" valueFormat="YYYY-MM-DD HH:mm"
placeholder="请选择课程日期" @select="handleSelect" /> placeholder="请选择课程日期" @select="handleSelect" />
</a-form-item> </a-form-item>
@@ -273,17 +354,33 @@
<!-- 参训人数 studys 评分 score --> <!-- 参训人数 studys 评分 score -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="授课时长" name="teachingTime"> <a-form-item name="teachingTime">
<a-input v-model:value="formParam.teachingTime" style="width:80%; height: 40px; border-radius: 8px; " <template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
授课时长
</template>
<a-input v-model:value="formParam.teachingTime" style="width:100%; height: 40px; border-radius: 8px; "
@change="clearNonNumber" placeholder="请输入授课分钟数" allowClear showSearch suffix="分钟"> @change="clearNonNumber" placeholder="请输入授课分钟数" allowClear showSearch suffix="分钟">
</a-input> </a-input>
<span style="margin-left: 5px ;" v-if="formParam.teachingTime != null">{{ <!-- <span style="margin-left: 5px ;" v-if="formParam.teachingTime != null">{{
(formParam.teachingTime / 60).toFixed(2) }}小时</span> (formParam.teachingTime / 60).toFixed(2) }}小时</span>
<span style="margin-left: 5px ;" v-if="formParam.teachingTime == null">0.00小时</span> <span style="margin-left: 5px ;" v-if="formParam.teachingTime == null">0.00小时</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="参训人数" name="studys"> <a-form-item name="studys">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
参训人数
</template>
<a-input v-model:value="formParam.studys" class="draitem" @change="clearstudysNumber" <a-input v-model:value="formParam.studys" class="draitem" @change="clearstudysNumber"
placeholder="请输入参训人数" allowClear showSearch > placeholder="请输入参训人数" allowClear showSearch >
</a-input> </a-input>
@@ -293,14 +390,30 @@
<!-- 课酬基准 计划费用 expense--> <!-- 课酬基准 计划费用 expense-->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="评分" name="score"> <a-form-item name="score">
<a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="10" :controls="false" :min="0" :precision="2" placeholder="请输入评分" <template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
评分
</template>
<a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="100" :controls="false" :min="1" :precision="0" placeholder="请输入评分"
allowClear @change="scoreNumber"> allowClear @change="scoreNumber">
</a-input-number> </a-input-number>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="课酬基准" name="levelPay"> <a-form-item name="levelPay">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
课酬基准
</template>
<a-input-number v-model:value="formParam.levelPay" placeholder="自动键入系统基准(可手动更改)" :max="99999999" :controls="false" :min="0" :precision="2" <a-input-number v-model:value="formParam.levelPay" placeholder="自动键入系统基准(可手动更改)" :max="99999999" :controls="false" :min="0" :precision="2"
@change="clearlevelPayNumber" @change="clearlevelPayNumber"
allowClear showSearch class="draitem"> allowClear showSearch class="draitem">
@@ -311,19 +424,27 @@
<!-- 应发费用 --> <!-- 应发费用 -->
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="计划费用" name="expense"> <a-form-item name="expense">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
计划费用
</template>
<a-input class="draitem" v-model:value="formParam.expense" placeholder="自动计算( 授课时长(或课程时长)*课酬基准 " allowClear disabled <a-input class="draitem" v-model:value="formParam.expense" placeholder="自动计算( 授课时长(或课程时长)*课酬基准 " allowClear disabled
showSearch> showSearch>
</a-input> </a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <!-- <a-col :span="12">
<a-form-item label="应发费用" name="payableExpense"> <a-form-item label="应发费用" name="payableExpense">
<a-input-number :max="99999999" :controls="false" :min="0" :precision="2" v-model:value="formParam.payableExpense" class="draitem" <a-input-number :max="99999999" :controls="false" :min="0" :precision="2" v-model:value="formParam.payableExpense" class="draitem"
placeholder="请输入应发费用" @change="clearPayableExpense" allowClear> placeholder="请输入应发费用" @change="clearPayableExpense" allowClear>
</a-input-number> </a-input-number>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
</a-row> </a-row>
<!-- 备注 remark --> <!-- 备注 remark -->
<a-row :gutter="16"> <a-row :gutter="16">
@@ -350,6 +471,7 @@
<a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存 <a-button class="drabtn" type="primary" @click="createTeacherDialog" :loading="buttonLoading">保存
</a-button> </a-button>
</div> </div>
</div>
</a-drawer> </a-drawer>
<!-- 修改状态功能弹窗 --> <!-- 修改状态功能弹窗 -->
<div> <div>
@@ -379,8 +501,9 @@
</a-modal> </a-modal>
</div> </div>
<!-- <div> <Upload/> </div> --> <!-- <div> <Upload/> </div> -->
<a-drawer v-model:visible="teachingdialog" placement="right" <a-drawer class="largeDrawerStyle" v-model:visible="teachingdialog" placement="right"
:closable="false" width="60%" :title="false"> :closable="false" width="60%" :title="false">
<div style="padding:24px;">
<div class="headers" style="margin-top:-24px;"> <div class="headers" style="margin-top:-24px;">
<div class="headerTitle">查看讲师费用</div> <div class="headerTitle">查看讲师费用</div>
<img <img
@@ -408,7 +531,7 @@
<a-descriptions-item label="评分 ">{{formParam.score || '-'}}</a-descriptions-item> <a-descriptions-item label="评分 ">{{formParam.score || '-'}}</a-descriptions-item>
<a-descriptions-item label="课酬基准 ">{{formParam.levelPay || '-'}}</a-descriptions-item> <a-descriptions-item label="课酬基准 ">{{formParam.levelPay || '-'}}</a-descriptions-item>
<a-descriptions-item label="计划费用 ">{{formParam.expense || '-'}}</a-descriptions-item> <a-descriptions-item label="计划费用 ">{{formParam.expense || '-'}}</a-descriptions-item>
<a-descriptions-item label="应发费用 ">{{formParam.payableExpense || '-'}}</a-descriptions-item> <!-- <a-descriptions-item label="应发费用 ">{{formParam.payableExpense || '-'}}</a-descriptions-item> -->
<!-- <a-descriptions-item label="费用发放时间">{{formParam.payableExpenseTime || '-'}}</a-descriptions-item> --> <!-- <a-descriptions-item label="费用发放时间">{{formParam.payableExpenseTime || '-'}}</a-descriptions-item> -->
<a-descriptions-item label="状态">{{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'已完成', 4:'拒绝',5:'待提交'}[formParam?.status]}}</a-descriptions-item> <a-descriptions-item label="状态">{{{0:'待确认' ,1:'待提交' ,2:'审核中', 3:'已完成', 4:'拒绝',5:'待提交'}[formParam?.status]}}</a-descriptions-item>
<a-descriptions-item label="备注 ">{{formParam.remark || '-'}}</a-descriptions-item> <a-descriptions-item label="备注 ">{{formParam.remark || '-'}}</a-descriptions-item>
@@ -436,6 +559,7 @@
<a-button class="drabtn" @click="cancelTeachingDialog(false)" :loading="buttonLoading">取消 <a-button class="drabtn" @click="cancelTeachingDialog(false)" :loading="buttonLoading">取消
</a-button> </a-button>
</div> --> </div> -->
</div>
</a-drawer> </a-drawer>
<ImportWork v-model:showWork="showWork" :template="'讲师费导入模板'" :url="'/admin/export/importTeacherExpense'" :fileName="uploadFile" :title="title"></ImportWork> <ImportWork v-model:showWork="showWork" :template="'讲师费导入模板'" :url="'/admin/export/importTeacherExpense'" :fileName="uploadFile" :title="title"></ImportWork>
</div> </div>
@@ -584,7 +708,7 @@
// { value: '2', label: "授课 " }, // { value: '2', label: "授课 " },
{ value: '2', label: "课程开发" }, { value: '2', label: "课程开发" },
{ value: '3', label: "作业员入模培训" }, { value: '3', label: "作业员入模培训" },
{ value: '4', label: "其他" }, // { value: '4', label: "其他" },
]) ])
//课程类型 //课程类型
const OnTheJobStatusList = ref([ const OnTheJobStatusList = ref([
@@ -1075,8 +1199,9 @@ getAllLevelList().then((res) => {
} }
const formItemNames = Object.keys(rules); const formItemNames = Object.keys(rules);
for(let i=0;i<formItemNames.length;i++){ for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]); // const result = await validateField(formItemNames[i]);
if (result) { const result = state.formParam[formItemNames[i]]
if (!result) {
return message.error(rules[formItemNames[i]][0].log) return message.error(rules[formItemNames[i]][0].log)
} }
} }
@@ -1333,7 +1458,7 @@ getAllLevelList().then((res) => {
const clearscoreNumber= () => { const clearscoreNumber= () => {
state.formParam.score = state.formParam.score?.replace(/\D/g, ''); state.formParam.score = state.formParam.score?.replace(/\D/g, '');
state.formParam.score == 0 && (state.formParam.score = null); state.formParam.score == 0 && (state.formParam.score = null);
state.formParam.score > 10 && (state.formParam.score = '10'); // state.formParam.score > 10 && (state.formParam.score = '10');
} }
const payExpense = () => { const payExpense = () => {
state.formParam.payableExpense = state.formParam.payableExpense?.replace(/\D/g, ''); state.formParam.payableExpense = state.formParam.payableExpense?.replace(/\D/g, '');
@@ -1375,7 +1500,7 @@ getAllLevelList().then((res) => {
score: [{ required: true, message:'',log: ' 评分不能为空' }], score: [{ required: true, message:'',log: ' 评分不能为空' }],
levelPay: [{ required: true, message:'',log: '课酬基准不能为空' }], levelPay: [{ required: true, message:'',log: '课酬基准不能为空' }],
expense: [{ required: true, message: '',log:'计划费用不能为空' }], expense: [{ required: true, message: '',log:'计划费用不能为空' }],
payableExpense: [{ required: true, message: '',log:'应发费用不能为空' }], // payableExpense: [{ required: true, message: '',log:'应发费用不能为空' }],
} }
const handleImport = () => { const handleImport = () => {

View File

@@ -99,8 +99,9 @@
</div> </div>
</div> </div>
<!-- 抽屉 --> <!-- 抽屉 -->
<a-drawer v-model:visible="opendrawer" placement="right" <a-drawer class="largeDrawerStyle" v-model:visible="opendrawer" placement="right"
@closa="cancelTeachingDialog" :maskClosable="true" width="60%" title="查看详情"> @closa="cancelTeachingDialog" :maskClosable="true" width="60%" title="查看详情">
<div style="padding:24px;">
<a-form layout="inline"> <a-form layout="inline">
<a-form-item class="select"> <a-form-item class="select">
<a-input v-model:value="drawer.name" style="width: 260px; height: 40px; border-radius: 8px" <a-input v-model:value="drawer.name" style="width: 260px; height: 40px; border-radius: 8px"
@@ -137,6 +138,7 @@
<a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">返回 <a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">返回
</a-button> </a-button>
</div> </div>
</div>
</a-drawer> </a-drawer>
</div> </div>
</template> </template>

View File

@@ -88,140 +88,204 @@
</a-modal> </a-modal>
</div> </div>
<!-- 抽屉 --> <!-- 抽屉 -->
<a-drawer v-model:visible="teacherdialog" :closable="false" :title="false" placement="right" width="60%" :maskClosable="false" > <a-drawer class="largeDrawerStyle" v-model:visible="teacherdialog" :closable="false" :title="false" placement="right" width="60%" :maskClosable="false" >
<div class="headers" style="margin-top: -24px"> <div style="padding:24px;">
<div class="headerTitle">{{ teacherdialogtitle }}</div> <div class="headers" style="margin-top: -24px">
<img <div class="headerTitle">{{ teacherdialogtitle }}</div>
style="width: 29px; height: 29px; cursor: pointer" <img
src="@/assets/images/basicinfo/close.png" style="width: 29px; height: 29px; cursor: pointer"
@click="cancelTeacherDialog" src="@/assets/images/basicinfo/close.png"
/> @click="cancelTeacherDialog"
</div> />
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef"> </div>
<a-row :gutter="16"> <a-form :model="formParam" layout="vertical" ref="formRef">
<a-col :span="24"> <a-row :gutter="16">
<!-- <span class="line"></span><span>讲师体系基本信息</span> --> <a-col :span="24">
<!-- <span class="line"></span><span>讲师体系基本信息</span> -->
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12">
<a-form-item name="affiliationCode">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
培训发生组织编号
</template>
<a-input disabled v-model:value="formParam.affiliationCode" class="draitem"
placeholder="请输入讲师体系编号" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item name="affiliationName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
培训发生组织名称
</template>
<a-input :maxlength="30" show-count v-model:value="formParam.affiliationName" class="draitem"
placeholder="请输入培训发生组织名称" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12">
<a-form-item name="code">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
是否为根节点
</template>
<div style="display: flex;align-items: center;">
<a-radio-group style="min-width:126px;" @change="selectRadio" v-model:value="formParam.isParent" name="radioGroup">
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
</a-radio-group>
<a-select v-model:value="formParam.code" :placeholder="!formParam.isParent?'请选择审批层级':'请选择根节点'"
:options="!formParam.isParent?PlaceOfPayList:PlaceOfPayListTwo" allowClear showSearch/>
</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item name="actValue">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
组织担当
</template>
<!-- <a-select v-model:value="formParam.zzfzr" placeholder="请选择组织负责人"
:options="PlaceOfPayList" allowClear showSearch/> -->
<!-- <ProjectManager :type="0" v-model:value="formParam.actValue" :placeholder="'请选择担当'" v-model:arrayList="formParam.actArray" ></ProjectManager> -->
<AddApprover :title="'组织担当'" v-model:arrayList="formParam.actArray" @valueChange="valueChange" :type="0">
<a-select style="width:100%" v-model:value="formParam.actValue" :open="false" :placeholder="'请选择担当'"></a-select>
</AddApprover>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16" v-if="formParam.isParent">
<a-col :span="12">
<a-form-item name="leveOneValue">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
一级审批人
</template>
<!-- <a-select v-model:value="formParam.yjspr" placeholder="请选择一级审批人"
:options="PlaceOfPayList" allowClear showSearch/> -->
<!-- <ProjectManager :type="1" v-model:value="formParam.leveOneValue" :placeholder="'请选择一级审批人'" v-model:arrayList="formParam.leveOneArray" ></ProjectManager> -->
<AddApprover :title="'一级审批人'" v-model:arrayList="formParam.leveOneArray" @valueChange="valueChange" :type="1">
<a-select style="width:100%" v-model:value="formParam.leveOneValue" :open="false" :placeholder="'请选择一级审批人'"></a-select>
</AddApprover>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="二级审批人">
<!-- <a-select v-model:value="formParam.zzfzr" placeholder="请选择二级审批人"
:options="PlaceOfPayList" allowClear showSearch/> -->
<!-- <ProjectManager :type="1" :placeholder="'请选择二级审批人'" v-model:arrayList="formParam.leveTwoArray" ></ProjectManager> -->
<AddApprover :title="'二级审批人'" v-model:arrayList="formParam.leveTwoArray" @valueChange="valueChange" :type="2">
<a-select style="width:100%" v-model:value="formParam.leveTwoValue" :open="false" :placeholder="'请选择二级审批人'"></a-select>
</AddApprover>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12" v-if="formParam.isParent">
<a-form-item label="三级审批人" >
<!-- <a-select v-model:value="formParam.sjspr" placeholder="请选择三级审批人"
:options="PlaceOfPayList" allowClear showSearch/> -->
<!-- <ProjectManager :type="1" :placeholder="'请选择三级审批人'" v-model:arrayList="formParam.leveThreeArray" ></ProjectManager> -->
<AddApprover :title="'三级审批人'" v-model:arrayList="formParam.leveThreeArray" @valueChange="valueChange" :type="3">
<a-select style="width:100%" v-model:value="formParam.leveThreeValue" :open="false" :placeholder="'请选择三级审批人'"></a-select>
</AddApprover>
</a-form-item>
</a-col>
<a-col :span="12" v-if="formParam.isParent==0">
<a-form-item name="isContains">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
审批流程是否加该担当
</template>
<a-select v-model:value="formParam.isContains" placeholder="请选择审批流程是否加担当"
:options="isConSelect" allowClear showSearch/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="备注" >
<a-input v-model:value="formParam.remark" showCount :maxlength="200"
style="width: 100%; height: 40px; border-radius: 8px" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-form-item name="orglistName">
<template v-slot:label>
<img
style="margin-right:4px;width: 7px;height: 7px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
选择管理组织
</template>
<a-row :gutter="50" style="margin-bottom: 10px;">
<a-col :span="2">
<!-- <a-tag color="blue" style="line-height: 40px; ">管理业务</a-tag> -->
<a-button type="primary" @click="addContentData" style="width: 100px; height: 40px;border-radius: 8px">添加组织</a-button>
</a-col> </a-col>
<!-- <a-col :span="20">
<div class="add_content" @click="addContentData" >+</div>
</a-col> -->
</a-row> </a-row>
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="培训发生组织编号:" name="affiliationCode">
<a-input disabled v-model:value="formParam.affiliationCode" class="draitem"
placeholder="请输入讲师体系编号" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="培训发生组织名称:" name="affiliationName">
<a-input :maxlength="30" show-count v-model:value="formParam.affiliationName" class="draitem"
placeholder="请输入培训发生组织名称" allowClear showSearch>
</a-input>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="是否为根节点:" name="code">
<div style="display: flex;align-items: center;">
<a-radio-group style="min-width:126px;" @change="selectRadio" v-model:value="formParam.isParent" name="radioGroup">
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
</a-radio-group>
<a-select v-model:value="formParam.code" :placeholder="!formParam.isParent?'请选择审批层级':'请选择根节点'"
:options="!formParam.isParent?PlaceOfPayList:PlaceOfPayListTwo" allowClear showSearch/>
</div>
</a-form-item> </a-form-item>
</a-col> <!-- 备注 remark -->
<a-col :span="12"> <a-row :gutter="16" style="padding-bottom: 60px;">
<a-form-item label="组织担当:" name="actValue"> <a-col :span="24">
<!-- <a-select v-model:value="formParam.zzfzr" placeholder="请选择组织负责人" <a-form-item label="">
:options="PlaceOfPayList" allowClear showSearch/> --> <!-- <a-textarea v-model:value="formParam.remark" showCount :maxlength="200"
<!-- <ProjectManager :type="0" v-model:value="formParam.actValue" :placeholder="'请选择担当'" v-model:arrayList="formParam.actArray" ></ProjectManager> --> style="width: 100%; height: 100px; border-radius: 8px" placeholder="请输入" /> -->
<AddApprover :title="'组织担当'" v-model:arrayList="formParam.actArray" @valueChange="valueChange" :type="0"> <a-table :dataSource="formParam?.affiliationOrgList" :scroll="{ x: '600' }" :columns="orgColumns"/>
<a-select style="width:100%" v-model:value="formParam.actValue" :open="false" :placeholder="'请选择担当'"></a-select> </a-form-item>
</AddApprover> </a-col>
</a-form-item> </a-row>
</a-col> </a-form>
</a-row> <!-- 交互按钮 -->
<a-row :gutter="16" v-if="formParam.isParent"> <div
<a-col :span="12"> :style="{
<a-form-item label="一级审批人" name="leveOneValue"> position: 'absolute',
<!-- <a-select v-model:value="formParam.yjspr" placeholder="请选择一级审批人" right: 0,
:options="PlaceOfPayList" allowClear showSearch/> --> bottom: 0,
<!-- <ProjectManager :type="1" v-model:value="formParam.leveOneValue" :placeholder="'请选择一级审批人'" v-model:arrayList="formParam.leveOneArray" ></ProjectManager> --> width: '100%',
<AddApprover :title="'一级审批人'" v-model:arrayList="formParam.leveOneArray" @valueChange="valueChange" :type="1"> borderTop: '1px solid #e9e9e9',
<a-select style="width:100%" v-model:value="formParam.leveOneValue" :open="false" :placeholder="'请选择一级审批人'"></a-select> padding: '10px 16px',
</AddApprover> background: '#fff',
</a-form-item> textAlign: 'right',
</a-col> zIndex: 1,
<a-col :span="12"> } "
<a-form-item label="二级审批人"> >
<!-- <a-select v-model:value="formParam.zzfzr" placeholder="请选择二级审批人" <a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button>
:options="PlaceOfPayList" allowClear showSearch/> --> <a-button class="drabtn" type="primary" @click="createTeacherDialog(0)" :loading="buttonLoading">保存</a-button>
<!-- <ProjectManager :type="1" :placeholder="'请选择二级审批人'" v-model:arrayList="formParam.leveTwoArray" ></ProjectManager> --> <a-button v-if="editParams||editIndex>1" class="drabtn" type="primary" @click="createTeacherDialog(1)" :loading="buttonLoading">提交</a-button>
<AddApprover :title="'二级审批人'" v-model:arrayList="formParam.leveTwoArray" @valueChange="valueChange" :type="2"> </div>
<a-select style="width:100%" v-model:value="formParam.leveTwoValue" :open="false" :placeholder="'请选择二级审批人'"></a-select>
</AddApprover>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12" v-if="formParam.isParent">
<a-form-item label="三级审批人" >
<!-- <a-select v-model:value="formParam.sjspr" placeholder="请选择三级审批人"
:options="PlaceOfPayList" allowClear showSearch/> -->
<!-- <ProjectManager :type="1" :placeholder="'请选择三级审批人'" v-model:arrayList="formParam.leveThreeArray" ></ProjectManager> -->
<AddApprover :title="'三级审批人'" v-model:arrayList="formParam.leveThreeArray" @valueChange="valueChange" :type="3">
<a-select style="width:100%" v-model:value="formParam.leveThreeValue" :open="false" :placeholder="'请选择三级审批人'"></a-select>
</AddApprover>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="备注" >
<a-input v-model:value="formParam.remark" showCount :maxlength="200"
style="width: 100%; height: 40px; border-radius: 8px" placeholder="请输入" />
</a-form-item>
</a-col>
</a-row>
<a-form-item label="选择管理组织" name="orglistName">
<a-row :gutter="50" style="margin-bottom: 10px;">
<a-col :span="2">
<!-- <a-tag color="blue" style="line-height: 40px; ">管理业务</a-tag> -->
<a-button type="primary" @click="addContentData" style="width: 100px; height: 40px;border-radius: 8px">添加组织</a-button>
</a-col>
<!-- <a-col :span="20">
<div class="add_content" @click="addContentData" >+</div>
</a-col> -->
</a-row>
</a-form-item>
<!-- 备注 remark -->
<a-row :gutter="16" style="padding-bottom: 60px;">
<a-col :span="24">
<a-form-item label="">
<!-- <a-textarea v-model:value="formParam.remark" showCount :maxlength="200"
style="width: 100%; height: 100px; border-radius: 8px" placeholder="请输入" /> -->
<a-table :dataSource="formParam?.affiliationOrgList" :scroll="{ x: '600' }" :columns="orgColumns"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
<!-- 交互按钮 -->
<div
:style="{
position: 'absolute',
right: 0,
bottom: 0,
width: '100%',
borderTop: '1px solid #e9e9e9',
padding: '10px 16px',
background: '#fff',
textAlign: 'right',
zIndex: 1,
} "
>
<a-button class="drabtn" @click="cancelTeacherDialog" >取消</a-button>
<a-button class="drabtn" type="primary" @click="createTeacherDialog(0)" :loading="buttonLoading">保存</a-button>
<a-button v-if="editParams||editIndex>1" class="drabtn" type="primary" @click="createTeacherDialog(1)" :loading="buttonLoading">提交</a-button>
</div> </div>
</a-drawer> </a-drawer>
<AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" /> <AddOrgContent :Addtitle="'选择组织'" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
@@ -282,6 +346,7 @@ export default{
leveTwoArray: [], leveTwoArray: [],
leveThreeArray: [], leveThreeArray: [],
code: null, code: null,
isContains: '0',
affiliationOrgList: [], affiliationOrgList: [],
}, },
}) })
@@ -290,6 +355,10 @@ export default{
{ value: '2', label: "二级审批" }, { value: '2', label: "二级审批" },
{ value: '3', label: "三级审批" }, { value: '3', label: "三级审批" },
]) ])
const isConSelect = ref([
{ value: '1', label: "是" },
{ value: '0', label: "否" },
])
const placeData = () => { const placeData = () => {
lecturer.parentList().then(res=>{ lecturer.parentList().then(res=>{
if(res.data.code == 200){ if(res.data.code == 200){
@@ -329,14 +398,14 @@ export default{
width: 200, width: 200,
}, },
{ {
title: '根节点名称', title: '是否为根节点名称',
dataIndex: 'parentName', dataIndex: 'parentName',
key: 'parentName', key: 'parentName',
ellipsis: true, align: "center", align: "center",
width: 200, width: 200,
customRender: ({text})=>{ customRender: ({text,record})=>{
return ( return (
text || '-' text ? <div>({text})</div> : <div>({{1:'一',2:'二',3:'三'}[record.code]}级审批)</div>
) )
}, },
}, },
@@ -563,12 +632,32 @@ const getTableDate = (obj) => {
const handleModify = (record) => { const handleModify = (record) => {
lecturer.getAffiliationById(record.id).then(res=>{ lecturer.getAffiliationById(record.id).then(res=>{
console.log(res,'resssss') console.log(res,'resssss')
state.editParams = false res.data.data.status==3 && (state.editParams = false)
state.formParam = res.data.data state.formParam = res.data.data
const actArray = res.data.data.affiliationUserList.filter(item=>item.type == 0) const actArray = res.data.data.affiliationUserList.filter(item=>item.type == 0).reduce((accumulator, current) => {
const leveOneArray = res.data.data.affiliationUserList.filter(item=>item.type == 1) if (!accumulator.some(item => item.userId === current.userId)) {
const leveTwoArray = res.data.data.affiliationUserList.filter(item=>item.type == 2) accumulator.push(current);
const leveThreeArray = res.data.data.affiliationUserList.filter(item=>item.type == 3) }
return accumulator;
}, []);
const leveOneArray = res.data.data.affiliationUserList.filter(item=>item.type == 1).reduce((accumulator, current) => {
if (!accumulator.some(item => item.userId === current.userId)) {
accumulator.push(current);
}
return accumulator;
}, []);
const leveTwoArray = res.data.data.affiliationUserList.filter(item=>item.type == 2).reduce((accumulator, current) => {
if (!accumulator.some(item => item.userId === current.userId)) {
accumulator.push(current);
}
return accumulator;
}, []);
const leveThreeArray = res.data.data.affiliationUserList.filter(item=>item.type == 3).reduce((accumulator, current) => {
if (!accumulator.some(item => item.userId === current.userId)) {
accumulator.push(current);
}
return accumulator;
}, []);
state.formParam.actArray = actArray.map(item => { state.formParam.actArray = actArray.map(item => {
return { return {
label: item.userName + item.userNo, label: item.userName + item.userNo,
@@ -615,6 +704,7 @@ const getTableDate = (obj) => {
} }
}) })
}) })
state.formParam.isContains = String(state.formParam.isContains)
console.log(state.formParam.affiliationOrgList,'state.formParam.affiliationOrgList') console.log(state.formParam.affiliationOrgList,'state.formParam.affiliationOrgList')
state.teacherdialog = true; state.teacherdialog = true;
state.teacherdialogtitle = '编辑培训发生组织' state.teacherdialogtitle = '编辑培训发生组织'
@@ -643,6 +733,7 @@ const getTableDate = (obj) => {
leveTwoArray: [], leveTwoArray: [],
leveThreeArray: [], leveThreeArray: [],
code: null, code: null,
isContains: '0',
affiliationOrgList: [], affiliationOrgList: [],
} }
} }
@@ -674,10 +765,16 @@ const getTableDate = (obj) => {
state.formParam.affiliationName = state.formParam.affiliationName?.trim() state.formParam.affiliationName = state.formParam.affiliationName?.trim()
state.formParam.affiliationUserList = [...state.formParam?.actArray,...state.formParam?.leveOneArray,...state.formParam?.leveTwoArray,...state.formParam?.leveThreeArray] state.formParam.affiliationUserList = [...state.formParam?.actArray,...state.formParam?.leveOneArray,...state.formParam?.leveTwoArray,...state.formParam?.leveThreeArray]
state.formParam.orglistName = state.formParam.affiliationOrgList?.map(item=>item.id).join(',') state.formParam.orglistName = state.formParam.affiliationOrgList?.map(item=>item.id).join(',')
const formItemNames = Object.keys(rules); let formItemNames = Object.keys(rules);
if(state.formParam.isParent == 0){
formItemNames = formItemNames.filter(item=>item!='leveOneValue')
}else{
formItemNames = formItemNames.filter(item=>item!='isContains')
}
for(let i=0;i<formItemNames.length;i++){ for(let i=0;i<formItemNames.length;i++){
const result = await validateField(formItemNames[i]); // const result = await validateField(formItemNames[i]);
if (result) { const result = state.formParam[formItemNames[i]]
if (!result) {
if(formItemNames[i]=='code' && !state.formParam.isParent){ if(formItemNames[i]=='code' && !state.formParam.isParent){
return message.error(rules[formItemNames[i]][0].log2) return message.error(rules[formItemNames[i]][0].log2)
}else{ }else{
@@ -728,6 +825,7 @@ const getTableDate = (obj) => {
code: [{ required: true, message: '',log:'请选择根节点',log2:'请选择审批层级' }], code: [{ required: true, message: '',log:'请选择根节点',log2:'请选择审批层级' }],
actValue: [{ required: true, message: '',log:'请选择组织担当' }], actValue: [{ required: true, message: '',log:'请选择组织担当' }],
leveOneValue: [{ required: true, message: '',log:'请选择一级审批人' }], leveOneValue: [{ required: true, message: '',log:'请选择一级审批人' }],
isContains: [{ required: true, message: '',log:'请选择审批流程是否加担当' }],
orglistName: [{ required: true, message: '',log:'请选择管理组织' }], orglistName: [{ required: true, message: '',log:'请选择管理组织' }],
} }
@@ -751,6 +849,7 @@ const getTableDate = (obj) => {
searchSubmit, searchSubmit,
selectRadio, selectRadio,
PlaceOfPayList, PlaceOfPayList,
isConSelect,
PlaceOfPayListTwo, PlaceOfPayListTwo,
placeData, placeData,
searchReset, searchReset,