Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop

This commit is contained in:
peiqingliu
2023-02-23 16:30:42 +08:00
2 changed files with 72 additions and 213 deletions

View File

@@ -7,9 +7,9 @@ VUE_APP_LOGIN_URL=//u-pre.boe.com/web
VUE_APP_BOE_API_URL=//u-pre.boe.com VUE_APP_BOE_API_URL=//u-pre.boe.com
# 导入学员模板 # 导入学员模板
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx VUE_APP_UP_LOAD_STUDENT_TEMPLATE=coursefile/导入学员模版-1677140876274.xlsx
# 外部考试导入成绩模板 # 外部考试导入成绩模板
VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=coursefile/外部考试学员成绩导入模板-1676551319283.xlsx VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=coursefile/外部考试学员成绩导入模板-1677055614438.xlsx
#在线 #在线
VITE_BOE_ONLINE_CLASS_URL=//u-pre.boe.com/pc/course/studyindex?id= VITE_BOE_ONLINE_CLASS_URL=//u-pre.boe.com/pc/course/studyindex?id=
VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id= VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id=

View File

@@ -2,22 +2,14 @@
<!-- eslint-disable vue/require-v-for-key --> <!-- eslint-disable vue/require-v-for-key -->
<template> <template>
<div class="CommonStudent"> <div class="CommonStudent">
<a-drawer <a-drawer :visible="visiable" class="drawerStyle ProjCheckship CommonStudent" placement="right" width="60%">
:visible="visiable"
class="drawerStyle ProjCheckship CommonStudent"
placement="right"
width="60%"
>
<div class="drawerMain" id="ProjCheckship" style=""> <div class="drawerMain" id="ProjCheckship" style="">
<div class="header"> <div class="header">
<div class="headerTitle"> <div class="headerTitle">
{{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || title }} {{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || title }}
</div> </div>
<img <img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
style="width: 29px; height: 29px; cursor: pointer" @click="closeDrawer" />
src="../../assets/images/basicinfo/close.png"
@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">
@@ -26,38 +18,22 @@
<div :style="{ height: screenHeight - 235 + 'px' }"> <div :style="{ height: screenHeight - 235 + 'px' }">
<div> <div>
<a-form-item label="姓名:"> <a-form-item label="姓名:">
<a-input <a-input v-model:value="proStudentName" style="width: 260px; height: 40px; border-radius: 8px"
v-model:value="proStudentName" placeholder="请输入姓名" />
style="width: 260px; height: 40px; border-radius: 8px" <a-button type="primary" @click="getStu" style="margin-left: 20px; border-radius: 4px">
placeholder="请输入姓名"
/>
<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>
<a-button <a-button @click="getStu" style="margin-left: 20px; border-radius: 4px">重置
@click="getStu"
style="margin-left: 20px; border-radius: 4px"
>重置
</a-button> </a-button>
</a-form-item> </a-form-item>
</div> </div>
<div class="tableBox tabb"> <div class="tableBox tabb">
<a-table <a-table style="border: 1px solid #f2f6fe; width: 800px" row-key="id" :columns="stuColumns"
style="border: 1px solid #f2f6fe; width: 800px" :data-source="projectList" :loading="projectListTotal" :pagination="projectPagination"
row-key="id" :row-selection="projectRowSelection" />
:columns="stuColumns"
:data-source="projectList"
:loading="projectListTotal"
:pagination="projectPagination"
:row-selection="projectRowSelection"
/>
</div> </div>
</div> </div>
</a-tab-pane> </a-tab-pane>
@@ -65,75 +41,41 @@
<div :style="{ height: screenHeight - 235 + 'px' }"> <div :style="{ height: screenHeight - 235 + 'px' }">
<div class="tab1"> <div class="tab1">
<a-form-item label="姓名"> <a-form-item label="姓名">
<a-input <a-input v-model:value="nameSearch.keyword" style="width: 270px; height: 40px; border-radius: 8px"
v-model:value="nameSearch.keyword" placeholder="请输入姓名" @change="peopleName" />
style="width: 270px; height: 40px; border-radius: 8px" <a-button type="primary" @click="onSearchStu" style="margin-left: 20px; border-radius: 4px">
placeholder="请输入姓名"
@change="peopleName"
/>
<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>
<a-button <a-button @click="resetStu" style="margin-left: 20px; border-radius: 4px">重置
@click="resetStu"
style="margin-left: 20px; border-radius: 4px"
>重置
</a-button> </a-button>
</a-form-item> </a-form-item>
</div> </div>
<div <div class="chooseLeft" style="display: grid; grid-template-columns: 250px auto">
class="chooseLeft" <div :style="{
style="display: grid; grid-template-columns: 250px auto"
>
<div
:style="{
height: screenHeight - 180 + 'px', height: screenHeight - 180 + 'px',
overflowY: 'auto', overflowY: 'auto',
}" }" style="border: 1px solid #f0f0f0">
style="border: 1px solid #f0f0f0"
>
<div class="tree" style="margin: 10px 4px 220px 10px"> <div class="tree" style="margin: 10px 4px 220px 10px">
<a-tree <a-tree allow-clear tree-default-expand-all :tree-data="treeData" :loading="orgLoading"
allow-clear :load-data="onLoadData" v-model:selectedKeys="stuTreeSelectKeys"
tree-default-expand-all v-model:expandedKeys="stuTreeExpandedKeys" :fieldNames="{
:tree-data="treeData"
:loading="orgLoading"
:load-data="onLoadData"
v-model:selectedKeys="stuTreeSelectKeys"
v-model:expandedKeys="stuTreeExpandedKeys"
:fieldNames="{
children: 'treeChildList', children: 'treeChildList',
key: 'id', key: 'id',
title: 'name', title: 'name',
value: 'name', value: 'name',
}" }" @select="stuStuOrgSelect">
@select="stuStuOrgSelect"
>
</a-tree> </a-tree>
</div> </div>
</div> </div>
<div <div class="tableBox tabb" style="
class="tableBox tabb"
style="
margin: 0px 4px 120px 10px; margin: 0px 4px 120px 10px;
border: 1px solid #f0f0f0; border: 1px solid #f0f0f0;
" ">
> <a-table :columns="stuColumns" :data-source="stuData" :pagination="stuPagination"
<a-table :loading="stuLoading" row-key="id" :row-selection="stuRowSelection" />
:columns="stuColumns"
:data-source="stuData"
:pagination="stuPagination"
:loading="stuLoading"
row-key="id"
:row-selection="stuRowSelection"
/>
</div> </div>
</div> </div>
</div> </div>
@@ -142,44 +84,26 @@
<div :style="{ height: screenHeight - 235 + 'px' }"> <div :style="{ height: screenHeight - 235 + 'px' }">
<div class="tab2"> <div class="tab2">
<a-form-item label="组织:"> <a-form-item label="组织:">
<a-input <a-input v-model:value="searchOrgName.keyword"
v-model:value="searchOrgName.keyword" style="width: 230px; height: 40px; border-radius: 8px" placeholder="请输入组织" />
style="width: 230px; height: 40px; border-radius: 8px" <a-button type="primary" @click="searchOrg" style="margin-left: 20px; border-radius: 4px">
placeholder="请输入组织"
/>
<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>
<a-button <a-button @click="resetOrg" style="margin-left: 20px; border-radius: 4px">重置
@click="resetOrg"
style="margin-left: 20px; border-radius: 4px"
>重置
</a-button> </a-button>
</a-form-item> </a-form-item>
</div> </div>
<div class="boeTree"> <div class="boeTree">
<a-tree <a-tree :tree-data="searchOrgName.keyword ? orgData : treeOrgData" @select="onOrgSelectChange"
:tree-data="searchOrgName.keyword ? orgData : treeOrgData" :loading="orgOrgLoading" :load-data="onLoadOrgData" :fieldNames="{
@select="onOrgSelectChange"
:loading="orgOrgLoading"
:load-data="onLoadOrgData"
:fieldNames="{
children: 'treeChildList', children: 'treeChildList',
key: 'id', key: 'id',
title: 'name', title: 'name',
value: 'name', value: 'name',
}" }" row-key="id" :row-selection="orgRowSelection" multiple>
row-key="id"
:row-selection="orgRowSelection"
multiple
>
</a-tree> </a-tree>
</div> </div>
</div> </div>
@@ -188,38 +112,22 @@
<div :style="{ height: screenHeight - 235 + 'px' }"> <div :style="{ height: screenHeight - 235 + 'px' }">
<div> <div>
<a-form-item label="受众名称:"> <a-form-item label="受众名称:">
<a-input <a-input v-model:value="audienceName.keyword" style="width: 260px; height: 40px; border-radius: 8px"
v-model:value="audienceName.keyword" placeholder="请输入受众名称" />
style="width: 260px; height: 40px; border-radius: 8px" <a-button type="primary" @click="searchAudi" style="margin-left: 20px; border-radius: 4px">
placeholder="请输入受众名称"
/>
<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>
<a-button <a-button @click="resetAudienceInfo" style="margin-left: 20px; border-radius: 4px">重置
@click="resetAudienceInfo"
style="margin-left: 20px; border-radius: 4px"
>重置
</a-button> </a-button>
</a-form-item> </a-form-item>
</div> </div>
<div class="tableBox tabb"> <div class="tableBox tabb">
<a-table <a-table style="border: 1px solid #f2f6fe; width: 800px" row-key="id" :columns="audiColums"
style="border: 1px solid #f2f6fe; width: 800px" :data-source="audiData" :loading="audiLoading" :pagination="auditPagination"
row-key="id" :row-selection="auditRowSelection" />
:columns="audiColums"
:data-source="audiData"
:loading="audiLoading"
:pagination="auditPagination"
:row-selection="auditRowSelection"
/>
</div> </div>
</div> </div>
</a-tab-pane> </a-tab-pane>
@@ -231,16 +139,10 @@
<div class="already">已选</div> <div class="already">已选</div>
</div> </div>
</div> </div>
<div <div :style="{ 'max-height': screenHeight - 235 + 'px' }" style="overflow-y: auto">
:style="{ 'max-height': screenHeight - 235 + 'px' }"
style="overflow-y: auto"
>
<div class="selecteds" v-if="isGroup"> <div class="selecteds" v-if="isGroup">
<div class="person">项目内学员</div> <div class="person">项目内学员</div>
<div <div v-for="(item, i) in selectsData.projectMemberList" :key="i">
v-for="(item, i) in selectsData.projectMemberList"
:key="i"
>
<div v-if="i < 11"> <div v-if="i < 11">
<div class="chose"> <div class="chose">
{{ item.realName }} {{ item.realName }}
@@ -256,16 +158,10 @@
</div> </div>
</div> </div>
</div> </div>
<div <div v-if="!member && selectsData.projectMemberList?.length > 10" class="ifsw">
v-if="!member && selectsData.projectMemberList?.length > 10"
class="ifsw"
>
<div @click="member = !member" class="“sw”">查看更多></div> <div @click="member = !member" class="“sw”">查看更多></div>
</div> </div>
<div <div v-if="member && selectsData.projectMemberList?.length > 10" class="ifsw">
v-if="member && selectsData.projectMemberList?.length > 10"
class="ifsw"
>
<div @click="member = !member" class="sw">收起&lt;</div> <div @click="member = !member" class="sw">收起&lt;</div>
</div> </div>
</div> </div>
@@ -287,16 +183,10 @@
</div> </div>
</div> </div>
</div> </div>
<div <div v-if="!person && selectsData.studentList.length > 10" class="ifsw">
v-if="!person && selectsData.studentList.length > 10"
class="ifsw"
>
<div @click="person = !person" class="“sw”">查看更多></div> <div @click="person = !person" class="“sw”">查看更多></div>
</div> </div>
<div <div v-if="person && selectsData.studentList.length > 10" class="ifsw">
v-if="person && selectsData.studentList.length > 10"
class="ifsw"
>
<div @click="person = !person" class="sw">收起&lt;</div> <div @click="person = !person" class="sw">收起&lt;</div>
</div> </div>
</div> </div>
@@ -318,16 +208,10 @@
</div> </div>
</div> </div>
</div> </div>
<div <div v-if="!dept && selectsData.deptList.length > 10" class="ifsw">
v-if="!dept && selectsData.deptList.length > 10"
class="ifsw"
>
<div @click="dept = !dept" class="“sw”">查看更多></div> <div @click="dept = !dept" class="“sw”">查看更多></div>
</div> </div>
<div <div v-if="dept && selectsData.deptList.length > 10" class="ifsw">
v-if="dept && selectsData.deptList.length > 10"
class="ifsw"
>
<div @click="dept = !dept" class="sw">收起&lt;</div> <div @click="dept = !dept" class="sw">收起&lt;</div>
</div> </div>
</div> </div>
@@ -350,10 +234,7 @@
</div> </div>
</div> </div>
</div> </div>
<div <div v-if="!group && selectsData.groupList.length > 10" class="ifsw">
v-if="!group && selectsData.groupList.length > 10"
class="ifsw"
>
<div @click="group = !group" class="“sw”">查看更多></div> <div @click="group = !group" class="“sw”">查看更多></div>
</div> </div>
<div v-if="group && selectsData.groupList > 10" class="ifsw"> <div v-if="group && selectsData.groupList > 10" class="ifsw">
@@ -369,17 +250,12 @@
</div> </div>
</div> </div>
</a-drawer> </a-drawer>
<a-button @click="openDrawer" type="link"><slot></slot></a-button> <a-button @click="openDrawer" type="link">
<slot></slot>
</a-button>
</div> </div>
<a-modal <a-modal :style="{ padding: 0, position: relative, right: '-20%' }" :closable="true" :visible="stageVisible"
:style="{ padding: 0, position: relative, right: '-20%' }" :footer="null" centered="true" @ok="handleStageOk" wrapClassName="changeModal">
:closable="true"
:visible="stageVisible"
:footer="null"
centered="true"
@ok="handleStageOk"
wrapClassName="changeModal"
>
<div class="con"> <div class="con">
<div class="header"> <div class="header">
<div class="inhe"> <div class="inhe">
@@ -391,36 +267,18 @@
<div class="inher"> <div class="inher">
<!-- <div class="cur">当前关卡关卡2</div> --> <!-- <div class="cur">当前关卡关卡2</div> -->
<div class="select"> <div class="select">
<a-select <a-select style="width: 400px" :placeholder="type === 1 ? '选择阶段' : '选择关卡'" v-model:value="selectsData.stageId"
style="width: 400px" className="cus-select">
:placeholder="type === 1 ? '选择阶段' : '选择关卡'" <a-select-option v-for="(item, i) in stageIds" :key="i" :value="item.id">{{ item.name || "默认" }}
v-model:value="selectsData.stageId"
className="cus-select"
>
<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" <span style="color: #999999; margin-left: 10px"><minus-circle-outlined />已在其他关卡的学员不会被添加到该关卡</span>
><minus-circle-outlined />已在其他关卡的学员不会被添加到该关卡</span
>
<div class="btn" style="margin-top: 50px"> <div class="btn" style="margin-top: 50px">
<button <button class="sameb btn1" @click="closeChangeModal" style="cursor: pointer">
class="sameb btn1"
@click="closeChangeModal"
style="cursor: pointer"
>
取消 取消
</button> </button>
<button <button class="sameb btn2" @click="handleStageOk" style="cursor: pointer">
class="sameb btn2"
@click="handleStageOk"
style="cursor: pointer"
>
确定 确定
</button> </button>
</div> </div>
@@ -430,7 +288,7 @@
</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 {
@@ -801,10 +659,11 @@ function stuDel(i) {
selectsData.value.studentList.splice(i, 1); selectsData.value.studentList.splice(i, 1);
} }
// function orgDel(i) { function orgDel(i) {
// orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id) orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id)
// selectsData.value.deptList.splice(i, 1) selectsData.value.deptList.splice(i, 1)
// } }
function AuditDel(i) { function AuditDel(i) {
auditSelectKeys.value = auditSelectKeys.value.filter( auditSelectKeys.value = auditSelectKeys.value.filter(
(e) => e !== selectsData.value.groupList[i].id (e) => e !== selectsData.value.groupList[i].id
@@ -898,7 +757,7 @@ const submitAuth = () => {
function handleStageOk() { function handleStageOk() {
// 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人 // 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
if(props.type === 1){ if (props.type === 1) {
if (props.groupMemberCount < selectsData.value.studentList.length + props.groupMemberNumber) { if (props.groupMemberCount < selectsData.value.studentList.length + props.groupMemberNumber) {
return message.warning("添加小组学员超过最大值"); return message.warning("添加小组学员超过最大值");
} }