mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 05:46:45 +08:00
style:修改面授课
This commit is contained in:
@@ -3,20 +3,20 @@
|
||||
<template>
|
||||
<div class="CommonStudent">
|
||||
<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="header">
|
||||
<div class="headerTitle">
|
||||
{{ {1: "添加学员", 2: "添加学员", 3: "添加学员"}[type] || "" }}
|
||||
{{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || "" }}
|
||||
</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div style="display: flex; overflow-x: auto; overflow-y: auto">
|
||||
@@ -27,154 +27,157 @@
|
||||
<div class="tab1">
|
||||
<a-form-item label="姓名">
|
||||
<a-input
|
||||
v-model:value="nameSearch.keyword"
|
||||
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
@change="peopleName"
|
||||
v-model:value="nameSearch.keyword"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
@change="peopleName"
|
||||
/>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="onSearchStu"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
type="primary"
|
||||
@click="onSearchStu"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>
|
||||
<template #icon>
|
||||
<SearchOutlined/>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button
|
||||
@click="resetStu"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>重置
|
||||
</a-button
|
||||
>
|
||||
@click="resetStu"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div
|
||||
class="chooseLeft"
|
||||
style="display: grid; grid-template-columns: 250px auto"
|
||||
class="chooseLeft"
|
||||
style="display: grid; grid-template-columns: 250px auto"
|
||||
>
|
||||
<div
|
||||
:style="{
|
||||
:style="{
|
||||
height: screenHeight - 180 + 'px',
|
||||
overflowY: 'auto',
|
||||
}"
|
||||
style="border: 1px solid #f0f0f0"
|
||||
style="border: 1px solid #f0f0f0"
|
||||
>
|
||||
<div class="tree" style="margin: 10px 4px 220px 10px">
|
||||
<a-tree
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:tree-data="treeData"
|
||||
:loading="orgLoading"
|
||||
:load-data="onLoadData"
|
||||
v-model:selectedKeys="stuTreeSelectKeys"
|
||||
v-model:expandedKeys="stuTreeExpandedKeys"
|
||||
:fieldNames="{
|
||||
allow-clear
|
||||
tree-default-expand-all
|
||||
:tree-data="treeData"
|
||||
:loading="orgLoading"
|
||||
:load-data="onLoadData"
|
||||
v-model:selectedKeys="stuTreeSelectKeys"
|
||||
v-model:expandedKeys="stuTreeExpandedKeys"
|
||||
:fieldNames="{
|
||||
children: 'treeChildList',
|
||||
key: 'id',
|
||||
title: 'name',
|
||||
value: 'name',
|
||||
}"
|
||||
@select="stuStuOrgSelect"
|
||||
@select="stuStuOrgSelect"
|
||||
>
|
||||
</a-tree>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="tableBox tabb"
|
||||
style="
|
||||
class="tableBox tabb"
|
||||
style="
|
||||
margin: 0px 4px 120px 10px;
|
||||
border: 1px solid #f0f0f0;
|
||||
"
|
||||
>
|
||||
<a-table
|
||||
:columns="stuColumns"
|
||||
:data-source="stuData"
|
||||
:pagination="stuPagination"
|
||||
: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>
|
||||
</a-tab-pane>
|
||||
<!-- <a-tab-pane :key="2" tab="添加组织">-->
|
||||
<!-- <div-->
|
||||
<!-- :style="{ height: screenHeight - 235 + 'px' }"-->
|
||||
<!-- >-->
|
||||
<!-- <div class="tab2">-->
|
||||
<!-- <a-form-item label="组织:">-->
|
||||
<!-- <a-input-->
|
||||
<!-- v-model:value="searchOrgName.keyword"-->
|
||||
<!-- style="width: 230px; height: 40px; border-radius: 8px"-->
|
||||
<!-- placeholder="请输入组织"-->
|
||||
<!-- />-->
|
||||
<!-- <a-button type="primary" @click="searchOrg" style="margin-left: 20px;border-radius: 4px">-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <SearchOutlined/>-->
|
||||
<!-- </template>-->
|
||||
<!-- 搜索-->
|
||||
<!-- </a-button>-->
|
||||
<!-- <a-button @click="resetOrg" style="margin-left: 20px;border-radius: 4px">重置</a-button>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="boeTree">-->
|
||||
<!-- <a-tree-->
|
||||
<!-- :tree-data="searchOrgName.keyword ? orgData : treeData"-->
|
||||
<!-- @select="onOrgSelectChange"-->
|
||||
<!-- :fieldNames="{-->
|
||||
<!-- children: 'treeChildList',-->
|
||||
<!-- key: 'id',-->
|
||||
<!-- title: 'name',-->
|
||||
<!-- value: 'name',-->
|
||||
<!-- }"-->
|
||||
<!-- row-key="id"-->
|
||||
<!-- :row-selection="orgRowSelection"-->
|
||||
<!-- multiple-->
|
||||
<!-- >-->
|
||||
<!-- </a-tree>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-tab-pane>-->
|
||||
<!-- <a-tab-pane :key="2" tab="添加组织">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div class="tab2">
|
||||
<a-form-item label="组织:">
|
||||
<a-input
|
||||
v-model:value="searchOrgName.keyword"
|
||||
style="width: 230px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入组织"
|
||||
/>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="searchOrg"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button
|
||||
@click="resetOrg"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>重置</a-button
|
||||
>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="boeTree">
|
||||
<a-tree
|
||||
:tree-data="searchOrgName.keyword ? orgData : treeData"
|
||||
@select="onOrgSelectChange"
|
||||
:fieldNames="{
|
||||
children: 'treeChildList',
|
||||
key: 'id',
|
||||
title: 'name',
|
||||
value: 'name',
|
||||
}"
|
||||
row-key="id"
|
||||
:row-selection="orgRowSelection"
|
||||
multiple
|
||||
>
|
||||
</a-tree>
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane> -->
|
||||
<a-tab-pane :key="3" tab="受众关联">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div>
|
||||
<a-form-item label="受众名称:">
|
||||
<a-input
|
||||
v-model:value="audienceName.keyword"
|
||||
style="width: 260px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入受众名称"
|
||||
v-model:value="audienceName.keyword"
|
||||
style="width: 260px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入受众名称"
|
||||
/>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="searchAudi"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
type="primary"
|
||||
@click="searchAudi"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>
|
||||
<template #icon>
|
||||
<SearchOutlined/>
|
||||
<SearchOutlined />
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
<a-button
|
||||
@click="resetAudienceInfo"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>重置
|
||||
</a-button
|
||||
>
|
||||
@click="resetAudienceInfo"
|
||||
style="margin-left: 20px; border-radius: 4px"
|
||||
>重置
|
||||
</a-button>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="tableBox tabb">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
row-key="id"
|
||||
:columns="audiColums"
|
||||
:data-source="audiData"
|
||||
:loading="audiLoading"
|
||||
:pagination="auditPagination"
|
||||
:row-selection="auditRowSelection"
|
||||
style="border: 1px solid #f2f6fe"
|
||||
row-key="id"
|
||||
:columns="audiColums"
|
||||
:data-source="audiData"
|
||||
:loading="audiLoading"
|
||||
:pagination="auditPagination"
|
||||
:row-selection="auditRowSelection"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -188,9 +191,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="selecteds"
|
||||
:style="{ 'max-height': screenHeight - 235 + 'px' }"
|
||||
style="overflow-y: auto"
|
||||
class="selecteds"
|
||||
:style="{ 'max-height': screenHeight - 235 + 'px' }"
|
||||
style="overflow-y: auto"
|
||||
>
|
||||
<div class="person">快速选人</div>
|
||||
<div v-for="(item, i) in selectsData.studentList">
|
||||
@@ -210,14 +213,14 @@
|
||||
</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>
|
||||
<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>
|
||||
@@ -262,8 +265,8 @@
|
||||
</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>
|
||||
@@ -338,19 +341,18 @@
|
||||
</a-modal>
|
||||
-->
|
||||
<a-modal
|
||||
style="padding: 0"
|
||||
:closable="true"
|
||||
:visible="stageVisible"
|
||||
:footer="null"
|
||||
centered="true"
|
||||
@ok="handleStageOk"
|
||||
wrapClassName="changeModal"
|
||||
style="padding: 0"
|
||||
:closable="true"
|
||||
:visible="stageVisible"
|
||||
:footer="null"
|
||||
centered="true"
|
||||
@ok="handleStageOk"
|
||||
wrapClassName="changeModal"
|
||||
>
|
||||
<div class="con">
|
||||
<div class="header">
|
||||
<div class="inhe">
|
||||
|
||||
<div class="tz"> {{ type === 1 ? "选择阶段" : "添加学员到关卡" }}</div>
|
||||
<div class="tz">{{ type === 1 ? "选择阶段" : "添加学员到关卡" }}</div>
|
||||
<div class="mg" @click="closeChangeModal"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -359,29 +361,34 @@
|
||||
<!-- <div class="cur">当前关卡:关卡2</div> -->
|
||||
<div class="select">
|
||||
<a-select
|
||||
style="width: 400px"
|
||||
:placeholder="type === 1 ? '选择阶段' : '选择关卡'"
|
||||
v-model:value="selectsData.stageId"
|
||||
className="cus-select"
|
||||
style="width: 400px"
|
||||
:placeholder="type === 1 ? '选择阶段' : '选择关卡'"
|
||||
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
|
||||
v-for="(item, i) in stageIds"
|
||||
:key="i"
|
||||
:value="item.id"
|
||||
>{{ item.name || "默认" }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
<span style="color: #999999;margin-left:10px;"><minus-circle-outlined/>已在其他关卡的学员,不会被添加到该关卡</span>
|
||||
<div class="btn" style="margin-top:50px;">
|
||||
<span style="color: #999999; margin-left: 10px"
|
||||
><minus-circle-outlined />已在其他关卡的学员,不会被添加到该关卡</span
|
||||
>
|
||||
<div class="btn" style="margin-top: 50px">
|
||||
<button
|
||||
class="sameb btn1"
|
||||
@click="closeChangeModal"
|
||||
style="cursor: pointer"
|
||||
class="sameb btn1"
|
||||
@click="closeChangeModal"
|
||||
style="cursor: pointer"
|
||||
>
|
||||
取消
|
||||
</button>
|
||||
<button
|
||||
class="sameb btn2"
|
||||
@click="handleStageOk"
|
||||
style="cursor: pointer"
|
||||
class="sameb btn2"
|
||||
@click="handleStageOk"
|
||||
style="cursor: pointer"
|
||||
>
|
||||
确定
|
||||
</button>
|
||||
@@ -390,14 +397,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import {computed, defineEmits, defineProps, ref, watch} from "vue";
|
||||
import {request, useBoeApi, useBoeApiPage} from "@/api/request";
|
||||
import {AUDIENCE_LIST, ORG_CHILD_LIST, ORG_LIST, USER_LIST} from "@/api/ThirdApi";
|
||||
import {saveStu} from "@/api/index1";
|
||||
import { computed, defineEmits, defineProps, ref, watch } from "vue";
|
||||
import { request, useBoeApi, useBoeApiPage } from "@/api/request";
|
||||
import {
|
||||
AUDIENCE_LIST,
|
||||
ORG_CHILD_LIST,
|
||||
ORG_LIST,
|
||||
USER_LIST,
|
||||
} from "@/api/ThirdApi";
|
||||
import { saveStu } from "@/api/index1";
|
||||
|
||||
const emit = defineEmits({});
|
||||
const props = defineProps({
|
||||
@@ -427,8 +437,8 @@ const nameSearch = ref({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const stuTreeSelectKeys = ref([])
|
||||
const stuTreeExpandedKeys = ref([])
|
||||
const stuTreeSelectKeys = ref([]);
|
||||
const stuTreeExpandedKeys = ref([]);
|
||||
const audienceName = ref({
|
||||
keyword: "",
|
||||
page: 1,
|
||||
@@ -447,7 +457,7 @@ const {
|
||||
pageSize: stuPageSize,
|
||||
loading: stuLoading,
|
||||
total: stuTotal,
|
||||
reset: stuReset
|
||||
reset: stuReset,
|
||||
} = useBoeApiPage(USER_LIST, nameSearch.value, {
|
||||
init: false,
|
||||
result: (res) => res.result.userInfoList,
|
||||
@@ -458,13 +468,14 @@ const {
|
||||
// data: orgData,
|
||||
// fetch: searchOrg,
|
||||
// } = useBoeApiPage(ORG_LIST, searchOrgName.value)
|
||||
const {
|
||||
data: treeData,
|
||||
loading: orgLoading,
|
||||
} = useBoeApi(ORG_LIST, {keyword: ''}, {
|
||||
init: true,
|
||||
result: (res) => res.result.map(e => ({...e,isLeaf:false})),
|
||||
})
|
||||
const { data: treeData, loading: orgLoading } = useBoeApi(
|
||||
ORG_LIST,
|
||||
{ keyword: "" },
|
||||
{
|
||||
init: true,
|
||||
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
|
||||
}
|
||||
);
|
||||
const {
|
||||
data: audiData,
|
||||
fetch: searchAudi,
|
||||
@@ -472,11 +483,11 @@ const {
|
||||
pageSize: audiPageSize,
|
||||
loading: audiLoading,
|
||||
total: audiTotal,
|
||||
reset: auditReset
|
||||
reset: auditReset,
|
||||
} = useBoeApiPage(AUDIENCE_LIST, audienceName.value, {
|
||||
init: true,
|
||||
result: (res) =>
|
||||
res.result.audienceList.map((e) => ({...e, id: e.id + ""})),
|
||||
res.result.audienceList.map((e) => ({ ...e, id: e.id + "" })),
|
||||
totalPage: (res) => res.result.totalPage,
|
||||
total: (res) => res.result.totalElement,
|
||||
});
|
||||
@@ -586,11 +597,13 @@ const closeDrawer = () => {
|
||||
stuData.value = [];
|
||||
nameSearch.value.keyword = "";
|
||||
};
|
||||
function onLoadData(treeNode){
|
||||
return request(ORG_CHILD_LIST, {keyword:'',orgId:treeNode.id}).then(r => {
|
||||
treeNode.dataRef.treeChildList = r.result.directChildList
|
||||
treeData.value = [...treeData.value]
|
||||
})
|
||||
function onLoadData(treeNode) {
|
||||
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
|
||||
(r) => {
|
||||
treeNode.dataRef.treeChildList = r.result.directChildList;
|
||||
treeData.value = [...treeData.value];
|
||||
}
|
||||
);
|
||||
}
|
||||
const closeChangeModal = () => {
|
||||
stageVisible.value = false;
|
||||
@@ -615,7 +628,7 @@ function stuStuOrgSelect(e) {
|
||||
|
||||
function stuDel(i) {
|
||||
stuSelectKeys.value = stuSelectKeys.value.filter(
|
||||
(e) => e !== selectsData.value.studentList[i].id
|
||||
(e) => e !== selectsData.value.studentList[i].id
|
||||
);
|
||||
selectsData.value.studentList.splice(i, 1);
|
||||
}
|
||||
@@ -626,7 +639,7 @@ function stuDel(i) {
|
||||
// }
|
||||
function AuditDel(i) {
|
||||
auditSelectKeys.value = auditSelectKeys.value.filter(
|
||||
(e) => e !== selectsData.value.groupList[i].id
|
||||
(e) => e !== selectsData.value.groupList[i].id
|
||||
);
|
||||
selectsData.value.groupList.splice(i, 1);
|
||||
}
|
||||
@@ -668,7 +681,7 @@ const auditChangePagination = (page) => {
|
||||
|
||||
//重置
|
||||
function peopleName(name) {
|
||||
console.log('people-name', name.target.value)
|
||||
console.log("people-name", name.target.value);
|
||||
nameSearch.value.keyword = name.target.value;
|
||||
}
|
||||
|
||||
@@ -677,10 +690,10 @@ const resetStu = () => {
|
||||
nameSearch.value.keyword = "";
|
||||
nameSearch.value.page = 1;
|
||||
nameSearch.value.pageSize = 10;
|
||||
nameSearch.value.departId = null
|
||||
stuTreeExpandedKeys.value = []
|
||||
stuTreeSelectKeys.value = []
|
||||
stuReset()
|
||||
nameSearch.value.departId = null;
|
||||
stuTreeExpandedKeys.value = [];
|
||||
stuTreeSelectKeys.value = [];
|
||||
stuReset();
|
||||
};
|
||||
//清空选择部门信息
|
||||
const deleteDepSelect = () => {
|
||||
@@ -695,8 +708,8 @@ const resetAudienceInfo = () => {
|
||||
audienceName.value.keyword = "";
|
||||
audienceName.value.page = 1;
|
||||
audienceName.value.pageSize = 10;
|
||||
auditReset()
|
||||
searchAudi()
|
||||
auditReset();
|
||||
searchAudi();
|
||||
};
|
||||
//全部清除
|
||||
// const deleteAll = () => {
|
||||
@@ -739,9 +752,9 @@ watch(visiable, () => {
|
||||
audienceName.value.keyword = "";
|
||||
audienceName.value.page = 1;
|
||||
audienceName.value.pageSize = 10;
|
||||
nameSearch.value.departId = null
|
||||
stuTreeExpandedKeys.value = []
|
||||
stuTreeSelectKeys.value = []
|
||||
nameSearch.value.departId = null;
|
||||
stuTreeExpandedKeys.value = [];
|
||||
stuTreeSelectKeys.value = [];
|
||||
activeKey.value = 1;
|
||||
selectsData.value = {
|
||||
stageId: "",
|
||||
@@ -749,8 +762,8 @@ watch(visiable, () => {
|
||||
deptList: [],
|
||||
groupList: [],
|
||||
};
|
||||
stuReset()
|
||||
auditReset()
|
||||
stuReset();
|
||||
auditReset();
|
||||
|
||||
searchAudi();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user