当前位置:网站首页>antd 下拉多选传值到后台做查询操作
antd 下拉多选传值到后台做查询操作
2022-07-17 13:26:00 【fortunate_leixin】
前端
<a-form-model-item label="年度" style="width:100%">
<a-select
placeholder="全部"
type="list"
mode="multiple"
v-model="yearLis"
allow-clear
:max-tag-count="3"
@change="$forceUpdate()">
<a-select-option v-for="item in yearData" :key="item.code">
{
{item.value}}
</a-select-option>
</a-select>
</a-form-model-item>
data中:
{
yearData:[],//用来接收数组
queryParam:{
yearList:'',//v-model中的值
}
}
传递的时候需要处理下:将数组转为字符串,在传递到后台
this.queryParam.yearList= this.yearData.toString()
后台:
query中接受:
@TableField(exist = false)
private List<String> yearList;
xml中:
<if test="param.yearList!= null and param.yearList.size > 0 ">
and art.heating_year in
<foreach item="year" index="index" collection="param.yearList" open="(" close=")" separator=",">
#{year}
</foreach>
</if>
最终列表页面展示
以上描述是个人理解,有问题加qq 876942434,一起进步~
边栏推荐
猜你喜欢
随机推荐
二分类学习推广到多分类学习
顺序表的基本建立,以及增删改查的相关操作(c语言描述之顺序表)
Find balanced binary tree
移植吴恩达深度学习01机器学习和神经网络第二周神经网络基础编程作业选修作业到pycharm
AutoJs学习-多功能宝箱-下
英伟达用AI设计GPU:最新H100已经用上,比传统EDA减少25%芯片面积
Virtual CPU and memory in yarn (CDH)
Establishment of redis cluster, one master, two slave and three Sentinels
Know what it is, and know why, JS object creation and inheritance
从“被动”到“主动”,ZETA技术助力“RFID2.0”升级该如何实现?
Bidirectional NAT Technology
过拟合与欠拟合
【CSP-J 2021】总结
基于网络编码的卫星网络容量提升方法
Custom complex logic verification during adding and modifying -2022 new project
vulnhub inclusiveness: 1
SAP AppGyver 的 Universal Theme System 使用介绍
Thread pool principle
JSP based novel writing and creation website
How to use SVG to make text effects arranged along any path