mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
feat:修改随机分组等
This commit is contained in:
@@ -85,6 +85,10 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
getGroup: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
@@ -121,7 +125,7 @@ export default {
|
||||
for (let i = 0; i < state.groupNum; i++) {
|
||||
let obj = {
|
||||
key: i,
|
||||
groupName: "",
|
||||
groupName: "第" + (i + 1) + "小组",
|
||||
capacity: state.peopleNum,
|
||||
};
|
||||
arr.push(obj);
|
||||
@@ -144,9 +148,14 @@ export default {
|
||||
pid: props.projectId,
|
||||
randomGroups: state.groupNum2,
|
||||
};
|
||||
ctx.emit("update:Svisible", false);
|
||||
randomGroup(obj, props.projectId)
|
||||
.then((res) => {
|
||||
console.log("随机分组结果", res);
|
||||
if (res.data.code === 200) {
|
||||
message.success("小组添加成功");
|
||||
props.getGroup && props.getGroup();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("随机分组失败", err);
|
||||
|
||||
Reference in New Issue
Block a user