diff --git a/src/components/common/CommonAlert.vue b/src/components/common/CommonAlert.vue
new file mode 100644
index 00000000..46b81112
--- /dev/null
+++ b/src/components/common/CommonAlert.vue
@@ -0,0 +1,70 @@
+
+
模拟 Ajax 异步设置内容
"; - console.log("toolbar222222222222222"); - console.log(editorRef.value); - // const toolbar = DomEditor.getToolbar(editorRef.value); - // const menu = editorRef.value.getAllMenuKeys(); - // const bar = toolbar.getConfig().toolbarKeys; - // console.log(menu); - // console.log(bar); - }, 3500); + }); const toolbarConfig = { @@ -3741,17 +3702,7 @@ export default defineComponent({ //是否允许未报名的签到:1是0否 state.xjkkradioV1 = 0; } - /* - if (item.signWordFlag === 1) { - //签到是否需要口令:1是0否 - state.xjkkradioV1 = 1; - } - if (item.signFlag === 0 && item.signWordFlag === 0) { - state.xjkkradioV1 = ""; - } - */ state.member = {value: item.teacherId, name: item.teacher}; - state.cstm_hs = true; state.kk_eidt = true; }; @@ -3836,13 +3787,14 @@ export default defineComponent({ state.graduate_hs = false; state.addLoading = false; }; - const handleRejectExit = (itm, type) => { - if (type === "1") { - return; - } - state.offcourseId = itm.id; - state.delete_hs = true; - state.back_hs = true; + const handleRejectExit = (id, index,record) => { + dialog({ + content: '确定撤回吗?' + , ok: () => { + message.success("撤回成功"); + record.auditStatus === 3 ? (state.tableData1[index].auditStatus = 2) : (state.tableData1[index].auditStatus = 0) + handle({offcourseId: id, type: 0}) + }}) }; const handleJoin = async () => { @@ -3952,7 +3904,8 @@ export default defineComponent({ } }); } else if (state.offcourseId) { - handle({offcourseId: state.offcourseId, type: -1, + handle({ + offcourseId: state.offcourseId, type: -1, }).then((res) => { if (res.data.code === 200) { message.destroy(); @@ -4245,41 +4198,46 @@ export default defineComponent({ // // console.log(item); // // }); // }; - const handleDelete = (item, type) => { - console.log(item); - if (type === "1") { - return; - } - state.offcourseId = item.id; + const handleDelete = (id) => { + dialog({ + content: '确定删除该课程吗?' + , ok: async () => { + message.success("删除成功"); + state.tableLoading = true + await handle({offcourseId: id,type:-1}) + getTableDate(); + }}) + }; + const handleCopy = async (id) => { + dialog({ + content: '确定复制该课程吗?' + , ok: async () => { + message.success("复制成功"); + state.tableLoading = true + await copyCourse({offcourseId: id}) + getTableDate(); + }}) + }; + const handleSubmit = (id, index) => { + dialog({ + content: '确定提交审核吗?' + , ok: () => { + message.success("提交成功"); + state.tableData1[index].auditStatus = 1 + handle({offcourseId: id, type: 1}) + }}) + }; + const handlePush = (id,index) => { + dialog({ + content: '确定发布该课程吗?' + , ok: () => { + message.success("发布成功"); + state.tableData1[index].auditStatus = 3 + handle({offcourseId: id, type: 3}) + }}) + }; - state.delete_hs = true; - state.del_hs = true; - }; - const handleCopy = async (itm, type) => { - if (type === "1") { - return; - } - state.offcourseId = itm.id; - 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; @@ -4288,23 +4246,23 @@ export default defineComponent({ state.delete_hs = true; state.copy_hs = true; }; - 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 handleStop = (id, index) => { + dialog({ + content: '确定停用该课程吗?' + , ok: () => { + message.success("停用成功"); + state.tableData1[index].status = 0 + handle({offcourseId: id, type: -2}) + }}) }; - const handleOpen = async (itm, type) => { - if (type === "1") { - return; - } - state.offcourseId = itm.id; - state.useCourse = true; - state.delete_hs = true; + const handleOpen = async (id, index) => { + dialog({ + content: '确定起用该课程吗?' + , ok: () => { + message.success("起用成功"); + state.tableData1[index].status = 1 + handle({offcourseId: id, type: 2}) + }}) }; const handleStart = (item, type) => { console.log(item); @@ -4781,18 +4739,15 @@ export default defineComponent({ handelChangePageTea2, submitReview, reviewClick, - showPrower, showOwnPrower, showViewPrower, showManagePrower, - closeOnlineCoursevisible, handlelookMs, handleLook, logW, logT, - qrcodeVisible, }; },