fix:换组bug

This commit is contained in:
宋文超
2022-11-18 10:08:44 +08:00
parent 68c8a65d54
commit 0680168b75
2 changed files with 165 additions and 154 deletions

View File

@@ -119,7 +119,11 @@ export default {
}; };
const changeGroup = () => { const changeGroup = () => {
// closeDrawer() // closeDrawer()
if (state.chooseGroupId) { console.log("state.chooseGroupId", state.chooseGroupId);
console.log("props.projectId", props.projectId);
console.log("props.ChangeGroupStuId", props.ChangeGroupStuId);
console.log("props.ChangeGroupStuName", props.ChangeGroupStuName);
if (state.chooseGroupId !== null) {
if (props.ChangeGroupId == state.chooseGroupId) { if (props.ChangeGroupId == state.chooseGroupId) {
message.destroy(); message.destroy();
return message.warning("学员已在该小组"); return message.warning("学员已在该小组");

View File

@@ -462,7 +462,7 @@
<div <div
class="operation" class="operation"
style="cursor: pointer" style="cursor: pointer"
@click="showAA(item.name,)" @click="showAA(item.name)"
:style="{ :style="{
display: display:
item.type == '6' || item.type == '9' item.type == '6' || item.type == '9'
@@ -663,10 +663,7 @@
class="nostu" class="nostu"
:style="{ display: total > 0 ? 'none' : 'block' }" :style="{ display: total > 0 ? 'none' : 'block' }"
> --> > -->
<div <div class="nostu" style="display: none">
class="nostu"
style="display:none"
>
<div class="nostuimg"></div> <div class="nostuimg"></div>
</div> </div>
<div class="pa"> <div class="pa">
@@ -1113,7 +1110,7 @@
v-model:projectId="projectId" v-model:projectId="projectId"
v-model:ChangeGroupStuId="ChangeGroupStuId" v-model:ChangeGroupStuId="ChangeGroupStuId"
v-model:ChangeGroupStuName="ChangeGroupStuName" v-model:ChangeGroupStuName="ChangeGroupStuName"
v-model:ChangeGroupId = "ChangeGroupId" v-model:ChangeGroupId="ChangeGroupId"
@changeD="changeGrouped" @changeD="changeGrouped"
/> />
<!-- 组员名单抽屉 --> <!-- 组员名单抽屉 -->
@@ -1134,7 +1131,13 @@
:title="showWorkText" :title="showWorkText"
/> />
<!-- 考试管理抽屉 --> <!-- 考试管理抽屉 -->
<test-manage v-model:TMvisible.sync="TMvisible" v-if="TMvisible" :title="showTestText" :projectTaskId="projectTaskId" :itemsType="itemstype"/> <test-manage
v-model:TMvisible.sync="TMvisible"
v-if="TMvisible"
:title="showTestText"
:projectTaskId="projectTaskId"
:itemsType="itemstype"
/>
<!-- 批量面授报名 --> <!-- 批量面授报名 -->
<task-imp-stu v-model:TaskFaceImpStuvisible="TaskFaceImpStuvisible" /> <task-imp-stu v-model:TaskFaceImpStuvisible="TaskFaceImpStuvisible" />
@@ -2360,7 +2363,7 @@ export default {
//直播、活动页面传递参数 //直播、活动页面传递参数
showkaoqinText: "", showkaoqinText: "",
//所有抽屉的传过去的type //所有抽屉的传过去的type
itemstype:null, itemstype: null,
//排行榜时间 //排行榜时间
rankStartTime: null, rankStartTime: null,
@@ -2756,85 +2759,85 @@ export default {
}; };
//学员管理列表操作 //学员管理列表操作
const studentData = () => { // const studentData = () => {
let arr = state.tabledata; // let arr = state.tabledata;
console.log(arr, "学员管理"); // console.log(arr, "学员管理");
arr.map((value) => { // arr.map((value) => {
value.operation = ( // value.operation = (
<div // <div
style={{ // style={{
display: "flex", // display: "flex",
alignItems: "center", // alignItems: "center",
justifyContent: "center", // justifyContent: "center",
}} // }}
> // >
<div // <div
class="studentopea1" // class="studentopea1"
onClick={() => { // onClick={() => {
if (value.excellent === false) { // if (value.excellent === false) {
state.canclestu = true; // state.canclestu = true;
console.log("youxiu", value.studentId); // console.log("youxiu", value.studentId);
state.changeGoods.push(value.studentId); // state.changeGoods.push(value.studentId);
} else if (value.excellent === true) { // } else if (value.excellent === true) {
state.canclestu1 = true; // state.canclestu1 = true;
console.log("youxiu", value.studentId); // console.log("youxiu", value.studentId);
state.changeGoods.push(value.studentId); // state.changeGoods.push(value.studentId);
} // }
}} // }}
> // >
{value.excellent ? "取消优秀" : "优秀学员"} // {value.excellent ? "取消优秀" : "优秀学员"}
</div> // </div>
<div // <div
class="studentopea2" // class="studentopea2"
onClick={() => { // onClick={() => {
state.Seevisible = true; // state.Seevisible = true;
console.log(value.studentId, "点击了查看"); // console.log(value.studentId, "点击了查看");
state.checkStuId = value.studentId; // state.checkStuId = value.studentId;
}} // }}
> // >
查看 // 查看
</div> // </div>
<div class="studentSelect"> // <div class="studentSelect">
<a-select // <a-select
style="width: 50px" // style="width: 50px"
value="更多" // value="更多"
// options={state.projectNameList} // // options={state.projectNameList}
dropdownClassName="tabledropdown" // dropdownClassName="tabledropdown"
> // >
<a-select-option value="换组" label="换组"> // <a-select-option value="换组" label="换组">
<div // <div
style="cursor:pointer" // style="cursor:pointer"
onClick={() => { // onClick={() => {
state.Changevisible = true; // state.Changevisible = true;
console.log(value, "xixixixix"); // console.log(value, "xixixixix");
state.ChangeGroupStuId = value.studentId; // state.ChangeGroupStuId = value.studentId;
state.ChangeGroupStuName = value.name; // state.ChangeGroupStuName = value.name;
state.ChangeGroupId = value.groupId; // state.ChangeGroupId = value.groupId;
}} // }}
> // >
换组 // 换组
</div> // </div>
</a-select-option> // </a-select-option>
<a-select-option value="删除" label="删除"> // <a-select-option value="删除" label="删除">
<div // <div
style="cursor:pointer" // style="cursor:pointer"
onClick={() => { // onClick={() => {
console.log("点击了111", value.studentId); // console.log("点击了111", value.studentId);
showDeleteOne(value.studentId); // showDeleteOne(value.studentId);
}} // }}
> // >
删除 // 删除
</div> // </div>
</a-select-option> // </a-select-option>
</a-select> // </a-select>
</div> // </div>
</div> // </div>
); // );
}); // });
state.tabledata = arr; // state.tabledata = arr;
}; // };
studentData(); // studentData();
// const studentData = () => { // const studentData = () => {
// let arr = state.tabledata; // let arr = state.tabledata;
// console.log(arr, "学员管理"); // console.log(arr, "学员管理");
@@ -3001,6 +3004,10 @@ export default {
<div <div
onClick={() => { onClick={() => {
state.Changevisible = true; state.Changevisible = true;
console.log(text, "xixixixix");
state.ChangeGroupStuId = text.record.studentId;
state.ChangeGroupStuName = text.record.name;
state.ChangeGroupId = text.record.groupId;
}} }}
> >
换组 换组
@@ -3019,8 +3026,8 @@ export default {
</a-select> </a-select>
</div> </div>
</div> </div>
);
)} },
}, },
]; ];
return tablecolumns; return tablecolumns;