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