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:
@@ -29,3 +29,6 @@ export const setScoreRule = (obj) => http.post('/admin/project/setScoreRule', ob
|
||||
|
||||
//获取学员积分明细列表
|
||||
export const studentScoreList = (obj) => http.post('/admin/project/studentScoreList', obj)
|
||||
|
||||
//添加项目学员
|
||||
export const addStudent = (obj) => http.post('/admin/project/addStudent', obj)
|
||||
@@ -29,8 +29,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="changeGroup">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
@@ -38,7 +38,9 @@
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import { getGroupList } from "../../api/indexProjStu";
|
||||
import { getGroupList, addStudent } from "../../api/indexProjStu";
|
||||
import { message } from "ant-design-vue";
|
||||
|
||||
export default {
|
||||
name: "ChangeGroup",
|
||||
props: {
|
||||
@@ -50,6 +52,18 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
ChangeGroupStuId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
ChangeGroupStuName: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
ChangeGroupId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
@@ -59,21 +73,13 @@ export default {
|
||||
// value: "好好学习",
|
||||
// label: "好好学习",
|
||||
// },
|
||||
// {
|
||||
// id: "2",
|
||||
// value: "天天向上",
|
||||
// label: "天天向上",
|
||||
// },
|
||||
// {
|
||||
// id: "3",
|
||||
// value: "最强小组",
|
||||
// label: "最强小组",
|
||||
// },
|
||||
],
|
||||
groupValue: null, //下拉框选择的值
|
||||
chooseGroupId: null, //下拉框选择的小组id
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:Changevisible", false);
|
||||
state.groupValue = null;
|
||||
};
|
||||
const setStuGroups = (tableData) => {
|
||||
let data = tableData;
|
||||
@@ -106,16 +112,62 @@ export default {
|
||||
}
|
||||
});
|
||||
};
|
||||
const handleChange = (value) => {
|
||||
const handleChange = (value, item) => {
|
||||
console.log(`selected ${value}`);
|
||||
console.log(item);
|
||||
state.chooseGroupId = item.id;
|
||||
};
|
||||
const changeGroup = () => {
|
||||
// closeDrawer()
|
||||
if (state.chooseGroupId) {
|
||||
if (props.ChangeGroupId == state.chooseGroupId) {
|
||||
message.destroy();
|
||||
return message.warning("学员已在该小组");
|
||||
} else {
|
||||
let obj = {
|
||||
deptList: [
|
||||
{
|
||||
id: 0,
|
||||
name: "",
|
||||
},
|
||||
],
|
||||
groupList: [
|
||||
{
|
||||
id: 0,
|
||||
name: "",
|
||||
},
|
||||
],
|
||||
projectGroupId: state.chooseGroupId,
|
||||
projectId: props.projectId,
|
||||
studentList: [
|
||||
{
|
||||
id: props.ChangeGroupStuId,
|
||||
name: props.ChangeGroupStuName,
|
||||
},
|
||||
],
|
||||
};
|
||||
addStudent(obj)
|
||||
.then((res) => {
|
||||
message.destroy();
|
||||
console.log(res, "换组成功");
|
||||
ctx.emit("changeD", false);
|
||||
closeDrawer();
|
||||
return message.success("换组成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, "换组失败");
|
||||
message.warning("换组失败");
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
setStuGroups,
|
||||
handleChange,
|
||||
changeGroup,
|
||||
// change,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -494,9 +494,9 @@
|
||||
: item.type == '5' || item.type == '10'
|
||||
? showTest(item.name, item.projectTaskId)
|
||||
: item.type == '2' || item.type == '6'
|
||||
? showFace(item.name,item.projectTaskId)
|
||||
? showFace(item.name, item.projectTaskId)
|
||||
: item.type == '4'
|
||||
? showWork(item.name,item.projectTaskId)
|
||||
? showWork(item.name, item.projectTaskId)
|
||||
: null
|
||||
"
|
||||
>
|
||||
@@ -1104,6 +1104,10 @@
|
||||
<change-group
|
||||
v-model:Changevisible="Changevisible"
|
||||
v-model:projectId="projectId"
|
||||
v-model:ChangeGroupStuId="ChangeGroupStuId"
|
||||
v-model:ChangeGroupStuName="ChangeGroupStuName"
|
||||
v-model:ChangeGroupId = "ChangeGroupId"
|
||||
@changeD="changeGrouped"
|
||||
/>
|
||||
<!-- 组员名单抽屉 -->
|
||||
<member-list
|
||||
@@ -1123,33 +1127,60 @@
|
||||
:title="showWorkText"
|
||||
/>
|
||||
<!-- 考试管理抽屉 -->
|
||||
<test-manage v-model:TMvisible.sync="TMvisible" v-if="TMvisible" :title="showTestText" :projectTaskId="projectTaskId" />
|
||||
<test-manage
|
||||
v-model:TMvisible.sync="TMvisible"
|
||||
v-if="TMvisible"
|
||||
:title="showTestText"
|
||||
:projectTaskId="projectTaskId"
|
||||
/>
|
||||
<!-- 批量面授报名 -->
|
||||
<task-imp-stu v-model:TaskFaceImpStuvisible="TaskFaceImpStuvisible" />
|
||||
|
||||
<!-- 概览(无数据)-项目发布弹窗 -->
|
||||
<div>
|
||||
<a-modal v-model:visible="pubproject" :title="null" @ok="closeModal" :footer="null" :closable="false" :centered="true"
|
||||
wrapClassName="pubproject" width="679px" height="437px">
|
||||
<div class="modalHeader" style="
|
||||
<a-modal
|
||||
v-model:visible="pubproject"
|
||||
:title="null"
|
||||
@ok="closeModal"
|
||||
:footer="null"
|
||||
:closable="false"
|
||||
:centered="true"
|
||||
wrapClassName="pubproject"
|
||||
width="679px"
|
||||
height="437px"
|
||||
>
|
||||
<div
|
||||
class="modalHeader"
|
||||
style="
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
">
|
||||
"
|
||||
>
|
||||
<div class="headerLeft" style="margin-left: 32px">
|
||||
<span style="width: 15px; height: 15px"><img src="../../assets/images/taskpage/pub.png" /></span>
|
||||
<span class="headerLeftText" style="font-size: 16px; margin-left: 10px">项目发布</span>
|
||||
<span style="width: 15px; height: 15px"
|
||||
><img src="../../assets/images/taskpage/pub.png"
|
||||
/></span>
|
||||
<span
|
||||
class="headerLeftText"
|
||||
style="font-size: 16px; margin-left: 10px"
|
||||
>项目发布</span
|
||||
>
|
||||
</div>
|
||||
<div style="cursor: pointer; margin-right: 32px" @click="closeModal">
|
||||
<img style="width: 22px; height: 22px" src="../../assets/images/basicinfo/close22.png" />
|
||||
<img
|
||||
style="width: 22px; height: 22px"
|
||||
src="../../assets/images/basicinfo/close22.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modalMain">
|
||||
<div class="projectname">管理者进阶-腾飞班1</div>
|
||||
<div class="projecttime">
|
||||
<span class="timeti">项目时间:</span><span class="timeme">2022/08/01-2022/08/30</span>
|
||||
<span class="timeti">项目时间:</span
|
||||
><span class="timeme">2022/08/01-2022/08/30</span>
|
||||
</div>
|
||||
<div class="projectbox">
|
||||
<div class="promessage">
|
||||
@@ -1166,8 +1197,12 @@
|
||||
<span class="sendtext">发送项目通知</span>
|
||||
</div>
|
||||
<div class="ckb">
|
||||
<a-checkbox v-model:checked="checked1"><span class="sendpeo">发给老师</span></a-checkbox>
|
||||
<a-checkbox v-model:checked="checked2"><span class="sendpeo">发给学员</span></a-checkbox>
|
||||
<a-checkbox v-model:checked="checked1"
|
||||
><span class="sendpeo">发给老师</span></a-checkbox
|
||||
>
|
||||
<a-checkbox v-model:checked="checked2"
|
||||
><span class="sendpeo">发给学员</span></a-checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="pubtn">
|
||||
<a-button class="pubtn1" @click="closeModal">取消</a-button>
|
||||
@@ -1179,39 +1214,68 @@
|
||||
<!-- 概览(无数据)-项目发布弹窗 -->
|
||||
<!-- 学员-创建小组弹窗 -->
|
||||
<div>
|
||||
<a-modal v-model:visible="stugroup" :title="null" @ok="closeModal2" :footer="null" :closable="false" :centered="true"
|
||||
wrapClassName="doublepro" width="624px" height="332px">
|
||||
<div class="modalHeader" style="
|
||||
<a-modal
|
||||
v-model:visible="stugroup"
|
||||
:title="null"
|
||||
@ok="closeModal2"
|
||||
:footer="null"
|
||||
:closable="false"
|
||||
:centered="true"
|
||||
wrapClassName="doublepro"
|
||||
width="624px"
|
||||
height="332px"
|
||||
>
|
||||
<div
|
||||
class="modalHeader"
|
||||
style="
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
">
|
||||
"
|
||||
>
|
||||
<div class="headerLeft" style="margin-left: 32px">
|
||||
<span class="headerLeftText" style="font-size: 16px">创建小组</span>
|
||||
</div>
|
||||
<div style="cursor: pointer; margin-right: 32px" @click="closeModal2">
|
||||
<img style="width: 22px; height: 22px" src="../../assets/images/basicinfo/close22.png" />
|
||||
<img
|
||||
style="width: 22px; height: 22px"
|
||||
src="../../assets/images/basicinfo/close22.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modalMain">
|
||||
<div class="name">
|
||||
<div class="star" style="margin-top: -4px">
|
||||
<img style="width: 10px; height: 10px" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
style="width: 10px; height: 10px"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="inname">小组名称:</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="valueaddg" placeholder="请输入小组名称" style="border-radius: 8px; height: 40px" />
|
||||
<a-input
|
||||
v-model:value="valueaddg"
|
||||
placeholder="请输入小组名称"
|
||||
style="border-radius: 8px; height: 40px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="star" style="margin-top: -4px">
|
||||
<img style="width: 10px; height: 10px; margin-left: 15px" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<img
|
||||
style="width: 10px; height: 10px; margin-left: 15px"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="inname">小组长:</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="valueaddm" placeholder="请输入小组长" style="border-radius: 8px; height: 40px" />
|
||||
<a-input
|
||||
v-model:value="valueaddm"
|
||||
placeholder="请输入小组长"
|
||||
style="border-radius: 8px; height: 40px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pubtn">
|
||||
@@ -1224,8 +1288,14 @@
|
||||
<!-- 学员-创建小组弹窗 -->
|
||||
<!-- 取消学员弹窗 -->
|
||||
<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">
|
||||
@@ -1251,7 +1321,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">
|
||||
@@ -1277,7 +1353,13 @@
|
||||
<!-- 取消学员弹窗 -->
|
||||
<!-- 删除学员弹窗 -->
|
||||
<div>
|
||||
<a-modal v-model:visible="deleteOneStu" :footer="null" :closable="close" wrapClassName="canclestu1" centered="true">
|
||||
<a-modal
|
||||
v-model:visible="deleteOneStu"
|
||||
:footer="null"
|
||||
:closable="close"
|
||||
wrapClassName="canclestu1"
|
||||
centered="true"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
@@ -1304,8 +1386,14 @@
|
||||
|
||||
<!-- 删除弹窗 -->
|
||||
<div>
|
||||
<a-modal v-model:visible="delete_hs" :footer="null" :closable="closableQR" wrapClassName="DelModal"
|
||||
style="margin-top: 400px" @cancel="delete_exit">
|
||||
<a-modal
|
||||
v-model:visible="delete_hs"
|
||||
:footer="null"
|
||||
:closable="closableQR"
|
||||
wrapClassName="DelModal"
|
||||
style="margin-top: 400px"
|
||||
@cancel="delete_exit"
|
||||
>
|
||||
<div class="delete" :style="{ display: delete_hs ? 'block' : 'none' }">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
@@ -1331,8 +1419,13 @@
|
||||
</div>
|
||||
<!-- 删除弹窗 -->
|
||||
<!-- 管理二维码 -->
|
||||
<a-modal v-model:visible="copyModal" :footer="null" :closable="closeCopy" wrapClassName="facemanageModal"
|
||||
centered="true">
|
||||
<a-modal
|
||||
v-model:visible="copyModal"
|
||||
:footer="null"
|
||||
:closable="closeCopy"
|
||||
wrapClassName="facemanageModal"
|
||||
centered="true"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
@@ -1806,6 +1899,9 @@ export default {
|
||||
closeStop: false,
|
||||
startModal: false,
|
||||
closeStart: false,
|
||||
ChangeGroupStuId: null, //要换组的学生id
|
||||
ChangeGroupStuName: null, //要换组的学生name
|
||||
ChangeGroupId: null, //要换组的学生的小组id
|
||||
//进度排行表
|
||||
jindutabledata: [
|
||||
{
|
||||
@@ -2256,13 +2352,12 @@ export default {
|
||||
//考试、测评页面传递参数title
|
||||
showTestText: "",
|
||||
//直播、面授传递title
|
||||
showFaceText:"",
|
||||
showFaceText: "",
|
||||
//直播、面授传递title
|
||||
showWorkText:"",
|
||||
showWorkText: "",
|
||||
//直播、活动页面传递参数
|
||||
showkaoqinText: "",
|
||||
|
||||
|
||||
//排行榜时间
|
||||
rankStartTime: null,
|
||||
rankEndTime: null,
|
||||
@@ -2521,29 +2616,29 @@ export default {
|
||||
const showCopyModal = (itemtype) => {
|
||||
state.copyModal = true;
|
||||
if (itemtype == "1") {
|
||||
state.QRtype = "1"
|
||||
state.QRtype = "1";
|
||||
} else if (itemtype == "2") {
|
||||
state.QRtype = "2"
|
||||
state.QRtype = "2";
|
||||
} else if (itemtype == "3") {
|
||||
state.QRtype = "3"
|
||||
state.QRtype = "3";
|
||||
} else if (itemtype == "4") {
|
||||
state.QRtype = "4"
|
||||
state.QRtype = "4";
|
||||
} else if (itemtype == "5") {
|
||||
state.QRtype = "5"
|
||||
state.QRtype = "5";
|
||||
} else if (itemtype == "6") {
|
||||
state.QRtype = "6"
|
||||
state.QRtype = "6";
|
||||
} else if (itemtype == "7") {
|
||||
state.QRtype = "7"
|
||||
state.QRtype = "7";
|
||||
} else if (itemtype == "8") {
|
||||
state.QRtype = "8"
|
||||
state.QRtype = "8";
|
||||
} else if (itemtype == "9") {
|
||||
state.QRtype = "9"
|
||||
state.QRtype = "9";
|
||||
} else if (itemtype == "10") {
|
||||
state.QRtype = "10"
|
||||
state.QRtype = "10";
|
||||
} else if (itemtype == "11") {
|
||||
state.QRtype = "11"
|
||||
state.QRtype = "11";
|
||||
} else if (itemtype == "12") {
|
||||
state.QRtype = "12"
|
||||
state.QRtype = "12";
|
||||
}
|
||||
};
|
||||
const closeCopyModal = () => {
|
||||
@@ -2587,7 +2682,7 @@ export default {
|
||||
state.showkaoqinText = "【" + course + "】" + "考勤";
|
||||
};
|
||||
//作业管理的抽屉
|
||||
const showWork = (name,id) => {
|
||||
const showWork = (name, id) => {
|
||||
state.Wvisible = true;
|
||||
state.showWorkText = name;
|
||||
state.projectTaskId = id;
|
||||
@@ -2703,8 +2798,13 @@ export default {
|
||||
>
|
||||
<a-select-option value="换组" label="换组">
|
||||
<div
|
||||
style="cursor:pointer"
|
||||
onClick={() => {
|
||||
state.Changevisible = true;
|
||||
console.log(value, "xixixixix");
|
||||
state.ChangeGroupStuId = value.studentId;
|
||||
state.ChangeGroupStuName = value.name;
|
||||
state.ChangeGroupId = value.groupId;
|
||||
}}
|
||||
>
|
||||
换组
|
||||
@@ -2712,6 +2812,7 @@ export default {
|
||||
</a-select-option>
|
||||
<a-select-option value="删除" label="删除">
|
||||
<div
|
||||
style="cursor:pointer"
|
||||
onClick={() => {
|
||||
console.log("点击了111", value.studentId);
|
||||
showDeleteOne(value.studentId);
|
||||
@@ -3225,6 +3326,10 @@ export default {
|
||||
state.currentPageStu = page;
|
||||
getStu();
|
||||
};
|
||||
const changeGrouped = (data) => {
|
||||
console.log(data);
|
||||
getStu();
|
||||
};
|
||||
//end---------学员------
|
||||
|
||||
//start---------项目概览
|
||||
@@ -3545,6 +3650,7 @@ export default {
|
||||
showStartModal,
|
||||
closeStartModal,
|
||||
templateProject,
|
||||
changeGrouped,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user