mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 15:26:48 +08:00
-- fix bug
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
{{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || title }}
|
{{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || title }}
|
||||||
</div>
|
</div>
|
||||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||||
@click="closeDrawer" />
|
@click="closeDrawer"/>
|
||||||
</div>
|
</div>
|
||||||
<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">
|
||||||
@@ -19,10 +19,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<a-form-item label="姓名:">
|
<a-form-item label="姓名:">
|
||||||
<a-input v-model:value="proStudentName" style="width: 260px; height: 40px; border-radius: 8px"
|
<a-input v-model:value="proStudentName" style="width: 260px; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入姓名" />
|
placeholder="请输入姓名"/>
|
||||||
<a-button type="primary" @click="getStu" style="margin-left: 20px; border-radius: 4px">
|
<a-button type="primary" @click="getStu" style="margin-left: 20px; border-radius: 4px">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SearchOutlined />
|
<SearchOutlined/>
|
||||||
</template>
|
</template>
|
||||||
搜索
|
搜索
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<div class="tableBox tabb">
|
<div class="tableBox tabb">
|
||||||
<a-table style="border: 1px solid #f2f6fe; width: 800px" row-key="id" :columns="stuColumns"
|
<a-table style="border: 1px solid #f2f6fe; width: 800px" row-key="id" :columns="stuColumns"
|
||||||
:data-source="projectList" :loading="projectListTotal" :pagination="projectPagination"
|
:data-source="projectList" :loading="projectListTotal" :pagination="projectPagination"
|
||||||
:row-selection="projectRowSelection" />
|
:row-selection="projectRowSelection"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
@@ -42,10 +42,10 @@
|
|||||||
<div class="tab1">
|
<div class="tab1">
|
||||||
<a-form-item label="姓名">
|
<a-form-item label="姓名">
|
||||||
<a-input v-model:value="nameSearch.keyword" style="width: 270px; height: 40px; border-radius: 8px"
|
<a-input v-model:value="nameSearch.keyword" style="width: 270px; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入姓名" @change="peopleName" />
|
placeholder="请输入姓名" @change="peopleName"/>
|
||||||
<a-button type="primary" @click="onSearchStu" style="margin-left: 20px; border-radius: 4px">
|
<a-button type="primary" @click="onSearchStu" style="margin-left: 20px; border-radius: 4px">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SearchOutlined />
|
<SearchOutlined/>
|
||||||
</template>
|
</template>
|
||||||
搜索
|
搜索
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
border: 1px solid #f0f0f0;
|
border: 1px solid #f0f0f0;
|
||||||
">
|
">
|
||||||
<a-table :columns="stuColumns" :data-source="stuData" :pagination="stuPagination"
|
<a-table :columns="stuColumns" :data-source="stuData" :pagination="stuPagination"
|
||||||
:loading="stuLoading" row-key="id" :row-selection="stuRowSelection" />
|
:loading="stuLoading" row-key="id" :row-selection="stuRowSelection"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -85,10 +85,11 @@
|
|||||||
<div class="tab2">
|
<div class="tab2">
|
||||||
<a-form-item label="组织:">
|
<a-form-item label="组织:">
|
||||||
<a-input v-model:value="searchOrgName.keyword"
|
<a-input v-model:value="searchOrgName.keyword"
|
||||||
style="width: 230px; height: 40px; border-radius: 8px" placeholder="请输入组织" @click="orgValue"/>
|
style="width: 230px; height: 40px; border-radius: 8px" placeholder="请输入组织"
|
||||||
|
@click="orgValue"/>
|
||||||
<a-button type="primary" @click="searchOrg" style="margin-left: 20px; border-radius: 4px">
|
<a-button type="primary" @click="searchOrg" style="margin-left: 20px; border-radius: 4px">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SearchOutlined />
|
<SearchOutlined/>
|
||||||
</template>
|
</template>
|
||||||
搜索
|
搜索
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -97,7 +98,8 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="boeTree">
|
<div class="boeTree">
|
||||||
<a-tree v-model:selectedKeys="selectedOrgKeys" :tree-data="searchOrgName.keyword ? orgData : treeOrgData" @select="onOrgSelectChange"
|
<a-tree v-model:selectedKeys="selectedOrgKeys"
|
||||||
|
:tree-data="searchOrgName.keyword ? orgData : treeOrgData" @select="onOrgSelectChange"
|
||||||
:loading="orgOrgLoading" :load-data="onLoadOrgData" :fieldNames="{
|
:loading="orgOrgLoading" :load-data="onLoadOrgData" :fieldNames="{
|
||||||
children: 'treeChildList',
|
children: 'treeChildList',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
@@ -112,11 +114,12 @@
|
|||||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||||
<div>
|
<div>
|
||||||
<a-form-item label="受众名称:">
|
<a-form-item label="受众名称:">
|
||||||
<a-input v-model:value="audienceName.keyword" style="width: 260px; height: 40px; border-radius: 8px"
|
<a-input v-model:value="audienceName.keyword"
|
||||||
placeholder="请输入受众名称" />
|
style="width: 260px; height: 40px; border-radius: 8px"
|
||||||
|
placeholder="请输入受众名称"/>
|
||||||
<a-button type="primary" @click="searchAudi" style="margin-left: 20px; border-radius: 4px">
|
<a-button type="primary" @click="searchAudi" style="margin-left: 20px; border-radius: 4px">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SearchOutlined />
|
<SearchOutlined/>
|
||||||
</template>
|
</template>
|
||||||
搜索
|
搜索
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -127,7 +130,7 @@
|
|||||||
<div class="tableBox tabb">
|
<div class="tableBox tabb">
|
||||||
<a-table style="border: 1px solid #f2f6fe; width: 800px" row-key="id" :columns="audiColums"
|
<a-table style="border: 1px solid #f2f6fe; width: 800px" row-key="id" :columns="audiColums"
|
||||||
:data-source="audiData" :loading="audiLoading" :pagination="auditPagination"
|
:data-source="audiData" :loading="audiLoading" :pagination="auditPagination"
|
||||||
:row-selection="auditRowSelection" />
|
:row-selection="auditRowSelection"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
@@ -267,18 +270,19 @@
|
|||||||
<div class="inher">
|
<div class="inher">
|
||||||
<!-- <div class="cur">当前关卡:关卡2</div> -->
|
<!-- <div class="cur">当前关卡:关卡2</div> -->
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<a-select style="width: 400px" :placeholder="type === 1 ? '选择阶段' : '选择关卡'" v-model:value="selectsData.stageId"
|
<a-select style="width: 400px" :placeholder="type === 1 ? '选择阶段' : '选择关卡'"
|
||||||
|
v-model:value="selectsData.stageId"
|
||||||
className="cus-select">
|
className="cus-select">
|
||||||
<a-select-option v-for="(item, i) in stageIds" :key="i" :value="item.id">{{ item.name || "默认" }}
|
<a-select-option v-for="(item, i) in stageIds" :key="i" :value="item.id">{{ item.name || "默认" }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #999999; margin-left: 10px"><minus-circle-outlined />已在其他关卡的学员,不会被添加到该关卡</span>
|
<span style="color: #999999; margin-left: 10px"><minus-circle-outlined/>已在其他关卡的学员,不会被添加到该关卡</span>
|
||||||
<div class="btn" style="margin-top: 50px">
|
<div class="btn" style="margin-top: 50px">
|
||||||
<button class="sameb btn1" @click="closeChangeModal" style="cursor: pointer">
|
<button class="sameb btn1" @click="closeChangeModal" style="cursor: pointer">
|
||||||
取消
|
取消
|
||||||
</button>
|
</button>
|
||||||
<button class="sameb btn2" @click="handleStageOk" style="cursor: pointer">
|
<button class="sameb btn2" @click="handleDialogOk" style="cursor: pointer">
|
||||||
确定
|
确定
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -288,9 +292,9 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { message } from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
import { computed, defineEmits, defineProps, ref, watch } from "vue";
|
import {computed, defineEmits, defineProps, ref, watch} from "vue";
|
||||||
import { boeRequest, useBoeApi, useBoeApiPage } from "@/api/request";
|
import {boeRequest, useBoeApi, useBoeApiPage} from "@/api/request";
|
||||||
import {
|
import {
|
||||||
AUDIENCE_LIST,
|
AUDIENCE_LIST,
|
||||||
ORG_CHILD_LIST,
|
ORG_CHILD_LIST,
|
||||||
@@ -303,6 +307,7 @@ import {
|
|||||||
// addGroupMember,
|
// addGroupMember,
|
||||||
getStuPage,
|
getStuPage,
|
||||||
} from "@/api/index1";
|
} from "@/api/index1";
|
||||||
|
import dialog from "@/utils/dialog";
|
||||||
// import { getProjStu } from "@/api/indexProjStu";
|
// import { getProjStu } from "@/api/indexProjStu";
|
||||||
const emit = defineEmits({});
|
const emit = defineEmits({});
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -357,7 +362,7 @@ const props = defineProps({
|
|||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log("props.activeKey1" + props.activeKey1)
|
console.log("props.activeKey1" + props.activeKey1);
|
||||||
// 获取项目学员;
|
// 获取项目学员;
|
||||||
const procurrentPage = ref(1);
|
const procurrentPage = ref(1);
|
||||||
const projectList = ref([]);
|
const projectList = ref([]);
|
||||||
@@ -414,6 +419,7 @@ const projectChangePagination = (page) => {
|
|||||||
procurrentPage.value = page;
|
procurrentPage.value = page;
|
||||||
getStu();
|
getStu();
|
||||||
};
|
};
|
||||||
|
|
||||||
function onProjectSelectChange(e, l) {
|
function onProjectSelectChange(e, l) {
|
||||||
console.log("eeeee", e, l);
|
console.log("eeeee", e, l);
|
||||||
projectSelectKeys.value = e;
|
projectSelectKeys.value = e;
|
||||||
@@ -670,14 +676,14 @@ function stuDel(i) {
|
|||||||
const selectedOrgKeys = ref([]);
|
const selectedOrgKeys = ref([]);
|
||||||
|
|
||||||
watch(selectedOrgKeys, () => {
|
watch(selectedOrgKeys, () => {
|
||||||
console.log('selectedKeys', selectedOrgKeys);
|
console.log("selectedKeys", selectedOrgKeys);
|
||||||
});
|
});
|
||||||
|
|
||||||
function orgDel(i) {
|
function orgDel(i) {
|
||||||
console.log(selectedOrgKeys.value)
|
console.log(selectedOrgKeys.value);
|
||||||
orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id)
|
orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id);
|
||||||
selectedOrgKeys.value.splice(i, 1)
|
selectedOrgKeys.value.splice(i, 1);
|
||||||
selectsData.value.deptList.splice(i, 1)
|
selectsData.value.deptList.splice(i, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function AuditDel(i) {
|
function AuditDel(i) {
|
||||||
@@ -777,6 +783,14 @@ const submitAuth = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function handleDialogOk() {
|
||||||
|
if (selectsData.value.groupList.length || selectsData.value.deptList.length) {
|
||||||
|
dialog({ content: "您选择了组织或受众,此添加为异步添加,请稍后手动刷新学员!", ok: handleStageOk });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
handleStageOk();
|
||||||
|
}
|
||||||
|
|
||||||
function handleStageOk() {
|
function handleStageOk() {
|
||||||
// debugger
|
// debugger
|
||||||
// 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
|
// 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
|
||||||
@@ -784,21 +798,21 @@ function handleStageOk() {
|
|||||||
if (props.groupMemberCount !== null) { // 只有添加组员的时候判断
|
if (props.groupMemberCount !== null) { // 只有添加组员的时候判断
|
||||||
let selectMember = 0;
|
let selectMember = 0;
|
||||||
if (activeKey.value === 4) { // 项目内选人
|
if (activeKey.value === 4) { // 项目内选人
|
||||||
selectMember = selectsData.value.projectMemberList.length
|
selectMember = selectsData.value.projectMemberList.length;
|
||||||
} else if (activeKey.value === 1) {
|
} else if (activeKey.value === 1) {
|
||||||
selectMember = selectsData.value.studentList.length
|
selectMember = selectsData.value.studentList.length;
|
||||||
} else if (activeKey.value === 2) {
|
} else if (activeKey.value === 2) {
|
||||||
selectMember = selectsData.value.groupList.length
|
selectMember = selectsData.value.groupList.length;
|
||||||
} else if (activeKey.value === 3) {
|
} else if (activeKey.value === 3) {
|
||||||
selectMember = selectsData.value.deptList.length
|
selectMember = selectsData.value.deptList.length;
|
||||||
}
|
}
|
||||||
if (props.groupMemberCount < selectMember + Number(props.groupMemberNumber)) {
|
if (props.groupMemberCount < selectMember + Number(props.groupMemberNumber)) {
|
||||||
return message.warning("添加小组学员超过最大值");
|
return message.warning("添加小组学员超过最大值");
|
||||||
}
|
}
|
||||||
// 判断是否是组长,组长不能添加
|
// 判断是否是组长,组长不能添加
|
||||||
const leaderArray = selectsData.value.projectMemberList.filter(item => item.isLeader === '1');
|
const leaderArray = selectsData.value.projectMemberList.filter(item => item.isLeader === "1");
|
||||||
if (leaderArray.length > 0) {
|
if (leaderArray.length > 0) {
|
||||||
return message.warning("当前选中学员"+leaderArray[0].realName+"已是小组长,请勿重复选择。");
|
return message.warning("当前选中学员" + leaderArray[0].realName + "已是小组长,请勿重复选择。");
|
||||||
}
|
}
|
||||||
// 对选中的人员进行判断是否已经分组了
|
// 对选中的人员进行判断是否已经分组了
|
||||||
let haveGroupNum = selectsData.value.projectMemberList.filter(item => item.groupId !== null);
|
let haveGroupNum = selectsData.value.projectMemberList.filter(item => item.groupId !== null);
|
||||||
|
|||||||
@@ -475,23 +475,7 @@ const subdeleteAll = () => {
|
|||||||
message.warning("请选择要删除的任务!");
|
message.warning("请选择要删除的任务!");
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dialog({
|
|
||||||
content: '确定要删除所选任务吗?',
|
|
||||||
ok: () => {
|
|
||||||
for (let i = 0; i < routerInfo.value.chapterList[activeIndex.value].draftTaskList.length; i++) {
|
|
||||||
const t = routerInfo.value.chapterList[activeIndex.value].draftTaskList[i]
|
|
||||||
if (t.checked) {
|
|
||||||
if (t.id) {
|
|
||||||
t.checked = false;
|
|
||||||
t.deleted = true;
|
|
||||||
} else {
|
|
||||||
routerInfo.value.chapterList[activeIndex.value].draftTaskList.splice(i, 1);
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//全选任务或全不选任务
|
//全选任务或全不选任务
|
||||||
|
|||||||
Reference in New Issue
Block a user