|
@@ -62,7 +62,7 @@ export default {
|
|
|
titleText: '新增',
|
|
|
rules: {
|
|
|
stationNo: [{ required: true, message: '请选择网点', trigger: 'change' }],
|
|
|
- gatherPhone: [{ required: true, message: '请输入正确的手机号', trigger: 'blur', pattern: /^[1][0-9]{10}$/ }]
|
|
|
+ gatherPhone: [{ required: true, message: '请输入正确的手机号', trigger: 'blur', pattern: /^\d{11}$/ }]
|
|
|
},
|
|
|
loading: false,
|
|
|
optionData: [] // 标签数据
|
|
@@ -91,9 +91,7 @@ export default {
|
|
|
id: _this.collectorId
|
|
|
}).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- console.log(res, '-------数据')
|
|
|
_this.loading = false
|
|
|
- // _this.formData = Object.assign({}, this.formData, res.data)
|
|
|
_this.formData.gatherName = res.data.gatherName
|
|
|
_this.formData.gatherPhone = res.data.gatherPhone
|
|
|
_this.formData.stationNo = res.data.stationNo
|
|
@@ -132,6 +130,9 @@ export default {
|
|
|
this.formData.gatherName = ''
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.getStationList()
|
|
|
+ },
|
|
|
// 监听弹窗
|
|
|
watch: {
|
|
|
// 父页面传过来的弹窗状态
|
|
@@ -140,7 +141,6 @@ export default {
|
|
|
},
|
|
|
isShow (newValue, oldValue) {
|
|
|
if (newValue) {
|
|
|
- this.getStationList()
|
|
|
if (this.collectorId) { // 编辑
|
|
|
this.titleText = '编辑'
|
|
|
this.getPageInfo()
|