mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
feat:修改面授课
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
<template>
|
||||
<div class="TableStudent">
|
||||
<a-row type="flex" gutter="12" style="padding-left: 20px; margin-right: 0px">
|
||||
<a-row
|
||||
type="flex"
|
||||
gutter="12"
|
||||
style="padding-left: 20px; margin-right: 0px"
|
||||
>
|
||||
<a-col>
|
||||
<a-form-item title="姓名:">
|
||||
<a-input class="cus-input" v-model:value="tableParam.studentName" placeholder="请输入姓名" />
|
||||
<a-input
|
||||
class="cus-input"
|
||||
v-model:value="tableParam.studentName"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col v-if="type === 1">
|
||||
@@ -19,39 +27,73 @@
|
||||
<a-col v-if="type === 1">
|
||||
<a-form-item title="部门:">
|
||||
<div class="select in" style="width: 270px">
|
||||
<OrgClass v-model:value="tableParam.studentDepartId" v-model:name="tableParam.studentDepartName"></OrgClass>
|
||||
<OrgClass
|
||||
v-model:value="tableParam.studentDepartId"
|
||||
v-model:name="tableParam.studentDepartName"
|
||||
></OrgClass>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col v-if="type === 1">
|
||||
<a-form-item title="优秀学员:">
|
||||
<div class="select">
|
||||
<a-select v-model:value="tableParam.topFlag" style="width: 260px; height: 40px" placeholder="是否为优秀学员"
|
||||
:options="topFlagList" @change="selectProjectName" allowClear showSearch></a-select>
|
||||
<a-select
|
||||
v-model:value="tableParam.topFlag"
|
||||
style="width: 260px; height: 40px"
|
||||
placeholder="是否为优秀学员"
|
||||
:options="topFlagList"
|
||||
@change="selectProjectName"
|
||||
allowClear
|
||||
showSearch
|
||||
></a-select>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff; width: 100px" @click="getStuList">
|
||||
<a-button
|
||||
class="cus-btn"
|
||||
style="background: #4ea6ff; color: #fff; width: 100px"
|
||||
@click="getStuList"
|
||||
>
|
||||
<template #icon>
|
||||
<img style="margin-right: 10px" src="../../assets/images/courseManage/search0.png" /></template>
|
||||
<img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/courseManage/search0.png"
|
||||
/></template>
|
||||
搜索
|
||||
</a-button>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-button class="cus-btn white" style="width: 100px" @click="reset">
|
||||
<template #icon>
|
||||
<img style="margin-right: 10px" src="../../assets/images/leveladd/reset.png" /></template>
|
||||
<img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/leveladd/reset.png"
|
||||
/></template>
|
||||
重置
|
||||
</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row type="flex" gutter="12" style="padding-left: 20px; margin-right: 0px" v-if="checkPer(permissions)">
|
||||
<a-row
|
||||
type="flex"
|
||||
gutter="12"
|
||||
style="padding-left: 20px; margin-right: 0px"
|
||||
v-if="checkPer(permissions)"
|
||||
>
|
||||
<a-col :span="1.5">
|
||||
<CommonStudent :type="type" :id="id" @finash="submitCall" :stage="stage">
|
||||
<CommonStudent
|
||||
:type="type"
|
||||
:id="id"
|
||||
@finash="submitCall"
|
||||
:stage="stage"
|
||||
>
|
||||
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff">
|
||||
<template #icon><img style="margin-right: 10px" src="../../assets/images/courseManage/add0.png" /></template>
|
||||
<template #icon
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/courseManage/add0.png"
|
||||
/></template>
|
||||
添加学员
|
||||
</a-button>
|
||||
</CommonStudent>
|
||||
@@ -59,7 +101,11 @@
|
||||
<!-- 新加导入学员 批量换组 导出学习信息 -->
|
||||
<a-col :span="1.5" v-if="type === 1 || type === 2">
|
||||
<a-button class="cus-btn white" @click="showImpStu">
|
||||
<template #icon><img style="margin-right: 10px" src="../../assets/images/basicinfo/in2.png" /></template>
|
||||
<template #icon
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/basicinfo/in2.png"
|
||||
/></template>
|
||||
导入学员
|
||||
</a-button>
|
||||
</a-col>
|
||||
@@ -82,7 +128,11 @@
|
||||
</a-col>
|
||||
<a-col :span="1.5">
|
||||
<a-button class="cus-btn white" @click="bathDel">
|
||||
<template #icon><img style="margin-right: 10px" src="../../assets/images/projectadd/delete.png" /></template>
|
||||
<template #icon
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
src="../../assets/images/projectadd/delete.png"
|
||||
/></template>
|
||||
批量删除
|
||||
</a-button>
|
||||
</a-col>
|
||||
@@ -97,10 +147,19 @@
|
||||
<div class="stmm_btn btn4" @click="hideShow">
|
||||
<div class="btn4_sub">
|
||||
<span style="color: #4ea6ff; margin-right: 4px"> 批量操作 </span>
|
||||
<div class="b_zk" :style="{ display: hideshow ? 'block' : 'none' }"></div>
|
||||
<div class="b_sq" :style="{ display: hideshow ? 'none' : 'block' }"></div>
|
||||
<div
|
||||
class="b_zk"
|
||||
:style="{ display: hideshow ? 'block' : 'none' }"
|
||||
></div>
|
||||
<div
|
||||
class="b_sq"
|
||||
:style="{ display: hideshow ? 'none' : 'block' }"
|
||||
></div>
|
||||
</div>
|
||||
<div class="btn4_sup" :style="{ display: hideshow ? 'none' : 'block' }">
|
||||
<div
|
||||
class="btn4_sup"
|
||||
:style="{ display: hideshow ? 'none' : 'block' }"
|
||||
>
|
||||
<div class="btnsbox">
|
||||
<div class="btn4_tit" @click="showEScoreModal">
|
||||
<span>批量录入成绩</span>
|
||||
@@ -121,14 +180,25 @@
|
||||
<div class="export"></div>
|
||||
<div class="btnText">导出</div>
|
||||
</div>
|
||||
<div class="stmm_btn btn5" style="margin-left: 15px" @click="exportHomeWorkShow">
|
||||
<div
|
||||
class="stmm_btn btn5"
|
||||
style="margin-left: 15px"
|
||||
@click="exportHomeWorkShow"
|
||||
>
|
||||
<div class="btnText">导出作业</div>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div style="margin-top: 20px">
|
||||
<a-table :columns="tablecolumns" :data-source="tableData.list" :pagination="stuPagination"
|
||||
:loading="tableData.loading" :scroll="{ x: 1500 }" row-key="id" :row-selection="stuRowSelection">
|
||||
<a-table
|
||||
:columns="tablecolumns"
|
||||
:data-source="tableData.list"
|
||||
:pagination="stuPagination"
|
||||
:loading="tableData.loading"
|
||||
:scroll="{ x: 1500 }"
|
||||
row-key="id"
|
||||
:row-selection="stuRowSelection"
|
||||
>
|
||||
<template #action="{ record }">
|
||||
<!-- <div style="display:flex;justify-content: center;align-items: center;">-->
|
||||
<!-- <div v-if="props.type == 1" @click="excellentStudent(record)"
|
||||
@@ -149,28 +219,57 @@
|
||||
<a-space :size="2">
|
||||
<slot name="extension" v-bind:data="{ record }"></slot>
|
||||
|
||||
<a-button v-if="type === 3 && record.status !== 0 && checkPer(permissions)"
|
||||
@click="updateStatus(0, record.id)" type="link">通过</a-button>
|
||||
<a-button v-if="type === 3 && record.status !== 0 && checkPer(permissions)"
|
||||
@click="updateStatus(2, record.id)" type="link">拒绝</a-button>
|
||||
<a-button v-if="checkPer(permissions)" :disabled="record.isLeader === '1'" @click="del(record.id, record)"
|
||||
type="link" danger>删除</a-button>
|
||||
<a-button
|
||||
v-if="type === 3 && record.status !== 0 && checkPer(permissions)"
|
||||
@click="updateStatus(0, record.id)"
|
||||
type="link"
|
||||
>通过</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="type === 3 && record.status !== 0 && checkPer(permissions)"
|
||||
@click="updateStatus(2, record.id)"
|
||||
type="link"
|
||||
>拒绝</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="checkPer(permissions)"
|
||||
:disabled="record.isLeader === '1'"
|
||||
@click="del(record.id, record)"
|
||||
type="link"
|
||||
danger
|
||||
>删除</a-button
|
||||
>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 批量调整关卡弹窗 -->
|
||||
<ChangeLevelModal v-model:visiblene="visiblene" :stage="stage" :ids="stuSelectKeys" @finash="submitCall" />
|
||||
<ChangeLevelModal
|
||||
v-model:visiblene="visiblene"
|
||||
:stage="stage"
|
||||
:ids="stuSelectKeys"
|
||||
@finash="submitCall"
|
||||
/>
|
||||
|
||||
<!-- 换组弹窗 -->
|
||||
<ChangeGroupModal v-model:changegroupV="checkgroupParam.changegroupV" :groupList="groupList" :checkBatch="checkgroupParam.checkBatch"
|
||||
:checkgroupStuId="stuSelectKeys" />
|
||||
<ChangeGroupModal
|
||||
v-model:changegroupV="checkgroupParam.changegroupV"
|
||||
:groupList="groupList"
|
||||
:checkBatch="checkgroupParam.checkBatch"
|
||||
:checkgroupStuId="stuSelectKeys"
|
||||
/>
|
||||
<!-- 批量调整关卡弹窗 -->
|
||||
<!-- 取消学员弹窗 -->
|
||||
<div>
|
||||
<a-modal v-model:visible="canclestu" :footer="null" :closable="close" wrapClassName="canclestu" centered="true"
|
||||
@cancel="closeModal1">
|
||||
<a-modal
|
||||
v-model:visible="canclestu"
|
||||
:footer="null"
|
||||
:closable="close"
|
||||
wrapClassName="canclestu"
|
||||
centered="true"
|
||||
@cancel="closeModal1"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
@@ -196,7 +295,13 @@
|
||||
<!-- 取消学员弹窗 -->
|
||||
<!-- 优秀学员弹窗 -->
|
||||
<div>
|
||||
<a-modal v-model:visible="canclestu1" :footer="null" :closable="close" wrapClassName="canclestu1" centered="true">
|
||||
<a-modal
|
||||
v-model:visible="canclestu1"
|
||||
:footer="null"
|
||||
:closable="close"
|
||||
wrapClassName="canclestu1"
|
||||
centered="true"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
@@ -220,18 +325,35 @@
|
||||
</a-modal>
|
||||
</div>
|
||||
<!-- 查看学员 传入查看学员的id-->
|
||||
<see-stu v-model:Seevisible="Seevisible" v-model:checkStuId="checkStuId" v-model:projectId="projectId" />
|
||||
<see-stu
|
||||
v-model:Seevisible="Seevisible"
|
||||
v-model:checkStuId="checkStuId"
|
||||
v-model:projectId="projectId"
|
||||
/>
|
||||
|
||||
<!-- 导入作业成绩抽屉 -->
|
||||
<EScore v-model:eScorevisible="eScorevisible" :type="3" :id="id" :pid="id" v-model:searchTaskList="getStuList" />
|
||||
<EScore
|
||||
v-model:eScorevisible="eScorevisible"
|
||||
:type="3"
|
||||
:id="id"
|
||||
:pid="id"
|
||||
v-model:searchTaskList="getStuList"
|
||||
/>
|
||||
<!-- 导出作业提示框 -->
|
||||
<ExportHomeWork v-model:exportHomeWorkV="exportHomeWorkV" :downloadUrl="downloadUrl" />
|
||||
<ExportHomeWork
|
||||
v-model:exportHomeWorkV="exportHomeWorkV"
|
||||
:downloadUrl="downloadUrl"
|
||||
/>
|
||||
|
||||
<!-- 导入学员抽屉 -->
|
||||
<!-- :courseId="projectTaskInfo.courseId"
|
||||
:courseType="2" -->
|
||||
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" @AddImpStuvisibleClose="AddImpStuvisibleClose" :courseId="id"
|
||||
:courseType="type" />
|
||||
<imp-stu
|
||||
v-model:AddImpStuvisible="AddImpStuvisible"
|
||||
@AddImpStuvisibleClose="AddImpStuvisibleClose"
|
||||
:courseId="id"
|
||||
:courseType="type"
|
||||
/>
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, createVNode, defineProps, onMounted, ref, watch } from "vue";
|
||||
@@ -276,7 +398,7 @@ const props = defineProps({
|
||||
groupList: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
}
|
||||
},
|
||||
});
|
||||
const topFlagList = ref([
|
||||
{
|
||||
@@ -357,16 +479,16 @@ const tablecolumns = ref([
|
||||
width: "10%",
|
||||
align: "center",
|
||||
customRender: ({ record: { source } }) =>
|
||||
// ({ 1: "快速添加", 2: "组织", 3: "受众", 4: "报名" }[source]),
|
||||
({
|
||||
0: "导入",
|
||||
1: "手动加入",
|
||||
2: "手动加入",
|
||||
3: "手动加入",
|
||||
4: "导入",
|
||||
5: "报名",
|
||||
6: "导入",
|
||||
}[source]),
|
||||
// ({ 1: "快速添加", 2: "组织", 3: "受众", 4: "报名" }[source]),
|
||||
({
|
||||
0: "导入",
|
||||
1: "手动加入",
|
||||
2: "手动加入",
|
||||
3: "手动加入",
|
||||
4: "导入",
|
||||
5: "报名",
|
||||
6: "导入",
|
||||
}[source]),
|
||||
},
|
||||
...props.columns,
|
||||
{
|
||||
@@ -384,8 +506,8 @@ function allDepartShow(a, b) {
|
||||
a == "" || a == null || a == undefined
|
||||
? (a = "")
|
||||
: a.slice(0, 1) == "/"
|
||||
? a.slice(1, a.length)
|
||||
: a;
|
||||
? a.slice(1, a.length)
|
||||
: a;
|
||||
let depart = b == "" || b == null || b == undefined ? (b = "") : b;
|
||||
let allname = org == "" && depart == "" ? "-" : org + depart;
|
||||
return allname;
|
||||
@@ -407,7 +529,7 @@ const checkgroupParam = ref({
|
||||
changegroupV: false, //学员名称
|
||||
checkgroupList: "", //学员小组
|
||||
checkgroupStuId: null,
|
||||
checkBatch: true
|
||||
checkBatch: true,
|
||||
});
|
||||
|
||||
const stuSelectKeys = ref([]);
|
||||
@@ -417,7 +539,6 @@ const tableData = ref({
|
||||
loading: false,
|
||||
});
|
||||
|
||||
|
||||
const stuRowSelection = computed(() => ({
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: stuSelectKeys.value,
|
||||
@@ -427,9 +548,9 @@ const stuRowSelection = computed(() => ({
|
||||
|
||||
//显示学员换组弹窗
|
||||
function showChangeGroupModal() {
|
||||
console.log("批量")
|
||||
const d = props.groupList
|
||||
console.log("d" + d)
|
||||
console.log("批量");
|
||||
const d = props.groupList;
|
||||
console.log("d" + d);
|
||||
// debugger
|
||||
checkgroupParam.value.changegroupV = true;
|
||||
checkgroupParam.value.checkBatch = true;
|
||||
@@ -439,7 +560,8 @@ function showChangeGroupModal() {
|
||||
function exportTaskStu() {
|
||||
console.log("props.datasource", props);
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API
|
||||
`${
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportTaskStudent?type=${1}&pid=${props.id}`
|
||||
);
|
||||
}
|
||||
@@ -447,7 +569,8 @@ function exportTaskStu() {
|
||||
function exportTaskStuRouter() {
|
||||
console.log("props.datasource", props, props.id);
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API
|
||||
`${
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportTaskStudent?type=${2}&pid=${props.id}`
|
||||
);
|
||||
}
|
||||
@@ -496,8 +619,6 @@ function getStuList() {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function reset() {
|
||||
tableParam.value.studentName = "";
|
||||
tableParam.value.groupName = ""; //学员小组
|
||||
@@ -513,16 +634,20 @@ function bathDel() {
|
||||
return message.warning("请先选中学员");
|
||||
}
|
||||
// 判断选择的人员中是否有小组长
|
||||
let arr = [...tableData.value.list].filter(x => [...stuSelectKeys.value].some(id => id === x.id)).filter(item => item.isLeader === '1');
|
||||
let arr = [...tableData.value.list]
|
||||
.filter((x) => [...stuSelectKeys.value].some((id) => id === x.id))
|
||||
.filter((item) => item.isLeader === "1");
|
||||
if (arr.length > 0) {
|
||||
return message.warning("选择人员中:" + arr[0].studentName + "是小组长,请勿删除!");
|
||||
return message.warning(
|
||||
"选择人员中:" + arr[0].studentName + "是小组长,请勿删除!"
|
||||
);
|
||||
}
|
||||
tableData.value.loading = true;
|
||||
delStudentList({ ids: stuSelectKeys.value }).then(() => getStuList());
|
||||
}
|
||||
|
||||
function del(id, row) {
|
||||
if (row.isLeader === '1') {
|
||||
if (row.isLeader === "1") {
|
||||
return message.warning("" + row.name + "是小组长,请勿删除!");
|
||||
}
|
||||
|
||||
@@ -659,7 +784,8 @@ const exportStu = () => {
|
||||
console.log("props.datasource", props);
|
||||
if (props.id != undefined) {
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API
|
||||
`${
|
||||
process.env.VUE_APP_BASE_API
|
||||
}/admin/student/exportTaskStudent?type=${3}&pid=${props.id}&thirdType=2`
|
||||
);
|
||||
}
|
||||
@@ -712,7 +838,6 @@ defineExpose({ getStuList, startLoading });
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.TableStudent {
|
||||
|
||||
table tr th.ant-table-selection-column,
|
||||
table tr td.ant-table-selection-column {
|
||||
padding-left: 3px;
|
||||
@@ -787,8 +912,10 @@ defineExpose({ getStuList, startLoading });
|
||||
position: absolute;
|
||||
width: calc(100%);
|
||||
height: 40px;
|
||||
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%);
|
||||
background: linear-gradient(
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.batchOpera {
|
||||
|
||||
Reference in New Issue
Block a user