|
@@ -35,8 +35,8 @@
|
|
|
class="else-width"
|
|
|
v-if="areaType!='NONE'"
|
|
|
>
|
|
|
- <transfer-city v-if="areaType == 'CITY'" :checkData.sync="cityList"></transfer-city>
|
|
|
- <transfer v-if="areaType == 'COUNTY'" :checkData.sync="areaList"></transfer>
|
|
|
+ <transfer-city v-if="areaType == 'CITY'" :checkData.sync="cityList" :dataValue="cityStr"></transfer-city>
|
|
|
+ <transfer v-if="areaType == 'COUNTY'" :checkData.sync="areaList" :dataValue="areaStr"></transfer>
|
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
@@ -70,10 +70,7 @@
|
|
|
class="else-width"
|
|
|
v-if="intrestType=='ZDY'"
|
|
|
>
|
|
|
- <intrest-category v-if="intrestType == 'ZDY'" :checkData.sync="intrestCategoryList" :dataValue="editData"></intrest-category>
|
|
|
- {{intrestCategoryList}}
|
|
|
-
|
|
|
- <div @click="addData">tianji</div>
|
|
|
+ <intrest-category v-if="intrestType == 'ZDY'" :checkData.sync="intrestCategoryList" :dataValue="adTagStr"></intrest-category>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="平台" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
<a-radio-group v-model="platformType">
|
|
@@ -162,6 +159,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ cityStr:[],
|
|
|
+ areaStr:[],
|
|
|
+ adTagStr:[],
|
|
|
cityList:[],
|
|
|
areaList:[],
|
|
|
name:"",
|
|
@@ -169,7 +169,6 @@ export default {
|
|
|
platformType:"NONE",
|
|
|
mobileType:[],
|
|
|
intrestCategoryList:[],
|
|
|
- editData:[ { "label": "游戏", "value": 10001 }, { "label": "家装建材", "value": 10201 }, { "label": "家居家纺", "value": 10202 }, { "label": "家电维修", "value": 10204 }, { "label": "日用百货", "value": 10205 }],
|
|
|
smartFl:"0",
|
|
|
intrestType:"NONE",
|
|
|
title: '操作',
|
|
@@ -185,9 +184,10 @@ export default {
|
|
|
xs: { span: 24 },
|
|
|
sm: { span: 16 }
|
|
|
},
|
|
|
+ id:null,
|
|
|
confirmLoading: false,
|
|
|
form: this.$form.createForm(this),
|
|
|
- tags:[],
|
|
|
+ tags:null,
|
|
|
gender: "NONE",
|
|
|
toutiaoSex: {},
|
|
|
ageRange: [],
|
|
@@ -199,7 +199,6 @@ export default {
|
|
|
showArticleCategory: false,
|
|
|
articleCategoryList: [],
|
|
|
isArticleCategory: "NONE",
|
|
|
- zdyrq: [],
|
|
|
areaType: "NONE",
|
|
|
value: undefined,
|
|
|
model1: {},
|
|
@@ -278,18 +277,42 @@ export default {
|
|
|
this.close()
|
|
|
},
|
|
|
handleOk() {},
|
|
|
- add() {
|
|
|
- this.edit({})
|
|
|
+ add(record) {
|
|
|
+ this.id = null;
|
|
|
+ this.model = Object.assign({}, record);
|
|
|
+ this.visible = true;
|
|
|
+ this.gender="NONE";
|
|
|
+ this.ageRange=[];
|
|
|
+ this.isMobileBrand="NONE";
|
|
|
+ this.showMobileBrand=false;
|
|
|
+ this.showArticleCategory=false;
|
|
|
+ this.tags = [];
|
|
|
+ this.isArticleCategory="NONE";
|
|
|
+ this.areaType="NONE";
|
|
|
+ this.cityStr=[];
|
|
|
+ this.areaStr=[];
|
|
|
+ this.adTagStr=[];
|
|
|
+ this.cityList=[];
|
|
|
+ this.areaList=[];
|
|
|
+ this.name="";
|
|
|
+ this.netType=[];
|
|
|
+ this.platformType="NONE";
|
|
|
+ this.mobileType=[];
|
|
|
+ this.intrestCategoryList=[];
|
|
|
+ this.smartFl="0";
|
|
|
+ this.intrestType="NONE";
|
|
|
+ this.gender="NONE";
|
|
|
+ this.ageRange=null;
|
|
|
},
|
|
|
edit(record) {
|
|
|
- // this.form.resetFields()
|
|
|
- this.model = Object.assign({}, record)
|
|
|
+ console.log(record)
|
|
|
this.visible = true;
|
|
|
this.gender = record.gender;
|
|
|
- this.ageRange = record.age;
|
|
|
+ this.ageRange = JSON.parse(record.age);
|
|
|
this.intrestType = record.intrestType;
|
|
|
this.platformType = record.platform;
|
|
|
- this.netType = record.ac;
|
|
|
+ this.netType = JSON.parse(record.ac)
|
|
|
+ console.log(typeof this.netType)
|
|
|
this.smartFl = record.autoExtendEnabled;
|
|
|
this.isArticleCategory = record.articleCategoryType;
|
|
|
this.tags = JSON.parse(record.articleCategory);
|
|
@@ -297,9 +320,15 @@ export default {
|
|
|
this.mobileType = record.deviceBrand;
|
|
|
this.name = record.name;
|
|
|
this.areaType = record.areaType;
|
|
|
- this.cityList = record.city;
|
|
|
- this.areaList = record.district;
|
|
|
- this.intrestCategoryList = JSON.parse(record.adTag);
|
|
|
+ this.cityList = JSON.parse(record.cityStr);
|
|
|
+ this.areaList = JSON.parse(record.districtStr);
|
|
|
+ this.intrestCategoryList = JSON.parse(record.adTagStr);
|
|
|
+ this.cityStr = JSON.parse(record.cityStr);
|
|
|
+ this.areaStr = JSON.parse(record.districtStr);
|
|
|
+ this.adTagStr = JSON.parse(record.adTagStr);
|
|
|
+ this.id = record.id;
|
|
|
+ // this.form.resetFields()
|
|
|
+ this.model = Object.assign({}, record)
|
|
|
},
|
|
|
close() {
|
|
|
this.$emit('close')
|
|
@@ -348,6 +377,7 @@ export default {
|
|
|
if (!err) {
|
|
|
console.log('Received values of form: ', values);
|
|
|
let params = {};
|
|
|
+ params.id = this.id;
|
|
|
params.gender = this.gender;
|
|
|
params.ageRange = this.ageRange;
|
|
|
params.intrestType = this.intrestType;
|