|
@@ -93,7 +93,10 @@ li:hover {
|
|
|
getCheckboxProps: getCheckboxProps
|
|
|
}"
|
|
|
>
|
|
|
- <span slot="orientationName" slot-scope="text, record">{{ text }}({{ record.orientationId }})</span>
|
|
|
+ <span
|
|
|
+ slot="orientationName"
|
|
|
+ slot-scope="text, record"
|
|
|
+ >{{ text }}({{ record.orientationId }})</span>
|
|
|
<span slot="populationType" slot-scope="text">{{ text | population_type }}</span>
|
|
|
<span slot="putTime" slot-scope="text">{{ text | getDate }}</span>
|
|
|
</a-table>
|
|
@@ -131,7 +134,10 @@ li:hover {
|
|
|
getCheckboxProps: getCheckboxPropsNo
|
|
|
}"
|
|
|
>
|
|
|
- <span slot="orientationName" slot-scope="text, record">{{ text }}({{ record.orientationId }})</span>
|
|
|
+ <span
|
|
|
+ slot="orientationName"
|
|
|
+ slot-scope="text, record"
|
|
|
+ >{{ text }}({{ record.orientationId }})</span>
|
|
|
<span slot="populationType" slot-scope="text">{{ text | population_type }}</span>
|
|
|
<span slot="putTime" slot-scope="text">{{ text | getDate }}</span>
|
|
|
</a-table>
|
|
@@ -166,9 +172,11 @@ li:hover {
|
|
|
<a-radio-button value="ageCustom">自定义年龄段</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
<div v-if="allForm.ageType == 'ageLimit'">
|
|
|
- <a-checkbox-group v-decorator="['agesRange', { rules: [{ required: true, message: '请选择年龄段' }] }]">
|
|
|
+ <a-checkbox-group
|
|
|
+ v-decorator="['agesRange', { rules: [{ required: true, message: '请选择年龄段' }] }]"
|
|
|
+ >
|
|
|
<!-- <a-checkbox :value="0">0-11岁</a-checkbox>
|
|
|
- <a-checkbox :value="12">12-17岁</a-checkbox> -->
|
|
|
+ <a-checkbox :value="12">12-17岁</a-checkbox>-->
|
|
|
<a-checkbox :value="18">18-23岁</a-checkbox>
|
|
|
<a-checkbox :value="24">24-30岁</a-checkbox>
|
|
|
<a-checkbox :value="31">31-40岁</a-checkbox>
|
|
@@ -349,9 +357,11 @@ li:hover {
|
|
|
:filterOption="filterOption"
|
|
|
v-decorator="['appInterest', { rules: [{ required: true, message: '请选择APP行为' }] }]"
|
|
|
>
|
|
|
- <a-select-option v-for="item in optionsAppActive" :key="item.tagId" :value="item.tagId">{{
|
|
|
+ <a-select-option v-for="item in optionsAppActive" :key="item.tagId" :value="item.tagId">
|
|
|
+ {{
|
|
|
item.tagName
|
|
|
- }}</a-select-option>
|
|
|
+ }}
|
|
|
+ </a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
<a-form-item
|
|
@@ -379,22 +389,30 @@ li:hover {
|
|
|
@change="onCheckAllChange"
|
|
|
:indeterminate="indeterminate"
|
|
|
:checked="checkAll"
|
|
|
- ></a-checkbox
|
|
|
- >全选
|
|
|
+ ></a-checkbox>全选
|
|
|
</li>
|
|
|
- <a-checkbox-group @change="onChange" v-model="checkArr" class="home-card" style="width:100%">
|
|
|
+ <a-checkbox-group v-model="checkArr" @change="onChange" class="home-card" style="width:100%">
|
|
|
<li style="padding:0 10px;width:100%;" v-for="item of optionsApp" :key="item.appId">
|
|
|
- <a-checkbox :value="item.appId" style="float:left;margin:0 5px"></a-checkbox>{{ item.appName }}
|
|
|
+ <a-checkbox
|
|
|
+ :value="item.appId"
|
|
|
+ style="float:left;margin:0 5px"
|
|
|
+
|
|
|
+ ></a-checkbox>
|
|
|
+ {{ item.appName }}
|
|
|
</li>
|
|
|
</a-checkbox-group>
|
|
|
</ul>
|
|
|
</div>
|
|
|
- <div style="width:100%" v-if="checkArr.length > 0">
|
|
|
+
|
|
|
+ <div style="width:100%" v-if="optionsAll.length > 0">
|
|
|
<a-button @click="clearAll">清空</a-button>
|
|
|
<br />
|
|
|
- <a-tag v-for="item of checkArr" :key="item" closable :afterClose="() => log(item)">
|
|
|
- {{ showAppName(item) }}
|
|
|
- </a-tag>
|
|
|
+ <a-tag
|
|
|
+ v-for="item of optionsAll"
|
|
|
+ :key="item"
|
|
|
+ closable
|
|
|
+ :afterClose="() => log(item)"
|
|
|
+ >{{ showAppName(item) }}</a-tag>
|
|
|
</div>
|
|
|
</div>
|
|
|
</a-form-item>
|
|
@@ -403,13 +421,19 @@ li:hover {
|
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
>
|
|
|
- <a-radio-group buttonStyle="solid" @change="businessInterest" v-model="allForm.businessInterestType">
|
|
|
+ <a-radio-group
|
|
|
+ buttonStyle="solid"
|
|
|
+ @change="businessInterest"
|
|
|
+ v-model="allForm.businessInterestType"
|
|
|
+ >
|
|
|
<a-radio-button :value="0">不限</a-radio-button>
|
|
|
<a-radio-button :value="1">智能推荐</a-radio-button>
|
|
|
<a-radio-button :value="2">兴趣标签</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
- <br>
|
|
|
- <span v-if="allForm.businessInterestType==1">商业兴趣定向会根据您的投放计划,智能精选出最匹配人群,帮助您获取更满足投放意图的人群,以达到最好的投放效果。</span>
|
|
|
+ <br />
|
|
|
+ <span
|
|
|
+ v-if="allForm.businessInterestType==1"
|
|
|
+ >商业兴趣定向会根据您的投放计划,智能精选出最匹配人群,帮助您获取更满足投放意图的人群,以达到最好的投放效果。</span>
|
|
|
</a-form-item>
|
|
|
<a-form-item
|
|
|
label=" "
|
|
@@ -426,9 +450,11 @@ li:hover {
|
|
|
:filterOption="filterOption"
|
|
|
v-decorator="['businessInterest', { rules: [{ required: true, message: '请选择商业兴趣' }] }]"
|
|
|
>
|
|
|
- <a-select-option v-for="item in businessOptions" :key="item.tagId" :value="item.tagId">{{
|
|
|
+ <a-select-option v-for="item in businessOptions" :key="item.tagId" :value="item.tagId">
|
|
|
+ {{
|
|
|
item.tagName
|
|
|
- }}</a-select-option>
|
|
|
+ }}
|
|
|
+ </a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
<a-form-item
|
|
@@ -476,9 +502,11 @@ li:hover {
|
|
|
:filterOption="filterOption"
|
|
|
v-decorator="['fansStar', { rules: [{ required: true, message: '请选择网红类别' }] }]"
|
|
|
>
|
|
|
- <a-select-option v-for="item in fansStarOptions" :key="item.tagId" :value="item.tagId">{{
|
|
|
+ <a-select-option v-for="item in fansStarOptions" :key="item.tagId" :value="item.tagId">
|
|
|
+ {{
|
|
|
item.tagName
|
|
|
- }}</a-select-option>
|
|
|
+ }}
|
|
|
+ </a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
|
|
@@ -508,9 +536,11 @@ li:hover {
|
|
|
:filterOption="filterOption"
|
|
|
v-decorator="['interestVideo', { rules: [{ required: true, message: '请选择视频标签' }] }]"
|
|
|
>
|
|
|
- <a-select-option v-for="item in interestVideoOptions" :key="item.tagId" :value="item.tagId">{{
|
|
|
+ <a-select-option v-for="item in interestVideoOptions" :key="item.tagId" :value="item.tagId">
|
|
|
+ {{
|
|
|
item.tagName
|
|
|
- }}</a-select-option>
|
|
|
+ }}
|
|
|
+ </a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
|
|
@@ -524,7 +554,7 @@ li:hover {
|
|
|
{
|
|
|
initialValue: '0'
|
|
|
}
|
|
|
- ]" -->
|
|
|
+ ]"-->
|
|
|
<a-radio-group buttonStyle="solid" v-model="allForm.isOpen">
|
|
|
<a-radio-button :value="0">关闭</a-radio-button>
|
|
|
<a-radio-button :value="1">开启</a-radio-button>
|
|
@@ -537,15 +567,21 @@ li:hover {
|
|
|
class="else-label"
|
|
|
v-if="allForm.isOpen == 1"
|
|
|
>
|
|
|
- <a-checkbox :disabled="allForm.ageType == 'noLimit'" :checked="allForm.noAgeBreak" @change="getAge"
|
|
|
- >不可突破年龄</a-checkbox
|
|
|
- >
|
|
|
- <a-checkbox :disabled="getData('gender') == '0'" :checked="allForm.noGenderBreak" @change="getGender"
|
|
|
- >不可突破性别</a-checkbox
|
|
|
- >
|
|
|
- <a-checkbox :disabled="allForm.regionType != 'limit'||allForm.region.length==0" :checked="allForm.noAreaBreak" @change="getArea"
|
|
|
- >不可突破地域</a-checkbox
|
|
|
- >
|
|
|
+ <a-checkbox
|
|
|
+ :disabled="allForm.ageType == 'noLimit'"
|
|
|
+ :checked="allForm.noAgeBreak"
|
|
|
+ @change="getAge"
|
|
|
+ >不可突破年龄</a-checkbox>
|
|
|
+ <a-checkbox
|
|
|
+ :disabled="getData('gender') == '0'"
|
|
|
+ :checked="allForm.noGenderBreak"
|
|
|
+ @change="getGender"
|
|
|
+ >不可突破性别</a-checkbox>
|
|
|
+ <a-checkbox
|
|
|
+ :disabled="allForm.regionType != 'limit'||allForm.region.length==0"
|
|
|
+ :checked="allForm.noAreaBreak"
|
|
|
+ @change="getArea"
|
|
|
+ >不可突破地域</a-checkbox>
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
</template>
|
|
@@ -582,7 +618,7 @@ const clickoutside = {
|
|
|
// 解除事件监听
|
|
|
document.removeEventListener('click', el.__vueClickOutside__)
|
|
|
delete el.__vueClickOutside__
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
|
|
|
const columns = [
|
|
@@ -590,7 +626,7 @@ const columns = [
|
|
|
title: '人群',
|
|
|
dataIndex: 'orientationName',
|
|
|
scopedSlots: { customRender: 'orientationName' },
|
|
|
- width: 150
|
|
|
+ width: 150,
|
|
|
},
|
|
|
{
|
|
|
title: '属性',
|
|
@@ -612,22 +648,18 @@ const columns = [
|
|
|
{ text: '固化标签', value: '14' },
|
|
|
{ text: '行业偏好', value: '15' },
|
|
|
{ text: '第三方标签', value: '16' },
|
|
|
- { text: '产品关键词', value: '17' }
|
|
|
+ { text: '产品关键词', value: '17' },
|
|
|
],
|
|
|
- onFilter: (value, record) =>
|
|
|
- record.populationType
|
|
|
- .toString()
|
|
|
- .toLowerCase()
|
|
|
- .includes(value.toLowerCase()),
|
|
|
+ onFilter: (value, record) => record.populationType.toString().toLowerCase().includes(value.toLowerCase()),
|
|
|
scopedSlots: { customRender: 'populationType' },
|
|
|
- width: 150
|
|
|
+ width: 150,
|
|
|
},
|
|
|
{
|
|
|
title: '创建时间',
|
|
|
dataIndex: 'putTime',
|
|
|
scopedSlots: { customRender: 'putTime' },
|
|
|
- sorter: (a, b) => a.putTime - b.putTime
|
|
|
- }
|
|
|
+ sorter: (a, b) => a.putTime - b.putTime,
|
|
|
+ },
|
|
|
]
|
|
|
|
|
|
export default {
|
|
@@ -638,14 +670,14 @@ export default {
|
|
|
type: String,
|
|
|
default() {
|
|
|
return null
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
platform: {
|
|
|
default() {
|
|
|
return null
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
- populationData: {}
|
|
|
+ populationData: {},
|
|
|
},
|
|
|
filters: {
|
|
|
getDate(value) {
|
|
@@ -662,7 +694,7 @@ export default {
|
|
|
1: 'Android应用下载',
|
|
|
2: 'Android网页游戏',
|
|
|
3: 'iOS应用下载',
|
|
|
- 4: 'iOS网页游戏'
|
|
|
+ 4: 'iOS网页游戏',
|
|
|
}
|
|
|
return data[str]
|
|
|
},
|
|
@@ -684,10 +716,10 @@ export default {
|
|
|
14: '固化标签',
|
|
|
15: '行业偏好',
|
|
|
16: '第三方标签',
|
|
|
- 17: '产品关键词'
|
|
|
+ 17: '产品关键词',
|
|
|
}
|
|
|
return data[str]
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
platform(n, o) {
|
|
@@ -716,7 +748,7 @@ export default {
|
|
|
|
|
|
this.targeted = n.excludePopulation ? (n.population ? '4' : '3') : '2'
|
|
|
this.people = n.excludePopulation ? '3' : n.population ? '3' : '2'
|
|
|
- this.getPeople().then(res => {
|
|
|
+ this.getPeople().then((res) => {
|
|
|
if (n.excludePopulation) {
|
|
|
this.keyValueNo = ''
|
|
|
this.selectedRowKeysValueNo = []
|
|
@@ -726,7 +758,7 @@ export default {
|
|
|
this.keyValueNo += res[i].orientationName + ' '
|
|
|
this.selectedRowKeysValueNo.push({
|
|
|
orientationId: res[i].orientationId,
|
|
|
- orientationName: res[i].orientationName
|
|
|
+ orientationName: res[i].orientationName,
|
|
|
})
|
|
|
this.selectedRowKeysNo.push()
|
|
|
}
|
|
@@ -742,7 +774,7 @@ export default {
|
|
|
this.keyValue += res[i].orientationName + ' '
|
|
|
this.selectedRowKeysValue.push({
|
|
|
orientationId: res[i].orientationId,
|
|
|
- orientationName: res[i].orientationName
|
|
|
+ orientationName: res[i].orientationName,
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -763,7 +795,7 @@ export default {
|
|
|
'iosOsv',
|
|
|
'deviceBrand',
|
|
|
'devicePrice',
|
|
|
- 'businessInterest'
|
|
|
+ 'businessInterest',
|
|
|
])
|
|
|
)
|
|
|
})
|
|
@@ -790,11 +822,28 @@ export default {
|
|
|
isOpen: 0,
|
|
|
noAgeBreak: false,
|
|
|
noGenderBreak: false,
|
|
|
- noAreaBreak: false
|
|
|
+ noAreaBreak: false,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ checkArr(n, o) {
|
|
|
+ console.log(n, o)
|
|
|
+ this.optionsAll.push(...n)
|
|
|
+ this.optionsAll = [...new Set(this.optionsAll)]
|
|
|
+ if (n.length != o.length) {
|
|
|
+ if (n.length < o.length) {
|
|
|
+ var a = new Set(n)
|
|
|
+ var b = new Set(o)
|
|
|
+ var c = new Set([...b].filter((item) => !a.has(item))) // {1}
|
|
|
+ console.log(...c)
|
|
|
+ var d = this.optionsAll.indexOf(...c)
|
|
|
+ if (d > 0) {
|
|
|
+ this.optionsAll.splice(d, 1)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
directives: { clickoutside },
|
|
|
data() {
|
|
@@ -811,7 +860,7 @@ export default {
|
|
|
40: '40岁',
|
|
|
45: '45岁',
|
|
|
50: '50岁',
|
|
|
- 55: '55岁'
|
|
|
+ 55: '55岁',
|
|
|
},
|
|
|
step: 0,
|
|
|
loading: false,
|
|
@@ -838,19 +887,20 @@ export default {
|
|
|
topMiddle: false,
|
|
|
topMiddleNo: false,
|
|
|
keyValue: '',
|
|
|
- keyValueNo: ''
|
|
|
+ keyValueNo: '',
|
|
|
},
|
|
|
options: [],
|
|
|
- optionsAll: [],
|
|
|
optionProps: {
|
|
|
value: 'regionId',
|
|
|
label: 'name',
|
|
|
children: 'children',
|
|
|
multiple: true,
|
|
|
- emitPath: false
|
|
|
+ emitPath: false,
|
|
|
// checkStrictly: true
|
|
|
},
|
|
|
+ optionsAll: [],
|
|
|
optionsApp: [],
|
|
|
+ checkElse: [],
|
|
|
optionsAppActive: [],
|
|
|
checkOptions: [],
|
|
|
businessOptions: [],
|
|
@@ -861,7 +911,7 @@ export default {
|
|
|
label: 'tagName',
|
|
|
children: 'children',
|
|
|
multiple: true,
|
|
|
- emitPath: false
|
|
|
+ emitPath: false,
|
|
|
},
|
|
|
getApp: '0',
|
|
|
closeDialog: false,
|
|
@@ -878,26 +928,28 @@ export default {
|
|
|
selectedRowKeysValue: [],
|
|
|
selectedRowKeysNo: [],
|
|
|
selectedRowKeysValueNo: [],
|
|
|
- dataList: []
|
|
|
+ dataList: [],
|
|
|
}
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
getPeople() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- getAction('/kuaishou/batch/getPopulationList', { accountId: localStorage.getItem('accountIdNewMoudle') }).then(res => {
|
|
|
- if (res.success) {
|
|
|
- if (res.result) {
|
|
|
- this.dataList = res.result.map((item, index) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- key: index
|
|
|
- }
|
|
|
- })
|
|
|
- resolve(res.result)
|
|
|
+ getAction('/kuaishou/batch/getPopulationList', { accountId: localStorage.getItem('accountIdNewMoudle') }).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.success) {
|
|
|
+ if (res.result) {
|
|
|
+ this.dataList = res.result.map((item, index) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ key: index,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ resolve(res.result)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
+ )
|
|
|
})
|
|
|
},
|
|
|
radioChange() {
|
|
@@ -910,28 +962,28 @@ export default {
|
|
|
},
|
|
|
onSelectChange(selectedRowKeys, selectionRows) {
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
- this.selectedRowKeysValue = selectionRows.map(item => {
|
|
|
+ this.selectedRowKeysValue = selectionRows.map((item) => {
|
|
|
return { orientationId: item.orientationId, orientationName: item.orientationName }
|
|
|
})
|
|
|
},
|
|
|
getCheckboxProps(record) {
|
|
|
return {
|
|
|
props: {
|
|
|
- disabled: this.selectedRowKeysValueNo.some(item => item.orientationId === record.orientationId)
|
|
|
- }
|
|
|
+ disabled: this.selectedRowKeysValueNo.some((item) => item.orientationId === record.orientationId),
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
onSelectChangeNo(selectedRowKeys, selectionRows) {
|
|
|
this.selectedRowKeysNo = selectedRowKeys
|
|
|
- this.selectedRowKeysValueNo = selectionRows.map(item => {
|
|
|
+ this.selectedRowKeysValueNo = selectionRows.map((item) => {
|
|
|
return { orientationId: item.orientationId, orientationName: item.orientationName }
|
|
|
})
|
|
|
},
|
|
|
getCheckboxPropsNo(record) {
|
|
|
return {
|
|
|
props: {
|
|
|
- disabled: this.selectedRowKeysValue.some(item => item.orientationId === record.orientationId)
|
|
|
- }
|
|
|
+ disabled: this.selectedRowKeysValue.some((item) => item.orientationId === record.orientationId),
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
okSelect() {
|
|
@@ -973,15 +1025,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
showAppName(appId) {
|
|
|
- var data = this.checkOptions.filter(item => {
|
|
|
+ var data = this.checkOptions.filter((item) => {
|
|
|
return item.appId == appId
|
|
|
})
|
|
|
return data[0].appName
|
|
|
},
|
|
|
log(appId) {
|
|
|
- var index = this.checkArr.findIndex(item => item === appId)
|
|
|
- this.checkArr.splice(index, 1)
|
|
|
- if (this.checkArr.length == 0) {
|
|
|
+ var index = this.optionsAll.findIndex((item) => item === appId)
|
|
|
+ this.optionsAll.splice(index, 1)
|
|
|
+ if (this.optionsAll.length == 0) {
|
|
|
this.indeterminate = false
|
|
|
this.checkAll = false
|
|
|
}
|
|
@@ -991,33 +1043,39 @@ export default {
|
|
|
},
|
|
|
clearAll() {
|
|
|
this.checkArr = []
|
|
|
+ this.optionsAll = []
|
|
|
this.indeterminate = false
|
|
|
this.checkAll = false
|
|
|
},
|
|
|
onChange(checkedList) {
|
|
|
+ console.log(checkedList, this.checkArr)
|
|
|
this.indeterminate =
|
|
|
!!checkedList.length &&
|
|
|
checkedList.length <
|
|
|
- this.optionsApp.map(item => {
|
|
|
+ this.optionsApp.map((item) => {
|
|
|
return item.appId
|
|
|
}).length
|
|
|
this.checkAll =
|
|
|
checkedList.length ===
|
|
|
- this.optionsApp.map(item => {
|
|
|
+ this.optionsApp.map((item) => {
|
|
|
return item.appId
|
|
|
}).length
|
|
|
+
|
|
|
+ // if (this.checkArr.indexOf(checkedList) > 0) {
|
|
|
+ // var index = this.optionsAll.indexOf(checkedList)
|
|
|
+ // }
|
|
|
},
|
|
|
onCheckAllChange(e) {
|
|
|
Object.assign(this, {
|
|
|
checkArr: e.target.checked
|
|
|
- ? this.optionsApp.map(item => {
|
|
|
+ ? this.optionsApp.map((item) => {
|
|
|
return item.appId
|
|
|
})
|
|
|
: [],
|
|
|
indeterminate: false,
|
|
|
- checkAll: e.target.checked
|
|
|
+ checkAll: e.target.checked,
|
|
|
})
|
|
|
- if (this.checkArr.length > 20) {
|
|
|
+ if (this.optionsAll.length > 20) {
|
|
|
this.$message.error('最多选择20个APP行为')
|
|
|
this.checkArr = []
|
|
|
this.indeterminate = false
|
|
@@ -1039,35 +1097,35 @@ export default {
|
|
|
// this.checkArr
|
|
|
var json = {}
|
|
|
if (this.allForm.appType == '2') {
|
|
|
- json.appIds = this.checkArr
|
|
|
+ json.appIds = this.optionsAll
|
|
|
}
|
|
|
if (this.allForm.regionType == 'limit') {
|
|
|
- json.region = this.allForm.region.map(item => {
|
|
|
+ json.region = this.allForm.region.map((item) => {
|
|
|
return item.value
|
|
|
})
|
|
|
}
|
|
|
var jsonData = {}
|
|
|
- if(this.people == '3'){
|
|
|
+ if (this.people == '3') {
|
|
|
if (this.targeted == '2') {
|
|
|
- jsonData.population = this.selectedRowKeysValue.map(item => {
|
|
|
+ jsonData.population = this.selectedRowKeysValue.map((item) => {
|
|
|
return item.orientationId
|
|
|
- })
|
|
|
+ })
|
|
|
} else if (this.targeted == '3') {
|
|
|
- jsonData.excludePopulation = this.selectedRowKeysValueNo.map(item => {
|
|
|
+ jsonData.excludePopulation = this.selectedRowKeysValueNo.map((item) => {
|
|
|
return item.orientationId
|
|
|
- })
|
|
|
+ })
|
|
|
} else if (this.targeted == '4') {
|
|
|
- jsonData.population = this.selectedRowKeysValue.map(item => {
|
|
|
+ jsonData.population = this.selectedRowKeysValue.map((item) => {
|
|
|
return item.orientationId
|
|
|
- })
|
|
|
- jsonData.excludePopulation = this.selectedRowKeysValueNo.map(item => {
|
|
|
+ })
|
|
|
+ jsonData.excludePopulation = this.selectedRowKeysValueNo.map((item) => {
|
|
|
return item.orientationId
|
|
|
- })
|
|
|
+ })
|
|
|
} else {
|
|
|
- jsonData = {}
|
|
|
+ jsonData = {}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
var dataJson = {
|
|
|
...values,
|
|
|
platformOs: this.allForm.platform_os,
|
|
@@ -1078,7 +1136,7 @@ export default {
|
|
|
noGenderBreak: this.allForm.noGenderBreak ? 1 : 0,
|
|
|
noAreaBreak: this.allForm.noAreaBreak ? 1 : 0,
|
|
|
allForm: this.allForm,
|
|
|
- ...jsonData
|
|
|
+ ...jsonData,
|
|
|
}
|
|
|
this.$emit('update:populationData', dataJson)
|
|
|
}
|
|
@@ -1101,10 +1159,10 @@ export default {
|
|
|
},
|
|
|
search(e) {},
|
|
|
put() {
|
|
|
- var data = this.allForm.region.map(item => {
|
|
|
+ var data = this.allForm.region.map((item) => {
|
|
|
return item[1] + ''
|
|
|
})
|
|
|
- var dataElse = data.map(item => {
|
|
|
+ var dataElse = data.map((item) => {
|
|
|
return [item.substring(0, 2), item]
|
|
|
})
|
|
|
},
|
|
@@ -1112,8 +1170,8 @@ export default {
|
|
|
if (e.target.value !== '') {
|
|
|
getAction('/kuaishou/batch/getAppSearch', {
|
|
|
accountId: localStorage.getItem('accountId'),
|
|
|
- appName: e.target.value
|
|
|
- }).then(res => {
|
|
|
+ appName: e.target.value,
|
|
|
+ }).then((res) => {
|
|
|
if (res.result) {
|
|
|
this.optionsApp = res.result
|
|
|
this.checkOptions.push(...res.result)
|
|
@@ -1133,7 +1191,7 @@ export default {
|
|
|
this.formAll.setFieldsValue({ appInterest: [] })
|
|
|
this.checkArr = []
|
|
|
if (e.target.value == '1') {
|
|
|
- getAction('/kuaishou/batch/getTargetList', { tagType: 'APP_INTEREST' }).then(res => {
|
|
|
+ getAction('/kuaishou/batch/getTargetList', { tagType: 'APP_INTEREST' }).then((res) => {
|
|
|
if (res.success) {
|
|
|
this.optionsApp = res.result
|
|
|
}
|
|
@@ -1160,7 +1218,7 @@ export default {
|
|
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
},
|
|
|
getDataType(type, dataList) {
|
|
|
- getAction('/kuaishou/batch/getTargetList', { tagType: type }).then(res => {
|
|
|
+ getAction('/kuaishou/batch/getTargetList', { tagType: type }).then((res) => {
|
|
|
if (res.success) {
|
|
|
this[dataList] = res.result
|
|
|
}
|
|
@@ -1168,15 +1226,14 @@ export default {
|
|
|
},
|
|
|
getData(className) {
|
|
|
return this.formAll.getFieldValue(className)
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
- mounted: function() {
|
|
|
+ mounted: function () {
|
|
|
this.getDataType('APP_INTEREST', 'optionsAppActive')
|
|
|
this.getDataType('BUSINESS_INTEREST', 'businessOptions')
|
|
|
this.getDataType('FANS_STAR', 'fansStarOptions')
|
|
|
this.getDataType('INTEREST_VIDEO', 'interestVideoOptions')
|
|
|
-
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|