富文本组件调整

This commit is contained in:
wangxuemei
2024-08-09 16:31:41 +08:00
parent 5adb182c1f
commit 860cb821ae
7 changed files with 99 additions and 90 deletions

View File

@@ -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,
}