mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 06:46:46 +08:00
feat:合并
This commit is contained in:
@@ -826,7 +826,7 @@ export default {
|
|||||||
name: props.datasource?.name,
|
name: props.datasource?.name,
|
||||||
url:
|
url:
|
||||||
process.env.VUE_APP_BASE_API +
|
process.env.VUE_APP_BASE_API +
|
||||||
`/admin/student/studentSign?taskId=${props.datasource.routerTaskId
|
`/admin/student/studentSign?taskId=${props.datasource.id
|
||||||
}&taskType=${props.datasource.type}&type=${2}`,
|
}&taskType=${props.datasource.type}&type=${2}`,
|
||||||
};
|
};
|
||||||
console.log("codeInfo", state.codeInfo);
|
console.log("codeInfo", state.codeInfo);
|
||||||
@@ -855,7 +855,6 @@ export default {
|
|||||||
|
|
||||||
// 导出数据
|
// 导出数据
|
||||||
function exportTaskStu() {
|
function exportTaskStu() {
|
||||||
debugger
|
|
||||||
{/* debugger */ }
|
{/* debugger */ }
|
||||||
console.log("props.datasource此处的taskId 应该是router_task 表中主键", props.datasource);
|
console.log("props.datasource此处的taskId 应该是router_task 表中主键", props.datasource);
|
||||||
console.log("props.datasource", props.datasource);
|
console.log("props.datasource", props.datasource);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 2px">直播封面:</span>
|
<span style="margin-right: 2px">直播封面:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item_inp">
|
<div class="item_inp" style="background-color: #fff;">
|
||||||
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
|
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
|
||||||
:before-upload="beforeUpload">
|
:before-upload="beforeUpload">
|
||||||
<img class="i_upload_img" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
<img class="i_upload_img" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||||
@@ -325,6 +325,7 @@ const { resetFields, validate } = Form.useForm(formData, rulesRef);
|
|||||||
|
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
formData.value.liveCover = "";
|
formData.value.liveCover = "";
|
||||||
|
formData.value.livePlaybackLink = "";
|
||||||
imageUrl.value = "";
|
imageUrl.value = "";
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
taskIndex.value = -1;
|
taskIndex.value = -1;
|
||||||
@@ -430,6 +431,9 @@ const beforeUpload = (file) => {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.ant-upload {
|
||||||
|
background-color: #fff !important;
|
||||||
|
}
|
||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
background-color: #fafafa !important;
|
background-color: #fafafa !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export default {
|
|||||||
};
|
};
|
||||||
//获取作业详情
|
//获取作业详情
|
||||||
const getWorkDetail = () => {
|
const getWorkDetail = () => {
|
||||||
debugger
|
// debugger
|
||||||
console.log("props.workId, props.stuId", props.workId, props.stuId);
|
console.log("props.workId, props.stuId", props.workId, props.stuId);
|
||||||
getWorkSubmitInfo(props.workId, props.stuId)
|
getWorkSubmitInfo(props.workId, props.stuId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
@change="handleChange" :showUploadList="false" :data="{
|
@change="handleChange" :showUploadList="false" :data="{
|
||||||
type: type,
|
type: type,
|
||||||
taskId: Number(id),
|
taskId: Number(id),
|
||||||
workId: datesource.info.id,
|
workId: datesource.info?datesource.info.id:id,
|
||||||
targetId: Number(id),
|
targetId: Number(id),
|
||||||
}">
|
}">
|
||||||
<p class="ant-upload-drag-icon">
|
<p class="ant-upload-drag-icon">
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
preserveSelectedRowKeys: true,
|
preserveSelectedRowKeys: true,
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="pa">
|
<div class="pa">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
:showSizeChanger="false"
|
:showSizeChanger="false"
|
||||||
@@ -2243,4 +2243,4 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -496,6 +496,9 @@ export default {
|
|||||||
if(props.datasource.type==1){
|
if(props.datasource.type==1){
|
||||||
{/* 在线课导出 */}
|
{/* 在线课导出 */}
|
||||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/online/manage/exportOnline?chapterId=${props.datasource.chapterId}&type=${1}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}`)
|
window.open(`${process.env.VUE_APP_BASE_API}/admin/online/manage/exportOnline?chapterId=${props.datasource.chapterId}&type=${1}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}`)
|
||||||
|
}else if(props.datasource.type==11){
|
||||||
|
{/* 评估导出 */}
|
||||||
|
window.open(`${process.env.VUE_APP_BASE_API}admin/assessment/manage/exportAssessmentMessage?chapterId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&courseId=${props.datasource.courseId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
|
||||||
}else{
|
}else{
|
||||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
|
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -352,7 +352,12 @@ const props = defineProps({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
activeKey1: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
console.log("props.activeKey1" + props.activeKey1)
|
||||||
// 获取项目学员;
|
// 获取项目学员;
|
||||||
const procurrentPage = ref(1);
|
const procurrentPage = ref(1);
|
||||||
const projectList = ref([]);
|
const projectList = ref([]);
|
||||||
@@ -775,30 +780,33 @@ const submitAuth = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function handleStageOk() {
|
function handleStageOk() {
|
||||||
|
// debugger
|
||||||
// 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
|
// 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
|
||||||
if (props.type === 1) {
|
if (props.type === 1) {
|
||||||
let selectMember = 0;
|
if (props.groupMemberCount !== null) { // 只有添加组员的时候判断
|
||||||
if (activeKey.value === 4) { // 项目内选人
|
let selectMember = 0;
|
||||||
selectMember = selectsData.value.projectMemberList.length
|
if (activeKey.value === 4) { // 项目内选人
|
||||||
} else if (activeKey.value === 1) {
|
selectMember = selectsData.value.projectMemberList.length
|
||||||
selectMember = selectsData.value.studentList.length
|
} else if (activeKey.value === 1) {
|
||||||
} else if (activeKey.value === 2) {
|
selectMember = selectsData.value.studentList.length
|
||||||
selectMember = selectsData.value.groupList.length
|
} else if (activeKey.value === 2) {
|
||||||
} else if (activeKey.value === 3) {
|
selectMember = selectsData.value.groupList.length
|
||||||
selectMember = selectsData.value.deptList.length
|
} else if (activeKey.value === 3) {
|
||||||
}
|
selectMember = selectsData.value.deptList.length
|
||||||
if (props.groupMemberCount < selectMember + Number(props.groupMemberNumber)) {
|
}
|
||||||
return message.warning("添加小组学员超过最大值");
|
if (props.groupMemberCount < selectMember + Number(props.groupMemberNumber)) {
|
||||||
}
|
return message.warning("添加小组学员超过最大值");
|
||||||
// 判断是否是组长,组长不能添加
|
}
|
||||||
const leaderArray = selectsData.value.projectMemberList.filter(item => item.isLeader === '1');
|
// 判断是否是组长,组长不能添加
|
||||||
if (leaderArray.length > 0) {
|
const leaderArray = selectsData.value.projectMemberList.filter(item => item.isLeader === '1');
|
||||||
return message.warning("当前选中学员"+leaderArray[0].realName+"已是小组长,请勿重复选择。");
|
if (leaderArray.length > 0) {
|
||||||
}
|
return message.warning("当前选中学员"+leaderArray[0].realName+"已是小组长,请勿重复选择。");
|
||||||
// 对选中的人员进行判断是否已经分组了
|
}
|
||||||
let haveGroupNum = selectsData.value.projectMemberList.filter(item => item.groupId !== null);
|
// 对选中的人员进行判断是否已经分组了
|
||||||
if (haveGroupNum.length > 0) {
|
let haveGroupNum = selectsData.value.projectMemberList.filter(item => item.groupId !== null);
|
||||||
message.warning("部分学员已经有小组,再次添加会被添加到当前小组.");
|
if (haveGroupNum.length > 0) {
|
||||||
|
message.warning("部分学员已经有小组,再次添加会被添加到当前小组.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stageVisible.value = false;
|
stageVisible.value = false;
|
||||||
|
|||||||
@@ -378,6 +378,10 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
activeKey:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
id: String,
|
id: String,
|
||||||
columns: {
|
columns: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@@ -576,6 +580,8 @@ function exportTaskStuRouter() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
// debugger
|
||||||
|
console.log("props.activeKey1" + props.activeKey1)
|
||||||
getStuList();
|
getStuList();
|
||||||
});
|
});
|
||||||
watch(props.isgetStudent, () => {
|
watch(props.isgetStudent, () => {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export function traverseArr(arr, traverseObj, saveOld = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const admin = [5, 6, 8, 9, 11, 12]
|
const admin = [5, 6, 8, 9, 11, 12]
|
||||||
|
//检查 管理权和归属权
|
||||||
export function checkPer(per) {
|
export function checkPer(per) {
|
||||||
if (store?.state?.userInfo?.roleList.some(t => t.code === 'learning-admin')) {
|
if (store?.state?.userInfo?.roleList.some(t => t.code === 'learning-admin')) {
|
||||||
return true
|
return true
|
||||||
@@ -39,6 +39,11 @@ export function checkPer(per) {
|
|||||||
}
|
}
|
||||||
return (per + "").split(',').some(t => admin.some(s => s == t))
|
return (per + "").split(',').some(t => admin.some(s => s == t))
|
||||||
}
|
}
|
||||||
|
const adminOwner = [6,9,12]
|
||||||
|
//单独检查是否有归属权
|
||||||
|
export function checkOwner(per) {
|
||||||
|
return (per + "").split(',').some(t => adminOwner.some(s => s == t))
|
||||||
|
}
|
||||||
export function checkMenu(path='') {
|
export function checkMenu(path='') {
|
||||||
return store?.state?.menus.some(t => path.split(',').some(s=>'/'+s===t));
|
return store?.state?.menus.some(t => path.split(',').some(s=>'/'+s===t));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -366,7 +366,7 @@
|
|||||||
type="link"
|
type="link"
|
||||||
>管理
|
>管理
|
||||||
</a-button>
|
</a-button>
|
||||||
<DropDown v-if="checkPer(record.permissions)" value="授权">
|
<DropDown v-if="checkPer(record.permissions) && checkOwner(record.permissions)" value="授权">
|
||||||
<OwnerTableModelStudent :types="[10, 11, 12]" :id="record.id"
|
<OwnerTableModelStudent :types="[10, 11, 12]" :id="record.id"
|
||||||
>权限名单</OwnerTableModelStudent
|
>权限名单</OwnerTableModelStudent
|
||||||
>
|
>
|
||||||
@@ -1731,7 +1731,7 @@ import FJUpload from "@/components/common/FJUpload";
|
|||||||
import { updateStudent } from "@/api/indexProjStu";
|
import { updateStudent } from "@/api/indexProjStu";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import DropDown from "@/components/common/DropDown";
|
import DropDown from "@/components/common/DropDown";
|
||||||
import { checkPer } from "@/utils/utils";
|
import { checkPer,checkOwner } from "@/utils/utils";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
//列表表格
|
//列表表格
|
||||||
@@ -4991,6 +4991,7 @@ export default defineComponent({
|
|||||||
beforeUpload2,
|
beforeUpload2,
|
||||||
handleDel,
|
handleDel,
|
||||||
checkPer,
|
checkPer,
|
||||||
|
checkOwner,
|
||||||
handleSucessStu,
|
handleSucessStu,
|
||||||
handleRejectStu,
|
handleRejectStu,
|
||||||
handleDeleteStu,
|
handleDeleteStu,
|
||||||
|
|||||||
@@ -692,7 +692,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
||||||
<a-tab-pane key="2" tab="共享文档">
|
<a-tab-pane key="2" tab="共享文档" v-if="checkPer(permissions)">
|
||||||
<div class="sametab">
|
<div class="sametab">
|
||||||
<div class="Gcon">
|
<div class="Gcon">
|
||||||
<div class="pad"></div>
|
<div class="pad"></div>
|
||||||
|
|||||||
@@ -261,7 +261,7 @@
|
|||||||
size="small" active-color="red"/>
|
size="small" active-color="red"/>
|
||||||
<div class="showt clearfix">
|
<div class="showt clearfix">
|
||||||
<div class="bi" :style="{
|
<div class="bi" :style="{
|
||||||
'z-index': element.checked1 ? 999 : 998,
|
'z-index': element.flag ? 999 : 998,
|
||||||
}">
|
}">
|
||||||
必修
|
必修
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -160,13 +160,8 @@
|
|||||||
type="link"
|
type="link"
|
||||||
>撤回发布</a-button
|
>撤回发布</a-button
|
||||||
>
|
>
|
||||||
<a-button
|
<a-button v-if="record.type === 3" @click="baseInfo(record)" type="link">管理</a-button>
|
||||||
v-if="record.type === 3"
|
<DropDown v-if="checkPer(record.permissions) && checkOwner(record.permissions)" value="授权">
|
||||||
@click="baseInfo(record)"
|
|
||||||
type="link"
|
|
||||||
>管理</a-button
|
|
||||||
>
|
|
||||||
<DropDown v-if="checkPer(record.permissions)" value="授权">
|
|
||||||
<OwnerTableModelStudent
|
<OwnerTableModelStudent
|
||||||
:types="[4, 5, 6]"
|
:types="[4, 5, 6]"
|
||||||
:id="record.id"
|
:id="record.id"
|
||||||
@@ -959,7 +954,7 @@ import { validateName } from "@/api/index1";
|
|||||||
import CommonStudent from "@/components/student/CommonStudent";
|
import CommonStudent from "@/components/student/CommonStudent";
|
||||||
import OwnerTableModelStudent from "@/components/student/OwnerTableModelStudent";
|
import OwnerTableModelStudent from "@/components/student/OwnerTableModelStudent";
|
||||||
import DropDown from "@/components/common/DropDown";
|
import DropDown from "@/components/common/DropDown";
|
||||||
import { checkPer } from "@/utils/utils";
|
import { checkPer,checkOwner } from "@/utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectManage",
|
name: "projectManage",
|
||||||
@@ -1707,6 +1702,7 @@ export default {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
|
checkOwner,
|
||||||
dayjs,
|
dayjs,
|
||||||
handleEdit,
|
handleEdit,
|
||||||
baseInfo,
|
baseInfo,
|
||||||
|
|||||||
@@ -757,6 +757,7 @@
|
|||||||
:permissions="permissions"
|
:permissions="permissions"
|
||||||
:type="1"
|
:type="1"
|
||||||
:id="projectId"
|
:id="projectId"
|
||||||
|
:activeKey1="activeKey1"
|
||||||
:columns="stuColumns"
|
:columns="stuColumns"
|
||||||
:stage="stage"
|
:stage="stage"
|
||||||
:visable="tabFlag"
|
:visable="tabFlag"
|
||||||
@@ -766,11 +767,12 @@
|
|||||||
<a-button @click="showStudent(record)" type="link"
|
<a-button @click="showStudent(record)" type="link"
|
||||||
>查看
|
>查看
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button @click="settingTopFlag(record)" type="link"
|
<a-button @click="settingTopFlag(record)" v-if="checkPer(permissions)" type="link"
|
||||||
>{{ record.topFlag ? "取消优秀" : "优秀学员" }}
|
>{{ record.topFlag ? "取消优秀" : "优秀学员" }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
|
v-if="checkPer(permissions)"
|
||||||
:disabled="record.isLeader === '1'"
|
:disabled="record.isLeader === '1'"
|
||||||
@click="showChangeGroupModal(record)"
|
@click="showChangeGroupModal(record)"
|
||||||
>换组
|
>换组
|
||||||
@@ -1072,7 +1074,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 有证书显示的页面 -->
|
<!-- 有证书显示的页面 -->
|
||||||
<div v-else class="certificate1">
|
<div v-else class="certificate1">
|
||||||
<div class="addcertificate1" @click="addCertificate">
|
<div class="addcertificate1" @click="addCertificate" v-if="checkPer(permissions)">
|
||||||
<div class="addcertext">+添加证书</div>
|
<div class="addcertext">+添加证书</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -3938,7 +3940,6 @@ export default {
|
|||||||
};
|
};
|
||||||
//创建小组
|
//创建小组
|
||||||
const createGroup = async () => {
|
const createGroup = async () => {
|
||||||
debugger
|
|
||||||
console.log("state.groupPageList" + state.groupPageList);
|
console.log("state.groupPageList" + state.groupPageList);
|
||||||
const id = state.groupInfo.id;
|
const id = state.groupInfo.id;
|
||||||
const d = state.groupPageList
|
const d = state.groupPageList
|
||||||
|
|||||||
Reference in New Issue
Block a user