Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yuping
2022-12-05 17:08:11 +08:00
18 changed files with 1696 additions and 522 deletions

View File

@@ -1319,8 +1319,9 @@
handleLook(record, String(record.courseform));
}
"
>查看</a
>
查看
</a>
<a
@click="
() => {
@@ -2439,7 +2440,10 @@
</div>
<div class="i5_right">
<div class="stmm_btn btn3">
<span style="color: #ffffff" @click="showStuAdd(currentPlanItem)">
<span
style="color: #ffffff"
@click="showStuAdd(currentPlanItem)"
>
添加学员
</span>
</div>
@@ -2919,6 +2923,12 @@
</div>
</div>
</a-modal>
<!-- 预览弹窗 -->
<SeeModal
:show="lookCourseModal"
:detail="faceDetailObj"
@cancel="ft_exit_see"
/>
<!--删除 复制 停用弹窗 -->
<!-- 学员管理课程库-归属权抽屉 -->
<!-- <own-power v-model:ownpowervisible="ownpowervisible" /> -->
@@ -3031,6 +3041,8 @@ import "@wangeditor/editor/dist/css/style.css";
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
import ProjectManager from "@/components/project/ProjectManager";
// import SeeModal from "./components/seeModal.vue";
//列表表格
const columns1 = [
{
@@ -3668,6 +3680,9 @@ export default defineComponent({
ownpowervisible: false,
corpowerlistvisible: false,
lookCourseModal: false,
faceDetailObj: null,
offcourseId: null,
projectName: "",
name: "",
@@ -3776,12 +3791,35 @@ export default defineComponent({
const valueHtml = ref("");
// // 模拟 ajax 异步获取内容
onMounted(() => {
// setTimeout(() => {
// valueHtml.value = "<p>模拟 Ajax 异步设置内容</p>";
// }, 1500);
// setTimeout(() => {
// // valueHtml.value = "<p>模拟 Ajax 异步设置内容</p>";
// console.log("toolbar222222222222222");
// console.log(editorRef.value);
// // const toolbar = DomEditor.getToolbar(editorRef.value);
// // const menu = editorRef.value.getAllMenuKeys();
// // const bar = toolbar.getConfig().toolbarKeys;
// // console.log(menu);
// // console.log(bar);
// }, 3500);
});
const toolbarConfig = {};
const editorConfig = { placeholder: "请输入内容..." };
const toolbarConfig = {
excludeKeys: ["insertVideo", "insertImage"],
};
const editorConfig = { placeholder: "请输入内容...", MENU_CONF: {} };
editorConfig.MENU_CONF["uploadImage"] = {
// 自定义上传
async customUpload(file, insertFn) {
const formData = new FormData();
formData.append("file", file);
fileUp(formData).then((res) => {
if (res.data.code === 200) {
// 最后插入图片
insertFn(res.data.data, file.name, res.data.data);
}
});
},
};
// 组件销毁时,也及时销毁编辑器
onBeforeUnmount(() => {
const editor = editorRef.value;
@@ -4746,9 +4784,12 @@ export default defineComponent({
score: state.lrcj_inputV1,
studentIds: [state.studentId],
type: 1,
}).then((res) => {
if (res.data.code === 200) {
getTableDate2();
delete_exit1();
}
});
getTableDate2();
delete_exit1();
}
}
};
@@ -4759,9 +4800,12 @@ export default defineComponent({
score: "",
studentIds: [state.studentId],
type: 2,
}).then((res) => {
if (res.data.code === 200) {
getTableDate2();
delete_exit1();
}
});
getTableDate2();
delete_exit1();
}
};
//确认复制
@@ -4772,10 +4816,13 @@ export default defineComponent({
score: "",
studentIds: [state.studentId],
type: 3,
}).then((res) => {
if (res.data.code === 200) {
getTableDate2();
delete_exit1();
state.addLoading = false;
}
});
getTableDate2();
delete_exit1();
state.addLoading = false;
}
if (state.rejectstudy_hs) {
handleStudent({
@@ -4783,9 +4830,12 @@ export default defineComponent({
score: "",
studentIds: [state.studentId],
type: 4,
}).then((res) => {
if (res.data.code === 200) {
getTableDate2();
delete_exit1();
}
});
getTableDate2();
delete_exit1();
}
};
//确认复制课程
@@ -4801,16 +4851,22 @@ export default defineComponent({
score: "",
studentIds: [state.studentId],
type: 5,
}).then((res) => {
if (res.data.code === 200) {
getTableDate2();
delete_exit1();
}
});
getTableDate2();
delete_exit1();
} else if (state.offcourseId && state.offcoursePlanId) {
console.log(2222222);
deletePlan({
offcoursePlanId: state.offcoursePlanId,
}).then((res) => {
if (res.data.code === 200) {
getTableDate3();
delete_exit1();
}
});
getTableDate3();
delete_exit1();
} else if (state.offcourseId) {
console.log(3333333);
handle({
@@ -5045,8 +5101,24 @@ export default defineComponent({
state.ft_eidt = true;
};
// 预览弹框 开启和关闭
// 内容分类 场景 -- 目前直接写死的
const sceneist11 = [
{ dictCode: "6", dictValue: "场景一" },
{ dictCode: "7", dictValue: "场景二" },
];
const contentList11 = [
{ dictCode: "8", dictValue: "分类一" },
{ dictCode: "5", dictValue: "分类二" },
];
// const heroImg = ref(null);
// // const valueHtmlRef = ref(null);
// const attachMap = ref([]);
const ft_exit_see = () => {
state.lookCourseModal = false;
};
const handleLook = async (itm, type) => {
state.isEdit = 0;
// state.isEdit = 0;
console.log(45555);
console.log(itm);
if (type === "1") {
@@ -5059,40 +5131,44 @@ export default defineComponent({
}).then((res) => {
if (res.data.code === 200) return res.data.data;
});
console.log("res");
state.lookCourseModal = true;
state.faceDetailObj = item;
// heroImg.value.src = item.picUrl;
// valueHtmlRef.value = item.outline;
// attachMap.value = item.attach == "" ? [] : item.attach.split(",");
console.log("res222222222");
console.log(item);
console.log(options2.value);
console.log(options3.value);
console.log(state.lookCourseModal);
state.qdms_inputV1 = item.name;
state.imageUrl = item.picUrl;
state.qdms_inputV2 = item.targetUser;
state.qdms_inputV3 = item.meaning;
state.fen_lei = String(item.categoryId);
state.chang_jin = String(item.sceneId);
state.tags_val = item.tips ? item.tips.split(",") : [];
//state.qdms_inputV5 = item.teacherId;
state.teacher = item.teacher;
state.teacherId = item.teacherId;
state.qdms_inputV6 = item.intro;
state.member = { value: item.teacherId, name: item.teacher };
// state.qdms_inputV1 = item.name;
// state.imageUrl = item.picUrl;
// state.qdms_inputV2 = item.targetUser;
// state.qdms_inputV3 = item.meaning;
// state.fen_lei = String(item.categoryId);
// state.chang_jin = String(item.sceneId);
// state.tags_val = item.tips ? item.tips.split(",") : [];
// //state.qdms_inputV5 = item.teacherId;
// state.teacher = item.teacher;
// state.teacherId = item.teacherId;
// state.qdms_inputV6 = item.intro;
// state.member = { value: item.teacherId, name: item.teacher };
if (item.attach == "") {
state.imgList = [];
} else {
if (item.attach.indexOf(",")) {
const arr = item.attach.split(",");
arr.forEach((item) => {
state.imgList.push({ img: item });
});
} else {
state.imgList = [{ img: item.attach }];
}
}
// if (item.attach == "") {
// state.imgList = [];
// } else {
// if (item.attach.indexOf(",")) {
// const arr = item.attach.split(",");
// arr.forEach((item) => {
// state.imgList.push({ img: item });
// });
// } else {
// state.imgList = [{ img: item.attach }];
// }
// }
valueHtml.value = item.outline;
// valueHtml.value = item.outline;
state.lookMs = true;
// state.lookMs = true;
};
// const handleTea = async () => {
// console.log("item22224444");
@@ -5339,8 +5415,8 @@ export default defineComponent({
//管理权
const showManagePrower = (record) => {
// console.log("record", record);
console.log(22222222)
console.log(record)
console.log(22222222);
console.log(record);
state.selectCourseId = record.offcourseId;
state.shipType = 1;
state.authClassify = 2;
@@ -5463,6 +5539,9 @@ export default defineComponent({
ckxq_hs,
ftsr_exit,
stm_exit,
ft_exit_see,
contentList11,
sceneist11,
createkk,
handleCancelStu,
handleSureStu,
@@ -8015,4 +8094,12 @@ export default defineComponent({
// }
// }
// }
// ::v-deep .w-e-toolbar {
// .w-e-bar-item {
// &:nth-child(23) {
// display: none !important;
// }
// }
// }
</style>