Commit 0df18be7 by chenwq

浏览明细,表单设置

1 parent e85b8ead
...@@ -49,20 +49,21 @@ export default { ...@@ -49,20 +49,21 @@ export default {
activityName: '' activityName: ''
}, },
searchForm: { searchForm: {
zoneName: '' customerName: '',
mobile: ''
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 搜索 // 搜索
searchFormData: [ searchFormData: [
{ {
label: '微信昵称', label: '微信昵称',
name: 'zoneName', name: 'customerName',
type: 'input', type: 'input',
maxlength: 50 maxlength: 50
}, },
{ {
label: '手机号', label: '手机号',
name: 'zoneName', name: 'mobile',
type: 'input', type: 'input',
maxlength: 11 maxlength: 11
} }
...@@ -137,7 +138,8 @@ export default { ...@@ -137,7 +138,8 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
zoneName: '' customerName: '',
mobile: ''
} }
this.handleSearch() this.handleSearch()
} }
......
...@@ -262,6 +262,11 @@ export default { ...@@ -262,6 +262,11 @@ export default {
}, },
// 表单设置 // 表单设置
describeNum: 3, describeNum: 3,
describeIdxToAttr: {
0: 'First',
1: 'Second',
2: 'Third'
},
formDescribeList: [ formDescribeList: [
{ {
value: '' value: ''
...@@ -752,6 +757,13 @@ export default { ...@@ -752,6 +757,13 @@ export default {
this.editForm.activityDetail = decodeURIComponent(info.activityDetail) this.editForm.activityDetail = decodeURIComponent(info.activityDetail)
this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].setEdit(this.editForm.activityDetail) this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].setEdit(this.editForm.activityDetail)
} }
// 表单设置
this.formDescribeList = []
Object.values(this.describeIdxToAttr).forEach((item, index) => {
if (this.editForm['formDescribe' + item]) {
this.formDescribeList.push({ value: this.editForm['formDescribe' + this.describeIdxToAttr[index]] })
}
})
console.log(this.editForm) console.log(this.editForm)
this.$nextTick(() => { this.$nextTick(() => {
this.editStatus = false this.editStatus = false
...@@ -805,16 +817,9 @@ export default { ...@@ -805,16 +817,9 @@ export default {
param.activityDetail = encodeURIComponent(this.editForm.activityDetail) param.activityDetail = encodeURIComponent(this.editForm.activityDetail)
} }
// 表单设置 // 表单设置
let idxToAttr = {
0: 'First',
1: 'Second',
2: 'Third'
}
let idx = 0 let idx = 0
this.formDescribeList.forEach(item => { this.formDescribeList.forEach(item => {
if (item.value) { param['formDescribe' + this.describeIdxToAttr[idx++]] = item.value ? item.value : ''
param['formDescribe' + idxToAttr[idx++]] = item.value
}
}) })
return param return param
...@@ -885,18 +890,9 @@ export default { ...@@ -885,18 +890,9 @@ export default {
] ]
this.$refs.configEditFormRef.$refs[this.editChildRef].validate((configValid, configErrorObj) => { this.$refs.configEditFormRef.$refs[this.editChildRef].validate((configValid, configErrorObj) => {
validList.push({ valid: !configValid, errorObj: configErrorObj }) validList.push({ valid: !configValid, errorObj: configErrorObj })
// if (this.$refs.serviceEditFormRef) {
// this.$refs.serviceEditFormRef.$refs[this.editChildRef].validate((serviceValid, serviceErrorObj) => {
// validList.splice(2, 0, { valid: !serviceValid, errorObj: serviceErrorObj })
// if (this.checkValid(validList)) {
// this.addOrUpdate()
// }
// })
// } else {
if (this.checkValid(validList)) { if (this.checkValid(validList)) {
this.addOrUpdate() this.addOrUpdate()
} }
// }
}) })
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!