<template>
	<view>
		<!-- 弹出层 -->
		<view :class="['sel-popup', isShow ? 'sel-open' : '', animation ? 'sel-animation' : '']">
			<view class="sel-box">
				<view class="sel-top">
					<view class="sel-top-left" @click="getResult('cancel')">取消</view>
					<view :class="confirmClass" @click="getResult('confirm')">确定</view>
				</view>
				<view class="sel-title">
					<view class="sel-title-item" v-for="(i, e) in tabList" :key="e" @click="checkTab(e)" v-if="e < level">
						<view v-if="tabId >= e" :id="'se-' + e"
							:class="tabId == e ? ' sel-title-item-true' : 'sel-title-item-false'">
							{{ checkArr[e] ? checkArr[e].label : i.title }}
						</view>
					</view>
				</view>
				<scroll-view class="sel-scroll-view_H" scroll-y="true">
					<view class="sel-scroll-view-box" v-if="checkBox.length && checkBox[tabId]">
						<view class="sel-scroll-view-list" v-for="(item, index) in checkBox[tabId]" :key="index"
							@click="check(index)"
							:class="checkArr[tabId] ? item.label == checkArr[tabId].label ? 'sel-scroll-view-item-true' : 'sel-scroll-view-item' : 'sel-scroll-view-item'">
							{{ item.label }}
						</view>
					</view>
					<view class="sel-scroll-view-noBox" v-else>
						<image :src="noDataImg"></image>
						<view class="text">暂无数据</view>
					</view>
				</scroll-view>
				<view v-show="safeArea" class="sel-temp"></view>
			</view>
		</view>
		<!-- 遮罩层 -->
		<view v-show="isShow" class="sel-mask" @click="isMask ? close() : ''"></view>
	</view>
</template>

<script>
	// import cityList from '../../city.js';
	import noData from '../../static/noData.png'
	export default {
		props: {
			//选择层级：2=省市，3=省市县区（默认）
			level: {
				type: Number,
				default: 3,
			},
			//是否开启动画
			animation: {
				type: Boolean,
				default: true,
			},
			//是否点击阴影关闭
			isMask: {
				type: Boolean,
				default: true,
			},
			//是否开启安全条
			safeArea: {
				type: Boolean,
				default: true,
			},
		},
		computed: {
			confirmClass() {
				return this.checkArr.length >= this.level ? 'sel-top-right-check' : 'sel-top-right';
			},
			tabListComputed() {
				const list = [
					{ title: '选择所在省', id: 0 },
					{ title: '选择所在市', id: 1 }
				];
				if (this.level >= 3) {
					list.push({ title: '选择所在区', id: 2 });
				}
				return list;
			}
		},
		data() {
			return {
				isShow: false,
				checkBox: [],
				noDataImg: '',
				cityList: [],
				tabId: 0, //计算当前顶部滑块id
				checkArr: [],
				id: 0, //通tabId，他们2的区别是，id先赋值，tabId在数据请求成功后才会赋值
				tabList: [
					{ title: '选择所在省', id: 0 },
					{ title: '选择所在市', id: 1 },
					{ title: '选择所在区', id: 2 }
				],
			};
		},
		mounted() {
			this.noDataImg = noData
		},
		methods: {
			init() {
				// 初始化数据
				this.id = 0;
				this.tabId = 0;
				this.checkBox = [];
				this.checkArr = [];
				this.getData();
			},
			open() {
				this.isShow = true;
				this.init();
			},
			close() {
				this.isShow = false;
			},
			async check(index) {
				console.log('check called - id:', this.id, 'level:', this.level, 'tabList.length:', this.tabList.length);
				this.$set(this.checkArr, this.id, this.checkBox[this.id][index]);
				console.log('after set checkArr:', JSON.stringify(this.checkArr));
				if (this.id < this.tabList.length - 1) this.id = this.id + 1;
				console.log('next id:', this.id);
				await this.getData(); //同步请求
				if (this.tabId < this.tabList.length - 1) this.tabId = this.tabId + 1;
			},

			checkTab(e) {
				if (e == this.id) return;
				this.id = e;
				this.tabId = e;
				this.checkArr = this.checkArr.splice(0, e);
			},

		getResult(event) {
			if (event == 'confirm') {
				// 检查是否选择了所有必要的级别
				console.log('getResult confirm:', {
					checkArrLength: this.checkArr.length,
					level: this.level,
					checkArr: this.checkArr
				});
				if (this.checkArr.length < this.level) {
					console.warn('选择不完整，无法确认');
					return;
				}
				let result = this.checkArr;
				this.$emit('change', {
					value: result
				});
			}
			this.close();
		},

		async getData() {
			// 加载数据
			if (this.checkArr.length >= this.level) return;
			
			uni.showLoading({ title: '加载中...' });
			
			if (this.checkArr.length) {
				// 已有选择，从缓存children取数据
				var id = this.checkArr?.[this.id - 1]?.value
				let idList = this.checkBox?.[this.id - 1]?.find(item => {
					return item.value == id;
				})
				if (idList?.children && idList.children.length > 0) {
					this.$set(this.checkBox, this.id, idList.children)
				} else {
					this.$set(this.checkBox, this.id, [])
				}
				uni.hideLoading();
			} else {
				// 首次加载 - 使用 Promise 正确处理异步
				try {
					const res = await this.requestCityData()
					if (res && res.data) {
						this.$set(this.checkBox, this.id, res.data)
					} else {
						this.$set(this.checkBox, this.id, [])
					}
				} catch (e) {
					console.error('获取城市数据失败:', e)
					this.$set(this.checkBox, this.id, [])
				} finally {
					uni.hideLoading();
				}
			}
		},
		
		// 独立的请求方法 - 使用腾讯地图行政区域API
		requestCityData() {
			return new Promise((resolve, reject) => {
				// 腾讯地图 WebService API 密钥（需要去腾讯位置服务申请）
				const key = '7CBBZ-BLRL3-4EB35-RUCIH-XANPE-6FFTJ';
				
				uni.request({
					url: `https://apis.map.qq.com/ws/district/v1/list?key=${key}&output=json`,
					method: 'GET',
					timeout: 15000,
					success: (res) => {
						if (res.statusCode === 200 && res.data && res.data.status === 0) {
							// 转换腾讯地图数据格式为组件需要的格式
							const districtData = res.data.result;
							const formattedData = this.formatDistrictData(districtData);
							resolve({ data: formattedData });
						} else {
							// API失败时，使用内置精简数据作为降级方案
							console.warn('腾讯地图API失败，使用内置数据');
							resolve({ data: this.getFallbackData() });
						}
					},
					fail: (err) => {
						console.error('请求失败，尝试内置数据:', err);
						// 网络失败时使用内置精简数据
						resolve({ data: this.getFallbackData() });
					}
				});
			});
		},
		
		// 转换腾讯地图数据格式
		formatDistrictData(districtData) {
			// 腾讯地图返回的是 [省数组, 市数组, 区数组] 的嵌套结构
			const provinces = districtData[0] || [];
			const cities = districtData[1] || [];
			const districts = districtData[2] || [];
			
			// 构建以parent_id为key的映射
			const cityMap = {};
			const districtMap = {};
			
			cities.forEach(city => {
				if (!cityMap[city.parent_id]) cityMap[city.parent_id] = [];
				cityMap[city.parent_id].push({
					id: city.id,
					value: city.id,
					label: city.fullname || city.name,
					name: city.fullname || city.name,
					children: []
				});
			});
			
			districts.forEach(dist => {
				if (!districtMap[dist.parent_id]) districtMap[dist.parent_id] = [];
				districtMap[dist.parent_id].push({
					id: dist.id,
					value: dist.id,
					label: dist.fullname || dist.name,
					name: dist.fullname || dist.name,
					children: []
				});
			});
			
			// 组装完整的树形结构
			return provinces.map(province => {
				const provinceItem = {
					id: province.id,
					value: province.id,
					label: province.fullname || province.name,
					name: province.fullname || province.name,
					children: cityMap[province.id] || []
				};
				
				// 补充区/县数据
				provinceItem.children.forEach(city => {
					city.children = districtMap[city.id] || [];
				});
				
				return provinceItem;
			});
		},
		
		// 内置精简数据（常见省份，直辖市、港澳台）
		getFallbackData() {
			return [
				{ id: '110000', value: '110000', label: '北京市', name: '北京市', children: [
					{ id: '110100', value: '110100', label: '市辖区', name: '市辖区', children: [
						{ id: '110101', value: '110101', label: '东城区', name: '东城区', children: [] },
						{ id: '110102', value: '110102', label: '西城区', name: '西城区', children: [] },
						{ id: '110105', value: '110105', label: '朝阳区', name: '朝阳区', children: [] },
						{ id: '110106', value: '110106', label: '丰台区', name: '丰台区', children: [] },
						{ id: '110107', value: '110107', label: '石景山区', name: '石景山区', children: [] },
						{ id: '110108', value: '110108', label: '海淀区', name: '海淀区', children: [] },
						{ id: '110109', value: '110109', label: '门头沟区', name: '门头沟区', children: [] },
						{ id: '110111', value: '110111', label: '房山区', name: '房山区', children: [] },
						{ id: '110112', value: '110112', label: '通州区', name: '通州区', children: [] },
						{ id: '110113', value: '110113', label: '顺义区', name: '顺义区', children: [] },
						{ id: '110114', value: '110114', label: '昌平区', name: '昌平区', children: [] },
						{ id: '110115', value: '110115', label: '大兴区', name: '大兴区', children: [] },
						{ id: '110116', value: '110116', label: '怀柔区', name: '怀柔区', children: [] },
						{ id: '110117', value: '110117', label: '平谷区', name: '平谷区', children: [] },
						{ id: '110118', value: '110118', label: '密云区', name: '密云区', children: [] },
						{ id: '110119', value: '110119', label: '延庆区', name: '延庆区', children: [] }
					]}
				]},
				{ id: '120000', value: '120000', label: '天津市', name: '天津市', children: [
					{ id: '120100', value: '120100', label: '市辖区', name: '市辖区', children: [
						{ id: '120101', value: '120101', label: '和平区', name: '和平区', children: [] },
						{ id: '120102', value: '120102', label: '河东区', name: '河东区', children: [] },
						{ id: '120103', value: '120103', label: '河西区', name: '河西区', children: [] },
						{ id: '120104', value: '120104', label: '南开区', name: '南开区', children: [] },
						{ id: '120105', value: '120105', label: '河北区', name: '河北区', children: [] },
						{ id: '120106', value: '120106', label: '红桥区', name: '红桥区', children: [] },
						{ id: '120110', value: '120110', label: '东丽区', name: '东丽区', children: [] },
						{ id: '120111', value: '120111', label: '西青区', name: '西青区', children: [] },
						{ id: '120112', value: '120112', label: '津南区', name: '津南区', children: [] },
						{ id: '120113', value: '120113', label: '北辰区', name: '北辰区', children: [] },
						{ id: '120114', value: '120114', label: '武清区', name: '武清区', children: [] },
						{ id: '120115', value: '120115', label: '宝坻区', name: '宝坻区', children: [] },
						{ id: '120116', value: '120116', label: '滨海新区', name: '滨海新区', children: [] },
						{ id: '120117', value: '120117', label: '宁河区', name: '宁河区', children: [] },
						{ id: '120118', value: '120118', label: '静海区', name: '静海区', children: [] },
						{ id: '120119', value: '120119', label: '蓟州区', name: '蓟州区', children: [] }
					]}
				]},
				{ id: '310000', value: '310000', label: '上海市', name: '上海市', children: [
					{ id: '310100', value: '310100', label: '市辖区', name: '市辖区', children: [
						{ id: '310101', value: '310101', label: '黄浦区', name: '黄浦区', children: [] },
						{ id: '310104', value: '310104', label: '徐汇区', name: '徐汇区', children: [] },
						{ id: '310105', value: '310105', label: '长宁区', name: '长宁区', children: [] },
						{ id: '310106', value: '310106', label: '静安区', name: '静安区', children: [] },
						{ id: '310107', value: '310107', label: '普陀区', name: '普陀区', children: [] },
						{ id: '310109', value: '310109', label: '虹口区', name: '虹口区', children: [] },
						{ id: '310110', value: '310110', label: '杨浦区', name: '杨浦区', children: [] },
						{ id: '310112', value: '310112', label: '闵行区', name: '闵行区', children: [] },
						{ id: '310113', value: '310113', label: '宝山区', name: '宝山区', children: [] },
						{ id: '310114', value: '310114', label: '嘉定区', name: '嘉定区', children: [] },
						{ id: '310115', value: '310115', label: '浦东新区', name: '浦东新区', children: [] },
						{ id: '310116', value: '310116', label: '金山区', name: '金山区', children: [] },
						{ id: '310117', value: '310117', label: '松江区', name: '松江区', children: [] },
						{ id: '310118', value: '310118', label: '青浦区', name: '青浦区', children: [] },
						{ id: '310120', value: '310120', label: '奉贤区', name: '奉贤区', children: [] },
						{ id: '310151', value: '310151', label: '崇明区', name: '崇明区', children: [] }
					]}
				]},
				{ id: '500000', value: '500000', label: '重庆市', name: '重庆市', children: [
					{ id: '500100', value: '500100', label: '万州区', name: '万州区', children: [] },
					{ id: '500101', value: '500101', label: '涪陵区', name: '涪陵区', children: [] },
					{ id: '500102', value: '500102', label: '渝中区', name: '渝中区', children: [] },
					{ id: '500103', value: '500103', label: '大渡口区', name: '大渡口区', children: [] },
					{ id: '500104', value: '500104', label: '江北区', name: '江北区', children: [] },
					{ id: '500105', value: '500105', label: '沙坪坝区', name: '沙坪坝区', children: [] },
					{ id: '500106', value: '500106', label: '九龙坡区', name: '九龙坡区', children: [] },
					{ id: '500107', value: '500107', label: '南岸区', name: '南岸区', children: [] },
					{ id: '500108', value: '500108', label: '北碚区', name: '北碚区', children: [] },
					{ id: '500109', value: '500109', label: '渝北区', name: '渝北区', children: [] },
					{ id: '500110', value: '500110', label: '巴南区', name: '巴南区', children: [] },
					{ id: '500111', value: '500111', label: '黔江区', name: '黔江区', children: [] },
					{ id: '500112', value: '500112', label: '长寿区', name: '长寿区', children: [] },
					{ id: '500113', value: '500113', label: '江津区', name: '江津区', children: [] },
					{ id: '500114', value: '500114', label: '合川区', name: '合川区', children: [] },
					{ id: '500115', value: '500115', label: '永川区', name: '永川区', children: [] },
					{ id: '500116', value: '500116', label: '南川区', name: '南川区', children: [] }
				]},
				{ id: '510000', value: '510000', label: '四川省', name: '四川省', children: [
					{ id: '510100', value: '510100', label: '成都市', name: '成都市', children: [
						{ id: '510104', value: '510104', label: '锦江区', name: '锦江区', children: [] },
						{ id: '510105', value: '510105', label: '青羊区', name: '青羊区', children: [] },
						{ id: '510106', value: '510106', label: '金牛区', name: '金牛区', children: [] },
						{ id: '510107', value: '510107', label: '武侯区', name: '武侯区', children: [] },
						{ id: '510108', value: '510108', label: '成华区', name: '成华区', children: [] },
						{ id: '510112', value: '510112', label: '龙泉驿区', name: '龙泉驿区', children: [] },
						{ id: '510113', value: '510113', label: '青白江区', name: '青白江区', children: [] },
						{ id: '510114', value: '510114', label: '新都区', name: '新都区', children: [] },
						{ id: '510115', value: '510115', label: '温江区', name: '温江区', children: [] },
						{ id: '510116', value: '510116', label: '双流区', name: '双流区', children: [] },
						{ id: '510117', value: '510117', label: '郫都区', name: '郫都区', children: [] }
					]},
					{ id: '510300', value: '510300', label: '自贡市', name: '自贡市', children: [] },
					{ id: '510400', value: '510400', label: '攀枝花市', name: '攀枝花市', children: [] },
					{ id: '510500', value: '510500', label: '泸州市', name: '泸州市', children: [] },
					{ id: '510600', value: '510600', label: '德阳市', name: '德阳市', children: [] },
					{ id: '510700', value: '510700', label: '绵阳市', name: '绵阳市', children: [] },
					{ id: '510800', value: '510800', label: '广元市', name: '广元市', children: [] },
					{ id: '510900', value: '510900', label: '遂宁市', name: '遂宁市', children: [] },
					{ id: '511000', value: '511000', label: '内江市', name: '内江市', children: [] },
					{ id: '511100', value: '511100', label: '乐山市', name: '乐山市', children: [] },
					{ id: '511300', value: '511300', label: '南充市', name: '南充市', children: [] },
					{ id: '511400', value: '511400', label: '眉山市', name: '眉山市', children: [] },
					{ id: '511500', value: '511500', label: '宜宾市', name: '宜宾市', children: [] },
					{ id: '511600', value: '511600', label: '广安市', name: '广安市', children: [] },
					{ id: '511700', value: '511700', label: '达州市', name: '达州市', children: [] },
					{ id: '511800', value: '511800', label: '雅安市', name: '雅安市', children: [] },
					{ id: '511900', value: '511900', label: '巴中市', name: '巴中市', children: [] },
					{ id: '512000', value: '512000', label: '资阳市', name: '资阳市', children: [] }
				]},
				{ id: '440000', value: '440000', label: '广东省', name: '广东省', children: [
					{ id: '440100', value: '440100', label: '广州市', name: '广州市', children: [
						{ id: '440103', value: '440103', label: '荔湾区', name: '荔湾区', children: [] },
						{ id: '440104', value: '440104', label: '越秀区', name: '越秀区', children: [] },
						{ id: '440105', value: '440105', label: '海珠区', name: '海珠区', children: [] },
						{ id: '440106', value: '440106', label: '天河区', name: '天河区', children: [] },
						{ id: '440111', value: '440111', label: '白云区', name: '白云区', children: [] },
						{ id: '440112', value: '440112', label: '黄埔区', name: '黄埔区', children: [] },
						{ id: '440113', value: '440113', label: '番禺区', name: '番禺区', children: [] },
						{ id: '440114', value: '440114', label: '花都区', name: '花都区', children: [] },
						{ id: '440115', value: '440115', label: '南沙区', name: '南沙区', children: [] },
						{ id: '440117', value: '440117', label: '从化区', name: '从化区', children: [] },
						{ id: '440118', value: '440118', label: '增城区', name: '增城区', children: [] }
					]},
					{ id: '440300', value: '440300', label: '深圳市', name: '深圳市', children: [
						{ id: '440303', value: '440303', label: '罗湖区', name: '罗湖区', children: [] },
						{ id: '440304', value: '440304', label: '福田区', name: '福田区', children: [] },
						{ id: '440305', value: '440305', label: '南山区', name: '南山区', children: [] },
						{ id: '440306', value: '440306', label: '宝安区', name: '宝安区', children: [] },
						{ id: '440307', value: '440307', label: '龙岗区', name: '龙岗区', children: [] },
						{ id: '440308', value: '440308', label: '盐田区', name: '盐田区', children: [] },
						{ id: '440309', value: '440309', label: '龙华区', name: '龙华区', children: [] },
						{ id: '440310', value: '440310', label: '坪山区', name: '坪山区', children: [] },
						{ id: '440311', value: '440311', label: '光明区', name: '光明区', children: [] }
					]},
					{ id: '440400', value: '440400', label: '珠海市', name: '珠海市', children: [] },
					{ id: '440500', value: '440500', label: '汕头市', name: '汕头市', children: [] },
					{ id: '440600', value: '440600', label: '佛山市', name: '佛山市', children: [
						{ id: '440604', value: '440604', label: '禅城区', name: '禅城区', children: [] },
						{ id: '440605', value: '440605', label: '南海区', name: '南海区', children: [] },
						{ id: '440606', value: '440606', label: '顺德区', name: '顺德区', children: [] },
						{ id: '440607', value: '440607', label: '三水区', name: '三水区', children: [] },
						{ id: '440608', value: '440608', label: '高明区', name: '高明区', children: [] }
					]},
					{ id: '440700', value: '440700', label: '江门市', name: '江门市', children: [] },
					{ id: '440800', value: '440800', label: '湛江市', name: '湛江市', children: [] },
					{ id: '440900', value: '440900', label: '茂名市', name: '茂名市', children: [] },
					{ id: '441200', value: '441200', label: '肇庆市', name: '肇庆市', children: [] },
					{ id: '441300', value: '441300', label: '惠州市', name: '惠州市', children: [] },
					{ id: '441400', value: '441400', label: '梅州市', name: '梅州市', children: [] },
					{ id: '441500', value: '441500', label: '汕尾市', name: '汕尾市', children: [] },
					{ id: '441600', value: '441600', label: '河源市', name: '河源市', children: [] },
					{ id: '441700', value: '441700', label: '阳江市', name: '阳江市', children: [] },
					{ id: '441800', value: '441800', label: '清远市', name: '清远市', children: [] },
					{ id: '441900', value: '441900', label: '东莞市', name: '东莞市', children: [] },
					{ id: '442000', value: '442000', label: '中山市', name: '中山市', children: [] },
					{ id: '445100', value: '445100', label: '潮州市', name: '潮州市', children: [] },
					{ id: '445200', value: '445200', label: '揭阳市', name: '揭阳市', children: [] },
					{ id: '445300', value: '445300', label: '云浮市', name: '云浮市', children: [] }
				]},
				{ id: '450000', value: '450000', label: '广西壮族自治区', name: '广西壮族自治区', children: [
					{ id: '450100', value: '450100', label: '南宁市', name: '南宁市', children: [
						{ id: '450102', value: '450102', label: '兴宁区', name: '兴宁区', children: [] },
						{ id: '450103', value: '450103', label: '青秀区', name: '青秀区', children: [] },
						{ id: '450105', value: '450105', label: '江南区', name: '江南区', children: [] },
						{ id: '450107', value: '450107', label: '西乡塘区', name: '西乡塘区', children: [] },
						{ id: '450108', value: '450108', label: '良庆区', name: '良庆区', children: [] },
						{ id: '450109', value: '450109', label: '邕宁区', name: '邕宁区', children: [] },
						{ id: '450110', value: '450110', label: '武鸣区', name: '武鸣区', children: [] },
						{ id: '450123', value: '450123', label: '隆安县', name: '隆安县', children: [] },
						{ id: '450124', value: '450124', label: '马山县', name: '马山县', children: [] },
						{ id: '450125', value: '450125', label: '上林县', name: '上林县', children: [] },
						{ id: '450126', value: '450126', label: '宾阳县', name: '宾阳县', children: [] },
						{ id: '450127', value: '450127', label: '横县', name: '横县', children: [] }
					]},
					{ id: '450200', value: '450200', label: '柳州市', name: '柳州市', children: [
						{ id: '450202', value: '450202', label: '城中区', name: '城中区', children: [] },
						{ id: '450203', value: '450203', label: '鱼峰区', name: '鱼峰区', children: [] },
						{ id: '450204', value: '450204', label: '柳南区', name: '柳南区', children: [] },
						{ id: '450205', value: '450205', label: '柳北区', name: '柳北区', children: [] },
						{ id: '450206', value: '450206', label: '柳江区', name: '柳江区', children: [] },
						{ id: '450222', value: '450222', label: '柳城县', name: '柳城县', children: [] },
						{ id: '450223', value: '450223', label: '鹿寨县', name: '鹿寨县', children: [] },
						{ id: '450224', value: '450224', label: '融安县', name: '融安县', children: [] },
						{ id: '450225', value: '450225', label: '融水苗族自治县', name: '融水苗族自治县', children: [] },
						{ id: '450226', value: '450226', label: '三江侗族自治县', name: '三江侗族自治县', children: [] }
					]},
					{ id: '450300', value: '450300', label: '桂林市', name: '桂林市', children: [
						{ id: '450302', value: '450302', label: '秀峰区', name: '秀峰区', children: [] },
						{ id: '450303', value: '450303', label: '叠彩区', name: '叠彩区', children: [] },
						{ id: '450304', value: '450304', label: '象山区', name: '象山区', children: [] },
						{ id: '450305', value: '450305', label: '七星区', name: '七星区', children: [] },
						{ id: '450311', value: '450311', label: '雁山区', name: '雁山区', children: [] },
						{ id: '450312', value: '450312', label: '临桂区', name: '临桂区', children: [] },
						{ id: '450321', value: '450321', label: '阳朔县', name: '阳朔县', children: [] },
						{ id: '450323', value: '450323', label: '灵川县', name: '灵川县', children: [] },
						{ id: '450324', value: '450324', label: '全州县', name: '全州县', children: [] },
						{ id: '450325', value: '450325', label: '兴安县', name: '兴安县', children: [] },
						{ id: '450326', value: '450326', label: '永福县', name: '永福县', children: [] },
						{ id: '450327', value: '450327', label: '灌阳县', name: '灌阳县', children: [] },
						{ id: '450328', value: '450328', label: '龙胜各族自治县', name: '龙胜各族自治县', children: [] },
						{ id: '450329', value: '450329', label: '资源县', name: '资源县', children: [] },
						{ id: '450330', value: '450330', label: '平乐县', name: '平乐县', children: [] },
						{ id: '450332', value: '450332', label: '恭城瑶族自治县', name: '恭城瑶族自治县', children: [] },
						{ id: '450381', value: '450381', label: '荔浦市', name: '荔浦市', children: [] }
					]},
					{ id: '450400', value: '450400', label: '梧州市', name: '梧州市', children: [] },
					{ id: '450500', value: '450500', label: '北海市', name: '北海市', children: [
						{ id: '450502', value: '450502', label: '海城区', name: '海城区', children: [] },
						{ id: '450503', value: '450503', label: '银海区', name: '银海区', children: [] },
						{ id: '450512', value: '450512', label: '铁山港区', name: '铁山港区', children: [] },
						{ id: '450521', value: '450521', label: '合浦县', name: '合浦县', children: [] }
					]},
					{ id: '450600', value: '450600', label: '防城港市', name: '防城港市', children: [] },
					{ id: '450700', value: '450700', label: '钦州市', name: '钦州市', children: [] },
					{ id: '450800', value: '450800', label: '贵港市', name: '贵港市', children: [
						{ id: '450802', value: '450802', label: '港北区', name: '港北区', children: [] },
						{ id: '450803', value: '450803', label: '港南区', name: '港南区', children: [] },
						{ id: '450804', value: '450804', label: '覃塘区', name: '覃塘区', children: [] },
						{ id: '450821', value: '450821', label: '平南县', name: '平南县', children: [] },
						{ id: '450881', value: '450881', label: '桂平市', name: '桂平市', children: [] }
					]},
					{ id: '450900', value: '450900', label: '玉林市', name: '玉林市', children: [
						{ id: '450902', value: '450902', label: '玉州区', name: '玉州区', children: [] },
						{ id: '450903', value: '450903', label: '福绵区', name: '福绵区', children: [] },
						{ id: '450921', value: '450921', label: '容县', name: '容县', children: [] },
						{ id: '450922', value: '450922', label: '陆川县', name: '陆川县', children: [] },
						{ id: '450923', value: '450923', label: '博白县', name: '博白县', children: [] },
						{ id: '450924', value: '450924', label: '兴业县', name: '兴业县', children: [] },
						{ id: '450981', value: '450981', label: '北流市', name: '北流市', children: [] }
					]},
					{ id: '451000', value: '451000', label: '百色市', name: '百色市', children: [] },
					{ id: '451100', value: '451100', label: '贺州市', name: '贺州市', children: [] },
					{ id: '451200', value: '451200', label: '河池市', name: '河池市', children: [] },
					{ id: '451300', value: '451300', label: '来宾市', name: '来宾市', children: [] },
					{ id: '451400', value: '451400', label: '崇左市', name: '崇左市', children: [] }
				]},
				{ id: '330000', value: '330000', label: '浙江省', name: '浙江省', children: [
					{ id: '330100', value: '330100', label: '杭州市', name: '杭州市', children: [
						{ id: '330102', value: '330102', label: '上城区', name: '上城区', children: [] },
						{ id: '330105', value: '330105', label: '拱墅区', name: '拱墅区', children: [] },
						{ id: '330106', value: '330106', label: '西湖区', name: '西湖区', children: [] },
						{ id: '330108', value: '330108', label: '滨江区', name: '滨江区', children: [] },
						{ id: '330109', value: '330109', label: '萧山区', name: '萧山区', children: [] },
						{ id: '330110', value: '330110', label: '余杭区', name: '余杭区', children: [] },
						{ id: '330111', value: '330111', label: '富阳区', name: '富阳区', children: [] },
						{ id: '330112', value: '330112', label: '临安区', name: '临安区', children: [] },
						{ id: '330113', value: '330113', label: '临平区', name: '临平区', children: [] },
						{ id: '330114', value: '330114', label: '钱塘区', name: '钱塘区', children: [] }
					]},
					{ id: '330200', value: '330200', label: '宁波市', name: '宁波市', children: [
						{ id: '330203', value: '330203', label: '海曙区', name: '海曙区', children: [] },
						{ id: '330205', value: '330205', label: '江北区', name: '江北区', children: [] },
						{ id: '330206', value: '330206', label: '北仑区', name: '北仑区', children: [] },
						{ id: '330211', value: '330211', label: '镇海区', name: '镇海区', children: [] },
						{ id: '330212', value: '330212', label: '鄞州区', name: '鄞州区', children: [] }
					]},
					{ id: '330300', value: '330300', label: '温州市', name: '温州市', children: [] },
					{ id: '330400', value: '330400', label: '嘉兴市', name: '嘉兴市', children: [] },
					{ id: '330500', value: '330500', label: '湖州市', name: '湖州市', children: [] },
					{ id: '330600', value: '330600', label: '绍兴市', name: '绍兴市', children: [] },
					{ id: '330700', value: '330700', label: '金华市', name: '金华市', children: [] },
					{ id: '330800', value: '330800', label: '衢州市', name: '衢州市', children: [] },
					{ id: '330900', value: '330900', label: '舟山市', name: '舟山市', children: [] },
					{ id: '331000', value: '331000', label: '台州市', name: '台州市', children: [] },
					{ id: '331100', value: '331100', label: '丽水市', name: '丽水市', children: [] }
				]},
				{ id: '320000', value: '320000', label: '江苏省', name: '江苏省', children: [
					{ id: '320100', value: '320100', label: '南京市', name: '南京市', children: [
						{ id: '320102', value: '320102', label: '玄武区', name: '玄武区', children: [] },
						{ id: '320104', value: '320104', label: '秦淮区', name: '秦淮区', children: [] },
						{ id: '320105', value: '320105', label: '建邺区', name: '建邺区', children: [] },
						{ id: '320106', value: '320106', label: '鼓楼区', name: '鼓楼区', children: [] },
						{ id: '320111', value: '320111', label: '浦口区', name: '浦口区', children: [] },
						{ id: '320113', value: '320113', label: '栖霞区', name: '栖霞区', children: [] },
						{ id: '320114', value: '320114', label: '雨花台区', name: '雨花台区', children: [] },
						{ id: '320115', value: '320115', label: '江宁区', name: '江宁区', children: [] },
						{ id: '320116', value: '320116', label: '六合区', name: '六合区', children: [] },
						{ id: '320117', value: '320117', label: '溧水区', name: '溧水区', children: [] },
						{ id: '320118', value: '320118', label: '高淳区', name: '高淳区', children: [] }
					]},
					{ id: '320200', value: '320200', label: '无锡市', name: '无锡市', children: [] },
					{ id: '320300', value: '320300', label: '徐州市', name: '徐州市', children: [] },
					{ id: '320400', value: '320400', label: '常州市', name: '常州市', children: [] },
					{ id: '320500', value: '320500', label: '苏州市', name: '苏州市', children: [
						{ id: '320505', value: '320505', label: '虎丘区', name: '虎丘区', children: [] },
						{ id: '320506', value: '320506', label: '吴中区', name: '吴中区', children: [] },
						{ id: '320507', value: '320507', label: '相城区', name: '相城区', children: [] },
						{ id: '320508', value: '320508', label: '姑苏区', name: '姑苏区', children: [] },
						{ id: '320509', value: '320509', label: '吴江区', name: '吴江区', children: [] },
						{ id: '320581', value: '320581', label: '常熟市', name: '常熟市', children: [] },
						{ id: '320582', value: '320582', label: '张家港市', name: '张家港市', children: [] },
						{ id: '320583', value: '320583', label: '昆山市', name: '昆山市', children: [] },
						{ id: '320585', value: '320585', label: '太仓市', name: '太仓市', children: [] }
					]},
					{ id: '320600', value: '320600', label: '南通市', name: '南通市', children: [] },
					{ id: '320700', value: '320700', label: '连云港市', name: '连云港市', children: [] },
					{ id: '320800', value: '320800', label: '淮安市', name: '淮安市', children: [] },
					{ id: '320900', value: '320900', label: '盐城市', name: '盐城市', children: [] },
					{ id: '321000', value: '321000', label: '扬州市', name: '扬州市', children: [] },
					{ id: '321100', value: '321100', label: '镇江市', name: '镇江市', children: [] },
					{ id: '321200', value: '321200', label: '泰州市', name: '泰州市', children: [] },
					{ id: '321300', value: '321300', label: '宿迁市', name: '宿迁市', children: [] }
				]},
				{ id: '370000', value: '370000', label: '山东省', name: '山东省', children: [
					{ id: '370100', value: '370100', label: '济南市', name: '济南市', children: [] },
					{ id: '370200', value: '370200', label: '青岛市', name: '青岛市', children: [] },
					{ id: '370300', value: '370300', label: '淄博市', name: '淄博市', children: [] },
					{ id: '370400', value: '370400', label: '枣庄市', name: '枣庄市', children: [] },
					{ id: '370500', value: '370500', label: '东营市', name: '东营市', children: [] },
					{ id: '370600', value: '370600', label: '烟台市', name: '烟台市', children: [] },
					{ id: '370700', value: '370700', label: '潍坊市', name: '潍坊市', children: [] },
					{ id: '370800', value: '370800', label: '济宁市', name: '济宁市', children: [] },
					{ id: '370900', value: '370900', label: '泰安市', name: '泰安市', children: [] },
					{ id: '371000', value: '371000', label: '威海市', name: '威海市', children: [] },
					{ id: '371100', value: '371100', label: '日照市', name: '日照市', children: [] },
					{ id: '371300', value: '371300', label: '临沂市', name: '临沂市', children: [] },
					{ id: '371400', value: '371400', label: '德州市', name: '德州市', children: [] },
					{ id: '371500', value: '371500', label: '聊城市', name: '聊城市', children: [] },
					{ id: '371600', value: '371600', label: '滨州市', name: '滨州市', children: [] },
					{ id: '371700', value: '371700', label: '菏泽市', name: '菏泽市', children: [] }
				]},
				{ id: '410000', value: '410000', label: '河南省', name: '河南省', children: [
					{ id: '410100', value: '410100', label: '郑州市', name: '郑州市', children: [] },
					{ id: '410200', value: '410200', label: '开封市', name: '开封市', children: [] },
					{ id: '410300', value: '410300', label: '洛阳市', name: '洛阳市', children: [] },
					{ id: '410400', value: '410400', label: '平顶山市', name: '平顶山市', children: [] },
					{ id: '410500', value: '410500', label: '安阳市', name: '安阳市', children: [] },
					{ id: '410600', value: '410600', label: '鹤壁市', name: '鹤壁市', children: [] },
					{ id: '410700', value: '410700', label: '新乡市', name: '新乡市', children: [] },
					{ id: '410800', value: '410800', label: '焦作市', name: '焦作市', children: [] },
					{ id: '410900', value: '410900', label: '濮阳市', name: '濮阳市', children: [] },
					{ id: '411000', value: '411000', label: '许昌市', name: '许昌市', children: [] },
					{ id: '411100', value: '411100', label: '漯河市', name: '漯河市', children: [] },
					{ id: '411200', value: '411200', label: '三门峡市', name: '三门峡市', children: [] },
					{ id: '411300', value: '411300', label: '南阳市', name: '南阳市', children: [] },
					{ id: '411400', value: '411400', label: '商丘市', name: '商丘市', children: [] },
					{ id: '411500', value: '411500', label: '信阳市', name: '信阳市', children: [] },
					{ id: '411600', value: '411600', label: '周口市', name: '周口市', children: [] },
					{ id: '411700', value: '411700', label: '驻马店市', name: '驻马店市', children: [] }
				]},
				{ id: '420000', value: '420000', label: '湖北省', name: '湖北省', children: [
					{ id: '420100', value: '420100', label: '武汉市', name: '武汉市', children: [] },
					{ id: '420200', value: '420200', label: '黄石市', name: '黄石市', children: [] },
					{ id: '420300', value: '420300', label: '十堰市', name: '十堰市', children: [] },
					{ id: '420500', value: '420500', label: '宜昌市', name: '宜昌市', children: [] },
					{ id: '420600', value: '420600', label: '襄阳市', name: '襄阳市', children: [] },
					{ id: '420700', value: '420700', label: '鄂州市', name: '鄂州市', children: [] },
					{ id: '420800', value: '420800', label: '荆门市', name: '荆门市', children: [] },
					{ id: '420900', value: '420900', label: '孝感市', name: '孝感市', children: [] },
					{ id: '421000', value: '421000', label: '荆州市', name: '荆州市', children: [] },
					{ id: '421100', value: '421100', label: '黄冈市', name: '黄冈市', children: [] },
					{ id: '421200', value: '421200', label: '咸宁市', name: '咸宁市', children: [] },
					{ id: '421300', value: '421300', label: '随州市', name: '随州市', children: [] }
				]},
				{ id: '430000', value: '430000', label: '湖南省', name: '湖南省', children: [
					{ id: '430100', value: '430100', label: '长沙市', name: '长沙市', children: [] },
					{ id: '430200', value: '430200', label: '株洲市', name: '株洲市', children: [] },
					{ id: '430300', value: '430300', label: '湘潭市', name: '湘潭市', children: [] },
					{ id: '430400', value: '430400', label: '衡阳市', name: '衡阳市', children: [] },
					{ id: '430500', value: '430500', label: '邵阳市', name: '邵阳市', children: [] },
					{ id: '430600', value: '430600', label: '岳阳市', name: '岳阳市', children: [] },
					{ id: '430700', value: '430700', label: '常德市', name: '常德市', children: [] },
					{ id: '430800', value: '430800', label: '张家界市', name: '张家界市', children: [] },
					{ id: '430900', value: '430900', label: '益阳市', name: '益阳市', children: [] },
					{ id: '431000', value: '431000', label: '郴州市', name: '郴州市', children: [] },
					{ id: '431100', value: '431100', label: '永州市', name: '永州市', children: [] },
					{ id: '431200', value: '431200', label: '怀化市', name: '怀化市', children: [] },
					{ id: '431300', value: '431300', label: '娄底市', name: '娄底市', children: [] }
				]},
				{ id: '350000', value: '350000', label: '福建省', name: '福建省', children: [
					{ id: '350100', value: '350100', label: '福州市', name: '福州市', children: [] },
					{ id: '350200', value: '350200', label: '厦门市', name: '厦门市', children: [] },
					{ id: '350300', value: '350300', label: '莆田市', name: '莆田市', children: [] },
					{ id: '350400', value: '350400', label: '三明市', name: '三明市', children: [] },
					{ id: '350500', value: '350500', label: '泉州市', name: '泉州市', children: [] },
					{ id: '350600', value: '350600', label: '漳州市', name: '漳州市', children: [] },
					{ id: '350700', value: '350700', label: '南平市', name: '南平市', children: [] },
					{ id: '350800', value: '350800', label: '龙岩市', name: '龙岩市', children: [] },
					{ id: '350900', value: '350900', label: '宁德市', name: '宁德市', children: [] }
				]},
				{ id: '360000', value: '360000', label: '江西省', name: '江西省', children: [
					{ id: '360100', value: '360100', label: '南昌市', name: '南昌市', children: [] },
					{ id: '360200', value: '360200', label: '景德镇市', name: '景德镇市', children: [] },
					{ id: '360300', value: '360300', label: '萍乡市', name: '萍乡市', children: [] },
					{ id: '360400', value: '360400', label: '九江市', name: '九江市', children: [] },
					{ id: '360500', value: '360500', label: '新余市', name: '新余市', children: [] },
					{ id: '360600', value: '360600', label: '鹰潭市', name: '鹰潭市', children: [] },
					{ id: '360700', value: '360700', label: '赣州市', name: '赣州市', children: [] },
					{ id: '360800', value: '360800', label: '吉安市', name: '吉安市', children: [] },
					{ id: '360900', value: '360900', label: '宜春市', name: '宜春市', children: [] },
					{ id: '361000', value: '361000', label: '抚州市', name: '抚州市', children: [] },
					{ id: '361100', value: '361100', label: '上饶市', name: '上饶市', children: [] }
				]},
				{ id: '530000', value: '530000', label: '云南省', name: '云南省', children: [
					{ id: '530100', value: '530100', label: '昆明市', name: '昆明市', children: [] },
					{ id: '530300', value: '530300', label: '曲靖市', name: '曲靖市', children: [] },
					{ id: '530400', value: '530400', label: '玉溪市', name: '玉溪市', children: [] },
					{ id: '530500', value: '530500', label: '保山市', name: '保山市', children: [] },
					{ id: '530600', value: '530600', label: '昭通市', name: '昭通市', children: [] },
					{ id: '530700', value: '530700', label: '丽江市', name: '丽江市', children: [] },
					{ id: '530800', value: '530800', label: '普洱市', name: '普洱市', children: [] },
					{ id: '530900', value: '530900', label: '临沧市', name: '临沧市', children: [] }
				]},
				{ id: '520000', value: '520000', label: '贵州省', name: '贵州省', children: [
					{ id: '520100', value: '520100', label: '贵阳市', name: '贵阳市', children: [] },
					{ id: '520200', value: '520200', label: '六盘水市', name: '六盘水市', children: [] },
					{ id: '520300', value: '520300', label: '遵义市', name: '遵义市', children: [] },
					{ id: '520400', value: '520400', label: '安顺市', name: '安顺市', children: [] },
					{ id: '520500', value: '520500', label: '毕节市', name: '毕节市', children: [] },
					{ id: '520600', value: '520600', label: '铜仁市', name: '铜仁市', children: [] }
				]},
				{ id: '460000', value: '460000', label: '海南省', name: '海南省', children: [
					{ id: '460100', value: '460100', label: '海口市', name: '海口市', children: [] },
					{ id: '460200', value: '460200', label: '三亚市', name: '三亚市', children: [] },
					{ id: '460300', value: '460300', label: '三沙市', name: '三沙市', children: [] },
					{ id: '460400', value: '460400', label: '儋州市', name: '儋州市', children: [] }
				]},
				{ id: '610000', value: '610000', label: '陕西省', name: '陕西省', children: [
					{ id: '610100', value: '610100', label: '西安市', name: '西安市', children: [] },
					{ id: '610200', value: '610200', label: '铜川市', name: '铜川市', children: [] },
					{ id: '610300', value: '610300', label: '宝鸡市', name: '宝鸡市', children: [] },
					{ id: '610400', value: '610400', label: '咸阳市', name: '咸阳市', children: [] },
					{ id: '610500', value: '610500', label: '渭南市', name: '渭南市', children: [] },
					{ id: '610600', value: '610600', label: '延安市', name: '延安市', children: [] },
					{ id: '610700', value: '610700', label: '汉中市', name: '汉中市', children: [] },
					{ id: '610800', value: '610800', label: '榆林市', name: '榆林市', children: [] },
					{ id: '610900', value: '610900', label: '安康市', name: '安康市', children: [] },
					{ id: '611000', value: '611000', label: '商洛市', name: '商洛市', children: [] }
				]},
				{ id: '140000', value: '140000', label: '山西省', name: '山西省', children: [
					{ id: '140100', value: '140100', label: '太原市', name: '太原市', children: [] },
					{ id: '140200', value: '140200', label: '大同市', name: '大同市', children: [] },
					{ id: '140300', value: '140300', label: '阳泉市', name: '阳泉市', children: [] },
					{ id: '140400', value: '140400', label: '长治市', name: '长治市', children: [] },
					{ id: '140500', value: '140500', label: '晋城市', name: '晋城市', children: [] },
					{ id: '140600', value: '140600', label: '朔州市', name: '朔州市', children: [] },
					{ id: '140700', value: '140700', label: '晋中市', name: '晋中市', children: [] },
					{ id: '140800', value: '140800', label: '运城市', name: '运城市', children: [] },
					{ id: '140900', value: '140900', label: '忻州市', name: '忻州市', children: [] },
					{ id: '141000', value: '141000', label: '临汾市', name: '临汾市', children: [] },
					{ id: '141100', value: '141100', label: '吕梁市', name: '吕梁市', children: [] }
				]},
				{ id: '130000', value: '130000', label: '河北省', name: '河北省', children: [
					{ id: '130100', value: '130100', label: '石家庄市', name: '石家庄市', children: [] },
					{ id: '130200', value: '130200', label: '唐山市', name: '唐山市', children: [] },
					{ id: '130300', value: '130300', label: '秦皇岛市', name: '秦皇岛市', children: [] },
					{ id: '130400', value: '130400', label: '邯郸市', name: '邯郸市', children: [] },
					{ id: '130500', value: '130500', label: '邢台市', name: '邢台市', children: [] },
					{ id: '130600', value: '130600', label: '保定市', name: '保定市', children: [] },
					{ id: '130700', value: '130700', label: '张家口市', name: '张家口市', children: [] },
					{ id: '130800', value: '130800', label: '承德市', name: '承德市', children: [] },
					{ id: '130900', value: '130900', label: '沧州市', name: '沧州市', children: [] },
					{ id: '131000', value: '131000', label: '廊坊市', name: '廊坊市', children: [] },
					{ id: '131100', value: '131100', label: '衡水市', name: '衡水市', children: [] }
				]},
				{ id: '230000', value: '230000', label: '黑龙江省', name: '黑龙江省', children: [
					{ id: '230100', value: '230100', label: '哈尔滨市', name: '哈尔滨市', children: [] },
					{ id: '230200', value: '230200', label: '齐齐哈尔市', name: '齐齐哈尔市', children: [] },
					{ id: '230300', value: '230300', label: '鸡西市', name: '鸡西市', children: [] },
					{ id: '230400', value: '230400', label: '鹤岗市', name: '鹤岗市', children: [] },
					{ id: '230500', value: '230500', label: '双鸭山市', name: '双鸭山市', children: [] },
					{ id: '230600', value: '230600', label: '大庆市', name: '大庆市', children: [] },
					{ id: '230700', value: '230700', label: '伊春市', name: '伊春市', children: [] },
					{ id: '230800', value: '230800', label: '佳木斯市', name: '佳木斯市', children: [] },
					{ id: '230900', value: '230900', label: '七台河市', name: '七台河市', children: [] },
					{ id: '231000', value: '231000', label: '牡丹江市', name: '牡丹江市', children: [] },
					{ id: '231100', value: '231100', label: '黑河市', name: '黑河市', children: [] },
					{ id: '231200', value: '231200', label: '绥化市', name: '绥化市', children: [] }
				]},
				{ id: '220000', value: '220000', label: '吉林省', name: '吉林省', children: [
					{ id: '220100', value: '220100', label: '长春市', name: '长春市', children: [] },
					{ id: '220200', value: '220200', label: '吉林市', name: '吉林市', children: [] },
					{ id: '220300', value: '220300', label: '四平市', name: '四平市', children: [] },
					{ id: '220400', value: '220400', label: '辽源市', name: '辽源市', children: [] },
					{ id: '220500', value: '220500', label: '通化市', name: '通化市', children: [] },
					{ id: '220600', value: '220600', label: '白山市', name: '白山市', children: [] },
					{ id: '220700', value: '220700', label: '松原市', name: '松原市', children: [] },
					{ id: '220800', value: '220800', label: '白城市', name: '白城市', children: [] }
				]},
				{ id: '210000', value: '210000', label: '辽宁省', name: '辽宁省', children: [
					{ id: '210100', value: '210100', label: '沈阳市', name: '沈阳市', children: [] },
					{ id: '210200', value: '210200', label: '大连市', name: '大连市', children: [] },
					{ id: '210300', value: '210300', label: '鞍山市', name: '鞍山市', children: [] },
					{ id: '210400', value: '210400', label: '抚顺市', name: '抚顺市', children: [] },
					{ id: '210500', value: '210500', label: '本溪市', name: '本溪市', children: [] },
					{ id: '210600', value: '210600', label: '丹东市', name: '丹东市', children: [] },
					{ id: '210700', value: '210700', label: '锦州市', name: '锦州市', children: [] },
					{ id: '210800', value: '210800', label: '营口市', name: '营口市', children: [] },
					{ id: '210900', value: '210900', label: '阜新市', name: '阜新市', children: [] },
					{ id: '211000', value: '211000', label: '辽阳市', name: '辽阳市', children: [] },
					{ id: '211100', value: '211100', label: '盘锦市', name: '盘锦市', children: [] },
					{ id: '211200', value: '211200', label: '铁岭市', name: '铁岭市', children: [] },
					{ id: '211300', value: '211300', label: '朝阳市', name: '朝阳市', children: [] },
					{ id: '211400', value: '211400', label: '葫芦岛市', name: '葫芦岛市', children: [] }
				]},
				{ id: '620000', value: '620000', label: '甘肃省', name: '甘肃省', children: [
					{ id: '620100', value: '620100', label: '兰州市', name: '兰州市', children: [] },
					{ id: '620200', value: '620200', label: '嘉峪关市', name: '嘉峪关市', children: [] },
					{ id: '620300', value: '620300', label: '金昌市', name: '金昌市', children: [] },
					{ id: '620400', value: '620400', label: '白银市', name: '白银市', children: [] },
					{ id: '620500', value: '620500', label: '天水市', name: '天水市', children: [] },
					{ id: '620600', value: '620600', label: '武威市', name: '武威市', children: [] },
					{ id: '620700', value: '620700', label: '张掖市', name: '张掖市', children: [] },
					{ id: '620800', value: '620800', label: '平凉市', name: '平凉市', children: [] },
					{ id: '620900', value: '620900', label: '酒泉市', name: '酒泉市', children: [] },
					{ id: '621000', value: '621000', label: '庆阳市', name: '庆阳市', children: [] },
					{ id: '621100', value: '621100', label: '定西市', name: '定西市', children: [] },
					{ id: '621200', value: '621200', label: '陇南市', name: '陇南市', children: [] }
				]},
				{ id: '630000', value: '630000', label: '青海省', name: '青海省', children: [
					{ id: '630100', value: '630100', label: '西宁市', name: '西宁市', children: [] },
					{ id: '630200', value: '630200', label: '海东市', name: '海东市', children: [] }
				]},
				{ id: '640000', value: '640000', label: '宁夏回族自治区', name: '宁夏回族自治区', children: [
					{ id: '640100', value: '640100', label: '银川市', name: '银川市', children: [] },
					{ id: '640200', value: '640200', label: '石嘴山市', name: '石嘴山市', children: [] },
					{ id: '640300', value: '640300', label: '吴忠市', name: '吴忠市', children: [] },
					{ id: '640400', value: '640400', label: '固原市', name: '固原市', children: [] },
					{ id: '640500', value: '640500', label: '中卫市', name: '中卫市', children: [] }
				]},
				{ id: '650000', value: '650000', label: '新疆维吾尔自治区', name: '新疆维吾尔自治区', children: [
					{ id: '650100', value: '650100', label: '乌鲁木齐市', name: '乌鲁木齐市', children: [] },
					{ id: '650200', value: '650200', label: '克拉玛依市', name: '克拉玛依市', children: [] },
					{ id: '650400', value: '650400', label: '吐鲁番市', name: '吐鲁番市', children: [] },
					{ id: '650500', value: '650500', label: '哈密市', name: '哈密市', children: [] }
				]},
				{ id: '540000', value: '540000', label: '西藏自治区', name: '西藏自治区', children: [
					{ id: '540100', value: '540100', label: '拉萨市', name: '拉萨市', children: [] },
					{ id: '540200', value: '540200', label: '日喀则市', name: '日喀则市', children: [] }
				]},
				{ id: '150000', value: '150000', label: '内蒙古自治区', name: '内蒙古自治区', children: [
					{ id: '150100', value: '150100', label: '呼和浩特市', name: '呼和浩特市', children: [] },
					{ id: '150200', value: '150200', label: '包头市', name: '包头市', children: [] },
					{ id: '150300', value: '150300', label: '乌海市', name: '乌海市', children: [] },
					{ id: '150400', value: '150400', label: '赤峰市', name: '赤峰市', children: [] },
					{ id: '150500', value: '150500', label: '通辽市', name: '通辽市', children: [] },
					{ id: '150600', value: '150600', label: '鄂尔多斯市', name: '鄂尔多斯市', children: [] },
					{ id: '150700', value: '150700', label: '呼伦贝尔市', name: '呼伦贝尔市', children: [] },
					{ id: '150800', value: '150800', label: '巴彦淖尔市', name: '巴彦淖尔市', children: [] },
					{ id: '150900', value: '150900', label: '乌兰察布市', name: '乌兰察布市', children: [] }
				]}
			];
		},
		},
	};
</script>

<style>
	/deep/ ::-webkit-scrollbar {
		width: 0;
		height: 0;
		color: transparent;
		display: none;
	}
</style>
<style lang="scss" scoped>
	/* 弹出层默认样式 */
	.sel-popup {
		width: 100%;
		position: fixed;
		bottom: -100%;
		z-index: 999;
	}

	/* 点击按钮是将盒子 bottom 值归零即可实现弹出效果,
	同理，如需更改弹出方向只需将bottom改成top、left、right即可
	(默认样式的方向也需一起更改哦) */
	.sel-open {
		bottom: 0px !important;
	}

	.sel-animation {
		transition: all 0.25s linear;
	}

	/* 遮罩层样式 */
	.sel-mask {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.3);
		z-index: 998;
	}

	.sel-box {
		position: absolute;
		bottom: 0;
		width: 100%;
		background: #ffff;
		border-radius: 12rpx 12px 0 0;
	}

	.sel-temp {
		padding-bottom: env(safe-area-inset-bottom);
	}

	.sel-top {
		height: 88rpx;
		line-height: 88rpx;
		display: flex;
		justify-content: space-between;
		margin: 28rpx 32rpx 0rpx 32rpx;
	}

	.sel-top-left {
		font-size: 30rpx;
		color: #999;
		height: 68rpx;
		line-height: 68rpx;
	}

	.sel-top-right {
		height: 68rpx;
		color: #999;
		line-height: 68rpx;
		font-size: 30rpx;
	}

	.sel-top-right-check {
		height: 68rpx;
		color: #3f72f4;
		line-height: 68rpx;
		font-size: 30rpx;
	}

	.sel-title {
		height: 96rpx;
		line-height: 96rpx;
		background-color: #ffffff;
		display: grid;
		grid-template-columns: repeat(3, 33.33333%);
		border-bottom: solid #f0f0f0 1rpx;
		border-top: solid #f0f0f0 1rpx;
	}

	.sel-scroll-view_H {
		white-space: nowrap;
		width: 100%;
		height: 500rpx;
		line-height: 100rpx;
		background-color: #ffffff;
	}

	.sel-title-item {
		margin: 0 22rpx;
		font-size: 34rpx;
		text-align: center;
		color: #333333;
	}

	.sel-title-item-false {
		font-size: 30rpx;
		text-align: center;
		text-overflow: ellipsis;
		white-space: nowrap;
		overflow: hidden;
	}

	.sel-title-item-true {
		font-size: 30rpx;
		font-weight: 700;
		color: #3f72f4;
	}

	.sel-scroll-view-box {
		display: grid;
		grid-template-columns: repeat(4, 25%);
		padding: 10rpx 10rpx;

		.sel-scroll-view-list {
			margin: 10rpx;
			background: #f3f3f3;
			height: 72rpx;
			border-radius: 8rpx;
			line-height: 72rpx;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			font-size: 30rpx;
			color: #333333;
		}
	}

	.sel-scroll-view-noBox {
		width: 100%;
		height: 400rpx;

		image {
			width: 240rpx;
			height: 200rpx;
			margin: 0 255rpx;
			margin-top: 32rpx;
		}

		.text {
			width: 100%;
			text-align: center;
			color: #888;
		}
	}

	.sel-scroll-view-item {
		display: inline-block;
		padding: 0 8rpx;
		text-align: center;
		border-radius: 16rpx;
		font-size: 24rpx;
		margin: 24rpx;
		height: 48rpx;
		line-height: 48rpx;
	}

	.sel-scroll-view-item-true {
		display: inline-block;
		padding: 0 8rpx;
		text-align: center;
		border-radius: 16rpx;
		margin: 24rpx;
		font-size: 24rpx;
		background-color: #3f72f4 !important;
		color: #ffffff !important;
		height: 48rpx;
		line-height: 48rpx;
	}
</style>
