mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 23:36:46 +08:00
feat:修改面授课传参
This commit is contained in:
@@ -115,12 +115,15 @@
|
||||
<!-- 导出成绩抽屉 -->
|
||||
<EScore v-model:eScorevisible="eScorevisible" />
|
||||
</a-drawer>
|
||||
<!-- 查看答卷抽屉 -->
|
||||
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import EScore from "../ExportScore.vue";
|
||||
import CheckAnsware from '../CheckAnsware.vue'
|
||||
import * as api from '../../../api/indexTaskManage';
|
||||
|
||||
// import * as api from "../../../api/index";
|
||||
@@ -128,6 +131,7 @@ export default {
|
||||
name: "RouterExaminationManage",
|
||||
components: {
|
||||
EScore,
|
||||
CheckAnsware
|
||||
},
|
||||
props: {
|
||||
ExaminationModelVisible: {
|
||||
@@ -320,8 +324,34 @@ export default {
|
||||
className: "h",
|
||||
customRender: ({record:{finishStatus}}) => ({1:'通过',2:'未通过'}[finishStatus] || '未开始'),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "studentKid",
|
||||
key: "studentKid",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<a
|
||||
onClick={()=>{
|
||||
state.studentKid = text.record.studentKid;
|
||||
state.datasource = text.record;
|
||||
state.CAvisible = true;
|
||||
}}>
|
||||
查看答卷
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
loadingData: true
|
||||
loadingData: true,
|
||||
studentKid: '',
|
||||
CAvisible: false,
|
||||
datasource: ''
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
|
||||
@@ -348,21 +348,13 @@
|
||||
>管理</a-button
|
||||
>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="授权">
|
||||
<OwnerTableModelStudent
|
||||
:types="[10, 11, 12]"
|
||||
:id="record.offcourseId"
|
||||
<OwnerTableModelStudent :types="[10, 11, 12]" :id="record.id"
|
||||
>权限名单</OwnerTableModelStudent
|
||||
>
|
||||
<CommonStudent
|
||||
:type="10"
|
||||
:id="record.offcourseId"
|
||||
title="查看权"
|
||||
<CommonStudent :type="10" :id="record.id" title="查看权"
|
||||
>查看权</CommonStudent
|
||||
>
|
||||
<CommonStudent
|
||||
:type="11"
|
||||
:id="record.offcourseId"
|
||||
title="管理权"
|
||||
<CommonStudent :type="11" :id="record.id" title="管理权"
|
||||
>管理权</CommonStudent
|
||||
>
|
||||
</DropDown>
|
||||
@@ -3064,6 +3056,7 @@ export default defineComponent({
|
||||
findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-";
|
||||
});
|
||||
state.tableData1 = datas;
|
||||
console.log("state.tableData1", state.tableData1);
|
||||
state.tableLoading = false;
|
||||
};
|
||||
|
||||
@@ -3776,9 +3769,9 @@ export default defineComponent({
|
||||
|
||||
//编辑开课
|
||||
const handelEditStu = async (itm) => {
|
||||
console.log(itm);
|
||||
console.log("编辑开课", itm);
|
||||
|
||||
state.offcourseId = itm.offcourseId;
|
||||
state.offcourseId = itm.id;
|
||||
state.offcoursePlanId = itm.offcoursePlanId;
|
||||
|
||||
const item = await detailPlan({
|
||||
@@ -3857,7 +3850,7 @@ export default defineComponent({
|
||||
};
|
||||
const handelGuan = (itm) => {
|
||||
console.log("开课信息", itm);
|
||||
state.offcourseId = itm.offcourseId;
|
||||
state.offcourseId = itm.id;
|
||||
state.offcoursePlanId = itm.offcoursePlanId;
|
||||
state.studentId = itm.studentId;
|
||||
state.studentItem = itm;
|
||||
@@ -3937,7 +3930,7 @@ export default defineComponent({
|
||||
if (type === "1") {
|
||||
return;
|
||||
}
|
||||
state.offcourseId = itm.offcourseId;
|
||||
state.offcourseId = itm.id;
|
||||
|
||||
handle({
|
||||
offcourseId: state.offcourseId,
|
||||
@@ -4246,7 +4239,7 @@ export default defineComponent({
|
||||
if (type === "1") {
|
||||
return;
|
||||
}
|
||||
// console.log(itm)
|
||||
console.log("编辑面授课信息", itm, type);
|
||||
state.offcourseId = itm.id;
|
||||
|
||||
const item = await detail({
|
||||
@@ -4353,14 +4346,14 @@ export default defineComponent({
|
||||
if (type === "1") {
|
||||
return;
|
||||
}
|
||||
state.offcourseId = itm.offcourseId;
|
||||
state.offcourseId = itm.id;
|
||||
|
||||
state.delete_hs = true;
|
||||
state.copy_hs = true;
|
||||
};
|
||||
const handleCopyP = async (itm) => {
|
||||
console.log(itm);
|
||||
state.offcourseId = itm.offcourseId;
|
||||
state.offcourseId = itm.id;
|
||||
state.offcoursePlanId = itm.offcoursePlanId;
|
||||
|
||||
state.delete_hs = true;
|
||||
@@ -4371,7 +4364,7 @@ export default defineComponent({
|
||||
if (type === "1") {
|
||||
return;
|
||||
}
|
||||
state.offcourseId = itm.offcourseId;
|
||||
state.offcourseId = itm.id;
|
||||
|
||||
state.delete_hs = true;
|
||||
state.nouse_hs = true;
|
||||
@@ -4381,7 +4374,7 @@ export default defineComponent({
|
||||
if (type === "1") {
|
||||
return;
|
||||
}
|
||||
state.offcourseId = itm.offcourseId;
|
||||
state.offcourseId = itm.id;
|
||||
|
||||
handle({
|
||||
offcourseId: state.offcourseId,
|
||||
@@ -4494,6 +4487,7 @@ export default defineComponent({
|
||||
|
||||
// 管理开课
|
||||
const handleGuan22 = (item) => {
|
||||
console.log("点击管理信息", item);
|
||||
if (String(item.courseform) === "1") {
|
||||
return;
|
||||
}
|
||||
@@ -4508,7 +4502,7 @@ export default defineComponent({
|
||||
console.log(787666, item);
|
||||
state.faceClassification = item.contentTxt;
|
||||
state.faceStatus = item.kkty;
|
||||
state.currentFaceId = item.offcourseId;
|
||||
state.currentFaceId = item.id;
|
||||
getCourseStudentList();
|
||||
state.newCourseName = item.name;
|
||||
};
|
||||
|
||||
@@ -1,15 +1,30 @@
|
||||
<!-- 确定新建面授课弹窗 -->
|
||||
<template>
|
||||
<a-modal v-model:visible="ft_hs" title="Title" :footer="null" :closable="false"
|
||||
wrapClassName="modalStyle facteachModal" width="80%" @cancel="visibleClose" @ok="handlePush">
|
||||
<a-modal
|
||||
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" />
|
||||
<img
|
||||
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" />
|
||||
<img
|
||||
@click="noEditClose"
|
||||
style="width: 22px; height: 22px"
|
||||
src="@/assets/images/basicinfo/close22.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modalMain">
|
||||
@@ -26,14 +41,25 @@
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="asterisk_icon">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="asterisk" />
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt="asterisk"
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">课程名称</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="i1_input">
|
||||
<NameInput ref="inputRef" placeholder="请输入课程名称" v-model:value="qdms_inputV1"
|
||||
v-model:validate="validate" :maxlength="20" show-count :type="2" :id="offcourseId"></NameInput>
|
||||
<NameInput
|
||||
ref="inputRef"
|
||||
placeholder="请输入课程名称"
|
||||
v-model:value="qdms_inputV1"
|
||||
v-model:validate="validate"
|
||||
:maxlength="20"
|
||||
show-count
|
||||
:type="2"
|
||||
:id="offcourseId"
|
||||
></NameInput>
|
||||
<!-- <a-input-->
|
||||
<!-- v-model:value="qdms_inputV1"-->
|
||||
<!-- maxlength="90"-->
|
||||
@@ -53,17 +79,30 @@
|
||||
<div class="i2_left">
|
||||
<span style="color: #999ba3">课程命名规则</span>
|
||||
</div>
|
||||
<div class="i2_right" @click="hideShow" style="cursor: pointer">
|
||||
<div class="b_zk" :style="{ display: hideshow ? 'block' : 'none' }">
|
||||
<div
|
||||
class="i2_right"
|
||||
@click="hideShow"
|
||||
style="cursor: pointer"
|
||||
>
|
||||
<div
|
||||
class="b_zk"
|
||||
:style="{ display: hideshow ? 'block' : 'none' }"
|
||||
>
|
||||
<span style="color: #4ea6ff">收起</span>
|
||||
</div>
|
||||
<div class="b_sq" :style="{ display: hideshow ? 'none' : 'block' }">
|
||||
<div
|
||||
class="b_sq"
|
||||
:style="{ display: hideshow ? 'none' : 'block' }"
|
||||
>
|
||||
<span style="color: #4ea6ff">展开</span>
|
||||
</div>
|
||||
<div class="b_icon"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="i2_detail" :style="{ display: hideshow ? 'block' : 'none' }">
|
||||
<div
|
||||
class="i2_detail"
|
||||
:style="{ display: hideshow ? 'block' : 'none' }"
|
||||
>
|
||||
<span style="color: #999ba3">
|
||||
1、课程名称统一不加书名号。<br />
|
||||
2、项目名称、属地等信息如需体现在课程名称中,请放在课程名称信息
|
||||
@@ -75,17 +114,38 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mbl_items2">
|
||||
<div class="item_nam" style="margin-top: 8px;">
|
||||
<div class="item_nam" style="margin-top: 8px">
|
||||
<div class="asterisk_icon">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
<img
|
||||
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 v-for="(item, index) in optionsUrl" :key="index" class="choiceoptionurl"
|
||||
:style="item.value == feng_mian_1 ? 'border:3px solid rgb(78, 166, 255);' : ''" :src="item.value"
|
||||
:alt="item.name" @click="choicePic(item.value)" />
|
||||
<div
|
||||
style="
|
||||
width: 440px;
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<img
|
||||
v-for="(item, index) in optionsUrl"
|
||||
:key="index"
|
||||
class="choiceoptionurl"
|
||||
:style="
|
||||
item.value == feng_mian_1
|
||||
? 'border:3px solid rgb(78, 166, 255);'
|
||||
: ''
|
||||
"
|
||||
:src="item.value"
|
||||
:alt="item.name"
|
||||
@click="choicePic(item.value)"
|
||||
/>
|
||||
</div>
|
||||
<!-- <a-select
|
||||
:getPopupContainer="
|
||||
@@ -101,8 +161,13 @@
|
||||
allowClear
|
||||
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" />
|
||||
<img
|
||||
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">
|
||||
高宽比为16:9 (如:800*450) png或jpg图片
|
||||
@@ -113,14 +178,22 @@
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="asterisk_icon">
|
||||
<img style="width: 10px; height: 10px" src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
<img
|
||||
style="width: 10px; height: 10px"
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">目标人群</span>
|
||||
</div>
|
||||
<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="请输入目标人群" />
|
||||
<a-input
|
||||
v-model:value="qdms_inputV2"
|
||||
maxlength="50"
|
||||
style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入目标人群"
|
||||
/>
|
||||
<div class="inp_num">
|
||||
<span style="color: #c7cbd2">
|
||||
{{ qdms_inputV2.length }}/50
|
||||
@@ -132,49 +205,68 @@
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="asterisk_icon">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="asterisk" />
|
||||
<img
|
||||
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-tree-select style="width: 440px" placeholder="请选择内容分类" :treeDefaultExpandAll="true"
|
||||
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
|
||||
<a-tree-select
|
||||
style="width: 440px"
|
||||
placeholder="请选择内容分类"
|
||||
:treeDefaultExpandAll="true"
|
||||
:getPopupContainer="
|
||||
(triggerNode) => triggerNode.parentNode || document.body
|
||||
"
|
||||
v-model:value="fen_lei"
|
||||
:tree-data="sysTypeOptions"
|
||||
:fieldNames="{
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
value: 'code',
|
||||
}">
|
||||
}"
|
||||
>
|
||||
</a-tree-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="fen_lei" class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="asterisk_icon">
|
||||
</div>
|
||||
<div class="asterisk_icon"></div>
|
||||
<span style="margin-right: 14px"> </span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="select i6_input">
|
||||
<div style="width:440px;height:26px;font-size: 14px;color: rgb(153, 155, 163);">
|
||||
<div
|
||||
style="
|
||||
width: 440px;
|
||||
height: 26px;
|
||||
font-size: 14px;
|
||||
color: rgb(153, 155, 163);
|
||||
"
|
||||
>
|
||||
所属层级:{{ fen_lei1 }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam" style="margin-bottom:110px;">
|
||||
<div class="item_nam" style="margin-bottom: 110px">
|
||||
<span style="margin-right: 14px">课程价值</span>
|
||||
</div>
|
||||
<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="请输入课程价值" />
|
||||
<div class="inp_num" style="top:110px;">
|
||||
<span style="color: #c7cbd2;">
|
||||
<a-textarea
|
||||
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">
|
||||
{{ qdms_inputV3.length }}/200
|
||||
</span>
|
||||
</div>
|
||||
@@ -188,8 +280,12 @@
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="i1_input">
|
||||
<a-input v-model:value="chang_jin" maxlength="50"
|
||||
style="width: 440px; height: 40px; border-radius: 8px" placeholder="请输入场景" />
|
||||
<a-input
|
||||
v-model:value="chang_jin"
|
||||
maxlength="50"
|
||||
style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入场景"
|
||||
/>
|
||||
<div class="inp_num">
|
||||
<span style="color: #c7cbd2">
|
||||
{{ chang_jin.length }}/50
|
||||
@@ -214,10 +310,19 @@
|
||||
<span style="margin-right: 14px">内容标签</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<a-input v-model:value="tags_val_single" style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入内容标签按回车键添加内容标签,可添加多个内容标签。" @pressEnter="handleTagChange" />
|
||||
<a-input
|
||||
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)">
|
||||
<a-tag
|
||||
v-for="(item, index) in tags_val"
|
||||
:key="index"
|
||||
closable
|
||||
@close="handleTagClose(item)"
|
||||
>
|
||||
{{ item }}
|
||||
</a-tag>
|
||||
</div>
|
||||
@@ -225,9 +330,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb_right">
|
||||
|
||||
<!--
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam" style="margin-top:5px;">
|
||||
@@ -246,16 +349,23 @@
|
||||
-->
|
||||
|
||||
<div class="mbl_items2">
|
||||
<div class="item_nam" style="margin-top: 8px;">
|
||||
<div class="item_nam" style="margin-top: 8px">
|
||||
<div class="asterisk_icon">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="asterisk" />
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt="asterisk"
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">课程简介</span>
|
||||
</div>
|
||||
<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="请输入" />
|
||||
<a-textarea
|
||||
v-model:value="qdms_inputV6"
|
||||
maxlength="150"
|
||||
style="width: 440px; height: 100px; border-radius: 8px"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
<div class="inp_num">
|
||||
<span style="color: #c7cbd2">
|
||||
{{ qdms_inputV6.length }}/150
|
||||
@@ -265,7 +375,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam" style="margin-top: 8px;">
|
||||
<div class="item_nam" style="margin-top: 8px">
|
||||
<span style="margin-right: 10px">附件</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
@@ -273,8 +383,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="m_footer">
|
||||
<div class="fotnam">
|
||||
@@ -282,10 +390,19 @@
|
||||
</div>
|
||||
<div v-if="ft_hs" class="fotarea">
|
||||
<div style="border: 1px solid #ccc">
|
||||
<Toolbar 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" />
|
||||
<Toolbar
|
||||
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"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -315,7 +432,9 @@ import {
|
||||
defineComponent,
|
||||
ref,
|
||||
shallowRef,
|
||||
onUnmounted, computed, watch,
|
||||
onUnmounted,
|
||||
computed,
|
||||
watch,
|
||||
} from "vue";
|
||||
import { validateName } from "@/api/index1";
|
||||
import { message } from "ant-design-vue";
|
||||
@@ -327,7 +446,7 @@ import NameInput from "@/components/project/NameInput";
|
||||
import FJUpload from "@/components/common/FJUpload";
|
||||
import * as moment from "moment";
|
||||
import * as api2 from "../../api/indexAudit";
|
||||
import {useStore} from "vuex";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@@ -375,34 +494,52 @@ export default defineComponent({
|
||||
const sysTypeOptions = computed(() => store.state.content_type);
|
||||
const optionsUrl = computed(() => store.state.course_pic);
|
||||
|
||||
watch(()=>state.fen_lei,()=>{
|
||||
state.fen_lei1 = findClassFullName(sysTypeOptions.value)
|
||||
})
|
||||
watch(
|
||||
() => state.fen_lei,
|
||||
() => {
|
||||
state.fen_lei1 = findClassFullName(sysTypeOptions.value);
|
||||
}
|
||||
);
|
||||
|
||||
function findClassFullName(list,name=''){
|
||||
return list && list.length && list.map(e=>{
|
||||
return state.fen_lei === e.code ? name?name+'-'+e.name:e.name : findClassFullName(e.children,name?name+'-'+e.name:e.name)
|
||||
}).filter(name=>name).join('')
|
||||
function findClassFullName(list, name = "") {
|
||||
return (
|
||||
list &&
|
||||
list.length &&
|
||||
list
|
||||
.map((e) => {
|
||||
return state.fen_lei === e.code
|
||||
? name
|
||||
? name + "-" + e.name
|
||||
: e.name
|
||||
: findClassFullName(
|
||||
e.children,
|
||||
name ? name + "-" + e.name : e.name
|
||||
);
|
||||
})
|
||||
.filter((name) => name)
|
||||
.join("")
|
||||
);
|
||||
}
|
||||
|
||||
// 删除文件返回参数
|
||||
const changevalue = (e) => {
|
||||
let arr = state.attach.split(',')
|
||||
let newarr = []
|
||||
let arr = state.attach.split(",");
|
||||
let newarr = [];
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (i !== e) {
|
||||
newarr.push(arr[i])
|
||||
newarr.push(arr[i]);
|
||||
}
|
||||
}
|
||||
if (newarr.length == 0) {
|
||||
state.attach = "";
|
||||
} else {
|
||||
state.attach = newarr.toString()
|
||||
}
|
||||
console.log('changevalue', e, newarr, state.attach)
|
||||
state.attach = newarr.toString();
|
||||
}
|
||||
console.log("changevalue", e, newarr, state.attach);
|
||||
};
|
||||
|
||||
const visibleOpen = (offcourseId, name) => {
|
||||
console.log("offcourseId", offcourseId);
|
||||
state.offcourseId = offcourseId;
|
||||
|
||||
if (state.offcourseId) {
|
||||
@@ -428,7 +565,7 @@ export default defineComponent({
|
||||
state.ft_hs = false;
|
||||
ft_exit();
|
||||
emit("noEdit");
|
||||
}
|
||||
};
|
||||
|
||||
expose({
|
||||
visibleOpen,
|
||||
@@ -515,7 +652,7 @@ export default defineComponent({
|
||||
// 点击图片选择图片
|
||||
const choicePic = (value) => {
|
||||
state.feng_mian_1 = value;
|
||||
}
|
||||
};
|
||||
|
||||
//获取分类、场景、封面图、-----------字典配置-------------------------------
|
||||
const options2 = ref([]);
|
||||
@@ -554,14 +691,18 @@ export default defineComponent({
|
||||
files = files.slice(0, files.length - 1);
|
||||
console.log("filesfiles", files);
|
||||
|
||||
const offName = await validateName({ name: state.qdms_inputV1, type: 2, id: state.offcourseId }).then(res => {
|
||||
const offName = await validateName({
|
||||
name: state.qdms_inputV1,
|
||||
type: 2,
|
||||
id: state.offcourseId,
|
||||
}).then((res) => {
|
||||
return res.data.data == 1;
|
||||
});
|
||||
if (offName) {
|
||||
message.destroy();
|
||||
return message.warning("课程名称重复,请重新填写");
|
||||
}
|
||||
|
||||
console.log("state.offcourseId", state.offcourseId);
|
||||
const postData = {
|
||||
id: state.offcourseId, //不传代表新增
|
||||
name: state.qdms_inputV1,
|
||||
@@ -603,19 +744,16 @@ export default defineComponent({
|
||||
state.statusTingQi = 1;
|
||||
if (param === "review") {
|
||||
//新建时点击审核按钮
|
||||
submitReview(res.data.data.offcourseId);
|
||||
submitReview(res.data.data.id);
|
||||
} else {
|
||||
message.destroy();
|
||||
message.success("保存成功");
|
||||
visibleClose();
|
||||
}
|
||||
} else if (res.data.code === -1) {
|
||||
|
||||
message.destroy();
|
||||
message.success("无此操作权限");
|
||||
visibleClose();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -651,7 +789,9 @@ export default defineComponent({
|
||||
});
|
||||
if (res.rows && res.rows.length > 0) {
|
||||
let i = res.rows.length;
|
||||
state.auditDescription = res.rows[i - 1].description ? res.rows[i - 1].description : "-";
|
||||
state.auditDescription = res.rows[i - 1].description
|
||||
? res.rows[i - 1].description
|
||||
: "-";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,17 +801,19 @@ export default defineComponent({
|
||||
state.qdms_inputV3 = item.meaning;
|
||||
// state.fen_lei = item.categoryId;
|
||||
state.fen_lei = item.sysTypeId;
|
||||
state.chang_jin = String(item.sceneContent ? item.sceneContent : '');
|
||||
state.chang_jin = String(item.sceneContent ? item.sceneContent : "");
|
||||
state.tags_val = item.tips ? item.tips.split(",") : [];
|
||||
state.qdms_inputV6 = item.intro;
|
||||
state.member = { value: item.teacherId, name: item.teacher };
|
||||
valueHtml.value = item.outline;
|
||||
let arrss = item.attach.split(',')
|
||||
let str = ''
|
||||
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) + ','
|
||||
i == arrss.length - 1
|
||||
? (str += arrss[i].slice(arrss[i].lastIndexOf("/") + 1))
|
||||
: (str += arrss[i].slice(arrss[i].lastIndexOf("/") + 1) + ",");
|
||||
}
|
||||
console.log(str)
|
||||
console.log(str);
|
||||
state.attach = str;
|
||||
};
|
||||
|
||||
@@ -962,15 +1104,14 @@ export default defineComponent({
|
||||
left: 395px;
|
||||
bottom: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.fujian{
|
||||
.fujian {
|
||||
display: none;
|
||||
}
|
||||
.mbl_items12 {
|
||||
width: 440px;
|
||||
margin-right:56px;
|
||||
margin-right: 56px;
|
||||
|
||||
.i12_box1 {
|
||||
display: flex;
|
||||
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
style="cursor:pointer;color:#387DF7"
|
||||
onClick={() => {
|
||||
showProjAudit(
|
||||
value.record.projectId,
|
||||
value.record.id,
|
||||
value.record.createId,
|
||||
value.record.createName
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user