当前位置:网站首页>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,一起进步~
边栏推荐
猜你喜欢

从预测到决策,九章云极DataCanvas推出YLearn因果学习开源项目

LeetCode 2331. Calculate the value of Boolean binary tree (tree traversal)

Bidirectional NAT Technology

常见集合特性

"Baidu side" angrily sprayed the interviewer! Isn't it that the tree time increases by a line number?

华为防火墙(NGFW)的双机热备

电商销售数据分析与预测(日期数据统计、按天统计、按月统计)

Know what it is, and know why, JS object creation and inheritance

Mobile keyboard (simulation question)

LeetCode 2315. 统计星号(字符串)
随机推荐
开发第一个Flink应用
Take a look at this ugly face | MathWorks account unavailable - technical issue
LeetCode 2331. Calculate the value of Boolean binary tree (tree traversal)
SAP S4 Material Management 库存模块 MARD 数据库表读取技术细节介绍
Connected graph (union search set)
创建虚拟机第一章(vmvare虚拟机)
ENVI_IDL:使用反距离权重法选取最近n个点插值(底层实现)并输出为Geotiff格式(效果等价于Arcgis中反距离权重插值)
如何在双链笔记软件中建立仪表盘和知识库?以嵌入式小组件库 NotionPet 为例
华为机试:连续出牌数量
Stream stream
AutoJs学习-动态解密
Transplant Wu Enda's deep learning 01 machine learning and neural network second week neural network basic programming homework elective homework to pycharm
Beego framework realizes file upload + seven cattle cloud storage
LeetCode 2325. Decrypt message (map)
Takeout ordering system based on wechat applet
"Baidu side" angrily sprayed the interviewer! Isn't it that the tree time increases by a line number?
c语言指针的有关总结
Leetcode ugly number problem solution
Attachment handling of SAP Fiori
Bazel use tutorial to