diff --git a/.env.development b/.env.development index 765783424..0f3aa8d52 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ # env -NODE_ENV = 'production' +NODE_ENV = 'development' # flag VUE_APP_FLAG='development' diff --git a/package.json b/package.json index f9889dcc6..b06398c61 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "", "private": true, "scripts": { - "serve": "vue-cli-service serve", + "serve": "vue-cli-service serve --mode development", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "lint": "vue-cli-service lint", diff --git a/src/assets/js/utils/data-dictionary.js b/src/assets/js/utils/data-dictionary.js index d0b1756ea..604871487 100644 --- a/src/assets/js/utils/data-dictionary.js +++ b/src/assets/js/utils/data-dictionary.js @@ -2,268 +2,268 @@ export default { //国家地区 nativeplace: [ - { code: 'CHN', text: '中国' } - // { code: 'HKG', text: '中国香港' }, - // { code: 'MAC', text: '澳门' }, - // { code: 'TWN', text: '中国台湾' }, - // { code: 'ABW', text: '阿鲁巴' }, - // { code: 'AFG', text: '阿富汗' }, - // { code: 'AGO', text: '安哥拉' }, - // { code: 'AIA', text: '安圭拉' }, - // { code: 'ALB', text: '阿尔巴尼亚' }, - // { code: 'AND', text: '安道尔' }, - // { code: 'ANT', text: '荷属安的列斯' }, - // { code: 'ARE', text: '阿联酋' }, - // { code: 'ARG', text: '阿根廷' }, - // { code: 'ARM', text: '亚美尼亚' }, - // { code: 'ASM', text: '美属萨摩亚' }, - // { code: 'ATA', text: '南极洲' }, - // { code: 'ATF', text: '法属南部领土' }, - // { code: 'ATG', text: '安提瓜和巴布达' }, - // { code: 'AUS', text: '澳大利亚' }, - // { code: 'AUT', text: '奥地利' }, - // { code: 'AZE', text: '阿塞拜疆' }, - // { code: 'BDI', text: '布隆迪' }, - // { code: 'BEL', text: '比利时' }, - // { code: 'BEN', text: '贝宁' }, - // { code: 'BFA', text: '布基纳法索' }, - // { code: 'BGD', text: '孟加拉国' }, - // { code: 'BGR', text: '保加利亚' }, - // { code: 'BHR', text: '巴林' }, - // { code: 'BHS', text: '巴哈马' }, - // { code: 'BIH', text: '波斯尼亚和黑塞哥维那' }, - // { code: 'BLR', text: '白俄罗斯' }, - // { code: 'BLZ', text: '伯利兹' }, - // { code: 'BMU', text: '百慕大' }, - // { code: 'BOL', text: '玻利维亚' }, - // { code: 'BRA', text: '巴西' }, - // { code: 'BRB', text: '巴巴多斯' }, - // { code: 'BRN', text: '文莱' }, - // { code: 'BTN', text: '不丹' }, - // { code: 'BVT', text: '布维岛' }, - // { code: 'BWA', text: '博茨瓦纳' }, - // { code: 'CAF', text: '中非' }, - // { code: 'CAN', text: '加拿大' }, - // { code: 'CCK', text: '科科斯(基林)群岛' }, - // { code: 'CHE', text: '瑞士' }, - // { code: 'CHL', text: '智利' }, - // { code: 'CIV', text: '科特迪瓦' }, - // { code: 'CMR', text: '喀麦隆' }, - // { code: 'COD', text: '刚果(金)' }, - // { code: 'COG', text: '刚果(布)' }, - // { code: 'COK', text: '库克群岛' }, - // { code: 'COL', text: '哥伦比亚' }, - // { code: 'COM', text: '科摩罗' }, - // { code: 'CPV', text: '佛得角' }, - // { code: 'CRI', text: '哥斯达黎加' }, - // { code: 'CUB', text: '古巴' }, - // { code: 'CXR', text: '圣诞岛' }, - // { code: 'CYM', text: '开曼群岛' }, - // { code: 'CYP', text: '塞浦路斯' }, - // { code: 'CZE', text: '捷克' }, - // { code: 'DEU', text: '德国' }, - // { code: 'DJI', text: '吉布提' }, - // { code: 'DMA', text: '多米尼克' }, - // { code: 'DNK', text: '丹麦' }, - // { code: 'DOM', text: '多米尼加共和国' }, - // { code: 'DZA', text: '阿尔及利亚' }, - // { code: 'ECU', text: '厄瓜多尔' }, - // { code: 'EGY', text: '埃及' }, - // { code: 'ERI', text: '厄立特里亚' }, - // { code: 'ESH', text: '西撒哈拉' }, - // { code: 'ESP', text: '西班牙' }, - // { code: 'EST', text: '爱沙尼亚' }, - // { code: 'ETH', text: '埃塞俄比亚' }, - // { code: 'FIN', text: '芬兰' }, - // { code: 'FJI', text: '斐济' }, - // { code: 'FLK', text: '马尔维纳斯群岛(福克兰群岛)' }, - // { code: 'FRA', text: '法国' }, - // { code: 'FRO', text: '法罗群岛' }, - // { code: 'FSM', text: '密克罗尼西亚' }, - // { code: 'GAB', text: '加蓬' }, - // { code: 'GBR', text: '英国' }, - // { code: 'GEO', text: '格鲁吉亚' }, - // { code: 'GHA', text: '加纳' }, - // { code: 'GIB', text: '直布罗陀' }, - // { code: 'GIN', text: '几内亚' }, - // { code: 'GLP', text: '瓜德罗普' }, - // { code: 'GMB', text: '冈比亚' }, - // { code: 'GNB', text: '几内亚比绍' }, - // { code: 'GNQ', text: '赤道几内亚' }, - // { code: 'GRC', text: '希腊' }, - // { code: 'GRD', text: '格林纳达' }, - // { code: 'GRL', text: '格陵兰' }, - // { code: 'GTM', text: '危地马拉' }, - // { code: 'GUF', text: '法属圭亚那' }, - // { code: 'GUM', text: '关岛' }, - // { code: 'GUY', text: '圭亚那' }, - // { code: 'HMD', text: '赫德岛和麦克唐纳岛' }, - // { code: 'HND', text: '洪都拉斯' }, - // { code: 'HRV', text: '克罗地亚' }, - // { code: 'HTI', text: '海地' }, - // { code: 'HUN', text: '匈牙利' }, - // { code: 'IDN', text: '印度尼西亚' }, - // { code: 'IND', text: '印度' }, - // { code: 'IOT', text: '英属印度洋领土' }, - // { code: 'IRL', text: '爱尔兰' }, - // { code: 'IRN', text: '伊朗' }, - // { code: 'IRQ', text: '伊拉克' }, - // { code: 'ISL', text: '冰岛' }, - // { code: 'ISR', text: '以色列' }, - // { code: 'ITA', text: '意大利' }, - // { code: 'JAM', text: '牙买加' }, - // { code: 'JOR', text: '约旦' }, - // { code: 'JPN', text: '日本' }, - // { code: 'KAZ', text: '哈萨克斯坦' }, - // { code: 'KEN', text: '肯尼亚' }, - // { code: 'KGZ', text: '吉尔吉斯斯坦' }, - // { code: 'KHM', text: '柬埔寨' }, - // { code: 'KIR', text: '基里巴斯' }, - // { code: 'KNA', text: '圣基茨和尼维斯' }, - // { code: 'KOR', text: '韩国' }, - // { code: 'KWT', text: '科威特' }, - // { code: 'LAO', text: '老挝' }, - // { code: 'LBN', text: '黎巴嫩' }, - // { code: 'LBR', text: '利比里亚' }, - // { code: 'LBY', text: '利比亚' }, - // { code: 'LCA', text: '圣卢西亚' }, - // { code: 'LIE', text: '列支敦士登' }, - // { code: 'LKA', text: '斯里兰卡' }, - // { code: 'LSO', text: '莱索托' }, - // { code: 'LTU', text: '立陶宛' }, - // { code: 'LUX', text: '卢森堡' }, - // { code: 'LVA', text: '拉脱维亚' }, - // { code: 'MAR', text: '摩洛哥' }, - // { code: 'MCO', text: '摩纳哥' }, - // { code: 'MDA', text: '摩尔多瓦' }, - // { code: 'MDG', text: '马达加斯加' }, - // { code: 'MDV', text: '马尔代夫' }, - // { code: 'MEX', text: '墨西哥' }, - // { code: 'MHL', text: '马绍尔群岛' }, - // { code: 'MKD', text: '马斯顿' }, - // { code: 'MLI', text: '马里' }, - // { code: 'MLT', text: '马耳他' }, - // { code: 'MMR', text: '缅甸' }, - // { code: 'MNG', text: '蒙古' }, - // { code: 'MNP', text: '北马里亚纳' }, - // { code: 'MOZ', text: '莫桑比克' }, - // { code: 'MRT', text: '毛里塔尼亚' }, - // { code: 'MSR', text: '蒙特塞拉特' }, - // { code: 'MTQ', text: '马提尼克' }, - // { code: 'MUS', text: '毛里求斯' }, - // { code: 'MWI', text: '马拉维' }, - // { code: 'MYS', text: '马来西亚' }, - // { code: 'MYT', text: '马约特' }, - // { code: 'NAM', text: '纳米比亚' }, - // { code: 'NCL', text: '新喀里多尼亚' }, - // { code: 'NER', text: '尼日尔' }, - // { code: 'NFK', text: '诺福克岛' }, - // { code: 'NGA', text: '尼日利亚' }, - // { code: 'NIC', text: '尼加拉瓜' }, - // { code: 'NIU', text: '纽埃' }, - // { code: 'NLD', text: '荷兰' }, - // { code: 'NOR', text: '挪威' }, - // { code: 'NPL', text: '尼泊尔' }, - // { code: 'NRU', text: '瑙鲁' }, - // { code: 'NZL', text: '新西兰' }, - // { code: 'OMN', text: '阿曼' }, - // { code: 'PAK', text: '巴基斯坦' }, - // { code: 'PAN', text: '巴拿马' }, - // { code: 'PCN', text: '皮特凯恩群岛' }, - // { code: 'PER', text: '秘鲁' }, - // { code: 'PHL', text: '菲律宾' }, - // { code: 'PLW', text: '帕劳' }, - // { code: 'PNG', text: '巴布亚新几内亚' }, - // { code: 'POL', text: '波兰' }, - // { code: 'PRI', text: '波多黎各' }, - // { code: 'PRK', text: '朝鲜' }, - // { code: 'PRT', text: '葡萄牙' }, - // { code: 'PRY', text: '巴拉圭' }, - // { code: 'PSE', text: '巴勒斯坦' }, - // { code: 'PYF', text: '法属波利尼西亚' }, - // { code: 'QAT', text: '卡塔尔' }, - // { code: 'REU', text: '留尼汪' }, - // { code: 'ROM', text: '罗马尼亚' }, - // { code: 'RUS', text: '俄罗斯' }, - // { code: 'RWA', text: '卢旺达' }, - // { code: 'SAU', text: '沙特阿拉伯' }, - // { code: 'SCG', text: '塞尔维亚和黑山' }, - // { code: 'SDN', text: '苏丹' }, - // { code: 'SEN', text: '塞内加尔' }, - // { code: 'SGP', text: '新加坡' }, - // { code: 'SGS', text: '南乔治亚岛和南桑德韦奇岛' }, - // { code: 'SHN', text: '圣赫勒拿' }, - // { code: 'SJM', text: '斯瓦尔巴群岛和扬马群岛' }, - // { code: 'SLB', text: '所罗门群岛' }, - // { code: 'SLE', text: '塞拉利昂' }, - // { code: 'SLV', text: '萨尔瓦多' }, - // { code: 'SMR', text: '圣马力诺' }, - // { code: 'SOM', text: '索马里' }, - // { code: 'SPM', text: '圣皮埃尔和密克隆' }, - // { code: 'STP', text: '圣多美和普林西比' }, - // { code: 'SUR', text: '苏里南' }, - // { code: 'SVK', text: '斯洛伐克' }, - // { code: 'SVN', text: '斯洛文尼亚' }, - // { code: 'SWE', text: '瑞典' }, - // { code: 'SWZ', text: '斯威士兰' }, - // { code: 'SYC', text: '塞舌尔' }, - // { code: 'SYR', text: '叙利亚' }, - // { code: 'TCA', text: '特克斯和凯科斯群岛' }, - // { code: 'TCD', text: '乍得' }, - // { code: 'TGO', text: '多哥' }, - // { code: 'THA', text: '泰国' }, - // { code: 'TJK', text: '塔吉克斯坦' }, - // { code: 'TKL', text: '托克劳' }, - // { code: 'TKM', text: '土库曼斯坦' }, - // { code: 'TMP', text: '东帝汶' }, - // { code: 'TON', text: '汤加' }, - // { code: 'TTO', text: '特立尼达和多巴哥' }, - // { code: 'TUN', text: '突尼斯' }, - // { code: 'TUR', text: '土耳其' }, - // { code: 'TUV', text: '图瓦卢' }, - // { code: 'TZA', text: '坦桑尼亚' }, - // { code: 'UGA', text: '乌干达' }, - // { code: 'UKR', text: '乌克兰' }, - // { code: 'UMI', text: '美属本土外小岛屿' }, - // { code: 'URY', text: '乌拉圭' }, - // { code: 'USA', text: '美国' }, - // { code: 'UZB', text: '乌兹别克斯坦' }, - // { code: 'VAT', text: '梵蒂冈' }, - // { code: 'VCT', text: '圣文森特和格林纳丁斯' }, - // { code: 'VEN', text: '委内瑞拉' }, - // { code: 'VGB', text: '英属维尔京群岛' }, - // { code: 'VIR', text: '美属维尔京群岛' }, - // { code: 'VNM', text: '越南' }, - // { code: 'VUT', text: '瓦努阿图' }, - // { code: 'WLF', text: '瓦利斯和富图纳群岛' }, - // { code: 'WSM', text: '西萨摩亚' }, - // { code: 'YEM', text: '也门' }, - // { code: 'ZAF', text: '南非' }, - // { code: 'ZAR', text: '扎伊尔' }, - // { code: 'ZMB', text: '赞比亚' }, - // { code: 'ZWE', text: '津巴布韦' } + { id: 'CHN', text: '中国' }, + { id: 'HKG', text: '中国香港' }, + { id: 'MAC', text: '澳门' }, + { id: 'TWN', text: '中国台湾' }, + { id: 'ABW', text: '阿鲁巴' }, + { id: 'AFG', text: '阿富汗' }, + { id: 'AGO', text: '安哥拉' }, + { id: 'AIA', text: '安圭拉' }, + { id: 'ALB', text: '阿尔巴尼亚' }, + { id: 'AND', text: '安道尔' }, + { id: 'ANT', text: '荷属安的列斯' }, + { id: 'ARE', text: '阿联酋' }, + { id: 'ARG', text: '阿根廷' }, + { id: 'ARM', text: '亚美尼亚' }, + { id: 'ASM', text: '美属萨摩亚' }, + { id: 'ATA', text: '南极洲' }, + { id: 'ATF', text: '法属南部领土' }, + { id: 'ATG', text: '安提瓜和巴布达' }, + { id: 'AUS', text: '澳大利亚' }, + { id: 'AUT', text: '奥地利' }, + { id: 'AZE', text: '阿塞拜疆' }, + { id: 'BDI', text: '布隆迪' }, + { id: 'BEL', text: '比利时' }, + { id: 'BEN', text: '贝宁' }, + { id: 'BFA', text: '布基纳法索' }, + { id: 'BGD', text: '孟加拉国' }, + { id: 'BGR', text: '保加利亚' }, + { id: 'BHR', text: '巴林' }, + { id: 'BHS', text: '巴哈马' }, + { id: 'BIH', text: '波斯尼亚和黑塞哥维那' }, + { id: 'BLR', text: '白俄罗斯' }, + { id: 'BLZ', text: '伯利兹' }, + { id: 'BMU', text: '百慕大' }, + { id: 'BOL', text: '玻利维亚' }, + { id: 'BRA', text: '巴西' }, + { id: 'BRB', text: '巴巴多斯' }, + { id: 'BRN', text: '文莱' }, + { id: 'BTN', text: '不丹' }, + { id: 'BVT', text: '布维岛' }, + { id: 'BWA', text: '博茨瓦纳' }, + { id: 'CAF', text: '中非' }, + { id: 'CAN', text: '加拿大' }, + { id: 'CCK', text: '科科斯(基林)群岛' }, + { id: 'CHE', text: '瑞士' }, + { id: 'CHL', text: '智利' }, + { id: 'CIV', text: '科特迪瓦' }, + { id: 'CMR', text: '喀麦隆' }, + { id: 'COD', text: '刚果(金)' }, + { id: 'COG', text: '刚果(布)' }, + { id: 'COK', text: '库克群岛' }, + { id: 'COL', text: '哥伦比亚' }, + { id: 'COM', text: '科摩罗' }, + { id: 'CPV', text: '佛得角' }, + { id: 'CRI', text: '哥斯达黎加' }, + { id: 'CUB', text: '古巴' }, + { id: 'CXR', text: '圣诞岛' }, + { id: 'CYM', text: '开曼群岛' }, + { id: 'CYP', text: '塞浦路斯' }, + { id: 'CZE', text: '捷克' }, + { id: 'DEU', text: '德国' }, + { id: 'DJI', text: '吉布提' }, + { id: 'DMA', text: '多米尼克' }, + { id: 'DNK', text: '丹麦' }, + { id: 'DOM', text: '多米尼加共和国' }, + { id: 'DZA', text: '阿尔及利亚' }, + { id: 'ECU', text: '厄瓜多尔' }, + { id: 'EGY', text: '埃及' }, + { id: 'ERI', text: '厄立特里亚' }, + { id: 'ESH', text: '西撒哈拉' }, + { id: 'ESP', text: '西班牙' }, + { id: 'EST', text: '爱沙尼亚' }, + { id: 'ETH', text: '埃塞俄比亚' }, + { id: 'FIN', text: '芬兰' }, + { id: 'FJI', text: '斐济' }, + { id: 'FLK', text: '马尔维纳斯群岛(福克兰群岛)' }, + { id: 'FRA', text: '法国' }, + { id: 'FRO', text: '法罗群岛' }, + { id: 'FSM', text: '密克罗尼西亚' }, + { id: 'GAB', text: '加蓬' }, + { id: 'GBR', text: '英国' }, + { id: 'GEO', text: '格鲁吉亚' }, + { id: 'GHA', text: '加纳' }, + { id: 'GIB', text: '直布罗陀' }, + { id: 'GIN', text: '几内亚' }, + { id: 'GLP', text: '瓜德罗普' }, + { id: 'GMB', text: '冈比亚' }, + { id: 'GNB', text: '几内亚比绍' }, + { id: 'GNQ', text: '赤道几内亚' }, + { id: 'GRC', text: '希腊' }, + { id: 'GRD', text: '格林纳达' }, + { id: 'GRL', text: '格陵兰' }, + { id: 'GTM', text: '危地马拉' }, + { id: 'GUF', text: '法属圭亚那' }, + { id: 'GUM', text: '关岛' }, + { id: 'GUY', text: '圭亚那' }, + { id: 'HMD', text: '赫德岛和麦克唐纳岛' }, + { id: 'HND', text: '洪都拉斯' }, + { id: 'HRV', text: '克罗地亚' }, + { id: 'HTI', text: '海地' }, + { id: 'HUN', text: '匈牙利' }, + { id: 'IDN', text: '印度尼西亚' }, + { id: 'IND', text: '印度' }, + { id: 'IOT', text: '英属印度洋领土' }, + { id: 'IRL', text: '爱尔兰' }, + { id: 'IRN', text: '伊朗' }, + { id: 'IRQ', text: '伊拉克' }, + { id: 'ISL', text: '冰岛' }, + { id: 'ISR', text: '以色列' }, + { id: 'ITA', text: '意大利' }, + { id: 'JAM', text: '牙买加' }, + { id: 'JOR', text: '约旦' }, + { id: 'JPN', text: '日本' }, + { id: 'KAZ', text: '哈萨克斯坦' }, + { id: 'KEN', text: '肯尼亚' }, + { id: 'KGZ', text: '吉尔吉斯斯坦' }, + { id: 'KHM', text: '柬埔寨' }, + { id: 'KIR', text: '基里巴斯' }, + { id: 'KNA', text: '圣基茨和尼维斯' }, + { id: 'KOR', text: '韩国' }, + { id: 'KWT', text: '科威特' }, + { id: 'LAO', text: '老挝' }, + { id: 'LBN', text: '黎巴嫩' }, + { id: 'LBR', text: '利比里亚' }, + { id: 'LBY', text: '利比亚' }, + { id: 'LCA', text: '圣卢西亚' }, + { id: 'LIE', text: '列支敦士登' }, + { id: 'LKA', text: '斯里兰卡' }, + { id: 'LSO', text: '莱索托' }, + { id: 'LTU', text: '立陶宛' }, + { id: 'LUX', text: '卢森堡' }, + { id: 'LVA', text: '拉脱维亚' }, + { id: 'MAR', text: '摩洛哥' }, + { id: 'MCO', text: '摩纳哥' }, + { id: 'MDA', text: '摩尔多瓦' }, + { id: 'MDG', text: '马达加斯加' }, + { id: 'MDV', text: '马尔代夫' }, + { id: 'MEX', text: '墨西哥' }, + { id: 'MHL', text: '马绍尔群岛' }, + { id: 'MKD', text: '马斯顿' }, + { id: 'MLI', text: '马里' }, + { id: 'MLT', text: '马耳他' }, + { id: 'MMR', text: '缅甸' }, + { id: 'MNG', text: '蒙古' }, + { id: 'MNP', text: '北马里亚纳' }, + { id: 'MOZ', text: '莫桑比克' }, + { id: 'MRT', text: '毛里塔尼亚' }, + { id: 'MSR', text: '蒙特塞拉特' }, + { id: 'MTQ', text: '马提尼克' }, + { id: 'MUS', text: '毛里求斯' }, + { id: 'MWI', text: '马拉维' }, + { id: 'MYS', text: '马来西亚' }, + { id: 'MYT', text: '马约特' }, + { id: 'NAM', text: '纳米比亚' }, + { id: 'NCL', text: '新喀里多尼亚' }, + { id: 'NER', text: '尼日尔' }, + { id: 'NFK', text: '诺福克岛' }, + { id: 'NGA', text: '尼日利亚' }, + { id: 'NIC', text: '尼加拉瓜' }, + { id: 'NIU', text: '纽埃' }, + { id: 'NLD', text: '荷兰' }, + { id: 'NOR', text: '挪威' }, + { id: 'NPL', text: '尼泊尔' }, + { id: 'NRU', text: '瑙鲁' }, + { id: 'NZL', text: '新西兰' }, + { id: 'OMN', text: '阿曼' }, + { id: 'PAK', text: '巴基斯坦' }, + { id: 'PAN', text: '巴拿马' }, + { id: 'PCN', text: '皮特凯恩群岛' }, + { id: 'PER', text: '秘鲁' }, + { id: 'PHL', text: '菲律宾' }, + { id: 'PLW', text: '帕劳' }, + { id: 'PNG', text: '巴布亚新几内亚' }, + { id: 'POL', text: '波兰' }, + { id: 'PRI', text: '波多黎各' }, + { id: 'PRK', text: '朝鲜' }, + { id: 'PRT', text: '葡萄牙' }, + { id: 'PRY', text: '巴拉圭' }, + { id: 'PSE', text: '巴勒斯坦' }, + { id: 'PYF', text: '法属波利尼西亚' }, + { id: 'QAT', text: '卡塔尔' }, + { id: 'REU', text: '留尼汪' }, + { id: 'ROM', text: '罗马尼亚' }, + { id: 'RUS', text: '俄罗斯' }, + { id: 'RWA', text: '卢旺达' }, + { id: 'SAU', text: '沙特阿拉伯' }, + { id: 'SCG', text: '塞尔维亚和黑山' }, + { id: 'SDN', text: '苏丹' }, + { id: 'SEN', text: '塞内加尔' }, + { id: 'SGP', text: '新加坡' }, + { id: 'SGS', text: '南乔治亚岛和南桑德韦奇岛' }, + { id: 'SHN', text: '圣赫勒拿' }, + { id: 'SJM', text: '斯瓦尔巴群岛和扬马群岛' }, + { id: 'SLB', text: '所罗门群岛' }, + { id: 'SLE', text: '塞拉利昂' }, + { id: 'SLV', text: '萨尔瓦多' }, + { id: 'SMR', text: '圣马力诺' }, + { id: 'SOM', text: '索马里' }, + { id: 'SPM', text: '圣皮埃尔和密克隆' }, + { id: 'STP', text: '圣多美和普林西比' }, + { id: 'SUR', text: '苏里南' }, + { id: 'SVK', text: '斯洛伐克' }, + { id: 'SVN', text: '斯洛文尼亚' }, + { id: 'SWE', text: '瑞典' }, + { id: 'SWZ', text: '斯威士兰' }, + { id: 'SYC', text: '塞舌尔' }, + { id: 'SYR', text: '叙利亚' }, + { id: 'TCA', text: '特克斯和凯科斯群岛' }, + { id: 'TCD', text: '乍得' }, + { id: 'TGO', text: '多哥' }, + { id: 'THA', text: '泰国' }, + { id: 'TJK', text: '塔吉克斯坦' }, + { id: 'TKL', text: '托克劳' }, + { id: 'TKM', text: '土库曼斯坦' }, + { id: 'TMP', text: '东帝汶' }, + { id: 'TON', text: '汤加' }, + { id: 'TTO', text: '特立尼达和多巴哥' }, + { id: 'TUN', text: '突尼斯' }, + { id: 'TUR', text: '土耳其' }, + { id: 'TUV', text: '图瓦卢' }, + { id: 'TZA', text: '坦桑尼亚' }, + { id: 'UGA', text: '乌干达' }, + { id: 'UKR', text: '乌克兰' }, + { id: 'UMI', text: '美属本土外小岛屿' }, + { id: 'URY', text: '乌拉圭' }, + { id: 'USA', text: '美国' }, + { id: 'UZB', text: '乌兹别克斯坦' }, + { id: 'VAT', text: '梵蒂冈' }, + { id: 'VCT', text: '圣文森特和格林纳丁斯' }, + { id: 'VEN', text: '委内瑞拉' }, + { id: 'VGB', text: '英属维尔京群岛' }, + { id: 'VIR', text: '美属维尔京群岛' }, + { id: 'VNM', text: '越南' }, + { id: 'VUT', text: '瓦努阿图' }, + { id: 'WLF', text: '瓦利斯和富图纳群岛' }, + { id: 'WSM', text: '西萨摩亚' }, + { id: 'YEM', text: '也门' }, + { id: 'ZAF', text: '南非' }, + { id: 'ZAR', text: '扎伊尔' }, + { id: 'ZMB', text: '赞比亚' }, + { id: 'ZWE', text: '津巴布韦' } ], //证件类型 -- 未改动 idType: [ - { id: 1, text: '身份证' }, - { id: 2, text: '户口本', disabled: true }, - { id: 3, text: '出生证明', disabled: true }, - { id: 4, text: '护照', disabled: true }, - { id: 5, text: '港澳居民通行证', disabled: true }, - { id: 6, text: '台湾居民通行证', disabled: true }, - { id: 7, text: '其他', disabled: true } + { id: '0', text: '身份证' }, + { id: '1', text: '户口本', disabled: true }, + { id: '2', text: '出生证明', disabled: true }, + { id: '4', text: '外国人护照', disabled: true }, + { id: '5', text: '港澳居民来往内地通行证', disabled: true }, + { id: '6', text: '台湾居民来往大陆通行证', disabled: true }, + { id: '7', text: '其他', disabled: true } ], //投保人证件类型 insuredIdType: [ - { id: 0, text: '居民身份证' }, - { id: 1, text: '户口本', disabled: true }, - { id: 2, text: '出生证明', disabled: true }, - { id: 3, text: '外国人永久居留身份证', disabled: true }, - { id: 4, text: '外国人护照', disabled: true }, - { id: 5, text: '港澳居民来往内地通行证', disabled: true }, - { id: 6, text: '台湾居民来往大陆通行证', disabled: true }, - { id: 7, text: '其他', disabled: true }, - { id: 9, text: '港澳台居民居住证', disabled: true } + { id: '0', text: '身份证' }, + { id: '1', text: '户口本', disabled: true }, + { id: '2', text: '出生证明', disabled: true }, + { id: '3', text: '外国人永久居留身份证', disabled: true }, + { id: '4', text: '外国人护照', disabled: true }, + { id: '5', text: '港澳居民来往内地通行证', disabled: true }, + { id: '6', text: '台湾居民来往大陆通行证', disabled: true }, + { id: '7', text: '其他', disabled: true }, + { id: '9', text: '港澳台居民居住证', disabled: true } ], //代理人证件类型 agentIdType: [ @@ -289,20 +289,20 @@ export default { //投保人/被保人关系 relationToAppnt: [{ id: '00', text: '本人' }, { id: '01', text: '配偶' }, { id: '02', text: '父母' }, { id: '03', text: '子女' }, { id: '04', text: '其他' }], //婚姻状况 - marriage: [{ id: 0, text: '已婚' }, { id: 1, text: '单身' }, { id: 2, text: '其他' }], + marriage: [{ id: '0', text: '已婚' }, { id: '1', text: '单身' }, { id: '2', text: '其他' }], //文化程度 degree: [ - { id: 0, text: '博士及以上' }, - { id: 1, text: '硕士' }, - { id: 2, text: '本科' }, - { id: 3, text: '大专' }, - { id: 4, text: '中专' }, - { id: 5, text: '高中' }, - { id: 6, text: '初中' }, - { id: 7, text: '其它' } + { id: '0', text: '博士及以上' }, + { id: '1', text: '硕士' }, + { id: '2', text: '本科' }, + { id: '3', text: '大专' }, + { id: '4', text: '中专' }, + { id: '5', text: '高中' }, + { id: '6', text: '初中' }, + { id: '7', text: '其它' } ], //居民身份 仅支持中国 -- 未改动 - taxIdentity: [{ id: 1, text: '仅为中国' }], + taxIdentity: [{ id: '1', text: '仅为中国' }], //交费期限 -- 未改动 payEndYear: [ { diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue index a3ddefb83..04271b649 100644 --- a/src/views/ebiz/sale/InsuredInfo.vue +++ b/src/views/ebiz/sale/InsuredInfo.vue @@ -24,8 +24,8 @@ @click="toSelect('2')" /> - - + + - + @@ -187,7 +178,7 @@ 设为联系地址 - + @@ -227,7 +218,7 @@ 设为联系地址 - + 下一步 @@ -268,8 +259,6 @@ import getAreaName from '@/assets/js/utils/get-area-name' import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan' import idNoCheck from '@/assets/js/utils/idNoCheck' import beforeDate from '@/assets/js/utils/getBeforeDate.js' -import { idToData } from './js/verification' -import { selectComp } from './js/methods' export default { name: 'insuredInfo', @@ -333,7 +322,7 @@ export default { userInfo: { name: '', //投保人姓名 sex: '0', //投保人性别 - nativeplace: '1', //国家地区 + nativeplace: 'CHN', //国家地区 birthday: '', idType: '0', //证件类型 idNo: '', //证件号码 @@ -420,44 +409,44 @@ export default { this.userInfo.name = name }, selectClick(index) { - // this.currentPopupIndex = index - // let title = '' - // if (index == 1) { - // ;[this.customerShowPicker, title] = [true, '客户列表'] - // } else if (index == 2) { - // ;[this.occupationShowPicker, title] = [true, '职业类别'] - // } else if (index == 3) { - // localStorage.scanFromInsured = 'true' - // ;[this.isScan, title] = [true, '身份证扫描'] - // } + this.currentPopupIndex = index + let title = '' + if (index == 1) { + ;[this.customerShowPicker, title] = [true, '客户列表'] + } else if (index == 2) { + ;[this.occupationShowPicker, title] = [true, '职业类别'] + } else if (index == 3) { + localStorage.scanFromInsured = 'true' + ;[this.isScan, title] = [true, '身份证扫描'] + } - // setTimeout(() => { - // this.$jump({ - // flag: 'navigation', - // extra: { - // title, - // hiddenLeft: '1' - // } - // }) - // this.closeBtn() - // }, 400) - // let that = this - selectComp(this, index, '1') + setTimeout(() => { + this.$jump({ + flag: 'navigation', + extra: { + title, + hiddenLeft: '1' + } + }) + this.closeBtn() + }, 400) + }, + closeBtn() { + // 筛选按钮的显示 + setTimeout(() => { + this.$jump({ + flag: 'webview_right_button', + extra: { + btns: [ + { + img: this.$assetsUrl + 'images/del-close.png', + route: { flag: '', extra: {} } + } + ] + } + }) + }, 500) }, - // closeBtn() { - // // 筛选按钮的显示 - // this.$jump({ - // flag: 'webview_right_button', - // extra: { - // btns: [ - // { - // img: this.$assetsUrl + 'images/del-close.png', - // route: { flag: '', extra: {} } - // } - // ] - // } - // }) - // }, appCallBack() { // 筛选按钮的点击事件 this.$jump({ @@ -511,6 +500,7 @@ export default { this.popupShow = false if (this.pickerType == '1') { this.userInfo.nativeplace = value.id + console.log('--投保人-国籍选择:', value.id) } else if (this.pickerType == '2') { //身份证以外的证件类型可以使用长期 if (value.id != '1') { @@ -521,12 +511,14 @@ export default { } this.userInfo.idType = value.id } else if (this.pickerType == '3') { + console.log('----degree:', value) this.userInfo.degree = value.id } else if (this.pickerType == '4') { this.userInfo.socialSecurity = value.id } else if (this.pickerType == '5') { this.userInfo.taxResidentId = value.id } else if (this.pickerType == '6') { + console.log('-----marriage', value) this.userInfo.marriage = value.id } else if (this.pickerType == '7') { this.userInfo.jobStatus = value.id @@ -549,7 +541,7 @@ export default { // 计算年龄 let age = utilsAge.getAge(this.userInfo.birthday, new Date()) // 长期按钮是否禁用 - this.effectiveDateTypeAble = age <= 45 + this.effectiveDateTypeAble = age >= 16 && age <= 45 } break case '1': @@ -678,10 +670,10 @@ export default { // 计算年龄 let age = utilsAge.getAge(this.userInfo.birthday, new Date()) // 长期按钮是否禁用 - this.effectiveDateTypeAble = age <= 45 + this.effectiveDateTypeAble = age >= 16 && age <= 45 }, nextStep() { - // console.log(this.userInfo.idType) + console.log('--提交前投保人::::', JSON.stringify(this.userInfo)) //表单校验, 成功跳转 this.$validator.validate().then(valid => { @@ -789,8 +781,8 @@ export default { //如果是已婚 if ((this.userInfo.sex == '0' && age < 22) || (this.userInfo.sex == '1' && age < 20)) { - if (this.userInfo.marriage != '2') { - return this.$toast('投保人不符合国家婚姻法定年龄') + if (this.userInfo.marriage == '0') { + return this.$toast('年龄与婚姻状况不符') } } // if (this.userInfo.marriage == '1') { @@ -991,45 +983,6 @@ export default { hiddenRight: '1' } }) - }, - //校验身高 - checkStature(val) { - console.log(val) - if (val.trim().length == 0) { - return this.$toast('身高不能为空') - } - - let res = /^[0-9]{0,3}([.]{1}[0-9]{1})?$/.test(val) && val < 300 && val > 10 - if (!res) { - this.userInfo.stature = '' - return this.$toast('身高输入有误') - } - }, - //校验体重 - checkAvoirdupois(val) { - if (val.trim().length == 0) { - return this.$toast('体重不能为空') - } - - let res = /^[0-9]+([.]{1}[0-9]{1})?$/.test(val) && val > 0.1 - if (!res) { - this.userInfo.avoirdupois = '' - return this.$toast('体重输入有误') - } - }, - getRelatedData(val) { - if (this.userInfo.idType != '1') { - return - } - //如果证件校验不通过,恢复默认值 - if (idToData(val).text) { - ;[this.userInfo.idNo, this.userInfo.sex, this.userInfo.birthday, this.effectiveDateTypeAble] = ['', '0', '', false] - return this.$toast(idToData(val).text) - } - this.userInfo.effectiveDateType = false - this.effectiveDateTypeAble = idToData(val).age < 45 - this.userInfo.birthday = idToData(val).birthday - this.userInfo.sex = idToData(val).sex } }, beforeDestroy() { diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index 643579924..c3c255f57 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -44,11 +44,10 @@ clearable :readonly="isAppnt" v-validate="'required'" - @blur="getRelatedData(userInfo.idNo)" > - 证件扫描 + + +
长期 @@ -143,7 +142,6 @@ clearable maxlength="5" :readonly="isAppnt" - @blur="checkStature(userInfo.stature)" /> @@ -274,7 +271,7 @@ clearable :readonly="isAppnt" /> - + @@ -329,7 +326,7 @@ clearable :readonly="isAppnt" /> - + 下一步 @@ -371,8 +368,6 @@ import getAreaName from '@/assets/js/utils/get-area-name' import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan' import idNoCheck from '@/assets/js/utils/idNoCheck' import beforeDate from '@/assets/js/utils/getBeforeDate.js' -import { idToData } from './js/verification' -import { selectComp } from './js/methods' export default { name: 'insuredInfo', @@ -413,7 +408,7 @@ export default { value: '1' } ], - currentTime: beforeDate.getBeforeDays(27), + currentTime: beforeDate.getBeforeDays(28), fromCustomer: false, //是否从客户列表拉取的数据 codeDisabled: false, //获取验证码是否禁用 countDown: 60, //倒计时 @@ -432,9 +427,9 @@ export default { userInfo: { name: '', sex: '0', - nativeplace: '1', //国家地区 + nativeplace: 'CHN', //国家地区 birthday: '', - idType: '1', //证件类型 + idType: '0', //证件类型 idNo: '', //证件号码 certificateValidate: '', //证件起始日期 certiexpiredate: '', //证件到期时间 @@ -480,13 +475,13 @@ export default { householdCity: '', //户籍市 addressStatus: '' //是否是联系地址 }, + tempUserInfo: {}, //临时变量用来置空userinfo areaList: areaList, currentPopupIndex: '', customerShowPicker: false, occupationShowPicker: false, isAppnt: false, // 是否投被同人 - appntMarriage: '', //投保人婚姻状况 - idLimit: false //证件起止日期是否只读 + appntMarriage: '' //投保人婚姻状况 } }, created() { @@ -496,7 +491,7 @@ export default { getOrderDetail({ orderNo: localStorage.orderNo }).then(res => { if (res.result == 0) { //投被同人 - if (res.orderDTO.insuredDTOs.length && res.orderDTO.insuredDTOs[0].relationToAppnt == '1') { + if (res.orderDTO.insuredDTOs[0] && res.orderDTO.insuredDTOs[0].relationToAppnt == '1') { this.$nextTick(() => { this.isAppnt = true //获取投保人信息 @@ -525,13 +520,13 @@ export default { // this.userInfo.effectiveDateType = insuredInfo.effectiveDateType == 'false' ? false : true //数据不是从用户列表拉取 this.fromCustomer = false - this.userInfo.relationToAppnt = '1' + this.userInfo.relationToAppnt = '00' //长期判断 - if (this.userInfo.idType == '1') { + if (this.userInfo.idType == '0') { // 计算年龄 let age = utilsAge.getAge(this.userInfo.birthday, new Date()) // 长期按钮是否禁用 - this.effectiveDateTypeAble = age <= 45 + this.effectiveDateTypeAble = age >= 16 && age <= 45 } }) } @@ -549,9 +544,9 @@ export default { //设为联系地址 this.userInfo.addressStatus = '0' //证件类型 - this.userInfo.idType = '1' + this.userInfo.idType = '0' //国家/地区 - this.userInfo.nativeplace = '1' + this.userInfo.nativeplace = 'CHN' if (this.$route.query.isShow) { //户籍 if (insuredPersonInfo.householdProvince.length) { @@ -598,6 +593,7 @@ export default { }, mounted() { window.appCallBack = this.appCallBack + this.tempUserInfo = this.userInfo // document.body.style.backgroundColor = '#F5F5F5' }, methods: { @@ -610,29 +606,27 @@ export default { if (this.isAppnt) { return } - // this.currentPopupIndex = index - // let title = '' - // if (index == 1) { - // ;[this.customerShowPicker, title] = [true, '客户列表'] - // } else if (index == 2) { - // ;[this.occupationShowPicker, title] = [true, '职业类别'] - // } else if (index == 3) { - // localStorage.scanFromInsured = 'false' - // ;[this.isScan, title] = [true, '身份证扫描'] - // } + this.currentPopupIndex = index + let title = '' + if (index == 1) { + ;[this.customerShowPicker, title] = [true, '客户列表'] + } else if (index == 2) { + ;[this.occupationShowPicker, title] = [true, '职业类别'] + } else if (index == 3) { + localStorage.scanFromInsured = 'false' + ;[this.isScan, title] = [true, '身份证扫描'] + } - // setTimeout(() => { - // this.$jump({ - // flag: 'navigation', - // extra: { - // title, - // hiddenLeft: '1' - // } - // }) - // this.closeBtn() - // }, 400) - // let that = this - selectComp(this, index, '2') + setTimeout(() => { + this.$jump({ + flag: 'navigation', + extra: { + title, + hiddenLeft: '1' + } + }) + this.closeBtn() + }, 400) }, chooseOccupation() { this.$jump({ @@ -644,20 +638,23 @@ export default { }) this.occupationShowPicker = false }, - // closeBtn() { - // // 筛选按钮的显示 - // this.$jump({ - // flag: 'webview_right_button', - // extra: { - // btns: [ - // { - // img: this.$assetsUrl + 'images/del-close.png', - // route: { flag: '', extra: {} } - // } - // ] - // } - // }) - // }, + closeBtn() { + // 筛选按钮的显示 + setTimeout(()=> { + this.$jump({ + flag: 'webview_right_button', + extra: { + btns: [ + { + img: this.$assetsUrl + 'images/del-close.png', + route: { flag: '', extra: {} } + } + ] + } + }) + }, 500) + + }, //弹框选择 toSelect(pickerType, valueKey) { // 投被同人不允许编辑 @@ -692,31 +689,22 @@ export default { if (this.pickerType == '1') { this.userInfo.nativeplace = value.id } else if (this.pickerType == '2') { - this.idLimit = false - this.userInfo.idNo = this.userInfo.certificateValidate = this.userInfo.certiexpiredate = this.userInfo.birthday = '' - this.userInfo.sex = '0' - this.effectiveDateTypeAble = false console.log(value.id) //身份证以外的证件类型可以使用长期 - if (value.id == '1') { + if (value.id != '1') { + this.effectiveDateTypeAble = false + } else { console.log('123') let age = utilsAge.getAge(this.userInfo.birthday, new Date()) - this.effectiveDateTypeAble = age <= 45 - } else if (value.id == 2 || value.id == 3) { - this.effectiveDateTypeAble = true - } else { - this.effectiveDateTypeAble = false + this.effectiveDateTypeAble = !(age >= 45) } - // //出生证明返显证件截止日期 + //出生证明返显证件截止日期 // if (value.id == 3 && this.userInfo.birthday != '') { // let exipreDate = Date.parse(this.userInfo.birthday) + Date.parse('1972-12-31') // this.userInfo.certiexpiredate = this.timeStampFormat(exipreDate) // this.certiexpiredateShow = false // } - // if (value.id == 2 || value.id == 3) { - // this.effectiveDateTypeAble = true - // } - // //户口本返显证件截止日期 + //户口本返显证件截止日期 // else if (value.id == 2 && this.userInfo.birthday != '') { // let exipreDate = Date.parse(this.userInfo.birthday) + Date.parse('1986-01-01') // this.userInfo.certiexpiredate = this.timeStampFormat(exipreDate) @@ -735,7 +723,7 @@ export default { this.userInfo.marriage = value.id } else if (this.pickerType == '7') { //如果关系是本人 - if (value.id == 1) { + if (value.id == '00') { //获取订单详情 getOrderDetail({ orderNo: localStorage.orderNo }).then(res => { if (res.result == 0) { @@ -780,7 +768,7 @@ export default { // 计算年龄 let age = utilsAge.getAge(this.userInfo.birthday, new Date()) // 长期按钮是否禁用 - this.effectiveDateTypeAble = age <= 45 + this.effectiveDateTypeAble = age >= 16 && age <= 45 } } else { this.$toast(res.resultMessage) @@ -800,8 +788,6 @@ export default { this.userInfo[key] = '' } } - this.userInfo.effectiveDateType = false - this.effectiveDateTypeAble = false this.areaName = this.homeName = this.census = '' this.userInfo.relationToAppnt = value.id } @@ -826,7 +812,7 @@ export default { let age = utilsAge.getAge(this.userInfo.birthday, new Date()) // 长期按钮是否禁用 - this.effectiveDateTypeAble = age <= 45 + this.effectiveDateTypeAble = age >= 16 && age <= 45 } break case '1': @@ -845,7 +831,6 @@ export default { this.$refs.certiexpiredate.date = '' return this.$toast('您的证件已过期') } - //不同证件类型的判断 // if (this.userInfo.idType) { // //获取年龄 @@ -883,16 +868,8 @@ export default { //长期判断 if (this.userInfo.idType == '1') { let age = utilsAge.getAge(this.userInfo.birthday, new Date()) - this.effectiveDateTypeAble = age <= 45 + this.effectiveDateTypeAble = !(age >= 45) } - //出生证有效期 - // if (this.userInfo.idType == '3') { - // if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(val) > Date.parse('1973-01-01')) { - // this.userInfo.birthday = '' - // this.$refs.birthday.date = '' - // return this.$toast('出生证有效期或出生日期有误') - // } - // } } break } @@ -978,12 +955,13 @@ export default { //计算年龄 let age = utilsAge.getAge(this.userInfo.birthday, new Date()) // 长期按钮是否禁用 - this.effectiveDateTypeAble = age <= 45 + this.effectiveDateTypeAble = age >= 16 && age <= 45 //数据是否从客户列表拉取 this.fromCustomer = true }, //下一步 nextStep() { + console.log('--投保--下一步--被保人:', JSON.stringify(this.userInfo)) this.$validator.validate().then(valid => { if (true === valid) { // 计算年龄 @@ -991,8 +969,8 @@ export default { //投被保人关系是配偶 if (this.userInfo.relationToAppnt == '2') { - //投保人或者被保人不是已婚 - if (this.appntMarriage != '1' || this.userInfo.marriage != '1') { + //投保人不是已婚 + if (this.appntMarriage != '1') { return this.$toast('投被保人婚姻状况有误') } let insuredSex = this.userInfo.sex @@ -1012,7 +990,7 @@ export default { // } //如果证件类型是身份证 - if (this.userInfo.idType == '1') { + if (this.userInfo.idType == '0') { //校验性别是否与身份证号码位相符 if (this.userInfo.idNo.length == '15') { //15位身份证第15位是性别位, 奇男偶女 @@ -1080,14 +1058,14 @@ export default { } } //证件类型是户口本 - } else if (this.userInfo.idType == '2') { + } else if (this.userInfo.idType == '1') { if (age >= 16) { return this.$toast('客户年龄在16周岁及以上,不能使用户口本作为有效证件') } else if (this.userInfo.idNo.length != 18) { return this.$toast('户口本的证件号码长度应等于18位') } //证件类型是出生证明 - } else if (this.userInfo.idType == '3') { + } else if (this.userInfo.idType == '2') { if (age >= 3) { return this.$toast('客户年龄在3周岁及以上,不能使用出生证作为有效证件') } else if (this.userInfo.idNo.length < 3) { @@ -1116,7 +1094,7 @@ export default { //如果是已婚 if ((this.userInfo.sex == '0' && age < 22) || (this.userInfo.sex == '1' && age < 20)) { if (this.userInfo.marriage != '2') { - return this.$toast('被保人不符合国家婚姻法定年龄') + return this.$toast('年龄与婚姻状况不符') } } // this.save() @@ -1148,7 +1126,7 @@ export default { className: 'dialog-delete', title: '提示', message: '当前信息已经发生改变,有可能影响险种费率,是否确认修改并清除险种信息?', - cancelButtonColor: '#4FC6B3', + cancelButtonColor: '#E9332E', confirmButtonColor: '#FFFFFF' }) .then(() => { @@ -1321,63 +1299,6 @@ export default { default: break } - }, - //校验身高 - checkStature(val) { - console.log(val) - if (val.trim().length == 0) { - return this.$toast('身高不能为空') - } - - let res = /^[0-9]{0,3}([.]{1}[0-9]{1})?$/.test(val) && val < 300 && val > 10 - if (!res) { - this.userInfo.stature = '' - return this.$toast('身高输入有误') - } - }, - //校验体重 - checkAvoirdupois(val) { - if (val.trim().length == 0) { - return this.$toast('体重不能为空') - } - - let res = /^[0-9]+([.]{1}[0-9]{1})?$/.test(val) && val > 0.1 - if (!res) { - this.userInfo.avoirdupois = '' - return this.$toast('体重输入有误') - } - }, - getRelatedData(val) { - // if (this.userInfo.idType != '1') { - // return - // } - if (!['1', '2', '3', 1, 2, 3].includes(this.userInfo.idType)) { - return - } - //如果证件校验不通过,恢复默认值 - if (idToData(val).text) { - ;[this.userInfo.idNo, this.userInfo.sex, this.userInfo.birthday, this.effectiveDateTypeAble] = ['', '0', '', false] - return this.$toast(idToData(val).text) - } - this.userInfo.effectiveDateType = false - this.effectiveDateTypeAble = idToData(val).age < 45 - this.userInfo.birthday = idToData(val).birthday - this.userInfo.sex = idToData(val).sex - //如果选择户口本 - if (this.userInfo.idType == '2') { - let exipreDate = Date.parse(this.userInfo.birthday) + Date.parse('1985-12-31') - this.userInfo.certificateValidate = this.userInfo.birthday - this.userInfo.certiexpiredate = this.timeStampFormat(exipreDate) - this.idLimit = true - //如果选择出生证明 - } else if (this.userInfo.idType == '3') { - let exipreDate = Date.parse(this.userInfo.birthday) + Date.parse('1972-12-31') - this.userInfo.certificateValidate = this.userInfo.birthday - this.userInfo.certiexpiredate = this.timeStampFormat(exipreDate) - this.idLimit = true - } else { - this.idLimit = false - } } }, beforeDestroy() {