mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 10:56:46 +08:00
-- fix bug
This commit is contained in:
@@ -315,19 +315,23 @@
|
||||
:pagination="false"
|
||||
:scroll="{x:'max-content'}"
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<template #operation="{ record }">
|
||||
<a-space>
|
||||
<a-button v-if="(record.status===0 || record.status===-1 || !record.kkty) && checkPer(record.permissions)"
|
||||
<a-button v-if="record.auditStatus===2 && checkPer(record.permissions)"
|
||||
@click="() => handlePush(record, String(record.courseform))" type="link">发布
|
||||
</a-button>
|
||||
<a-button v-if="record.auditStatus===0 && checkPer(record.permissions)"
|
||||
@click="() => handleSubmit(record, String(record.courseform))" type="link">提交审核
|
||||
</a-button>
|
||||
<a-button v-if="(record.auditStatus===0 || record.auditStatus===-1) && checkPer(record.permissions)"
|
||||
@click="() => handleEdit(record, String(record.courseform))" type="link">编辑
|
||||
</a-button>
|
||||
<a-button v-if="record.status===2 && checkPer(record.permissions)"
|
||||
<a-button v-if="(record.auditStatus===2 || record.auditStatus===3) && checkPer(record.permissions)"
|
||||
@click="() => handleStart(record, String(record.courseform))" type="link">开课
|
||||
</a-button>
|
||||
<a-button v-if="record.status===2 && checkPer(record.permissions)"
|
||||
@click="() => handleLook(record, String(record.courseform))" type="link">查看
|
||||
<a-button @click="() => handleLook(record, String(record.courseform))" type="link">查看
|
||||
</a-button>
|
||||
<a-button v-if="record.status===2 && checkPer(record.permissions)"
|
||||
<a-button v-if="(record.auditStatus===2 || record.auditStatus===3) && checkPer(record.permissions)"
|
||||
@click="() => handleGuan22(record, String(record.courseform))" type="link">管理
|
||||
</a-button>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="授权">
|
||||
@@ -338,18 +342,13 @@
|
||||
<DropDown v-if="checkPer(record.permissions)" value="更多">
|
||||
<a-button @click="() => handleCopy(record, String(record.courseform))" type="link">复制</a-button>
|
||||
<a-button @click="() => handleRejectExit(record, String(record.courseform))" type="link">撤回</a-button>
|
||||
<a-button v-if="record.status===2 && record.kkty"
|
||||
@click="() => handleStop(record, String(record.courseform))" type="link">停用
|
||||
</a-button>
|
||||
<a-button v-if="record.status===2 && !record.kkty"
|
||||
@click="() => handleOpen(record, String(record.courseform))" type="link">启用
|
||||
</a-button>
|
||||
<a-button v-if="record.status" @click="() => handleStop(record, String(record.courseform))" type="link">停用</a-button>
|
||||
<a-button v-else @click="() => handleOpen(record, String(record.courseform))" type="link">启用</a-button>
|
||||
<a-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除
|
||||
</a-button>
|
||||
</DropDown>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="pa">
|
||||
@@ -841,7 +840,7 @@
|
||||
<div class="b_input">
|
||||
<NameInput
|
||||
maxlength="30"
|
||||
v-model:value="xjkkinputV1" v-model:validate="validate" show-count :id="offcourseId" :type="2"
|
||||
v-model:value="xjkkinputV1" v-model:validate="validate" show-count :id="offcourseId" :type="2"
|
||||
style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入开课名称"
|
||||
></NameInput>
|
||||
@@ -970,9 +969,9 @@
|
||||
<div class="signbox"></div>
|
||||
<div class="btnbox">
|
||||
<add-homework v-model:info="workInfo">
|
||||
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">
|
||||
配置作业
|
||||
</button>
|
||||
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">
|
||||
配置作业
|
||||
</button>
|
||||
</add-homework>
|
||||
<div v-if="workInfo.workName">
|
||||
<a-tag closable @close="logW" color="processing">
|
||||
@@ -987,7 +986,7 @@
|
||||
<div class="signbox"></div>
|
||||
<div class="btnbox">
|
||||
<add-test v-model:info="examInfo">
|
||||
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">配置考试</button>
|
||||
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">配置考试</button>
|
||||
</add-test>
|
||||
<div v-if="examInfo.examinationName">
|
||||
<a-tag closable @close="logT" color="processing">
|
||||
@@ -1358,7 +1357,7 @@
|
||||
<div
|
||||
class="delete"
|
||||
:style="{
|
||||
display: del_hs || copy_hs || nouse_hs ? 'block' : 'none',
|
||||
display: del_hs || copy_hs || nouse_hs || back_hs || submit_hs || useCourse || push_hs ? 'block' : 'none',
|
||||
}"
|
||||
>
|
||||
<div class="del_header"></div>
|
||||
@@ -1392,6 +1391,18 @@
|
||||
<div :style="{ display: nouse_hs ? 'block' : 'none' }">
|
||||
<span>您确定要停用此课程吗</span>
|
||||
</div>
|
||||
<div :style="{ display: submit_hs ? 'block' : 'none' }">
|
||||
<span>您确定要提交审核吗</span>
|
||||
</div>
|
||||
<div :style="{ display: back_hs ? 'block' : 'none' }">
|
||||
<span>您确定要撤回吗</span>
|
||||
</div>
|
||||
<div :style="{ display: useCourse ? 'block' : 'none' }">
|
||||
<span>您确定要启用吗</span>
|
||||
</div>
|
||||
<div :style="{ display: push_hs ? 'block' : 'none' }">
|
||||
<span>您确定要发布吗</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn1" @click="delete_exit1">
|
||||
@@ -1523,7 +1534,7 @@ import {
|
||||
newFile,
|
||||
getdateToDate,
|
||||
} from "../../utils/utils";
|
||||
import { validateName } from "@/api/index1";
|
||||
import {validateName} from "@/api/index1";
|
||||
import {fileUp} from "../../api/indexEval";
|
||||
import * as api1 from "../../api/index1";
|
||||
|
||||
@@ -1548,206 +1559,7 @@ import {checkPer} from "@/utils/utils";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
//列表表格
|
||||
const columns1 = [
|
||||
{
|
||||
title: "名称",
|
||||
width: 400,
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
ellipsis: true,
|
||||
align: "left",
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "课程编号",
|
||||
width: 130,
|
||||
dataIndex: "offcourseNumber",
|
||||
key: "offcourseNumber",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "内容分类",
|
||||
width: 130,
|
||||
dataIndex: "contentTxt",
|
||||
ellipsis: true,
|
||||
key: "contentTxt",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "课程形式",
|
||||
width: 130,
|
||||
dataIndex: "courseform",
|
||||
key: "2",
|
||||
align: "center",
|
||||
customRender: ({record}) => {
|
||||
switch (String(record.courseform)) {
|
||||
case "1":
|
||||
return "线上";
|
||||
case "2":
|
||||
return "面授";
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: " 所属项目",
|
||||
width: 250,
|
||||
dataIndex: "projectName",
|
||||
key: "3",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: " 所属路径",
|
||||
width: 250,
|
||||
dataIndex: "routerName",
|
||||
key: "3",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: " 资源归属",
|
||||
width: 250,
|
||||
dataIndex: "sourceBelongFullName",
|
||||
key: "3",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: " 目标人群",
|
||||
width: 250,
|
||||
dataIndex: "targetUser",
|
||||
key: "3",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "学习人数",
|
||||
width: 130,
|
||||
dataIndex: "studentCnt",
|
||||
key: "4",
|
||||
align: "center",
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "0";
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: "评分",
|
||||
// width: 130,
|
||||
// dataIndex: "grade",
|
||||
// key: "5",
|
||||
// align: "center",
|
||||
// customRender: ({ text }) => {
|
||||
// return text ? text : "0";
|
||||
// },
|
||||
// },
|
||||
{
|
||||
title: "状态",
|
||||
width: 130,
|
||||
dataIndex: "status",
|
||||
key: "6",
|
||||
align: "center",
|
||||
customRender: ({record}) => {
|
||||
switch (String(record.status)) {
|
||||
case "0":
|
||||
return "未提交";
|
||||
case "1":
|
||||
return "待审核";
|
||||
case "2":
|
||||
return "已审核";
|
||||
case "-1":
|
||||
return "审核未通过";
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "是否发布",
|
||||
width: 100,
|
||||
dataIndex: "ynpub",
|
||||
key: "7",
|
||||
align: "center",
|
||||
customRender: ({record}) => {
|
||||
switch (String(record.ynpub)) {
|
||||
case "0":
|
||||
return "未发布";
|
||||
case "1":
|
||||
return "已发布";
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
width: 100,
|
||||
dataIndex: "creator",
|
||||
key: "8",
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
width: 100,
|
||||
dataIndex: "createtime",
|
||||
key: "9",
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "发布时间",
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
dataIndex: "pubtime",
|
||||
key: "10",
|
||||
align: "center",
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "是否停用",
|
||||
width: 100,
|
||||
key: "either",
|
||||
dataIndex: "kkty",
|
||||
align: "center",
|
||||
customRender: ({record}) => {
|
||||
switch (String(record.kkty)) {
|
||||
case "0":
|
||||
return "停用";
|
||||
case "1":
|
||||
return "启用";
|
||||
case "-1":
|
||||
return "已删除";
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 250,
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
fixed: "right",
|
||||
align: "right",
|
||||
},
|
||||
];
|
||||
|
||||
//列表操作在线面授管理
|
||||
const columns2 = [
|
||||
{
|
||||
@@ -2152,11 +1964,207 @@ export default defineComponent({
|
||||
setup() {
|
||||
const CourseModalRef = ref(null);
|
||||
const store = useStore();
|
||||
const sysTypeOptions = computed(() => store.state.content_type);
|
||||
|
||||
const state = reactive({
|
||||
workInfo:{},
|
||||
examInfo:{},
|
||||
workInfo: {},
|
||||
examInfo: {},
|
||||
tableLoading: false,
|
||||
columns1: [
|
||||
{
|
||||
title: "名称",
|
||||
width: 400,
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
ellipsis: true,
|
||||
align: "left",
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "课程编号",
|
||||
width: 130,
|
||||
dataIndex: "offcourseNumber",
|
||||
key: "offcourseNumber",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "内容分类",
|
||||
width: 130,
|
||||
dataIndex: "contentTxt",
|
||||
ellipsis: true,
|
||||
key: "contentTxt",
|
||||
align: "center",
|
||||
customRender: ({record}) => (findClassFullName(sysTypeOptions.value, record.sysTypeId) || "-")
|
||||
},
|
||||
{
|
||||
title: "课程形式",
|
||||
width: 130,
|
||||
dataIndex: "courseform",
|
||||
key: "2",
|
||||
align: "center",
|
||||
customRender: ({record}) => {
|
||||
switch (String(record.courseform)) {
|
||||
case "1":
|
||||
return "线上";
|
||||
case "2":
|
||||
return "面授";
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: " 所属项目",
|
||||
width: 250,
|
||||
dataIndex: "projectName",
|
||||
key: "3",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: " 所属路径",
|
||||
width: 250,
|
||||
dataIndex: "routerName",
|
||||
key: "3",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: " 资源归属",
|
||||
width: 250,
|
||||
dataIndex: "sourceBelongFullName",
|
||||
key: "3",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: " 目标人群",
|
||||
width: 250,
|
||||
dataIndex: "targetUser",
|
||||
key: "3",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "学习人数",
|
||||
width: 130,
|
||||
dataIndex: "studentCnt",
|
||||
key: "4",
|
||||
align: "center",
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "0";
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: "评分",
|
||||
// width: 130,
|
||||
// dataIndex: "grade",
|
||||
// key: "5",
|
||||
// align: "center",
|
||||
// customRender: ({ text }) => {
|
||||
// return text ? text : "0";
|
||||
// },
|
||||
// },
|
||||
{
|
||||
title: "状态",
|
||||
width: 130,
|
||||
dataIndex: "auditStatus",
|
||||
key: "6",
|
||||
align: "center",
|
||||
customRender: ({record}) => {
|
||||
switch (String(record.auditStatus)) {
|
||||
case "0":
|
||||
return "未提交";
|
||||
case "1":
|
||||
return "待审核";
|
||||
case "2":
|
||||
return "已审核";
|
||||
case "3":
|
||||
return "已审核";
|
||||
case "-1":
|
||||
return "审核未通过";
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "是否发布",
|
||||
width: 100,
|
||||
dataIndex: "auditStatus",
|
||||
key: "7",
|
||||
align: "center",
|
||||
customRender: ({record}) => record.auditStatus === 3 ? '已发布' : '未发布',
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
width: 100,
|
||||
dataIndex: "createName",
|
||||
key: "8",
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
width: 100,
|
||||
dataIndex: "createTime",
|
||||
key: "9",
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
customRender: ({text}) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "发布时间",
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
dataIndex: "publishTime",
|
||||
key: "10",
|
||||
align: "center",
|
||||
customRender: ({text,auditStatus}) => {
|
||||
return auditStatus == 3 ? (text || '-') : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "是否停用",
|
||||
width: 100,
|
||||
key: "status",
|
||||
dataIndex: "status",
|
||||
align: "center",
|
||||
customRender: ({record}) => {
|
||||
switch (String(record.status)) {
|
||||
case "0":
|
||||
return "停用";
|
||||
case "1":
|
||||
return "启用";
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 250,
|
||||
dataIndex: "id",
|
||||
key: "id",
|
||||
fixed: "right",
|
||||
align: "right",
|
||||
slots: { customRender: 'operation' }
|
||||
},
|
||||
],
|
||||
//新加
|
||||
stuColumns: [
|
||||
{
|
||||
@@ -2454,6 +2462,9 @@ export default defineComponent({
|
||||
agreestudy_hs: false,
|
||||
rejectstudy_hs: false,
|
||||
delete_hs: false,
|
||||
submit_hs: false,
|
||||
push_hs: false,
|
||||
back_hs: false,
|
||||
del_hs: false,
|
||||
del_hs_stu: false,
|
||||
copy_hs: false,
|
||||
@@ -2472,6 +2483,9 @@ export default defineComponent({
|
||||
faceDetailObj: {},
|
||||
|
||||
offcourseId: null,
|
||||
temp: null,
|
||||
useCourse: false,
|
||||
stopCourse: false,
|
||||
projectName: "",
|
||||
name: "",
|
||||
createName: "",
|
||||
@@ -2730,6 +2744,27 @@ export default defineComponent({
|
||||
codeType: null, //二维码类型
|
||||
});
|
||||
|
||||
function findClassFullName(list, classify, name = "") {
|
||||
return (
|
||||
(list &&
|
||||
list.length > 0 &&
|
||||
list.map((e) =>
|
||||
classify == e.code
|
||||
? name
|
||||
? name + "-" + e.name
|
||||
: e.name
|
||||
: findClassFullName(
|
||||
e.children,
|
||||
classify,
|
||||
name ? name + "-" + e.name : e.name
|
||||
)
|
||||
)
|
||||
.filter((name) => name)
|
||||
.join("")) ||
|
||||
""
|
||||
);
|
||||
}
|
||||
|
||||
const showStuAdd = (record) => {
|
||||
state.selectCourseId = record.offcoursePlanId;
|
||||
state.shipType = 2;
|
||||
@@ -2737,7 +2772,6 @@ export default defineComponent({
|
||||
state.viewpowervisible = true;
|
||||
};
|
||||
|
||||
const sysTypeOptions = computed(() => store.state.content_type);
|
||||
|
||||
// console.log('12344', sysTypeOptions)
|
||||
|
||||
@@ -2931,7 +2965,6 @@ export default defineComponent({
|
||||
const getTableDate = async () => {
|
||||
state.tableLoading = true;
|
||||
console.log("我是点击搜索的数据", state.sysTypeId);
|
||||
// let datas = state.tableData1;
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (state.projectTime) {
|
||||
@@ -2956,66 +2989,15 @@ export default defineComponent({
|
||||
endTime: endTime,
|
||||
beginTime: startTime,
|
||||
});
|
||||
console.log("获取面授课列表", res);
|
||||
const {rows, total, pageNo} = res.data.data;
|
||||
console.log(res.data.data);
|
||||
const {rows, total} = res.data.data;
|
||||
state.tableData1 = rows;
|
||||
state.tableDataTotal1 = total;
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
rows[i].num = i + 1 + (state.currentPage1 - 1) * 10;
|
||||
}
|
||||
const datas = traverseArr(
|
||||
rows,
|
||||
{
|
||||
key: "offcourseId",
|
||||
num: "num",
|
||||
name: "name",
|
||||
content: "sysTypeId",
|
||||
courseform: "type",
|
||||
project: "projectName",
|
||||
stunum: "studentCnt",
|
||||
grade: "score",
|
||||
status: "auditStatus",
|
||||
ynpub: "publishStatus",
|
||||
creator: "createName",
|
||||
createtime: "createTime",
|
||||
pubtime: "publishTime",
|
||||
kkty: "status",
|
||||
offcourseId: "offcourseId",
|
||||
},
|
||||
true
|
||||
);
|
||||
|
||||
datas.forEach((itm) => {
|
||||
itm.pageNo = pageNo;
|
||||
itm.contentTxt =
|
||||
findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-";
|
||||
});
|
||||
state.tableData1 = datas;
|
||||
console.log("state.tableData1", state.tableData1);
|
||||
state.tableLoading = false;
|
||||
// itm.pageNo = pageNo;
|
||||
// itm.contentTxt = findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-";
|
||||
console.log("state.tableData1", state.tableData1);
|
||||
};
|
||||
|
||||
function findClassFullName(list, classify, name = "") {
|
||||
return (
|
||||
(list &&
|
||||
list.length > 0 &&
|
||||
list.map((e) =>
|
||||
classify == e.code
|
||||
? name
|
||||
? name + "-" + e.name
|
||||
: e.name
|
||||
: findClassFullName(
|
||||
e.children,
|
||||
classify,
|
||||
name ? name + "-" + e.name : e.name
|
||||
)
|
||||
)
|
||||
.filter((name) => name)
|
||||
.join("")) ||
|
||||
""
|
||||
);
|
||||
}
|
||||
|
||||
getTableDate();
|
||||
const handelChangePage1 = (page, pageSize) => {
|
||||
state.currentPage1 = page;
|
||||
@@ -3353,6 +3335,7 @@ export default defineComponent({
|
||||
// };
|
||||
// 渲染开课操作
|
||||
const getTableDate3 = async () => {
|
||||
state.tableLoading = true;
|
||||
// let datas = state.tableData6;
|
||||
let beginTime = "";
|
||||
let endTime = "";
|
||||
@@ -3381,6 +3364,7 @@ export default defineComponent({
|
||||
};
|
||||
console.log("获取开obj", obj, state.selectTime);
|
||||
let res = await planList(obj);
|
||||
state.tableLoading = false;
|
||||
console.log("开课res", res);
|
||||
const {rows, total, pageNo} = res.data.data;
|
||||
state.tableDataTotal222 = total;
|
||||
@@ -3646,22 +3630,22 @@ export default defineComponent({
|
||||
};
|
||||
//保存开课
|
||||
|
||||
const handleSureStu = async() => {
|
||||
const handleSureStu = async () => {
|
||||
let startTime,
|
||||
endTime = 0;
|
||||
if (state.xjkkinputV3) {
|
||||
startTime = dayjs(state.xjkkinputV3[0]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000);
|
||||
endTime = dayjs(state.xjkkinputV3[1]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000);
|
||||
}
|
||||
const offName = await validateName({ name: state.xjkkinputV1, type: 5 ,id:state.offcoursePlanId}).then(res => {
|
||||
console.log(res,res.data.data);
|
||||
return res.data.data === 1;
|
||||
});
|
||||
console.log('校验重复',offName)
|
||||
if (offName) {
|
||||
message.destroy();
|
||||
return message.warning("开课名称重复,请重新填写");
|
||||
}
|
||||
const offName = await validateName({name: state.xjkkinputV1, type: 5, id: state.offcoursePlanId}).then(res => {
|
||||
console.log(res, res.data.data);
|
||||
return res.data.data === 1;
|
||||
});
|
||||
console.log('校验重复', offName)
|
||||
if (offName) {
|
||||
message.destroy();
|
||||
return message.warning("开课名称重复,请重新填写");
|
||||
}
|
||||
let t = state.signCom ? "1," : "0,";
|
||||
let p = state.comLeave ? "1" : "0";
|
||||
let type = t.concat(p);
|
||||
@@ -3843,6 +3827,9 @@ export default defineComponent({
|
||||
state.delete_hs = false;
|
||||
state.del_hs = false;
|
||||
state.del_hs_stu = false;
|
||||
state.submit_hs = false;
|
||||
state.back_hs = false;
|
||||
state.push_hs = false;
|
||||
state.copy_hs = false;
|
||||
state.nouse_hs = false;
|
||||
state.rg_hs = false;
|
||||
@@ -3854,15 +3841,8 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
state.offcourseId = itm.id;
|
||||
|
||||
handle({
|
||||
offcourseId: state.offcourseId,
|
||||
type: 0,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
getTableDate();
|
||||
}
|
||||
});
|
||||
state.delete_hs = true;
|
||||
state.back_hs = true;
|
||||
};
|
||||
|
||||
const handleJoin = async () => {
|
||||
@@ -3949,12 +3929,8 @@ export default defineComponent({
|
||||
};
|
||||
//确认复制课程 操作
|
||||
const handleDeleteExit = async () => {
|
||||
state.addLoading = true;
|
||||
|
||||
if (state.del_hs) {
|
||||
console.log(11111111);
|
||||
if (state.offcourseId && state.offcoursePlanId && state.studentId) {
|
||||
console.log(111111);
|
||||
handleStudent({
|
||||
offcoursePlanId: state.offcoursePlanId,
|
||||
score: "",
|
||||
@@ -3967,7 +3943,6 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
} else if (state.offcourseId && state.offcoursePlanId) {
|
||||
console.log(2222222);
|
||||
deletePlan({
|
||||
offcoursePlanId: state.offcoursePlanId,
|
||||
}).then((res) => {
|
||||
@@ -3977,10 +3952,7 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
} else if (state.offcourseId) {
|
||||
console.log(3333333);
|
||||
handle({
|
||||
offcourseId: state.offcourseId,
|
||||
type: -1,
|
||||
handle({offcourseId: state.offcourseId, type: -1,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
message.destroy();
|
||||
@@ -3992,39 +3964,43 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
if (state.copy_hs) {
|
||||
state.tableLoading = true;
|
||||
if (state.offcourseId && state.offcoursePlanId) {
|
||||
state.tableLoading = true;
|
||||
message.success("复制成功");
|
||||
delete_exit1();
|
||||
rest();
|
||||
await copyCoursePlan({offcoursePlanId: state.offcoursePlanId})
|
||||
getTableDate3();
|
||||
} else if (state.offcourseId) {
|
||||
delete_exit1();
|
||||
rest();
|
||||
message.success("复制成功");
|
||||
state.tableLoading = true;
|
||||
await copyCourse({courseId: state.offcourseId})
|
||||
getTableDate();
|
||||
}
|
||||
message.success("复制成功");
|
||||
rest();
|
||||
}
|
||||
if (state.nouse_hs) {
|
||||
console.log(3333333333);
|
||||
if (state.offcourseId) {
|
||||
console.log(87887);
|
||||
handle({
|
||||
offcourseId: state.offcourseId,
|
||||
type: -2,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
message.destroy();
|
||||
message.success("操作成功");
|
||||
getTableDate();
|
||||
delete_exit1();
|
||||
}
|
||||
});
|
||||
}
|
||||
state.temp.auditStatus = 0
|
||||
message.success("停用成功");
|
||||
handle({offcourseId: state.offcourseId, type: -2,})
|
||||
}
|
||||
if (state.submit_hs) {
|
||||
state.tableLoading = true;
|
||||
message.success("提交审核成功");
|
||||
handle({offcourseId: state.offcourseId, type: 1}).then(() => getTableDate());
|
||||
}
|
||||
if (state.back_hs) {
|
||||
state.tableLoading = true;
|
||||
message.success("撤回成功");
|
||||
handle({offcourseId: state.offcourseId, type: 0}).then(() => getTableDate());
|
||||
}
|
||||
if (state.useCourse) {
|
||||
state.tableLoading = true;
|
||||
message.success("启用成功");
|
||||
handle({offcourseId: state.offcourseId, type: 2}).then(() => getTableDate());
|
||||
}
|
||||
if (state.push_hs) {
|
||||
state.tableLoading = true;
|
||||
message.success("发布成功");
|
||||
handle({offcourseId: state.offcourseId, type: 3}).then(() => getTableDate());
|
||||
}
|
||||
delete_exit1();
|
||||
};
|
||||
const handleDeleteKaike = (value) => {
|
||||
state.offcoursePlanId = value.id;
|
||||
@@ -4280,7 +4256,6 @@ export default defineComponent({
|
||||
state.del_hs = true;
|
||||
};
|
||||
const handleCopy = async (itm, type) => {
|
||||
console.log(itm);
|
||||
if (type === "1") {
|
||||
return;
|
||||
}
|
||||
@@ -4289,6 +4264,22 @@ export default defineComponent({
|
||||
state.delete_hs = true;
|
||||
state.copy_hs = true;
|
||||
};
|
||||
const handleSubmit = async (itm, type) => {
|
||||
if (type === "1") {
|
||||
return;
|
||||
}
|
||||
state.offcourseId = itm.id;
|
||||
state.submit_hs = true;
|
||||
state.delete_hs = true;
|
||||
};
|
||||
const handlePush = async (itm, type) => {
|
||||
if (type === "1") {
|
||||
return;
|
||||
}
|
||||
state.offcourseId = itm.id;
|
||||
state.push_hs = true;
|
||||
state.delete_hs = true;
|
||||
};
|
||||
const handleCopyP = async (itm) => {
|
||||
console.log(itm);
|
||||
state.offcourseId = itm.offcourseId;
|
||||
@@ -4297,33 +4288,23 @@ export default defineComponent({
|
||||
state.delete_hs = true;
|
||||
state.copy_hs = true;
|
||||
};
|
||||
const handleStop = async (itm, type) => {
|
||||
const handleStop = (itm, type) => {
|
||||
console.log(itm);
|
||||
if (type === "1") {
|
||||
return;
|
||||
}
|
||||
state.temp = itm;
|
||||
state.offcourseId = itm.id;
|
||||
|
||||
state.delete_hs = true;
|
||||
state.nouse_hs = true;
|
||||
};
|
||||
const handleOpen = async (itm, type) => {
|
||||
console.log(itm);
|
||||
if (type === "1") {
|
||||
return;
|
||||
}
|
||||
state.offcourseId = itm.id;
|
||||
|
||||
handle({
|
||||
offcourseId: state.offcourseId,
|
||||
type: 2,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
getTableDate();
|
||||
message.destroy();
|
||||
message.success("启用成功");
|
||||
}
|
||||
});
|
||||
state.useCourse = true;
|
||||
state.delete_hs = true;
|
||||
};
|
||||
const handleStart = (item, type) => {
|
||||
console.log(item);
|
||||
@@ -4679,6 +4660,7 @@ export default defineComponent({
|
||||
return {
|
||||
...toRefs(state),
|
||||
sysTypeOptions,
|
||||
findClassFullName,
|
||||
CourseModalRef,
|
||||
auditStudent,
|
||||
getdateToDateFn,
|
||||
@@ -4707,12 +4689,13 @@ export default defineComponent({
|
||||
handleStart,
|
||||
handleCopyP,
|
||||
handleCopy,
|
||||
handleSubmit,
|
||||
handlePush,
|
||||
handleStop,
|
||||
handleOpen,
|
||||
handleEdit,
|
||||
handleDelete,
|
||||
changevalue,
|
||||
columns1,
|
||||
columns2,
|
||||
columns4,
|
||||
columns6,
|
||||
|
||||
@@ -460,9 +460,6 @@
|
||||
<div class="btn btn6" @click="handlePush">
|
||||
<div class="btnText">保存</div>
|
||||
</div>
|
||||
<div class="btn btn6" v-if="statusTingQi == 1" @click="reviewClick">
|
||||
<div class="btnText">提交审核</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -882,7 +879,7 @@ export default defineComponent({
|
||||
intro: state.qdms_inputV6,
|
||||
attach: state.attach,
|
||||
outline: valueHtml.value,
|
||||
organizationIds: orgSelect,
|
||||
// organizationIds: orgSelect, //todo 传的不对
|
||||
jobTypeIds: selectJobId,
|
||||
bandIds: selectBandId,
|
||||
sourceBelongId: state.sourceBelongId,
|
||||
|
||||
Reference in New Issue
Block a user