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

uniapp 常用的地区行业各种多选多选,支持回显,复制粘贴可使用

uniapp 常用的地区行业各种多选多选,支持回显

在这里插入图片描述

必须导入uni-popup 弹出层 该组件

1.目前项目开发中使用到这类似挺多的,记录一下,方便以后是使用
2.使用前提,目前不做无限级,只支持二维数组,模板里只循环了两层,如果有特殊需求,请自行修改
3.数据子级目前是使用的children字段,显示名字使用的name,如多你的后端返回的数据格式字段不一样,请自己先递归处理一下,这两个对应上,
4.大概处理如下,

	addCheckAttr(arr) {return arr.map(item => {item.checked = falseitem.label = item.name   // 这里将你后端返回的名字赋值成你想要的字段if (item.children && Array.isArray(item.children)) {item.children = this.addCheckAttr(item.children)}return item})},

5.废话不多说直接粘贴复制使用

具体使用如下(有更加写法请自行修改)


1.新建组件 tree.vue
2.注意事项 ,如果数据回显,单选的情况下父组件你就不要传多个值进去

<template><view class="content"><uni-popup ref="popup" type="bottom" background-color="#fff"><view class='head'><view class='leftbnt' @click='handReset'><button>重置</button></view><view class='rightbnt' @click='determine'><button :style="{'color':confirmColor}">确认</button></view></view><view class='mianbox' :style="{ 'height': defH + 'px'}"><view v-for="(item,index) in list" :key='index'><view class='treeTit'><view style='margin-left:10px;'> {{item.name}}</view></view><view v-for="(it,i) in item.children " :key='i':style="{background: it.checked ? itemColor : '',color: it.checked ? itemtxtColor : ''}":class="[it.checked ? 'addClass':'subli']" @tap="handItem(index,i)">{{it.name}}</view></view></view></uni-popup></view>
</template>
<script>export default {props: {// 窗口默认高度 暂未完善百分比defH: {type: Number,default: 550},dataTree: { // 父组件传递下来的数据type: Array},defchech: { // 默认选中type: Array},confirmColor: { // 确认按钮的颜色type: String,default: '#54b0ab'},itemColor: { // 选中的子级item 背景色type: String,default: '#e4f6f8'},itemtxtColor: { // 选中的子级item 背景色type: String,default: '#54b0ab'},// 是否支持多选isMultiple: {type: Boolean,default: true},isnumber: { // 最多可选数量type: Number,default: 5},},data() {return {newData: [],list: []}},methods: {handItem(index, i) {if (this.isMultiple) {this.clickItem(index, i)} else {this.list = this.addCheckAttr(this.list)this.clickItem(index, i)}},clickItem(index, i) {this.list[index].children[i].checked = !this.list[index].children[i].checkedthis.someArr()},addCheckAttr(arr) {return arr.map(item => {item.checked = falseitem.label = item.nameif (item.children && Array.isArray(item.children)) {item.children = this.addCheckAttr(item.children)}return item})},open() {this.list = this.dataTreethis.$refs.popup.open('bottom')this.list = this.checkedTreeData(this.list)this.someArr()},someArr() {this.newData = this.findCheckedElements(this.list)},// 遍历选出相选中的数据findCheckedElements(arr) {let result = []function traverse(item) {if (item.checked) {result.push(item)}if (item.children) {for (let child of item.children) {traverse(child)}}}for (let item of arr) {traverse(item)}return result},// 回显数据checkedTreeData(arr) {return arr.map(item => {if (this.defchech.indexOf(item.id) !== -1) {item.checked = true} else {item.checked = false}if (item.children && Array.isArray(item.children)) {item.children = this.checkedTreeData(item.children)}return item})},close() {this.$refs.popup.close()},// 重置handReset() {this.list = this.addCheckAttr(this.dataTree)this.someArr()},// 确认determine() {if(this.newData.length > this.isnumber){uni.showToast({title: `最多选择${this.isnumber}个`})return}this.$emit("onChange", this.newData)}}}
</script><style scoped>.treeTit {width: 100%;height: 45px;font-size: 16px;font-weight: bold;position: sticky;top: -1px;left: 0px;line-height: 45px;background: #fff;}.subli {display: inline-block;margin: 4px;padding: 5px 10px;background: #f6f6f6;border: 1px solid #fff;border-radius: 10rpx;}.addClass {display: inline-block;margin: 4px;padding: 5px 10px;border: 1px solid #4bb4a5;background: #f6f6f6;border-radius: 10rpx;}.mianbox {width: 100%;height: 300px;background: #fff;overflow: scroll;}.head {width: 100%;height: 45px;display: flex;align-items: center;}.leftbnt {flex: 1;text-align: center;border: 1px solid #f4f4f4;}.rightbnt {flex: 1;text-align: center;border: 1px solid #f4f4f4;font-weight: bold;}
</style>

2.使用,在你的页面中引入组件注册

import TreeList from "./tree.vue"  // 根据自己的实际目录

3.例如带index页面使用,

<template><view><TreeList ref='child' :dataTree='dataTree' :defchech='defChecked' :isMultiple='true' :defH="600"itemColor='#e4f6f8' @onChange='onChange' /><view v-for='(item,index) in list'>{{item.name}}</view></view>
</template>
<script>import TreeList from "../../components/tree.vue"export default {components: {TreeList},data() {return {list: [],// 这里需要注意 后端返回的id 的类型 字符串还是数子  要传对用类型单选你就不要乱传多个值进去defChecked: [17],dataTree: [{"id": 15,"name": "互联网/IT/电子/通信","level": 0,"parentId": 0,"sort": 2,"status": "00","isDisabled": true,"children": [{"id": 16,"name": "电子商务","level": 1,"parentId": 15,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 17,"name": "企业服务","level": 1,"parentId": 15,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 18,"name": "物联网","level": 1,"parentId": 15,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 19,"name": "新媒体","level": 1,"parentId": 15,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 20,"name": "人工智能","level": 1,"parentId": 15,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 21,"name": "智能硬件","level": 1,"parentId": 15,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 22,"name": "在线教育","level": 1,"parentId": 15,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 23,"name": "在线医疗","level": 1,"parentId": 15,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 24,"name": "新零售","level": 1,"parentId": 15,"sort": 9,"status": "00","isDisabled": false,"children": []},{"id": 25,"name": "区块链","level": 1,"parentId": 15,"sort": 10,"status": "00","isDisabled": false,"children": []},{"id": 26,"name": "游戏","level": 1,"parentId": 15,"sort": 11,"status": "00","isDisabled": false,"children": []},{"id": 27,"name": "社交网络","level": 1,"parentId": 15,"sort": 12,"status": "00","isDisabled": false,"children": []},{"id": 28,"name": "在线招聘/求职","level": 1,"parentId": 15,"sort": 13,"status": "00","isDisabled": false,"children": []},{"id": 29,"name": "云计算/大数据","level": 1,"parentId": 15,"sort": 14,"status": "00","isDisabled": false,"children": []},{"id": 30,"name": "网络/信息安全","level": 1,"parentId": 15,"sort": 15,"status": "00","isDisabled": false,"children": []},{"id": 31,"name": "在线生活服务(O2O)","level": 1,"parentId": 15,"sort": 16,"status": "00","isDisabled": false,"children": []},{"id": 32,"name": "在线音乐/视频/阅读","level": 1,"parentId": 15,"sort": 17,"status": "00","isDisabled": false,"children": []},{"id": 33,"name": "互联网","level": 1,"parentId": 15,"sort": 18,"status": "00","isDisabled": false,"children": []},{"id": 34,"name": "IT服务","level": 1,"parentId": 15,"sort": 19,"status": "00","isDisabled": false,"children": []},{"id": 35,"name": "计算机软件","level": 1,"parentId": 15,"sort": 20,"status": "00","isDisabled": false,"children": []},{"id": 36,"name": "计算机硬件","level": 1,"parentId": 15,"sort": 21,"status": "00","isDisabled": false,"children": []},{"id": 37,"name": "通信/网络设备","level": 1,"parentId": 15,"sort": 22,"status": "00","isDisabled": false,"children": []},{"id": 38,"name": "运营商/增值服务","level": 1,"parentId": 15,"sort": 23,"status": "00","isDisabled": false,"children": []},{"id": 39,"name": "电子/半导体/集成电路","level": 1,"parentId": 15,"sort": 24,"status": "00","isDisabled": false,"children": []},{"id": 40,"name": "消费电子产品","level": 1,"parentId": 15,"sort": 25,"status": "00","isDisabled": false,"children": []},{"id": 41,"name": "光电子行业","level": 1,"parentId": 15,"sort": 26,"status": "00","isDisabled": false,"children": []}]},{"id": 42,"name": "生活服务","level": 0,"parentId": 0,"sort": 3,"status": "00","isDisabled": true,"children": [{"id": 43,"name": "餐饮服务","level": 1,"parentId": 42,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 44,"name": "酒店/民宿","level": 1,"parentId": 42,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 45,"name": "旅游/景区","level": 1,"parentId": 42,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 46,"name": "美容/美发","level": 1,"parentId": 42,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 47,"name": "婚庆/摄影","level": 1,"parentId": 42,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 48,"name": "休闲/娱乐","level": 1,"parentId": 42,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 49,"name": "回收/维修","level": 1,"parentId": 42,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 50,"name": "家政服务","level": 1,"parentId": 42,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 51,"name": "宠物服务","level": 1,"parentId": 42,"sort": 9,"status": "00","isDisabled": false,"children": []},{"id": 52,"name": "运动/健身","level": 1,"parentId": 42,"sort": 10,"status": "00","isDisabled": false,"children": []},{"id": 53,"name": "保健/养生","level": 1,"parentId": 42,"sort": 11,"status": "00","isDisabled": false,"children": []},{"id": 54,"name": "养老服务","level": 1,"parentId": 42,"sort": 12,"status": "00","isDisabled": false,"children": []},{"id": 55,"name": "搬家/生活配送","level": 1,"parentId": 42,"sort": 13,"status": "00","isDisabled": false,"children": []},{"id": 56,"name": "其他生活服务","level": 1,"parentId": 42,"sort": 14,"status": "00","isDisabled": false,"children": []}]},{"id": 57,"name": "批发/零售/贸易","level": 0,"parentId": 0,"sort": 4,"status": "00","isDisabled": true,"children": [{"id": 58,"name": "快速消费品","level": 1,"parentId": 57,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 59,"name": "耐用消费品","level": 1,"parentId": 57,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 61,"name": "零售/批发","level": 1,"parentId": 57,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 62,"name": "食品/饮料","level": 1,"parentId": 57,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 63,"name": "烟草/酒业","level": 1,"parentId": 57,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 64,"name": "日化","level": 1,"parentId": 57,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 65,"name": "服装/纺织/皮革","level": 1,"parentId": 57,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 66,"name": "奢侈品","level": 1,"parentId": 57,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 67,"name": "玩具/礼品","level": 1,"parentId": 57,"sort": 9,"status": "00","isDisabled": false,"children": []},{"id": 68,"name": "珠宝/首饰","level": 1,"parentId": 57,"sort": 10,"status": "00","isDisabled": false,"children": []},{"id": 69,"name": "办公用品/设备","level": 1,"parentId": 57,"sort": 11,"status": "00","isDisabled": false,"children": []},{"id": 70,"name": "工艺品/收藏品/艺术品","level": 1,"parentId": 57,"sort": 12,"status": "00","isDisabled": false,"children": []},{"id": 71,"name": "家具/家居/家电","level": 1,"parentId": 57,"sort": 13,"status": "00","isDisabled": false,"children": []},{"id": 72,"name": "贸易/进出口","level": 1,"parentId": 57,"sort": 14,"status": "00","isDisabled": false,"children": []}]},{"id": 73,"name": "专业服务","level": 0,"parentId": 0,"sort": 5,"status": "00","isDisabled": true,"children": [{"id": 74,"name": "法律服务","level": 1,"parentId": 73,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 75,"name": "咨询服务","level": 1,"parentId": 73,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 76,"name": "翻译服务","level": 1,"parentId": 73,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 77,"name": "人力资源服务","level": 1,"parentId": 73,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 78,"name": "财务/审计/税务","level": 1,"parentId": 73,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 79,"name": "工程技术与设计服务","level": 1,"parentId": 73,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 80,"name": "检测/认证","level": 1,"parentId": 73,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 81,"name": "景区/商业/市场等综合管理","level": 1,"parentId": 73,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 82,"name": "商业代理服务","level": 1,"parentId": 73,"sort": 9,"status": "00","isDisabled": false,"children": []},{"id": 83,"name": "专利/商标/知识产权","level": 1,"parentId": 73,"sort": 10,"status": "00","isDisabled": false,"children": []},{"id": 84,"name": "租赁服务","level": 1,"parentId": 73,"sort": 11,"status": "00","isDisabled": false,"children": []},{"id": 85,"name": "专业技术服务","level": 1,"parentId": 73,"sort": 12,"status": "00","isDisabled": false,"children": []}]},{"id": 86,"name": "生物医药/医疗健康","level": 0,"parentId": 0,"sort": 6,"status": "00","isDisabled": true,"children": [{"id": 87,"name": "医院","level": 1,"parentId": 86,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 88,"name": "卫生服务","level": 1,"parentId": 86,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 89,"name": "生物工程","level": 1,"parentId": 86,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 90,"name": "医药制造","level": 1,"parentId": 86,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 91,"name": "医疗检测","level": 1,"parentId": 86,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 92,"name": "医药批发/零售","level": 1,"parentId": 86,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 93,"name": "医疗设备/器械","level": 1,"parentId": 86,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 94,"name": "IVD","level": 1,"parentId": 86,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 95,"name": "医美/健康服务","level": 1,"parentId": 86,"sort": 9,"status": "00","isDisabled": false,"children": []},{"id": 96,"name": "医药外包","level": 1,"parentId": 86,"sort": 10,"status": "00","isDisabled": false,"children": []}]},{"id": 97,"name": "金融业","level": 0,"parentId": 0,"sort": 7,"status": "00","isDisabled": true,"children": [{"id": 98,"name": "银行","level": 1,"parentId": 97,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 99,"name": "保险","level": 1,"parentId": 97,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 100,"name": "基金","level": 1,"parentId": 97,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 101,"name": "信托","level": 1,"parentId": 97,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 102,"name": "证券/期货","level": 1,"parentId": 97,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 103,"name": "投资/融资","level": 1,"parentId": 97,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 104,"name": "汽车金融","level": 1,"parentId": 97,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 105,"name": "互联网金融/小额贷款","level": 1,"parentId": 97,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 106,"name": "租赁/拍卖/典当/担保","level": 1,"parentId": 97,"sort": 9,"status": "00","isDisabled": false,"children": []}]},{"id": 122,"name": "高技术制造业","level": 0,"parentId": 0,"sort": 8,"status": "00","isDisabled": true,"children": [{"id": 123,"name": "人工智能","level": 1,"parentId": 122,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 124,"name": "智能硬件","level": 1,"parentId": 122,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 125,"name": "物联网","level": 1,"parentId": 122,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 126,"name": "区块链","level": 1,"parentId": 122,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 127,"name": "云计算/大数据","level": 1,"parentId": 122,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 128,"name": "计算机硬件","level": 1,"parentId": 122,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 129,"name": "通信/网络设备","level": 1,"parentId": 122,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 130,"name": "电子/半导体/集成电路","level": 1,"parentId": 122,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 131,"name": "消费电子产品","level": 1,"parentId": 122,"sort": 9,"status": "00","isDisabled": false,"children": []},{"id": 132,"name": "光电子行业","level": 1,"parentId": 122,"sort": 10,"status": "00","isDisabled": false,"children": []},{"id": 133,"name": "船舶/航空/航天/火车制造","level": 1,"parentId": 122,"sort": 11,"status": "00","isDisabled": false,"children": []},{"id": 134,"name": "电气机械/电力设备","level": 1,"parentId": 122,"sort": 12,"status": "00","isDisabled": false,"children": []},{"id": 135,"name": "电子设备制造","level": 1,"parentId": 122,"sort": 13,"status": "00","isDisabled": false,"children": []},{"id": 136,"name": "机器人","level": 1,"parentId": 122,"sort": 14,"status": "00","isDisabled": false,"children": []},{"id": 137,"name": "专用设备制造","level": 1,"parentId": 122,"sort": 15,"status": "00","isDisabled": false,"children": []},{"id": 138,"name": "通用设备制造","level": 1,"parentId": 122,"sort": 16,"status": "00","isDisabled": false,"children": []},{"id": 139,"name": "仪器仪表制造","level": 1,"parentId": 122,"sort": 17,"status": "00","isDisabled": false,"children": []},{"id": 140,"name": "工业自动化","level": 1,"parentId": 122,"sort": 18,"status": "00","isDisabled": false,"children": []},{"id": 141,"name": "新材料","level": 1,"parentId": 122,"sort": 19,"status": "00","isDisabled": false,"children": []}]},{"id": 142,"name": "制造业","level": 0,"parentId": 0,"sort": 9,"status": "00","isDisabled": true,"children": [{"id": 143,"name": "船舶/航空/航天/火车制造","level": 1,"parentId": 142,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 144,"name": "电气机械/电力设备","level": 1,"parentId": 142,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 145,"name": "电子设备制造","level": 1,"parentId": 142,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 146,"name": "机器人","level": 1,"parentId": 142,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 147,"name": "钢铁/有色金属冶炼及加工","level": 1,"parentId": 142,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 148,"name": "专用设备制造","level": 1,"parentId": 142,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 149,"name": "军工制造","level": 1,"parentId": 142,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 150,"name": "金属制品业","level": 1,"parentId": 142,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 151,"name": "通用设备制造","level": 1,"parentId": 142,"sort": 9,"status": "00","isDisabled": false,"children": []},{"id": 152,"name": "仪器仪表制造","level": 1,"parentId": 142,"sort": 10,"status": "00","isDisabled": false,"children": []},{"id": 153,"name": "摩托车/自行车制造","level": 1,"parentId": 142,"sort": 11,"status": "00","isDisabled": false,"children": []},{"id": 154,"name": "非金属矿物制品业","level": 1,"parentId": 142,"sort": 12,"status": "00","isDisabled": false,"children": []},{"id": 155,"name": "新材料","level": 1,"parentId": 142,"sort": 13,"status": "00","isDisabled": false,"children": []},{"id": 156,"name": "化学纤维制造业","level": 1,"parentId": 142,"sort": 14,"status": "00","isDisabled": false,"children": []},{"id": 157,"name": "化学原料/化学制品","level": 1,"parentId": 142,"sort": 15,"status": "00","isDisabled": false,"children": []},{"id": 158,"name": "日化产品制造","level": 1,"parentId": 142,"sort": 16,"status": "00","isDisabled": false,"children": []},{"id": 159,"name": "纺织业/服饰产品加工制造","level": 1,"parentId": 142,"sort": 17,"status": "00","isDisabled": false,"children": []},{"id": 160,"name": "农副产品加工制造","level": 1,"parentId": 142,"sort": 18,"status": "00","isDisabled": false,"children": []},{"id": 161,"name": "燃料资源加工制造","level": 1,"parentId": 142,"sort": 19,"status": "00","isDisabled": false,"children": []},{"id": 162,"name": "橡胶和塑料制品","level": 1,"parentId": 142,"sort": 20,"status": "00","isDisabled": false,"children": []},{"id": 163,"name": "文体/办公设备制造","level": 1,"parentId": 142,"sort": 21,"status": "00","isDisabled": false,"children": []},{"id": 164,"name": "家具制造","level": 1,"parentId": 142,"sort": 22,"status": "00","isDisabled": false,"children": []},{"id": 165,"name": "印刷/包装/造纸","level": 1,"parentId": 142,"sort": 23,"status": "00","isDisabled": false,"children": []},{"id": 166,"name": "工业自动化","level": 1,"parentId": 142,"sort": 24,"status": "00","isDisabled": false,"children": []}]},{"id": 167,"name": "广告/传媒/文化/体育","level": 0,"parentId": 0,"sort": 10,"status": "00","isDisabled": true,"children": [{"id": 168,"name": "广告/营销","level": 1,"parentId": 167,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 169,"name": "广播/影视","level": 1,"parentId": 167,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 170,"name": "会议/展览","level": 1,"parentId": 167,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 171,"name": "文化艺术/娱乐","level": 1,"parentId": 167,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 172,"name": "体育","level": 1,"parentId": 167,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 173,"name": "新闻/出版","level": 1,"parentId": 167,"sort": 6,"status": "00","isDisabled": false,"children": []}]},{"id": 174,"name": "教育培训/科研","level": 0,"parentId": 0,"sort": 11,"status": "00","isDisabled": true,"children": [{"id": 175,"name": "培训/辅导服务","level": 1,"parentId": 174,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 176,"name": "学校/学历教育","level": 1,"parentId": 174,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 177,"name": "学术/科研","level": 1,"parentId": 174,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 178,"name": "科学技术推广","level": 1,"parentId": 174,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 179,"name": "其他教育培训","level": 1,"parentId": 174,"sort": 5,"status": "00","isDisabled": false,"children": []}]},{"id": 180,"name": "汽车","level": 0,"parentId": 0,"sort": 12,"status": "00","isDisabled": true,"children": [{"id": 181,"name": "汽车研发/制造","level": 1,"parentId": 180,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 182,"name": "汽车零部件","level": 1,"parentId": 180,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 183,"name": "4S店/后市场","level": 1,"parentId": 180,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 184,"name": "新能源汽车","level": 1,"parentId": 180,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 185,"name": "汽车智能网联","level": 1,"parentId": 180,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 186,"name": "汽车经销商","level": 1,"parentId": 180,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 187,"name": "汽车后市场","level": 1,"parentId": 180,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 188,"name": "摩托车/自行车制造","level": 1,"parentId": 180,"sort": 8,"status": "00","isDisabled": false,"children": []}]},{"id": 189,"name": "房地产/建筑","level": 0,"parentId": 0,"sort": 13,"status": "00","isDisabled": true,"children": [{"id": 190,"name": "房地产开发经营","level": 1,"parentId": 189,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 191,"name": "工程施工","level": 1,"parentId": 189,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 192,"name": "建筑设计","level": 1,"parentId": 189,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 193,"name": "装修装饰","level": 1,"parentId": 189,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 194,"name": "建筑材料","level": 1,"parentId": 189,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 195,"name": "房地产中介/租赁","level": 1,"parentId": 189,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 196,"name": "物业管理","level": 1,"parentId": 189,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 197,"name": "房屋建筑工程","level": 1,"parentId": 189,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 198,"name": "土木工程","level": 1,"parentId": 189,"sort": 9,"status": "00","isDisabled": false,"children": []},{"id": 199,"name": "机电工程","level": 1,"parentId": 189,"sort": 10,"status": "00","isDisabled": false,"children": []},{"id": 200,"name": "建筑工程咨询服务","level": 1,"parentId": 189,"sort": 11,"status": "00","isDisabled": false,"children": []},{"id": 201,"name": "土地与公共设施管理","level": 1,"parentId": 189,"sort": 12,"status": "00","isDisabled": false,"children": []}]},{"id": 202,"name": "交通运输/物流","level": 0,"parentId": 0,"sort": 14,"status": "00","isDisabled": true,"children": [{"id": 203,"name": "交通/运输","level": 1,"parentId": 202,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 204,"name": "物流/仓储","level": 1,"parentId": 202,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 205,"name": "即时配送","level": 1,"parentId": 202,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 206,"name": "快递","level": 1,"parentId": 202,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 207,"name": "公路物流","level": 1,"parentId": 202,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 208,"name": "同城货运","level": 1,"parentId": 202,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 209,"name": "跨境物流","level": 1,"parentId": 202,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 210,"name": "装卸搬运和仓储业","level": 1,"parentId": 202,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 211,"name": "客运服务","level": 1,"parentId": 202,"sort": 9,"status": "00","isDisabled": false,"children": []},{"id": 212,"name": "港口/铁路/公路/机场","level": 1,"parentId": 202,"sort": 10,"status": "00","isDisabled": false,"children": []}]},{"id": 213,"name": "能源/化工/环保","level": 0,"parentId": 0,"sort": 15,"status": "00","isDisabled": true,"children": [{"id": 214,"name": "石油/石化","level": 1,"parentId": 213,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 215,"name": "化工","level": 1,"parentId": 213,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 216,"name": "矿产/地质","level": 1,"parentId": 213,"sort": 3,"status": "00","isDisabled": false,"children": []},{"id": 217,"name": "采掘/冶炼","level": 1,"parentId": 213,"sort": 4,"status": "00","isDisabled": false,"children": []},{"id": 218,"name": "电力/热力/燃气/水利","level": 1,"parentId": 213,"sort": 5,"status": "00","isDisabled": false,"children": []},{"id": 219,"name": "新能源","level": 1,"parentId": 213,"sort": 6,"status": "00","isDisabled": false,"children": []},{"id": 220,"name": "环保","level": 1,"parentId": 213,"sort": 7,"status": "00","isDisabled": false,"children": []},{"id": 221,"name": "光伏","level": 1,"parentId": 213,"sort": 8,"status": "00","isDisabled": false,"children": []},{"id": 222,"name": "储能","level": 1,"parentId": 213,"sort": 9,"status": "00","isDisabled": false,"children": []},{"id": 223,"name": "动力电池","level": 1,"parentId": 213,"sort": 10,"status": "00","isDisabled": false,"children": []},{"id": 224,"name": "风电","level": 1,"parentId": 213,"sort": 11,"status": "00","isDisabled": false,"children": []},{"id": 225,"name": "其他新能源","level": 1,"parentId": 213,"sort": 12,"status": "00","isDisabled": false,"children": []}]},{"id": 226,"name": "农/林/牧/渔","level": 0,"parentId": 0,"sort": 16,"status": "00","isDisabled": true,"children": [{"id": 227,"name": "农/林/牧/渔","level": 1,"parentId": 226,"sort": 1,"status": "00","isDisabled": false,"children": []}]},{"id": 228,"name": "政府/非盈利机构","level": 0,"parentId": 0,"sort": 17,"status": "00","isDisabled": true,"children": [{"id": 229,"name": "政府/公共事业","level": 1,"parentId": 228,"sort": 1,"status": "00","isDisabled": false,"children": []},{"id": 230,"name": "社团/组织/社会保障","level": 1,"parentId": 228,"sort": 2,"status": "00","isDisabled": false,"children": []},{"id": 231,"name": "养老/孤儿/看护","level": 1,"parentId": 228,"sort": 3,"status": "00","isDisabled": false,"children": []}]}]}},onLoad() {},methods: {handOpen() {this.$refs.child.open()},onChange(e) {console.log(e)this.list = ethis.$refs.child.close()}}}
</script><style></style>

相关文章:

uniapp 常用的地区行业各种多选多选,支持回显,复制粘贴可使用

uniapp 常用的地区行业各种多选多选&#xff0c;支持回显 必须导入uni-popup 弹出层 该组件 1.目前项目开发中使用到这类似挺多的&#xff0c;记录一下&#xff0c;方便以后是使用 2.使用前提&#xff0c;目前不做无限级&#xff0c;只支持二维数组&#xff0c;模板里只循环了两…...

iOS 本地存储地址(位置)

前言: UserDefaults 存在沙盒的 Library --> Preferences--> .plist文件 CoreData 存在沙盒的 Library --> Application Support--> xx.sqlite 一个小型数据库里 (注:Application Support 这个文件夹已开始是没有的,只有当你写了存储代码,运行之后,目录里才会出…...

uni.showLoading 时禁止点击(防止表单重复提交) 小程序调取微信支付

在使用 uni.showLoading 时,如果需要禁用点击事件,可以在调用 uni.showLoading 之前设置全局的触摸事件为禁用状态,然后在 uni.hideLoading 之后再重新启用。 mask 选项是 uni.showLoading 的一个参数,当设置为 true 时,会显示遮罩,此时用户不能点击底层的任何内容。 // …...

OpenClash与Tailscale冲突得问题

1.问题描述&#xff1a;开了openclash之后&#xff0c;tailscale就用不了。tailscale ping XXX.XXX.XXX.XXX 可以成功。但是用cmd的ping就不通。 2.tailscale登录得时候&#xff0c;加上这两个参数&#xff1a;--accept-dnsfalse 和 --netfilter-modeoff 。 示例&#xff1a;t…...

day02|计算机网络重难点之HTTP请求报文和响应报文

day02|计算机网络重难点之HTTP请求报文和响应报文 3.HTTP请求报文和响应报文是怎样的&#xff0c;有哪些常见的字段&#xff1f; 3.HTTP请求报文和响应报文是怎样的&#xff0c;有哪些常见的字段&#xff1f; HTTP请求报文主要是由 请求行、请求头部、空行和请求体 四部分组成…...

Flutter之build 方法详解

前言 我们创建一个Flutter程序&#xff0c;入口文件内容如下 //导包&#xff0c;此行代码作用是导入了 Material UI 组件库。Material (opens new window)是一种标准的移动端和 web 端的视觉设计语言&#xff0c; Flutter默认提供了一套丰富的 Material 风格的 UI 组件。 impo…...

开源呼叫中心系统与商业软件的对比

开源呼叫中心系统与商业软件的对比 作者&#xff1a;FreeIPCC 在当今的商业环境中&#xff0c;呼叫中心系统已成为企业与客户之间沟通的重要桥梁。而在选择呼叫中心系统时&#xff0c;企业面临着两种主要的选择&#xff1a;开源呼叫中心系统和商业软件。这两种系统各有其独特的…...

【人工智能】——matplotlib教程

文章目录 1.matplotlib简介2.基本绘图功能2.1给图形添加辅助功能2.2在一个坐标系中绘制多个图像2.3多个坐标系显示图像 3.常见图像绘制 1.matplotlib简介 matplotlib 是一个用于创建二维图表和数据可视化的 Python 库&#xff0c;它提供了一种类似于 MATLAB 的绘图接口。matplo…...

【c++ gtest】使用谷歌提供的gtest和抖音豆包提供的AI大模型来对代码中的函数进行测试

【c gtest】使用谷歌提供的gtest和抖音豆包提供的AI大模型来对代码中的函数进行测试 下载谷歌提供的c测试库在VsCode中安装抖音AI大模型找到c项目文件夹&#xff0c;使用VsCode和VS进行双开生成gtest代码进行c单例测试 下载谷歌提供的c测试库 在谷歌浏览器搜索github gtest, 第…...

使用Angular构建动态Web应用

&#x1f496; 博客主页&#xff1a;瑕疵的CSDN主页 &#x1f4bb; Gitee主页&#xff1a;瑕疵的gitee主页 &#x1f680; 文章专栏&#xff1a;《热点资讯》 使用Angular构建动态Web应用 1 引言 2 Angular简介 3 安装Angular CLI 4 创建Angular项目 5 设计应用结构 6 创建组件…...

25届电信保研经验贴(自动化所)

个人背景 学校&#xff1a;中九 专业&#xff1a;电子信息工程 加权&#xff1a;92.89 绩点&#xff1a;3.91/4.0 rank&#xff1a;前五学期rank2/95&#xff0c;综合排名rank1&#xff08;前六学期和综合排名出的晚&#xff0c;实际上只用到了前五学期&#xff09; 科研…...

大数据-190 Elasticsearch - ELK 日志分析实战 - 配置启动 Filebeat Logstash

点一下关注吧&#xff01;&#xff01;&#xff01;非常感谢&#xff01;&#xff01;持续更新&#xff01;&#xff01;&#xff01; 目前已经更新到了&#xff1a; Hadoop&#xff08;已更完&#xff09;HDFS&#xff08;已更完&#xff09;MapReduce&#xff08;已更完&am…...

不同类型的 LED 驱动电源在检测方法上有哪些不同?-纳米软件

1.传统 LED 驱动电源检测方法&#xff1a; 通常会提取 LED 驱动电源性能指标参数中较为重要的几个因子&#xff0c;如电压稳定性、电流波动范围等。利用诸如 k-means 聚类分析方法&#xff0c;实现对不同厂家、使用寿命不同的 LED 驱动电源快速有效的分类2。这种方法主要是通过…...

android 生成json 文件

在做网络请求的时候需要生成一个如下的json文件&#xff1a; {"messages": [{"role": "user","content": [{"type": "image_base64","image_base64": "pp"},{"type": "text&…...

C++新增的类功能和可变参数模板

C新增的类功能和可变参数模板 新的类功能默认成员函数 可变参数模板模拟实现emplace_back &#x1f30f;个人博客主页&#xff1a; 个人主页 新的类功能 默认成员函数 原来C类中&#xff0c;有6个默认成员函数&#xff1a; 构造函数析构函数拷贝构造函数拷贝赋值重载取地址…...

redo log 日志 与 undo log 日志工作原理

目录标题 1. redo log 日志2. undo log 日志3.总结 1. redo log 日志 redo log日志是 MySQL 数据中的重要日志之一&#xff0c;其本质是物理日志&#xff0c;存放于 数据库的数据目录中 &#xff0c;名称为&#xff1a; ib_logfile 。它的功能主要是用于存放脏数据的日志&…...

go语言结构体与json数据相互转换

本博文简要介绍go语言结构体如何与json格式化字符串相互转换。 文章目录 go语言结构体转换为json数据json数据转换为go结构体 go语言结构体转换为json数据 type Person struct {Name string json:"name"Age int json:"age"Hobbies []strin…...

jenkins 自动化部署Springboot 项目

一、安装docker 1.更新yum命令 yum -y update2.查看机器有残留的docker服务&#xff0c;有就卸载干净 查看docker 服务 rpm -qa |grep docker卸载docker sudo yum remove docker-ce docker-ce-cli containerd.io sudo rm -rf /var/lib/docker sudo rm -rf /var/lib/contai…...

使用xml发送国际短信(smspro)【吉尔吉斯斯坦】

//使用xml格式发送国外短信验证码【吉尔吉斯斯坦】官网&#xff1a;https://smspro.nikita.kg/ public function api_test($data,$user){$url "http://smspro.nikita.kg/api/message";$code 123456 ;$content Your verification code 123456, this verification …...

springmvc-springsecurity-redhat keycloak SAML2 xml实现

环境准备&#xff1a; jdk17 redhat keycloak 24 spring security 6 参照文档&#xff1a; 红帽KeyCloak&#xff1a;Red Hat build of Keycloak | Red Hat Product Documentation 入门指南&#xff1a;入门指南 | Red Hat Product Documentation 服务器管理指南&#x…...

【K8S系列】Kubernetes Pod节点CrashLoopBackOff 状态及解决方案详解【已解决】

在 Kubernetes 中&#xff0c;Pod 的状态为 CrashLoopBackOff 表示某个容器在启动后崩溃&#xff0c;Kubernetes 尝试重启该容器&#xff0c;但由于持续崩溃&#xff0c;重启的间隔时间逐渐增加。下面将详细介绍 CrashLoopBackOff 状态的原因、解决方案及相关命令的输出解释。 …...

Linux: Shell编程入门

Shell 编程入门 1 ) Shell 概念 shell 是 在英语中 壳, 外壳的意思可以把它想象成嵌入在linux这样的操作系统里面的一个微型的编程语言不像C语言, C 或 Java 等编程语言那么完整&#xff0c;它可以帮我们完成很多自动化任务例如保存数据监测系统的负载等等&#xff0c;我们同样…...

python爬虫实战案例——抓取B站视频,不同清晰度抓取,实现音视频合并,超详细!(内含完整代码)

文章目录 1、任务目标2、网页分析3、代码编写 1、任务目标 目标网站&#xff1a;B站视频&#xff08;https://www.bilibili.com/video/BV1se41117WP/?vd_sourcee8e376ccbc5aa4cfd88e6a7917adfd1a&#xff09;&#xff0c;用于本文测验 要求&#xff1a;抓取该网址下的视频&…...

容灾与云计算概念

​​​​​​基础知识容灾备份——备份技术系统架构与备份网络方案-CSDN博客 SAN&#xff0c;是storage area network的简称&#xff0c;翻译过来就是存储区域网络。 顾名思义&#xff0c;SAN首先是一个网络&#xff0c;其次它是关于存储的&#xff0c;区域则是指服务器和存储资…...

基于 Python 的自然语言处理系列(44):Summarization(文本摘要)

在这一部分中&#xff0c;我们将探讨如何使用 Transformer 模型将长文档压缩为摘要&#xff0c;这个任务被称为文本摘要。文本摘要是 NLP 领域中最具挑战性的任务之一&#xff0c;因为它需要理解长篇文本并生成连贯的总结&#xff0c;捕捉文档中的核心主题。然而&#xff0c;当…...

RabbitMQ安装部署

安装Erlang 由于RabbitMQ是用Erlang语言编写的&#xff0c;所以在安装RabbitMQ之前需要安装Erlang 安装依赖 [rootpro-ex ~]yum install make gcc gcc-c build-essential openssl openssl-devel unixODBC unixODBC-devel kernel-devel m4 ncurses-devel设置Eralng的存储库 […...

智联招聘×Milvus:向量召回技术提升招聘匹配效率

01. 业务背景 在智联招聘平台&#xff0c;求职者和招聘者之间的高效匹配至关重要。招聘者可以发布职位寻找合适的人才&#xff0c;求职者则通过上传简历寻找合适的工作。在这种复杂的场景中&#xff0c;我们的核心目标是为双方提供精准的匹配结果。在搜索推荐场景下&#xff0c…...

unplugin-auto-import 库作用

unplugin-auto-import是一个 Vite、Webpack 和 Rollup 的插件。 一、自动导入模块 1. 减少手动导入 在 JavaScript 和 TypeScript 项目中&#xff0c;它可以自动检测并导入常用的模块和函数&#xff0c;无需手动在每个文件中进行导入操作。这大大减少了代码中的重复性导入语…...

【Multisim14.0正弦波>方波>三角波】2022-6-8

缘由有没有人会做啊Multisim14.0-其他-CSDN问答参考方波、三角波、正弦波信号产生 - 豆丁网...

vue3纯前端验证码示例

前言 验证码的用途&#xff1a;通过要求用户输入一串难以被机器自动识别的字符或图像&#xff0c;有效阻止恶意用户或脚本通过暴力破解方式尝试登录账户。验证码的分类&#xff1a;常见的验证码有短信、文本、图形等&#xff0c;安全度越高&#xff0c;依赖的插件或服务也越多…...

佛山营销型网站建设/电商网站设计方案

满意答案linux查看某个用户组下面的所有用户网上搜了下&#xff0c;好多copy的文章&#xff0c;groups显示的是当前登录用户的所在用户组&#xff0c;根本就没有此用户组的用户列表。实践了下&#xff0c;可以用以下方法查看某个用户组里的所有用户&#xff1a;系统内有关组的信…...

如何选网站建设公司/网站seo优化公司

原 基于支持向量机的机器学习策略&#xff08;附源码&#xff09; 机器学习策略简介 什么是机器学习策略&#xff1f; ​ 从广义上来说,机器学习是一种能够赋予机器学习的能力以此让它完成直接编程无法完成的功能的方法.但从实践的意义上来说,机器学习是一种通过利用数据,训…...

泉州网站建设-泉州网站建设公司/百度app免费下载安装最新版

不久前&#xff0c;2019年国际篮联篮球世界杯让这个夏天的尾巴再度燃了起来&#xff01;男篮在球场上身姿飞腾&#xff0c;让观众不禁拿起手机&#xff0c;疯狂按下快门记录着肆意飞扬的热血现场。输赢不论&#xff0c;那些个定格在镜头中的努力身影&#xff0c;都是一幅幅真实…...

长沙网站建立公司/营销网店推广的软文

1、动态投影(ArcMap)所谓动态投影是指ArcMap中的Data空间参考或是说坐标系统是默认为第一加载到当前工作区的那个文件的坐标系统&#xff0c;后加入的数据如果和当前工作区坐标系统不相同&#xff0c;则ArcMap会自动做投影变换&#xff0c;把后加入的数据投影变换到当前坐标系统…...

大学生做的美食网站/天津抖音seo

在执行optimize表时&#xff0c;如果出现Repair with keycache时&#xff0c;说明tmp空间不够了...这时MySQL性能极低&#xff0c;又不能冒然kill掉进程&#xff0c;所以耐心等待操作完成吧。而内存足够的情况下&#xff0c;这种过程应该是提示Repair by sorting。如何避免这种…...

app界面素材/手机网站怎么优化

Java重定向输出流实现程序日志System中的out,error都是final类型的&#xff0c;不能做改动。但通过setOut()可以设置新的输出流&#xff0c;从而实现写日志的功能。import java.io.PrintStream; import java.io.FileNotFoundException; public class RedirectOutputStream { …...