|
@@ -147,13 +147,13 @@ export default {
|
|
|
this.type = type
|
|
|
var params = {}
|
|
|
params.id = item.id
|
|
|
+ this.accountId = item.accountId
|
|
|
this.templateId = item.id
|
|
|
- this.projectName = item.projectName
|
|
|
- this.projectId = item.projectId
|
|
|
- getAction('/kuaishouDirectionalPackage/queryById', params).then(res => {
|
|
|
+ getAction('/auto/aiKuaishouAccountAutoTarget/queryById', params).then(res => {
|
|
|
if (res.success) {
|
|
|
var dataJson = {
|
|
|
- ...res.result
|
|
|
+ ...res.result,
|
|
|
+ templateName: res.result.targetName
|
|
|
}
|
|
|
|
|
|
this.populationData = dataJson
|
|
@@ -189,6 +189,14 @@ export default {
|
|
|
: !dataJson.population && !dataJson.excludePopulation
|
|
|
? '0'
|
|
|
: '0'
|
|
|
+ this.populationData.allForm.tabKey =
|
|
|
+ this.populationData.allForm.people == '0'
|
|
|
+ ? '1'
|
|
|
+ : this.populationData.allForm.people == '1'
|
|
|
+ ? '1'
|
|
|
+ : this.populationData.allForm.people == '2'
|
|
|
+ ? '2'
|
|
|
+ : '1'
|
|
|
this.populationData.allForm.incluedSelectedRowKeys =
|
|
|
dataJson.population && dataJson.population.length > 0 ? dataJson.population : []
|
|
|
this.populationData.allForm.incluedSelectedKeys =
|
|
@@ -278,18 +286,16 @@ export default {
|
|
|
params.label = params.behavior ? JSON.stringify(params.behavior) : '[]'
|
|
|
params.interestLabel = params.interest ? JSON.stringify(params.interest) : '[]'
|
|
|
if (this.type == 'add') {
|
|
|
- postAction('/auto/aiKuaishouAccountAutoTarget/addLocalTarget', params).then(
|
|
|
- res => {
|
|
|
- if (res.success) {
|
|
|
- this.visible = false
|
|
|
- this.loading = false
|
|
|
- this.$emit('getData')
|
|
|
- } else {
|
|
|
- this.loading = false
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
+ postAction('/auto/aiKuaishouAccountAutoTarget/addLocalTarget', params).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.visible = false
|
|
|
+ this.loading = false
|
|
|
+ this.$emit('getData')
|
|
|
+ } else {
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error(res.message)
|
|
|
}
|
|
|
- )
|
|
|
+ })
|
|
|
} else if (this.type == 'edit') {
|
|
|
params.id = this.templateId
|
|
|
postAction('/auto/aiKuaishouAccountAutoTarget/updateLocalTarget', params).then(
|