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

郑州网站关wordpress 4.8

郑州网站关,wordpress 4.8,html做网站自适应宽度,做网站通常用的软件最后的效果就是树形的下拉多选#xff0c;可选择任意一级选项#xff0c;下拉框中有一个按钮可以实现全选#xff0c;也支持搜索功能。 在mounted生命周期里面获取全部部门的数据#xff0c;handleTree是讲接口返回的数据整理成树形结构#xff0c;可以自行解决 div c…最后的效果就是树形的下拉多选可选择任意一级选项下拉框中有一个按钮可以实现全选也支持搜索功能。 在mounted生命周期里面获取全部部门的数据handleTree是讲接口返回的数据整理成树形结构可以自行解决 div classLeftTextspan stylecolor: red; margin-right: 4px*/span部门/divel-selectv-modelexecutiveDepartNamefilterable:filter-methodselectChangemultiplevisible-changevisibleChangeremove-tagseleRemoveTagstylewidth: 80%el-option styledisplay: none value/el-optionel-checkboxstylewidth: 100%;height: 40px;line-height: 40px;padding-left: 20px;border-bottom: 1px solid #dcdfe6;classallselect:indeterminateisIndeterminatev-modelallSelectModulechangeallselect全选/el-checkboxel-cascader-panelrefcascaderModule:keydeptList.length:optionsdeptListchangecascaderChangestylewidth: 80%:propspropsfilterable:borderfalse:show-all-levelsfalsev-modelexecutiveDepartment/el-cascader-panel/el-select/div props: {multiple: true,value: deptId,label: deptName,checkStrictly: true,emitPath: false,}, allDeptList:[];//所有的部门信息内部结构为{deptId:1,deptName:一级部门}isSeach:false;//是否搜索状态tempExecutive:[];// 搜索前已选中的数据//搜索查询事件--是因为在cascaderChange事件中对v-model的值重新赋值导致下拉选时会触发el-select的搜索事件所以加了一个isFilter判断selectChange(val) {if (val ! ) {this.deptList [];this.deptList this.allDeptList.filter((item) {return item.deptName.toLowerCase().indexOf(val.toLowerCase()) -1;});this.isSeach true;this.tempExecutive this.executiveDepartment;} else {if (!this.isFilter) {this.deptList this.handleTree(this.allDeptList, deptId);this.isFilter !this.isFilter;}}},visibleChange(e) {if (e) {this.isSeach false;this.isFilter false;this.deptList this.handleTree(this.allDeptList, deptId);this.initStatus();}},对全选状态进行重新赋值initStatus() {if (this.executiveDepartment.length this.allDeptList.length) {this.allSelectModule true;this.isIndeterminate false;} else if (this.executiveDepartment.length 0) {this.allSelectModule false;this.isIndeterminate false;} else {this.allSelectModule false;this.isIndeterminate true;}},//select框里回显的是选中部门的名称getDeptName() {const result [];this.executiveDepartment.filter((item) {this.allDeptList.map((i) {if (item i.deptId) {result.push(i.deptName);}});});return result;},seleRemoveTag(val) {if (val) {const result this.allDeptList.find((item) {if (item.deptName val) {return item;}});this.executiveDepartment this.executiveDepartment.filter((item) item ! result.deptId);}},// 下拉多选选中时触发的事件cascaderChange() {this.isFilter true;//如果是搜索状态讲之前选中的值和搜素状态下的值进行合并和去重否则之前选中的值会被清空if (this.isSeach) {this.executiveDepartment [...new Set([...this.tempExecutive, ...this.executiveDepartment]),];}this.executiveDepartName this.getDeptName();this.initStatus();},//全选事件allselect() {if (this.allSelectModule) {this.isIndeterminate false;if (this.isSeach) {this.executiveDepartment this.deptList.map((item) item.deptId);this.executiveDepartName this.getDeptName();} else {this.executiveDepartment this.getAllIds(this.deptList);this.executiveDepartName this.getDeptName();}} else {this.executiveDepartment [];this.executiveDepartName [];}},getAllIds(nodes) {let ids [];(function getIds(nodes) {nodes.forEach((node) {ids.push(node.deptId);if (node.children node.children.length) {getIds(node.children);}});})(nodes);return ids;},
http://www.hkea.cn/news/14408293/

相关文章:

  • python 快速搭建网站标智客免费logo设计
  • 搭建网站服务器多少钱外贸采购网
  • 清远网站制作公司海城网站建设
  • 学网站建设需要用哪几个软件网站开发和网络开发区别
  • 视频网站建设需要多少钱wordpress动漫电影主题
  • 电子商务网站建设期末试题网站主页跳转index
  • 找个做网站的人郑州网站优化培训
  • 阿里能帮做网站吗seo谷歌推广
  • 网站建设原理试卷网页设计基础教程结课论文
  • 天河网站建设企业花都区网站建设
  • c 做商务网站方便吗百度地图网页版入口
  • 手机网站商城源码用什么工具修改wordpress
  • 做网站还是自媒体更适合赚钱网站建设合同书注意事项
  • 响应式网站自助建设平台沈阳城市建设学院官方网站
  • 南京做微网站做logo去哪个网站
  • 成品网站管理系统源码服务号微网站怎么做的
  • 上海内贸网站建设点评网站开发
  • wordpress主题语言包深圳如何优化
  • 秦皇岛网站优化有没有专门做二手电脑的网站
  • 虚拟主机空间免费网站优化的文章
  • 上海教育网站建设邯郸市建设局网站材料下载入口
  • 网站制作软件手机如何做带后台的网站
  • 建设外贸网站的公司网站友情链接的好处
  • 湛江市建设规划局网站郑州企业建筑资质多少钱
  • 免费网站代码下载聚名网备案域名
  • 响应式环保网站模板下载天津市住房和城乡建设厅官网
  • 建设审批网站查询wordpress企业网站模板下载
  • 网站商城建设员招聘农产品网站建设及优化项目
  • 郑州网站seo优化公司外围网站做代理
  • 自己做的网站收费外贸网站空间选择