mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 20:36:45 +08:00
feat:修改随机分组等
This commit is contained in:
@@ -261,22 +261,22 @@ export default {
|
|||||||
align: "center",
|
align: "center",
|
||||||
className: "h",
|
className: "h",
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// title: "岗位",
|
title: "岗位",
|
||||||
// dataIndex: "gangw",
|
dataIndex: "gangw",
|
||||||
// key: "gangw",
|
key: "gangw",
|
||||||
// width: 60,
|
width: 60,
|
||||||
// align: "center",
|
align: "center",
|
||||||
// className: "h",
|
className: "h",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// title: "进度",
|
title: "进度",
|
||||||
// dataIndex: "progress",
|
dataIndex: "progress",
|
||||||
// key: "progress",
|
key: "progress",
|
||||||
// width: 60,
|
width: 60,
|
||||||
// align: "center",
|
align: "center",
|
||||||
// className: "h",
|
className: "h",
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "operations",
|
dataIndex: "operations",
|
||||||
|
|||||||
@@ -85,6 +85,10 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
getGroup: {
|
||||||
|
type: Function,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@@ -121,7 +125,7 @@ export default {
|
|||||||
for (let i = 0; i < state.groupNum; i++) {
|
for (let i = 0; i < state.groupNum; i++) {
|
||||||
let obj = {
|
let obj = {
|
||||||
key: i,
|
key: i,
|
||||||
groupName: "",
|
groupName: "第" + (i + 1) + "小组",
|
||||||
capacity: state.peopleNum,
|
capacity: state.peopleNum,
|
||||||
};
|
};
|
||||||
arr.push(obj);
|
arr.push(obj);
|
||||||
@@ -144,9 +148,14 @@ export default {
|
|||||||
pid: props.projectId,
|
pid: props.projectId,
|
||||||
randomGroups: state.groupNum2,
|
randomGroups: state.groupNum2,
|
||||||
};
|
};
|
||||||
|
ctx.emit("update:Svisible", false);
|
||||||
randomGroup(obj, props.projectId)
|
randomGroup(obj, props.projectId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("随机分组结果", res);
|
console.log("随机分组结果", res);
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
message.success("小组添加成功");
|
||||||
|
props.getGroup && props.getGroup();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("随机分组失败", err);
|
console.log("随机分组失败", err);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div style="display: flex; overflow-x: auto; overflow-y: auto">
|
<div style="display: flex; overflow-x: auto; overflow-y: auto">
|
||||||
<div class="tabs" style="min-width: 800px">
|
<div class="tabs" style="min-width: 800px">
|
||||||
<a-tabs v-model:activeKey="activeKey">
|
<a-tabs v-model:activeKey="activeKey">
|
||||||
<!-- <a-tab-pane v-if="isGroup" :key="4" tab="项目内学员">
|
<a-tab-pane v-if="isGroup" :key="4" tab="项目内学员">
|
||||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||||
<div>
|
<div>
|
||||||
<a-form-item label="姓名:">
|
<a-form-item label="姓名:">
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane> -->
|
</a-tab-pane>
|
||||||
<a-tab-pane :key="1" tab="快速选人">
|
<a-tab-pane :key="1" tab="快速选人">
|
||||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||||
<div class="tab1">
|
<div class="tab1">
|
||||||
@@ -235,9 +235,43 @@
|
|||||||
:style="{ 'max-height': screenHeight - 235 + 'px' }"
|
:style="{ 'max-height': screenHeight - 235 + 'px' }"
|
||||||
style="overflow-y: auto"
|
style="overflow-y: auto"
|
||||||
>
|
>
|
||||||
|
<div class="selecteds" v-if="isGroup">
|
||||||
|
<div class="person">项目内学员</div>
|
||||||
|
<div
|
||||||
|
v-for="(item, i) in selectsData.projectMemberList"
|
||||||
|
:key="i"
|
||||||
|
>
|
||||||
|
<div v-if="i < 11">
|
||||||
|
<div class="chose">
|
||||||
|
{{ item.realName }}
|
||||||
|
<div class="ch" @click="stuDel(i)"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div v-if="person">
|
||||||
|
<div class="chose">
|
||||||
|
{{ item.realName }}
|
||||||
|
<div class="ch" @click="stuDel(i)"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="!member && selectsData.projectMemberList?.length > 10"
|
||||||
|
class="ifsw"
|
||||||
|
>
|
||||||
|
<div @click="member = !member" class="“sw”">查看更多></div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="member && selectsData.projectMemberList?.length > 10"
|
||||||
|
class="ifsw"
|
||||||
|
>
|
||||||
|
<div @click="member = !member" class="sw">收起<</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="selecteds">
|
<div class="selecteds">
|
||||||
<div class="person">快速选人</div>
|
<div class="person">快速选人</div>
|
||||||
<div v-for="(item, i) in selectsData.studentList">
|
<div v-for="(item, i) in selectsData.studentList" :key="i">
|
||||||
<div v-if="i < 11">
|
<div v-if="i < 11">
|
||||||
<div class="chose">
|
<div class="chose">
|
||||||
{{ item.realName }}
|
{{ item.realName }}
|
||||||
@@ -268,7 +302,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-if="!selectStu" class="selecteds">
|
<div v-if="!selectStu" class="selecteds">
|
||||||
<div class="dept">添加组织</div>
|
<div class="dept">添加组织</div>
|
||||||
<div v-for="(item, i) in selectsData.deptList">
|
<div v-for="(item, i) in selectsData.deptList" :key="i">
|
||||||
<div v-if="i < 11">
|
<div v-if="i < 11">
|
||||||
<div class="chose1">
|
<div class="chose1">
|
||||||
<div class="span">{{ item.name }}</div>
|
<div class="span">{{ item.name }}</div>
|
||||||
@@ -300,7 +334,7 @@
|
|||||||
<!--受众-->
|
<!--受众-->
|
||||||
<div v-if="!selectStu" class="selecteds">
|
<div v-if="!selectStu" class="selecteds">
|
||||||
<div class="group">受众关联</div>
|
<div class="group">受众关联</div>
|
||||||
<div v-for="(item, i) in selectsData.groupList">
|
<div v-for="(item, i) in selectsData.groupList" :key="i">
|
||||||
<div v-if="i < 11">
|
<div v-if="i < 11">
|
||||||
<div class="chose2">
|
<div class="chose2">
|
||||||
<div class="span">{{ item.audienceName }}</div>
|
<div class="span">{{ item.audienceName }}</div>
|
||||||
@@ -407,7 +441,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
saveStu,
|
saveStu,
|
||||||
// addGroupMember,
|
// addGroupMember,
|
||||||
// getStuPage,
|
getStuPage,
|
||||||
} from "@/api/index1";
|
} from "@/api/index1";
|
||||||
// import { getProjStu } from "@/api/indexProjStu";
|
// import { getProjStu } from "@/api/indexProjStu";
|
||||||
const emit = defineEmits({});
|
const emit = defineEmits({});
|
||||||
@@ -451,75 +485,77 @@ const props = defineProps({
|
|||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
//获取项目学员
|
// 获取项目学员;
|
||||||
// const procurrentPage = ref(1);
|
const procurrentPage = ref(1);
|
||||||
// const projectList = ref([]);
|
const projectList = ref([]);
|
||||||
// const proStudentName = ref("");
|
const proStudentName = ref("");
|
||||||
// const projectListTotal = ref(-1);
|
const projectListTotal = ref(-1);
|
||||||
// const projectPageSize = ref(10);
|
const projectPageSize = ref(10);
|
||||||
// const projectSelectKeys = ref([]);
|
const projectSelectKeys = ref([]);
|
||||||
// const projectPagination = computed(() => ({
|
const member = ref(false);
|
||||||
// total: projectListTotal.value,
|
const projectPagination = computed(() => ({
|
||||||
// showSizeChanger: false,
|
total: projectListTotal.value,
|
||||||
// current: procurrentPage.value,
|
showSizeChanger: false,
|
||||||
// pageSize: projectPageSize.value,
|
current: procurrentPage.value,
|
||||||
// onChange: projectChangePagination,
|
pageSize: projectPageSize.value,
|
||||||
// }));
|
onChange: projectChangePagination,
|
||||||
// const projectRowSelection = computed(() => ({
|
}));
|
||||||
// columnWidth: 20,
|
const projectRowSelection = computed(() => ({
|
||||||
// selectedRowKeys: projectSelectKeys.value,
|
columnWidth: 20,
|
||||||
// onChange: onProjectSelectChange,
|
selectedRowKeys: projectSelectKeys.value,
|
||||||
// preserveSelectedRowKeys: true,
|
onChange: onProjectSelectChange,
|
||||||
// }));
|
preserveSelectedRowKeys: true,
|
||||||
// const getStu = () => {
|
}));
|
||||||
// let obj = {
|
const getStu = () => {
|
||||||
// studentName: proStudentName.value,
|
let obj = {
|
||||||
// pageNo: procurrentPage.value,
|
studentName: proStudentName.value,
|
||||||
// pageSize: 10,
|
pageNo: procurrentPage.value,
|
||||||
// projectId: props.projectId,
|
pageSize: 10,
|
||||||
// };
|
projectId: props.projectId,
|
||||||
// projectListTotal.value = -1;
|
};
|
||||||
// console.log("获取项目学员", obj);
|
projectListTotal.value = -1;
|
||||||
// getStuPage(obj).then((res) => {
|
console.log("获取项目学员", obj);
|
||||||
// console.log("获取项目学员", res);
|
getStuPage(obj).then((res) => {
|
||||||
// if (res.data.code === 200) {
|
console.log("获取项目学员", res);
|
||||||
// let arr = res.data.data.records;
|
if (res.data.code === 200) {
|
||||||
// let array = [];
|
let arr = res.data.data.records;
|
||||||
// arr.map((value) => {
|
let array = [];
|
||||||
// let obj = {
|
arr.map((value) => {
|
||||||
// id: value.id,
|
let obj = {
|
||||||
// realName: value.studentName,
|
id: value.id,
|
||||||
// userNo: value.studentId,
|
realName: value.studentName,
|
||||||
// orgName: value.studentOrgName ? value.studentOrgName : "-",
|
userNo: value.studentId,
|
||||||
// departName: value.studentDepartName ? value.studentDepartName : "-",
|
orgName: value.studentOrgName ? value.studentOrgName : "-",
|
||||||
// };
|
departName: value.studentDepartName ? value.studentDepartName : "-",
|
||||||
// array.push(obj);
|
};
|
||||||
// });
|
array.push(obj);
|
||||||
// projectList.value = array;
|
});
|
||||||
// projectListTotal.value = res.data.data.total;
|
projectList.value = array;
|
||||||
// }
|
projectListTotal.value = res.data.data.total;
|
||||||
// });
|
}
|
||||||
// };
|
});
|
||||||
// getStu();
|
};
|
||||||
// const projectChangePagination = () => {};
|
getStu();
|
||||||
// function onProjectSelectChange(e, l) {
|
const projectChangePagination = () => {};
|
||||||
// console.log("eeeee", e, l);
|
function onProjectSelectChange(e, l) {
|
||||||
// projectSelectKeys.value = e;
|
console.log("eeeee", e, l);
|
||||||
// selectsData.value.projectMemberList = l;
|
projectSelectKeys.value = e;
|
||||||
// }
|
selectsData.value.projectMemberList = l;
|
||||||
|
}
|
||||||
|
|
||||||
const person = ref(false);
|
const person = ref(false);
|
||||||
// const dept =ref(false)
|
// const dept =ref(false)
|
||||||
const group = ref(false);
|
const group = ref(false);
|
||||||
const visiable = ref(false);
|
const visiable = ref(false);
|
||||||
// const activeKey = ref(props.isGroup ? 4 : 1);
|
const activeKey = ref(props.isGroup ? 4 : 1);
|
||||||
const activeKey = ref(1);
|
// const activeKey = ref(1);
|
||||||
const stageVisible = ref(false);
|
const stageVisible = ref(false);
|
||||||
const selectsData = ref({
|
const selectsData = ref({
|
||||||
stageId: "",
|
stageId: "",
|
||||||
studentList: [],
|
studentList: [],
|
||||||
deptList: [],
|
deptList: [],
|
||||||
groupList: [],
|
groupList: [],
|
||||||
|
projectMemberList: [],
|
||||||
});
|
});
|
||||||
const nameSearch = ref({
|
const nameSearch = ref({
|
||||||
keyword: "",
|
keyword: "",
|
||||||
@@ -897,8 +933,8 @@ watch(visiable, () => {
|
|||||||
nameSearch.value.departId = null;
|
nameSearch.value.departId = null;
|
||||||
stuTreeExpandedKeys.value = [];
|
stuTreeExpandedKeys.value = [];
|
||||||
stuTreeSelectKeys.value = [];
|
stuTreeSelectKeys.value = [];
|
||||||
// activeKey.value = props.isGroup ? 4 : 1;
|
activeKey.value = props.isGroup ? 4 : 1;
|
||||||
activeKey.value = 1;
|
// activeKey.value = 1;
|
||||||
selectsData.value = {
|
selectsData.value = {
|
||||||
stageId: "",
|
stageId: "",
|
||||||
studentList: [],
|
studentList: [],
|
||||||
|
|||||||
@@ -1498,7 +1498,11 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
<!-- 学员(小组管理)创建小组抽屉 -->
|
<!-- 学员(小组管理)创建小组抽屉 -->
|
||||||
<subset-manage v-model:Svisible="subsetVisivle" :projectId="projectId" />
|
<subset-manage
|
||||||
|
v-model:Svisible="subsetVisivle"
|
||||||
|
:projectId="projectId"
|
||||||
|
v-model:getGroup="getGroup"
|
||||||
|
/>
|
||||||
<!-- 学员管理-添加学员抽屉 -->
|
<!-- 学员管理-添加学员抽屉 -->
|
||||||
<!-- <stu-add v-model:Stuvisible="Stuvisible" /> -->
|
<!-- <stu-add v-model:Stuvisible="Stuvisible" /> -->
|
||||||
<!-- 添加学员抽屉 -->
|
<!-- 添加学员抽屉 -->
|
||||||
@@ -1676,6 +1680,8 @@
|
|||||||
v-model:value="valueaddg"
|
v-model:value="valueaddg"
|
||||||
placeholder="请输入小组名称"
|
placeholder="请输入小组名称"
|
||||||
style="border-radius: 8px; height: 40px"
|
style="border-radius: 8px; height: 40px"
|
||||||
|
:maxlength="100"
|
||||||
|
show-count
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user