mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 14:26:45 +08:00
富文本组件调整
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import http from "./config";
|
||||
//列表查询内部讲师授课记录
|
||||
export const getNewInTeacherCourseList = (obj) => http.post('/admin/teacher/getNewInTeacherCourseList', obj)
|
||||
// http://127.0.0.1:30001/admin/teacher/getTeacherCourseList
|
||||
// export const getNewInTeacherCourseList = (obj) => http.post('/admin/teacher/getNewInTeacherCourseList', obj)
|
||||
//内部讲师授课记录详情
|
||||
export const getTeacherCourseList = (obj) => http.post(`/admin/teacher/getTeacherCourseList?id=${obj}`)
|
||||
// export const getTeacherCourseList = (obj) => http.post('/admin/teacher/getTeacherCourseList', obj)
|
||||
// export const getTeacherCourseList = (obj) => http.post(`/admin/teacher/getTeacherCourseList?id=${obj}`)
|
||||
export const getTeacherCourseList = (obj) => http.post('/admin/teacher/getTeacherCourseList', obj)
|
||||
//授课记录导出
|
||||
export const getexport = (obj) => http.post('/lesson_records/export', obj)
|
||||
//授课记录导入
|
||||
|
||||
@@ -17,15 +17,28 @@
|
||||
// 富文本编辑器文档链接: https://www.wangeditor.com/v5/getting-started.html
|
||||
// 引入富文本编辑器CSS
|
||||
import '@wangeditor/editor/dist/css/style.css';
|
||||
import { onBeforeUnmount, ref, shallowRef } from 'vue';
|
||||
import { onBeforeUnmount, ref, shallowRef,watch,defineProps, defineEmits } from 'vue';
|
||||
// 导入富文本编辑器的组件
|
||||
import { Editor, Toolbar } from '@wangeditor/editor-for-vue';
|
||||
|
||||
const props = defineProps({
|
||||
value: {
|
||||
type: String,
|
||||
default: ()=>'',
|
||||
},
|
||||
});
|
||||
// 编辑器实例,必须用 shallowRef
|
||||
const editorRef = shallowRef();
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
// 内容 HTML
|
||||
const valueHtml = ref('');
|
||||
watch(()=>valueHtml.value,(val)=>{
|
||||
emit('update:value',val)
|
||||
|
||||
})
|
||||
watch(()=>props.value,(val)=>{
|
||||
valueHtml.value = val
|
||||
console.log(val,'222222222222222');
|
||||
})
|
||||
const toolbarConfig = {
|
||||
excludeKeys: [
|
||||
'insertLink', // 排除菜单组,写菜单组 key 的值即可
|
||||
|
||||
@@ -124,9 +124,9 @@
|
||||
<!-- 供应商 ,邮箱-->
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="供应商" name="levelId">
|
||||
<a-input v-model:value="formParam.levelId" class="draitem"
|
||||
placeholder="请输入供应商(未命名)" allowClear showSearch>
|
||||
<a-form-item label="供应商" name="supplier">
|
||||
<a-input v-model:value="formParam.supplier" class="draitem"
|
||||
placeholder="请输入供应商" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -556,13 +556,14 @@ export default {
|
||||
teacherIntrofuce: null,
|
||||
description:null,
|
||||
remark: null,
|
||||
id:null
|
||||
id:null,
|
||||
supplier:null,
|
||||
}
|
||||
console.log(state.formParam);
|
||||
}
|
||||
const rules = {
|
||||
name: [{ required: true, message: '讲师不能为空' }],
|
||||
|
||||
supplier:[{ required: true, message: '供应商不能为空' }],
|
||||
}
|
||||
//表格内查看数据操作
|
||||
const handleLook = (record) => {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 搜索框及按钮 -->
|
||||
<div class="filter" style="min-width: 1380px;">
|
||||
<div class="filter" >
|
||||
<a-form layout="inline">
|
||||
<a-form-item class="select">
|
||||
<!-- v-model:value="searchParam.name" -->
|
||||
@@ -386,28 +386,28 @@ export default {
|
||||
// dataIndex: 'userNo',
|
||||
// key: 'userNo',
|
||||
// elipsis: true,
|
||||
// width: 120,
|
||||
// width: 100,
|
||||
// },
|
||||
{
|
||||
title: '授课讲师 ',
|
||||
dataIndex: 'teacher',
|
||||
key: 'teacher',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '手机号码 ',
|
||||
dataIndex: 'mobile',
|
||||
key: 'mobile',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '课程类型 ',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 100,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
@@ -427,14 +427,14 @@ export default {
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '数据来源',
|
||||
dataIndex: 'entryType',
|
||||
key: 'entryType',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 100,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
@@ -453,49 +453,49 @@ export default {
|
||||
dataIndex: 'beginTime',
|
||||
key: 'beginTime',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '开课场地 ',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '内容分类',
|
||||
dataIndex: 'teaching',
|
||||
key: 'teaching',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '授课时长(H) ',
|
||||
dataIndex: 'duration',
|
||||
key: 'duration',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '参训总人数',
|
||||
dataIndex: 'studys',
|
||||
key: 'studys',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '评分',
|
||||
dataIndex: 'score',
|
||||
key: 'score',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '开课状态 ',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 100,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
@@ -516,7 +516,7 @@ export default {
|
||||
elipsis: true,
|
||||
align: "right",
|
||||
fixed: "right",
|
||||
width: 400,
|
||||
width: 200,
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
])
|
||||
|
||||
@@ -218,11 +218,11 @@
|
||||
<!-- 初始时长 、认证 -->
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="初始授课时长" name="defaultTeachingTime">
|
||||
<a-input v-model:value="formParam.defaultTeachingTime" style="width:80%; height: 40px; border-radius: 8px; " placeholder="0"
|
||||
<a-form-item label="初始授课时长" name="defaultteachingTime">
|
||||
<a-input v-model:value="formParam.defaultteachingTime" style="width:80%; height: 40px; border-radius: 8px; " placeholder="0"
|
||||
allowClear showSearch suffix="分钟">
|
||||
</a-input>
|
||||
<span style="margin-left: 5px ;" v-if="formParam.defaultTeachingTime!= null">{{ (formParam.defaultTeachingTime /60 ).toFixed(2)}}小时</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="12">
|
||||
@@ -268,8 +268,9 @@
|
||||
<!-- 工作经历 -->
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
{{ formParam.workExperience }}
|
||||
<a-form-item label="工作经历">
|
||||
<Editor v-model="formParam.workExperience "/>
|
||||
<Editor v-model:value="formParam.workExperience" :isupload="isupload"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -426,8 +427,8 @@ export default {
|
||||
formParam: {
|
||||
userNo:null,
|
||||
certStatus: 0,//认证状态
|
||||
defaultTeachingTime: '0',
|
||||
|
||||
defaultteachingTime: '0',
|
||||
vf:true
|
||||
},
|
||||
searchParam: {
|
||||
name:null,
|
||||
@@ -464,7 +465,9 @@ export default {
|
||||
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
|
||||
return false;
|
||||
}
|
||||
|
||||
watch(()=>state.formParam.workExperience,(val)=>{
|
||||
console.log(val,'11111')
|
||||
})
|
||||
let isLt1M = file.size < 2000000;
|
||||
console.log(file.size, isLt1M)
|
||||
if (!isLt1M) {
|
||||
@@ -549,6 +552,10 @@ const beforeUpload2 = (file) => {
|
||||
console.log("获取讲师", LecturerSystemList);
|
||||
})
|
||||
}
|
||||
const isupload = (val)=>{
|
||||
console.log(val,'val')
|
||||
|
||||
}
|
||||
const addContentData = () => {
|
||||
state.showContent = true
|
||||
}
|
||||
@@ -788,14 +795,14 @@ console.log( "讲师体系id" +val);
|
||||
dataIndex: 'teaching',
|
||||
key: 'teaching',
|
||||
elipsis: true, align: "center",
|
||||
width: 100,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '在职状态 ',
|
||||
dataIndex: 'waitStatus',
|
||||
key: 'waitStatus',
|
||||
elipsis: true, align: "center",
|
||||
width: 100,
|
||||
width: 120,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
@@ -814,7 +821,7 @@ console.log( "讲师体系id" +val);
|
||||
dataIndex: 'certStatus',
|
||||
key: 'certStatus',
|
||||
elipsis: true, align: "center",
|
||||
width: 100,
|
||||
width: 120,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
@@ -833,7 +840,7 @@ console.log( "讲师体系id" +val);
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
elipsis: true, align: "center",
|
||||
width: 100,
|
||||
width: 120,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
@@ -853,7 +860,7 @@ console.log( "讲师体系id" +val);
|
||||
dataIndex: 'operation',
|
||||
key: 'operation',
|
||||
elipsis: true,
|
||||
width: 400,
|
||||
width: 200,
|
||||
align: "right",
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
@@ -927,46 +934,38 @@ console.log( "讲师体系id" +val);
|
||||
};
|
||||
// 新增讲师
|
||||
const addTeacher = () => {
|
||||
cancel()
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '新增讲师'
|
||||
|
||||
state.formParam.vf=true
|
||||
}
|
||||
//修改讲师信息弹窗
|
||||
const handleModify = (record) => {
|
||||
state.teacherdialog = true;
|
||||
state.teacherdialogtitle = '修改信息'
|
||||
state.id = record.id
|
||||
state.formParam.vf=false
|
||||
TeacherSystem()
|
||||
}
|
||||
//保存
|
||||
const createTeacherDialog = () => {
|
||||
console.log(state.formParam);
|
||||
if (state.formParam.userNo != undefined) {
|
||||
updateInTeacher(state.formParam).then(response => {
|
||||
message.success("修改成功");
|
||||
});
|
||||
}
|
||||
// let objA = {...state.formParam};
|
||||
// state.formParam ={
|
||||
// name:'新增测试',
|
||||
// userNo:'12315',
|
||||
// departId:'8465784657',
|
||||
// defaultTeachingTime:50,
|
||||
// leveId:1,
|
||||
// systemid:249,
|
||||
// certStatus:1,
|
||||
// description:'测试13.00',
|
||||
// workExperience:'测试13.00',
|
||||
// courses:'测试13.00',
|
||||
console.log(state.formParam.vf)
|
||||
// if (state.formParam.vf == false) {
|
||||
// updateInTeacher(state.formParam).then(response => {
|
||||
// message.success("修改成功");
|
||||
// });
|
||||
// }
|
||||
// let a =
|
||||
// {"kid":"6B049FAF-C314-7CCF-0D28-0D23F4C42531","id":"965342027497607168","photo":"/2022/12/1057603184561385472.jpg","name":"李玉冰","systemId":null,"defaultteachingTime":"11","teaching":"420","levelId":null,"levelName":null,"certStatus":1,"description":"京东方大学学习平台管理员","workExperience":"<p>卫健委:因无法准确掌握实际数量,即日起不再公布无症状感染者数据。2、官方:在感染高风险人群、60岁以上老年人群等开展第二剂次加强免疫接种</p>","courses":null,"expertise":null,"teacherType":null,"certifyBy":null,"certifyAt":null,"certification":null,"userNo":"00004409","orgName":null,"salaryId":null,"salaryName":null,"waitStatus":"0","status":1,"mobile":null,"email":null,"remark":null,"sysupdateBy":null,"tsystemName":"D事业群"}
|
||||
// else {
|
||||
// insertTeacher(state.formParam)
|
||||
// .then((res) => {
|
||||
// message.success("保存成功");
|
||||
// }).catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
// }
|
||||
else {
|
||||
insertTeacher(state.formParam)
|
||||
.then((res) => {
|
||||
message.success("保存成功");
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
state.teacherdialog = false;
|
||||
getTableDate();
|
||||
};
|
||||
@@ -1031,7 +1030,7 @@ console.log( "讲师体系id" +val);
|
||||
// userNo:null,
|
||||
departId: null,
|
||||
tlevelId: null,
|
||||
defaultTeachingTime: 0,
|
||||
defaultteachingTime: 0,
|
||||
// levelName:null,
|
||||
// leveName:null,
|
||||
tsystemId: null,
|
||||
@@ -1041,13 +1040,14 @@ console.log( "讲师体系id" +val);
|
||||
workExperience:null,
|
||||
courses:null,
|
||||
}
|
||||
|
||||
}
|
||||
const rules = {
|
||||
name: [{ required: true, message: '讲师不能为空' }],
|
||||
departId: [{ required: true, message: '组织不能为空' }],
|
||||
tlevelId: [{ required: true, message: '讲师级别不能为空' }],
|
||||
tsystemId: [{ required: true, message: '讲师体系不能为空' }],
|
||||
defaultTeachingTime: [{ required: true, message: '授课时长不能为空' }],
|
||||
defaultteachingTime: [{ required: true, message: '授课时长不能为空' }],
|
||||
certStatus: [{ required: true, message: '认证状态不能为空' }],
|
||||
|
||||
}
|
||||
@@ -1137,6 +1137,7 @@ console.log( "讲师体系id" +val);
|
||||
infoteacherList,
|
||||
getinfoteacher,
|
||||
addContentData,
|
||||
isupload,
|
||||
AddContentList,
|
||||
beforeUpload2,
|
||||
}
|
||||
|
||||
@@ -652,7 +652,7 @@ export default {
|
||||
dataIndex: 'feeCreated',
|
||||
key: 'feeCreated',
|
||||
elipsis: true, align: "center",
|
||||
width: 120,
|
||||
width: 150,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
@@ -733,7 +733,7 @@ export default {
|
||||
let objA = { ...state.searchParam };
|
||||
objA.startDate = state.searchParam.startDate !== null ? dayjs(new Date(state.searchParam.startDate).getTime()).format("YYYY-MM-DD") : "",
|
||||
objA.endDate = state.searchParam.endDate !== null ? dayjs(new Date(state.searchParam.endDate).getTime()).format("YYYY-MM-DD") : "",
|
||||
getNewInTeacherCourseList(objA)
|
||||
getTeacherCourseList(objA)
|
||||
.then((res) => {
|
||||
tableData.value = res.data.data.records
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
:options="PlaceOfPayList">
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<!-- <a-form-item class="select " >
|
||||
<a-range-picker style="width: 260px; height: 40px; border-radius: 8px" v-model:value="searchdate" separator=""
|
||||
:placeholder="['重新汇总上月周期']" @change="searchTimeChange" />
|
||||
</a-form-item> -->
|
||||
<a-form-item class="select " >
|
||||
<a-month-picker placeholder="重新汇总上月周期" @change="onChange" style="width: 260px; height: 40px; border-radius: 8px" v-model:value="searchdate" />
|
||||
<a-date-picker style="width: 260px; height: 40px; border-radius: 8px" v-model:value="searchdate"
|
||||
:placeholder="['重新汇总上月周期']" @change="searchTimeChange" />
|
||||
</a-form-item>
|
||||
<!-- <a-form-item class="select">
|
||||
<a-month-picker placeholder="重新汇总上月周期" @change="onChange" style="width: 260px; height: 40px; border-radius: 8px" v-model:value="searchdate" />
|
||||
</a-form-item> -->
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button>
|
||||
<!-- <div class="btn btn1" @click="searchReset" style="background:rgba(64, 158, 255, 0);" > -->
|
||||
@@ -201,14 +201,15 @@ export default {
|
||||
teacherdialog: false,
|
||||
teacherdialoga: false,
|
||||
teacherdialogtitle: null,
|
||||
searchdate: null, //选择时间
|
||||
// searchdate: null, //选择时间
|
||||
startTime: null, //开始时间
|
||||
endTime: null, //结束时间
|
||||
searchParam: {
|
||||
pageNo: "1",
|
||||
pageSize: "10",
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
searchdate: null, //选择时间
|
||||
// startDate: null,
|
||||
// endDate: null,
|
||||
},
|
||||
queryFeeMonthly: {
|
||||
teacherNo: null,
|
||||
@@ -290,16 +291,10 @@ export default {
|
||||
};
|
||||
//修改时间
|
||||
const searchTimeChange = (e, date) => {
|
||||
let startTime = date[0] + " 00:00:00";
|
||||
let endTime = date[1] + " 23:59:59";
|
||||
state.startTime = new Date(startTime).getTime();
|
||||
state.endTime = new Date(endTime).getTime() ;
|
||||
// state.searchParam.startDate = new Date(startDate).getTime() ;
|
||||
// state.searchParam.endDate = new Date(endDate).getTime() ;
|
||||
state.searchParam.startDate = state.startTime? state.startTime:null,
|
||||
state.searchParam.endDate = state.endTime? state.endTime:null,
|
||||
console.log( state.searchParam.startDate ? '111' :'222')
|
||||
console.log(date, state.searchParam.startDate, state.searchParam.endDate);
|
||||
console.log(date);
|
||||
console.log(state.searchdate );
|
||||
state.searchdate =date;
|
||||
// console.log(date, state.searchParam.startDate, state.searchParam.endDate);
|
||||
};
|
||||
//二级页面搜索
|
||||
const searchFeeMonthlya = () => {
|
||||
@@ -309,10 +304,8 @@ export default {
|
||||
const getTableDate = (obj) => {
|
||||
state.tableLoading = true
|
||||
let objA = { ...state.searchParam };
|
||||
// let objA = {"pageNo":"1","pageSize":"10","startDate":'2024-06-01',"endDate":'2024-06-30'};
|
||||
|
||||
objA.startDate= state.searchParam.startDate!==null? dayjs(new Date(state.searchParam.startDate).getTime()).format("YYYY-MM-DD"): "",
|
||||
objA.endDate=state.searchParam.endDate!==null? dayjs(new Date(state.searchParam.endDate).getTime()).format("YYYY-MM-DD"): "",
|
||||
objA.searchdate=state.searchdate!==null? state.searchdate: "",
|
||||
console.log(objA)
|
||||
queryTeacherFeeTotalList(objA)
|
||||
.then((res) => {
|
||||
tableData.value = res.data.data.records
|
||||
|
||||
Reference in New Issue
Block a user