Angularjs按需查询
来源:互联网 发布:java跨域上传文件 编辑:程序博客网 时间:2024/05/29 07:26
课程信息管理界面有这样一个需求,当课程类型为公选课的时候,可以选择课程性质,当为其他课程类型的时候,不必选择课程性质。
代码:
/** * 获取课程类型下拉框数据 */ getCourseTypeNameOptions(){ let url = "teachingManagement-web/course/queryAllCourseType"; this.http.get(url).subscribe( res =>{ this.courseTypeNameOptions = res.json().data; //如果是公共选修,可以选择课程性质,如果不是,课程性质为空 this.courseTypeNameOptions.forEach(item =>{ JSON.stringify(item); console.log(item); if(item.dictionaryName == "公共选修课"){ this.getCourseNatureNameOptions(); }else{ return; } }) } ); } /** * 课程类型为公共选修课,可选择课程性质;其他类型,则不需选择课程性质 * @param type */ changeType(type:string){ let dictionaryName=this.courseTypeNameOptions.find(x=>x.id==type).dictionaryName;//获取的课程类型名称 this.dictionaryName=dictionaryName; if(this.dictionaryName=="公共选修课"){ this.renderer2.removeAttribute(this.courseNature.nativeElement,"disabled"); }else{ this.courseInfo.courseNatureId=""; this.renderer2.setAttribute(this.courseNature.nativeElement,"disabled","disabled"); } }
阅读全文
0 0
- Angularjs按需查询
- AngularJS查询
- angularjs查询
- angularjs分页查询
- angularJs 删除 查询 排序
- AngularJs查询,添加,修改
- angularjs修改查询
- angularjs添加排序查询
- angularjs排序、查询、添加
- angularjs路由、排序、查询
- 过滤查询filter angularjs
- AngularJS查询,删除,添加
- AngularJS关键字查询
- AngularJs查询,添加,修改
- AngularJs根据姓名查询
- angularJS模糊查询
- angularJs自定义模糊查询
- angularJs添加,删除,查询
- 【BigHereo 46】---DataStructure---线索二叉树(四)
- spfa的探究
- 队列和栈的装换
- 【软考学习】设计模式——宏观总结
- caffe 初学参考链接
- Angularjs按需查询
- Understanding Neural Networks Through Deep Visualization
- iOS标记指针(Tagged Pointer)技术
- 第九周周末总结
- 使用session完成购物车代码
- ajax 跨域请求
- bootstrap之buttonJs
- Redis的安全性及客户端工具的使用
- 使用POI导出Excel表