feat:合并

This commit is contained in:
lixg
2023-02-26 19:19:17 +08:00
14 changed files with 68 additions and 45 deletions

View File

@@ -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);

View File

@@ -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;
} }

View File

@@ -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) => {

View File

@@ -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">

View File

@@ -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}`)
} }

View File

@@ -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,8 +780,10 @@ const submitAuth = () => {
}; };
function handleStageOk() { function handleStageOk() {
// debugger
// 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人 // 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
if (props.type === 1) { if (props.type === 1) {
if (props.groupMemberCount !== null) { // 只有添加组员的时候判断
let selectMember = 0; let selectMember = 0;
if (activeKey.value === 4) { // 项目内选人 if (activeKey.value === 4) { // 项目内选人
selectMember = selectsData.value.projectMemberList.length selectMember = selectsData.value.projectMemberList.length
@@ -801,6 +808,7 @@ function handleStageOk() {
message.warning("部分学员已经有小组,再次添加会被添加到当前小组."); message.warning("部分学员已经有小组,再次添加会被添加到当前小组.");
} }
} }
}
stageVisible.value = false; stageVisible.value = false;
visiable.value = false; visiable.value = false;
emit("finash", false); emit("finash", false);

View File

@@ -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, () => {

View File

@@ -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));
} }

View File

@@ -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,

View File

@@ -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>

View File

@@ -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>

View File

@@ -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,

View File

@@ -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