Commit 0df18be7 by chenwq

浏览明细,表单设置

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