mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 06:16:46 +08:00
-- fix bug
This commit is contained in:
70
src/components/common/CommonAlert.vue
Normal file
70
src/components/common/CommonAlert.vue
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
<template>
|
||||||
|
<a-modal
|
||||||
|
:visible="true"
|
||||||
|
:footer="null"
|
||||||
|
:closable="false"
|
||||||
|
wrapClassName="DelModal"
|
||||||
|
style="margin-top: 400px"
|
||||||
|
:zIndex="9999"
|
||||||
|
@cancel="close"
|
||||||
|
>
|
||||||
|
<div class="delete">
|
||||||
|
<div class="del_header"></div>
|
||||||
|
<div class="del_main">
|
||||||
|
<div class="header">
|
||||||
|
<div class="del-icons">
|
||||||
|
<img :src="types[type]" alt=""/>
|
||||||
|
</div>
|
||||||
|
<span>提示</span>
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
<div><span>{{ content }}</span></div>
|
||||||
|
</div>
|
||||||
|
<div class="del_btnbox">
|
||||||
|
<div class="del_btn btn1" @click="close">
|
||||||
|
<div class="btnText">取消</div>
|
||||||
|
</div>
|
||||||
|
<div class="del_btn btn2" @click="handleConfirm">
|
||||||
|
<div class="btnText">确定</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import notide from '@/assets/images/coursewareManage/notice.png'
|
||||||
|
import infoPng from '@/assets/images/coursewareManage/QR.png'
|
||||||
|
import {defineProps, ref} from "vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
close: {
|
||||||
|
type: Function,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
ok: {
|
||||||
|
type: Function,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
content: String,
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '提示'
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const types = {
|
||||||
|
1: infoPng,
|
||||||
|
2: notide
|
||||||
|
}
|
||||||
|
const type = ref(1)
|
||||||
|
|
||||||
|
function handleConfirm() {
|
||||||
|
props.ok()
|
||||||
|
props.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
14
src/utils/dialog.js
Normal file
14
src/utils/dialog.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { createApp } from 'vue'
|
||||||
|
import CommonAlert from "@/components/common/CommonAlert";
|
||||||
|
import Antd from "ant-design-vue";
|
||||||
|
|
||||||
|
function mountContent (option = {}) {
|
||||||
|
const dom = document.createElement('div')
|
||||||
|
document.body.appendChild(dom)
|
||||||
|
const app = createApp(CommonAlert, {
|
||||||
|
close: () => { app.unmount(dom); document.body.removeChild(dom) },
|
||||||
|
...option
|
||||||
|
})
|
||||||
|
app.use(Antd).mount(dom)
|
||||||
|
}
|
||||||
|
export default mountContent
|
||||||
@@ -315,40 +315,40 @@
|
|||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{x:'max-content'}"
|
:scroll="{x:'max-content'}"
|
||||||
>
|
>
|
||||||
<template #operation="{ record }">
|
<template #operation="{ text,record,index }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-if="record.auditStatus===2 && checkPer(record.permissions)"
|
<a-button v-if="record.auditStatus===2 && checkPer(record.permissions)"
|
||||||
@click="() => handlePush(record, String(record.courseform))" type="link">发布
|
@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>
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
</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>
|
</a-button>
|
||||||
<a-button v-if="record.auditStatus===0 && checkPer(record.permissions)"
|
</DropDown>
|
||||||
@click="() => handleSubmit(record, String(record.courseform))" type="link">提交审核
|
</a-space>
|
||||||
</a-button>
|
</template>
|
||||||
<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>
|
|
||||||
<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>
|
|
||||||
<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>
|
|
||||||
</DropDown>
|
|
||||||
<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" @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>
|
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="pa">
|
<div class="pa">
|
||||||
@@ -1514,6 +1514,7 @@ import NameInput from "../../components/project/NameInput";
|
|||||||
import ProjPowerList from "../../components/drawers/ProjPowerList";
|
import ProjPowerList from "../../components/drawers/ProjPowerList";
|
||||||
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||||
import AssessmentList from "../../components/drawers/AssessmentList.vue";
|
import AssessmentList from "../../components/drawers/AssessmentList.vue";
|
||||||
|
import dialog from "@/utils/dialog";
|
||||||
import {
|
import {
|
||||||
list,
|
list,
|
||||||
detail,
|
detail,
|
||||||
@@ -2136,7 +2137,7 @@ export default defineComponent({
|
|||||||
dataIndex: "publishTime",
|
dataIndex: "publishTime",
|
||||||
key: "10",
|
key: "10",
|
||||||
align: "center",
|
align: "center",
|
||||||
customRender: ({text,auditStatus}) => {
|
customRender: ({text, auditStatus}) => {
|
||||||
return auditStatus == 3 ? (text || '-') : "-";
|
return auditStatus == 3 ? (text || '-') : "-";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -2146,14 +2147,7 @@ export default defineComponent({
|
|||||||
key: "status",
|
key: "status",
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
align: "center",
|
align: "center",
|
||||||
customRender: ({record}) => {
|
customRender: ({record}) => (record.auditStatus === 3 ? (record.status?'启用':'停用'): '-')
|
||||||
switch (String(record.status)) {
|
|
||||||
case "0":
|
|
||||||
return "停用";
|
|
||||||
case "1":
|
|
||||||
return "启用";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
@@ -2162,7 +2156,7 @@ export default defineComponent({
|
|||||||
key: "id",
|
key: "id",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
align: "right",
|
align: "right",
|
||||||
slots: { customRender: 'operation' }
|
slots: {customRender: 'operation'}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
//新加
|
//新加
|
||||||
@@ -2772,30 +2766,6 @@ export default defineComponent({
|
|||||||
state.viewpowervisible = true;
|
state.viewpowervisible = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// console.log('12344', sysTypeOptions)
|
|
||||||
|
|
||||||
// 处理数据字典
|
|
||||||
// function formateDictT(data) {
|
|
||||||
// for(let i=0;i<data.length;i++){
|
|
||||||
// data[i].title = data[i].dictName;
|
|
||||||
// data[i].value = data[i].dictCode;
|
|
||||||
// if(data[i].children.length!==0){
|
|
||||||
// for(let j=0;j<data[i].children.length;j++){
|
|
||||||
// data[i].children[j].title = data[i].children[j].dictName;
|
|
||||||
// data[i].children[j].value = data[i].children[j].dictCode;
|
|
||||||
// if(data[i].children[j].children.length!==0){
|
|
||||||
// for(let k=0; k<data[i].children[j].children.length; k++) {
|
|
||||||
// data[i].children[j].children[k].title = data[i].children[j].children[k].dictName;
|
|
||||||
// data[i].children[j].children[k].value = data[i].children[j].children[k].dictCode;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return data;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 富文本 sssssssssssssss
|
// 富文本 sssssssssssssss
|
||||||
// 编辑器实例,必须用 shallowRef
|
// 编辑器实例,必须用 shallowRef
|
||||||
const editorRef = shallowRef();
|
const editorRef = shallowRef();
|
||||||
@@ -2803,16 +2773,7 @@ export default defineComponent({
|
|||||||
const valueHtml = ref("");
|
const valueHtml = ref("");
|
||||||
// // 模拟 ajax 异步获取内容
|
// // 模拟 ajax 异步获取内容
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
setTimeout(() => {
|
|
||||||
// valueHtml.value = "<p>模拟 Ajax 异步设置内容</p>";
|
|
||||||
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 = {
|
const toolbarConfig = {
|
||||||
@@ -3741,17 +3702,7 @@ export default defineComponent({
|
|||||||
//是否允许未报名的签到:1是0否
|
//是否允许未报名的签到:1是0否
|
||||||
state.xjkkradioV1 = 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.member = {value: item.teacherId, name: item.teacher};
|
||||||
|
|
||||||
state.cstm_hs = true;
|
state.cstm_hs = true;
|
||||||
state.kk_eidt = true;
|
state.kk_eidt = true;
|
||||||
};
|
};
|
||||||
@@ -3836,13 +3787,14 @@ export default defineComponent({
|
|||||||
state.graduate_hs = false;
|
state.graduate_hs = false;
|
||||||
state.addLoading = false;
|
state.addLoading = false;
|
||||||
};
|
};
|
||||||
const handleRejectExit = (itm, type) => {
|
const handleRejectExit = (id, index,record) => {
|
||||||
if (type === "1") {
|
dialog({
|
||||||
return;
|
content: '确定撤回吗?'
|
||||||
}
|
, ok: () => {
|
||||||
state.offcourseId = itm.id;
|
message.success("撤回成功");
|
||||||
state.delete_hs = true;
|
record.auditStatus === 3 ? (state.tableData1[index].auditStatus = 2) : (state.tableData1[index].auditStatus = 0)
|
||||||
state.back_hs = true;
|
handle({offcourseId: id, type: 0})
|
||||||
|
}})
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleJoin = async () => {
|
const handleJoin = async () => {
|
||||||
@@ -3952,7 +3904,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (state.offcourseId) {
|
} else if (state.offcourseId) {
|
||||||
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();
|
||||||
@@ -4245,41 +4198,46 @@ export default defineComponent({
|
|||||||
// // console.log(item);
|
// // console.log(item);
|
||||||
// // });
|
// // });
|
||||||
// };
|
// };
|
||||||
const handleDelete = (item, type) => {
|
const handleDelete = (id) => {
|
||||||
console.log(item);
|
dialog({
|
||||||
if (type === "1") {
|
content: '确定删除该课程吗?'
|
||||||
return;
|
, ok: async () => {
|
||||||
}
|
message.success("删除成功");
|
||||||
state.offcourseId = item.id;
|
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) => {
|
const handleCopyP = async (itm) => {
|
||||||
console.log(itm);
|
console.log(itm);
|
||||||
state.offcourseId = itm.offcourseId;
|
state.offcourseId = itm.offcourseId;
|
||||||
@@ -4288,23 +4246,23 @@ export default defineComponent({
|
|||||||
state.delete_hs = true;
|
state.delete_hs = true;
|
||||||
state.copy_hs = true;
|
state.copy_hs = true;
|
||||||
};
|
};
|
||||||
const handleStop = (itm, type) => {
|
const handleStop = (id, index) => {
|
||||||
console.log(itm);
|
dialog({
|
||||||
if (type === "1") {
|
content: '确定停用该课程吗?'
|
||||||
return;
|
, ok: () => {
|
||||||
}
|
message.success("停用成功");
|
||||||
state.temp = itm;
|
state.tableData1[index].status = 0
|
||||||
state.offcourseId = itm.id;
|
handle({offcourseId: id, type: -2})
|
||||||
state.delete_hs = true;
|
}})
|
||||||
state.nouse_hs = true;
|
|
||||||
};
|
};
|
||||||
const handleOpen = async (itm, type) => {
|
const handleOpen = async (id, index) => {
|
||||||
if (type === "1") {
|
dialog({
|
||||||
return;
|
content: '确定起用该课程吗?'
|
||||||
}
|
, ok: () => {
|
||||||
state.offcourseId = itm.id;
|
message.success("起用成功");
|
||||||
state.useCourse = true;
|
state.tableData1[index].status = 1
|
||||||
state.delete_hs = true;
|
handle({offcourseId: id, type: 2})
|
||||||
|
}})
|
||||||
};
|
};
|
||||||
const handleStart = (item, type) => {
|
const handleStart = (item, type) => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
@@ -4781,18 +4739,15 @@ export default defineComponent({
|
|||||||
handelChangePageTea2,
|
handelChangePageTea2,
|
||||||
submitReview,
|
submitReview,
|
||||||
reviewClick,
|
reviewClick,
|
||||||
|
|
||||||
showPrower,
|
showPrower,
|
||||||
showOwnPrower,
|
showOwnPrower,
|
||||||
showViewPrower,
|
showViewPrower,
|
||||||
showManagePrower,
|
showManagePrower,
|
||||||
|
|
||||||
closeOnlineCoursevisible,
|
closeOnlineCoursevisible,
|
||||||
handlelookMs,
|
handlelookMs,
|
||||||
handleLook,
|
handleLook,
|
||||||
logW,
|
logW,
|
||||||
logT,
|
logT,
|
||||||
|
|
||||||
qrcodeVisible,
|
qrcodeVisible,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user