-- 受众查询

This commit is contained in:
yuping
2022-12-20 18:43:14 +08:00
parent 0bbb4403e7
commit d2d9992de9

View File

@@ -20,7 +20,7 @@
/>
</div>
<div style="width:100%;display: grid;grid-template-columns: 750px auto;">
<div class="tabs" style="min-height:800px;" >
<div class="tabs" style="min-height:800px;">
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane :key="1" tab="快速选人">
<div :style="{ height: screenHeight - 235 + 'px' }">
@@ -41,24 +41,25 @@
</a-form-item>
</div>
<div class="chooseLeft" style="display: grid;grid-template-columns: 250px auto">
<div :style="{ height: screenHeight - 180 + 'px' ,overflowY:'auto'}" 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"
:fieldNames="{
<div :style="{ height: screenHeight - 180 + 'px' ,overflowY:'auto'}"
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"
:fieldNames="{
children: 'treeChildList',
key: 'id',
title: 'name',
value: 'name',
}"
@select="stuStuOrgSelect"
>
</a-tree>
@select="stuStuOrgSelect"
>
</a-tree>
</div>
</div>
<div class="tableBox tabb" style="margin: 0px 4px 120px 10px; border: 1px solid #f0f0f0;">
<div class="tableBox tabb" style="margin: 0px 4px 120px 10px; border: 1px solid #f0f0f0;">
<a-table
:columns="stuColumns"
:data-source="stuData"
@@ -71,44 +72,44 @@
</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' }"
@@ -145,124 +146,132 @@
</a-tabs>
</div>
<div class="right1">
<div class="onerow">
<div class="onleft">
<div class="already">已选</div>
<div class="onerow">
<div class="onleft">
<div class="already">已选</div>
</div>
</div>
</div>
<div
class="selecteds"
:style="{ 'max-height': screenHeight - 235 + 'px' }"
style="overflow-y: auto"
>
<div class="person">快速选人</div>
<div v-for="(item,i) in selectsData.studentList" >
<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">
<div
class="selecteds"
:style="{ 'max-height': screenHeight - 235 + 'px' }"
style="overflow-y: auto"
>
<div class="person">快速选人</div>
<div v-for="(item,i) in selectsData.studentList">
<div v-if="i<11">
<div class="chose">
{{ item.realName }}
<div class="ch" @click="stuDel(i)"></div>
</div>
</div>
</div>
</div>
</div>
<div 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" ><div @click="person = !person" class="sw"> 收起&lt; </div></div>
<div v-else>
<div v-if="person">
<div class="chose">
{{ item.realName }}
<div class="ch" @click="stuDel(i)"></div>
</div>
</div>
<!--组织-->
<!-- <div class="dept">添加组织</div>-->
<!-- <div v-for="(item,i) in selectsData.deptList" >-->
<!-- <div v-if="i<11">-->
<!-- <div class="chose1">-->
<!-- <div class="span"> {{ item.name }}</div>-->
<!-- <div class="ch1" @click="orgDel(i)"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div v-else> -->
<!-- <div v-if ="dept">-->
<!-- <div class="chose1">-->
<!-- <div class="span"> {{ item.name }}</div>-->
<!-- <div class="ch1" @click="orgDel(i)"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- -->
<!-- </div>-->
<!-- -->
<!-- </div>-->
<!-- <div v-if="!dept && selectsData.deptList.length >10" class="ifsw"><div @click="dept = !dept" class=sw>查看更多></div></div>-->
<!-- <div v-if="dept && selectsData.deptList.length >10" class="ifsw" ><div @click="dept = !dept" class="sw"> 收起&lt; </div></div>-->
</div>
</div>
<div 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">
<div @click="person = !person" class="sw"> 收起&lt;</div>
</div>
<!--组织-->
<!-- <div class="dept">添加组织</div>-->
<!-- <div v-for="(item,i) in selectsData.deptList" >-->
<!-- <div v-if="i<11">-->
<!-- <div class="chose1">-->
<!-- <div class="span"> {{ item.name }}</div>-->
<!-- <div class="ch1" @click="orgDel(i)"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div v-else> -->
<!-- <div v-if ="dept">-->
<!-- <div class="chose1">-->
<!-- <div class="span"> {{ item.name }}</div>-->
<!-- <div class="ch1" @click="orgDel(i)"></div>-->
<!-- </div>-->
<!-- </div>-->
<!-- -->
<!-- </div>-->
<!-- -->
<!-- </div>-->
<!-- <div v-if="!dept && selectsData.deptList.length >10" class="ifsw"><div @click="dept = !dept" class=sw>查看更多></div></div>-->
<!-- <div v-if="dept && selectsData.deptList.length >10" class="ifsw" ><div @click="dept = !dept" class="sw"> 收起&lt; </div></div>-->
<!--受众-->
<div class="group">受众关联</div>
<div v-for="(item,i) in selectsData.groupList" >
<div v-if="i<11">
<div class="chose2">
<div class="span"> {{ item.audienceName }}</div>
<div class="ch2" @click="AuditDel(i)"></div>
</div>
</div>
<div v-else>
<div v-if ="group">
<!--受众-->
<div class="group">受众关联</div>
<div v-for="(item,i) in selectsData.groupList">
<div v-if="i<11">
<div class="chose2">
<div class="span"> {{ item.audienceName }}</div>
<div class="ch2" @click="AuditDel(i)"></div>
</div>
</div>
<div v-else>
<div v-if="group">
<div class="chose2">
<div class="span"> {{ item.audienceName }}</div>
<div class="ch2" @click="AuditDel(i)"></div>
<div class="ch2" @click="AuditDel(i)"></div>
</div>
</div>
</div>
</div>
<div v-if="!group && selectsData.groupList.length >10" class="ifsw">
<div @click="group = !group" class=sw>查看更多></div>
</div>
<div v-if="group && selectsData.groupList >10" class="ifsw">
<div @click="group = !group" class="sw"> 收起&lt;</div>
</div>
</div>
</div>
<!-- <div style="padding:100px 0 0 20px;display: grid;grid-template-rows: auto auto auto;">
<div>
<div style="margin-top: 20px">快速选人</div>
// eslint-disable-next-line vue/require-v-for-key
<div v-for="(item,i) in selectsData.studentList" >
<a-tag v-if="i < 10" :closable="true" color="#4ea6ff" @close="stuDel(i)"
:key="i" style="margin-top:20px">
{{ item.realName }}
</a-tag>
<a-tag v-else :closable="true" color="#4ea6ff" @close="stuDel(i)"
style="margin-top:20px">
{{ item.realName }}
</a-tag>
<div></div>
</div>
</div>
<div v-if="!group && selectsData.groupList.length >10" class="ifsw"><div @click="group = !group" class=sw>查看更多></div></div>
<div v-if="group && selectsData.groupList >10" class="ifsw" ><div @click="group = !group" class="sw"> 收起&lt; </div></div>
</div>
</div>
<!-- <div style="padding:100px 0 0 20px;display: grid;grid-template-rows: auto auto auto;">
<div>
<div style="margin-top: 20px">快速选人</div>
// eslint-disable-next-line vue/require-v-for-key
<div v-for="(item,i) in selectsData.studentList" >
<a-tag v-if="i < 10" :closable="true" color="#4ea6ff" @close="stuDel(i)"
:key="i" style="margin-top:20px">
{{ item.realName }}
</a-tag>
<a-tag v-else :closable="true" color="#4ea6ff" @close="stuDel(i)"
</div>
<div>
<div style="margin-top: 20px">组织添加</div>
<a-tag :closable="true" color="#4ea6ff" @close="orgDel(i)" v-for="(item,i) in selectsData.deptList"
:key="i"
style="margin-top:20px">
{{ item.realName }}
</a-tag>
<div></div>
</div>
</div>
<div>
<div style="margin-top: 20px">组织添加</div>
<a-tag :closable="true" color="#4ea6ff" @close="orgDel(i)" v-for="(item,i) in selectsData.deptList"
:key="i"
style="margin-top:20px">
{{ item.name }}
</a-tag>
</div>
<div>
<div style="margin-top: 20px">受众添加</div>
<a-tag :closable="true" color="#4ea6ff" @close="AuditDel(i)" v-for="(item,i) in selectsData.groupList"
:key="i" style="margin-top:20px">
{{ item.audienceName }}
</a-tag>
</div>
</div>-->
{{ item.name }}
</a-tag>
</div>
<div>
<div style="margin-top: 20px">受众添加</div>
<a-tag :closable="true" color="#4ea6ff" @close="AuditDel(i)" v-for="(item,i) in selectsData.groupList"
:key="i" style="margin-top:20px">
{{ item.audienceName }}
</a-tag>
</div>
</div>-->
</div>
<div class="btnn">
<button class="btn1" @click="closeDrawer">取消</button>
@@ -304,9 +313,9 @@ const props = defineProps({
default: () => []
}
})
const person =ref(false)
const person = ref(false)
// const dept =ref(false)
const group =ref(false)
const group = ref(false)
const visiable = ref(false)
const activeKey = ref(1)
const stageVisible = ref(false)
@@ -518,11 +527,11 @@ function AuditDel(i) {
// function orgSelect(key, obj) {
// console.log(obj)
//request(ORG_CHILD_LIST, {orgId: null}).then(res => {
//console.log(res.result)
//})
//}
// console.log(obj)
//request(ORG_CHILD_LIST, {orgId: null}).then(res => {
//console.log(res.result)
//})
//}
function onStuSelectChange(e, l) {
stuSelectKeys.value = e
@@ -613,13 +622,16 @@ watch(visiable, () => {
orgSelectKeys.value = []
auditSelectKeys.value = []
stuData.value = []
audienceName.value.keyword=''
audienceName.value.page=1
audienceName.value.pageSize=10
selectsData.value = {
stageId: '',
studentList: [],
deptList: [],
groupList: []
}
searchAudi()
})
</script>
@@ -632,196 +644,222 @@ watch(visiable, () => {
height: 40px;
border-radius: 8px;
}
.tableBox .ant-table-row .ant-table-cell {
height: 48px;
font-size: 12px;
font-weight: 400;
color: #4F5156;
line-height: 29px;
padding: 0px;
height: 48px;
font-size: 12px;
font-weight: 400;
color: #4F5156;
line-height: 29px;
padding: 0px;
}
.tableBox .ant-table-thead tr th {
font-size: 12px;
.tableBox .ant-table-thead tr th {
font-size: 12px;
}
.ant-tabs-tabpane{
.ant-tabs-tabpane {
height: 100%;
}
.ant-tabs{
overflow:visible;
.ant-tabs {
overflow: visible;
}
.right1 {
border-left: 1px solid #f2f6fe;
width: 100%;
margin-left: 20px;
width: 100%;
margin-left: 20px;
.onerow {
display: flex;
justify-content: space-between;
align-items: center;
margin-right: 40px;
flex-wrap: wrap;
width: 100%;
.onleft {
display: flex;
text-align: center;
.already {
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 500;
margin-left: 32px;
white-space: nowrap;
// margin-bottom: 20px;
}
.count {
color: #4ea6ff;
font-size: 16px;
margin: 0 6px;
}
.peo {
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 500;
}
}
.clbox {
margin-right: 50px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
width: 104px;
height: 32px;
border-radius: 4px;
background: #4ea6ff;
.colose {
width: 16px;
height: 16px;
// border-radius: 8px;
// background: #ffffff;
// position: relative;
background-image: url(../../assets/images/basicinfo/ch.png);
background-size: 100%;
margin-right: 4px;
}
.allclear {
color: rgba(255, 255, 255, 1);
font-size: 14px;
}
}
}
.selecteds {
display: flex;
flex-wrap: wrap;
margin-left: 32px;
.person{
width:100%;
margin-top: 20px;
border-top: 1px solid #f2f6fe;
}
.chose {
width: 64px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.ch {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
.ifsw{
display:flex;
align-items:end;
justify-content: center;
color:#4ea6ff;
}
.sw{
display:flex;
align-items:center;
justify-content: center;
text-align: justify;
color:#4ea6ff;
margin-top: 23px;
margin-left:10px;
}
.dept{
width:100%;
margin-top: 30px;
border-top: 1px solid #f2f6fe;
}
.chose1 {
//width: 90px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.span{
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.ch1 {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
.group{
width:100%;
margin-top: 30px;
border-top: 1px solid #f2f6fe;
}
.chose2 {
//width: 120px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.span{
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.ch2 {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
}
.onerow {
display: flex;
justify-content: space-between;
align-items: center;
margin-right: 40px;
flex-wrap: wrap;
width: 100%;
.onleft {
display: flex;
text-align: center;
.already {
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 500;
margin-left: 32px;
white-space: nowrap;
// margin-bottom: 20px;
}
.count {
color: #4ea6ff;
font-size: 16px;
margin: 0 6px;
}
.peo {
color: rgba(51, 51, 51, 1);
font-size: 16px;
font-weight: 500;
}
}
.clbox {
margin-right: 50px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
width: 104px;
height: 32px;
border-radius: 4px;
background: #4ea6ff;
.colose {
width: 16px;
height: 16px;
// border-radius: 8px;
// background: #ffffff;
// position: relative;
background-image: url(../../assets/images/basicinfo/ch.png);
background-size: 100%;
margin-right: 4px;
}
.allclear {
color: rgba(255, 255, 255, 1);
font-size: 14px;
}
}
}
.selecteds {
display: flex;
flex-wrap: wrap;
margin-left: 32px;
.person {
width: 100%;
margin-top: 20px;
border-top: 1px solid #f2f6fe;
}
.chose {
width: 64px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.ch {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
.ifsw {
display: flex;
align-items: end;
justify-content: center;
color: #4ea6ff;
}
.sw {
display: flex;
align-items: center;
justify-content: center;
text-align: justify;
color: #4ea6ff;
margin-top: 23px;
margin-left: 10px;
}
.dept {
width: 100%;
margin-top: 30px;
border-top: 1px solid #f2f6fe;
}
.chose1 {
//width: 90px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ch1 {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
.group {
width: 100%;
margin-top: 30px;
border-top: 1px solid #f2f6fe;
}
.chose2 {
//width: 120px;
height: 24px;
margin-top: 25px;
margin-right: 25px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 2px;
border: 1px solid rgba(56, 139, 225, 1);
color: rgba(56, 139, 225, 1);
font-size: 12px;
position: relative;
.span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ch2 {
position: absolute;
width: 18px;
height: 18px;
background-image: url(../../assets/images/basicinfo/ch.png);
right: -8px;
top: -8px;
}
}
}
}
</style>