mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-20 08:16:46 +08:00
feat:修改面授课封面图编辑
This commit is contained in:
@@ -315,36 +315,109 @@
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
>
|
||||
<template #operation="{ text,record,index }">
|
||||
<template #operation="{ text, record, index }">
|
||||
<a-space>
|
||||
<a-button v-if="record.auditStatus===2 && checkPer(record.permissions)"
|
||||
@click="() => handlePush(text,index)" type="link">发布
|
||||
<a-button
|
||||
v-if="record.auditStatus === 2 && checkPer(record.permissions)"
|
||||
@click="() => handlePush(text, index)"
|
||||
type="link"
|
||||
>发布
|
||||
</a-button>
|
||||
<a-button v-if="record.auditStatus===0 && checkPer(record.permissions)"
|
||||
@click="() => handleSubmit(text,index)" type="link">提交审核
|
||||
<a-button
|
||||
v-if="record.auditStatus === 0 && checkPer(record.permissions)"
|
||||
@click="() => handleSubmit(text, index)"
|
||||
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
|
||||
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.auditStatus===2 || record.auditStatus===3) && checkPer(record.permissions)"
|
||||
@click="() => handleStart(record, String(record.courseform))" type="link">开课
|
||||
<!-- <a-button
|
||||
@click="() => handleEdit(record, String(record.courseform))"
|
||||
type="link"
|
||||
>编辑
|
||||
</a-button> -->
|
||||
<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 @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.auditStatus===2 || record.auditStatus===3) && checkPer(record.permissions)"
|
||||
@click="() => handleGuan22(record, String(record.courseform))" type="link">管理
|
||||
<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="授权">
|
||||
<OwnerTableModelStudent :types="[10,11,12]" :id="record.offcourseId">权限名单</OwnerTableModelStudent>
|
||||
<CommonStudent :type="10" :id="record.offcourseId" title="查看权">查看权</CommonStudent>
|
||||
<CommonStudent :type="11" :id="record.offcourseId" title="管理权">管理权</CommonStudent>
|
||||
<OwnerTableModelStudent
|
||||
:types="[10, 11, 12]"
|
||||
:id="record.offcourseId"
|
||||
>权限名单</OwnerTableModelStudent
|
||||
>
|
||||
<CommonStudent :type="10" :id="record.offcourseId" title="查看权"
|
||||
>查看权</CommonStudent
|
||||
>
|
||||
<CommonStudent :type="11" :id="record.offcourseId" title="管理权"
|
||||
>管理权</CommonStudent
|
||||
>
|
||||
</DropDown>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="更多">
|
||||
<a-button @click="() => handleCopy(text)" type="link">复制</a-button>
|
||||
<a-button v-if="(record.auditStatus===3 || record.auditStatus===2) && record.status && checkPer(record.permissions)" @click="() => handleRejectExit(text, index ,record)" type="link">撤回</a-button>
|
||||
<a-button v-if="record.auditStatus===3 && record.status && checkPer(record.permissions)" @click="() => handleStop(text, index)" type="link">停用</a-button>
|
||||
<a-button v-if="record.auditStatus===3 && !record.status && checkPer(record.permissions)" @click="() => handleOpen(text, index)" type="link">启用</a-button>
|
||||
<a-button @click="() => handleDelete(text, index)" type="link" danger>删除
|
||||
<a-button @click="() => handleCopy(text)" type="link"
|
||||
>复制</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="
|
||||
(record.auditStatus === 3 || record.auditStatus === 2) &&
|
||||
record.status &&
|
||||
checkPer(record.permissions)
|
||||
"
|
||||
@click="() => handleRejectExit(text, index, record)"
|
||||
type="link"
|
||||
>撤回</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="
|
||||
record.auditStatus === 3 &&
|
||||
record.status &&
|
||||
checkPer(record.permissions)
|
||||
"
|
||||
@click="() => handleStop(text, index)"
|
||||
type="link"
|
||||
>停用</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="
|
||||
record.auditStatus === 3 &&
|
||||
!record.status &&
|
||||
checkPer(record.permissions)
|
||||
"
|
||||
@click="() => handleOpen(text, index)"
|
||||
type="link"
|
||||
>启用</a-button
|
||||
>
|
||||
<a-button
|
||||
@click="() => handleDelete(text, index)"
|
||||
type="link"
|
||||
danger
|
||||
>删除
|
||||
</a-button>
|
||||
</DropDown>
|
||||
</a-space>
|
||||
@@ -2231,8 +2304,8 @@ export default defineComponent({
|
||||
dataIndex: "publishTime",
|
||||
key: "10",
|
||||
align: "center",
|
||||
customRender: ({text, auditStatus}) => {
|
||||
return auditStatus == 3 ? (text || '-') : "-";
|
||||
customRender: ({ text, auditStatus }) => {
|
||||
return auditStatus == 3 ? text || "-" : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -2241,7 +2314,8 @@ export default defineComponent({
|
||||
key: "status",
|
||||
dataIndex: "status",
|
||||
align: "center",
|
||||
customRender: ({record}) => (record.auditStatus === 3 ? (record.status?'启用':'停用'): '-')
|
||||
customRender: ({ record }) =>
|
||||
record.auditStatus === 3 ? (record.status ? "启用" : "停用") : "-",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
@@ -2250,7 +2324,7 @@ export default defineComponent({
|
||||
key: "id",
|
||||
fixed: "right",
|
||||
align: "right",
|
||||
slots: {customRender: 'operation'}
|
||||
slots: { customRender: "operation" },
|
||||
},
|
||||
],
|
||||
//新加
|
||||
@@ -2869,9 +2943,7 @@ export default defineComponent({
|
||||
// 内容 HTML
|
||||
const valueHtml = ref("");
|
||||
// // 模拟 ajax 异步获取内容
|
||||
onMounted(() => {
|
||||
|
||||
});
|
||||
onMounted(() => {});
|
||||
|
||||
const toolbarConfig = {
|
||||
excludeKeys: ["insertVideo", "insertImage"],
|
||||
@@ -3815,7 +3887,7 @@ export default defineComponent({
|
||||
//是否允许未报名的签到:1是0否
|
||||
state.xjkkradioV1 = 0;
|
||||
}
|
||||
state.member = {value: item.teacherId, name: item.teacher};
|
||||
state.member = { value: item.teacherId, name: item.teacher };
|
||||
state.cstm_hs = true;
|
||||
state.kk_eidt = true;
|
||||
};
|
||||
@@ -3900,14 +3972,17 @@ export default defineComponent({
|
||||
state.graduate_hs = false;
|
||||
state.addLoading = false;
|
||||
};
|
||||
const handleRejectExit = (id, index,record) => {
|
||||
const handleRejectExit = (id, index, record) => {
|
||||
dialog({
|
||||
content: '确定撤回吗?'
|
||||
, ok: () => {
|
||||
content: "确定撤回吗?",
|
||||
ok: () => {
|
||||
message.success("撤回成功");
|
||||
record.auditStatus === 3 ? (state.tableData1[index].auditStatus = 2) : (state.tableData1[index].auditStatus = 0)
|
||||
handle({offcourseId: id, type: 0})
|
||||
}})
|
||||
record.auditStatus === 3
|
||||
? (state.tableData1[index].auditStatus = 2)
|
||||
: (state.tableData1[index].auditStatus = 0);
|
||||
handle({ offcourseId: id, type: 0 });
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const handleJoin = async () => {
|
||||
@@ -4018,7 +4093,8 @@ export default defineComponent({
|
||||
});
|
||||
} else if (state.offcourseId) {
|
||||
handle({
|
||||
offcourseId: state.offcourseId, type: -1,
|
||||
offcourseId: state.offcourseId,
|
||||
type: -1,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
message.destroy();
|
||||
@@ -4321,44 +4397,47 @@ export default defineComponent({
|
||||
// };
|
||||
const handleDelete = (id) => {
|
||||
dialog({
|
||||
content: '确定删除该课程吗?'
|
||||
, ok: async () => {
|
||||
content: "确定删除该课程吗?",
|
||||
ok: async () => {
|
||||
message.success("删除成功");
|
||||
state.tableLoading = true
|
||||
await handle({offcourseId: id,type:-1})
|
||||
state.tableLoading = true;
|
||||
await handle({ offcourseId: id, type: -1 });
|
||||
getTableDate();
|
||||
}})
|
||||
},
|
||||
});
|
||||
};
|
||||
const handleCopy = async (id) => {
|
||||
dialog({
|
||||
content: '确定复制该课程吗?'
|
||||
, ok: async () => {
|
||||
content: "确定复制该课程吗?",
|
||||
ok: async () => {
|
||||
message.success("复制成功");
|
||||
state.tableLoading = true
|
||||
await copyCourse({offcourseId: id})
|
||||
state.tableLoading = true;
|
||||
await copyCourse({ offcourseId: id });
|
||||
getTableDate();
|
||||
}})
|
||||
},
|
||||
});
|
||||
};
|
||||
const handleSubmit = (id, index) => {
|
||||
dialog({
|
||||
content: '确定提交审核吗?'
|
||||
, ok: () => {
|
||||
content: "确定提交审核吗?",
|
||||
ok: () => {
|
||||
message.success("提交成功");
|
||||
state.tableData1[index].auditStatus = 1
|
||||
handle({offcourseId: id, type: 1})
|
||||
}})
|
||||
state.tableData1[index].auditStatus = 1;
|
||||
handle({ offcourseId: id, type: 1 });
|
||||
},
|
||||
});
|
||||
};
|
||||
const handlePush = (id,index) => {
|
||||
const handlePush = (id, index) => {
|
||||
dialog({
|
||||
content: '确定发布该课程吗?'
|
||||
, ok: () => {
|
||||
content: "确定发布该课程吗?",
|
||||
ok: () => {
|
||||
message.success("发布成功");
|
||||
state.tableData1[index].auditStatus = 3
|
||||
handle({offcourseId: id, type: 3})
|
||||
}})
|
||||
state.tableData1[index].auditStatus = 3;
|
||||
handle({ offcourseId: id, type: 3 });
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
const handleCopyP = async (itm) => {
|
||||
console.log(itm);
|
||||
state.offcourseId = itm.offcourseId;
|
||||
@@ -4369,21 +4448,23 @@ export default defineComponent({
|
||||
};
|
||||
const handleStop = (id, index) => {
|
||||
dialog({
|
||||
content: '确定停用该课程吗?'
|
||||
, ok: () => {
|
||||
content: "确定停用该课程吗?",
|
||||
ok: () => {
|
||||
message.success("停用成功");
|
||||
state.tableData1[index].status = 0
|
||||
handle({offcourseId: id, type: -2})
|
||||
}})
|
||||
state.tableData1[index].status = 0;
|
||||
handle({ offcourseId: id, type: -2 });
|
||||
},
|
||||
});
|
||||
};
|
||||
const handleOpen = async (id, index) => {
|
||||
dialog({
|
||||
content: '确定起用该课程吗?'
|
||||
, ok: () => {
|
||||
content: "确定起用该课程吗?",
|
||||
ok: () => {
|
||||
message.success("起用成功");
|
||||
state.tableData1[index].status = 1
|
||||
handle({offcourseId: id, type: 2})
|
||||
}})
|
||||
state.tableData1[index].status = 1;
|
||||
handle({ offcourseId: id, type: 2 });
|
||||
},
|
||||
});
|
||||
};
|
||||
const handleStart = (item, type) => {
|
||||
console.log(item);
|
||||
|
||||
@@ -1024,6 +1024,13 @@ export default defineComponent({
|
||||
console.log("arrObj-------------", arrObj);
|
||||
state.orgSelect = arrObj;
|
||||
}
|
||||
const imgDict = optionsUrl.value.find(
|
||||
(img) => img.value.split(",")[0] === item.picUrl
|
||||
);
|
||||
console.log("imgDict", imgDict);
|
||||
if (imgDict) {
|
||||
state.pathBgId = imgDict.id;
|
||||
}
|
||||
};
|
||||
|
||||
const handleTagChange = () => {
|
||||
|
||||
Reference in New Issue
Block a user