mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
feat:修改随机分组等
This commit is contained in:
@@ -261,22 +261,22 @@ export default {
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
// {
|
||||
// title: "岗位",
|
||||
// dataIndex: "gangw",
|
||||
// key: "gangw",
|
||||
// width: 60,
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
// {
|
||||
// title: "进度",
|
||||
// dataIndex: "progress",
|
||||
// key: "progress",
|
||||
// width: 60,
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
{
|
||||
title: "岗位",
|
||||
dataIndex: "gangw",
|
||||
key: "gangw",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "进度",
|
||||
dataIndex: "progress",
|
||||
key: "progress",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operations",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div style="display: flex; overflow-x: auto; overflow-y: auto">
|
||||
<div class="tabs" style="min-width: 800px">
|
||||
<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>
|
||||
<a-form-item label="姓名:">
|
||||
@@ -60,7 +60,7 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane> -->
|
||||
</a-tab-pane>
|
||||
<a-tab-pane :key="1" tab="快速选人">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div class="tab1">
|
||||
@@ -235,9 +235,43 @@
|
||||
:style="{ 'max-height': screenHeight - 235 + 'px' }"
|
||||
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="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 class="chose">
|
||||
{{ item.realName }}
|
||||
@@ -268,7 +302,7 @@
|
||||
</div>
|
||||
<div v-if="!selectStu" class="selecteds">
|
||||
<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 class="chose1">
|
||||
<div class="span">{{ item.name }}</div>
|
||||
@@ -300,7 +334,7 @@
|
||||
<!--受众-->
|
||||
<div v-if="!selectStu" class="selecteds">
|
||||
<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 class="chose2">
|
||||
<div class="span">{{ item.audienceName }}</div>
|
||||
@@ -407,7 +441,7 @@ import {
|
||||
import {
|
||||
saveStu,
|
||||
// addGroupMember,
|
||||
// getStuPage,
|
||||
getStuPage,
|
||||
} from "@/api/index1";
|
||||
// import { getProjStu } from "@/api/indexProjStu";
|
||||
const emit = defineEmits({});
|
||||
@@ -451,75 +485,77 @@ const props = defineProps({
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
//获取项目学员
|
||||
// const procurrentPage = ref(1);
|
||||
// const projectList = ref([]);
|
||||
// const proStudentName = ref("");
|
||||
// const projectListTotal = ref(-1);
|
||||
// const projectPageSize = ref(10);
|
||||
// const projectSelectKeys = ref([]);
|
||||
// const projectPagination = computed(() => ({
|
||||
// total: projectListTotal.value,
|
||||
// showSizeChanger: false,
|
||||
// current: procurrentPage.value,
|
||||
// pageSize: projectPageSize.value,
|
||||
// onChange: projectChangePagination,
|
||||
// }));
|
||||
// const projectRowSelection = computed(() => ({
|
||||
// columnWidth: 20,
|
||||
// selectedRowKeys: projectSelectKeys.value,
|
||||
// onChange: onProjectSelectChange,
|
||||
// preserveSelectedRowKeys: true,
|
||||
// }));
|
||||
// const getStu = () => {
|
||||
// let obj = {
|
||||
// studentName: proStudentName.value,
|
||||
// pageNo: procurrentPage.value,
|
||||
// pageSize: 10,
|
||||
// projectId: props.projectId,
|
||||
// };
|
||||
// projectListTotal.value = -1;
|
||||
// console.log("获取项目学员", obj);
|
||||
// getStuPage(obj).then((res) => {
|
||||
// console.log("获取项目学员", res);
|
||||
// if (res.data.code === 200) {
|
||||
// let arr = res.data.data.records;
|
||||
// let array = [];
|
||||
// arr.map((value) => {
|
||||
// let obj = {
|
||||
// id: value.id,
|
||||
// realName: value.studentName,
|
||||
// userNo: value.studentId,
|
||||
// orgName: value.studentOrgName ? value.studentOrgName : "-",
|
||||
// departName: value.studentDepartName ? value.studentDepartName : "-",
|
||||
// };
|
||||
// array.push(obj);
|
||||
// });
|
||||
// projectList.value = array;
|
||||
// projectListTotal.value = res.data.data.total;
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
// getStu();
|
||||
// const projectChangePagination = () => {};
|
||||
// function onProjectSelectChange(e, l) {
|
||||
// console.log("eeeee", e, l);
|
||||
// projectSelectKeys.value = e;
|
||||
// selectsData.value.projectMemberList = l;
|
||||
// }
|
||||
// 获取项目学员;
|
||||
const procurrentPage = ref(1);
|
||||
const projectList = ref([]);
|
||||
const proStudentName = ref("");
|
||||
const projectListTotal = ref(-1);
|
||||
const projectPageSize = ref(10);
|
||||
const projectSelectKeys = ref([]);
|
||||
const member = ref(false);
|
||||
const projectPagination = computed(() => ({
|
||||
total: projectListTotal.value,
|
||||
showSizeChanger: false,
|
||||
current: procurrentPage.value,
|
||||
pageSize: projectPageSize.value,
|
||||
onChange: projectChangePagination,
|
||||
}));
|
||||
const projectRowSelection = computed(() => ({
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: projectSelectKeys.value,
|
||||
onChange: onProjectSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
}));
|
||||
const getStu = () => {
|
||||
let obj = {
|
||||
studentName: proStudentName.value,
|
||||
pageNo: procurrentPage.value,
|
||||
pageSize: 10,
|
||||
projectId: props.projectId,
|
||||
};
|
||||
projectListTotal.value = -1;
|
||||
console.log("获取项目学员", obj);
|
||||
getStuPage(obj).then((res) => {
|
||||
console.log("获取项目学员", res);
|
||||
if (res.data.code === 200) {
|
||||
let arr = res.data.data.records;
|
||||
let array = [];
|
||||
arr.map((value) => {
|
||||
let obj = {
|
||||
id: value.id,
|
||||
realName: value.studentName,
|
||||
userNo: value.studentId,
|
||||
orgName: value.studentOrgName ? value.studentOrgName : "-",
|
||||
departName: value.studentDepartName ? value.studentDepartName : "-",
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
projectList.value = array;
|
||||
projectListTotal.value = res.data.data.total;
|
||||
}
|
||||
});
|
||||
};
|
||||
getStu();
|
||||
const projectChangePagination = () => {};
|
||||
function onProjectSelectChange(e, l) {
|
||||
console.log("eeeee", e, l);
|
||||
projectSelectKeys.value = e;
|
||||
selectsData.value.projectMemberList = l;
|
||||
}
|
||||
|
||||
const person = ref(false);
|
||||
// const dept =ref(false)
|
||||
const group = ref(false);
|
||||
const visiable = ref(false);
|
||||
// const activeKey = ref(props.isGroup ? 4 : 1);
|
||||
const activeKey = ref(1);
|
||||
const activeKey = ref(props.isGroup ? 4 : 1);
|
||||
// const activeKey = ref(1);
|
||||
const stageVisible = ref(false);
|
||||
const selectsData = ref({
|
||||
stageId: "",
|
||||
studentList: [],
|
||||
deptList: [],
|
||||
groupList: [],
|
||||
projectMemberList: [],
|
||||
});
|
||||
const nameSearch = ref({
|
||||
keyword: "",
|
||||
@@ -897,8 +933,8 @@ watch(visiable, () => {
|
||||
nameSearch.value.departId = null;
|
||||
stuTreeExpandedKeys.value = [];
|
||||
stuTreeSelectKeys.value = [];
|
||||
// activeKey.value = props.isGroup ? 4 : 1;
|
||||
activeKey.value = 1;
|
||||
activeKey.value = props.isGroup ? 4 : 1;
|
||||
// activeKey.value = 1;
|
||||
selectsData.value = {
|
||||
stageId: "",
|
||||
studentList: [],
|
||||
|
||||
@@ -1498,7 +1498,11 @@
|
||||
</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" /> -->
|
||||
<!-- 添加学员抽屉 -->
|
||||
@@ -1676,6 +1680,8 @@
|
||||
v-model:value="valueaddg"
|
||||
placeholder="请输入小组名称"
|
||||
style="border-radius: 8px; height: 40px"
|
||||
:maxlength="100"
|
||||
show-count
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user