Commit cdedf378 by 李伟康

提交

1 parent 7ee80b94
......@@ -215,14 +215,13 @@ export default {
},
methods: {
change (id) {
this.configForm.activityId = ''
this.configForm.activityType = ''
this.clearActivity()
this.configForm.merchantName = ''
this.activityObj = this.$options.data.call(this).activityObj
if (id) {
this.configForm.merchantName = this.merchantObj.data.find(e => e.confId == id).confName
this.getActivityList()
}else this.activityObj.flag = true
} else this.activityObj.flag = true
},
formRef () {
return this.$refs.formRef.$refs.formRef
......@@ -251,8 +250,7 @@ export default {
if (this.tabsObj.index == index) return
if (!merchantId) return this.$message.error('请选择所属渠道')
this.tabsObj.index = index
this.configForm.activityId = ''
this.configForm.activityType = ''
this.clearActivity()
this.activityObj = this.$options.data.call(this).activityObj
this.getActivityList()
},
......@@ -276,22 +274,26 @@ export default {
if (index == 2) {
data = [...this.activityObj.data, ...res.list]
this.activityObj.total = res.total
}
this.activityObj.data = data
this.activityObj.loading = false
this.activityObj.flag = true
this.setActivityData(data)
} catch (error) {
this.activityObj.data = []
this.activityObj.loading = false
this.activityObj.flag = true
this.setActivityData()
}
},
setActivityData (data = []) {
this.activityObj.data = data
this.activityObj.loading = false
this.activityObj.flag = true
},
choose (e) {
const { index } = this.tabsObj
this.configForm.activityId = e
this.configForm.activityType = e ? index == 0 ? 1 : index : ''
}
},
clearActivity(){
this.configForm.activityId = ''
this.configForm.activityType = ''
},
},
}
......
......@@ -72,6 +72,7 @@
v-model="configForm.userInfoField"
placeholder="请选择"
style="width:432px"
clearable
>
<el-option
v-for="item in userInfoFieldList"
......@@ -89,6 +90,7 @@
:key="index"
v-model="userInfoFields[index]"
placeholder="请选择"
clearable
>
<el-option
v-for="item in userInfoFieldList"
......@@ -292,13 +294,12 @@ export default {
selectValue: '',
cascaderValue: ''
}
if (type != 3) {
this.configForm[inputKeyObject[type]] = String(data.option)
if (userInfoField) {
if (type == 5) this.userInfoFields = userInfoField.split('/').map(e => e ? Number(e) : '')
else this.configForm.userInfoField = Number(userInfoField)
}
} else this.configForm.maxLength = data.option
if (type != 3) this.configForm[inputKeyObject[type]] = String(data.option)
else this.configForm.maxLength = data.option
if (userInfoField) {
if (type == 5) this.userInfoFields = userInfoField.split('/').map(e => e ? Number(e) : '')
else this.configForm.userInfoField = Number(userInfoField)
}
}
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!