-- 内容分类

This commit is contained in:
yuping
2022-12-10 17:51:37 +08:00
parent 4b8fcc7503
commit 0133b49fdd

View File

@@ -1,29 +1,29 @@
<!-- 确定新建面授课弹窗 -->
<template>
<a-modal
v-model:visible="ft_hs"
title="Title"
:footer="null"
:closable="false"
wrapClassName="modalStyle facteachModal"
width="80%"
@cancel="visibleClose"
@ok="handlePush"
v-model:visible="ft_hs"
title="Title"
:footer="null"
:closable="false"
wrapClassName="modalStyle facteachModal"
width="80%"
@cancel="visibleClose"
@ok="handlePush"
>
<div class="modalHeader">
<div class="headerLeft">
<img
style="width: 17px; height: 18px; margin-right: 8px"
src="@/assets/images/basicinfo/add.png"
style="width: 17px; height: 18px; margin-right: 8px"
src="@/assets/images/basicinfo/add.png"
/>
<span v-if="ft_eidt" class="headerLeftText">编辑面授课</span>
<span v-else class="headerLeftText">新建面授课</span>
</div>
<div style="margin-right: 57px; cursor: pointer">
<img
@click="noEditClose"
style="width: 22px; height: 22px"
src="@/assets/images/basicinfo/close22.png"
@click="noEditClose"
style="width: 22px; height: 22px"
src="@/assets/images/basicinfo/close22.png"
/>
</div>
</div>
@@ -42,8 +42,8 @@
<div class="item_nam">
<div class="asterisk_icon">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk"
src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk"
/>
</div>
<span style="margin-right: 14px">课程名称</span>
@@ -51,10 +51,10 @@
<div class="item_inp">
<div class="i1_input">
<a-input
v-model:value="qdms_inputV1"
maxlength="90"
style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入课程名称"
v-model:value="qdms_inputV1"
maxlength="90"
style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入课程名称"
/>
<div class="inp_num">
<span style="color: #c7cbd2">
@@ -70,19 +70,19 @@
<span style="color: #999ba3">课程命名规则</span>
</div>
<div
class="i2_right"
@click="hideShow"
style="cursor: pointer"
class="i2_right"
@click="hideShow"
style="cursor: pointer"
>
<div
class="b_zk"
:style="{ display: hideshow ? 'block' : 'none' }"
class="b_zk"
:style="{ display: hideshow ? 'block' : 'none' }"
>
<span style="color: #4ea6ff">收起</span>
</div>
<div
class="b_sq"
:style="{ display: hideshow ? 'none' : 'block' }"
class="b_sq"
:style="{ display: hideshow ? 'none' : 'block' }"
>
<span style="color: #4ea6ff">展开</span>
</div>
@@ -90,14 +90,14 @@
</div>
</div>
<div
class="i2_detail"
:style="{ display: hideshow ? 'block' : 'none' }"
class="i2_detail"
:style="{ display: hideshow ? 'block' : 'none' }"
>
<span style="color: #999ba3">
1课程名称统一不加书名号<br />
1课程名称统一不加书名号<br/>
2项目名称属地等信息如需体现在课程名称中请放在课程名称信息
之后时间管理GROW180项目时间管理B*确保首先
看到的是课程内容主题<br />
看到的是课程内容主题<br/>
3同一课程如先后有多个版本原则上仅开放最新版本旧版本应停用
版本如必须以年份标明请以沟通技巧2022的方式呈现
</span>
@@ -107,15 +107,15 @@
<div class="item_nam">
<div class="asterisk_icon">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<span style="margin-right: 14px">封面图</span>
</div>
<div class="item_inp">
<div style="width:440px;height:70px;display: flex;justify-content: flex-start;align-items: center;">
<img
<img
v-for="(item, index) in optionsUrl"
:key="index"
class="choiceoptionurl"
@@ -123,7 +123,7 @@
:src="item.value"
:alt="item.label"
@click="choicePic(item.value)"
/>
/>
</div>
<!-- <a-select
:getPopupContainer="
@@ -140,11 +140,11 @@
showSearch
/> -->
<img
class="i_upload_img"
v-if="feng_mian_1"
:src="feng_mian_1"
style="width:220px;height:120px;border-radius: 8px;"
alt="avatar"
class="i_upload_img"
v-if="feng_mian_1"
:src="feng_mian_1"
style="width:220px;height:120px;border-radius: 8px;"
alt="avatar"
/>
<div class="i_bottom">
<span style="color: #999ba3">
@@ -157,9 +157,9 @@
<div class="item_nam">
<div class="asterisk_icon">
<img
style="width: 10px; height: 10px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
style="width: 10px; height: 10px"
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<span style="margin-right: 14px">目标人群</span>
@@ -167,10 +167,10 @@
<div class="item_inp">
<div class="i1_input">
<a-input
v-model:value="qdms_inputV2"
maxlength="50"
style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入目标人群"
v-model:value="qdms_inputV2"
maxlength="50"
style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入目标人群"
/>
<div class="inp_num">
<span style="color: #c7cbd2">
@@ -184,28 +184,41 @@
<div class="item_nam">
<div class="asterisk_icon">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk"
src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk"
/>
</div>
<span style="margin-right: 14px">内容分类</span>
</div>
<div class="item_inp">
<div class="select i6_input">
<a-select
:getPopupContainer="
<!-- <a-select-->
<!-- :getPopupContainer="-->
<!-- (triggerNode) => {-->
<!-- return triggerNode.parentNode || document.body;-->
<!-- }-->
<!-- "-->
<!-- v-model:value="fen_lei"-->
<!-- dropdownClassName="dropdown-style"-->
<!-- style="width: 440px"-->
<!-- placeholder="请选择"-->
<!-- :options="options2"-->
<!-- allowClear-->
<!-- showSearch-->
<!-- />-->
<a-tree-select
style="width: 440px"
placeholder="请选择内容分类"
:treeDefaultExpandAll="true"
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="fen_lei"
dropdownClassName="dropdown-style"
style="width: 440px"
placeholder="请选择"
:options="options2"
allowClear
showSearch
/>
v-model:value="fen_lei"
:tree-data="contentClassify"
>
</a-tree-select>
</div>
</div>
</div>
@@ -216,10 +229,10 @@
<div class="item_inp">
<div class="i1_input">
<a-textarea
v-model:value="qdms_inputV3"
maxlength="200"
style="width: 440px; height: 140px; border-radius: 8px"
placeholder="请输入课程价值"
v-model:value="qdms_inputV3"
maxlength="200"
style="width: 440px; height: 140px; border-radius: 8px"
placeholder="请输入课程价值"
/>
<div class="inp_num" style="top:110px;">
<span style="color: #c7cbd2;">
@@ -236,18 +249,18 @@
<div class="item_inp">
<div class="select i7_input">
<a-select
:getPopupContainer="
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="chang_jin"
dropdownClassName="dropdown-style"
style="width: 440px"
placeholder="请选择"
:options="options3"
allowClear
showSearch
v-model:value="chang_jin"
dropdownClassName="dropdown-style"
style="width: 440px"
placeholder="请选择"
:options="options3"
allowClear
showSearch
/>
</div>
</div>
@@ -258,17 +271,17 @@
</div>
<div class="item_inp">
<a-input
v-model:value="tags_val_single"
style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入内容标签按回车键添加内容标签,可添加多个内容标签。"
@pressEnter="handleTagChange"
v-model:value="tags_val_single"
style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入内容标签按回车键添加内容标签,可添加多个内容标签。"
@pressEnter="handleTagChange"
/>
<div class="tag-content">
<a-tag
v-for="(item, index) in tags_val"
:key="index"
closable
@close="handleTagClose(item)"
v-for="(item, index) in tags_val"
:key="index"
closable
@close="handleTagClose(item)"
>
{{ item }}
</a-tag>
@@ -281,8 +294,8 @@
<div class="item_nam" style="margin-top:5px;">
<div class="asterisk_icon">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk"
src="@/assets/images/coursewareManage/asterisk.png"
alt="asterisk"
/>
</div>
<!-- 授课教师1 -->
@@ -291,8 +304,8 @@
<div class="item_inp">
<div class="i1_input">
<ProjectManager
v-model:value="member.value"
v-model:name="member.name"
v-model:value="member.value"
v-model:name="member.name"
/>
</div>
</div>
@@ -304,10 +317,10 @@
<div class="item_inp">
<div class="i10_textarea">
<a-textarea
v-model:value="qdms_inputV6"
maxlength="150"
style="width: 440px; height: 100px; border-radius: 8px"
placeholder="请输入"
v-model:value="qdms_inputV6"
maxlength="150"
style="width: 440px; height: 100px; border-radius: 8px"
placeholder="请输入"
/>
<div class="inp_num">
<span style="color: #c7cbd2">
@@ -322,7 +335,7 @@
<span style="margin-right: 10px">附件</span>
</div>
<div class="item_inp">
<FJUpload v-model:value="attach" />
<FJUpload v-model:value="attach"/>
</div>
</div>
</div>
@@ -334,17 +347,17 @@
<div class="fotarea">
<div style="border: 1px solid #ccc">
<Toolbar
style="border-bottom: 1px solid #ccc"
:editor="editorRef"
:defaultConfig="toolbarConfig"
:mode="mode"
style="border-bottom: 1px solid #ccc"
:editor="editorRef"
:defaultConfig="toolbarConfig"
:mode="mode"
/>
<Editor
style="height: 250px; overflow-y: hidden"
v-model="valueHtml"
:defaultConfig="editorConfig"
:mode="mode"
@onCreated="handleCreated"
style="height: 250px; overflow-y: hidden"
v-model="valueHtml"
:defaultConfig="editorConfig"
:mode="mode"
@onCreated="handleCreated"
/>
</div>
</div>
@@ -375,16 +388,17 @@ import {
// onMounted,
onUnmounted,
} from "vue";
import { message } from "ant-design-vue";
import { edit, detail, handle } from "@/api/indexCourse";
import { fileUp } from "../../api/indexEval";
import {message} from "ant-design-vue";
import {edit, detail, handle} from "@/api/indexCourse";
import {fileUp} from "../../api/indexEval";
import * as api1 from "../../api/index1";
import "@wangeditor/editor/dist/css/style.css";
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
import {Editor, Toolbar} from "@wangeditor/editor-for-vue";
import ProjectManager from "@/components/project/ProjectManagerNew";
import FJUpload from "@/components/common/FJUpload";
import * as moment from "moment";
import * as api2 from "../../api/indexAudit";
export default defineComponent({
components: {
Editor,
@@ -392,7 +406,7 @@ export default defineComponent({
FJUpload,
ProjectManager,
},
setup(props, { expose, emit }) {
setup(props, {expose, emit}) {
const state = reactive({
hideshow: true,
ft_eidt: false,
@@ -401,7 +415,7 @@ export default defineComponent({
addLoading: false,
statusJuJue: 0,
statusTingQi: 1,
member: { name: "", value: "" },
member: {name: "", value: ""},
offcourseId: null,
qdms_inputV1: "",
@@ -415,6 +429,7 @@ export default defineComponent({
qdms_inputV6: "",
imgList: [],
auditDescription: "",
contentClassify: []
});
const visibleOpen = (offcourseId, name) => {
@@ -454,7 +469,7 @@ export default defineComponent({
state.addLoading = false;
state.statusJuJue = 0;
state.statusTingQi = 1;
state.member = { name: "", value: "" };
state.member = {name: "", value: ""};
state.offcourseId = null;
state.qdms_inputV1 = "";
@@ -468,7 +483,7 @@ export default defineComponent({
state.qdms_inputV6 = "";
state.imgList = [];
state.attach = "";
state.auditDescription="";
state.auditDescription = "";
// valueHtml.value = "";
};
@@ -493,7 +508,7 @@ export default defineComponent({
const toolbarConfig = {
excludeKeys: ["insertVideo", "insertImage"],
};
const editorConfig = { placeholder: "请输入内容...", MENU_CONF: {} };
const editorConfig = {placeholder: "请输入内容...", MENU_CONF: {}};
editorConfig.MENU_CONF["uploadImage"] = {
// 自定义上传
async customUpload(file, insertFn) {
@@ -539,52 +554,66 @@ export default defineComponent({
setCode: param,
};
api1
.getDict(obj)
.then((res) => {
console.log("获取字典成功", res);
if (res.data.code === 200) {
if (param === "faceclassPic") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictValue,
label: item.dictName,
.getDict(obj)
.then((res) => {
console.log("获取字典成功", res);
if (res.data.code === 200) {
if (param === "faceclassPic") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictValue,
label: item.dictName,
});
});
});
optionsUrl.value = newArr;
}
if (param === "faceclassClass") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
optionsUrl.value = newArr;
}
if (param === "faceclassClass") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
});
});
});
options2.value = newArr;
}
if (param === "faceclassScene") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
options2.value = newArr;
}
if (param === "faceclassScene") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
});
});
});
options3.value = newArr;
options3.value = newArr;
}
if (param === "contentClassify") {
state.contentClassify = dealDickTree(res.data.data.rows) || []
}
}
}
})
.catch((err) => {
console.log("获取字典失败", err);
});
})
.catch((err) => {
console.log("获取字典失败", err);
});
};
function dealDickTree(data, level = 1) {
return data?.filter(e => e.levelId == level).map(({dictName, dictCode}) => ({
title: dictName,
value: dictCode,
key: dictCode,
children: dealDickTree(data, dictCode)
}))
}
getDictList("faceclassClass");
getDictList("faceclassScene");
getDictList("faceclassPic");
getDictList("contentClassify");
//获取分类、场景、封面图、----------------字典配置---------------------------
const hideShow = () => {
@@ -686,8 +715,8 @@ export default defineComponent({
if (res.data.code === 200) return res.data.data;
});
if (res.rows && res.rows.length > 0) {
let i =res.rows.length;
state.auditDescription = res.rows[i-1].description?res.rows[i-1].description :"-";
let i = res.rows.length;
state.auditDescription = res.rows[i - 1].description ? res.rows[i - 1].description : "-";
}
}
@@ -699,12 +728,12 @@ export default defineComponent({
state.chang_jin = String(item.sceneId);
state.tags_val = item.tips ? item.tips.split(",") : [];
state.qdms_inputV6 = item.intro;
state.member = { value: item.teacherId, name: item.teacher };
state.member = {value: item.teacherId, name: item.teacher};
valueHtml.value = item.outline;
let arrss = item.attach.split(',')
let str =''
for(let i=0;i<arrss.length;i++){
i == arrss.length -1 ? str += arrss[i].slice(arrss[i].lastIndexOf('/')+1) : str += arrss[i].slice(arrss[i].lastIndexOf('/')+1) + ','
let str = ''
for (let i = 0; i < arrss.length; i++) {
i == arrss.length - 1 ? str += arrss[i].slice(arrss[i].lastIndexOf('/') + 1) : str += arrss[i].slice(arrss[i].lastIndexOf('/') + 1) + ','
}
console.log(str)
state.attach = str;
@@ -1171,8 +1200,8 @@ export default defineComponent({
}
.choiceoptionurl {
width:60px;
height:60px;
width: 60px;
height: 60px;
margin-right: 10px;
border-radius: 8px;
}