-- fix bug

This commit is contained in:
yuping
2023-02-24 17:04:23 +08:00
parent 40e92ffb0b
commit f00c0c4e1c
2 changed files with 332 additions and 352 deletions

View File

@@ -315,19 +315,23 @@
:pagination="false" :pagination="false"
:scroll="{x:'max-content'}" :scroll="{x:'max-content'}"
> >
<template #bodyCell="{ record, column }"> <template #operation="{ record }">
<template v-if="column.key === 'operation'">
<a-space> <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">编辑 @click="() => handleEdit(record, String(record.courseform))" type="link">编辑
</a-button> </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">开课 @click="() => handleStart(record, String(record.courseform))" type="link">开课
</a-button> </a-button>
<a-button v-if="record.status===2 && checkPer(record.permissions)" <a-button @click="() => handleLook(record, String(record.courseform))" type="link">查看
@click="() => handleLook(record, String(record.courseform))" type="link">查看
</a-button> </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">管理 @click="() => handleGuan22(record, String(record.courseform))" type="link">管理
</a-button> </a-button>
<DropDown v-if="checkPer(record.permissions)" value="授权"> <DropDown v-if="checkPer(record.permissions)" value="授权">
@@ -338,18 +342,13 @@
<DropDown v-if="checkPer(record.permissions)" value="更多"> <DropDown v-if="checkPer(record.permissions)" value="更多">
<a-button @click="() => handleCopy(record, String(record.courseform))" type="link">复制</a-button> <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 @click="() => handleRejectExit(record, String(record.courseform))" type="link">撤回</a-button>
<a-button v-if="record.status===2 && record.kkty" <a-button v-if="record.status" @click="() => handleStop(record, String(record.courseform))" type="link">停用</a-button>
@click="() => handleStop(record, String(record.courseform))" type="link"> <a-button v-else @click="() => handleOpen(record, String(record.courseform))" type="link"></a-button>
</a-button>
<a-button v-if="record.status===2 && !record.kkty"
@click="() => handleOpen(record, String(record.courseform))" type="link">启用
</a-button>
<a-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除 <a-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除
</a-button> </a-button>
</DropDown> </DropDown>
</a-space> </a-space>
</template> </template>
</template>
</a-table> </a-table>
</div> </div>
<div class="pa"> <div class="pa">
@@ -841,7 +840,7 @@
<div class="b_input"> <div class="b_input">
<NameInput <NameInput
maxlength="30" 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" style="width: 440px; height: 40px; border-radius: 8px"
placeholder="请输入开课名称" placeholder="请输入开课名称"
></NameInput> ></NameInput>
@@ -970,9 +969,9 @@
<div class="signbox"></div> <div class="signbox"></div>
<div class="btnbox"> <div class="btnbox">
<add-homework v-model:info="workInfo"> <add-homework v-model:info="workInfo">
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0"> <button class="xkbtn" style="margin-bottom: 0;margin-top: 0">
配置作业 配置作业
</button> </button>
</add-homework> </add-homework>
<div v-if="workInfo.workName"> <div v-if="workInfo.workName">
<a-tag closable @close="logW" color="processing"> <a-tag closable @close="logW" color="processing">
@@ -987,7 +986,7 @@
<div class="signbox"></div> <div class="signbox"></div>
<div class="btnbox"> <div class="btnbox">
<add-test v-model:info="examInfo"> <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> </add-test>
<div v-if="examInfo.examinationName"> <div v-if="examInfo.examinationName">
<a-tag closable @close="logT" color="processing"> <a-tag closable @close="logT" color="processing">
@@ -1358,7 +1357,7 @@
<div <div
class="delete" class="delete"
:style="{ :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> <div class="del_header"></div>
@@ -1392,6 +1391,18 @@
<div :style="{ display: nouse_hs ? 'block' : 'none' }"> <div :style="{ display: nouse_hs ? 'block' : 'none' }">
<span>您确定要停用此课程吗</span> <span>您确定要停用此课程吗</span>
</div> </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>
<div class="del_btnbox"> <div class="del_btnbox">
<div class="del_btn btn1" @click="delete_exit1"> <div class="del_btn btn1" @click="delete_exit1">
@@ -1523,7 +1534,7 @@ import {
newFile, newFile,
getdateToDate, getdateToDate,
} from "../../utils/utils"; } from "../../utils/utils";
import { validateName } from "@/api/index1"; import {validateName} from "@/api/index1";
import {fileUp} from "../../api/indexEval"; import {fileUp} from "../../api/indexEval";
import * as api1 from "../../api/index1"; import * as api1 from "../../api/index1";
@@ -1548,206 +1559,7 @@ import {checkPer} from "@/utils/utils";
import dayjs from "dayjs"; 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 = [ const columns2 = [
{ {
@@ -2152,11 +1964,207 @@ export default defineComponent({
setup() { setup() {
const CourseModalRef = ref(null); const CourseModalRef = ref(null);
const store = useStore(); const store = useStore();
const sysTypeOptions = computed(() => store.state.content_type);
const state = reactive({ const state = reactive({
workInfo:{}, workInfo: {},
examInfo:{}, examInfo: {},
tableLoading: false, 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: [ stuColumns: [
{ {
@@ -2454,6 +2462,9 @@ export default defineComponent({
agreestudy_hs: false, agreestudy_hs: false,
rejectstudy_hs: false, rejectstudy_hs: false,
delete_hs: false, delete_hs: false,
submit_hs: false,
push_hs: false,
back_hs: false,
del_hs: false, del_hs: false,
del_hs_stu: false, del_hs_stu: false,
copy_hs: false, copy_hs: false,
@@ -2472,6 +2483,9 @@ export default defineComponent({
faceDetailObj: {}, faceDetailObj: {},
offcourseId: null, offcourseId: null,
temp: null,
useCourse: false,
stopCourse: false,
projectName: "", projectName: "",
name: "", name: "",
createName: "", createName: "",
@@ -2730,6 +2744,27 @@ export default defineComponent({
codeType: null, //二维码类型 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) => { const showStuAdd = (record) => {
state.selectCourseId = record.offcoursePlanId; state.selectCourseId = record.offcoursePlanId;
state.shipType = 2; state.shipType = 2;
@@ -2737,7 +2772,6 @@ export default defineComponent({
state.viewpowervisible = true; state.viewpowervisible = true;
}; };
const sysTypeOptions = computed(() => store.state.content_type);
// console.log('12344', sysTypeOptions) // console.log('12344', sysTypeOptions)
@@ -2931,7 +2965,6 @@ export default defineComponent({
const getTableDate = async () => { const getTableDate = async () => {
state.tableLoading = true; state.tableLoading = true;
console.log("我是点击搜索的数据", state.sysTypeId); console.log("我是点击搜索的数据", state.sysTypeId);
// let datas = state.tableData1;
let startTime = ""; let startTime = "";
let endTime = ""; let endTime = "";
if (state.projectTime) { if (state.projectTime) {
@@ -2956,66 +2989,15 @@ export default defineComponent({
endTime: endTime, endTime: endTime,
beginTime: startTime, beginTime: startTime,
}); });
console.log("获取面授课列表", res); const {rows, total} = res.data.data;
const {rows, total, pageNo} = res.data.data; state.tableData1 = rows;
console.log(res.data.data);
state.tableDataTotal1 = total; 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; 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(); getTableDate();
const handelChangePage1 = (page, pageSize) => { const handelChangePage1 = (page, pageSize) => {
state.currentPage1 = page; state.currentPage1 = page;
@@ -3353,6 +3335,7 @@ export default defineComponent({
// }; // };
// 渲染开课操作 // 渲染开课操作
const getTableDate3 = async () => { const getTableDate3 = async () => {
state.tableLoading = true;
// let datas = state.tableData6; // let datas = state.tableData6;
let beginTime = ""; let beginTime = "";
let endTime = ""; let endTime = "";
@@ -3381,6 +3364,7 @@ export default defineComponent({
}; };
console.log("获取开obj", obj, state.selectTime); console.log("获取开obj", obj, state.selectTime);
let res = await planList(obj); let res = await planList(obj);
state.tableLoading = false;
console.log("开课res", res); console.log("开课res", res);
const {rows, total, pageNo} = res.data.data; const {rows, total, pageNo} = res.data.data;
state.tableDataTotal222 = total; state.tableDataTotal222 = total;
@@ -3646,22 +3630,22 @@ export default defineComponent({
}; };
//保存开课 //保存开课
const handleSureStu = async() => { const handleSureStu = async () => {
let startTime, let startTime,
endTime = 0; endTime = 0;
if (state.xjkkinputV3) { if (state.xjkkinputV3) {
startTime = dayjs(state.xjkkinputV3[0]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000); 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); 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 => { const offName = await validateName({name: state.xjkkinputV1, type: 5, id: state.offcoursePlanId}).then(res => {
console.log(res,res.data.data); console.log(res, res.data.data);
return res.data.data === 1; return res.data.data === 1;
}); });
console.log('校验重复',offName) console.log('校验重复', offName)
if (offName) { if (offName) {
message.destroy(); message.destroy();
return message.warning("开课名称重复,请重新填写"); return message.warning("开课名称重复,请重新填写");
} }
let t = state.signCom ? "1," : "0,"; let t = state.signCom ? "1," : "0,";
let p = state.comLeave ? "1" : "0"; let p = state.comLeave ? "1" : "0";
let type = t.concat(p); let type = t.concat(p);
@@ -3843,6 +3827,9 @@ export default defineComponent({
state.delete_hs = false; state.delete_hs = false;
state.del_hs = false; state.del_hs = false;
state.del_hs_stu = false; state.del_hs_stu = false;
state.submit_hs = false;
state.back_hs = false;
state.push_hs = false;
state.copy_hs = false; state.copy_hs = false;
state.nouse_hs = false; state.nouse_hs = false;
state.rg_hs = false; state.rg_hs = false;
@@ -3854,15 +3841,8 @@ export default defineComponent({
return; return;
} }
state.offcourseId = itm.id; state.offcourseId = itm.id;
state.delete_hs = true;
handle({ state.back_hs = true;
offcourseId: state.offcourseId,
type: 0,
}).then((res) => {
if (res.data.code === 200) {
getTableDate();
}
});
}; };
const handleJoin = async () => { const handleJoin = async () => {
@@ -3949,12 +3929,8 @@ export default defineComponent({
}; };
//确认复制课程 操作 //确认复制课程 操作
const handleDeleteExit = async () => { const handleDeleteExit = async () => {
state.addLoading = true;
if (state.del_hs) { if (state.del_hs) {
console.log(11111111);
if (state.offcourseId && state.offcoursePlanId && state.studentId) { if (state.offcourseId && state.offcoursePlanId && state.studentId) {
console.log(111111);
handleStudent({ handleStudent({
offcoursePlanId: state.offcoursePlanId, offcoursePlanId: state.offcoursePlanId,
score: "", score: "",
@@ -3967,7 +3943,6 @@ export default defineComponent({
} }
}); });
} else if (state.offcourseId && state.offcoursePlanId) { } else if (state.offcourseId && state.offcoursePlanId) {
console.log(2222222);
deletePlan({ deletePlan({
offcoursePlanId: state.offcoursePlanId, offcoursePlanId: state.offcoursePlanId,
}).then((res) => { }).then((res) => {
@@ -3977,10 +3952,7 @@ export default defineComponent({
} }
}); });
} else if (state.offcourseId) { } else if (state.offcourseId) {
console.log(3333333); handle({offcourseId: state.offcourseId, type: -1,
handle({
offcourseId: state.offcourseId,
type: -1,
}).then((res) => { }).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
message.destroy(); message.destroy();
@@ -3992,39 +3964,43 @@ export default defineComponent({
} }
} }
if (state.copy_hs) { if (state.copy_hs) {
state.tableLoading = true;
if (state.offcourseId && state.offcoursePlanId) { if (state.offcourseId && state.offcoursePlanId) {
state.tableLoading = true;
message.success("复制成功");
delete_exit1();
rest();
await copyCoursePlan({offcoursePlanId: state.offcoursePlanId}) await copyCoursePlan({offcoursePlanId: state.offcoursePlanId})
getTableDate3(); getTableDate3();
} else if (state.offcourseId) { } else if (state.offcourseId) {
delete_exit1();
rest();
message.success("复制成功");
state.tableLoading = true;
await copyCourse({courseId: state.offcourseId}) await copyCourse({courseId: state.offcourseId})
getTableDate(); getTableDate();
} }
message.success("复制成功");
rest();
} }
if (state.nouse_hs) { if (state.nouse_hs) {
console.log(3333333333); state.temp.auditStatus = 0
if (state.offcourseId) { message.success("停用成功");
console.log(87887); handle({offcourseId: state.offcourseId, type: -2,})
handle({
offcourseId: state.offcourseId,
type: -2,
}).then((res) => {
if (res.data.code === 200) {
message.destroy();
message.success("操作成功");
getTableDate();
delete_exit1();
}
});
}
} }
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) => { const handleDeleteKaike = (value) => {
state.offcoursePlanId = value.id; state.offcoursePlanId = value.id;
@@ -4280,7 +4256,6 @@ export default defineComponent({
state.del_hs = true; state.del_hs = true;
}; };
const handleCopy = async (itm, type) => { const handleCopy = async (itm, type) => {
console.log(itm);
if (type === "1") { if (type === "1") {
return; return;
} }
@@ -4289,6 +4264,22 @@ export default defineComponent({
state.delete_hs = true; state.delete_hs = true;
state.copy_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) => { const handleCopyP = async (itm) => {
console.log(itm); console.log(itm);
state.offcourseId = itm.offcourseId; state.offcourseId = itm.offcourseId;
@@ -4297,33 +4288,23 @@ export default defineComponent({
state.delete_hs = true; state.delete_hs = true;
state.copy_hs = true; state.copy_hs = true;
}; };
const handleStop = async (itm, type) => { const handleStop = (itm, type) => {
console.log(itm); console.log(itm);
if (type === "1") { if (type === "1") {
return; return;
} }
state.temp = itm;
state.offcourseId = itm.id; state.offcourseId = itm.id;
state.delete_hs = true; state.delete_hs = true;
state.nouse_hs = true; state.nouse_hs = true;
}; };
const handleOpen = async (itm, type) => { const handleOpen = async (itm, type) => {
console.log(itm);
if (type === "1") { if (type === "1") {
return; return;
} }
state.offcourseId = itm.id; state.offcourseId = itm.id;
state.useCourse = true;
handle({ state.delete_hs = true;
offcourseId: state.offcourseId,
type: 2,
}).then((res) => {
if (res.data.code === 200) {
getTableDate();
message.destroy();
message.success("启用成功");
}
});
}; };
const handleStart = (item, type) => { const handleStart = (item, type) => {
console.log(item); console.log(item);
@@ -4679,6 +4660,7 @@ export default defineComponent({
return { return {
...toRefs(state), ...toRefs(state),
sysTypeOptions, sysTypeOptions,
findClassFullName,
CourseModalRef, CourseModalRef,
auditStudent, auditStudent,
getdateToDateFn, getdateToDateFn,
@@ -4707,12 +4689,13 @@ export default defineComponent({
handleStart, handleStart,
handleCopyP, handleCopyP,
handleCopy, handleCopy,
handleSubmit,
handlePush,
handleStop, handleStop,
handleOpen, handleOpen,
handleEdit, handleEdit,
handleDelete, handleDelete,
changevalue, changevalue,
columns1,
columns2, columns2,
columns4, columns4,
columns6, columns6,

View File

@@ -460,9 +460,6 @@
<div class="btn btn6" @click="handlePush"> <div class="btn btn6" @click="handlePush">
<div class="btnText">保存</div> <div class="btnText">保存</div>
</div> </div>
<div class="btn btn6" v-if="statusTingQi == 1" @click="reviewClick">
<div class="btnText">提交审核</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -882,7 +879,7 @@ export default defineComponent({
intro: state.qdms_inputV6, intro: state.qdms_inputV6,
attach: state.attach, attach: state.attach,
outline: valueHtml.value, outline: valueHtml.value,
organizationIds: orgSelect, // organizationIds: orgSelect, //todo 传的不对
jobTypeIds: selectJobId, jobTypeIds: selectJobId,
bandIds: selectBandId, bandIds: selectBandId,
sourceBelongId: state.sourceBelongId, sourceBelongId: state.sourceBelongId,