当前位置: 首页 > news >正文

【Vue-Element-Admin】级联查询

背景

有两个查询条件:模块、功能点
想实现选择模块后,点击功能点下拉框,查询出对应模块下的功能点列表

查询

listQuery:

export default{return{listQuery:{//page:1,//limit:20,//如果想兼容按条件导出,可以定义查询条件age:undefined,sex:undefined},moduleOptions:null,functionPointOptions:null}
}
getModuleList(){return findModuleList(this.listQuery).then(response=>{this.moduleOptions=response.data['items']})
},
getFunctionPointList(){return findFunctionPointList(this.listQuery).then(response=>{this.functionPointOptions=response.data['items']})
}

级联查询

<template>	<el-form-item label="级联查询" prop="search"><el-select v-model="listQuery.module" placeholder="模块" filterable remote :remote-method="getModuleList" clearable @focus="(event)=>getModuleList()" style="width: 100%"><el-option v-for="item in moduleOptions" :key="item" :label="item" :value="item" /></el-select><el-select v-model="listQuery.function_point" placeholder="模块" filterable remote :remote-method="getFunctionPointList" clearable @focus="(event)=>getFunctionPointList()" style="width: 100%"><el-option v-for="item in functionPointOptions" :key="item" :label="item" :value="item" /></el-select></el-form-item>
</template>
http://www.lryc.cn/news/162480.html

相关文章:

  • 深入探讨Kubernetes(K8s)在云原生架构中的关键作用和应用
  • redis zset score 求和
  • springboot属性注入增强(一)背景/需求
  • 《PWA实战:如何为你的网站增加离线功能和推送通知》
  • sqli-labs关卡之一(两种做法)
  • Visual Studio 线性表的链式存储节点输出引发异常:读取访问权限冲突
  • [通用]计算机经典面试题基础篇Day3
  • (Golang) 牛客 在线编程 Go语言入门
  • 2.6 PE结构:导出表详细解析
  • SpringMvc进阶
  • SpringCloud Alibaba 入门到精通 - Nacos
  • new/delete, malloc/free
  • oracle将一个用户的表复制到另一个用户
  • C#知识点、常见面试题
  • 【STM32】锁存器
  • DGIOT-Modbus-RTU控制指令05、06的配置与下发
  • 机器学习实战-系列教程8:SVM分类实战3非线性SVM(鸢尾花数据集/软间隔/线性SVM/非线性SVM/scikit-learn框架)项目实战、代码解读
  • 计算机网络-谢希任第八版学习笔记总结
  • 手写Spring:第5章-注入属性和依赖对象
  • 初识集合框架 -Java
  • 目标检测笔记(十五): 使用YOLOX完成对图像的目标检测任务(从数据准备到训练测试部署的完整流程)
  • 深眸科技自研轻辙视觉引擎,以AI机器视觉赋能杆号牌识别与分拣
  • Shell命令管理进程
  • python创建exe文件
  • 【数据结构】AVL树的插入与验证
  • 9.3.3网络原理(网络层IP)
  • 代码随想录算法训练营第四十八天| LeetCode121. 买卖股票的最佳时机、122.买卖股票的最佳时机II、123.买卖股票的最佳时机III
  • C++新经典10--vector以及其使用
  • std : : vector
  • AJAX学习笔记8 跨域问题及解决方案