twmodule 0.0.37 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1219,14 +1219,14 @@ module.exports = function (it, TAG, STATIC) {
1219
1219
  _this.startDate = item.startDate ? new Date(item.startDate) : new Date(new Date().setFullYear(new Date().getFullYear() - 10));
1220
1220
  _this.endDate = item.endDate ? new Date(item.endDate) : new Date(new Date().setFullYear(new Date().getFullYear() + 10));
1221
1221
 
1222
- if ((item.startText || item.endText) && item.rangeType == 'range') {
1222
+ if ((item.startText || item.endText) && item.rangeType === 'range') {
1223
1223
  this.rangeRowHeight = 64;
1224
1224
  }
1225
1225
 
1226
1226
  _this.rangeOpen = true;
1227
1227
  },
1228
1228
  rangeConfirm: function rangeConfirm(date) {
1229
- if (this.rangeType == 'range') {
1229
+ if (this.rangeType === 'range') {
1230
1230
  var _date = Object(D_work_Vue_twmodule_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"])(date, 2),
1231
1231
  start = _date[0],
1232
1232
  end = _date[1];
@@ -1237,9 +1237,10 @@ module.exports = function (it, TAG, STATIC) {
1237
1237
  }
1238
1238
 
1239
1239
  this.rangeOpen = false;
1240
+ this.gotoPage(this.currTime);
1240
1241
  },
1241
1242
  formatterRange: function formatterRange(day) {
1242
- if (this.changeDate(day.date) == this.changeDate(new Date())) {
1243
+ if (this.changeDate(day.date) === this.changeDate(new Date())) {
1243
1244
  day.topInfo = '今天';
1244
1245
  }
1245
1246
 
@@ -1268,7 +1269,7 @@ module.exports = function (it, TAG, STATIC) {
1268
1269
  _this.currTime = item;
1269
1270
  _this.timeType = item.timeType ? item.timeType : 'datetime';
1270
1271
 
1271
- if (_this.timeType == 'time') {
1272
+ if (_this.timeType === 'time') {
1272
1273
  _this.pickerValueDate = '';
1273
1274
  }
1274
1275
 
@@ -1279,8 +1280,9 @@ module.exports = function (it, TAG, STATIC) {
1279
1280
  timeChange: function timeChange(picker) {},
1280
1281
  timeConfirm: function timeConfirm(time) {
1281
1282
  this.pickerValueDate = time;
1282
- this.currTime.value = this.timeType == 'time' ? time : this.changeDate(time, this.timeType);
1283
+ this.currTime.value = this.timeType === 'time' ? time : this.changeDate(time, this.timeType);
1283
1284
  this.timeOpen = false;
1285
+ this.gotoPage(this.currTime);
1284
1286
  },
1285
1287
  filter: function filter(type, options) {
1286
1288
  if (type === 'minute') {
@@ -1323,7 +1325,7 @@ module.exports = function (it, TAG, STATIC) {
1323
1325
  }
1324
1326
  });
1325
1327
 
1326
- if (num == 2) {
1328
+ if (num === 2) {
1327
1329
  data.unshift({
1328
1330
  text: '全部',
1329
1331
  value: '',
@@ -1333,7 +1335,7 @@ module.exports = function (it, TAG, STATIC) {
1333
1335
  children: ''
1334
1336
  }]
1335
1337
  });
1336
- } else if (num == 3) {
1338
+ } else if (num === 3) {
1337
1339
  data.unshift({
1338
1340
  text: '全部',
1339
1341
  value: '',
@@ -1377,7 +1379,7 @@ module.exports = function (it, TAG, STATIC) {
1377
1379
  this.selectOneList = [];
1378
1380
  this.selectOneList = JSON.parse(JSON.stringify(item.list));
1379
1381
 
1380
- if (item.type == 'selectOneContact') {
1382
+ if (item.type === 'selectOneContact') {
1381
1383
  var currList = this.rebuildData(this.selectOneList, item.levelNum);
1382
1384
 
1383
1385
  if (item.valueIndex && item.valueIndex.length > 0) {
@@ -1391,7 +1393,7 @@ module.exports = function (it, TAG, STATIC) {
1391
1393
  setTimeout(function () {
1392
1394
  document.getElementsByClassName('van-picker-column')[0].style.display = 'none';
1393
1395
 
1394
- if (item.valueIndex && item.valueIndex[item.levelNum] == '0') {
1396
+ if (item.valueIndex && item.valueIndex[item.levelNum] === '0') {
1395
1397
  document.getElementsByClassName('van-picker-column')[item.levelNum + 1] ? document.getElementsByClassName('van-picker-column')[item.levelNum + 1].style.display = 'none' : '';
1396
1398
  }
1397
1399
  }, 100);
@@ -1400,7 +1402,7 @@ module.exports = function (it, TAG, STATIC) {
1400
1402
  item.value.split(',').map(function (j) {
1401
1403
  _this.selectOneList.map(function (k) {
1402
1404
  k.values.map(function (l, p) {
1403
- if (j == l.value) {
1405
+ if (j === l.value) {
1404
1406
  k.defaultIndex = p + 1;
1405
1407
  }
1406
1408
  });
@@ -1427,7 +1429,7 @@ module.exports = function (it, TAG, STATIC) {
1427
1429
  _this.currTarget.showName = '';
1428
1430
  _this.currTarget.value = '';
1429
1431
 
1430
- if (_this.currTarget.type == 'selectOneContact') {
1432
+ if (_this.currTarget.type === 'selectOneContact') {
1431
1433
  val.map(function (i, j) {
1432
1434
  if (i) {
1433
1435
  _this.currTarget.showName += i + '-';
@@ -1436,15 +1438,15 @@ module.exports = function (it, TAG, STATIC) {
1436
1438
  _this.currTarget.valueIndex = index;
1437
1439
  var data = _this.selectOneList;
1438
1440
 
1439
- if ((index[1] || index[1] == 0) && data[index[0]].children[index[1]].value) {
1441
+ if ((index[1] || index[1] === 0) && data[index[0]].children[index[1]].value) {
1440
1442
  _this.currTarget.value += data[index[0]].children[index[1]].value + ',';
1441
1443
  }
1442
1444
 
1443
- if ((index[2] || index[2] == 0) && data[index[0]].children[index[1]].children[index[2]].value) {
1445
+ if ((index[2] || index[2] === 0) && data[index[0]].children[index[1]].children[index[2]].value) {
1444
1446
  _this.currTarget.value += data[index[0]].children[index[1]].children[index[2]].value + ',';
1445
1447
  }
1446
1448
 
1447
- if ((index[3] || index[3] == 0) && _this.currTarget.levelNum == 3 && data[index[0]].children[index[1]].children[index[2]].children[index[3]].value) {
1449
+ if ((index[3] || index[3] === 0) && _this.currTarget.levelNum === 3 && data[index[0]].children[index[1]].children[index[2]].children[index[3]].value) {
1448
1450
  _this.currTarget.value += data[index[0]].children[index[1]].children[index[2]].children[index[3]].value + ',';
1449
1451
  }
1450
1452
  } else {
@@ -1459,6 +1461,8 @@ module.exports = function (it, TAG, STATIC) {
1459
1461
  _this.currTarget.showName = _this.currTarget.showName.substring(0, _this.currTarget.showName.length - 1);
1460
1462
  _this.currTarget.value = _this.currTarget.value.substring(0, _this.currTarget.value.length - 1);
1461
1463
  _this.selectOneOpen = false;
1464
+
1465
+ _this.gotoPage(this.currTarget);
1462
1466
  },
1463
1467
 
1464
1468
  /**************上拉选择******end***************/
@@ -1473,6 +1477,8 @@ module.exports = function (it, TAG, STATIC) {
1473
1477
 
1474
1478
  _this.currTarget = item;
1475
1479
  _this.radioCheckBoxShow = true;
1480
+
1481
+ _this.gotoPage(item);
1476
1482
  },
1477
1483
  checkAll: function checkAll() {
1478
1484
  //全选
@@ -1491,7 +1497,7 @@ module.exports = function (it, TAG, STATIC) {
1491
1497
  _this.currTarget.value = _this.currTarget.valueCopy;
1492
1498
  }, 300);
1493
1499
  } else {
1494
- _this.currTarget.value = _this.currTarget.type == 'radioPop' ? '' : [];
1500
+ _this.currTarget.value = _this.currTarget.type === 'radioPop' ? '' : [];
1495
1501
  }
1496
1502
 
1497
1503
  _this.radioCheckBoxShow = false;
@@ -1500,9 +1506,9 @@ module.exports = function (it, TAG, STATIC) {
1500
1506
  //确定按钮
1501
1507
  var _this = this;
1502
1508
 
1503
- if (_this.currTarget.type == 'radioPop') {
1509
+ if (_this.currTarget.type === 'radioPop') {
1504
1510
  _this.currTarget.list.map(function (i) {
1505
- if (i.value == _this.currTarget.value) {
1511
+ if (i.value === _this.currTarget.value) {
1506
1512
  _this.currTarget.showName = i.name;
1507
1513
  }
1508
1514
  });
@@ -1511,7 +1517,7 @@ module.exports = function (it, TAG, STATIC) {
1511
1517
 
1512
1518
  _this.currTarget.value.map(function (j) {
1513
1519
  _this.currTarget.list.map(function (k) {
1514
- if (j == k.value) {
1520
+ if (j === k.value) {
1515
1521
  _this.currTarget.showName += k.name + ',';
1516
1522
  }
1517
1523
  });
@@ -1525,6 +1531,7 @@ module.exports = function (it, TAG, STATIC) {
1525
1531
  },
1526
1532
  radioCheckClick: function radioCheckClick(item) {
1527
1533
  item.clicked = true;
1534
+ this.gotoPage(item);
1528
1535
  },
1529
1536
 
1530
1537
  /******************单选复选******end*****************/
@@ -1532,15 +1539,15 @@ module.exports = function (it, TAG, STATIC) {
1532
1539
  //数字类型时,字数限制
1533
1540
  data.clicked = true; //this.verifyReq();
1534
1541
 
1535
- if (data.type == 'tel' && data.value) {
1542
+ if (data.type === 'tel' && data.value) {
1536
1543
  data.value = data.value.replace(/[^0-9]/g, '');
1537
1544
  }
1538
1545
 
1539
- if (data.type == 'integer' && data.value) {
1546
+ if (data.type === 'integer' && data.value) {
1540
1547
  data.value = parseInt(data.value.replace(/[^0-9]/g, '') - 0);
1541
1548
  }
1542
1549
 
1543
- if (data.type == 'number') {
1550
+ if (data.type === 'number') {
1544
1551
  if (data.tofixed) {
1545
1552
  if (JSON.stringify(data.value).includes('.')) {
1546
1553
  var num = data.value.split('.'),
@@ -1561,10 +1568,10 @@ module.exports = function (it, TAG, STATIC) {
1561
1568
  //blur事件
1562
1569
  var _this = this;
1563
1570
 
1564
- if (data.type == 'tel' && data.value) {
1571
+ if (data.type === 'tel' && data.value) {
1565
1572
  data.value = data.value.replace(/[^0-9]/g, '');
1566
1573
 
1567
- if (data.value[0] == 1 && data.value.length != 11) {
1574
+ if (data.value[0] === 1 && data.value.length !== 11) {
1568
1575
  data.showSpecial = true;
1569
1576
  data.errMsg = '手机号码必须为11位!';
1570
1577
  } else {
@@ -1576,11 +1583,11 @@ module.exports = function (it, TAG, STATIC) {
1576
1583
  data.errMsg = '';
1577
1584
  }
1578
1585
 
1579
- if (data.type == 'integer' && data.value) {
1586
+ if (data.type === 'integer' && data.value) {
1580
1587
  data.value = parseInt((data.value + '').replace(/[^0-9]/g, '') - 0);
1581
1588
  }
1582
1589
 
1583
- if (data.type == 'number' && data.tofixed && data.value) {
1590
+ if (data.type === 'number' && data.tofixed && data.value) {
1584
1591
  //数字型 保留小数位数
1585
1592
  data.value = parseFloat((data.value - 0).toFixed(data.tofixed));
1586
1593
  }
@@ -1594,15 +1601,15 @@ module.exports = function (it, TAG, STATIC) {
1594
1601
  var c = data.countContact[2] ? _this.getPointValue(data.countContact[2]) : '';
1595
1602
  var d = data.countContact[3] ? _this.getPointValue(data.countContact[3]) : '';
1596
1603
 
1597
- if (data.countContact.length == 2 && a && b || data.countContact.length == 3 && a && b && c || data.countContact.length == 4 && a && b && c && d) {
1604
+ if (data.countContact.length === 2 && a && b || data.countContact.length === 3 && a && b && c || data.countContact.length === 4 && a && b && c && d) {
1598
1605
  _this.formData.formList.map(function (i) {
1599
- if (i.valueName == data.countResult) {
1606
+ if (i.valueName === data.countResult) {
1600
1607
  i.value = parseFloat(eval(data.countRule));
1601
1608
  }
1602
1609
  });
1603
1610
  } else {
1604
1611
  _this.formData.formList.map(function (i) {
1605
- if (i.valueName == data.countResult) {
1612
+ if (i.valueName === data.countResult) {
1606
1613
  i.value = '';
1607
1614
  }
1608
1615
  });
@@ -1616,15 +1623,15 @@ module.exports = function (it, TAG, STATIC) {
1616
1623
  var c1 = data.secContact[2] ? _this.getPointValue(data.secContact[2]) : '';
1617
1624
  var d1 = data.secContact[3] ? _this.getPointValue(data.secContact[3]) : '';
1618
1625
 
1619
- if (data.secContact.length == 2 && a1 && b1 || data.secContact.length == 3 && a1 && b1 && c1 || data.secContact.length == 4 && a1 && b1 && c1 && d1) {
1626
+ if (data.secContact.length === 2 && a1 && b1 || data.secContact.length === 3 && a1 && b1 && c1 || data.secContact.length === 4 && a1 && b1 && c1 && d1) {
1620
1627
  _this.formData.formList.map(function (i) {
1621
- if (i.valueName == data.secResult) {
1628
+ if (i.valueName === data.secResult) {
1622
1629
  i.value = parseFloat(eval(data.secRule));
1623
1630
  }
1624
1631
  });
1625
1632
  } else {
1626
1633
  _this.formData.formList.map(function (i) {
1627
- if (i.valueName == data.secResult) {
1634
+ if (i.valueName === data.secResult) {
1628
1635
  i.value = '';
1629
1636
  }
1630
1637
  });
@@ -1634,6 +1641,7 @@ module.exports = function (it, TAG, STATIC) {
1634
1641
 
1635
1642
  data.clicked = true;
1636
1643
  this.$forceUpdate();
1644
+ this.gotoPage(data);
1637
1645
  },
1638
1646
  getPointValue: function getPointValue(val) {
1639
1647
  //根据value获取list中的对应值
@@ -1641,7 +1649,7 @@ module.exports = function (it, TAG, STATIC) {
1641
1649
  currVal;
1642
1650
 
1643
1651
  _this.formData.formList.map(function (i) {
1644
- if (i.valueName == val) {
1652
+ if (i.valueName === val) {
1645
1653
  currVal = i.value;
1646
1654
  }
1647
1655
  });
@@ -1668,18 +1676,21 @@ module.exports = function (it, TAG, STATIC) {
1668
1676
  _this.formData.formList.map(function (i) {
1669
1677
  sendData[i.valueName] = i.value;
1670
1678
 
1671
- if (i.require && !i.value) {
1679
+ if (i.type === 'tel' && i.value && i.value[0] === 1 && i.value.length !== 11) {
1680
+ currState = false;
1681
+ phoneMsg = '手机号码必须为11位!';
1682
+ } else if (i.required && !i.value) {
1672
1683
  currState = false;
1673
1684
  mention = mention + i.name + ' , ';
1674
1685
  }
1675
1686
  });
1687
+ /*_this.formData.formList.map(i=>{
1688
+ if(i.type==='tel' && i.value && i.value[0] === 1 && i.value.length !== 11){
1689
+ currState = false;
1690
+ phoneMsg = '手机号码必须为11位!';
1691
+ }
1692
+ });*/
1676
1693
 
1677
- _this.formData.formList.map(function (i) {
1678
- if (i.type == 'tel' && i.value && i.value[0] == 1 && i.value.length != 11) {
1679
- currState = false;
1680
- phoneMsg = '手机号码必须为11位!';
1681
- }
1682
- });
1683
1694
 
1684
1695
  if (mention && phoneMsg) {
1685
1696
  endMsg = mention + ' 为必填项!且' + phoneMsg;
@@ -1695,16 +1706,14 @@ module.exports = function (it, TAG, STATIC) {
1695
1706
  sendData: sendData
1696
1707
  };
1697
1708
 
1698
- if (currState) {
1699
- _this.$emit('formVerify', resultData);
1700
- }
1701
-
1702
1709
  _this.formData.formList.map(function (j) {
1703
1710
  if (j.required) {
1704
1711
  j.clicked = true;
1705
1712
  }
1706
1713
  });
1707
1714
 
1715
+ _this.$emit('formVerify', resultData);
1716
+
1708
1717
  if (isJump) {
1709
1718
  var currDom = '';
1710
1719
  var currTop = 0;
package/lib/twComp.umd.js CHANGED
@@ -1228,14 +1228,14 @@ module.exports = function (it, TAG, STATIC) {
1228
1228
  _this.startDate = item.startDate ? new Date(item.startDate) : new Date(new Date().setFullYear(new Date().getFullYear() - 10));
1229
1229
  _this.endDate = item.endDate ? new Date(item.endDate) : new Date(new Date().setFullYear(new Date().getFullYear() + 10));
1230
1230
 
1231
- if ((item.startText || item.endText) && item.rangeType == 'range') {
1231
+ if ((item.startText || item.endText) && item.rangeType === 'range') {
1232
1232
  this.rangeRowHeight = 64;
1233
1233
  }
1234
1234
 
1235
1235
  _this.rangeOpen = true;
1236
1236
  },
1237
1237
  rangeConfirm: function rangeConfirm(date) {
1238
- if (this.rangeType == 'range') {
1238
+ if (this.rangeType === 'range') {
1239
1239
  var _date = Object(D_work_Vue_twmodule_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"])(date, 2),
1240
1240
  start = _date[0],
1241
1241
  end = _date[1];
@@ -1246,9 +1246,10 @@ module.exports = function (it, TAG, STATIC) {
1246
1246
  }
1247
1247
 
1248
1248
  this.rangeOpen = false;
1249
+ this.gotoPage(this.currTime);
1249
1250
  },
1250
1251
  formatterRange: function formatterRange(day) {
1251
- if (this.changeDate(day.date) == this.changeDate(new Date())) {
1252
+ if (this.changeDate(day.date) === this.changeDate(new Date())) {
1252
1253
  day.topInfo = '今天';
1253
1254
  }
1254
1255
 
@@ -1277,7 +1278,7 @@ module.exports = function (it, TAG, STATIC) {
1277
1278
  _this.currTime = item;
1278
1279
  _this.timeType = item.timeType ? item.timeType : 'datetime';
1279
1280
 
1280
- if (_this.timeType == 'time') {
1281
+ if (_this.timeType === 'time') {
1281
1282
  _this.pickerValueDate = '';
1282
1283
  }
1283
1284
 
@@ -1288,8 +1289,9 @@ module.exports = function (it, TAG, STATIC) {
1288
1289
  timeChange: function timeChange(picker) {},
1289
1290
  timeConfirm: function timeConfirm(time) {
1290
1291
  this.pickerValueDate = time;
1291
- this.currTime.value = this.timeType == 'time' ? time : this.changeDate(time, this.timeType);
1292
+ this.currTime.value = this.timeType === 'time' ? time : this.changeDate(time, this.timeType);
1292
1293
  this.timeOpen = false;
1294
+ this.gotoPage(this.currTime);
1293
1295
  },
1294
1296
  filter: function filter(type, options) {
1295
1297
  if (type === 'minute') {
@@ -1332,7 +1334,7 @@ module.exports = function (it, TAG, STATIC) {
1332
1334
  }
1333
1335
  });
1334
1336
 
1335
- if (num == 2) {
1337
+ if (num === 2) {
1336
1338
  data.unshift({
1337
1339
  text: '全部',
1338
1340
  value: '',
@@ -1342,7 +1344,7 @@ module.exports = function (it, TAG, STATIC) {
1342
1344
  children: ''
1343
1345
  }]
1344
1346
  });
1345
- } else if (num == 3) {
1347
+ } else if (num === 3) {
1346
1348
  data.unshift({
1347
1349
  text: '全部',
1348
1350
  value: '',
@@ -1386,7 +1388,7 @@ module.exports = function (it, TAG, STATIC) {
1386
1388
  this.selectOneList = [];
1387
1389
  this.selectOneList = JSON.parse(JSON.stringify(item.list));
1388
1390
 
1389
- if (item.type == 'selectOneContact') {
1391
+ if (item.type === 'selectOneContact') {
1390
1392
  var currList = this.rebuildData(this.selectOneList, item.levelNum);
1391
1393
 
1392
1394
  if (item.valueIndex && item.valueIndex.length > 0) {
@@ -1400,7 +1402,7 @@ module.exports = function (it, TAG, STATIC) {
1400
1402
  setTimeout(function () {
1401
1403
  document.getElementsByClassName('van-picker-column')[0].style.display = 'none';
1402
1404
 
1403
- if (item.valueIndex && item.valueIndex[item.levelNum] == '0') {
1405
+ if (item.valueIndex && item.valueIndex[item.levelNum] === '0') {
1404
1406
  document.getElementsByClassName('van-picker-column')[item.levelNum + 1] ? document.getElementsByClassName('van-picker-column')[item.levelNum + 1].style.display = 'none' : '';
1405
1407
  }
1406
1408
  }, 100);
@@ -1409,7 +1411,7 @@ module.exports = function (it, TAG, STATIC) {
1409
1411
  item.value.split(',').map(function (j) {
1410
1412
  _this.selectOneList.map(function (k) {
1411
1413
  k.values.map(function (l, p) {
1412
- if (j == l.value) {
1414
+ if (j === l.value) {
1413
1415
  k.defaultIndex = p + 1;
1414
1416
  }
1415
1417
  });
@@ -1436,7 +1438,7 @@ module.exports = function (it, TAG, STATIC) {
1436
1438
  _this.currTarget.showName = '';
1437
1439
  _this.currTarget.value = '';
1438
1440
 
1439
- if (_this.currTarget.type == 'selectOneContact') {
1441
+ if (_this.currTarget.type === 'selectOneContact') {
1440
1442
  val.map(function (i, j) {
1441
1443
  if (i) {
1442
1444
  _this.currTarget.showName += i + '-';
@@ -1445,15 +1447,15 @@ module.exports = function (it, TAG, STATIC) {
1445
1447
  _this.currTarget.valueIndex = index;
1446
1448
  var data = _this.selectOneList;
1447
1449
 
1448
- if ((index[1] || index[1] == 0) && data[index[0]].children[index[1]].value) {
1450
+ if ((index[1] || index[1] === 0) && data[index[0]].children[index[1]].value) {
1449
1451
  _this.currTarget.value += data[index[0]].children[index[1]].value + ',';
1450
1452
  }
1451
1453
 
1452
- if ((index[2] || index[2] == 0) && data[index[0]].children[index[1]].children[index[2]].value) {
1454
+ if ((index[2] || index[2] === 0) && data[index[0]].children[index[1]].children[index[2]].value) {
1453
1455
  _this.currTarget.value += data[index[0]].children[index[1]].children[index[2]].value + ',';
1454
1456
  }
1455
1457
 
1456
- if ((index[3] || index[3] == 0) && _this.currTarget.levelNum == 3 && data[index[0]].children[index[1]].children[index[2]].children[index[3]].value) {
1458
+ if ((index[3] || index[3] === 0) && _this.currTarget.levelNum === 3 && data[index[0]].children[index[1]].children[index[2]].children[index[3]].value) {
1457
1459
  _this.currTarget.value += data[index[0]].children[index[1]].children[index[2]].children[index[3]].value + ',';
1458
1460
  }
1459
1461
  } else {
@@ -1468,6 +1470,8 @@ module.exports = function (it, TAG, STATIC) {
1468
1470
  _this.currTarget.showName = _this.currTarget.showName.substring(0, _this.currTarget.showName.length - 1);
1469
1471
  _this.currTarget.value = _this.currTarget.value.substring(0, _this.currTarget.value.length - 1);
1470
1472
  _this.selectOneOpen = false;
1473
+
1474
+ _this.gotoPage(this.currTarget);
1471
1475
  },
1472
1476
 
1473
1477
  /**************上拉选择******end***************/
@@ -1482,6 +1486,8 @@ module.exports = function (it, TAG, STATIC) {
1482
1486
 
1483
1487
  _this.currTarget = item;
1484
1488
  _this.radioCheckBoxShow = true;
1489
+
1490
+ _this.gotoPage(item);
1485
1491
  },
1486
1492
  checkAll: function checkAll() {
1487
1493
  //全选
@@ -1500,7 +1506,7 @@ module.exports = function (it, TAG, STATIC) {
1500
1506
  _this.currTarget.value = _this.currTarget.valueCopy;
1501
1507
  }, 300);
1502
1508
  } else {
1503
- _this.currTarget.value = _this.currTarget.type == 'radioPop' ? '' : [];
1509
+ _this.currTarget.value = _this.currTarget.type === 'radioPop' ? '' : [];
1504
1510
  }
1505
1511
 
1506
1512
  _this.radioCheckBoxShow = false;
@@ -1509,9 +1515,9 @@ module.exports = function (it, TAG, STATIC) {
1509
1515
  //确定按钮
1510
1516
  var _this = this;
1511
1517
 
1512
- if (_this.currTarget.type == 'radioPop') {
1518
+ if (_this.currTarget.type === 'radioPop') {
1513
1519
  _this.currTarget.list.map(function (i) {
1514
- if (i.value == _this.currTarget.value) {
1520
+ if (i.value === _this.currTarget.value) {
1515
1521
  _this.currTarget.showName = i.name;
1516
1522
  }
1517
1523
  });
@@ -1520,7 +1526,7 @@ module.exports = function (it, TAG, STATIC) {
1520
1526
 
1521
1527
  _this.currTarget.value.map(function (j) {
1522
1528
  _this.currTarget.list.map(function (k) {
1523
- if (j == k.value) {
1529
+ if (j === k.value) {
1524
1530
  _this.currTarget.showName += k.name + ',';
1525
1531
  }
1526
1532
  });
@@ -1534,6 +1540,7 @@ module.exports = function (it, TAG, STATIC) {
1534
1540
  },
1535
1541
  radioCheckClick: function radioCheckClick(item) {
1536
1542
  item.clicked = true;
1543
+ this.gotoPage(item);
1537
1544
  },
1538
1545
 
1539
1546
  /******************单选复选******end*****************/
@@ -1541,15 +1548,15 @@ module.exports = function (it, TAG, STATIC) {
1541
1548
  //数字类型时,字数限制
1542
1549
  data.clicked = true; //this.verifyReq();
1543
1550
 
1544
- if (data.type == 'tel' && data.value) {
1551
+ if (data.type === 'tel' && data.value) {
1545
1552
  data.value = data.value.replace(/[^0-9]/g, '');
1546
1553
  }
1547
1554
 
1548
- if (data.type == 'integer' && data.value) {
1555
+ if (data.type === 'integer' && data.value) {
1549
1556
  data.value = parseInt(data.value.replace(/[^0-9]/g, '') - 0);
1550
1557
  }
1551
1558
 
1552
- if (data.type == 'number') {
1559
+ if (data.type === 'number') {
1553
1560
  if (data.tofixed) {
1554
1561
  if (JSON.stringify(data.value).includes('.')) {
1555
1562
  var num = data.value.split('.'),
@@ -1570,10 +1577,10 @@ module.exports = function (it, TAG, STATIC) {
1570
1577
  //blur事件
1571
1578
  var _this = this;
1572
1579
 
1573
- if (data.type == 'tel' && data.value) {
1580
+ if (data.type === 'tel' && data.value) {
1574
1581
  data.value = data.value.replace(/[^0-9]/g, '');
1575
1582
 
1576
- if (data.value[0] == 1 && data.value.length != 11) {
1583
+ if (data.value[0] === 1 && data.value.length !== 11) {
1577
1584
  data.showSpecial = true;
1578
1585
  data.errMsg = '手机号码必须为11位!';
1579
1586
  } else {
@@ -1585,11 +1592,11 @@ module.exports = function (it, TAG, STATIC) {
1585
1592
  data.errMsg = '';
1586
1593
  }
1587
1594
 
1588
- if (data.type == 'integer' && data.value) {
1595
+ if (data.type === 'integer' && data.value) {
1589
1596
  data.value = parseInt((data.value + '').replace(/[^0-9]/g, '') - 0);
1590
1597
  }
1591
1598
 
1592
- if (data.type == 'number' && data.tofixed && data.value) {
1599
+ if (data.type === 'number' && data.tofixed && data.value) {
1593
1600
  //数字型 保留小数位数
1594
1601
  data.value = parseFloat((data.value - 0).toFixed(data.tofixed));
1595
1602
  }
@@ -1603,15 +1610,15 @@ module.exports = function (it, TAG, STATIC) {
1603
1610
  var c = data.countContact[2] ? _this.getPointValue(data.countContact[2]) : '';
1604
1611
  var d = data.countContact[3] ? _this.getPointValue(data.countContact[3]) : '';
1605
1612
 
1606
- if (data.countContact.length == 2 && a && b || data.countContact.length == 3 && a && b && c || data.countContact.length == 4 && a && b && c && d) {
1613
+ if (data.countContact.length === 2 && a && b || data.countContact.length === 3 && a && b && c || data.countContact.length === 4 && a && b && c && d) {
1607
1614
  _this.formData.formList.map(function (i) {
1608
- if (i.valueName == data.countResult) {
1615
+ if (i.valueName === data.countResult) {
1609
1616
  i.value = parseFloat(eval(data.countRule));
1610
1617
  }
1611
1618
  });
1612
1619
  } else {
1613
1620
  _this.formData.formList.map(function (i) {
1614
- if (i.valueName == data.countResult) {
1621
+ if (i.valueName === data.countResult) {
1615
1622
  i.value = '';
1616
1623
  }
1617
1624
  });
@@ -1625,15 +1632,15 @@ module.exports = function (it, TAG, STATIC) {
1625
1632
  var c1 = data.secContact[2] ? _this.getPointValue(data.secContact[2]) : '';
1626
1633
  var d1 = data.secContact[3] ? _this.getPointValue(data.secContact[3]) : '';
1627
1634
 
1628
- if (data.secContact.length == 2 && a1 && b1 || data.secContact.length == 3 && a1 && b1 && c1 || data.secContact.length == 4 && a1 && b1 && c1 && d1) {
1635
+ if (data.secContact.length === 2 && a1 && b1 || data.secContact.length === 3 && a1 && b1 && c1 || data.secContact.length === 4 && a1 && b1 && c1 && d1) {
1629
1636
  _this.formData.formList.map(function (i) {
1630
- if (i.valueName == data.secResult) {
1637
+ if (i.valueName === data.secResult) {
1631
1638
  i.value = parseFloat(eval(data.secRule));
1632
1639
  }
1633
1640
  });
1634
1641
  } else {
1635
1642
  _this.formData.formList.map(function (i) {
1636
- if (i.valueName == data.secResult) {
1643
+ if (i.valueName === data.secResult) {
1637
1644
  i.value = '';
1638
1645
  }
1639
1646
  });
@@ -1643,6 +1650,7 @@ module.exports = function (it, TAG, STATIC) {
1643
1650
 
1644
1651
  data.clicked = true;
1645
1652
  this.$forceUpdate();
1653
+ this.gotoPage(data);
1646
1654
  },
1647
1655
  getPointValue: function getPointValue(val) {
1648
1656
  //根据value获取list中的对应值
@@ -1650,7 +1658,7 @@ module.exports = function (it, TAG, STATIC) {
1650
1658
  currVal;
1651
1659
 
1652
1660
  _this.formData.formList.map(function (i) {
1653
- if (i.valueName == val) {
1661
+ if (i.valueName === val) {
1654
1662
  currVal = i.value;
1655
1663
  }
1656
1664
  });
@@ -1677,18 +1685,21 @@ module.exports = function (it, TAG, STATIC) {
1677
1685
  _this.formData.formList.map(function (i) {
1678
1686
  sendData[i.valueName] = i.value;
1679
1687
 
1680
- if (i.require && !i.value) {
1688
+ if (i.type === 'tel' && i.value && i.value[0] === 1 && i.value.length !== 11) {
1689
+ currState = false;
1690
+ phoneMsg = '手机号码必须为11位!';
1691
+ } else if (i.required && !i.value) {
1681
1692
  currState = false;
1682
1693
  mention = mention + i.name + ' , ';
1683
1694
  }
1684
1695
  });
1696
+ /*_this.formData.formList.map(i=>{
1697
+ if(i.type==='tel' && i.value && i.value[0] === 1 && i.value.length !== 11){
1698
+ currState = false;
1699
+ phoneMsg = '手机号码必须为11位!';
1700
+ }
1701
+ });*/
1685
1702
 
1686
- _this.formData.formList.map(function (i) {
1687
- if (i.type == 'tel' && i.value && i.value[0] == 1 && i.value.length != 11) {
1688
- currState = false;
1689
- phoneMsg = '手机号码必须为11位!';
1690
- }
1691
- });
1692
1703
 
1693
1704
  if (mention && phoneMsg) {
1694
1705
  endMsg = mention + ' 为必填项!且' + phoneMsg;
@@ -1704,16 +1715,14 @@ module.exports = function (it, TAG, STATIC) {
1704
1715
  sendData: sendData
1705
1716
  };
1706
1717
 
1707
- if (currState) {
1708
- _this.$emit('formVerify', resultData);
1709
- }
1710
-
1711
1718
  _this.formData.formList.map(function (j) {
1712
1719
  if (j.required) {
1713
1720
  j.clicked = true;
1714
1721
  }
1715
1722
  });
1716
1723
 
1724
+ _this.$emit('formVerify', resultData);
1725
+
1717
1726
  if (isJump) {
1718
1727
  var currDom = '';
1719
1728
  var currTop = 0;