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

OpenCV编程:OpenCV3.X训练自己的分类器

Bidirectional NAT Technology

vulnhub inclusiveness: 1

Win10 start key click no response

Pytorch学习记录2 线性回归(Tensor,Variable)

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

Common collection properties

【手写数字识别】基于Lenet网络实现手写数字识别附matlab代码

Aike AI frontier promotion (7.17)

LeetCode 2319. 判断矩阵是否是一个 X 矩阵
随机推荐
Design and Simulation of intelligent storage cabinet control system
Know what it is, and know why, JS object creation and inheritance
破案了卧槽---从MQ消费的逻辑怎么改代码都不生效
Vérification logique complexe personnalisée lors de l'ajout et de la modification - 2022 nouvel élément
Journal日志与oplog日志的区别
常见集合特性
Pytorch手动实现多层感知机
Figure an introduction to the interpretable method of neural network and a code example of gnnexplainer interpreting prediction
High number_ Chapter 1 space analytic geometry and vector algebra__ Distance from point to plane
欧拉角,轴角,四元数与旋转矩阵详解
博弈论(depu)与投资(40/100)
分类任务中的类别不平衡问题
基于网络编码的卫星网络容量提升方法
Pytoch learning record 2 linear regression (tensor, variable)
Brush questions with binary tree (2)
Take a look at this ugly face | MathWorks account unavailable - technical issue
JSP based novel writing and creation website
双向NAT技术
antd表单设置数组字段
LeetCode 2331. Calculate the value of Boolean binary tree (tree traversal)